globals constant boolean LIBRARY_Polygon=true constant boolean LIBRARY_alloc=true integer mv=0 integer Mv=8190 hashtable BYHT=InitHashtable() hashtable BYHT2=InitHashtable() constant integer Pv=$B constant integer qv=$D integer alloc__A=0 integer alloc__N=0 integer array alloc__B integer alloc__gX=0 trigger array alloc__GX trigger array alloc__Kv integer alloc__ge=$2000 timer array alloc__Ge timer alloc__bj_LastAllocTimer=null integer alloc__Timer_Key=0 integer alloc__he=0 integer array alloc__AR integer alloc__NR=0 integer alloc__C=0 integer array alloc__D integer alloc__F=0 integer alloc__H=0 integer array J integer array K integer array Timer_List integer array alloc__L integer array alloc__M integer array alloc__S trigger alloc__T=CreateTrigger() timer alloc__U=CreateTimer() triggercondition array alloc__Y conditionfunc array alloc__Z boolean array alloc__vv integer array alloc__xv integer alloc__ov=0 boolean array alloc__rv boolean array alloc__iv constant boolean LIBRARY_environment=true constant integer environment___Wide=$800 hashtable environment___HT=InitHashtable() integer environment___MaxY=0 integer environment___MaxX=0 integer environment___CameraX=0 integer environment___CameraY=0 integer environment___LastCameraId=0 real environment___RootX=0 real environment___RootY=0 constant integer environment___Wide_2=environment___Wide/ 4 constant boolean LIBRARY_math=true real array math__Pow2n real array math__Pow2p constant boolean LIBRARY_BagSwap=true integer Load_BagSwap_root integer Load_BagSwap_2_root constant boolean LIBRARY_BasicCatalog=true integer BasicCatalog27_root=0 integer BasicCatalog28_root=0 integer BasicCatalog29_root=0 constant boolean LIBRARY_HeroCatalog=true integer HeroCatalog_01 constant boolean LIBRARY_MiscCatalog=true integer MiscCatalog17_root=0 integer MiscCatalog18_root=0 integer Item_save_Charges integer Item_load_not constant boolean LIBRARY_SoundUtils=true integer SoundUtils__Ht=0 constant boolean LIBRARY_string=true integer array string__R string array string__I integer string__Long_I=0 integer array string__Long_Next integer array string__Long_Last integer array string__Long_Value integer array string__Long_Char boolean array string__Long_IsRoot trigger string__LongImul_a=CreateTrigger() trigger string__LongSub_a=CreateTrigger() trigger string__StringToLong_a=CreateTrigger() trigger string__LongAdd_a=CreateTrigger() trigger string__LongToString_a=CreateTrigger() trigger string__LongModulo_a=CreateTrigger() trigger string__LongCopy_a=CreateTrigger() trigger string__LongAddByLong_a=CreateTrigger() trigger string__LongImulByLong_a=CreateTrigger() trigger string__LongImulByLong_c=CreateTrigger() trigger string__LongModifyUseCharacter_a=CreateTrigger() integer string__Long_A=0 integer string__Long_B=0 integer string__Long_C=0 integer string__Long_D=0 string string__Long_String="" integer string__Long_E integer array string__Long_ArrayInt integer string__Long_F=0 integer string__Long_G integer string__Long_H integer array Yx boolean array zx integer array Zx integer vo integer eo integer xo integer oo integer ro integer io integer ao trigger no=CreateTrigger() trigger Vo=CreateTrigger() trigger Eo=CreateTrigger() trigger Xo=CreateTrigger() integer Oo integer array Ro integer array Io integer Ao=0 constant boolean LIBRARY_system=true string array system__kv boolean array DisplayChatopen integer HeroStatIndex=0 timer HeroStatTm=null integer array HeroStatV integer array HeroStatF integer array HeroStatStr integer array HeroStatAgi integer array HeroStatInt rect WorldBounds real EntireMapMaxX real EntireMapMaxY real EntireMapMinX real EntireMapMinY real EntireMapCenterX real EntireMapCenterY region EntireMap trigger GameExecuteFunc_Trig=CreateTrigger() timer GameTimer=CreateTimer() boolexpr GroupEnumUnitsFilterNull=null integer array Pow2n unit lastspeaker=null integer system_Dialog__fO integer ItemTypeId_root integer ItemGold_root trigger array PlayerStateTrigger integer array PlayerStateGold rect ItemGold_Rect unit ItemGold_Store=null unit ItemGold_Trader=null integer ItemGold_I=0 item array ItemGold_V boolean ItemGold_Bool=false boolean ItemGold_Bool2=false timer ItemGold_Bool2_TM=CreateTimer() integer TRIGGER_USE integer TRIGGER_PICKUP integer TRIGGER_DROP integer DroppableTimed integer Item_SELL_func integer Item_Use_func item LastManipulatedItem=null constant integer system__ORDER_ID=$D0000 integer array system__ORDER_TRIGFOR_V integer system__ORDER_TRIGFOR_ON integer system__ORDER_TRIGFOR_OFF item IsTerrainWalkable_check=null rect IsTerrainWalkable_rect=null item array IsTerrainWalkable_h integer IsTerrainWalkable_index=0 real IsTerrainWalkable_X=.0 real IsTerrainWalkable_Y=.0 constant boolean LIBRARY_Event=true integer Event_SpellCast_Id integer Event_SpellEndCast_Id integer Event_SpellChannel_Id integer Event_SpellEffect_Id integer Event_HeroSkill_Id integer Event_Summon_Id integer Event_Enterworld_Id integer Event_HeroInit_Id integer LAST_SPELL_ABILITY_ID=0 integer UNIT_SPELL_EFFECT constant boolean LIBRARY_LoadBuffer=true integer array LoadBuffer_1 integer array LoadBuffer_2 constant boolean LIBRARY_Terrain=true constant boolean LIBRARY_distexttag=true integer distexttag__fC integer distexttag__fC_v real array distexttag__TextTag_h real array distexttag__TextTag_a integer array distexttag__TextTag_root1 integer array distexttag__TextTag_V integer array distexttag__TextTag_F integer array distexttag__TextTag_F2 integer distexttag__TextTag_I=0 texttag array distexttag__TextTag_tag string array distexttag__TextTag_t real array distexttag__TextTag_x real array distexttag__TextTag_y real array distexttag__TextTag_z real array distexttag__TextTag_s real array distexttag__TextTag_m real array distexttag__TextTag_l texttag array distexttag__BC real array distexttag__cC real array distexttag__CC string array distexttag__DC constant boolean LIBRARY_groupunits=true group array groupunits__UA integer groupunits__wA=0 unit groupunits__Mx=null boolean groupunits__Px group groupunits__qx group G=CreateGroup() group G2=CreateGroup() group G3=CreateGroup() constant boolean LIBRARY_unit=true integer bR integer BR boolean CR=true trigger He=CreateTrigger() trigger je=CreateTrigger() group h_v_Group=CreateGroup() unit array Je integer ke=0 integer Ke=0 integer le=0 boolean Le=false integer array me integer array Me integer array Counter boolean KillUnit_bool=false constant boolean LIBRARY_effecter=true unit array UnitDecay_Treger integer array UnitDecay_Red integer array UnitDecay_Green integer array UnitDecay_Blue real array UnitDecay_Alpha real array UnitDecay_t integer UnitDecay_Func=0 integer YR=0 integer ZR=0 integer array vI unit array eI integer array xI integer array oI integer rI=1 integer VI=0 integer EI=0 integer XI=0 integer array OI integer array RI unit array II effect array AI real array NI integer array bI integer array BI integer array cI integer array CI constant boolean LIBRARY_unitstate=true boolean array AppUnitRegen_On integer array AppUnitRegen_R integer array AppUnitRegen_L integer AppUnitRegen_Exe=0 integer array UnitHP integer array UnitMP integer CURE_Unit=0 integer BECURE_Unit=0 real CURE_Damage=0 constant integer UNIT_STATE_ARMOR=$A constant integer UNIT_STATE_ATTACK=$B constant integer HERO_STATE_STR=20 constant integer HERO_STATE_AGI=21 constant integer HERO_STATE_INT=22 constant integer UNIT_STATE_ATTACK_SPEED=30 constant integer UNIT_STATE_HP=40 constant integer UNIT_STATE_MP=41 boolean array Master_App integer array Master integer array Ability_Id integer array AbilitySize integer array UnitArmor integer array UnitAttack integer array HeroStr integer array HeroAgi integer array HeroInt integer array UnitAttackSpeed integer array HeroAgi_atk_speed real array HeroStr_hp_regen real array HeroInt_mp_regen real array UnitHpRegen real array UnitMpRegen real array HeroAgi_crit real array UnitCrit integer array UnitDodge_t real array UnitDodge integer array UnitHitRate_t real array UnitHitRate integer array UnitMdef_t real array UnitMdef integer array UnitAdef_t real array UnitAdef integer array UnitBeCureRatio_t real array UnitBeCureRatio integer array DamageTransitions_t integer array UnitPAttack_t integer array UnitBeDamager_t integer array UnitDamager_t integer array UnitShield_t integer array UnitDeath_t integer array UnitBePAttack_t integer array UNIT_CURE_EVENT integer array UNIT_BE_CURE_EVENT integer array UnitBeRemove_t trigger array mB boolean array MB boolean array pB boolean array PB integer array pB_v integer array UnitTypeId attacktype array UnitAttackType damagetype array UnitDamageType real array Unit_MATK real array Unit_C_DMG real array Unit_DOT real array Unit_Fire_Damage real array Unit_Frost_Damage real array Unit_Gas_Damage real array Unit_To_Damage real array Unit_Lightning_Damage real array Unit_Light_Damage real array Unit_Dark_Damage real array UnitMaxLife constant player PlayerNeutralPassive=Player($F) unit unitstate__Ax integer unitstate__qB constant boolean LIBRARY_ItemDrops=true constant integer Tr=20 integer ur integer Ur integer wr integer Wr integer yr integer Yr integer zr boolean array IsUnitDrops boolean array VF integer array EF real array XF real array OF boolean RF=true constant boolean LIBRARY_bagstate=true integer array YI integer array zI integer Bag_Id_root integer Bag_Issenior integer Bag_wing integer xA real array iA real array VA integer EA item array XA integer array OA integer RA real IA real AA integer sg constant boolean LIBRARY_damage=true trigger Damage_Xgv trigger Damage_Xgv_v boolean FF=false unit widget_Target=null trigger widget_Trig=null real widget_HP=0 boolean array DAK_Adef integer HF=0 unit array DAK_WHICH unit array DAK_TARGET real array DAK_AMOUNT attacktype array DAK_ACTYPE damagetype array DAK_DGTYPE boolean array DAK_FuJia boolean array DAK_Multistage boolean array JF boolean array kF real array KF real array lF string array LF unit mF=null unit MF=null integer pF=0 integer pF_v=0 real PF=0 unit tF=null real TF=0 real uF=0 boolean GetSpellDamageId=false real SpellDamage=0 constant boolean LIBRARY_herostate=true integer herostate___TG integer herostate___uG integer herostate___UG integer EquipSlot_I=0 integer array EquipSlot_V integer array EquipSlot_R integer array EquipSlot_id integer array EquipSlot_id_f constant integer EquipSlot_id_z=6 integer array EquipSlot boolean array EquipSlot_Use integer array EquipModel boolean array Hc boolean array jc boolean array Jc integer array kc integer array Kc real array HandicapXP_Basis real array HandicapXP_Lv boolean array IsSleepRevive timer array Hero_Revive_Timer real array Hero_Revive_X real array Hero_Revive_Y real array Hero_Revive_HP real array Hero_Revive_MP integer array Hero_Skills_table integer array Tc integer array HeroSkillPoint integer array Unit_Extra_Attack integer array Hero_Extra_Str integer array Hero_Extra_Agi integer array Hero_Extra_Int integer array Hero_Percent_Str integer array Hero_Percent_Agi integer array Hero_Percent_Int real array Hero_Percent_Str_v real array Hero_Percent_Agi_v real array Hero_Percent_Int_v integer array Hero_Plus_Str integer array Hero_Plus_Agi integer array Hero_Plus_Int integer array Unit_Extra_HP integer array LastSpellAbilityId integer Refresh_Not integer Hero_Arc integer HeroOnSpellEffect_t integer array Hero_SpellEffect_t integer array Hero_Crit_t integer array Hero_Meleemagic_t integer array Hero_Kill_t integer array Hero_Be_Kill_t integer array HERO_REVIVE_EVENT integer array HeroEffectModel boolean array nC boolexpr GroupEnumUnitsFilterHero=null integer array Hero_Skills_Replace integer Globals_ReplaceSkills constant boolean LIBRARY_playerinit=true integer BN integer cN integer yA integer YA=0 integer ZA=0 integer array WA integer array vN integer array PlayerGameTimed integer Player_Count=0 constant real jV=-4960 constant real JV=$5D50 rect KV=null real lV=0 fogmodifier array mV unit array MV boolean array pV boolean array PV integer array qV integer array QV trigger No=CreateTrigger() timerdialog bo=null unit array Bo real array Select_cd constant boolean LIBRARY_zhuanshu=true integer kR=0 integer kR_v=0 integer Ut=0 integer array wt integer array Wt integer array yt integer Yt integer zt string ExclusiveName="" string ExclusiveTip="" integer vT constant boolean LIBRARY_EquipState=true item LasManipulatedEquip=null integer LasManipulatedEquipTypeId=0 integer Equip_zhushuxing_t integer Item_PickupOrDrop_event integer Equip_Mode_t integer Equip_Type_t integer Equip_Attack_t integer Equip_Armor_t integer Equip_Str_t integer Equip_Agi_t integer Equip_Int_t integer Equip_ASPD_t integer Equip_HP_t integer Equip_MP_t integer Equip_HpRegen_t integer Equip_MpRegen_t integer Equip_MDG_t integer Equip_MDEF_t integer Equip_Crit_t integer Equip_CDG_t integer Equip_Dodge_t integer Equip_ADEF_t integer Equip_BCR_t integer Equip_DOT_t integer Equip_Property_Damage_t integer Equip_Lv_t integer LasBuildEquipId boolean sr=true constant boolean LIBRARY_sj=true boolean SHOWINTERFACE=true boolean array Off_A098 integer array Off_A098_id region bj_lastCreatedRegion=null rect bj_lastMoveRect=Rect(0,0,0,0) integer PlayerIndex=1 real Lucky=0 unit Boss_Unit_RHZX=null unit Boss_Unit_Hpal=null unit Boss_Unit_HM=null unit Boss_Unit_n03F=null unit Boss_Unit_n03G=null real array Item_cd_ryjz boolean array Item_bool_I00C real array Item_cd_I00C timer array Item_intup_I00C integer array Item_index_I00E timer array Item_buff_I00E boolean array Item_I0E3_cd timer array Item_I0DV_timer integer array Item_I0DV_lv real array Item_cd_I0DW timer array Item_I0DX_Timer integer array Item_I0DX_mdef timer array Item_I0DY_timer timer array Item_I0DY_timer2 integer array Item_I0DY_death integer array Item_I0DY_atk timer array Item_I0E1_timer integer array Item_I0E1_hd1 real array Item_I0E1_hd1_life timer array Item_I0E1_timer2 integer array Item_I0E1_hd2 real array Item_I0E1_hd2_life timer array Item_I0E4_timer timer array Item_I0E4_timer2 real array Item_I0E4_Damege real array Item_I0E4_Damege2 real array Item_I0E6_cd timer array Item_I0E6_timer integer array Item_I0E6_atk boolean array Item_I0E7_bool integer array Item_I0E7_atk integer array Item_I0E8_lv timer array Item_I0E8_timer //integer array Item_I0EB_Id timer array Item_I0E9_timer integer array Item_I0E9_mdef integer array Item_bool_azhr timer array Item_A0UX_timer trigger array Item_A0UX_trig integer array Item_A0UX_hd real array Item_A0UX_life integer array Item_I0F0_Damager timer array Item_I0F0_timer real array Item_I0F0_life timer array Item_I0F1_timer boolean array Item_I0F1_bool real array Item_I0EX_cd real array Item_I0F5_cd timer array Item_A0VJ_timer integer array Item_A0VJ_atkaction integer array Item_A0VL_hd timer array Item_A0VL_timer timer array Item_I0F4_timer integer array Item_I0F4_V integer Item_I0F4_id=0 real array Item_I0E3_A0VO_timed integer Item_I0F3_Id=0 integer Item_I0F9_Id=0 integer array Item_I0F7_Unit timer array Item_I0CH_timer integer array Item_I0CH_Attack integer array Item_I0CH_Damager real array Item_I0CH_life integer array Item_I0EZ_Id integer array Item_I0F2_mdef integer array Item_I0F2_Id real array Item_I0F2_cd integer array Item_I05U_Attack integer array Item_I05U_index timer array Item_I05U_timer unit Item_I0FJ_unit=null timer Item_I0FJ_timer=null real array Item_I0FN_cd integer array Item_Data_Int_1 integer array Item_Data_Int_2 integer array Item_Data_Int_3 integer array Item_Data_Int_4 integer array Item_Data_Int_5 integer array Item_Data_Int_6 timer array defbuff_tm integer array defbuff_abid integer array defbuff_bfid integer array defbuff_def code Item_I00A_Func=null code Item_I00C_Func=null code Item_I00E_Func=null code Item_I05H_Func=null code Item_I0E3_Func=null code Item_I0E4_Func=null code Item_I0DT_Func=null code Item_I0DU_Func=null code Item_I0DV_Func=null code Item_I0DW_Func=null code Item_I0DX_Func=null code Item_I0DY_Func=null code Item_I0DZ_Func=null code Item_I0E0_Func=null code Item_I0E1_Func=null code Item_I0E2_Func=null code Item_I0E5_Func=null code Item_I0E6_Func=null code Item_I0E7_Func=null code Item_I0E8_Func=null code Item_I0EC_Func=null code Item_azhr_Func=null code Item_I0F0_Func=null code Item_I0F1_Func=null code Item_I0EX_Func=null code Item_I0F5_Func=null code Item_I0EW_Func=null code Item_I0F4_Func=null code Item_I0EV_Func=null code Item_I0F7_Func=null code Item_I0FD_Func=null code Item_I0CH_Func=null code Item_I0EZ_Func=null code Item_I0F2_Func=null code Item_I0EY_Func=null code Item_I05U_Func=null code Item_I0FO_Func=null code Item_I0FN_Func=null code Item_I0FP_Func=null timer array Item_A_A0TU_timer timer array Item_A_A0TT_timer integer array Item_A_A0TT_hd real array Item_A_A0TT_hd_life boolean av=false boolean nv=false timer Nx unit Bx=null constant real Gx=425 constant real hx=50 constant real Hx=350 constant real jx=50 constant real Jx=.03125*(Gx-hx)/ .75 constant real kx=.03125*(Hx-jx)/ .75 constant real Kx=90-bj_RADTODEG*Atan2(kx,Jx) constant real Lx=2*bj_PI location mx=Location(0,0) integer Fo boolean array tr integer array Zr integer array vi timer ei=null integer xi=0 unit oi rect ri real array ii real array ai sound Ca=null sound Da=null sound fa=null sound Fa=null sound ga=null sound Ga=null sound ha=null sound Ha=null sound ja=null sound Ja=null sound ka=null sound Ka=null sound la=null sound La=null sound ma=null sound Ma=null sound pa=null sound Pa=null sound qa=null sound Qa=null sound sa=null sound Sa=null sound Ta=null sound ua=null sound Ua=null sound wa=null sound Wa=null sound ya=null sound Ya=null sound Za=null sound vn=null sound en=null sound xn=null sound on=null sound rn=null sound in=null sound nn=null sound Vn=null sound En=null sound Xn=null sound On=null sound Rn=null sound In=null sound An=null sound Nn=null sound Bn=null sound cn=null sound Cn=null sound dn=null sound Dn=null sound fn=null sound Fn=null sound gn=null sound Gn=null sound hn=null sound Hn=null sound jn=null sound Jn=null sound kn=null sound Kn=null sound ln=null sound Ln=null sound mn=null sound Mn=null sound pn=null sound Pn=null sound qn=null sound Qn=null sound sn=null sound Sn=null sound tn=null sound Tn=null sound un=null sound Un=null sound wn=null sound Wn=null sound yn=null sound Yn=null trigger zn=null trigger Zn=null boolean LV=false player array P string array Game_PlayerName integer uV unit UV timer wV=null timer WV=null timerdialog yV=null boolean array YV boolean array zV integer ZV=8 timerdialog vE=null boolean eE=true boolean xE=false boolean oE=false boolean rE=false boolean iE=false integer aE=4 boolean VE=false boolean EE=false boolean XE=false integer OE=4 constant real RE=30 constant real IE=$A unit array AE destructable NE=null timer bE=null timerdialog BE=null integer cE=R2I(RE/ IE) boolean CE=false constant real dE=30 unit array DE effect array fE lightning array FE timerdialog gE constant real GE=7200 trigger hE=CreateTrigger() integer HE=3 timer jE timerdialog JE constant real kE=30 constant real KE=30 integer lE=-1 trigger LE=null timer mE=null timer ME=null timerdialog pE=null integer PE=R2I(kE/ KE) integer qE constant integer QE=6*32 integer sE integer SE group tE integer TE real uE real UE integer wE=0 group WE integer array NX integer bX=0 boolean BX=false integer CX=0 trigger DX=CreateTrigger() boolean array FX integer hX=0 integer HX=0 integer array jX integer qX integer QX boolean array XO timer OO=CreateTimer() boolexpr RO item array IO integer AO=0 integer DI integer fI integer FI integer gI integer GI integer HI integer jI integer JI integer kI integer KI integer lI integer LI integer MI integer pI integer PI integer array qI integer array QI integer SI integer array TI real array uI real array UI real array wI real array WI integer yI integer array NA string array bA string array BA string array CA integer array dA integer array DA integer array FA integer array gA boolean array GA integer array hA integer array HA integer jA=0 integer array PA integer array qA timer array QA real array SA integer array TA timer array uA unit array DN unit array fN lightning array FN integer array gN real array GN real array hN real array HN real array jN real array JN real array kN real array KN real array lN real array LightningEffect_AZ real array LightningEffect_BZ integer LN integer array gB integer array GB integer array hB real array HB group jB=CreateGroup() boolean array JB integer array kB integer array KB integer lB=0 timer array GC timer array hC timer array HC timer array jC timer array JC timer array kC timer array KC timer array LC timer array MC integer array pC integer array PC integer array qC timer array QC timer array sC timer array SC timer array TC integer array uC integer array UC timer array wC integer array WC timer array pd timer array Pd integer array qd unit IF=null integer array AF timer array NF boolean array bF integer array BF integer cF=0 integer array CF integer array dF integer array DF integer array fF timer array Dg boolean array fg boolean array Fg timer array gg real array Gg integer hg boolean array Hg integer array jg boolean Jg=true integer array kg texttag array Kg integer array lg integer array Lg integer array mg integer array Mg boolean array pg integer array Pg integer array qg integer Qg=0 item Sg=null integer array ug integer array Ug integer wg integer Wg integer array yg integer array Yg boolean array zg integer array Zg integer array vG integer eG=0 integer array xG integer array oG integer array rG integer array iG integer array aG boolean array VG integer array EG integer array XG integer OG=0 integer array RG integer array IG integer AG integer array NG integer array bG boolean array BG integer array CG constant real dG=$80 boolean array DG integer array fG integer array FG integer gG=0 constant real GG=9 constant real hG=3 constant real HG=5 integer array jG integer array JG integer array kG integer array KG integer lG boolean array EquipModel_wings_Off integer Eh integer array sk integer array Sk integer array tk boolean array Tk integer array uk real array Uk real array wk integer Wk group Zk integer array vK integer array eK integer array xK timer array oK boolean array Is_pvp timer iK=null integer aK=0 timer array nK rect array VK integer array EK integer array XK integer OK=0 integer RK=0 integer IK=0 boolean AK=true boolean NK=true real bK=0 real BK=0 real cK=0 real CK=0 real dK=0 real DK=0 boolean Boss_hmpr_IsOpen=false boolean fK=true integer FK integer gK=0 integer GK integer hK=0 integer HK integer jK=0 unit JK=null timer kK=null integer KK=0 integer lK=0 integer LK=0 integer mK=0 integer array MK integer pK=0 integer PK=3 integer qK=0 integer QK integer sK integer SK integer tK unit TK timer uK integer UK integer wK real WK rect yK=null group YK=null integer zK=0 integer ZK group vl integer el real xl integer array Ql timer array sl unit Sl=null integer tl=0 boolean Tl=false boolean ul=false integer Ul=0 integer wl=0 real Wl=0 integer array yl unit Yl=null real Yl_MpRegen integer array zl integer Zl integer vL integer eL integer xL real oL constant real rL=$6784 constant real aL=$6806 timer array VL integer array EL integer XL=0 unit OL=null unit RL=null integer IL=0 integer AL=0 boolean NL=false boolean bL=false integer BL=2 integer CL=0 integer dL=0 integer DL=0 integer fL=0 constant real FL=$62F9 constant real gL=$2CA1 constant real GL=750 real hL=10. integer array HL integer array jL timer array JL integer array kL timer array KL integer lL=0 unit LL=null group mL=null integer ML=1 integer pL=0 integer PL=0 integer qL=0 integer QL=0 integer sL=3 real SL=0 destructable array tL rect array TL integer array uL constant integer UL=$FA0 integer array wL integer array WL integer array yL integer array YL integer array zL real array ZL real array vm real array em real array xm constant real om=275 boolean array rm integer array im integer array am integer nm=0 unit Vm=null integer Em=0 unit Xm=null integer array Om integer array Rm real array Im real array Am integer Nm integer array bm integer array Bm integer array cm group array Cm integer array Dm real array fm real array Fm real array gm real array Gm real array hm integer Hm integer jm integer Jm integer array km integer array Km integer array lm integer Lm integer array mm integer array Mm integer array pm integer array Pm real array qm group Qm=null constant real sm=900 boolean array Sm integer array tm integer array Tm integer um=0 integer Um integer wm integer array Wm integer array ym integer array Ym integer array zm integer array Zm real array vM constant real eM=$3E8 integer xM integer array oM integer array iM integer array aM integer array nM real array VM real array EM integer XM integer array OM integer array RM integer IM integer AM integer NM real bM real BM group cM integer CM integer dM integer DM integer array fM integer FM integer gM group GM=null real hM=0 real HM=0 integer array jM integer array JM integer array kM group KM=CreateGroup() constant integer lM=R2I(32*10.) integer LM timer array mM integer array MM integer array pM integer array PM integer array qM integer array QM integer sM integer array SM boolean array TM integer array uM integer array UM integer wM=0 integer WM integer yM unit YM=null integer zM=0 integer array ZM integer array vp real array ep real array xp real array op real array rp real array ip real array ap real array np real array Vp real array Ep integer Xp integer Op=0 boolean array Rp integer array Ip real array Ap integer Np=0 integer bp=0 boolean array Bp integer array cp integer array Cp integer dp=0 integer array Dp integer array Fp group array gp integer array Gp integer array Hp real array jp integer Jp integer oP integer iP boolean array aP integer nP integer VP group EP integer XP real OP real RP real IP real AP real NP integer bP integer array BP integer cP=0 integer CP=0 real dP=0 real DP=0 real fP=0 unit FP=null integer gP=0 timer GP=null integer hP=0 integer HP=0 integer array jP integer array JP integer kP integer KP integer lP integer LP integer MP real pP real PP real qP real QP real sP real SP real tP real TP real uP integer array UP integer array wP integer array WP integer array yP boolean YP=false integer zP integer ZP integer vq integer eq integer xq integer oq lightning rq integer iq integer aq integer nq integer Vq integer array Eq boolean array Xq integer array Oq real array Rq real array Iq integer array Aq integer array Nq group array bq integer array Bq real array cq real array Cq integer dq unit Dq group fq integer Fq real gq real Gq real hq real Hq unit jq integer Jq integer kq real Kq real lq integer Lq integer mq integer Mq integer array pq real Pq real qq integer Qq integer array sq boolean array Sq integer array tq real array Tq real array uq integer Uq integer wq integer Wq real yq real Yq real zq real Zq integer vQ integer eQ integer xQ integer array oQ integer array rQ integer iQ boolean array aQ integer nQ integer VQ integer array EQ timer array XQ integer array OQ real array RQ real array IQ integer array AQ integer array NQ integer array bQ boolean array BQ integer array cQ integer array CQ integer dQ=0 unit array DQ integer array fQ integer FQ integer gQ integer array GQ integer hQ integer HQ timer array jQ integer JQ integer kQ real KQ=0 constant real lQ=4 unit LQ=null rect mQ=null integer MQ=0 boolean pQ=false constant real PQ=2 constant real qQ=2 constant real QQ=$A integer array sQ integer SQ=0 integer tQ=0 boolean array TQ integer array uQ integer array UQ integer wQ=0 constant real WQ=$3D090 constant real yQ=25 constant real YQ=25 integer zQ integer ZQ integer array vs integer array es integer array xs integer array os integer array rs boolean array as integer array Vs integer array Es integer Xs=0 boolean Os=false constant real Rs=2 boolean array Is constant real As=$F timer array Ns integer array bs integer array Bs integer array Cs integer array ds constant real Ds=400 constant real fs=105 constant real Fs=5 constant real gs=400 constant real Gs=75 integer array hs integer array Hs integer array js boolean array Js integer array Ks integer array Ls integer ms=0 integer Ms integer ps constant real Ps=2 constant real qs=25 constant real Qs=75 integer array Ss real array Ts constant real us=25 constant real Us=40 constant real ws=3 constant real Ws=2 integer array ys integer array Ys constant integer zs=R2I(32*6.) boolean array Zs integer array vS integer array eS integer xS=0 constant real oS=$F timer rS=null integer aS=0 integer VS integer ES constant real XS=800 constant integer OS=48/ 4 integer RS=0 integer IS=0 constant integer AS=$C constant real NS=$80 unit bS=null integer BS=0 integer CS=0 item dS=null unit DS=null boolean fS=false integer FS=0 trigger gS=null integer GS=0 real hS=0 real HS=0 constant real jS=600 integer JS=0 integer array kS boolean array KS integer array LS integer array MS integer pS=0 timer array PS boolean array qS timer array QS integer array sS integer array SS real array tS integer TS integer uS constant real US=$5DC constant real wS=$F constant real WS=25 integer array yS constant real YS=$6A4 constant real ZS=$FA integer vt integer et constant real xt=5 integer ot=0 integer rt=0 real it=8 integer array at boolean array nt integer array Vt integer Et constant real Xt=$A integer Ot=0 integer Rt=0 boolean It=false integer array At constant real Nt=500 integer bt integer Bt integer Kt=0 integer array lt constant real Lt=60 integer array mt integer array Mt lightning array pt constant real Pt=-4900. real array qt real array Qt boolean array St integer array tt integer array Tt integer ut=0 integer array iT integer array VT boolean array ET integer array XT integer array OT integer RT=0 real array IT integer array AT integer array NT real array bT integer BT integer kT integer KT real array lT integer LT integer mT real array MT real array PT real array qT boolean array QT integer array sT integer array ST integer tT=0 boolean array uy boolean array Uy integer array wy real array Wy real array yy real array Yy real array zy real array Zy boolean array vY integer array xY integer array oY integer rY=0 integer array Evv integer array Eev integer Exv=0 integer array Eov real array Erv real array Eiv trigger EBv trigger Edv trigger EDv trigger EWv trigger Eyv trigger Ezv trigger EZv trigger E_v trigger E6v trigger Xav trigger XVv trigger XEv trigger XXv trigger XGv trigger Xhv trigger XHv trigger Xjv trigger XKv trigger Xmv trigger XMv trigger XQv trigger Onv trigger OAv trigger OBv trigger Ocv trigger Odv trigger ODv trigger Ofv trigger Ogv trigger OGv trigger Ohv trigger OHv trigger Ojv trigger OJv trigger Okv trigger OKv trigger Olv trigger OLv trigger Omv trigger OMv trigger Opv trigger OPv trigger OSv trigger Otv trigger OTv trigger Ouv trigger OUv trigger Owv trigger OWv trigger Oyv trigger OYv trigger Ozv trigger OZv trigger O_v trigger O0v trigger O1v trigger O2v trigger O3v trigger O4v trigger O5v trigger O6v trigger O7v trigger O8v trigger Rvv trigger Rev trigger Rov trigger Rrv trigger Riv trigger Rav trigger Rnv trigger RVv trigger REv trigger RXv trigger ROv trigger RRv trigger RIv trigger RAv trigger RNv trigger Rbv trigger RBv trigger Rcv trigger RCv trigger Rdv trigger RDv trigger Rfv trigger RJv trigger Rkv trigger RKv trigger Rlv trigger RLv trigger Rpv trigger RPv trigger Rqv trigger RQv trigger Rsv trigger RSv trigger Rtv trigger IWv trigger ADv trigger Afv trigger AFv trigger Agv trigger AGv integer Ahv integer AHv integer Ajv integer AJv real Akv real AKv real Alv real ALv real Amv real AMv real Apv real APv real Aqv string AQv unit Asv unit ASv code Atv boolean ATv attacktype Auv damagetype AUv player Awv integer AWv integer Ayv unit AYv group Azv boolean AZv player A_v real A0v real A3v=.0 real A4v=.0 boolexpr A7v=null location Boss_Point=Location(0,0) real array Boss_x real array Boss_y real array Boss_z integer Boss_Damage_Hpal integer Boss_Index_Hpal=-1 integer Boss_Index2_Hpal=-1 trigger Boss_DEATH_trig_Hpal=null group Boss_Buff_1_Group_Hpal group Boss_Buff_2_Group_Hpal group Boss_Buff_3_Group_Hpal timer array Boss_Buff_1_Timer_Hpal triggercondition Boss_DEATH_TC_Hpal integer Boss_Index_RHZX=-1 integer Boss_Damage_RHZX=0 unit Boss_Unit_2_RHZX=null timer Boss_Ability01_id_RHZX=null timer Boss_Ability01_bufftimed_RHZX=null integer array Boss_Ability01_bufflv_RHZX timer array Boss_buff_shaoshang_RHZX triggercondition Boss_DEATH_TC_RHZX integer Boss_Ability02_lv_RHZX=0 integer array Boss_Ability02_lv2_RHZX group Boss_Ability02_group_RHZX=null timer array Boss_buff_shaoshang2_RHZX integer Boss_Ability05_cd_RHZX=0 unit Boss_Unit_2_HM=null integer Boss_Index_HM=-2 integer Boss_Index2_HM=0 real Boss_Ability_0_HM=0 group Boss_Ability_0_group_HM=null integer array Boss_Ability_0_buff_HM triggercondition Boss_DEATH_TC_HM integer Boss_Ability_4_index_HM=4 integer Boss_Ability_4_timed_HM=0 texttag Boss_Ability_4_texttag_HM integer Boss_Ability_5_index_HM=0 group Boss_Ability_5_group_HM=null timer array Boss_Ability_5_timer_HM integer Boss_Index_n03F=-2 integer Boss_Index2_n03F=0 integer Boss_Ability_cd_01_n03F=0 integer Boss_Ability_cd_02_n03F=0 destructable array Boss_destruct_n03F trigger Boss_EnterTrig_n03F=null group Boss_EnterGroup_n03F=null group Boss_GameFor_n03F=null timer Quest_I064_Timer integer Quest_I064_index=0 unit array Quest_I064_unit boolean Quest_I064_On=true integer Boss_root_n03G=0 integer Boss_Index_n03G=-2 texttag Boss_texttag_n03G=null real Boss_Ability_CD1_n03G=0 triggercondition Boss_PICKUP_TC_n03G integer Boss_Index_h01K=-3 integer Boss_root_h01K=0 unit Boss_Unit_h01K=null code Boss_func_h01K=null timer Boss_tm_h01K=null integer Boss_Ability_data_1_h01K=0 integer Boss_Ability_cd_2_h01K=0 integer Boss_Ability_cd_4_h01K=0 timer Boss_Ability_tm_4_h01K=null integer Boss_Ability_cd_5_h01K=0 integer Boss_Ability999_cd_h01K=0 integer Boss_exp_h01K=0 unit Boss_Unit_2_h01K=null group Boss_Buff_2_1_group_h01K=null unit Boss_Unit_3_h01K=null unit Boss_Unit_4_h01K=null real Boss_Unit_4_ability1_cd_h01K=0 integer array Boss_Buff_4_h01K timer array Boss_Buff_4_2_h01K integer array Boss_SetUnitUseMove_V_h01K integer array Boss_Buff7_death_h01K timer array Boss_Buff7_timer_h01K group Boss_Buff7_group_h01K integer Boss_Ability_no_8_h01K=0 region Boss_Region_h01K real array Boss_ability4_cd_n03N integer Boss_Spell_i=0 integer array Boss_Spell_v boolean array Boss_Spell_bool integer array Boss_Spell_data1 integer array Boss_Spell_data2 integer array Boss_Spell_data3 integer array Boss_Spell_data4 integer array Boss_Spell_data5 integer array Boss_Spell_data6 unit array Boss_Spell_unit1 unit array Boss_Spell_unit2 group array Boss_Spell_group1 group array Boss_Spell_group2 timer array Boss_Spell_timer effect array Boss_Spell_eff lightning array Boss_Spell_lig real array Boss_Spell_V real array Boss_Spell_X real array Boss_Spell_Y real array Boss_Spell_Z timer array Globals_Shield_Timer integer array Globals_Shield_Trig integer array Globals_Shield_af integer array Globals_Shield_bf real array Globals_Shield_Life integer array gO_2 integer array gO_3 unit array gO effect array GO integer array hO real array HO real array jO real array JO integer kO integer array Control_abid integer array Control_bfid timer array Control_Timer boolean array Control_use integer Control_priority integer array Item_Data_Id boolean array Item_I0E5_off constant boolean LIBRARY_Boss=true constant boolean LIBRARY_BossDTS=true unit BossDTS___Unit=null integer BossDTS___Index=-1 real array BossDTS___Enter_timer real array BossDTS___Enter_X real array BossDTS___Enter_Y constant boolean LIBRARY_BossHDLZ=true unit BossHDLZ___Unit=null unit BossHDLZ___Unit_A=null unit BossHDLZ___Unit_B=null unit BossHDLZ___Unit_C=null integer BossHDLZ___Start_Index=-1 integer array BossHDLZ___Order timer array BossHDLZ___Buff1_timer integer array BossHDLZ___Buff1_deathid real array BossHDLZ___Buff2_cd real array BossHDLZ___HOJU_X real array BossHDLZ___HOJU_Y integer array BossHDLZ___Death_Trig integer array BossHDLZ___Remove_Trig trigger BossHDLZ___Open_Trig=null group BossHDLZ___Open_Group=null timer BossHDLZ___Open_Timer=null region BossHDLZ___Open_Region=null integer BossHDLZ___Open_Count=0 integer array BossSkill_A0ZO_Data integer array Boss_uobs_Data integer array Boss_uobs_Index constant boolean LIBRARY_Bossn035=true unit Boss_n035_Unit unit array Boss_ufro_Unit integer array Boss_ufro_Pause effect array Boss_ufro_Effect timer Boss_n035_Buff002_Timer=null boolean Boss_n035_Open=true timer array Boss_n035_BuffA0ZU_Timer integer array Boss_n035_BuffA0ZU_Count unit array Boss_n035_BuffA0ZU_Source integer Boss_n035_Ability003_Number=3 integer Boss_n035_Ability005_Number=8 integer Boss_n035_Ability005_Time=0 timer Boss_n035_Ability006_Timer real Boss_n035_Ability006_Ange=0 integer Boss_n035_Ability006_Open=0 integer Boss_n035_Ability006_Index=0 integer array Boss_n035_Ability006_Vessel constant boolean LIBRARY_EquipTrigger=true integer Equip_trigSlot_A integer Equip_trigSlot_B integer Equip_trigSlot_C integer Equip_trigSlot_D integer Equip_trigSlot_E integer Equip_trigSlot_F integer array Equip_trigSlot_O integer array Bloodthirsty_num boolean array Corruptor_series_Off real array Item_I0BS_cd boolean array Aspects_of_a_wind_off integer array HolyRelic_series_atktrig integer array HolyRelic_series_eff timer array HolyRelic_series_timer integer array HolyRelic_series_lv real array HolyRelic_series_MagicDamage real array HolyRelic_series_HpRegen boolean array Disaster_and_death_off boolean array Equip_bzbf_off integer array Equip_I0C6_Buff boolean array Equip_I0AN_off integer array Equip_I067_hit_num timer array Equip_I097_timer real array Equip_I0BR_cd boolean array Equip_I0C8_off integer array Equip_I0CU_Timed integer array Equip_I0CU_num integer array Equip_I0CU_Atkunit integer array Equip_kysn_up boolean array Equip_sbok_off timer array Equip_sehr_timer integer array Equip_sehr_buff_num boolean array Equip_skrt_off boolean array Equip_k3m2_off integer array Equip_k3m2_num boolean array Equip_rde3_off integer array Equip_I0DI_Shield real array Equip_I0DI_Shield_life integer array Equip_afac_atk boolean array Equip_afac_off boolean array Equip_cnhn_off integer array Equip_cnhn_atk integer array Equip_cnhn_count timer array Equip_gobm_timer integer array Equip_gobm_Source integer array Equip_gobm_duration integer array Equip_gobm_bufflv boolean array Equip_k3m3_off timer array Equip_srtl_timer integer array Equip_srtl_count timer array Equip_I0EB_timer integer array Equip_I0EB_count timer array Equip_stwa_timer boolean array Equip_rag1_off timer array Equip_I088_buff boolean array Equip_lgdh_off real array Equip_I0CP_cd real array Equip_esaz_cd integer array Equip_jpnt_def real array Equip_jpnt_cd integer array Equip_I0B5_count timer array Equip_mort_timer timer array Equip_mcou_Timer integer array Equip_mcou_HP timer array Active_A0HB_Timer integer array Active_A0HB_buff real array Active_A0HB_life integer array Active_A0JN_Counter1 integer array Active_A0JN_Counter2 integer array Corruptor_Active_Buff integer array Active_A0JX_Adef timer array Active_A0JX_Timer boolean array Active_A0JX_App_matk boolean array Active_A0JX_App_def boolean array Active_A0JX_App_regen integer array Active_A0JX_count integer array Active_A0JX_duration code Active_A0JX_Loop_Func=null integer array Active_A06K_Type integer array Active_A0D4_Type integer array Active_A0D4_AtkUnit integer array Active_A0D4_Target integer array Active_A0D4_Pumpkin integer Active_A0D4_Func timer array Active_A0HI_Timer integer array Active_A0HI_AtkTrig integer array Active_A0HQ_AtkTrig timer array Active_A0MB_Timer boolean array Active_A0MB_Bool integer array Active_A0MB_HP timer array Active_A0DT_Buff_timer integer Active_A0MJ_Func integer array Active_A0CF_DagTrig timer array Active_A0CF_Timer integer array Active_A0CF_Agi timer array Active_A0RE_Timer integer array Active_A0RE_Mdef integer array Active_A0RE_Lv timer array Active_A0PJ_Timer real array Active_A0PJ_Damage boolean array Active_A0PJ_Bool timer array Active_A0P5_Timer integer array Active_A0P5_Adef integer array Active_A0P5_StatUp timer array Active_A0P6_Timer integer array Active_A0P6_Adef integer array Active_A0P6_StatUp timer array Active_A0QY_Buff_timer integer array Active_A0QY_Buff_mdef integer Active_A0QY_Func timer array Active_A0RA_Timer integer array Active_A0RA_Atkuint integer array Active_A0RA_Mdef boolean array Active_A0RA_IsCure integer array Active_A0RA_Count integer array Active_A0JP_Buff_mdef timer array Active_A0JP_Buff_timer integer array Active_A0JP_Buff_lv integer Active_A0JP_Func integer Active_A0AS_TimerFunc integer array Corruptor_type timer array Equip_I0D9_Timer integer array Equip_I0D9_Int integer array Equip_I0D9_CD constant boolean LIBRARY_GameInformation=true integer TV integer GameInformation___IC=0 integer GameInformation___AC=0 integer GameInformation___NC=0 integer GameInformation___bC=0 constant boolean LIBRARY_Hero=true integer array HeroSkills_A08U_Adef integer array HeroSkills_A08U_Lv integer array HeroSkills_A08U_Str integer array HeroSkills_A08U_Last integer array HeroSkills_A08U_Next boolean array HeroSkills_A08U_App integer HeroSkills_A08U_Func integer array HeroSkills_A00B_Lv integer array HeroSkills_A00B_Mdef timer array HeroSkills_A00B_Timer integer array HeroSkills_A08W_Buff_Mdef timer array HeroSkills_A08W_Buff_Timer integer array HeroSkills_A08W_Trig texttag array HeroSkills_A08W_TextTag integer array HeroSkills_A08W_Duration real array HeroSkills_A08W_Energy real array HeroSkills_A08W_DefRatio real array HeroSkills_A08W_MaxEnergy real array HeroSkills_A08W_TextTagSize boolean array HeroSkills_A08W_Open integer array HeroSkills_A08W_Last integer array HeroSkills_A08W_Next integer HeroSkills_A08W_Func=0 timer array HeroSkills_A00N_Timer integer array HeroSkills_A00N_Adef integer array HeroSkills_A00N_Count real array HeroSkills_A00N_Duration real array HeroSkills_A00N_Damage integer array HeroSkills_A00S_Buff_Adef timer array HeroSkills_A00S_Buff_Timer timer array HeroSkills_A00S_Timer integer array HeroSkills_A00S_Buff_Effect group array HeroSkills_A00S_Buff_Group integer array HeroSkills_A00S_Buff_Number real array HeroSkills_A00S_Buff_Angle real array HeroSkills_A00S_Buff_VectorX real array HeroSkills_A00S_Buff_VectorY real array HeroSkills_A00S_Buff_Damage boolean array Hero_QuickDraw_On boolean array Hero_QuickDraw_Crit integer array Hero_H001_SkillsSet_Type timer array Hero_H001_SkillsSet_Timer real array HeroSkills_A005_TargetX real array HeroSkills_A005_TargetY timer array HeroSkills_A0BM_Buff_Timer integer array HeroSkills_A0BM_Buff_Armor integer HeroSkills_A0BM_Func integer array HeroSkills_A0BL_Last integer array HeroSkills_A0BL_Next integer array HeroSkills_A0BL_Vessel integer array HeroSkills_A0BL_Effect integer array HeroSkills_A0BL_Mdef integer array HeroSkills_A0BL_Duration integer array HeroSkills_A0BL_Count real array HeroSkills_A0BL_Damage integer HeroSkills_A0BL_Func integer array HeroSkills_A0BN_Number integer array HeroSkills_A0BN_MaxNumber integer array HeroSkills_A0C1_AtkUnit integer array HeroSkills_A0C1_Target integer array HeroSkills_A0C1_Sword integer array HeroSkills_A0C1_Effect integer array HeroSkills_A0C1_Const integer array HeroSkills_A0C1_Time timer array HeroSkills_A0C1_BuffTimer integer array HeroSkills_A0C1_BuffLv integer HeroSkills_A0C1_Func integer array HeroSkills_A0C2_Buff_Mdef timer array HeroSkills_A0C2_Buff_TImer integer HeroSkills_A0C2_Func integer array HeroSkills_Aspb_AuraAbility1_HaloOwner integer array HeroSkills_Aspb_AuraAbility2_HaloOwner integer array HeroSkills_Aspb_AuraAbility3_HaloOwner integer array HeroSkills_Aspb_AuraAbility1_Damage integer array HeroSkills_Aspb_AuraAbility2_Def real array HeroSkills_Aspb_AuraAbility3_HpRegen timer array HeroSkills_Aspb_AuraAbility1_timer timer array HeroSkills_Aspb_AuraAbility2_timer timer array HeroSkills_Aspb_AuraAbility3_timer timer array HeroSkills_Aspb_AuraAbility4_timer timer array HeroSkills_Aspb_Type4_Timer real array HeroSkills_Aspb_Type3_cd integer array HeroSkills_Aspb_Type integer array HeroSkills_Aspb_Level integer HeroSkills_Aspb_List integer array HeroSkills_A02M_DeBuff_Trig timer array HeroSkills_A02M_DeBuff_Timer boolean HeroSkills_A02M_DamageNotA006=true integer array HeroSkills_Absk_AtkTrig timer array HeroSkills_Absk_Timer integer array HeroSkills_A09M_Type2_Adef timer array HeroSkills_A09M_Type1_Timer timer array HeroSkills_A09M_Type2_Timer timer array HeroSkills_A09M_Type4_Timer integer array HeroSkills_A006_Vessel integer array HeroSkills_A006_Adef integer array HeroSkills_A006_Duration real array HeroSkills_A006_Damage integer array Hero_Skills_Invisible_Adef boolean array Hero_Skills_Invisible_activate integer array Hero_Skills_Invisible_Down boolean array Hero_Skills_Invisible_Use integer array Hero_Skills_Invisible_Next integer array Hero_Skills_Invisible_Last integer Hero_Skills_Invisible_Func=0 timer array Hero_Skills_A05L_BuffTimer integer array Hero_Skills_A05L_BuffLv timer array HeroSkills_A05N_Buff_Timer integer array HeroSkills_A05N_Buff_PDG integer array HeroSkills_A05N_Buff_MDG integer array HeroSkills_A05N_AtkUnit integer array HeroSkills_A05N_Target integer array HeroSkills_A05N_FB boolean array HeroSkills_A05N_IsRun integer array HeroSkills_A05N_Duration integer array HeroSkills_A05N_Decay real array HeroSkills_A05N_Damage integer HeroSkills_A05N_Func integer array HeroSkills_A05K_AtkUnit integer array HeroSkills_A05K_Target integer array HeroSkills_A05K_Count real array HeroSkills_A05K_Damage integer HeroSkills_A05K_Func real array SmokeBomb_Duration integer array HeroSkills_A05V_Which integer array HeroSkills_A05V_Time real array HeroSkills_A05V_Damage boolean array HeroSkills_A05V_Use integer array HeroSkills_A05V_Last integer array HeroSkills_A05V_Next integer HeroSkills_A05V_Func=0 boolean array HeroSkills_ShadowStorm_Use integer array HeroSkills_ShadowStorm_Last integer array HeroSkills_ShadowStorm_Next integer array HeroSkills_A0G6_list integer HeroSkills_ShadowStorm_Func=0 integer array HeroSkills_A06G_Which integer array HeroSkills_A06G_HY integer array HeroSkills_A06G_Effect integer array HeroSkills_A06G_Vessel group array HeroSkills_A06G_Group integer array HeroSkills_A06G_Speed real array HeroSkills_A06G_Damage real array HeroSkills_A06G_AngX real array HeroSkills_A06G_AngY real array HeroSkills_A06G_Angle real array HeroSkills_A06G_VectorX real array HeroSkills_A06G_VectorY constant real HeroSkills_A06G_BasedHighly=100 constant real HeroSkills_A06G_Radii=$96 integer HeroSkills_A06G_Func integer array HeroSkills_A01M_BuffSource integer array HeroSkills_A01M_BuffAmdef integer array HeroSkills_A01M_BuffDuration timer array HeroSkills_A01L_Timer integer array HeroSkills_A01L_Stat real array HeroSkills_A092_cd unit array HeroSkills_A02F_Unit timer array SummonedUnitSkills_A048_Timer boolean array SummonedUnitSkills_A082_Bool integer array HeroSkills_A002_Vessel timer array HeroSkills_A002_Timer unit array HeroSkills_A002_SoulUnit1 unit array HeroSkills_A002_SoulUnit2 unit array HeroSkills_A002_SoulUnit3 integer array HeroSkills_A002_Number integer array HeroSkills_A002_Cycle integer array HeroSkills_A002_Number2 boolean array HeroSkills_A002_Use integer array HeroSkills_A002_Last integer array HeroSkills_A002_Next integer HeroSkills_A002_Func=0 integer array HeroSkills_A00O_Target integer array HeroSkills_A00O_Duration boolean array HeroSkills_A00O_Use integer array HeroSkills_A00O_Last integer array HeroSkills_A00O_Next integer HeroSkills_A00O_Func=0 integer array HeroSkills_A01U_Mdef timer array HeroSkills_A01U_Timer integer array HeroSkills_A01U_Duration real array HeroSkills_A01U_MDG real array HeroSkills_A01U_Damage unit array HeroSkills_A0LE_Summon timer array Summon_h019_BuffA0LG_Timer integer array Summon_h019_BuffA0LG_Lv integer array SummonSkills_A0LK_Master integer array SummonSkills_A0LK_EffA integer array SummonSkills_A0LK_EffB lightning array SummonSkills_A0LK_Lig integer array SummonSkills_A0LK_Count integer array SummonSkills_A0LK_Time boolean array SummonSkills_A0LK_Use integer array SummonSkills_A0LK_Last integer array SummonSkills_A0LK_Next integer SummonSkills_A0LK_Func=0 integer array HeroSkills_A00U_Buff_Mdef timer array HeroSkills_A00U_Buff_Timer integer HeroSkills_A04Q_Func integer Hero_H009_LastSummoningUnit=0 integer array HeroSkills_A00T_Model timer array HeroSkills_A00T_Timer integer array HeroSkills_A01R_Model boolean array HeroSkills_A01R_Bool unit array HeroSkills_A01R_SummonUnit timer array Summon_nlv1_Buff_Timer integer array Summon_nlv1_Buff_Lv unit array HeroSkills_A02O_SummonUnit boolean array HeroSkills_A02O_Bool real array HeroSkills_A02O_SpellX real array HeroSkills_A02O_SpellY timer array SummonSkills_Ahea_Buff_Timer real array SummonSkills_Ahea_Buff_HpRegen unit array HeroSkills_A03I_SummonUnit boolean array HeroSkills_A03I_Bool real array HeroSkills_A03I_SpellX real array HeroSkills_A03I_SpellY integer array Summon_hwt2_onAttack_Count integer array Summon_hwt2_onAttack_BuffMdef timer array Summon_hwt2_onAttack_BuffTimer unit array HeroSkills_A03J_SummonUnit integer array HeroSkills_A03J_Shield_Trig timer array HeroSkills_A03J_Shield_Timer real array HeroSkills_A03J_Shield_Life real array Summon_hmil_onAttack_cd integer HeroSkills_A089_HT integer array HeroSkills_A089_Target integer array HeroSkills_A089_ShieldTrig lightning array HeroSkills_A089_Lig integer array HeroSkills_A089_Count real array HeroSkills_A089_Shield_v real array HeroSkills_A089_Shield_R integer array HeroSkills_A089_A0F3_Buff_Adef timer array HeroSkills_A089_A0F3_Buff_Timer timer array HeroSkills_A089_A0OO_Buff_Timer real array HeroSkills_A089_A0OO_Buff_v integer array Summon_hphx_onAttack_Count integer array HeroSkills_A08N_Start_Func01_Eff integer array HeroSkills_A08N_Start_Func01_Count real array HeroSkills_A08N_Start_Func01_X real array HeroSkills_A08N_Start_Func01_Y integer HeroSkills_A08N_Start_Func01_Timer integer array HeroSkills_A01K_Effect integer array HeroSkills_A01K_Number boolean array HeroSkills_A04U_App integer array HeroSkills_A04U_Last integer array HeroSkills_A04U_Next timer array HeroSkills_A04U_Buff_timer integer array HeroSkills_A04U_Buff_Index integer array HeroSkills_A04U_Buff_Str integer array HeroSkills_A04U_ValueAtk integer array HeroSkills_A04U_ValueMdg integer HeroSkills_A04U_Func integer array HeroSkills_A04W_Source integer array HeroSkills_A04W_Storm integer array HeroSkills_A04W_Effect group array HeroSkills_A04W_Group boolean array HeroSkills_A04W_Crash integer array HeroSkills_A04W_time real array HeroSkills_A04W_VectorX real array HeroSkills_A04W_VectorY real array HeroSkills_A04W_Damage real array HeroSkills_A04W_Distance integer HeroSkills_A04W_Func integer array HeroSkills_A037_Duration integer array HeroSkills_A037_App boolean array HeroSkills_A037_NotSeckill integer array HeroSkills_A0MS_Effect integer array HeroSkills_A0MS_Number integer array HeroSkills_A0MS_Charged integer array HeroSkills_A0MS_Duration boolean array HeroSkills_A0MS_Open integer array HeroSkills_A0MS_Last integer array HeroSkills_A0MS_Next integer HeroSkills_A0MS_Func=0 integer array Hero_Skills_Thunder_Halo integer array Hero_Skills_Thunder_Series integer array Hero_Skills_Thunder_MaxSeries integer array Hero_Skills_Thunder_buffLv integer array Hero_Skills_Thunder_buffDamage integer array Hero_Skills_Thunder_buffArmor integer array Hero_Skills_Thunder_buffAtkSp real array Hero_Skills_Thunder_Strength real array Hero_Skills_Thunder_Energy real array Hero_Skills_Thunder_EnergyUp real array Hero_Skills_Thunder_MaxEnergy boolean array Hero_Skills_Thunder_Use integer array Hero_Skills_Thunder_Last integer array Hero_Skills_Thunder_Next integer Hero_Skills_Thunder_Func=0 integer HeroSkills_A0N4_Func integer array HeroSkills_A0MV_Trig integer array HeroSkills_A0MV_HT integer array HeroSkills_A0MV_Adef integer array HeroSkills_A0MV_Effect integer array HeroSkills_A0MV_Duration integer array HeroSkills_A02X_Modulo constant real HeroSkills_A02Y_VR=60 constant real HeroSkills_A02Y_VW=90 integer array HeroSkills_A02Z_Target boolean array HeroSkills_A02Z_Reward integer array HeroSkills_A02Z_Number integer array HeroSkills_A03E_A0F5_Eff group array HeroSkills_A03E_A0F5_Group integer array HeroSkills_A03E_A0F5_Time real array HeroSkills_A03E_A0F5_Range real array HeroSkills_A03E_A0F5_Damage real array HeroSkills_A03E_A0F5_VX real array HeroSkills_A03E_A0F5_VY boolean array HeroSkills_A03E_A0F5_Use integer array HeroSkills_A03E_A0F5_Last integer array HeroSkills_A03E_A0F5_Next integer HeroSkills_A03E_A0F5_Func=0 integer array HeroSkills_A03E_ShieldTrig integer array HeroSkills_A03E_Eff integer array HeroSkills_A03E_Eff2 integer array HeroSkills_A03E_Eff3 group array HeroSkills_A03E_Group integer array HeroSkills_A03E_Time integer array HeroSkills_A03E_Intensify_value real array HeroSkills_A03E_Damage boolean array HeroSkills_A03E_Use integer array HeroSkills_A03E_last integer array HeroSkills_A03E_Next integer HeroSkills_A03E_Func1=0 integer array HeroSkills_A03F_Hero integer array HeroSkills_A03F_Eff group array HeroSkills_A03F_Group boolean array HeroSkills_A03F_Bool integer array HeroSkills_A03F_Count integer array HeroSkills_A03F_Number real array HeroSkills_A03F_Distance real array HeroSkills_A03F_Damage real array HeroSkills_A03F_X real array HeroSkills_A03F_Y integer HeroSkills_A03E_func integer array HeroSkills_A03G_DeBuff_a integer array HeroSkills_A03G_DeBuff_b integer array HeroSkills_A03G_DeBuff_c real array HeroSkills_A03G_DeBuff_v integer array HeroSkills_A03G_DeBuff_mdef timer array HeroSkills_A03G_DeBuff_timer integer array HeroSkills_A03G_DeBuff_lv integer array HeroSkills_A03G_Eff unit array HeroSkills_A03G_FuDi boolean array HeroSkills_A03G_BoolA boolean array HeroSkills_A03G_BoolB boolean array HeroSkills_A03G_BoolC integer array HeroSkills_A03G_Time real array HeroSkills_A03G_Damage real array HeroSkills_A03G_Angle real array HeroSkills_A03G_MdefReduce boolean array HeroSkills_A03G_Use integer array HeroSkills_A03G_Last integer array HeroSkills_A03G_Next integer HeroSkills_A03G_Func=0 integer array HeroSkills_A04R_Bolang_Hero integer array HeroSkills_A04R_Bolang_Eff integer array HeroSkills_A04R_Bolang_Time real array HeroSkills_A04R_Bolang_X real array HeroSkills_A04R_Bolang_Y integer HeroSkills_A04R_Bolang_Func integer array HeroSkills_A04R_Vessel integer array HeroSkills_A04R_Time boolean array HeroSkills_A04R_Use integer array HeroSkills_A04R_Last integer array HeroSkills_A04R_Next integer HeroSkills_A04R_Func=0 integer array HeroSkills_A0CQ_Count timer array HeroSkills_A0CQ_Timer integer array HeroSkills_A0CR_Hero integer array HeroSkills_A0CR_Emfw integer array HeroSkills_A0CR_Time real array HeroSkills_A0CR_Damage integer HeroSkills_A0CR_Func timer array HeroSkills_A0CR_IssuedOrder_Timer unit array HeroSkills_A0CR_IssuedOrder_Target integer array HeroSkills_A0CR_IssuedOrder_Count integer array HeroSkills_A0CX_Last integer array HeroSkills_A0CX_Next integer array HeroSkills_A0CX_TrigA integer array HeroSkills_A0CX_Time real array HeroSkills_A0CX_Damage integer array HeroSkills_A0CX_TrigB integer HeroSkills_A0CX_Func boolean array cT real array HeroSkills_A0CU_Px real array HeroSkills_A0CU_Py real array HeroSkills_A0CU_Tx real array HeroSkills_A0CU_Ty timer HeroSkills_A0CU_Tm=CreateTimer() integer HeroSkills_A0CU_Index=0 integer array HeroSkills_A0CU_U integer array r8v integer array r9v group array ivv boolean array iev integer array ixv real array iov real array irv real array iiv integer iav integer array HeroSkills_A0CU_Last integer array HeroSkills_A0CU_Next integer array HeroSkills_A0CU_Count real array HeroSkills_A0CU_bzbe integer iOv integer array HeroSkills_A0CW_DLTS integer array HeroSkills_A0CW_Eff integer array HeroSkills_A0CW_Count integer HeroSkills_A0CW_Func integer array SummonedUnitSkills_A0FQ_Unit integer array SummonedUnitSkills_A0FQ_Eff group array SummonedUnitSkills_A0FQ_Group integer array SummonedUnitSkills_A0FQ_Count real array SummonedUnitSkills_A0FQ_R real array SummonedUnitSkills_A0FQ_X real array SummonedUnitSkills_A0FQ_Y real array SummonedUnitSkills_A0FQ_Damage1 real array SummonedUnitSkills_A0FQ_Damage2 integer SummonedUnitSkills_A0FQ_Func timer array SummonedUnitSkills_A0FR_Timer integer array SummonedUnitSkills_A0FS_Unit integer array SummonedUnitSkills_A0FS_Hero lightning array SummonedUnitSkills_A0FS_Lig group array SummonedUnitSkills_A0FS_Group integer array SummonedUnitSkills_A0FS_Count real array SummonedUnitSkills_A0FS_V integer array iMv integer ipv integer array HeroSkills_A0CY_DeBuff_Mdef timer array HeroSkills_A0CY_DeBuff_Timer integer array HeroSkills_A0CY_Hero integer array HeroSkills_A0CY_Vessel integer array HeroSkills_A0CY_Eff boolean array HeroSkills_A0CY_Bool integer array HeroSkills_A0CY_Time real array HeroSkills_A0CY_Damage integer HeroSkills_A0CY_Func integer array Elemental_Force_Adef integer array Elemental_Force_Model timer array Elemental_Force_Kill_Timer boolean array Elemental_Force_Attack_Bool integer array Elemental_Force_Kill_Value integer array Elemental_Force_ChargeTime integer array Elemental_Force_CombatTime integer array Elemental_Force_Intensify integer array Elemental_Force_Charge integer array Elemental_Force_Max_Charge real array Elemental_Force_HpRegen boolean array Elemental_Force_Use integer array Elemental_Force_Last integer array Elemental_Force_Next integer Elemental_Force_Func=0 integer array HeroSkills_A0K9_DeBuff_Mdef timer array HeroSkills_A0K9_DeBuff_Timer integer array HeroSkills_A0K9_Hero group array HeroSkills_A0K9_Group boolean array HeroSkills_A0K9_Bool integer array HeroSkills_A0K9_Time real array HeroSkills_A0K9_A real array HeroSkills_A0K9_X1 real array HeroSkills_A0K9_Y1 real array HeroSkills_A0K9_X2 real array HeroSkills_A0K9_Y2 real array HeroSkills_A0K9_D integer HeroSkills_A0K9_Func integer array HeroSkills_A0K6_Buff_Mdef timer array HeroSkills_A0K6_Buff_Timer boolean array HeroSkills_A0K6_Bool boolean array HeroSkills_A0K3_Bool integer array HeroSkills_A0K3_Count real array HeroSkills_A0K3_CureV real array HeroSkills_A0K3_MDG boolean array HeroSkills_A0K3_Use integer array HeroSkills_A0K3_Last integer array HeroSkills_A0K3_Next integer HeroSkills_A0K3_Func=0 integer array HeroSkills_A0K8_Buff_Str integer array HeroSkills_A0K8_Buff_Agi integer array HeroSkills_A0K8_Buff_Int timer array HeroSkills_A0K8_Buff_Timer integer array HeroSkills_A0K8_Eff integer array HeroSkills_A0K8_Vessel group array HeroSkills_A0K8_Group boolean array HeroSkills_A0K8_Has_hcun integer array HeroSkills_A0K8_Charge integer array HeroSkills_A0K8_Time real array HeroSkills_A0K8_Damage real array HeroSkills_A0K8_HX real array HeroSkills_A0K8_HY real array HeroSkills_A0K8_Ang real array HeroSkills_A0K8_X real array HeroSkills_A0K8_Y constant real HeroSkills_A0K8_HR=125 boolean array HeroSkills_A0K8_Use integer array HeroSkills_A0K8_Last integer array HeroSkills_A0K8_Next integer HeroSkills_A0K8_Func=0 boolean HeroSkills_A0KD_ON=false integer array Hero_H01I_SkillsList_Eff integer array Hero_H01I_SkillsList_Id integer array Hero_H01I_SkillsList_Duration real array Hero_H01I_SkillsList_Size boolean array Hero_H01I_SkillsList_Use integer array Hero_H01I_SkillsList_Last integer array Hero_H01I_SkillsList_Next integer Hero_H01I_SkillsList_Func=0 integer array Hero_H01I_SkillsList_Vessel integer array HeroSkills_A0NE_Buff_4_Mdef integer array HeroSkills_A0NE_Modul integer array HeroSkills_A0NE_BuffCount integer array HeroSkills_A0NE_Buff_5_Int integer array HeroSkills_A0NW_Energy real array HeroSkills_A0NE_Buff_2_HpRegen real array HeroSkills_A0NE_Buff_2_MpRegen constant integer i9v=R2I(1.5*32) constant real avv=6 constant real aev=96 boolean array HeroSkills_A0NE_Use integer array HeroSkills_A0NE_Last integer array HeroSkills_A0NE_Next integer HeroSkills_A0NE_Func1=0 integer array HeroSkills_A0NO_Unit integer array HeroSkills_A0NO_Eff integer array HeroSkills_A0NO_Time real array HeroSkills_A0NO_Damage integer HeroSkills_A0NO_Func integer array HeroSkills_A0O4_Eff integer array HeroSkills_A0O4_Model integer array HeroSkills_A0O4_Time real array HeroSkills_A0O4_Damage boolean array HeroSkills_A0O4_Use integer array HeroSkills_A0O4_Last integer array HeroSkills_A0O4_Next integer HeroSkills_A0O4_Func=0 integer array HeroSkills_A0NW_AtkTrig integer array HeroSkills_A0NW_Time integer array HeroSkills_A0NW_AtkCD integer array HeroSkills_A0NW_AtkSpeed integer array HeroSkills_A0NW_AtkValue boolean array HeroSkills_A0NW_Use integer array HeroSkills_A0NW_Last integer array HeroSkills_A0NW_Next integer HeroSkills_A0NW_Func=0 integer array HeroSkills_A0NZ_Model integer array HeroSkills_A0NZ_Time integer array HeroSkills_A0NZ_Count real array HeroSkills_A0NZ_Damage integer array HeroSkills_A0NZ_Buff_Mdef timer array HeroSkills_A0NZ_Buff_Timer boolean array HeroSkills_A0NZ_Use integer array HeroSkills_A0NZ_Last integer array HeroSkills_A0NZ_Next integer HeroSkills_A0NZ_Func=0 integer array HeroSkills_A0O3_AtkUnit integer array HeroSkills_A0O3_Target integer array HeroSkills_A0O3_Time integer array HeroSkills_A0O3_Couit real array HeroSkills_A0O3_Damage boolean array HeroSkills_A0O3_Use integer array HeroSkills_A0O3_Last integer array HeroSkills_A0O3_Next integer HeroSkills_A0O3_Func=0 integer array HeroSkills_A0NV_Listing texttag array HeroSkills_A0NV_Tag boolean array HeroSkills_A0NV_Bool integer array HeroSkills_A0NV_V integer array HeroSkills_A0NV_Index integer array HeroSkills_A0NV_Target integer array HeroSkills_A0NV_Count boolean array HeroSkills_A0NV_Use integer array HeroSkills_A0NV_Last integer array HeroSkills_A0NV_Next integer HeroSkills_A0NV_Func=0 timer array HeroSkills_A0O5_BuffTimer integer array HeroSkills_A0O5_Last integer array HeroSkills_A0O5_Next integer array HeroSkills_A0O7_SummonedUnit integer array HeroSkills_A0O7_Eff boolean array HeroSkills_A0O7_Bool integer array HeroSkills_A0O7_SummonedTime integer array HeroSkills_A0O7_Count integer array HeroSkills_A0O7_ArmorLv real array HeroSkills_A0O7_Damage boolean array HeroSkills_A0O7_Use integer array HeroSkills_A0O7_Last integer array HeroSkills_A0O7_Next integer HeroSkills_A0O7_Func=0 integer array SummonedUnitSkills_A0OA_Buff_Adef timer array SummonedUnitSkills_A0OA_Buff_Timer integer array HeroSkills_A0NN_Vessel integer array HeroSkills_A0NN_Count integer array HeroSkills_A0NN_Time real array HeroSkills_A0NN_Value boolean array HeroSkills_A0NN_Use integer array HeroSkills_A0NN_Last integer array HeroSkills_A0NN_Next integer HeroSkills_A0NN_Func=0 integer array HeroSkills_A0OC_Buff_Adef timer array HeroSkills_A0OC_Buff_Timer integer array HeroSkills_A0OC_Eff integer array HeroSkills_A0OC_Time integer array HeroSkills_A0OC_Count boolean array HeroSkills_A0OC_Use integer array HeroSkills_A0OC_Last integer array HeroSkills_A0OC_Next integer HeroSkills_A0OC_Func=0 integer array HeroSkills_A02U_Data integer array HeroSkills_A02U_Dodge integer array HeroSkills_A02U_Mana unit array HeroSkills_A02U_Unit timer array HeroSkills_A0B6_Buff_Timer integer array HeroSkills_A0B6_Buff_Def timer array HeroSkills_A0B3_Buff_Timer integer array HeroSkills_A0B3_Buff_Def integer array HeroSkills_A0B3_Buff_Atk integer array HeroSkills_A0B3_Buff_HpRegen integer array HeroSkills_A0B3_DefList integer array HeroSkills_A01H_Buff_Eff integer array HeroSkills_A01H_Buff_Adef integer array HeroSkills_A01H_Buff_Time boolean array HeroSkills_A01H_Buff_Use integer array HeroSkills_A01H_Buff_Last integer array HeroSkills_A01H_Buff_Next integer HeroSkills_A01H_Buff_Func=0 timer array HeroSkills_A007_Buff_Timer integer array HeroSkills_A007_Buff_Trig integer array HeroSkills_A007_Buff_DamageSource integer HeroSkills_A015_Func timer array HeroSkills_A01J_Buff_Timer integer HeroSkills_A01J_Func integer array HeroSkills_A0FG_Uint integer array HeroSkills_A0FG_Vessel integer array HeroSkills_A0FG_Eff integer array HeroSkills_A0FG_Time real array HeroSkills_A0FG_Damage real array HeroSkills_A0FG_Ang integer HeroSkills_A0FG_Func integer array HeroSkills_AUfa_Shield integer array HeroSkills_AUfa_Death integer array HeroSkills_AUfa_Shield_Source timer array HeroSkills_AUfa_Shield_Timer real array HeroSkills_AUfa_Shield_life integer array HeroSkills_AUfa_Def integer array HeroSkills_A010_Unit integer array HeroSkills_A010_Eff group array HeroSkills_A010_Group real array HeroSkills_A010_X real array HeroSkills_A010_Y real array HeroSkills_A010_B real array HeroSkills_A010_RX real array HeroSkills_A010_RY real array HeroSkills_A010_Damage real array HeroSkills_A010_A integer HeroSkills_A010_Func integer array HeroSkills_A011_BDSP_Unit integer array HeroSkills_A011_BDSP_Eff integer array HeroSkills_A011_BDSP_Time real array HeroSkills_A011_BDSP_X real array HeroSkills_A011_BDSP_Y real array HeroSkills_A011_BDSP_R real array HeroSkills_A011_BDSP_Damage integer HeroSkills_A011_BDSP_Func integer array HeroSkills_A011_IceShard integer array HeroSkills_A011_Model integer array HeroSkills_A011_TargetPoint integer array HeroSkills_A011_Vessel group array HeroSkills_A011_Group integer array HeroSkills_A011_Time real array HeroSkills_A011_A real array HeroSkills_A011_Damage real array HeroSkills_A011_Rang boolean array HeroSkills_A011_Use integer array HeroSkills_A011_Last integer array HeroSkills_A011_Next integer HeroSkills_A011_Func=0 timer array HeroSkills_A00L_Timer2 timer array HeroSkills_A00L_Timer1 integer array HeroSkills_A00L_Count real array HeroSkills_A00L_X real array HeroSkills_A00L_Y timer array HeroSkills_A00V_Buff_timer integer array HeroSkills_A00V_Buff_lv timer array HeroSkills_Flash_Timer integer array HeroSkills_Flash_Lv integer HeroSkills_A013_Func integer array HeroSkills_A029_Unit real array HeroSkills_A029_Ang real array HeroSkills_A029_X real array HeroSkills_A029_Y real array HeroSkills_A029_S real array HeroSkills_A029_R timer array HeroSkills_A029_Timer integer HeroSkills_A029_Func integer HeroSkills_A07J_Func integer array HeroSkills_A07F_Target integer array HeroSkills_A07F_Vessel integer array HeroSkills_A07F_Model integer array HeroSkills_A07F_Adef boolean array HeroSkills_A07F_Bool integer array HeroSkills_A07F_Time real array HeroSkills_A07F_Damage real array HeroSkills_A07F_Range real array HeroSkills_A07F_A integer array HeroSkills_A07F_T integer HeroSkills_A07F_Func integer array HeroSkills_A0GG_TagSize timer array HeroSkills_A0GG_Buff_Timer timer array HeroSkills_A0GE_Buff_Timer integer array HeroSkills_A0GE_Atk_Number integer array HeroSkills_A0GE_Buff_Lv integer array HeroSkills_A0GE_Buff_Agi boolean array HeroSkills_A0GE_ON integer array HeroSkills_A0GJ_Shadow_Source integer array HeroSkills_A0GJ_Shadow_Target integer array HeroSkills_A0GJ_Shadow_Missile boolean array HeroSkills_A0GJ_Shadow_Bool real array HeroSkills_A0GJ_Shadow_Damage integer HeroSkills_A0GJ_Shadow_Func integer array HeroSkills_A0GJ_Unit integer array HeroSkills_A0GJ_Eff group array HeroSkills_A0GJ_Geoup1 group array HeroSkills_A0GJ_Geoup2 boolean array HeroSkills_A0GJ_Bool real array HeroSkills_A0GJ_VX real array HeroSkills_A0GJ_VY real array HeroSkills_A0GJ_Damage real array HeroSkills_A0GJ_Distance integer HeroSkills_A0GJ_Func integer HeroSkills_A0GS_Func integer array HeroSkills_A0GN_Trig integer array HeroSkills_A0GN_Charged_e015 integer array HeroSkills_A0GN_Charged_Count integer array HeroSkills_A0GN_Charged_Value integer array HeroSkills_A0GN_Time boolean array HeroSkills_A0GN_Use integer array HeroSkills_A0GN_Last integer array HeroSkills_A0GN_Next integer HeroSkills_A0GN_Func=0 integer array HeroSkills_A0GW_Rockets_Source integer array HeroSkills_A0GW_Rockets_Eff integer array HeroSkills_A0GW_Rockets_A integer array HeroSkills_A0GW_Rockets_B integer array HeroSkills_A0GW_Rockets_Time real array HeroSkills_A0GW_Rockets_Vx real array HeroSkills_A0GW_Rockets_Vy real array HeroSkills_A0GW_Rockets_Damage integer HeroSkills_A0GW_Rockets_Func integer array HeroSkills_A0GW_Number real array HeroSkills_A0GW_Damage timer array HeroSkills_A0N1_Buff_Timer integer array HeroSkills_A0N1_Buff_Adef timer array HeroSkills_A0N1_Timer integer array HeroSkills_A0N1_Model integer array HeroSkills_A0PN_Vessel integer array HeroSkills_A0PN_Number real array HeroSkills_A0PN_Anger boolean array HeroSkills_A0PN_Use integer array HeroSkills_A0PN_Last integer array HeroSkills_A0PN_Next integer HeroSkills_A0PN_Func=0 constant real HeroSkills_A0PS_Dr=375 constant real HeroSkills_A0PS_Pr=350 constant real HeroSkills_A0PS_Lr=$3E8 constant real HeroSkills_A0PS_Sr=$FA constant real HeroSkills_A0PS_Ts=4 integer array HeroSkills_A0PS_Hero integer array HeroSkills_A0PS_Model integer array HeroSkills_A0PS_Eff group array HeroSkills_A0PS_Group boolean array HeroSkills_A0PS_Bool real array HeroSkills_A0PS_Time real array HeroSkills_A0PS_Damage real array HeroSkills_A0PS_VX real array HeroSkills_A0PS_VY boolean array HeroSkills_A0PS_Use integer array HeroSkills_A0PS_Last integer array HeroSkills_A0PS_Next integer HeroSkills_A0PS_func=0 constant real viv=6 integer array HeroSkills_A0PT_Shield_Trig timer array HeroSkills_A0PT_Shield_Timer real array HeroSkills_A0PT_Shield_Life integer array HeroSkills_A0PT_CureTrig integer array HeroSkills_A0PT_Buff_Adef timer array HeroSkills_A0PT_Buff_Timer integer array HeroSkills_A0PT_Buff_AdefV integer array HeroSkills_A0PT_Model integer array HeroSkills_A0PT_Effect integer array HeroSkills_A0PT_Time integer array HeroSkills_A0PT_Value boolean array HeroSkills_A0PT_Use integer array HeroSkills_A0PT_Last integer array HeroSkills_A0PT_Next integer HeroSkills_A0PT_Func=0 timer array HeroSkills_A0PZ_Buff_timer integer array HeroSkills_A0PZ_Buff_Hp real array HeroSkills_A0PZ_Buff_Md boolean array Summon_h01O_Kill boolean Summon_h01O_Bool=true integer array SummonSkills_A0Q6_Unit integer array SummonSkills_A0Q6_Effect integer array SummonSkills_A0Q6_Time integer array SummonSkills_A0Q6_AnimationTime real array SummonSkills_A0Q6_Damage integer SummonSkills_A0Q6_Func integer array SummonSkills_A0Q5_Unit integer array SummonSkills_A0Q5_Effect group array SummonSkills_A0Q5_Group integer array SummonSkills_A0Q5_Count real array SummonSkills_A0Q5_Ang real array SummonSkills_A0Q5_X real array SummonSkills_A0Q5_Y real array SummonSkills_A0Q5_S real array SummonSkills_A0Q5_R real array SummonSkills_A0Q5_Damage integer SummonSkills_A0Q5_Func integer array SummonSkills_A0Q4_Buff_Mdef timer array SummonSkills_A0Q4_Buff_Timer real array SummonSkills_A0Q4_Time boolean array SummonSkills_A0Q4_Off timer array HeroSkills_A01N_Timer boolean array HeroSkills_A01N_Off integer array HeroSkills_A01N_Max integer array HeroSkills_A01N_Vaule boolean array HeroSkills_A05Y_B_Use integer HeroSkills_A05Y_B_Func integer HeroSkills_A05Y_A_Func integer array HeroSkills_A060_Buff_Count integer array HeroSkills_A060_Buff_Agi real array HeroSkills_A060_Buff_CureV integer array HeroSkills_A060_Model unit array HeroSkills_A060_MaoTouYing boolean array HeroSkills_A060_Fangyu boolean array HeroSkills_A060_Cd integer array HeroSkills_A060_F_Timer boolean array HeroSkills_A060_Use integer array HeroSkills_A060_Last integer array HeroSkills_A060_Next integer HeroSkills_A060_Func=0 integer array HeroSkills_A06A_V integer array HeroSkills_A06A_Id real array HeroSkills_A0QN_Px real array HeroSkills_A0QN_Py integer array HeroSkills_A06X_Unit integer array HeroSkills_A06X_Vessel group array HeroSkills_A06X_Group integer array HeroSkills_A06X_Time real array HeroSkills_A06X_Px real array HeroSkills_A06X_Py real array HeroSkills_A06X_A real array HeroSkills_A06X_Vx real array HeroSkills_A06X_Vy real array HeroSkills_A06X_D integer HeroSkills_A06X_Func integer array HeroSkills_A0XR_Lv integer array HeroSkills_A0XT_Index timer array HeroSkills_A0XT_Timer timer array HeroSkills_A0XV_Buff_Timer integer array HeroSkills_A0XV_Buff_Lv boolean array HeroSkills_A0XV_Bool integer array HeroSkills_A0XX_Data timer array HeroSkills_A100_Buff_Timer integer array HeroSkills_A100_Buff_Atk real array HeroSkills_A100_Buff_Cure integer array HeroSkills_A100_Buff_N timer array HeroSkills_A104_Buff_Timer integer array HeroSkills_A104_Buff_Adef timer array HeroSkills_A105_Buff_Timer integer array HeroSkills_A105_Buff_Adef integer array HeroSkills_A107_Lv integer array HeroSkills_A107_Mdef integer array HeroSkills_A107_Buff_Lv timer array HeroSkills_A107_Buff_Timer integer array HeroSkills_A107_Buff_Trig timer array HeroSkills_A107_Buff_Timer2 real array HeroSkills_A107_Buff_Cure real array HeroSkills_A107_Buff_D timer array HeroSkills_A108_Buff_Timer integer array HeroSkills_A108_Buff_Trig integer array HeroSkills_A108_Buff_Atk1 real array HeroSkills_A108_Buff_Atk2 timer array HeroSkills_A109_Buff_Timer integer array HeroSkills_A109_Buff_Pdef integer array HeroSkills_A109_Buff_Mdef timer array HeroSkills_A10A_Buff_Timer integer array HeroSkills_A10A_Buff_Hp integer array HeroSkills_A10A_Buff_Mp timer array HeroSkills_A10B_Buff_Timer integer array HeroSkills_A10B_Buff_V timer array HeroSkills_A10C_Buff_Timer integer array HeroSkills_A10C_Buff_Trig real array HeroSkills_A10C_Buff_V timer array HeroSkills_A10D_Buff_Timer integer array HeroSkills_A10D_Buff_Mdef timer array HeroSkills_A0Y6_Timer integer array HeroSkills_A0Y6_Trig integer array HeroSkills_A0Y6_Mdef integer array HeroSkills_A0Y6_Source boolean array HeroSkills_A0YA_Bool integer array HeroSkills_A0YC_Data trigger array HeroSkills_A0YG_Trig real array HeroSkills_A0YG_V timer array HeroSkills_A0YG_Timer real array HeroSkills_A0YG_MPRegen integer array HeroSkills_A0YG_Atk integer array HeroSkills_A0YG_AtkB integer array HeroSkills_A0YG_Lv boolean array HeroSkills_A0YG_Bool integer array HeroSkills_A0YJ_Data integer array HeroSkills_A0YJ_Dodge timer array HeroSkills_A0YL_Timer constant boolean LIBRARY_ItemCombine=true integer array ItemCombine__eh integer array ItemCombine__xh integer ItemCombine__oh constant boolean LIBRARY_NewEquip=true timer array Active_A0ZG_Timer integer array Equip_I0FR_Atk_trig real array Active_A0WY_Damage boolean array NewEquip___ChaosSuit_Use real array Active_A0XL_Dampt integer array Equip_spre_Table integer array Equip_rma2_Buff timer array Equip_rma2_Buff_timer timer array Equip_I0FV_timer integer array Equip_I0FV_Buff integer array Equip_I0AR_Vessel integer array Equip_I0AR_Buff3 integer array Equip_I0AR_Buff4 timer array Equip_I0AR_Halo_timer integer array Equip_I0AR_Halo_Str integer array Equip_I0AR_Halo_Agi integer array Equip_I0AR_Halo_Int integer array Active_A0XD_Buff integer array Equip_I0FU_AtkBuff timer array Equip_wneu_timer integer array Equip_wneu_mdef timer array Equip_ocor_Timer integer array Equip_ocor_Life real array Equip_rots_cd constant boolean LIBRARY_Quest=true integer Quest__V1 integer Quest__V8 integer Quest__VF integer Quest__Point integer Quest__TYPE integer Quest__Gold integer Quest__Exp integer Quest__Item integer Quest__Tip integer Quest__Level integer Quest__Hash=0 integer Quest__LastQuestId=0 integer Quest__QuestIndex=0 integer Quest__A=0 integer array Quest__QuestList integer Quest__Vessel integer Quest__Name string Quest__Str="-task" integer Quest__LastQuestDropsList=0 constant boolean LIBRARY_n02N=true unit n02N__Unit_n02N=null integer n02N__Unit_n02P=0 integer n02N__Unit_n02O=0 integer n02N__Effect=0 timer n02N__Timer=null constant real n02N__n02O_Move_Range=900 real n02N__n02O_Move_TargetX real n02N__n02O_Move_TargetY integer n02N__n02O_Ability_TargetUnit=0 integer n02N__n02O_AbilityEffect=0 integer n02N__n02O_Ability_Count=0 integer n02N__n02O_Ability_CD=0 integer n02N__n02O_Ability_Timed=0 integer n02N__Ability_001_Target=0 integer n02N__Ability_001_Timed=0 integer n02N__Ability_001_Timed_2 integer n02N__Ability_003_BezierCurve integer n02N__Ability_003_Index=0 integer n02N__Ability_003_Timed=0 integer n02N__Ability_004_Timed=0 real n02N__Ability_003_TargetX real n02N__Ability_003_TargetY real n02N__Ability_003_FlyHeight integer n02N__Ability_003_CD=0 real array n02N__Ability_004_Life integer n02N__Ability_004_Lv=2 integer n02N__Ability_005_Timed=0 timer n02N__n02P_Buff_Timer=null integer n02N__n02P_BuffLV=0 integer n02N__Index=0 real array Summon_n02Q_TargetX real array Summon_n02Q_TargetY integer array BagSkill_A09X_Target integer array BagSkill_A09X_Count constant boolean LIBRARY_nnsw=true unit nnsw__Unit=null timer array BossSkill_A0F2_Timer integer array BossSkill_A0F2_Atk constant boolean LIBRARY_saveandload=true integer array saveandload__l_do integer array saveandload__Do integer array saveandload__PlayerKey integer saveandload__fo=0 item array saveandload__Vessel_Item integer saveandload__Vessel_Index=0//item number on save / load integer array SavedItems integer SavedItemsCount = 0 constant integer saveandload__yE=$C350 constant integer saveandload__Characters_DecodeTypeA=$F111F constant integer saveandload__Characters_DecodeTypeB=$F111F integer saveandload__vX=0 integer saveandload__Characters_Decode string saveandload__Characters_suffix integer saveandload__Characters_Encrypt integer saveandload__Characters_List player saveandload__LastSaveOrLoadPlayer integer saveandload__SaveId=92 integer saveandload__LastSaveOrLoadPlayerId integer saveandload__LastSaveCode integer saveandload__LastSaveCode2 integer saveandload__LastSaveCodeId=0 unit saveandload__LastLoadUnit=null trigger saveandload__Save_Trig trigger saveandload__Load_Trig unit saveandload__getHeroexp_unit=null string saveandload__LastUnableSavelist="" constant boolean LIBRARY_zhaxiang=true integer array zhaxiang___vg group zhaxiang___eg integer zhaxiang___xg integer zhaxiang___diquyidong1 integer zhaxiang___diquyidong2 integer zhaxiang___diquyidong2_v region zhaxiang___diquyidong2_region real array zhaxiang___diquyidong2_off group udg_aaaaa11=null unit array udg_unitaaa rect gg_rct_BSDX______________001=null rect gg_rct_BSDX____________________000=null rect gg_rct_BSJL_____________001=null rect gg_rct_BSXS______________000=null rect gg_rct_BXSW______________001=null rect gg_rct_BXSW______________002=null rect gg_rct_BYQMD____________________000=null rect gg_rct_DGFX______________000=null rect gg_rct_DLZ________001=null rect gg_rct_EM01_________________002=null rect gg_rct_FSZJ2______________000=null rect gg_rct_HM______________001=null rect gg_rct_PRSJD_________________000=null rect gg_rct_PRSJD2_________________000=null rect gg_rct_PVP_PVP_______000=null rect gg_rct_TSRK_003=null rect gg_rct_WLZS________001=null rect gg_rct_WLZS2_______________001=null rect gg_rct_WLZS3_______________001=null rect gg_rct_WLZS4_______________001=null rect gg_rct_YGMJ2____________________000=null rect gg_rct_YRST______________000=null rect gg_rct______________000=null rect gg_rct______________001=null rect gg_rct______________002=null rect gg_rct______________003=null rect gg_rct______________006=null rect gg_rct______________007=null rect gg_rct_RYHS______________000=null rect gg_rct______________017=null rect gg_rct_YWZD______________000=null rect gg_rct_SHTZZ_____________________________002=null rect gg_rct_FQJT_________________002=null rect gg_rct_HSK_______________________002=null rect gg_rct_YS01_______________________002=null rect gg_rct_BSLZ_______________________002=null rect gg_rct_ZHIZHUZHD_________________002=null rect gg_rct_FSZJ______________000=null rect gg_rct_YXMD_000=null rect gg_rct_TSZHD_________________002=null rect gg_rct_BBMD______________000=null rect gg_rct_JKZHD_________________002=null rect gg_rct_EM03_________________003=null rect gg_rct_HCFHD_004=null rect gg_rct_EM02______________003=null rect gg_rct_HCD_004=null rect gg_rct_XSC___________000=null rect gg_rct_BBMD_______1_003=null rect gg_rct_WKQY______________000=null rect gg_rct_FSZJ_NGD________001=null rect gg_rct_FSZJ_JYG___________001=null rect gg_rct_FSZJ_MGD______________001=null rect gg_rct_FSZJ_LBD___________001=null rect gg_rct______________056=null rect gg_rct______________057=null rect gg_rct______________058=null rect gg_rct______________059=null rect gg_rct______________060=null rect gg_rct______________061=null rect gg_rct______________062=null rect gg_rct______________063=null rect gg_rct______________064=null rect gg_rct______________065=null rect gg_rct_RYHS______________002=null rect gg_rct______________067=null rect gg_rct______________068=null rect gg_rct______________050=null rect gg_rct_SH_MW_000=null rect gg_rct_MFT_LT_000=null rect gg_rct______________070=null rect gg_rct_YWZD______________001=null rect gg_rct______________072=null sound gg_snd_RiflemanAttack1=null trigger gg_trg____________________001=null trigger gg_trg_alloc=null trigger gg_trg_polygon=null trigger gg_trg_math=null trigger gg_trg_system=null trigger gg_trg_Then_Spell_Event=null trigger gg_trg_string=null trigger gg_trg_distexttag=null trigger gg_trg_groupunits=null trigger gg_trg_effecter=null trigger gg_trg_playerInit=null trigger gg_trg_unit=null trigger gg_trg_unitstate=null trigger gg_trg_bagstate=null trigger gg_trg_Hero=null trigger gg_trg_herostate=null trigger gg_trg_Item_Drops=null trigger gg_trg_damage=null trigger gg_trg_environment=null trigger gg_trg_Terrain=null trigger gg_trg_Equip_Trigger__________u=null trigger gg_trg_zhuanshu=null trigger gg_trg_Equip_State=null trigger gg_trg_ItemCombine=null trigger gg_trg_BasicCatalog=null trigger gg_trg_MiscCatalog=null trigger gg_trg_LoadBuffer=null trigger gg_trg_HeroCatalog=null trigger gg_trg_BagSwapCatalog=null trigger gg_trg_S_L=null trigger gg_trg_Book=null trigger gg_trg_Magetower=null trigger gg_trg_Quest=null trigger gg_trg____________________2016_01_20_23_00=null trigger gg_trg_F9______u=null trigger gg_trg__________mp_________u=null trigger gg_trg_0001_______________u=null trigger gg_trg_0004____________u=null trigger gg_trg_0005=null trigger gg_trg_0002_NewEquip=null trigger gg_trg_0003=null trigger gg_trg__________u=null trigger gg_trg____________________003=null trigger gg_trg____________________004=null trigger gg_trg____________________005=null trigger gg_trg____________________006=null unit gg_unit_n02V_0560=null unit gg_unit_n01N_0532=null unit gg_unit_n01N_0531=null unit gg_unit_H00Q_0724=null unit gg_unit_n01T_0423=null unit gg_unit_n001_0837=null unit gg_unit_nbee_0806=null unit gg_unit_h00N_0748=null unit gg_unit_n02D_0544=null unit gg_unit_hsor_0314=null unit gg_unit_hmpr_0313=null unit gg_unit_n035_0003=null unit gg_unit_n02Y_0270=null unit gg_unit_n00S_0365=null unit gg_unit_ufro_1585=null unit gg_unit_n033_0007=null unit gg_unit_n039_0040=null unit gg_unit_hpa1_0272=null unit gg_unit_ocat_0271=null unit gg_unit_h00N_0558=null unit gg_unit_hrif_0130=null unit gg_unit_h01G_0069=null unit gg_unit_h01G_0068=null unit gg_unit_h01G_0067=null unit gg_unit_n000_0011=null unit gg_unit_n003_0012=null unit gg_unit_hrif_0041=null unit gg_unit_n001_0039=null unit gg_unit_n027_0834=null unit gg_unit_n00V_0759=null unit gg_unit_H00G_0758=null unit gg_unit_h00M_0750=null unit gg_unit_h01T_0350=null unit gg_unit_nhew_0986=null unit gg_unit_n01N_0533=null unit gg_unit_h01F_0728=null unit gg_unit_n039_0547=null unit gg_unit_n03G_0815=null unit gg_unit_ufro_1583=null unit gg_unit_n00U_0789=null unit gg_unit_n01U_0362=null unit gg_unit_n03B_0550=null unit gg_unit_n039_0549=null unit gg_unit_n039_0548=null unit gg_unit_ufro_1584=null unit gg_unit_h00V_0527=null unit gg_unit_n03H_0776=null destructable gg_dest_B00D_11119=null destructable gg_dest_B001_6745=null destructable gg_dest_B001_6744=null destructable gg_dest_B00C_1557=null destructable gg_dest_Dofv_1632=null destructable gg_dest_B001_2315=null destructable gg_dest_B006_19850=null integer Book__Direetory integer Book__lastedit_id string Book__lastedit_str integer Book__BossPoint integer Book__BossPointIndex=0 real array Book__BossPointX real array Book__BossPointY integer array Magetower__rh integer array Magetower__ih integer array Magetower__ah integer array Magetower__nh integer Magetower__Vh=0 trigger l__library_init constant integer si__polygon=1 integer si__polygon_F=0 integer si__polygon_I=0 integer array si__polygon_V integer array s__polygon_Max_i real array s__polygon_Max_x real array s__polygon_Max_y real array s__polygon_Min_x real array s__polygon_Min_y real array s___polygon_X constant integer s___polygon_X_size=100 integer array s__polygon_X real array s___polygon_Y constant integer s___polygon_Y_size=100 integer array s__polygon_Y constant integer si__Trig=4 integer si__Trig_F=0 integer si__Trig_I=0 integer array si__Trig_V integer array s__Trig_fl integer array s__Trig_fr trigger array s__Trig_trig integer s__Trig_P=0 integer array s__Trig_P2 integer s__Trig_Index=0 constant integer si__Catalog=5 integer s__Catalog_I=0 integer s__Catalog_F=0 integer s__Catalog_R1 integer s__Catalog_R2 integer array s__Catalog_stack_a integer array s__Catalog_stack_b integer array s__Catalog_number integer array s__Catalog_content integer array s__Catalog_left integer array s__Catalog_right integer array s__Catalog_re integer array s__Catalog_ie constant integer si__BezierCurve=6 integer si__BezierCurve_F=0 integer si__BezierCurve_I=0 integer array si__BezierCurve_V integer array s__BezierCurve_Type real array s__BezierCurve_a1 real array s__BezierCurve_b1 real array s__BezierCurve_c1 real array s__BezierCurve_d1 real array s__BezierCurve_a2 real array s__BezierCurve_b2 real array s__BezierCurve_c2 real array s__BezierCurve_d2 real array s__BezierCurve_a3 real array s__BezierCurve_b3 real array s__BezierCurve_c3 real array s__BezierCurve_d3 constant integer si__Sound_list=7 integer si__Sound_list_F=0 integer si__Sound_list_I=0 integer array si__Sound_list_V string array s__Sound_list_Name boolean array s__Sound_list_isloop boolean array s__Sound_list_is3D boolean array s__Sound_list_stopwhenoutofrange integer array s__Sound_list_fadeInRate integer array s__Sound_list_fadeOutRate string array s__Sound_list_eaxSetting string array s__Sound_list_Label integer array s__Sound_list_duration integer array s__Sound_list_channel integer array s__Sound_list_volume real array s__Sound_list_pitch real array s__Sound_list_minDist real array s__Sound_list_maxDist real array s__Sound_list_cutoff real array s__Sound_list_x real array s__Sound_list_y real array s__Sound_list_z unit array s__Sound_list_whichUnit sound s__Sound_list_Sound constant integer si__Character=8 integer s__Character_MemoryBlock=0 integer s__Character_index=0 integer array s__Character_list_next boolean array s__Character_Use string array s__Character_reality integer array s__Character_vessel integer array s__Character_length constant integer si__Multiboard=9 integer si__Multiboard_F=0 integer si__Multiboard_I=0 integer array si__Multiboard_V multiboard array s__Multiboard_Ie integer array s__Multiboard_vessel integer array s__Multiboard_RowCount integer array s__Multiboard_ColumnCount constant integer si__Button=$A integer si__Button_F=0 integer si__Button_I=0 integer array si__Button_V button array s__Button_an integer array s__Button_id string array s__Button_text integer array s__Button_key boolexpr array s__Button_c boolean array s__Button_isdis constant integer si__Dialog=$B integer si__Dialog_F=0 integer si__Dialog_I=0 integer array si__Dialog_V trigger array s__Dialog_trig boolexpr array s__Dialog_action dialog array s__Dialog_di integer array s__Dialog_vessel string array s__Dialog_text integer array s__Dialog_index boolean array s__Dialog_b boolean array s__Dialog_ON boolean array s__Dialog_dis timer array s__Dialog_tm integer array s__Dialog_t integer array s__Dialog_func constant integer si__itemcd=$C integer si__itemcd_F=0 integer si__itemcd_I=0 integer array si__itemcd_V item array s__itemcd_Item constant integer si__locationez=$D integer si__locationez_F=0 integer si__locationez_I=0 integer array si__locationez_V integer s__locationez_I=0 integer array s__locationez_V real array s__locationez_X real array s__locationez_Y real array s__locationez_Z integer array s__locationez_oO real array s__locationez_ang real array s__locationez_range real array s__locationez_hd integer array s__locationez_counter location s__locationez_Loc=Location(0,0) constant integer si__fog_table=$E integer si__fog_table_F=0 integer si__fog_table_I=0 integer array si__fog_table_V real array s__fog_table_zS real array s__fog_table_zE real array s__fog_table_f_r real array s__fog_table_f_g real array s__fog_table_f_b constant integer si__fog_rect=$F integer array s__fog_rect_t1 integer array s__fog_rect_t2 boolean array s__fog_rect_IsRound real array s__fog_rect_border real array s__fog_rect_f_L real array s__fog_rect_f_R real array s__fog_rect_f_D real array s__fog_rect_f_U real array s__fog_rect_centerX real array s__fog_rect_centerY real array s__fog_rect_RadMin real array s__fog_rect_RadMax constant real s__fog_rect_Be=6 integer s__fog_rect_Basis integer s__fog_rect_Current real s__fog_rect_hour_3 real s__fog_rect_hour_9 real s__fog_rect_hour_15 real s__fog_rect_hour_21 integer s__fog_rect_I=0 integer array s__fog_rect_V integer array s__fog_rect_last integer array s__fog_rect_next constant integer si__weather=16 rect array s__weather_r weathereffect array s__weather_we integer array s__weather_id real array s__weather_hour_stare real array s__weather_hour_end boolean array s__weather_enable integer s__weather_I=0 integer array s__weather_V integer array s__weather_F constant integer si__Effect=17 integer s__Effect_I=0 integer array s__Effect_V integer array s__Effect_lR effect array s__Effect_e boolean array s__Effect_mR boolean array s__Effect_MR constant integer si__barrage=18 integer si__barrage_F=0 integer si__barrage_I=0 integer array si__barrage_V integer array s__barrage_FL integer array s__barrage_FR boolean array s__barrage_InOperation boolean array s__barrage_outside boolean array s__barrage_finish integer array s__barrage_p1 integer array s__barrage_p2 group array s__barrage_enum_g unit array s__barrage_atkunit unit array s__barrage_target integer array s__barrage_model real array s__barrage_X real array s__barrage_Y real array s__barrage_Z real array s__barrage_course real array s__barrage_CollisionRange real array s__barrage_facing real array s__barrage_steering real array s__barrage_radian_a real array s__barrage_radian_z real array s__barrage_impact_z real array s__barrage_speed real array s__barrage_acceleration constant integer si__MissileTypeA=19 boolexpr array s__MissileTypeA_f1 boolexpr array s__MissileTypeA_f2 boolexpr array s__MissileTypeA_f3 integer s__MissileTypeA_Last_Missile=0 integer s__MissileTypeA_launcher integer s__MissileTypeA_func constant integer si__SoulMissile=20 integer array s__SoulMissile_Type boolexpr array s__SoulMissile_f1 boolexpr array s__SoulMissile_f2 boolexpr array s__SoulMissile_f3 integer s__SoulMissile_Last_Missile=0 integer s__SoulMissile_launcher integer s__SoulMissile_func constant integer si__unitseate_table=21 integer si__unitseate_table_F=0 integer si__unitseate_table_I=0 integer array si__unitseate_table_V real array s__unitseate_table_v integer array s__unitseate_table_L integer array s__unitseate_table_R constant integer si__drops_tabale=22 integer si__drops_tabale_F=0 integer si__drops_tabale_I=0 integer array si__drops_tabale_V integer array s__drops_tabale_tid integer array s__drops_tabale_index integer array s__drops_tabale_max real array s__drops_tabale_r_a real array s__drops_tabale_r_up real array s___drops_tabale_r_v constant integer s___drops_tabale_r_v_size=20 integer array s__drops_tabale_r_v integer array s___drops_tabale_r_id constant integer s___drops_tabale_r_id_size=20 integer array s__drops_tabale_r_id integer s__drops_tabale_tindex=0 constant integer si__Skills_Replace=25 integer si__Skills_Replace_F=0 integer si__Skills_Replace_I=0 integer array si__Skills_Replace_V integer array s__Skills_Replace_id integer array s__Skills_Replace_L integer array s__Skills_Replace_R constant integer si__suit=26 integer s__suit_Activated=0 boolean s__suit_IsActivate=false integer s__suit_Index=0 integer s__suit_V integer array s__suit_vessel boolexpr array s__suit_func integer array s__suit_num constant integer si__FrostBarrage=27 real array s__FrostBarrage_damage integer s__FrostBarrage_launcher=0 integer s__FrostBarrage_func constant integer si__poison=28 integer si__poison_F=0 integer si__poison_I=0 integer array si__poison_V integer s__poison_R integer array s__poison_count integer array s__poison_which integer array s__poison_targer real array s__poison_amount real array s__poison_maxtimed real array s__poison_retimed effect array s__poison_eff integer array s__poison_offset constant integer si__stel=29 constant integer s__stel_timedmax=$A boolean array s__stel_off integer array s__stel_timed constant integer si__sor3=30 constant integer s__sor3_hit_num_max=$E constant real s__sor3_duration=9 constant real s__sor3_CD=30 boolean array s__sor3_off integer array s__sor3_hit_num constant integer si__pgin=31 integer s__pgin_launcher=0 integer s__pgin_func real array s__pgin_amount boolean array s__pgin_off constant integer si__IceStorm=32 integer array s__IceStorm_vessel integer array s__IceStorm_num real array s__IceStorm_damage boolean array s__IceStorm_off integer s__IceStorm_launcher=0 integer s__IceStorm_func constant integer si__hcun=33 boolean array s__hcun_use boolean array s__hcun_off integer array s__hcun_vessel integer array s__hcun_atk real array s__hcun_ang integer array s__hcun_duration integer array s__hcun_bufflv integer array s__hcun_FL integer array s__hcun_FR constant real s__hcun_Angle=96 integer s__hcun_func=0 constant integer si__rat3=34 constant integer s__rat3_maxlv=$A timer array s__rat3_time integer array s__rat3_duration integer array s__rat3_source integer array s__rat3_lv constant integer si__glsk_list=35 integer si__glsk_list_F=0 integer si__glsk_list_I=0 integer array si__glsk_list_V integer array s__glsk_list_next integer array s__glsk_list_last real array s__glsk_list_damage integer array s__glsk_list_count constant integer si__glsk_hash=36 integer si__glsk_hash_F=0 integer si__glsk_hash_I=0 integer array si__glsk_hash_V constant integer s__glsk_hash_Max_size=$A integer array s__glsk_hash_vessel integer array s__glsk_hash_size constant integer si__glsk=37 constant real s__glsk_DamagePercent=20 constant real s__glsk_mdef_v=5 integer array s__glsk_List integer array s__glsk_Ht integer array s__glsk_mdef integer array s__glsk_time boolean array s__glsk_Use integer array s__glsk_FL integer array s__glsk_FR integer s__glsk_Func=0 constant integer si__HellDemon=38 integer array s__HellDemon_last integer array s__HellDemon_next integer s__HellDemon_func=0 integer array s__HellDemon_demon integer array s__HellDemon_summoner integer array s__HellDemon_num constant integer si__A0DW=39 integer array s__A0DW_soul_t integer array s__A0DW_soul_eff integer array s__A0DW_soul_model integer array s__A0DW_soul_timed real array s__A0DW_soul_life boolean array s__A0DW_soul_use integer array s__A0DW_FL integer array s__A0DW_FR integer s__A0DW_func=0 constant integer si__A0IN=40 integer array s__A0IN_count integer array s__A0IN_vessel integer s__A0IN_func constant integer si__A0II=41 integer array s__A0II_vessel integer s__A0II_func constant integer si__A0R0=42 sound s__A0R0_snd_SargerasLaugh=null integer array s__A0R0_buff_atk timer array s__A0R0_buff_timer integer array s__A0R0_buff_agi constant integer si__A0RL=43 constant real s__A0RL_Range=350 integer array s__A0RL_AuraUnit integer array s__A0RL_AuraModelA integer array s__A0RL_AuraModelB integer array s__A0RL_AuraDuration integer array s__A0RL_Aurabuff boolean array s__A0RL_AuraIsRemove integer array s__A0RL_FL integer array s__A0RL_FR timer array s__A0RL_bufftimer constant integer si__A0QT=44 integer s__A0QT_launcher integer s__A0QT_func real array s__A0QT_damage integer array s__A0QT_eff constant integer si__A0QR=45 integer s__A0QR_launcher integer s__A0QR_func constant integer si__A0C7=46 integer array s__A0C7_mdef integer array s__A0C7_count boolean array s__A0C7_use integer array s__A0C7_FL integer array s__A0C7_FR integer s__A0C7_func=0 constant integer si__Redemption=47 boolean array s__Redemption_is_sbch integer array s__Redemption_timed real array s__Redemption_cd boolean array s__Redemption_is_app integer array s__Redemption_FL integer array s__Redemption_FR integer s__Redemption_func=0 constant integer si__AubreyFurHats=48 boolean array s__AubreyFurHats_isbuff integer array s__AubreyFurHats_Int integer array s__AubreyFurHats_timed boolean array s__AubreyFurHats_use integer array s__AubreyFurHats_FL integer array s__AubreyFurHats_FR integer s__AubreyFurHats_func=0 constant integer si__rej4=49 integer array s__rej4_int integer array s__rej4_timed boolean array s__rej4_use integer array s__rej4_FR integer array s__rej4_FL integer s__rej4_func=0 constant integer si__bzbe=50 integer s__bzbe_launcher integer s__bzbe_func timer array s__bzbe_Tm constant integer si__I0CE=51 timer array s__I0CE_buff_tm integer array s__I0CE_bufflv integer array s__I0CE_atk constant integer si__odef=52 boolean array s__odef_Use integer array s__odef_FL integer array s__odef_FR integer s__odef_Func=0 sound s__odef_snd_ReviveNightElf=null integer array s__odef_Type_Id integer array s__odef_Source integer array s__odef_Atk_trig integer array s__odef_time integer array s__odef_count constant integer si__I092=53 timer array s__I092_Timer timer array s__I092_Buff constant integer si__I0D8=54 timer array s__I0D8_Timer timer array s__I0D8_Buff constant integer si__I0B2_table=55 integer si__I0B2_table_F=0 integer si__I0B2_table_I=0 integer array si__I0B2_table_V integer array s__I0B2_table_user integer array s__I0B2_table_trig_dg timer array s__I0B2_table_timer_dg timer array s__I0B2_table_timer_dt integer array s__I0B2_table_value_duration integer array s__I0B2_table_value_cd real array s__I0B2_table_value_ang real array s__I0B2_table_value_damage integer array s__I0B2_table_value_agi integer array s__I0B2_table_value_hp integer array s__I0B2_table_vessel integer array s__I0B2_table_v_size constant integer si__I0B2=56 integer array s__I0B2_Table constant integer si__I0B3=57 integer array s__I0B3_model timer array s__I0B3_time integer array s__I0B3_Lv timer array s__I0B3_buff_t integer array s__I0B3_buff_lv real array s__I0B3_buff_stat integer array s__I0B3_buff_str integer array s__I0B3_buff_agi integer array s__I0B3_buff_int constant integer si__I0CA=58 integer array s__I0CA_tak_trig timer array s__I0CA_buff_timer timer array s__I0CA_tak_timer boolean array s__I0CA_user_spell integer array s__I0CA_buff_int integer array s__I0CA_buff_textdis real array s__I0CA_tak_damage constant integer si__I0CO=59 integer array s__I0CO_atk_trig timer array s__I0CO_buff_timer boolean array s__I0CO_cooling_user integer array s__I0CO_charged_rate real array s__I0CO_charged_max real array s__I0CO_charged_value constant integer si__I0CR=60 integer array s__I0CR_Shield timer array s__I0CR_Time integer array s__I0CR_Count constant integer si__dsum=61 integer array s__dsum_Effect timer array s__dsum_Time constant integer si__kybl=62 constant integer s__kybl_unit_Int=$96 constant real s__kybl_unit_MATK=3 integer array s__kybl_spell_trig timer array s__kybl_buff_timer integer array s__kybl_buff_lv constant integer si__rde4=63 constant real s__rde4_unit_MATK=2 integer array s__rde4_spell_trig timer array s__rde4_buff_timer integer array s__rde4_buff_lv constant integer si__rde2=64 timer array s__rde2_time integer array s__rde2_atk_trig constant integer si__sclp=65 timer array s__sclp_buff_time integer array s__sclp_buff_mdef timer array s__sclp_time integer array s__sclp_model constant integer si__I06D=66 integer array s__I06D_shield_trig real array s__I06D_shield_life timer array s__I06D_time constant integer si__PhantomSword=67 integer array s__PhantomSword_last integer array s__PhantomSword_next integer array s__PhantomSword_vessel integer array s__PhantomSword_count integer array s__PhantomSword_cycle integer array s__PhantomSword_time integer s__PhantomSword_func constant integer si__Shadow_Storm=68 integer si__Shadow_Storm_F=0 integer si__Shadow_Storm_I=0 integer array si__Shadow_Storm_V integer array s__Shadow_Storm_id integer array s__Shadow_Storm_fb integer array s__Shadow_Storm_fx integer array s__Shadow_Storm_count integer array s__Shadow_Storm_L integer array s__Shadow_Storm_R constant integer si__SoulBoltBuff=69 integer array s__SoulBoltBuff_Source integer array s__SoulBoltBuff_Duration boolean array s__SoulBoltBuff_Use integer array s__SoulBoltBuff_Last integer array s__SoulBoltBuff_Next integer s__SoulBoltBuff_Func=0 constant integer si__SoulBolt=70 real array s__SoulBolt_damage integer s__SoulBolt_launcher integer s__SoulBolt_func constant integer si__AEim=71 integer array s__AEim_next integer array s__AEim_last boolean array s__AEim_Off integer array s__AEim_Timed integer s__AEim_func constant integer si__A08B=72 integer array s__A08B_next integer array s__A08B_last boolean array s__A08B_Off integer array s__A08B_Effect group array s__A08B_Group integer array s__A08B_Range real array s__A08B_Damage integer s__A08B_func constant integer si__A087=73 integer array s__A087_next integer array s__A087_last boolean array s__A087_use lightning array s__A087_lig integer array s__A087_count real array s__A087_Damage integer s__A087_func constant integer si__ACim=74 integer array s__ACim_next integer array s__ACim_last boolean array s__ACim_Off integer array s__ACim_Timed integer array s__ACim_HpRegen integer s__ACim_func constant integer si__Bleeding=75 integer si__Bleeding_F=0 integer si__Bleeding_I=0 integer array si__Bleeding_V integer array s__Bleeding_source integer array s__Bleeding_target integer array s__Bleeding_counts integer array s__Bleeding_duration real array s__Bleeding_damage constant integer si__SoulCharge=76 real array s__SoulCharge_CureValue integer array s__SoulCharge_Number integer array s__SoulCharge_MaxNumber integer array s__SoulCharge_SlotValue boolean s__SoulCharge_Off=true constant integer si__Soul=77 integer si__Soul_F=0 integer si__Soul_I=0 integer array si__Soul_V integer array s__Soul_Hero boolean array s__Soul_IsMove boolean array s__Soul_IsAbsorb unit array s__Soul_Unit integer array s__Soul_lifetime real array s__Soul_PointX real array s__Soul_PointY real array s__Soul_TargetX real array s__Soul_TargetY real array s__Soul_Value integer array s__Soul_last integer array s__Soul_next integer array s__Soul_Root integer array s__Soul_Last_Hero integer array s__Soul_Next_Hero integer s__Soul_rY=0 constant integer si__DeathOrb=78 real array s__DeathOrb_damage integer s__DeathOrb_launcher integer s__DeathOrb_func constant integer si__Blaze=79 integer array s__Blaze_damage_lv real array s__Blaze_damage integer s__Blaze_launcher integer s__Blaze_func constant integer si__SpellA0NP=80 integer array s__SpellA0NP_Unit integer array s__SpellA0NP_Eff integer array s__SpellA0NP_time real array s__SpellA0NP_damage integer s__SpellA0NP_func constant integer si__FlamerBreath=81 real array s__FlamerBreath_damage integer s__FlamerBreath_launcher integer s__FlamerBreath_func constant integer si__SpellA0NR=82 integer array s__SpellA0NR_Unit integer array s__SpellA0NR_Eff integer array s__SpellA0NR_Eff2 integer array s__SpellA0NR_time real array s__SpellA0NR_damage_a real array s__SpellA0NR_damage_b integer s__SpellA0NR_func constant integer si__WaterBombFX=83 integer array s__WaterBombFX_eff1 integer array s__WaterBombFX_eff2 integer array s__WaterBombFX_size boolean array s__WaterBombFX_bool_A0O0 real array s__WaterBombFX_damage real array s__WaterBombFX_damage2 integer s__WaterBombFX_launcher integer s__WaterBombFX_func constant integer si__WaterStreamFX=84 boolean array s__WaterStreamFX_bool_A0NV integer array s__WaterStreamFX_count real array s__WaterStreamFX_damage integer s__WaterStreamFX_launcher integer s__WaterStreamFX_func constant integer si__Cyclone=85 integer array s__Cyclone_Unit integer array s__Cyclone_eff_model integer array s__Cyclone_vessel integer array s__Cyclone_time real array s__Cyclone_damage constant real s__Cyclone_Range=400 integer s__Cyclone_func constant integer si__WindBlast=86 integer array s__WindBlast_count real array s__WindBlast_damage integer s__WindBlast_launcher integer s__WindBlast_func constant integer si__BigRock=87 integer array s__BigRock_eff real array s__BigRock_damage integer s__BigRock_launcher integer s__BigRock_func constant integer si__FireBall=88 real array s__FireBall_damage integer s__FireBall_launcher integer s__FireBall_func constant integer si__MeteorStrikeShard=89 integer array s__MeteorStrikeShard_count real array s__MeteorStrikeShard_damage integer s__MeteorStrikeShard_launcher integer s__MeteorStrikeShard_func constant integer si__IceShard=90 real array s__IceShard_damage integer s__IceShard_launcher integer s__IceShard_func constant integer si__SkillsA00W=91 integer si__SkillsA00W_F=0 integer si__SkillsA00W_I=0 integer array si__SkillsA00W_V integer array s__SkillsA00W_source integer array s__SkillsA00W_model boolean array s__SkillsA00W_bool timer array s__SkillsA00W_tm group array s__SkillsA00W_g integer array s__SkillsA00W_time real array s__SkillsA00W_damage real array s__SkillsA00W_rx real array s__SkillsA00W_ry integer array s__SkillsA00W_ano integer array s__SkillsA00W_F7 constant integer si__SkillsA00Y=92 integer si__SkillsA00Y_F=0 integer si__SkillsA00Y_I=0 integer array si__SkillsA00Y_V integer array s__SkillsA00Y_source integer array s__SkillsA00Y_target integer array s__SkillsA00Y_count group array s__SkillsA00Y_g real array s__SkillsA00Y_damage real array s__SkillsA00Y_tx real array s__SkillsA00Y_ty constant integer si__Illusion=93 integer array s__Illusion_Unit integer array s__Illusion_Time real array s__Illusion_X real array s__Illusion_Y integer array s__Illusion_last integer array s__Illusion_next integer s__Illusion_func constant integer si__Star=94 real array s__Star_damage integer s__Star_launcher integer s__Star_func constant integer si__ExplosiveArrow=95 real array s__ExplosiveArrow_damage integer s__ExplosiveArrow_launcher integer s__ExplosiveArrow_func constant integer si__ZephyrusProjectile=96 boolean array s__ZephyrusProjectile_bool boolean array s__ZephyrusProjectile_crit real array s__ZephyrusProjectile_damage integer s__ZephyrusProjectile_launcher integer s__ZephyrusProjectile_func constant integer si__WindField=97 integer si__WindField_F=0 integer si__WindField_I=0 integer array si__WindField_V integer array s__WindField_source integer array s__WindField_model integer array s__WindField_lv integer array s__WindField_spread integer array s__WindField_time real array s__WindField_range real array s__WindField_damage boolean array s__WindField_bool integer array s__WindField_last integer array s__WindField_next integer s__WindField_index=0 integer s__WindField_R=0 integer s__WindField_func=0 constant integer si__LightBreeze=98 integer array s__LightBreeze_vessel integer array s__LightBreeze_count integer array s__LightBreeze_number real array s__LightBreeze_vx real array s__LightBreeze_vy integer s__LightBreeze_launcher integer s__LightBreeze_func constant integer si__FlameShot=99 integer array s__FlameShot_eff boolean array s__FlameShot_bool real array s__FlameShot_damage integer s__FlameShot_launcher integer s__FlameShot_func constant integer si__A0QN=100 integer array s__A0QN_eff integer array s__A0QN_count real array s__A0QN_damage integer s__A0QN_launcher integer s__A0QN_func constant integer si__MagicBallista=101 real array s__MagicBallista_damage integer s__MagicBallista_launcher integer s__MagicBallista_func constant integer si__HuanYing=102 real array s__HuanYing_px real array s__HuanYing_py real array s__HuanYing_pz real array s__HuanYing_pa integer array s__HuanYing_end integer array s__HuanYing_id integer array s__HuanYing_vessel integer array s__HuanYing_count timer array s__HuanYing_tm boolean array s__HuanYing_use constant integer si__A0YA=103 boolean array s__A0YA_use integer array s__A0YA_v integer array s__A0YA_index real array s__A0YA_ange integer array s__A0YA_last integer array s__A0YA_next integer s__A0YA_func=0 constant integer si__A0YC=104 integer si__A0YC_F=0 integer si__A0YC_I=0 integer array si__A0YC_V integer array s__A0YC_id integer array s__A0YC_order integer array s__A0YC_target real array s__A0YC_px real array s__A0YC_py real array s__A0YC_c integer array s__A0YC_v boolean array s__A0YC_bool integer array s__A0YC_root integer array s__A0YC_last integer array s__A0YC_next integer array s__A0YC_data constant integer si__formula=105 integer s__formula_Index=0 integer array s__formula_wG integer array s__formula_WG integer array s__formula_yG integer array s__formula_YG constant integer si__Quest__questdrops_tabale=106 integer si__Quest__questdrops_tabale_F=0 integer si__Quest__questdrops_tabale_I=0 integer array si__Quest__questdrops_tabale_V integer array s__Quest__questdrops_tabale_index real array s___Quest__questdrops_tabale_t constant integer s___Quest__questdrops_tabale_t_size=5 integer array s__Quest__questdrops_tabale_t integer array s___Quest__questdrops_tabale_id constant integer s___Quest__questdrops_tabale_id_size=5 integer array s__Quest__questdrops_tabale_id constant integer si__LavaBomb=109 unit array s__LavaBomb_atkunit boolean array s__LavaBomb_isBag integer array s__LavaBomb_f integer array s__LavaBomb_b real array s__LavaBomb_t integer s__LavaBomb_func constant integer si__cs_table=110 integer si__cs_table_F=0 integer si__cs_table_I=0 integer array si__cs_table_V integer array s__cs_table_Lv real array s__cs_table_X real array s__cs_table_Y integer array si__barrage_type trigger array st__barrage_onDestroy integer array si__I0B2_table_type trigger array st__I0B2_table_onDestroy trigger st__Multiboard_onDestroy trigger st__Button_onDestroy trigger st__Dialog_onDestroy trigger st__PhantomSword_AddNumber trigger st__Shadow_Storm_enum trigger st__Illusion_getunit trigger st__A0YC_randenum trigger array st___prototype3 trigger array st___prototype6 integer f__result_integer trigger array st___prototype7 trigger array st___prototype8 trigger array st___prototype10 trigger array st___prototype15 boolean f__result_boolean trigger array st___prototype23 trigger array st___prototype46 trigger array st___prototype62 trigger array st___prototype89 trigger array st___prototype100 trigger array st___prototype111 trigger array st___prototype151 real f__result_real trigger array st___prototype163 trigger array st___prototype177 trigger array st___prototype195 trigger array st___prototype200 trigger array st___prototype202 trigger array st___prototype205 trigger array st___prototype234 trigger array st___prototype246 trigger array st___prototype266 trigger array st___prototype269 trigger array st___prototype271 integer f__arg_integer1 integer f__arg_integer2 integer f__arg_integer3 real f__arg_real1 real f__arg_real2 player f__arg_player1 code f__arg_code1 unit f__arg_unit1 unit f__arg_unit2 boolexpr f__arg_boolexpr1 boolean f__arg_boolean1 item f__arg_item1 integer f__arg_this unit f__result_unit gamecache gamecache001=InitGameCache("4head") trigger trigger053=CreateTrigger() trigger trigger054=CreateTrigger() trigger trigger055=CreateTrigger() trigger trigger056=CreateTrigger() trigger trigger057=CreateTrigger() trigger trigger058=CreateTrigger() trigger trigger059=CreateTrigger() string string006="-load " force force001=CreateForce() force force002=CreateForce() group group016=CreateGroup() string array strings036 integer array integers2557 integer array integers2558 string string007 integer integer1142=0 integer integer1143=0 integer integer1144=0 integer integer1145=0 trigger trigger060 string string008 real real279=0 real real280=0 real real281=0 real real282=0 rect rect063 real real283 endglobals native UnitAlive takes unit u returns boolean //polygon allocate / deallocate function s__polygon__allocate takes nothing returns integer local integer this = si__polygon_F if this != 0 then set si__polygon_F = si__polygon_V[this] else set si__polygon_I=si__polygon_I+1 set this=si__polygon_I endif if(this>80)then return 0 endif set s__polygon_X[this]=(this-1)*100 set s__polygon_Y[this]=(this-1)*100 set si__polygon_V[this]=-1 return this endfunction function s__polygon_deallocate takes integer this returns nothing if this==null then return elseif(si__polygon_V[this]!=-1)then return endif set si__polygon_V[this]=si__polygon_F set si__polygon_F=this endfunction //cs table allocate / deallocate function s__cs_table__allocate takes nothing returns integer local integer this=si__cs_table_F if(this!=0)then set si__cs_table_F=si__cs_table_V[this] else set si__cs_table_I=si__cs_table_I+1 set this=si__cs_table_I endif if(this>8190)then return 0 endif set si__cs_table_V[this]=-1 return this endfunction function s__cs_table_deallocate takes integer this returns nothing if this==null then return elseif(si__cs_table_V[this]!=-1)then return endif set si__cs_table_V[this]=si__cs_table_F set si__cs_table_F=this endfunction //quest qest drops table allocate / deallocate //"tabale" function s__Quest__questdrops_tabale__allocate takes nothing returns integer local integer this=si__Quest__questdrops_tabale_F if(this!=0)then set si__Quest__questdrops_tabale_F=si__Quest__questdrops_tabale_V[this] else set si__Quest__questdrops_tabale_I=si__Quest__questdrops_tabale_I+1 set this=si__Quest__questdrops_tabale_I endif if(this>$665)then return 0 endif set s__Quest__questdrops_tabale_t[this]=(this-1)*5 set s__Quest__questdrops_tabale_id[this]=(this-1)*5 set s__Quest__questdrops_tabale_index[this]=0 set si__Quest__questdrops_tabale_V[this]=-1 return this endfunction function s__Quest__questdrops_tabale_deallocate takes integer this returns nothing if this==null then return elseif(si__Quest__questdrops_tabale_V[this]!=-1)then return endif set si__Quest__questdrops_tabale_V[this]=si__Quest__questdrops_tabale_F set si__Quest__questdrops_tabale_F=this endfunction //c A0YC random number function sc__A0YC_randenum takes integer this,integer vessel,real x,real y,player p returns nothing set f__arg_this=this set f__arg_integer1=vessel set f__arg_real1=x set f__arg_real2=y set f__arg_player1=p call TriggerEvaluate(st__A0YC_randenum) endfunction //A0YC allocate / deallocate function s__A0YC__allocate takes nothing returns integer local integer this=si__A0YC_F if(this!=0)then set si__A0YC_F=si__A0YC_V[this] else set si__A0YC_I=si__A0YC_I+1 set this=si__A0YC_I endif if(this>8190)then return 0 endif set si__A0YC_V[this]=-1 return this endfunction function s__A0YC_deallocate takes integer this returns nothing if this==null then return elseif(si__A0YC_V[this]!=-1)then return endif set si__A0YC_V[this]=si__A0YC_F set si__A0YC_F=this endfunction //Trig allocate / deallocate function s__Trig__allocate takes nothing returns integer local integer this=si__Trig_F if(this!=0)then set si__Trig_F=si__Trig_V[this] else set si__Trig_I=si__Trig_I+1 set this=si__Trig_I endif if(this>8190)then return 0 endif set s__Trig_trig[this]=CreateTrigger() set si__Trig_V[this]=-1 return this endfunction function s__Trig_deallocate takes integer this returns nothing if this==null then return elseif(si__Trig_V[this]!=-1)then return endif set si__Trig_V[this]=si__Trig_F set si__Trig_F=this endfunction //WindField allocate / deallocate function s__WindField__allocate takes nothing returns integer local integer this=si__WindField_F if(this!=0)then set si__WindField_F=si__WindField_V[this] else set si__WindField_I=si__WindField_I+1 set this=si__WindField_I endif if(this>8190)then return 0 endif set si__WindField_V[this]=-1 return this endfunction function s__WindField_deallocate takes integer this returns nothing if this==null then return elseif(si__WindField_V[this]!=-1)then return endif set si__WindField_V[this]=si__WindField_F set si__WindField_F=this endfunction //BezierCurve allocate / deallocate function s__BezierCurve__allocate takes nothing returns integer local integer this=si__BezierCurve_F if(this!=0)then set si__BezierCurve_F=si__BezierCurve_V[this] else set si__BezierCurve_I=si__BezierCurve_I+1 set this=si__BezierCurve_I endif if(this>8190)then return 0 endif set si__BezierCurve_V[this]=-1 return this endfunction function s__BezierCurve_deallocate takes integer this returns nothing if this==null then return elseif(si__BezierCurve_V[this]!=-1)then return endif set si__BezierCurve_V[this]=si__BezierCurve_F set si__BezierCurve_F=this endfunction //Sound List allocate / deallocate function s__Sound_list__allocate takes nothing returns integer local integer this=si__Sound_list_F if(this!=0)then set si__Sound_list_F=si__Sound_list_V[this] else set si__Sound_list_I=si__Sound_list_I+1 set this=si__Sound_list_I endif if(this>8190)then return 0 endif set s__Sound_list_volume[this]=$7F set s__Sound_list_pitch[this]=1 set si__Sound_list_V[this]=-1 return this endfunction function s__Sound_list_deallocate takes integer this returns nothing if this==null then return elseif(si__Sound_list_V[this]!=-1)then return endif set si__Sound_list_V[this]=si__Sound_list_F set si__Sound_list_F=this endfunction //c_Illusion get unit function sc__Illusion_getunit takes integer this returns unit set f__arg_integer1=this call TriggerEvaluate(st__Illusion_getunit) return f__result_unit endfunction //skills A00Y allocate / deallocate function s__SkillsA00Y__allocate takes nothing returns integer local integer this=si__SkillsA00Y_F if(this!=0)then set si__SkillsA00Y_F=si__SkillsA00Y_V[this] else set si__SkillsA00Y_I=si__SkillsA00Y_I+1 set this=si__SkillsA00Y_I endif if(this>8190)then return 0 endif set si__SkillsA00Y_V[this]=-1 return this endfunction function s__SkillsA00Y_deallocate takes integer this returns nothing if this==null then return elseif(si__SkillsA00Y_V[this]!=-1)then return endif set si__SkillsA00Y_V[this]=si__SkillsA00Y_F set si__SkillsA00Y_F=this endfunction //skills A00W allocate / deallocate function s__SkillsA00W__allocate takes nothing returns integer local integer this=si__SkillsA00W_F if(this!=0)then set si__SkillsA00W_F=si__SkillsA00W_V[this] else set si__SkillsA00W_I=si__SkillsA00W_I+1 set this=si__SkillsA00W_I endif if(this>8190)then return 0 endif set si__SkillsA00W_V[this]=-1 return this endfunction function s__SkillsA00W_deallocate takes integer this returns nothing if this==null then return elseif(si__SkillsA00W_V[this]!=-1)then return endif set si__SkillsA00W_V[this]=si__SkillsA00W_F set si__SkillsA00W_F=this endfunction //Multiboard allocate / deallocate + on destroy() function sc__Multiboard_onDestroy takes integer this returns nothing set f__arg_this=this call TriggerEvaluate(st__Multiboard_onDestroy) endfunction function s__Multiboard__allocate takes nothing returns integer local integer this=si__Multiboard_F if(this!=0)then set si__Multiboard_F=si__Multiboard_V[this] else set si__Multiboard_I=si__Multiboard_I+1 set this=si__Multiboard_I endif if(this>8190)then return 0 endif set si__Multiboard_V[this]=-1 return this endfunction function sc__Multiboard_deallocate takes integer this returns nothing if this==null then return elseif(si__Multiboard_V[this]!=-1)then return endif set f__arg_this=this call TriggerEvaluate(st__Multiboard_onDestroy) set si__Multiboard_V[this]=si__Multiboard_F set si__Multiboard_F=this endfunction //Button allocate / deallocate + on destroy function sc__Button_onDestroy takes integer this returns nothing if s__Button_an[this]!=null then call RemoveSavedInteger(BYHT2,system_Dialog__fO,GetHandleId(s__Button_an[this])) set s__Button_an[this]=null endif if s__Button_c[this]!=null then call DestroyBoolExpr(s__Button_c[this]) set s__Button_c[this]=null endif endfunction function s__Button__allocate takes nothing returns integer local integer this=si__Button_F if(this!=0)then set si__Button_F=si__Button_V[this] else set si__Button_I=si__Button_I+1 set this=si__Button_I endif if(this>8190)then return 0 endif set s__Button_id[this]=0 set s__Button_isdis[this]=true set si__Button_V[this]=-1 return this endfunction function sc__Button_deallocate takes integer this returns nothing if this==null then return elseif(si__Button_V[this]!=-1)then return endif set f__arg_this=this call TriggerEvaluate(st__Button_onDestroy) set si__Button_V[this]=si__Button_F set si__Button_F=this endfunction //Dialog allocate / deallocate + on destroy function sc__Dialog_onDestroy takes integer this returns nothing set f__arg_this=this call TriggerEvaluate(st__Dialog_onDestroy) endfunction function s__Dialog__allocate takes nothing returns integer local integer this=si__Dialog_F if(this!=0)then set si__Dialog_F=si__Dialog_V[this] else set si__Dialog_I=si__Dialog_I+1 set this=si__Dialog_I endif if(this>8190)then return 0 endif set s__Dialog_trig[this]=CreateTrigger() set s__Dialog_di[this]=DialogCreate() set s__Dialog_b[this]=true set s__Dialog_ON[this]=true set si__Dialog_V[this]=-1 return this endfunction function sc__Dialog_deallocate takes integer this returns nothing if this==null then return elseif(si__Dialog_V[this]!=-1)then return endif set f__arg_this=this call TriggerEvaluate(st__Dialog_onDestroy) set si__Dialog_V[this]=si__Dialog_F set si__Dialog_F=this endfunction // item cd allocate / deallocate function s__itemcd__allocate takes nothing returns integer local integer this=si__itemcd_F if(this!=0)then set si__itemcd_F=si__itemcd_V[this] else set si__itemcd_I=si__itemcd_I+1 set this=si__itemcd_I endif if(this>8190)then return 0 endif set si__itemcd_V[this]=-1 return this endfunction function s__itemcd_deallocate takes integer this returns nothing if this==null then return elseif(si__itemcd_V[this]!=-1)then return endif set si__itemcd_V[this]=si__itemcd_F set si__itemcd_F=this endfunction //locationeZ allocate / deallocate function s__locationez__allocate takes nothing returns integer local integer this=si__locationez_F if(this!=0)then set si__locationez_F=si__locationez_V[this] else set si__locationez_I=si__locationez_I+1 set this=si__locationez_I endif if(this>8190)then return 0 endif set si__locationez_V[this]=-1 return this endfunction function s__locationez_deallocate takes integer this returns nothing if this==null then return elseif(si__locationez_V[this]!=-1)then return endif set si__locationez_V[this]=si__locationez_F set si__locationez_F=this endfunction //fog table allocate / deallocate function s__fog_table__allocate takes nothing returns integer local integer this=si__fog_table_F if(this!=0)then set si__fog_table_F=si__fog_table_V[this] else set si__fog_table_I=si__fog_table_I+1 set this=si__fog_table_I endif if(this>8190)then return 0 endif set si__fog_table_V[this]=-1 return this endfunction function s__fog_table_deallocate takes integer this returns nothing if this==null then return elseif(si__fog_table_V[this]!=-1)then return endif set si__fog_table_V[this]=si__fog_table_F set si__fog_table_F=this endfunction //barrage allocate / deallocate function s__barrage__allocate takes nothing returns integer local integer this=si__barrage_F if(this!=0)then set si__barrage_F=si__barrage_V[this] else set si__barrage_I=si__barrage_I+1 set this=si__barrage_I endif if(this>8190)then return 0 endif set si__barrage_type[this]=18 set si__barrage_V[this]=-1 return this endfunction function sc__barrage_deallocate takes integer this returns nothing if this==null then return elseif(si__barrage_V[this]!=-1)then return endif set f__arg_this=this call TriggerEvaluate(st__barrage_onDestroy[si__barrage_type[this]]) set si__barrage_V[this]=si__barrage_F set si__barrage_F=this endfunction function s__Soul__allocate takes nothing returns integer local integer this=si__Soul_F if(this!=0)then set si__Soul_F=si__Soul_V[this] else set si__Soul_I=si__Soul_I+1 set this=si__Soul_I endif if(this>8190)then return 0 endif set si__Soul_V[this]=-1 return this endfunction function s__Soul_deallocate takes integer this returns nothing if this==null then return elseif(si__Soul_V[this]!=-1)then return endif set si__Soul_V[this]=si__Soul_F set si__Soul_F=this endfunction function s__Bleeding__allocate takes nothing returns integer local integer this=si__Bleeding_F if(this!=0)then set si__Bleeding_F=si__Bleeding_V[this] else set si__Bleeding_I=si__Bleeding_I+1 set this=si__Bleeding_I endif if(this>8190)then return 0 endif set si__Bleeding_V[this]=-1 return this endfunction function s__Bleeding_deallocate takes integer this returns nothing if this==null then return elseif(si__Bleeding_V[this]!=-1)then return endif set si__Bleeding_V[this]=si__Bleeding_F set si__Bleeding_F=this endfunction function s__SoulBolt__allocate takes nothing returns integer local integer this=s__barrage__allocate() local integer kthis if(this==0)then return 0 endif set si__barrage_type[this]=70 set kthis=this return this endfunction function sc__Shadow_Storm_enum takes integer this,integer f returns nothing set f__arg_this=this set f__arg_integer1=f call TriggerEvaluate(st__Shadow_Storm_enum) endfunction function s__Shadow_Storm__allocate takes nothing returns integer local integer this=si__Shadow_Storm_F if(this!=0)then set si__Shadow_Storm_F=si__Shadow_Storm_V[this] else set si__Shadow_Storm_I=si__Shadow_Storm_I+1 set this=si__Shadow_Storm_I endif if(this>8190)then return 0 endif set si__Shadow_Storm_V[this]=-1 return this endfunction function s__Shadow_Storm_deallocate takes integer this returns nothing if this==null then return elseif(si__Shadow_Storm_V[this]!=-1)then return endif set si__Shadow_Storm_V[this]=si__Shadow_Storm_F set si__Shadow_Storm_F=this endfunction function sc__PhantomSword_AddNumber takes integer this,integer i returns nothing set f__arg_this=this set f__arg_integer1=i call TriggerEvaluate(st__PhantomSword_AddNumber) endfunction function s__MissileTypeA__allocate takes nothing returns integer local integer this=s__barrage__allocate() local integer kthis if(this==0)then return 0 endif set si__barrage_type[this]=19 set kthis=this return this endfunction function s__I0B2_table__allocate takes nothing returns integer local integer this=si__I0B2_table_F if(this!=0)then set si__I0B2_table_F=si__I0B2_table_V[this] else set si__I0B2_table_I=si__I0B2_table_I+1 set this=si__I0B2_table_I endif if(this>8190)then return 0 endif set si__I0B2_table_type[this]=55 set si__I0B2_table_V[this]=-1 return this endfunction function sc__I0B2_table_deallocate takes integer this returns nothing if this==null then return elseif(si__I0B2_table_V[this]!=-1)then return endif set f__arg_this=this call TriggerEvaluate(st__I0B2_table_onDestroy[si__I0B2_table_type[this]]) set si__I0B2_table_V[this]=si__I0B2_table_F set si__I0B2_table_F=this endfunction function s__bzbe__allocate takes nothing returns integer local integer this=s__barrage__allocate() local integer kthis if(this==0)then return 0 endif set si__barrage_type[this]=50 set kthis=this return this endfunction function s__A0QR__allocate takes nothing returns integer local integer this=s__barrage__allocate() local integer kthis if(this==0)then return 0 endif set si__barrage_type[this]=45 set kthis=this return this endfunction function s__A0QT__allocate takes nothing returns integer local integer this=s__barrage__allocate() local integer kthis if(this==0)then return 0 endif set si__barrage_type[this]=44 set kthis=this return this endfunction function s__glsk_hash__allocate takes nothing returns integer local integer this=si__glsk_hash_F if(this!=0)then set si__glsk_hash_F=si__glsk_hash_V[this] else set si__glsk_hash_I=si__glsk_hash_I+1 set this=si__glsk_hash_I endif if(this>8190)then return 0 endif set s__glsk_hash_size[this]=0 set si__glsk_hash_V[this]=-1 return this endfunction function s__glsk_hash_deallocate takes integer this returns nothing if this==null then return elseif(si__glsk_hash_V[this]!=-1)then return endif set si__glsk_hash_V[this]=si__glsk_hash_F set si__glsk_hash_F=this endfunction function s__glsk_list__allocate takes nothing returns integer local integer this=si__glsk_list_F if(this!=0)then set si__glsk_list_F=si__glsk_list_V[this] else set si__glsk_list_I=si__glsk_list_I+1 set this=si__glsk_list_I endif if(this>8190)then return 0 endif set si__glsk_list_V[this]=-1 return this endfunction function s__glsk_list_deallocate takes integer this returns nothing if this==null then return elseif(si__glsk_list_V[this]!=-1)then return endif set si__glsk_list_V[this]=si__glsk_list_F set si__glsk_list_F=this endfunction function s__IceStorm__allocate takes nothing returns integer local integer this=s__barrage__allocate() local integer kthis if(this==0)then return 0 endif set si__barrage_type[this]=32 set kthis=this return this endfunction function s__pgin__allocate takes nothing returns integer local integer this=s__barrage__allocate() local integer kthis if(this==0)then return 0 endif set si__barrage_type[this]=31 set kthis=this return this endfunction function s__poison__allocate takes nothing returns integer local integer this=si__poison_F if(this!=0)then set si__poison_F=si__poison_V[this] else set si__poison_I=si__poison_I+1 set this=si__poison_I endif if(this>8190)then return 0 endif set si__poison_V[this]=-1 return this endfunction function s__poison_deallocate takes integer this returns nothing if this==null then return elseif(si__poison_V[this]!=-1)then return endif set si__poison_V[this]=si__poison_F set si__poison_F=this endfunction function s__FrostBarrage__allocate takes nothing returns integer local integer this=s__barrage__allocate() local integer kthis if(this==0)then return 0 endif set si__barrage_type[this]=27 set kthis=this return this endfunction function s__Skills_Replace__allocate takes nothing returns integer local integer this=si__Skills_Replace_F if(this!=0)then set si__Skills_Replace_F=si__Skills_Replace_V[this] else set si__Skills_Replace_I=si__Skills_Replace_I+1 set this=si__Skills_Replace_I endif if(this>8190)then return 0 endif set si__Skills_Replace_V[this]=-1 return this endfunction function s__Skills_Replace_deallocate takes integer this returns nothing if this==null then return elseif(si__Skills_Replace_V[this]!=-1)then return endif set si__Skills_Replace_V[this]=si__Skills_Replace_F set si__Skills_Replace_F=this endfunction function s__drops_tabale__allocate takes nothing returns integer local integer this=si__drops_tabale_F if(this!=0)then set si__drops_tabale_F=si__drops_tabale_V[this] else set si__drops_tabale_I=si__drops_tabale_I+1 set this=si__drops_tabale_I endif if(this>408)then return 0 endif set s__drops_tabale_r_v[this]=(this-1)*20 set s__drops_tabale_r_id[this]=(this-1)*20 set s__drops_tabale_index[this]=0 set s__drops_tabale_max[this]=0 set si__drops_tabale_V[this]=-1 return this endfunction function s__drops_tabale_deallocate takes integer this returns nothing if this==null then return elseif(si__drops_tabale_V[this]!=-1)then return endif set si__drops_tabale_V[this]=si__drops_tabale_F set si__drops_tabale_F=this endfunction function s__unitseate_table__allocate takes nothing returns integer local integer this=si__unitseate_table_F if(this!=0)then set si__unitseate_table_F=si__unitseate_table_V[this] else set si__unitseate_table_I=si__unitseate_table_I+1 set this=si__unitseate_table_I endif if(this>8190)then return 0 endif set si__unitseate_table_V[this]=-1 return this endfunction function s__unitseate_table_deallocate takes integer this returns nothing if this==null then return elseif(si__unitseate_table_V[this]!=-1)then return endif set si__unitseate_table_V[this]=si__unitseate_table_F set si__unitseate_table_F=this endfunction function s__SoulMissile__allocate takes nothing returns integer local integer this=s__barrage__allocate() local integer kthis if(this==0)then return 0 endif set si__barrage_type[this]=20 set kthis=this return this endfunction function s__MagicBallista__allocate takes nothing returns integer local integer this=s__barrage__allocate() local integer kthis if(this==0)then return 0 endif set si__barrage_type[this]=101 set kthis=this return this endfunction function s__I0B2__allocate takes nothing returns integer local integer this=s__I0B2_table__allocate() local integer kthis if(this==0)then return 0 endif set si__I0B2_table_type[this]=56 set kthis=this return this endfunction function s__DeathOrb__allocate takes nothing returns integer local integer this=s__barrage__allocate() local integer kthis if(this==0)then return 0 endif set si__barrage_type[this]=78 set kthis=this return this endfunction function s__Blaze__allocate takes nothing returns integer local integer this=s__barrage__allocate() local integer kthis if(this==0)then return 0 endif set si__barrage_type[this]=79 set kthis=this return this endfunction function s__FlamerBreath__allocate takes nothing returns integer local integer this=s__barrage__allocate() local integer kthis if(this==0)then return 0 endif set si__barrage_type[this]=81 set kthis=this return this endfunction function s__WaterBombFX__allocate takes nothing returns integer local integer this=s__barrage__allocate() local integer kthis if(this==0)then return 0 endif set si__barrage_type[this]=83 set kthis=this return this endfunction function s__WaterStreamFX__allocate takes nothing returns integer local integer this=s__barrage__allocate() local integer kthis if(this==0)then return 0 endif set si__barrage_type[this]=84 set kthis=this return this endfunction function s__WindBlast__allocate takes nothing returns integer local integer this=s__barrage__allocate() local integer kthis if(this==0)then return 0 endif set si__barrage_type[this]=86 set kthis=this return this endfunction function s__BigRock__allocate takes nothing returns integer local integer this=s__barrage__allocate() local integer kthis if(this==0)then return 0 endif set si__barrage_type[this]=87 set kthis=this return this endfunction function s__FireBall__allocate takes nothing returns integer local integer this=s__barrage__allocate() local integer kthis if(this==0)then return 0 endif set si__barrage_type[this]=88 set kthis=this return this endfunction function s__MeteorStrikeShard__allocate takes nothing returns integer local integer this=s__barrage__allocate() local integer kthis if(this==0)then return 0 endif set si__barrage_type[this]=89 set kthis=this return this endfunction function s__IceShard__allocate takes nothing returns integer local integer this=s__barrage__allocate() local integer kthis if(this==0)then return 0 endif set si__barrage_type[this]=90 set kthis=this return this endfunction function s__Star__allocate takes nothing returns integer local integer this=s__barrage__allocate() local integer kthis if(this==0)then return 0 endif set si__barrage_type[this]=94 set kthis=this return this endfunction function s__ExplosiveArrow__allocate takes nothing returns integer local integer this=s__barrage__allocate() local integer kthis if(this==0)then return 0 endif set si__barrage_type[this]=95 set kthis=this return this endfunction function s__ZephyrusProjectile__allocate takes nothing returns integer local integer this=s__barrage__allocate() local integer kthis if(this==0)then return 0 endif set si__barrage_type[this]=96 set kthis=this return this endfunction function s__LightBreeze__allocate takes nothing returns integer local integer this=s__barrage__allocate() local integer kthis if(this==0)then return 0 endif set si__barrage_type[this]=98 set kthis=this return this endfunction function s__FlameShot__allocate takes nothing returns integer local integer this=s__barrage__allocate() local integer kthis if(this==0)then return 0 endif set si__barrage_type[this]=99 set kthis=this return this endfunction function s__A0QN__allocate takes nothing returns integer local integer this=s__barrage__allocate() local integer kthis if(this==0)then return 0 endif set si__barrage_type[this]=100 set kthis=this return this endfunction //END ALLOC / DEALLOC // EXECUTE + EVALUATES function sc___prototype3_execute takes integer i,integer a1 returns nothing set f__arg_integer1=a1 call TriggerExecute(st___prototype3[i]) endfunction function sc___prototype3_evaluate takes integer i,integer a1 returns nothing set f__arg_integer1=a1 call TriggerEvaluate(st___prototype3[i]) endfunction function sc___prototype6_execute takes integer i,integer a1,real a2,real a3 returns nothing set f__arg_integer1=a1 set f__arg_real1=a2 set f__arg_real2=a3 call TriggerExecute(st___prototype6[i]) endfunction function sc___prototype6_evaluate takes integer i,integer a1,real a2,real a3 returns integer set f__arg_integer1=a1 set f__arg_real1=a2 set f__arg_real2=a3 call TriggerEvaluate(st___prototype6[i]) return f__result_integer endfunction function sc___prototype7_execute takes integer i returns nothing call TriggerExecute(st___prototype7[i]) endfunction function sc___prototype7_evaluate takes integer i returns nothing call TriggerEvaluate(st___prototype7[i]) endfunction function sc___prototype8_execute takes integer i,integer a1,integer a2 returns nothing set f__arg_integer1=a1 set f__arg_integer2=a2 call TriggerExecute(st___prototype8[i]) endfunction function sc___prototype8_evaluate takes integer i,integer a1,integer a2 returns nothing set f__arg_integer1=a1 set f__arg_integer2=a2 call TriggerEvaluate(st___prototype8[i]) endfunction function sc___prototype10_execute takes integer i,integer a1,integer a2 returns nothing set f__arg_integer1=a1 set f__arg_integer2=a2 call TriggerExecute(st___prototype10[i]) endfunction function sc___prototype10_evaluate takes integer i,integer a1,integer a2 returns integer set f__arg_integer1=a1 set f__arg_integer2=a2 call TriggerEvaluate(st___prototype10[i]) return f__result_integer endfunction function sc___prototype15_execute takes integer i,integer a1 returns nothing set f__arg_integer1=a1 call TriggerExecute(st___prototype15[i]) endfunction function sc___prototype15_evaluate takes integer i,integer a1 returns boolean set f__arg_integer1=a1 call TriggerEvaluate(st___prototype15[i]) return f__result_boolean endfunction function sc___prototype23_execute takes integer i returns nothing call TriggerExecute(st___prototype23[i]) endfunction function sc___prototype23_evaluate takes integer i returns boolean call TriggerEvaluate(st___prototype23[i]) return f__result_boolean endfunction function sc___prototype46_execute takes integer i,integer a1,integer a2,integer a3 returns nothing set f__arg_integer1=a1 set f__arg_integer2=a2 set f__arg_integer3=a3 call TriggerExecute(st___prototype46[i]) endfunction function sc___prototype46_evaluate takes integer i,integer a1,integer a2,integer a3 returns nothing set f__arg_integer1=a1 set f__arg_integer2=a2 set f__arg_integer3=a3 call TriggerEvaluate(st___prototype46[i]) endfunction function sc___prototype62_execute takes integer i,integer a1,code a2 returns nothing set f__arg_integer1=a1 set f__arg_code1=a2 call TriggerExecute(st___prototype62[i]) endfunction function sc___prototype62_evaluate takes integer i,integer a1,code a2 returns nothing set f__arg_integer1=a1 set f__arg_code1=a2 call TriggerEvaluate(st___prototype62[i]) endfunction function sc___prototype89_execute takes integer i,unit a1 returns nothing set f__arg_unit1=a1 call TriggerExecute(st___prototype89[i]) endfunction function sc___prototype89_evaluate takes integer i,unit a1 returns boolean set f__arg_unit1=a1 call TriggerEvaluate(st___prototype89[i]) return f__result_boolean endfunction function sc___prototype100_execute takes integer i,unit a1,integer a2 returns nothing set f__arg_unit1=a1 set f__arg_integer1=a2 call TriggerExecute(st___prototype100[i]) endfunction function sc___prototype100_evaluate takes integer i,unit a1,integer a2 returns nothing set f__arg_unit1=a1 set f__arg_integer1=a2 call TriggerEvaluate(st___prototype100[i]) endfunction function sc___prototype111_execute takes integer i,unit a1 returns nothing set f__arg_unit1=a1 call TriggerExecute(st___prototype111[i]) endfunction function sc___prototype111_evaluate takes integer i,unit a1 returns nothing set f__arg_unit1=a1 call TriggerEvaluate(st___prototype111[i]) endfunction function sc___prototype151_execute takes integer i,integer a1 returns nothing set f__arg_integer1=a1 call TriggerExecute(st___prototype151[i]) endfunction function sc___prototype151_evaluate takes integer i,integer a1 returns real set f__arg_integer1=a1 call TriggerEvaluate(st___prototype151[i]) return f__result_real endfunction function sc___prototype163_execute takes integer i,integer a1,boolexpr a2 returns nothing set f__arg_integer1=a1 set f__arg_boolexpr1=a2 call TriggerExecute(st___prototype163[i]) endfunction function sc___prototype163_evaluate takes integer i,integer a1,boolexpr a2 returns integer set f__arg_integer1=a1 set f__arg_boolexpr1=a2 call TriggerEvaluate(st___prototype163[i]) return f__result_integer endfunction function sc___prototype177_execute takes integer i,unit a1,unit a2,real a3 returns nothing set f__arg_unit1=a1 set f__arg_unit2=a2 set f__arg_real1=a3 call TriggerExecute(st___prototype177[i]) endfunction function sc___prototype177_evaluate takes integer i,unit a1,unit a2,real a3 returns nothing set f__arg_unit1=a1 set f__arg_unit2=a2 set f__arg_real1=a3 call TriggerEvaluate(st___prototype177[i]) endfunction function sc___prototype195_execute takes integer i,unit a1,unit a2,integer a3 returns nothing set f__arg_unit1=a1 set f__arg_unit2=a2 set f__arg_integer1=a3 call TriggerExecute(st___prototype195[i]) endfunction function sc___prototype195_evaluate takes integer i,unit a1,unit a2,integer a3 returns nothing set f__arg_unit1=a1 set f__arg_unit2=a2 set f__arg_integer1=a3 call TriggerEvaluate(st___prototype195[i]) endfunction function sc___prototype200_execute takes integer i,unit a1,boolean a2 returns nothing set f__arg_unit1=a1 set f__arg_boolean1=a2 call TriggerExecute(st___prototype200[i]) endfunction function sc___prototype200_evaluate takes integer i,unit a1,boolean a2 returns nothing set f__arg_unit1=a1 set f__arg_boolean1=a2 call TriggerEvaluate(st___prototype200[i]) endfunction function sc___prototype202_execute takes integer i,unit a1,real a2,real a3,integer a4,integer a5 returns nothing set f__arg_unit1=a1 set f__arg_real1=a2 set f__arg_real2=a3 set f__arg_integer1=a4 set f__arg_integer2=a5 call TriggerExecute(st___prototype202[i]) endfunction function sc___prototype202_evaluate takes integer i,unit a1,real a2,real a3,integer a4,integer a5 returns nothing set f__arg_unit1=a1 set f__arg_real1=a2 set f__arg_real2=a3 set f__arg_integer1=a4 set f__arg_integer2=a5 call TriggerEvaluate(st___prototype202[i]) endfunction function sc___prototype205_execute takes integer i,unit a1,real a2,real a3 returns nothing set f__arg_unit1=a1 set f__arg_real1=a2 set f__arg_real2=a3 call TriggerExecute(st___prototype205[i]) endfunction function sc___prototype205_evaluate takes integer i,unit a1,real a2,real a3 returns nothing set f__arg_unit1=a1 set f__arg_real1=a2 set f__arg_real2=a3 call TriggerEvaluate(st___prototype205[i]) endfunction function sc___prototype234_execute takes integer i,integer a1,unit a2 returns nothing set f__arg_integer1=a1 set f__arg_unit1=a2 call TriggerExecute(st___prototype234[i]) endfunction function sc___prototype234_evaluate takes integer i,integer a1,unit a2 returns boolean set f__arg_integer1=a1 set f__arg_unit1=a2 call TriggerEvaluate(st___prototype234[i]) return f__result_boolean endfunction function sc___prototype246_execute takes integer i,integer a1,item a2,integer a3 returns nothing set f__arg_integer1=a1 set f__arg_item1=a2 set f__arg_integer2=a3 call TriggerExecute(st___prototype246[i]) endfunction function sc___prototype246_evaluate takes integer i,integer a1,item a2,integer a3 returns nothing set f__arg_integer1=a1 set f__arg_item1=a2 set f__arg_integer2=a3 call TriggerEvaluate(st___prototype246[i]) endfunction function sc___prototype266_execute takes integer i,integer a1,unit a2,real a3 returns nothing set f__arg_integer1=a1 set f__arg_unit1=a2 set f__arg_real1=a3 call TriggerExecute(st___prototype266[i]) endfunction function sc___prototype266_evaluate takes integer i,integer a1,unit a2,real a3 returns nothing set f__arg_integer1=a1 set f__arg_unit1=a2 set f__arg_real1=a3 call TriggerEvaluate(st___prototype266[i]) endfunction function sc___prototype269_execute takes integer i,unit a1,unit a2,real a3,real a4 returns nothing set f__arg_unit1=a1 set f__arg_unit2=a2 set f__arg_real1=a3 set f__arg_real2=a4 call TriggerExecute(st___prototype269[i]) endfunction function sc___prototype269_evaluate takes integer i,unit a1,unit a2,real a3,real a4 returns nothing set f__arg_unit1=a1 set f__arg_unit2=a2 set f__arg_real1=a3 set f__arg_real2=a4 call TriggerEvaluate(st___prototype269[i]) endfunction function sc___prototype271_execute takes integer i,unit a1,unit a2,real a3,boolean a4,real a5 returns nothing set f__arg_unit1=a1 set f__arg_unit2=a2 set f__arg_real1=a3 set f__arg_boolean1=a4 set f__arg_real2=a5 call TriggerExecute(st___prototype271[i]) endfunction function sc___prototype271_evaluate takes integer i,unit a1,unit a2,real a3,boolean a4,real a5 returns nothing set f__arg_unit1=a1 set f__arg_unit2=a2 set f__arg_real1=a3 set f__arg_boolean1=a4 set f__arg_real2=a5 call TriggerEvaluate(st___prototype271[i]) endfunction //END EVALUATE + EXECUTE //POLYGON function IsIntersectAnt takes real x,real y,real X1,real Y1,real X2,real Y2 returns integer local real minX local real maxX local real minY local real maxY local real x0 set minX=X1 set maxX=X2 if(minX>maxX)then set minX=X2 set maxX=X1 endif set minY=Y1 set maxY=Y2 if(minY>maxY)then set minY=Y2 set maxY=Y1 endif if(ymaxY or x=minX and x<=maxX)then return-1 endif return 0 endif if(y==minY)then return 0 endif if(x>maxX)then return 1 endif set x0=X1+(y-Y1)*(X2-X1)/(Y2-Y1) if(x0>x)then return 0 endif if(x==x0)then return-1 endif return 1 endfunction function s__polygon_create takes nothing returns integer local integer i=s__polygon__allocate() set s__polygon_Max_x[i]=-99999 set s__polygon_Max_y[i]=-99999 set s__polygon_Min_x[i]=99999 set s__polygon_Min_y[i]=99999 set s__polygon_Max_i[i]=0 return i endfunction function s__polygon_destroy takes integer this returns nothing set s__polygon_Max_i[this]=0 call s__polygon_deallocate(this) endfunction function s__polygon_polygonaddpoint takes integer this,real x,real y returns nothing local real array z if(x>s__polygon_Max_x[this])then set s__polygon_Max_x[this]=x endif if(xs__polygon_Max_y[this])then set s__polygon_Max_y[this]=y endif if(y=s__polygon_Max_i[this]or i<0)then return endif if(x>s__polygon_Max_x[this])then set s__polygon_Max_x[this]=x endif if(xs__polygon_Max_y[this])then set s__polygon_Max_y[this]=y endif if(y=s__polygon_Max_x[this]or y>=s__polygon_Max_y[this]or x<=s__polygon_Min_x[this]or y<=s__polygon_Min_y[this])then return 0 endif set i=0 loop exitwhen i>=s__polygon_Max_i[this] if(s__polygon_Max_i[this]-i==1)then set i3=IsIntersectAnt(x,y,s___polygon_X[s__polygon_X[this]+i],s___polygon_Y[s__polygon_Y[this]+i],s___polygon_X[s__polygon_X[this]],s___polygon_Y[s__polygon_Y[this]]) else set i3=IsIntersectAnt(x,y,s___polygon_X[s__polygon_X[this]+i],s___polygon_Y[s__polygon_Y[this]+i],s___polygon_X[s__polygon_X[this]+i+1],s___polygon_Y[s__polygon_Y[this]+i+1]) endif if(i3<0)then return-1 endif set i2=i2+i3 set i=i+1 endloop if(i2-i2/ 2*2==1)then return 1 else return 0 endif endfunction function CreatePolygon takes nothing returns integer return s__polygon_create() endfunction function DestroyPolygon takes integer id returns nothing call s__polygon_destroy(id) endfunction function PolygonAddPoint takes integer id,real x,real y returns nothing call s__polygon_polygonaddpoint(id,x,y) endfunction function PolygonMovePoint takes integer id,integer i,real x,real y returns nothing call s__polygon_polygonmovepoint(id,i,x,y) endfunction function IsPointInPolygon takes integer id,real x,real y returns integer return s__polygon_ispointinpolygon(id,x,y) endfunction //END POLYGON function D4v takes nothing returns nothing set alloc__A=0 set alloc__N=0 endfunction function D5v takes integer v returns nothing set alloc__A=alloc__A+1 set alloc__B[alloc__A]=v endfunction function D7v takes nothing returns integer set alloc__N=alloc__N+1 return alloc__B[alloc__N] endfunction //Table ? function malloc takes nothing returns integer local integer this=LoadInteger(BYHT,qv,0) if this==0 then set this=Mv+1 set Mv=this else call SaveInteger(BYHT,qv,0,LoadInteger(BYHT,qv,this)) call RemoveSavedInteger(BYHT,qv,this) endif call SaveInteger(BYHT,qv,this,-1) return this endfunction function free_b takes integer this,integer size returns nothing local integer i=size local integer tb=LoadInteger(BYHT,Pv,size) loop exitwhen i==0 set i=i-1 call FlushChildHashtable(BYHT,this+i) call FlushChildHashtable(BYHT2,this+i) endloop if tb==null then set tb=malloc() call SaveInteger(BYHT,Pv,size,tb) endif if HaveSavedInteger(BYHT,tb,0)then call SaveInteger(BYHT,tb,this,LoadInteger(BYHT,tb,0)) endif call SaveInteger(BYHT,tb,0,this) endfunction function free takes integer this returns nothing if this>0 and LoadInteger(BYHT,qv,this)==-1 then call FlushChildHashtable(BYHT,this) call FlushChildHashtable(BYHT2,this) call SaveInteger(BYHT,qv,this,LoadInteger(BYHT,qv,0)) call SaveInteger(BYHT,qv,0,this) return endif if this<0 and LoadInteger(BYHT,Pv,this)>0 then call free_b(this,LoadInteger(BYHT,Pv,this)) endif endfunction function calloc takes integer size returns integer local integer tb local integer this if size<=0 then return 0 endif if HaveSavedInteger(BYHT,Pv,size)then set tb=LoadInteger(BYHT,Pv,size) set this=LoadInteger(BYHT,tb,0) if HaveSavedInteger(BYHT,tb,this)then call SaveInteger(BYHT,tb,0,LoadInteger(BYHT,tb,this)) call RemoveSavedInteger(BYHT,tb,this) else call free(tb) call RemoveSavedInteger(BYHT,Pv,size) endif else set this=mv-size set mv=this endif call SaveInteger(BYHT,Pv,this,size) return this endfunction function pnt_add takes integer this,integer offset returns integer return this+offset endfunction //end table ? //TRIG function s__Trig_new takes nothing returns integer local integer this=s__Trig__allocate() set s__Trig_fl[this]=this set s__Trig_fr[this]=this return this endfunction function s__Trig_remove takes integer this returns nothing if s__Trig_trig[this]!=null then call DestroyTrigger(s__Trig_trig[this]) call s__Trig_deallocate(this) set s__Trig_trig[this]=null set s__Trig_fl[s__Trig_fr[this]]=s__Trig_fl[this] set s__Trig_fr[s__Trig_fl[this]]=s__Trig_fr[this] endif endfunction function s__Trig_clear takes integer this returns nothing local integer t if s__Trig_trig[this]!=null then set t=s__Trig_fl[this] loop call DestroyTrigger(s__Trig_trig[t]) call s__Trig_deallocate(t) set s__Trig_trig[t]=null exitwhen t==this set t=s__Trig_fl[t] endloop endif endfunction function s__Trig_addaction takes integer this,code c returns nothing call TriggerAddCondition(s__Trig_trig[this],Filter(c)) endfunction function s__Trig_addaction_b takes integer this,boolexpr c returns nothing call TriggerAddCondition(s__Trig_trig[this],(c)) endfunction function s__Trig_addedtothelist takes integer this,code c returns integer local integer t=s__Trig__allocate() set s__Trig_fr[t]=s__Trig_fr[this] set s__Trig_fl[s__Trig_fr[this]]=t set s__Trig_fr[this]=t set s__Trig_fl[t]=this call TriggerAddCondition(s__Trig_trig[(t)],Filter((c))) return t endfunction function s__Trig_addedtothelist_b takes integer this,boolexpr c returns integer local integer t=s__Trig__allocate() set s__Trig_fr[t]=s__Trig_fr[this] set s__Trig_fl[s__Trig_fr[this]]=t set s__Trig_fr[this]=t set s__Trig_fl[t]=this call TriggerAddCondition(s__Trig_trig[(t)],((c))) return t endfunction function s__Trig_exe takes integer this returns nothing local integer r local integer array v local integer i if this!=0 then set r=s__Trig_Index set s__Trig_Index=this set i=0 loop set v[i]=s__Trig_Index set s__Trig_Index=s__Trig_fl[s__Trig_Index] exitwhen s__Trig_Index==this set i=i+1 endloop set i=0 loop set s__Trig_Index=v[i] exitwhen s__Trig_Index==null call TriggerEvaluate(s__Trig_trig[s__Trig_Index]) set i=i+1 endloop set s__Trig_Index=r endif endfunction function s__Trig_exewithp takes integer this,integer i returns nothing local integer v=s__Trig_P set s__Trig_P=i call s__Trig_exe(this) set s__Trig_P=v endfunction //END TRIG //EVENT function RegisterEvent takes playerunitevent p,code c returns triggercondition local integer i=GetHandleId(p) local integer k=$F if(alloc__Kv[i]==null)then set alloc__Kv[i]=CreateTrigger() loop call TriggerRegisterPlayerUnitEvent(alloc__Kv[i],Player(k),p,null) exitwhen k==0 set k=k-1 endloop endif return TriggerAddCondition(alloc__Kv[i],Filter(c)) endfunction function RemoveEvent takes playerunitevent p,triggercondition trigct returns nothing call TriggerRemoveCondition(alloc__Kv[GetHandleId(p)],trigct) endfunction function NewTriggerFor takes nothing returns integer set alloc__gX=alloc__gX+1 set alloc__GX[alloc__gX]=CreateTrigger() return alloc__gX endfunction function TriggerForAddAction takes integer ev,boolexpr c returns triggercondition return TriggerAddCondition(alloc__GX[ev],c) endfunction function TriggerForRemoveAction takes integer ev,triggercondition c returns nothing call TriggerRemoveCondition(alloc__GX[ev],c) endfunction function TriggerForEvaluate takes integer ev returns boolean return TriggerEvaluate(alloc__GX[ev]) endfunction function TriggerForAddActionB takes boolexpr c,integer ev returns triggercondition return(TriggerAddCondition(alloc__GX[(ev)],(c))) endfunction //END EVENT //CATALOG function s__Catalog_create takes nothing returns integer local integer this=s__Catalog_F if(0==this)then set this=s__Catalog_I+1 set s__Catalog_I=this else set s__Catalog_F=LoadInteger(BYHT,s__Catalog_R1,this) endif call SaveInteger(BYHT,s__Catalog_R1,this,-1) set s__Catalog_number[this]=malloc() set s__Catalog_content[this]=malloc() set s__Catalog_re[this]=malloc() set s__Catalog_ie[this]=malloc() set s__Catalog_left[this]=malloc() set s__Catalog_right[this]=malloc() call SaveInteger(BYHT,s__Catalog_re[this],this,this) call SaveInteger(BYHT,s__Catalog_ie[this],this,this) call SaveInteger(BYHT,s__Catalog_left[this],this,this) call SaveInteger(BYHT,s__Catalog_right[this],this,this) return this endfunction function s__Catalog__get_Size takes integer this returns integer local integer cs=malloc() local integer v=0 local integer b=this local integer e local integer index=0 loop if(not HaveSavedBoolean(BYHT,(cs),b))then set e=LoadInteger(BYHT,s__Catalog_left[b],b) if(e!=b)then set s__Catalog_stack_a[index]=b set s__Catalog_stack_b[index]=e set index=index+1 endif call SaveBoolean(BYHT,(cs),b,true) set v=v+LoadInteger(BYHT,s__Catalog_R2,b) endif set b=LoadInteger(BYHT,s__Catalog_left[this],b) if(b==this)then exitwhen 0==index set index=index-1 set this=s__Catalog_stack_a[index] set b=s__Catalog_stack_b[index] endif endloop call free(cs) return v endfunction function s__Catalog_Read takes integer this,integer v returns integer local integer cs=malloc() local integer b=this local integer e local integer index=0 local integer y loop if(not HaveSavedBoolean(BYHT,(cs),b))then set y=LoadInteger(BYHT,s__Catalog_R2,b) if(v<=y)then call free(cs) return LoadInteger(BYHT,s__Catalog_content[b],v) endif set e=LoadInteger(BYHT,s__Catalog_left[b],b) if(e!=b)then set s__Catalog_stack_a[index]=b set s__Catalog_stack_b[index]=e set index=index+1 endif call SaveBoolean(BYHT,(cs),b,true) set v=v-y endif set b=LoadInteger(BYHT,s__Catalog_left[this],b) if(b==this)then if(0==index)then call free(cs) return 0 endif set index=index-1 set this=s__Catalog_stack_a[index] set b=s__Catalog_stack_b[index] endif endloop return 0 endfunction function s__Catalog_Search takes integer this,integer v returns integer local integer cs=malloc() local integer b=this local integer e local integer index=0 local integer l=0 loop if(not HaveSavedBoolean(BYHT,(cs),b))then if(HaveSavedInteger(BYHT,s__Catalog_number[b],v))then call free(cs) return LoadInteger(BYHT,s__Catalog_number[b],v)+l endif set l=l+LoadInteger(BYHT,s__Catalog_R2,b) set e=LoadInteger(BYHT,s__Catalog_left[b],b) if(e!=b)then set s__Catalog_stack_a[index]=b set s__Catalog_stack_b[index]=e set index=index+1 endif call SaveBoolean(BYHT,(cs),b,true) endif set b=LoadInteger(BYHT,s__Catalog_left[this],b) if(b==this)then if(0==index)then call free(cs) return 0 endif set index=index-1 set this=s__Catalog_stack_a[index] set b=s__Catalog_stack_b[index] endif endloop return 0 endfunction function s__Catalog_Write takes integer this,integer v returns nothing if(not HaveSavedInteger(BYHT,s__Catalog_number[this],v))then call SaveInteger(BYHT,s__Catalog_R2,this,LoadInteger(BYHT,s__Catalog_R2,this)+1) call SaveInteger(BYHT,s__Catalog_number[this],v,LoadInteger(BYHT,s__Catalog_R2,this)) call SaveInteger(BYHT,s__Catalog_content[this],LoadInteger(BYHT,s__Catalog_R2,this),v) endif endfunction function s__Catalog_copy takes integer this,integer b returns nothing local integer index=0 local integer indexend=LoadInteger(BYHT,s__Catalog_R2,b) if LoadInteger(BYHT,s__Catalog_R1,this)==-1 then loop exitwhen index>=indexend set index=index+1 call s__Catalog_Write(this,LoadInteger(BYHT,s__Catalog_content[b],index)) endloop endif endfunction function s__Catalog_Init takes nothing returns nothing set s__Catalog_R1=malloc() set s__Catalog_R2=malloc() endfunction function Catalog_Add_Subcatalog takes integer t,integer b returns nothing if(not HaveSavedInteger(BYHT,s__Catalog_left[t],b))then call SaveInteger(BYHT,s__Catalog_right[t],b,LoadInteger(BYHT,s__Catalog_right[t],t)) call SaveInteger(BYHT,s__Catalog_left[t],b,t) call SaveInteger(BYHT,s__Catalog_left[t],LoadInteger(BYHT,s__Catalog_right[t],t),b) call SaveInteger(BYHT,s__Catalog_right[t],t,b) call SaveInteger(BYHT,s__Catalog_ie[b],t,LoadInteger(BYHT,s__Catalog_ie[b],b)) call SaveInteger(BYHT,s__Catalog_re[b],t,b) call SaveInteger(BYHT,s__Catalog_re[b],LoadInteger(BYHT,s__Catalog_ie[b],b),t) call SaveInteger(BYHT,s__Catalog_ie[b],b,t) endif endfunction function Catalog_copy takes integer t,integer b returns nothing call s__Catalog_copy(t,b) endfunction function Catalog_read_content takes integer id,integer index returns integer return s__Catalog_Read(id,index) endfunction function Catalog_Search_number takes integer id,integer v returns integer return s__Catalog_Search(id,v) endfunction function Catalog_write_content takes integer id,integer v returns nothing call s__Catalog_Write(id,v) endfunction function GetCatalogCount takes integer id returns integer return s__Catalog__get_Size(id) endfunction //END CATALOG function alloc__Timer_Init takes nothing returns nothing local integer i=alloc__ge local integer l=alloc__ge loop set i=i-1 set alloc__Ge[i]=CreateTimer() exitwhen i==0 endloop set alloc__ge=GetHandleId(alloc__Ge[l-1]) set alloc__he=l endfunction function alloc__hpv takes integer id returns integer if LoadBoolean(BYHT,(alloc__NR),-id)then set alloc__Timer_Key=id-alloc__ge if alloc__Timer_Key<8192 then return alloc__AR[alloc__Timer_Key] else return LoadInteger(BYHT,(alloc__NR),-id) endif endif return 0 endfunction function alloc__hPv takes integer id,integer v returns nothing if LoadBoolean(BYHT,(alloc__NR),-id)then set alloc__Timer_Key=id-alloc__ge if alloc__Timer_Key<8192 then set alloc__AR[alloc__Timer_Key]=v else call SaveInteger(BYHT,(alloc__NR),-id,v) endif endif endfunction function LastAllocTimer takes nothing returns timer return alloc__bj_LastAllocTimer endfunction function SetTimerData takes timer t,integer hqv returns nothing call alloc__hPv(GetHandleId(t),hqv) endfunction function GetTimerData takes timer t returns integer return alloc__hpv(GetHandleId(t)) endfunction function NewTimer takes integer v returns timer local integer id if alloc__he==0 then set alloc__bj_LastAllocTimer=CreateTimer() else set alloc__he=alloc__he-1 set alloc__bj_LastAllocTimer=alloc__Ge[alloc__he] endif set id=GetHandleId(alloc__bj_LastAllocTimer) call SaveBoolean(BYHT,(alloc__NR),-id,true) call alloc__hPv(id,v) return alloc__bj_LastAllocTimer endfunction function NewTimerNull takes nothing returns timer return NewTimer(0) endfunction function ReleaseTimer takes timer t,string s returns integer local integer id=GetHandleId(t) local integer i=0 call PauseTimer(t) if LoadBoolean(BYHT,(alloc__NR),-id)then call RemoveSavedBoolean(BYHT,(alloc__NR),-id) set alloc__Timer_Key=id-alloc__ge if(alloc__Timer_Key<8192)then set i=alloc__AR[alloc__Timer_Key] set alloc__Ge[alloc__he]=t set alloc__he=alloc__he+1 else set i=LoadInteger(BYHT,(alloc__NR),-id) call RemoveSavedInteger(BYHT,(alloc__NR),-id) call DestroyTimer(t) endif endif return i endfunction function alloc__D8v takes nothing returns nothing local integer i=alloc__S[0] set alloc__S[0]=0 loop exitwhen 0==i if(0==alloc__L[i])then if(0==K[i])then call TriggerRemoveCondition(alloc__T,alloc__Y[alloc__M[i]]) set alloc__Y[alloc__M[i]]=null set alloc__H=alloc__H-1 set J[alloc__M[i]]=0 else set J[alloc__M[i]]=K[i] set alloc__L[K[i]]=0 endif else set alloc__L[K[i]]=alloc__L[i] set K[alloc__L[i]]=K[i] endif set K[i]=K[0] set K[0]=i set i=alloc__S[i] endloop loop exitwhen 0==alloc__ov set alloc__ov=alloc__ov-1 set i=alloc__xv[alloc__ov] if(not alloc__vv[i])then call TriggerRemoveCondition(alloc__T,alloc__Y[i]) set alloc__Y[i]=null if(alloc__iv[i])then set alloc__D[i]=alloc__D[0] set alloc__D[0]=i set alloc__iv[i]=false endif set alloc__rv[i]=false endif endloop if(0==alloc__H)then call PauseTimer(alloc__U) else call TriggerEvaluate(alloc__T) endif endfunction function D9v takes integer r returns integer local integer i local integer f if(0==K[0])then set i=alloc__F+1 set alloc__F=i else set i=K[0] set K[0]=K[i] endif set alloc__M[i]=r set alloc__S[i]=-1 set f=J[r] if(0==f)then set K[i]=0 set alloc__L[i]=0 set J[r]=i set alloc__Y[r]=TriggerAddCondition(alloc__T,alloc__Z[r]) if(0==alloc__H)then call TimerStart(alloc__U,.03125,true,function alloc__D8v) endif set alloc__H=alloc__H+1 else set K[i]=f set alloc__L[i]=0 set alloc__L[f]=i set J[r]=i endif return i endfunction function fvv takes integer fev returns nothing if(0>alloc__S[fev])then set alloc__S[fev]=alloc__S[0] set alloc__S[0]=fev endif endfunction function fxv takes code c returns integer local integer i=alloc__D[0] if(0==i)then set i=alloc__C+1 set alloc__C=i else set alloc__D[0]=alloc__D[i] endif set alloc__Z[i]=Condition(c) return i endfunction function fov takes integer i returns nothing if not(alloc__vv[i]or alloc__iv[i])then if(alloc__rv[i])then set alloc__rv[i]=false else set alloc__Y[i]=TriggerAddCondition(alloc__T,alloc__Z[i]) endif if(0==alloc__H)then call TimerStart(alloc__U,.03125,true,function alloc__D8v) endif set alloc__H=alloc__H+1 set alloc__vv[i]=true endif endfunction function frv takes integer i returns nothing if(alloc__vv[i])then if(not(alloc__rv[i]or alloc__iv[i]))then set alloc__xv[alloc__ov]=i set alloc__ov=alloc__ov+1 set alloc__rv[i]=true endif set alloc__vv[i]=false set alloc__H=alloc__H-1 endif endfunction //? //Blizzard Init function InitBlizzard_j takes nothing returns nothing call InitQueuedTriggers() call InitDNCSounds() call InitMapRects() call InitSummonableCaps() endfunction function alloc_main takes nothing returns nothing call ExecuteFunc("alloc__Timer_Init") call ExecuteFunc("s__Catalog_Init") call ExecuteFunc("InitBlizzard_j") call ExecuteFunc("string_onInit") call ExecuteFunc("SoundUtils_onInit") call ExecuteFunc("system_onInit") call ExecuteFunc("Event_onInit") call ExecuteFunc("unit_onInit") call ExecuteFunc("Hero_onInit") call ExecuteFunc("playerinit_onInit") call ExecuteFunc("EquipState_onInit") call ExecuteFunc("sj_jass_main") call ExecuteFunc("unitstate_onInit") call ExecuteFunc("herostate_onInit") endfunction //environement function environment___Filter_c takes nothing returns boolean return GetDestructableMaxLife(GetFilterDestructable())!=1 endfunction function environment___Action_c takes nothing returns nothing local destructable d=GetEnumDestructable() local integer id=R2I((GetDestructableY(d)-environment___RootY)/ environment___Wide_2)*environment___MaxY+R2I((GetDestructableX(d)-environment___RootX)/ environment___Wide_2) local integer maxindex=LoadInteger(environment___HT,id,0)+1 call SaveInteger(environment___HT,id,0,maxindex) call SaveDestructableHandle(environment___HT,id,maxindex,d) call ShowDestructable(d,false) call SaveInteger(environment___HT,GetHandleId(d),0,maxindex) set d=null endfunction function environment___SetVisible takes integer x1,integer x2,integer y1,integer y2,boolean flag returns nothing local integer a=x1 local integer b local integer y local integer id local integer maxindex loop set b=y1 exitwhen a>x2 loop exitwhen b>y2 set id=b*environment___MaxY+a call SaveBoolean(environment___HT,id,-1,flag) set maxindex=LoadInteger(environment___HT,id,0) set y=0 loop exitwhen y>=maxindex set y=y+1 call ShowDestructable(LoadDestructableHandle(environment___HT,id,y),flag) endloop set b=b+1 endloop set a=a+1 endloop endfunction function environment___ModVisible takes integer x,integer y,integer oldx,integer oldy returns nothing local integer newDown=y-4 local integer newUp=y+4 local integer newLeft=x-4 local integer newRight=x+4 local integer oldDown=oldy-4 local integer oldUp=oldy+4 local integer oldLeft=oldx-4 local integer oldRight=oldx+4 if newDown<0 then set newDown=0 endif if newLeft<0 then set newLeft=0 endif if oldDown<0 then set oldDown=0 endif if oldLeft<0 then set oldLeft=0 endif if newUp>=environment___MaxY then set newUp=environment___MaxY-1 endif if newRight>=environment___MaxX then set newUp=environment___MaxX-1 endif if oldUp>=environment___MaxY then set oldUp=environment___MaxY-1 endif if oldRight>=environment___MaxX then set oldUp=environment___MaxX-1 endif if oldUp=oldy then if y!=oldy then call environment___SetVisible(oldUp+1,newUp,newLeft,newRight,true) call environment___SetVisible(oldDown,newDown-1,oldLeft,oldRight,false) endif if newLeft6 set v=v*v set t=t*2 set math__Pow2p[i]=v set math__Pow2n[i]=t set i=i+1 endloop endfunction function exp takes real x returns real local real a=1+x local real b=x local real c=2 local real d=3 local real e=0 loop set e=a+x*b/ c exitwhen e>=a and e<=a set a=e set b=b*x set c=c*d set d=d+1 endloop return e endfunction function loge takes real x returns real local real a local real b=0 local real c=0 local real d=1 if x>0 then set x=(x-1)/(x+1) set a=x*x loop set c=b+x*2/ d exitwhen c>=b and c<=b set b=c set d=d+2 set x=x*a endloop set c=c endif return c endfunction function log2 takes real x returns real local real a local real b local real c local real d local real e local real s=1. local integer i=1 if x<=.0 or x==1. then return .0 endif if x<1. then set x=1./ x set s=-1. endif if x>2. then loop exitwhen math__Pow2p[i]>=x set i=i+1 endloop set a=math__Pow2n[i] set c=math__Pow2p[i] loop set b=x/ c exitwhen b>=1. and b<2 set i=i-1 if b<1. then set c=c/ math__Pow2p[i] set a=a-math__Pow2n[i] else set c=c*math__Pow2p[i] set a=a+math__Pow2n[i] endif endloop set x=b else set a=.0 endif if x>1.414213562 then set a=a+.5 set x=x/ 1.414213562 endif return s*(a+loge(x)*1.442695) endfunction function log10 takes real x returns real return log2(x)*.301029996 endfunction function log takes real x returns real return log2(x)*.69314718 endfunction function logx takes real x,real y returns real return log2(y)/ log2(x) endfunction function PowInt takes integer a,integer power returns integer local integer mod if power<0 then return 0 endif if power==0 then return 1 endif if power==1 then return a endif set mod=power/ 2 if power-mod*2==0 then return PowInt(a*a,mod) else return a*PowInt(a*a,mod) endif endfunction function PowR takes real a,integer power returns real local integer mod if power==0 then return 1. endif if power==1 then return a endif if power<0 then return 1./ PowR(a,-power) endif set mod=power/ 2 if power-mod*2==0 then return PowR(a*a,mod) else return a*PowR(a*a,mod) endif endfunction function PowBJ takes real a,real power returns real local integer mod=R2I(power) return PowR(a,mod)*exp(loge(a)*(power-mod)) endfunction // math end // bezier curve function s__BezierCurve_Power2 takes real x,real y,real z,real x1,real y1,real z1,real x2,real y2,real z2 returns integer local integer this=s__BezierCurve__allocate() set s__BezierCurve_Type[this]=2 set s__BezierCurve_a1[this]=x set s__BezierCurve_b1[this]=2*(x1-x) set s__BezierCurve_c1[this]=x-2*x1+x2 set s__BezierCurve_a2[this]=y set s__BezierCurve_b2[this]=2*(y1-y) set s__BezierCurve_c2[this]=y-2*y1+y2 set s__BezierCurve_a3[this]=z set s__BezierCurve_b3[this]=2*(z1-z) set s__BezierCurve_c3[this]=z-2*z1+z2 return this endfunction function s__BezierCurve_Power3 takes real x,real y,real z,real x1,real y1,real z1,real x2,real y2,real z2,real x3,real y3,real z3 returns integer local integer this=s__BezierCurve__allocate() set s__BezierCurve_Type[this]=3 set s__BezierCurve_a1[this]=x set s__BezierCurve_b1[this]=3*(x1-x) set s__BezierCurve_c1[this]=3*(x-2*x1+x2) set s__BezierCurve_d1[this]=3*(x1-x2)+x3-x set s__BezierCurve_a2[this]=y set s__BezierCurve_b2[this]=3*(y1-y) set s__BezierCurve_c2[this]=3*(y-2*y1+y2) set s__BezierCurve_d2[this]=3*(y1-y2)+y3-y set s__BezierCurve_a3[this]=z set s__BezierCurve_b3[this]=3*(z1-z) set s__BezierCurve_c3[this]=3*(z-2*z1+z2) set s__BezierCurve_d3[this]=3*(z1-z2)+z3-z return this endfunction function s__BezierCurve_getx takes integer this,real t returns real local real e=0 if s__BezierCurve_Type[this]==2 then set e=s__BezierCurve_a1[this]+(s__BezierCurve_b1[this]+s__BezierCurve_c1[this]*t)*t elseif s__BezierCurve_Type[this]==3 then set e=s__BezierCurve_a1[this]+(s__BezierCurve_b1[this]+(s__BezierCurve_c1[this]+s__BezierCurve_d1[this]*t)*t)*t endif return e endfunction function s__BezierCurve_gety takes integer this,real t returns real local real e=0 if s__BezierCurve_Type[this]==2 then set e=s__BezierCurve_a2[this]+(s__BezierCurve_b2[this]+s__BezierCurve_c2[this]*t)*t elseif s__BezierCurve_Type[this]==3 then set e=s__BezierCurve_a2[this]+(s__BezierCurve_b2[this]+(s__BezierCurve_c2[this]+s__BezierCurve_d2[this]*t)*t)*t endif return e endfunction function s__BezierCurve_getz takes integer this,real t returns real local real e=0 if s__BezierCurve_Type[this]==2 then set e=s__BezierCurve_a3[this]+(s__BezierCurve_b3[this]+s__BezierCurve_c3[this]*t)*t elseif s__BezierCurve_Type[this]==3 then set e=s__BezierCurve_a3[this]+(s__BezierCurve_b3[this]+(s__BezierCurve_c3[this]+s__BezierCurve_d3[this]*t)*t)*t endif return e endfunction //bezier curve end //bag swap function GetBagSwap_object takes integer Catalog_id,integer i returns integer return(s__Catalog_Read((Catalog_id),(i))) endfunction function GetBagSwap_Size takes integer Catalog_id returns integer return(s__Catalog__get_Size((Catalog_id))) endfunction function GetBagSwap_Id takes integer Catalog_id,integer i returns integer return(s__Catalog_Search((Catalog_id),(i))) endfunction function BagSwap__SetBagSwap_Id takes integer v returns nothing call s__Catalog_Write((Load_BagSwap_root),(v)) endfunction function BagSwap__Init_main takes nothing returns nothing set Load_BagSwap_root=s__Catalog_create() call ExecuteFunc("Init_BagSwap_1") call ExecuteFunc("Init_BagSwap_2") call ExecuteFunc("Init_BagSwap_3") call ExecuteFunc("Init_BagSwap_4") call ExecuteFunc("Init_BagSwap_5") call ExecuteFunc("Init_BagSwap_6") call ExecuteFunc("Init_BagSwap_7") call ExecuteFunc("Init_BagSwap_8") call ExecuteFunc("Init_BagSwap_9") //call ExecuteFunc("Init_BagSwap_A") endfunction function Init_BagSwap_1 takes nothing returns nothing call s__Catalog_Write((Load_BagSwap_root),(('e01Z'))) call s__Catalog_Write((Load_BagSwap_root),(('e00N'))) call s__Catalog_Write((Load_BagSwap_root),(('e00O'))) call s__Catalog_Write((Load_BagSwap_root),(('e00U'))) call s__Catalog_Write((Load_BagSwap_root),(('e00K'))) call s__Catalog_Write((Load_BagSwap_root),(('e01I'))) call s__Catalog_Write((Load_BagSwap_root),(('e00W'))) call s__Catalog_Write((Load_BagSwap_root),(('e00B'))) call s__Catalog_Write((Load_BagSwap_root),(('e016'))) endfunction function Init_BagSwap_2 takes nothing returns nothing call s__Catalog_Write((Load_BagSwap_root),(('e01J'))) call s__Catalog_Write((Load_BagSwap_root),(('e01K'))) call s__Catalog_Write((Load_BagSwap_root),(('e01L'))) call s__Catalog_Write((Load_BagSwap_root),(('e01M'))) call s__Catalog_Write((Load_BagSwap_root),(('e01N'))) call s__Catalog_Write((Load_BagSwap_root),(('e01O'))) call s__Catalog_Write((Load_BagSwap_root),(('e01P'))) call s__Catalog_Write((Load_BagSwap_root),(('e01Q'))) call s__Catalog_Write((Load_BagSwap_root),(('e01R'))) call s__Catalog_Write((Load_BagSwap_root),(('e01S'))) call s__Catalog_Write((Load_BagSwap_root),(('e01T'))) call s__Catalog_Write((Load_BagSwap_root),(('e01U'))) call s__Catalog_Write((Load_BagSwap_root),(('e01V'))) call s__Catalog_Write((Load_BagSwap_root),(('e01W'))) call s__Catalog_Write((Load_BagSwap_root),(('e01X'))) call s__Catalog_Write((Load_BagSwap_root),(('e01Y'))) call s__Catalog_Write((Load_BagSwap_root),(('e020'))) call s__Catalog_Write((Load_BagSwap_root),(('e021'))) call s__Catalog_Write((Load_BagSwap_root),(('e022'))) call s__Catalog_Write((Load_BagSwap_root),(('e023'))) call s__Catalog_Write((Load_BagSwap_root),(('e024'))) call s__Catalog_Write((Load_BagSwap_root),(('e025'))) endfunction function Init_BagSwap_3 takes nothing returns nothing call s__Catalog_Write((Load_BagSwap_root),(('e028'))) endfunction function Init_BagSwap_4 takes nothing returns nothing call s__Catalog_Write((Load_BagSwap_root),(('e02B'))) endfunction function Init_BagSwap_5 takes nothing returns nothing call s__Catalog_Write((Load_BagSwap_root),(('e02C'))) call s__Catalog_Write((Load_BagSwap_root),(('e02D'))) call s__Catalog_Write((Load_BagSwap_root),(('e02E'))) call s__Catalog_Write((Load_BagSwap_root),(('e02F'))) endfunction function Init_BagSwap_6 takes nothing returns nothing call s__Catalog_Write((Load_BagSwap_root),(('e02L'))) endfunction function Init_BagSwap_7 takes nothing returns nothing call s__Catalog_Write((Load_BagSwap_root),(('e02K'))) endfunction function Init_BagSwap_8 takes nothing returns nothing call s__Catalog_Write((Load_BagSwap_root),(('e02X'))) call s__Catalog_Write((Load_BagSwap_root),(('e02Y'))) call s__Catalog_Write((Load_BagSwap_root),(('e02Z'))) endfunction function Init_BagSwap_9 takes nothing returns nothing call s__Catalog_Write((Load_BagSwap_root),(('e032'))) call s__Catalog_Write((Load_BagSwap_root),(('n03K'))) endfunction //useless function Init_BagSwap_A takes nothing returns nothing call s__Catalog_Write((Load_BagSwap_root),(('e03S'))) call s__Catalog_Write((Load_BagSwap_root),(('e03P'))) call s__Catalog_Write((Load_BagSwap_root),(('e03Q'))) call s__Catalog_Write((Load_BagSwap_root),(('e03R'))) endfunction //bag swap 2 ? function BagSwap__SetBagSwap_2_Id takes integer v returns nothing call s__Catalog_Write((Load_BagSwap_2_root),(v)) endfunction function BagSwap__Init_main2 takes nothing returns nothing set Load_BagSwap_2_root=s__Catalog_create() call s__Catalog_copy((Load_BagSwap_2_root),(Load_BagSwap_root)) call s__Catalog_Write((Load_BagSwap_2_root),(('e03S'))) call s__Catalog_Write((Load_BagSwap_2_root),(('e03P'))) call s__Catalog_Write((Load_BagSwap_2_root),(('e03Q'))) call s__Catalog_Write((Load_BagSwap_2_root),(('e03R'))) endfunction function BagSwap_onInit takes nothing returns nothing call ExecuteFunc("BagSwap__l2v") call ExecuteFunc("BagSwap__Init_main") call ExecuteFunc("BagSwap__Init_main2") endfunction //end bag swap //basic catalog function Init_BasicCatalog27 takes integer v returns nothing call s__Catalog_Write((BasicCatalog27_root),(v)) endfunction function Init_BasicCatalog27_1 takes nothing returns nothing set BasicCatalog27_root=s__Catalog_create() endfunction function Init_BasicCatalog27_2 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('I007'))) call s__Catalog_Write((BasicCatalog27_root),(('I00A'))) call s__Catalog_Write((BasicCatalog27_root),(('I009'))) call s__Catalog_Write((BasicCatalog27_root),(('I00D'))) call s__Catalog_Write((BasicCatalog27_root),(('I00C'))) call s__Catalog_Write((BasicCatalog27_root),(('I00B'))) call s__Catalog_Write((BasicCatalog27_root),(('I00E'))) call s__Catalog_Write((BasicCatalog27_root),(('I0AJ'))) call s__Catalog_Write((BasicCatalog27_root),(('I00I'))) call s__Catalog_Write((BasicCatalog27_root),(('I00Q'))) call s__Catalog_Write((BasicCatalog27_root),(('I00K'))) call s__Catalog_Write((BasicCatalog27_root),(('I00P'))) call s__Catalog_Write((BasicCatalog27_root),(('I00S'))) call s__Catalog_Write((BasicCatalog27_root),(('I00R'))) call s__Catalog_Write((BasicCatalog27_root),(('I00T'))) call s__Catalog_Write((BasicCatalog27_root),(('I01F'))) call s__Catalog_Write((BasicCatalog27_root),(('I01B'))) call s__Catalog_Write((BasicCatalog27_root),(('I01C'))) call s__Catalog_Write((BasicCatalog27_root),(('I01D'))) call s__Catalog_Write((BasicCatalog27_root),(('I01E'))) call s__Catalog_Write((BasicCatalog27_root),(('I00U'))) call s__Catalog_Write((BasicCatalog27_root),(('I01G'))) call s__Catalog_Write((BasicCatalog27_root),(('I01K'))) call s__Catalog_Write((BasicCatalog27_root),(('I01J'))) call s__Catalog_Write((BasicCatalog27_root),(('I01I'))) call s__Catalog_Write((BasicCatalog27_root),(('I01H'))) call s__Catalog_Write((BasicCatalog27_root),(('I0AK'))) call s__Catalog_Write((BasicCatalog27_root),(('I01P'))) call s__Catalog_Write((BasicCatalog27_root),(('I01Q'))) call s__Catalog_Write((BasicCatalog27_root),(('I01L'))) call s__Catalog_Write((BasicCatalog27_root),(('I01M'))) call s__Catalog_Write((BasicCatalog27_root),(('I01N'))) call s__Catalog_Write((BasicCatalog27_root),(('I01O'))) call s__Catalog_Write((BasicCatalog27_root),(('I01V'))) call s__Catalog_Write((BasicCatalog27_root),(('I01W'))) call s__Catalog_Write((BasicCatalog27_root),(('I01R'))) call s__Catalog_Write((BasicCatalog27_root),(('I01S'))) call s__Catalog_Write((BasicCatalog27_root),(('I01T'))) call s__Catalog_Write((BasicCatalog27_root),(('I01U'))) call s__Catalog_Write((BasicCatalog27_root),(('I026'))) call s__Catalog_Write((BasicCatalog27_root),(('I01X'))) call s__Catalog_Write((BasicCatalog27_root),(('I01Y'))) call s__Catalog_Write((BasicCatalog27_root),(('I02F'))) call s__Catalog_Write((BasicCatalog27_root),(('I02G'))) call s__Catalog_Write((BasicCatalog27_root),(('I02J'))) call s__Catalog_Write((BasicCatalog27_root),(('I02H'))) call s__Catalog_Write((BasicCatalog27_root),(('I02I'))) call s__Catalog_Write((BasicCatalog27_root),(('I02K'))) call s__Catalog_Write((BasicCatalog27_root),(('I037'))) call s__Catalog_Write((BasicCatalog27_root),(('I02L'))) call s__Catalog_Write((BasicCatalog27_root),(('I02M'))) call s__Catalog_Write((BasicCatalog27_root),(('I038'))) call s__Catalog_Write((BasicCatalog27_root),(('I03B'))) call s__Catalog_Write((BasicCatalog27_root),(('I039'))) call s__Catalog_Write((BasicCatalog27_root),(('I03C'))) call s__Catalog_Write((BasicCatalog27_root),(('I03D'))) call s__Catalog_Write((BasicCatalog27_root),(('I03A'))) call s__Catalog_Write((BasicCatalog27_root),(('I03E'))) call s__Catalog_Write((BasicCatalog27_root),(('I03J'))) call s__Catalog_Write((BasicCatalog27_root),(('I03K'))) call s__Catalog_Write((BasicCatalog27_root),(('I03H'))) call s__Catalog_Write((BasicCatalog27_root),(('I03I'))) call s__Catalog_Write((BasicCatalog27_root),(('I03F'))) call s__Catalog_Write((BasicCatalog27_root),(('I03L'))) call s__Catalog_Write((BasicCatalog27_root),(('I03M'))) call s__Catalog_Write((BasicCatalog27_root),(('I03G'))) call s__Catalog_Write((BasicCatalog27_root),(('I03S'))) call s__Catalog_Write((BasicCatalog27_root),(('I03N'))) call s__Catalog_Write((BasicCatalog27_root),(('I03O'))) call s__Catalog_Write((BasicCatalog27_root),(('I03T'))) call s__Catalog_Write((BasicCatalog27_root),(('I03R'))) call s__Catalog_Write((BasicCatalog27_root),(('I03Q'))) call s__Catalog_Write((BasicCatalog27_root),(('I03U'))) call s__Catalog_Write((BasicCatalog27_root),(('I03V'))) call s__Catalog_Write((BasicCatalog27_root),(('I03P'))) call s__Catalog_Write((BasicCatalog27_root),(('I05O'))) call s__Catalog_Write((BasicCatalog27_root),(('I03W'))) call s__Catalog_Write((BasicCatalog27_root),(('I055'))) call s__Catalog_Write((BasicCatalog27_root),(('I05J'))) call s__Catalog_Write((BasicCatalog27_root),(('I03X'))) call s__Catalog_Write((BasicCatalog27_root),(('I05E'))) call s__Catalog_Write((BasicCatalog27_root),(('I054'))) call s__Catalog_Write((BasicCatalog27_root),(('I05M'))) call s__Catalog_Write((BasicCatalog27_root),(('I05N'))) call s__Catalog_Write((BasicCatalog27_root),(('I05T'))) call s__Catalog_Write((BasicCatalog27_root),(('I05I'))) call s__Catalog_Write((BasicCatalog27_root),(('I05R'))) call s__Catalog_Write((BasicCatalog27_root),(('I05S'))) call s__Catalog_Write((BasicCatalog27_root),(('I042'))) call s__Catalog_Write((BasicCatalog27_root),(('I03Y'))) call s__Catalog_Write((BasicCatalog27_root),(('I044'))) call s__Catalog_Write((BasicCatalog27_root),(('I045'))) call s__Catalog_Write((BasicCatalog27_root),(('I040'))) call s__Catalog_Write((BasicCatalog27_root),(('I041'))) call s__Catalog_Write((BasicCatalog27_root),(('I046'))) call s__Catalog_Write((BasicCatalog27_root),(('I047'))) call s__Catalog_Write((BasicCatalog27_root),(('I043'))) call s__Catalog_Write((BasicCatalog27_root),(('I05B'))) call s__Catalog_Write((BasicCatalog27_root),(('I048'))) call s__Catalog_Write((BasicCatalog27_root),(('I05C'))) call s__Catalog_Write((BasicCatalog27_root),(('I05D'))) call s__Catalog_Write((BasicCatalog27_root),(('I049'))) call s__Catalog_Write((BasicCatalog27_root),(('I059'))) call s__Catalog_Write((BasicCatalog27_root),(('I05F'))) call s__Catalog_Write((BasicCatalog27_root),(('I05G'))) call s__Catalog_Write((BasicCatalog27_root),(('I05A'))) call s__Catalog_Write((BasicCatalog27_root),(('I05V'))) call s__Catalog_Write((BasicCatalog27_root),(('I05H'))) call s__Catalog_Write((BasicCatalog27_root),(('I05U'))) call s__Catalog_Write((BasicCatalog27_root),(('I05W'))) call s__Catalog_Write((BasicCatalog27_root),(('I06Z'))) call s__Catalog_Write((BasicCatalog27_root),(('I06Y'))) call s__Catalog_Write((BasicCatalog27_root),(('I070'))) call s__Catalog_Write((BasicCatalog27_root),(('I071'))) call s__Catalog_Write((BasicCatalog27_root),(('I074'))) call s__Catalog_Write((BasicCatalog27_root),(('I072'))) call s__Catalog_Write((BasicCatalog27_root),(('I075'))) call s__Catalog_Write((BasicCatalog27_root),(('I076'))) call s__Catalog_Write((BasicCatalog27_root),(('I073'))) call s__Catalog_Write((BasicCatalog27_root),(('I079'))) call s__Catalog_Write((BasicCatalog27_root),(('I077'))) call s__Catalog_Write((BasicCatalog27_root),(('I078'))) call s__Catalog_Write((BasicCatalog27_root),(('I07A'))) call s__Catalog_Write((BasicCatalog27_root),(('I07K'))) call s__Catalog_Write((BasicCatalog27_root),(('I07L'))) call s__Catalog_Write((BasicCatalog27_root),(('I07E'))) call s__Catalog_Write((BasicCatalog27_root),(('I07F'))) call s__Catalog_Write((BasicCatalog27_root),(('I07H'))) call s__Catalog_Write((BasicCatalog27_root),(('I07D'))) call s__Catalog_Write((BasicCatalog27_root),(('I07C'))) call s__Catalog_Write((BasicCatalog27_root),(('I07B'))) call s__Catalog_Write((BasicCatalog27_root),(('I080'))) call s__Catalog_Write((BasicCatalog27_root),(('I081'))) call s__Catalog_Write((BasicCatalog27_root),(('I082'))) call s__Catalog_Write((BasicCatalog27_root),(('I09M'))) call s__Catalog_Write((BasicCatalog27_root),(('I086'))) call s__Catalog_Write((BasicCatalog27_root),(('I09O'))) call s__Catalog_Write((BasicCatalog27_root),(('I08C'))) call s__Catalog_Write((BasicCatalog27_root),(('I08H'))) call s__Catalog_Write((BasicCatalog27_root),(('I09Q'))) call s__Catalog_Write((BasicCatalog27_root),(('I07O'))) call s__Catalog_Write((BasicCatalog27_root),(('I07N'))) call s__Catalog_Write((BasicCatalog27_root),(('I07M'))) call s__Catalog_Write((BasicCatalog27_root),(('I07P'))) call s__Catalog_Write((BasicCatalog27_root),(('I07V'))) call s__Catalog_Write((BasicCatalog27_root),(('I07Z'))) call s__Catalog_Write((BasicCatalog27_root),(('I08F'))) call s__Catalog_Write((BasicCatalog27_root),(('I08A'))) call s__Catalog_Write((BasicCatalog27_root),(('I08B'))) call s__Catalog_Write((BasicCatalog27_root),(('I08J'))) call s__Catalog_Write((BasicCatalog27_root),(('I08D'))) call s__Catalog_Write((BasicCatalog27_root),(('I08R'))) call s__Catalog_Write((BasicCatalog27_root),(('I08E'))) call s__Catalog_Write((BasicCatalog27_root),(('I085'))) call s__Catalog_Write((BasicCatalog27_root),(('I087'))) call s__Catalog_Write((BasicCatalog27_root),(('I088'))) call s__Catalog_Write((BasicCatalog27_root),(('I089'))) call s__Catalog_Write((BasicCatalog27_root),(('I08G'))) call s__Catalog_Write((BasicCatalog27_root),(('I08I'))) call s__Catalog_Write((BasicCatalog27_root),(('I0AD'))) call s__Catalog_Write((BasicCatalog27_root),(('I07R'))) call s__Catalog_Write((BasicCatalog27_root),(('I09S'))) call s__Catalog_Write((BasicCatalog27_root),(('I07T'))) call s__Catalog_Write((BasicCatalog27_root),(('I07U'))) call s__Catalog_Write((BasicCatalog27_root),(('I07X'))) call s__Catalog_Write((BasicCatalog27_root),(('I07S'))) call s__Catalog_Write((BasicCatalog27_root),(('I09T'))) call s__Catalog_Write((BasicCatalog27_root),(('I07Q'))) call s__Catalog_Write((BasicCatalog27_root),(('I07W'))) call s__Catalog_Write((BasicCatalog27_root),(('I07Y'))) call s__Catalog_Write((BasicCatalog27_root),(('I07I'))) call s__Catalog_Write((BasicCatalog27_root),(('I07J'))) call s__Catalog_Write((BasicCatalog27_root),(('I03Z'))) call s__Catalog_Write((BasicCatalog27_root),(('I08L'))) call s__Catalog_Write((BasicCatalog27_root),(('I08M'))) call s__Catalog_Write((BasicCatalog27_root),(('I09P'))) call s__Catalog_Write((BasicCatalog27_root),(('I083'))) call s__Catalog_Write((BasicCatalog27_root),(('I084'))) call s__Catalog_Write((BasicCatalog27_root),(('I0AE'))) call s__Catalog_Write((BasicCatalog27_root),(('I067'))) call s__Catalog_Write((BasicCatalog27_root),(('I098'))) call s__Catalog_Write((BasicCatalog27_root),(('I096'))) call s__Catalog_Write((BasicCatalog27_root),(('I097'))) call s__Catalog_Write((BasicCatalog27_root),(('I099'))) call s__Catalog_Write((BasicCatalog27_root),(('I09A'))) call s__Catalog_Write((BasicCatalog27_root),(('I093'))) call s__Catalog_Write((BasicCatalog27_root),(('I0A1'))) call s__Catalog_Write((BasicCatalog27_root),(('I0A2'))) call s__Catalog_Write((BasicCatalog27_root),(('I0A3'))) call s__Catalog_Write((BasicCatalog27_root),(('I0A4'))) call s__Catalog_Write((BasicCatalog27_root),(('I0A5'))) call s__Catalog_Write((BasicCatalog27_root),(('I0A6'))) call s__Catalog_Write((BasicCatalog27_root),(('I0A7'))) call s__Catalog_Write((BasicCatalog27_root),(('I0A8'))) call s__Catalog_Write((BasicCatalog27_root),(('I0A9'))) call s__Catalog_Write((BasicCatalog27_root),(('I0AA'))) call s__Catalog_Write((BasicCatalog27_root),(('I0AC'))) call s__Catalog_Write((BasicCatalog27_root),(('I09C'))) call s__Catalog_Write((BasicCatalog27_root),(('I09B'))) call s__Catalog_Write((BasicCatalog27_root),(('I09H'))) call s__Catalog_Write((BasicCatalog27_root),(('I09K'))) call s__Catalog_Write((BasicCatalog27_root),(('I09J'))) call s__Catalog_Write((BasicCatalog27_root),(('I09G'))) call s__Catalog_Write((BasicCatalog27_root),(('I09I'))) call s__Catalog_Write((BasicCatalog27_root),(('I09L'))) call s__Catalog_Write((BasicCatalog27_root),(('I09E'))) call s__Catalog_Write((BasicCatalog27_root),(('I09F'))) call s__Catalog_Write((BasicCatalog27_root),(('I09D'))) call s__Catalog_Write((BasicCatalog27_root),(('I0AO'))) call s__Catalog_Write((BasicCatalog27_root),(('I0AN'))) call s__Catalog_Write((BasicCatalog27_root),(('I0AL'))) call s__Catalog_Write((BasicCatalog27_root),(('I0AU'))) endfunction function Init_BasicCatalog27_3 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('rlif'))) call s__Catalog_Write((BasicCatalog27_root),(('I08X'))) call s__Catalog_Write((BasicCatalog27_root),(('I06D'))) call s__Catalog_Write((BasicCatalog27_root),(('I0AV'))) call s__Catalog_Write((BasicCatalog27_root),(('I06E'))) call s__Catalog_Write((BasicCatalog27_root),(('cnob'))) call s__Catalog_Write((BasicCatalog27_root),(('ofro'))) call s__Catalog_Write((BasicCatalog27_root),(('modt'))) endfunction function Init_BasicCatalog27_4 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('ktrm'))) call s__Catalog_Write((BasicCatalog27_root),(('ches'))) call s__Catalog_Write((BasicCatalog27_root),(('kysn'))) call s__Catalog_Write((BasicCatalog27_root),(('dphe'))) endfunction function Init_BasicCatalog27_5 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('pmna'))) call s__Catalog_Write((BasicCatalog27_root),(('spsh'))) call s__Catalog_Write((BasicCatalog27_root),(('ciri'))) call s__Catalog_Write((BasicCatalog27_root),(('mort'))) call s__Catalog_Write((BasicCatalog27_root),(('prvt'))) call s__Catalog_Write((BasicCatalog27_root),(('hval'))) call s__Catalog_Write((BasicCatalog27_root),(('lgdh'))) call s__Catalog_Write((BasicCatalog27_root),(('ssil'))) call s__Catalog_Write((BasicCatalog27_root),(('dsum'))) call s__Catalog_Write((BasicCatalog27_root),(('bspd'))) call s__Catalog_Write((BasicCatalog27_root),(('mcou'))) call s__Catalog_Write((BasicCatalog27_root),(('evtl'))) call s__Catalog_Write((BasicCatalog27_root),(('rin1'))) call s__Catalog_Write((BasicCatalog27_root),(('kpin'))) call s__Catalog_Write((BasicCatalog27_root),(('phlt'))) endfunction function Init_BasicCatalog27_6 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('rwiz'))) endfunction function Init_BasicCatalog27_7 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('I092'))) call s__Catalog_Write((BasicCatalog27_root),(('I0AY'))) call s__Catalog_Write((BasicCatalog27_root),(('I0AZ'))) call s__Catalog_Write((BasicCatalog27_root),(('I0B0'))) call s__Catalog_Write((BasicCatalog27_root),(('I0B1'))) call s__Catalog_Write((BasicCatalog27_root),(('I0B2'))) call s__Catalog_Write((BasicCatalog27_root),(('I0B3'))) call s__Catalog_Write((BasicCatalog27_root),(('I0B4'))) call s__Catalog_Write((BasicCatalog27_root),(('I0B5'))) call s__Catalog_Write((BasicCatalog27_root),(('I0B6'))) endfunction function Init_BasicCatalog27_8 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('I0BH'))) call s__Catalog_Write((BasicCatalog27_root),(('I0BI'))) call s__Catalog_Write((BasicCatalog27_root),(('I0BJ'))) call s__Catalog_Write((BasicCatalog27_root),(('I0BK'))) endfunction function Init_BasicCatalog27_9 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('I0BM'))) call s__Catalog_Write((BasicCatalog27_root),(('I0BL'))) call s__Catalog_Write((BasicCatalog27_root),(('I0BO'))) call s__Catalog_Write((BasicCatalog27_root),(('I0BN'))) call s__Catalog_Write((BasicCatalog27_root),(('I0BP'))) call s__Catalog_Write((BasicCatalog27_root),(('I0C1'))) call s__Catalog_Write((BasicCatalog27_root),(('I0BU'))) call s__Catalog_Write((BasicCatalog27_root),(('I0BV'))) call s__Catalog_Write((BasicCatalog27_root),(('I0C0'))) call s__Catalog_Write((BasicCatalog27_root),(('I0BW'))) call s__Catalog_Write((BasicCatalog27_root),(('I0BX'))) call s__Catalog_Write((BasicCatalog27_root),(('I0BZ'))) call s__Catalog_Write((BasicCatalog27_root),(('I0BQ'))) call s__Catalog_Write((BasicCatalog27_root),(('I0BR'))) call s__Catalog_Write((BasicCatalog27_root),(('I0BS'))) call s__Catalog_Write((BasicCatalog27_root),(('I0BT'))) endfunction function Init_BasicCatalog27_10 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('I0C2'))) call s__Catalog_Write((BasicCatalog27_root),(('I0C3'))) call s__Catalog_Write((BasicCatalog27_root),(('I0C4'))) call s__Catalog_Write((BasicCatalog27_root),(('I0C5'))) call s__Catalog_Write((BasicCatalog27_root),(('I0C6'))) call s__Catalog_Write((BasicCatalog27_root),(('I0C7'))) call s__Catalog_Write((BasicCatalog27_root),(('I0C8'))) call s__Catalog_Write((BasicCatalog27_root),(('I0C9'))) call s__Catalog_Write((BasicCatalog27_root),(('I0CA'))) call s__Catalog_Write((BasicCatalog27_root),(('I0CB'))) call s__Catalog_Write((BasicCatalog27_root),(('I0CC'))) call s__Catalog_Write((BasicCatalog27_root),(('I0CE'))) endfunction function Init_BasicCatalog27_11 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('I0CU'))) endfunction function Init_BasicCatalog27_12 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('I0CR'))) call s__Catalog_Write((BasicCatalog27_root),(('I0CP'))) call s__Catalog_Write((BasicCatalog27_root),(('I0CG'))) call s__Catalog_Write((BasicCatalog27_root),(('crdt'))) call s__Catalog_Write((BasicCatalog27_root),(('I0CN'))) call s__Catalog_Write((BasicCatalog27_root),(('I0CM'))) call s__Catalog_Write((BasicCatalog27_root),(('I0CO'))) call s__Catalog_Write((BasicCatalog27_root),(('I0CS'))) call s__Catalog_Write((BasicCatalog27_root),(('I0CQ'))) endfunction function Init_BasicCatalog27_13 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('gobm'))) call s__Catalog_Write((BasicCatalog27_root),(('rump'))) endfunction function Init_BasicCatalog27_14 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('afac'))) call s__Catalog_Write((BasicCatalog27_root),(('odef'))) call s__Catalog_Write((BasicCatalog27_root),(('rag1'))) call s__Catalog_Write((BasicCatalog27_root),(('sbch'))) call s__Catalog_Write((BasicCatalog27_root),(('clsd'))) call s__Catalog_Write((BasicCatalog27_root),(('lhst'))) endfunction function Init_BasicCatalog27_15 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('ratc'))) call s__Catalog_Write((BasicCatalog27_root),(('rat6'))) call s__Catalog_Write((BasicCatalog27_root),(('ward'))) call s__Catalog_Write((BasicCatalog27_root),(('rat9'))) call s__Catalog_Write((BasicCatalog27_root),(('penr'))) call s__Catalog_Write((BasicCatalog27_root),(('rst1'))) call s__Catalog_Write((BasicCatalog27_root),(('k3m3'))) endfunction function Init_BasicCatalog27_16 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('ajen'))) call s__Catalog_Write((BasicCatalog27_root),(('bgst'))) call s__Catalog_Write((BasicCatalog27_root),(('rhth'))) call s__Catalog_Write((BasicCatalog27_root),(('hcun'))) endfunction function Init_BasicCatalog27_17 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('belv'))) call s__Catalog_Write((BasicCatalog27_root),(('crys'))) call s__Catalog_Write((BasicCatalog27_root),(('stel'))) call s__Catalog_Write((BasicCatalog27_root),(('rde2'))) call s__Catalog_Write((BasicCatalog27_root),(('rde3'))) call s__Catalog_Write((BasicCatalog27_root),(('clfm'))) call s__Catalog_Write((BasicCatalog27_root),(('gcel'))) endfunction function Init_BasicCatalog27_18 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('shhn'))) call s__Catalog_Write((BasicCatalog27_root),(('bfhr'))) call s__Catalog_Write((BasicCatalog27_root),(('stwa'))) call s__Catalog_Write((BasicCatalog27_root),(('blba'))) call s__Catalog_Write((BasicCatalog27_root),(('shcw'))) endfunction function Init_BasicCatalog27_19 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('lure'))) call s__Catalog_Write((BasicCatalog27_root),(('hbth'))) call s__Catalog_Write((BasicCatalog27_root),(('vddl'))) call s__Catalog_Write((BasicCatalog27_root),(('I0D1'))) call s__Catalog_Write((BasicCatalog27_root),(('I0D2'))) endfunction function Init_BasicCatalog27_20 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('pgin'))) call s__Catalog_Write((BasicCatalog27_root),(('rej4'))) call s__Catalog_Write((BasicCatalog27_root),(('sbok'))) call s__Catalog_Write((BasicCatalog27_root),(('rej6'))) call s__Catalog_Write((BasicCatalog27_root),(('srtl'))) call s__Catalog_Write((BasicCatalog27_root),(('clfm'))) call s__Catalog_Write((BasicCatalog27_root),(('sor1'))) call s__Catalog_Write((BasicCatalog27_root),(('rnsp'))) endfunction function Init_BasicCatalog27_21 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('I0D4'))) call s__Catalog_Write((BasicCatalog27_root),(('I0D5'))) endfunction function Init_BasicCatalog27_22 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('I0D6'))) call s__Catalog_Write((BasicCatalog27_root),(('I0D7'))) call s__Catalog_Write((BasicCatalog27_root),(('I0D8'))) endfunction function Init_BasicCatalog27_23 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('I0D9'))) endfunction function Init_BasicCatalog27_24 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('I0DA'))) endfunction function Init_BasicCatalog27_25 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('srbd'))) call s__Catalog_Write((BasicCatalog27_root),(('kymn'))) call s__Catalog_Write((BasicCatalog27_root),(('ledg'))) call s__Catalog_Write((BasicCatalog27_root),(('gmfr'))) call s__Catalog_Write((BasicCatalog27_root),(('sehr'))) call s__Catalog_Write((BasicCatalog27_root),(('cnhn'))) call s__Catalog_Write((BasicCatalog27_root),(('ckng'))) call s__Catalog_Write((BasicCatalog27_root),(('gopr'))) call s__Catalog_Write((BasicCatalog27_root),(('sorf'))) call s__Catalog_Write((BasicCatalog27_root),(('thle'))) call s__Catalog_Write((BasicCatalog27_root),(('skrt'))) call s__Catalog_Write((BasicCatalog27_root),(('tkno'))) call s__Catalog_Write((BasicCatalog27_root),(('tgxp'))) call s__Catalog_Write((BasicCatalog27_root),(('sksh'))) call s__Catalog_Write((BasicCatalog27_root),(('ram4'))) call s__Catalog_Write((BasicCatalog27_root),(('rej5'))) call s__Catalog_Write((BasicCatalog27_root),(('I0DH'))) call s__Catalog_Write((BasicCatalog27_root),(('I0DI'))) call s__Catalog_Write((BasicCatalog27_root),(('will'))) call s__Catalog_Write((BasicCatalog27_root),(('k3m1'))) call s__Catalog_Write((BasicCatalog27_root),(('dthb'))) call s__Catalog_Write((BasicCatalog27_root),(('sor6'))) call s__Catalog_Write((BasicCatalog27_root),(('sor7'))) call s__Catalog_Write((BasicCatalog27_root),(('rst1'))) call s__Catalog_Write((BasicCatalog27_root),(('sclp'))) call s__Catalog_Write((BasicCatalog27_root),(('sor5'))) call s__Catalog_Write((BasicCatalog27_root),(('sor4'))) call s__Catalog_Write((BasicCatalog27_root),(('sor3'))) call s__Catalog_Write((BasicCatalog27_root),(('bzbe'))) endfunction function Init_BasicCatalog27_26 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('rat3'))) call s__Catalog_Write((BasicCatalog27_root),(('rde4'))) call s__Catalog_Write((BasicCatalog27_root),(('kybl'))) call s__Catalog_Write((BasicCatalog27_root),(('jpnt'))) call s__Catalog_Write((BasicCatalog27_root),(('sor8'))) call s__Catalog_Write((BasicCatalog27_root),(('esaz'))) endfunction function Init_BasicCatalog27_27 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('sor9'))) call s__Catalog_Write((BasicCatalog27_root),(('ratf'))) call s__Catalog_Write((BasicCatalog27_root),(('bzbf'))) call s__Catalog_Write((BasicCatalog27_root),(('wtlg'))) call s__Catalog_Write((BasicCatalog27_root),(('shwd'))) call s__Catalog_Write((BasicCatalog27_root),(('glsk'))) endfunction function Init_BasicCatalog27_28 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('I0DR'))) call s__Catalog_Write((BasicCatalog27_root),(('I0DS'))) call s__Catalog_Write((BasicCatalog27_root),(('I0DT'))) call s__Catalog_Write((BasicCatalog27_root),(('I0DU'))) call s__Catalog_Write((BasicCatalog27_root),(('I0DV'))) call s__Catalog_Write((BasicCatalog27_root),(('I0DW'))) call s__Catalog_Write((BasicCatalog27_root),(('I0DX'))) call s__Catalog_Write((BasicCatalog27_root),(('I0DY'))) call s__Catalog_Write((BasicCatalog27_root),(('I0DZ'))) call s__Catalog_Write((BasicCatalog27_root),(('I0E0'))) call s__Catalog_Write((BasicCatalog27_root),(('I0E1'))) call s__Catalog_Write((BasicCatalog27_root),(('I0E2'))) call s__Catalog_Write((BasicCatalog27_root),(('I0E3'))) call s__Catalog_Write((BasicCatalog27_root),(('I0E4'))) call s__Catalog_Write((BasicCatalog27_root),(('I0E5'))) call s__Catalog_Write((BasicCatalog27_root),(('I0E6'))) call s__Catalog_Write((BasicCatalog27_root),(('I0E7'))) call s__Catalog_Write((BasicCatalog27_root),(('I0E8'))) call s__Catalog_Write((BasicCatalog27_root),(('I0E9'))) call s__Catalog_Write((BasicCatalog27_root),(('I0EA'))) call s__Catalog_Write((BasicCatalog27_root),(('I0EB'))) call s__Catalog_Write((BasicCatalog27_root),(('I0EC'))) call s__Catalog_Write((BasicCatalog27_root),(('I0ED'))) call s__Catalog_Write((BasicCatalog27_root),(('I0EE'))) call s__Catalog_Write((BasicCatalog27_root),(('I0EF'))) endfunction function Init_BasicCatalog27_29 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('azhr'))) call s__Catalog_Write((BasicCatalog27_root),(('dkfw'))) endfunction function Init_BasicCatalog27_30 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('I0EX'))) call s__Catalog_Write((BasicCatalog27_root),(('I0F5'))) call s__Catalog_Write((BasicCatalog27_root),(('I0EW'))) call s__Catalog_Write((BasicCatalog27_root),(('I0F4'))) call s__Catalog_Write((BasicCatalog27_root),(('I0F6'))) call s__Catalog_Write((BasicCatalog27_root),(('I0EV'))) call s__Catalog_Write((BasicCatalog27_root),(('I0EU'))) call s__Catalog_Write((BasicCatalog27_root),(('I0ES'))) call s__Catalog_Write((BasicCatalog27_root),(('I0ET'))) call s__Catalog_Write((BasicCatalog27_root),(('I0F7'))) call s__Catalog_Write((BasicCatalog27_root),(('I0FC'))) call s__Catalog_Write((BasicCatalog27_root),(('I0FB'))) call s__Catalog_Write((BasicCatalog27_root),(('I0F8'))) call s__Catalog_Write((BasicCatalog27_root),(('I0F3'))) call s__Catalog_Write((BasicCatalog27_root),(('I0F9'))) call s__Catalog_Write((BasicCatalog27_root),(('I0FD'))) call s__Catalog_Write((BasicCatalog27_root),(('I0F1'))) call s__Catalog_Write((BasicCatalog27_root),(('I0F0'))) call s__Catalog_Write((BasicCatalog27_root),(('I0CH'))) call s__Catalog_Write((BasicCatalog27_root),(('I0FA'))) call s__Catalog_Write((BasicCatalog27_root),(('I0EZ'))) call s__Catalog_Write((BasicCatalog27_root),(('I0F2'))) call s__Catalog_Write((BasicCatalog27_root),(('I0EY'))) call s__Catalog_Write((BasicCatalog27_root),(('I05U'))) call s__Catalog_Write((BasicCatalog27_root),(('rre2'))) endfunction function Init_BasicCatalog27_31 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('I0FF'))) call s__Catalog_Write((BasicCatalog27_root),(('I0FH'))) call s__Catalog_Write((BasicCatalog27_root),(('I0FG'))) call s__Catalog_Write((BasicCatalog27_root),(('I0FK'))) endfunction function Init_BasicCatalog27_32 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('I0FL'))) call s__Catalog_Write((BasicCatalog27_root),(('I0FO'))) call s__Catalog_Write((BasicCatalog27_root),(('I0FN'))) call s__Catalog_Write((BasicCatalog27_root),(('I0FM'))) call s__Catalog_Write((BasicCatalog27_root),(('I0FP'))) endfunction function Init_BasicCatalog27_33 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('rhe3'))) call s__Catalog_Write((BasicCatalog27_root),(('I0FR'))) call s__Catalog_Write((BasicCatalog27_root),(('I0G4'))) call s__Catalog_Write((BasicCatalog27_root),(('I0AP'))) call s__Catalog_Write((BasicCatalog27_root),(('I0FX'))) call s__Catalog_Write((BasicCatalog27_root),(('I0FY'))) call s__Catalog_Write((BasicCatalog27_root),(('I0FZ'))) call s__Catalog_Write((BasicCatalog27_root),(('I0G0'))) call s__Catalog_Write((BasicCatalog27_root),(('I0G1'))) call s__Catalog_Write((BasicCatalog27_root),(('I0G2'))) call s__Catalog_Write((BasicCatalog27_root),(('spre'))) call s__Catalog_Write((BasicCatalog27_root),(('rma2'))) call s__Catalog_Write((BasicCatalog27_root),(('I0FV'))) call s__Catalog_Write((BasicCatalog27_root),(('I0AR'))) call s__Catalog_Write((BasicCatalog27_root),(('fwss'))) call s__Catalog_Write((BasicCatalog27_root),(('gfor'))) call s__Catalog_Write((BasicCatalog27_root),(('I0EO'))) call s__Catalog_Write((BasicCatalog27_root),(('I0FW'))) call s__Catalog_Write((BasicCatalog27_root),(('I0AQ'))) call s__Catalog_Write((BasicCatalog27_root),(('I0AM'))) call s__Catalog_Write((BasicCatalog27_root),(('ledg'))) call s__Catalog_Write((BasicCatalog27_root),(('I0FU'))) call s__Catalog_Write((BasicCatalog27_root),(('I0G3'))) endfunction function Init_BasicCatalog27_34 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('I0GR'))) call s__Catalog_Write((BasicCatalog27_root),(('I0GQ'))) call s__Catalog_Write((BasicCatalog27_root),(('I0GM'))) call s__Catalog_Write((BasicCatalog27_root),(('I0GP'))) call s__Catalog_Write((BasicCatalog27_root),(('I0GO'))) call s__Catalog_Write((BasicCatalog27_root),(('I0GN'))) call s__Catalog_Write((BasicCatalog27_root),(('I0GC'))) call s__Catalog_Write((BasicCatalog27_root),(('I0GE'))) call s__Catalog_Write((BasicCatalog27_root),(('I0GG'))) call s__Catalog_Write((BasicCatalog27_root),(('I0GF'))) call s__Catalog_Write((BasicCatalog27_root),(('I0GB'))) call s__Catalog_Write((BasicCatalog27_root),(('I0GD'))) call s__Catalog_Write((BasicCatalog27_root),(('I0GI'))) call s__Catalog_Write((BasicCatalog27_root),(('I0GH'))) call s__Catalog_Write((BasicCatalog27_root),(('I0GJ'))) call s__Catalog_Write((BasicCatalog27_root),(('I0GK'))) call s__Catalog_Write((BasicCatalog27_root),(('I0GL'))) call s__Catalog_Write((BasicCatalog27_root),(('I0GS'))) call s__Catalog_Write((BasicCatalog27_root),(('I0GT'))) call s__Catalog_Write((BasicCatalog27_root),(('I0GU'))) call s__Catalog_Write((BasicCatalog27_root),(('I0GV'))) call s__Catalog_Write((BasicCatalog27_root),(('I0GX'))) call s__Catalog_Write((BasicCatalog27_root),(('I0GW'))) call s__Catalog_Write((BasicCatalog27_root),(('I0GY'))) call s__Catalog_Write((BasicCatalog27_root),(('I0GZ'))) call s__Catalog_Write((BasicCatalog27_root),(('I0H1'))) call s__Catalog_Write((BasicCatalog27_root),(('I0H0'))) call s__Catalog_Write((BasicCatalog27_root),(('shas'))) call s__Catalog_Write((BasicCatalog27_root),(('rnec'))) call s__Catalog_Write((BasicCatalog27_root),(('vamp'))) call s__Catalog_Write((BasicCatalog27_root),(('skul'))) call s__Catalog_Write((BasicCatalog27_root),(('tsct'))) call s__Catalog_Write((BasicCatalog27_root),(('tcas'))) call s__Catalog_Write((BasicCatalog27_root),(('plcl'))) call s__Catalog_Write((BasicCatalog27_root),(('I0H2'))) endfunction function Init_BasicCatalog27_35 takes nothing returns nothing call s__Catalog_Write((BasicCatalog27_root),(('wneu'))) call s__Catalog_Write((BasicCatalog27_root),(('silk'))) call s__Catalog_Write((BasicCatalog27_root),(('tret'))) call s__Catalog_Write((BasicCatalog27_root),(('moon'))) call s__Catalog_Write((BasicCatalog27_root),(('pinv'))) call s__Catalog_Write((BasicCatalog27_root),(('ocor'))) call s__Catalog_Write((BasicCatalog27_root),(('rots'))) call s__Catalog_Write((BasicCatalog27_root),(('frhg'))) endfunction function Init_BasicCatalog28 takes integer v returns nothing call s__Catalog_Write((BasicCatalog28_root),(v)) endfunction function Init_BasicCatalog28_1 takes nothing returns nothing set BasicCatalog28_root=s__Catalog_create() call s__Catalog_copy((BasicCatalog28_root),(BasicCatalog27_root)) call ExecuteFunc("Init_BasicCatalog28_36") endfunction function Init_BasicCatalog28_36 takes nothing returns nothing call s__Catalog_Write((BasicCatalog28_root),(('k3m2'))) call s__Catalog_Write((BasicCatalog28_root),(('cosl'))) call s__Catalog_Write((BasicCatalog28_root),(('mgtk'))) call s__Catalog_Write((BasicCatalog28_root),(('gldo'))) call s__Catalog_Write((BasicCatalog28_root),(('flag'))) call s__Catalog_Write((BasicCatalog28_root),(('kygh'))) call s__Catalog_Write((BasicCatalog28_root),(('oslo'))) call s__Catalog_Write((BasicCatalog28_root),(('mlst'))) call s__Catalog_Write((BasicCatalog28_root),(('thdm'))) call s__Catalog_Write((BasicCatalog28_root),(('arsh'))) call s__Catalog_Write((BasicCatalog28_root),(('brag'))) call s__Catalog_Write((BasicCatalog28_root),(('engs'))) call s__Catalog_Write((BasicCatalog28_root),(('jdrn'))) call s__Catalog_Write((BasicCatalog28_root),(('kgal'))) call s__Catalog_Write((BasicCatalog28_root),(('frgd'))) endfunction //added by rus function Init_BasicCatalog29 takes integer v returns nothing call s__Catalog_Write((BasicCatalog29_root),(v)) endfunction function Init_BasicCatalog29_1 takes nothing returns nothing set BasicCatalog29_root=s__Catalog_create() call s__Catalog_copy((BasicCatalog29_root),(BasicCatalog28_root)) call ExecuteFunc("Init_BasicCatalog29_37") endfunction function Init_BasicCatalog29_37 takes nothing returns nothing call s__Catalog_Write((BasicCatalog29_root),(('I09Y'))) call s__Catalog_Write((BasicCatalog29_root),(('I0A0'))) call s__Catalog_Write((BasicCatalog29_root),(('I0CF'))) call s__Catalog_Write((BasicCatalog29_root),(('I0CT'))) call s__Catalog_Write((BasicCatalog29_root),(('I0DM'))) call s__Catalog_Write((BasicCatalog29_root),(('I0DO'))) call s__Catalog_Write((BasicCatalog29_root),(('I0H7'))) call s__Catalog_Write((BasicCatalog29_root),(('I0H8'))) call s__Catalog_Write((BasicCatalog29_root),(('I0H9'))) call s__Catalog_Write((BasicCatalog29_root),(('I0HA'))) call s__Catalog_Write((BasicCatalog29_root),(('I0HB'))) call s__Catalog_Write((BasicCatalog29_root),(('I0HC'))) call s__Catalog_Write((BasicCatalog29_root),(('I0HD'))) call s__Catalog_Write((BasicCatalog29_root),(('I0HE'))) call s__Catalog_Write((BasicCatalog29_root),(('I0HF'))) call s__Catalog_Write((BasicCatalog29_root),(('I0HG'))) call s__Catalog_Write((BasicCatalog29_root),(('I0HH'))) call s__Catalog_Write((BasicCatalog29_root),(('I0HI'))) call s__Catalog_Write((BasicCatalog29_root),(('I0HJ'))) call s__Catalog_Write((BasicCatalog29_root),(('I0HK'))) call s__Catalog_Write((BasicCatalog29_root),(('I0HL'))) call s__Catalog_Write((BasicCatalog29_root),(('I0HM'))) call s__Catalog_Write((BasicCatalog29_root),(('I0HN'))) call s__Catalog_Write((BasicCatalog29_root),(('I0HO'))) call s__Catalog_Write((BasicCatalog29_root),(('I0HP'))) endfunction function BasicCatalog_onInit takes nothing returns nothing call ExecuteFunc("Init_BasicCatalog27_1") call ExecuteFunc("Init_BasicCatalog27_2") call ExecuteFunc("Init_BasicCatalog27_3") call ExecuteFunc("Init_BasicCatalog27_4") call ExecuteFunc("Init_BasicCatalog27_5") call ExecuteFunc("Init_BasicCatalog27_6") call ExecuteFunc("Init_BasicCatalog27_7") call ExecuteFunc("Init_BasicCatalog27_8") call ExecuteFunc("Init_BasicCatalog27_9") call ExecuteFunc("Init_BasicCatalog27_10") call ExecuteFunc("Init_BasicCatalog27_11") call ExecuteFunc("Init_BasicCatalog27_12") call ExecuteFunc("Init_BasicCatalog27_13") call ExecuteFunc("Init_BasicCatalog27_14") call ExecuteFunc("Init_BasicCatalog27_15") call ExecuteFunc("Init_BasicCatalog27_16") call ExecuteFunc("Init_BasicCatalog27_17") call ExecuteFunc("Init_BasicCatalog27_18") call ExecuteFunc("Init_BasicCatalog27_19") call ExecuteFunc("Init_BasicCatalog27_20") call ExecuteFunc("Init_BasicCatalog27_21") call ExecuteFunc("Init_BasicCatalog27_22") call ExecuteFunc("Init_BasicCatalog27_23") call ExecuteFunc("Init_BasicCatalog27_24") call ExecuteFunc("Init_BasicCatalog27_25") call ExecuteFunc("Init_BasicCatalog27_26") call ExecuteFunc("Init_BasicCatalog27_27") call ExecuteFunc("Init_BasicCatalog27_28") call ExecuteFunc("Init_BasicCatalog27_29") call ExecuteFunc("Init_BasicCatalog27_30") call ExecuteFunc("Init_BasicCatalog27_31") call ExecuteFunc("Init_BasicCatalog27_32") call ExecuteFunc("Init_BasicCatalog27_33") call ExecuteFunc("Init_BasicCatalog27_34") call ExecuteFunc("Init_BasicCatalog27_35") call ExecuteFunc("Init_BasicCatalog28_1") call ExecuteFunc("Init_BasicCatalog29_1") endfunction //hero catalog function HeroCatalog__WRITE_01 takes integer v returns nothing call s__Catalog_Write(HeroCatalog_01,v) endfunction function HeroCatalog__Register_01 takes nothing returns nothing call s__Catalog_Write(HeroCatalog_01,('H000')) call s__Catalog_Write(HeroCatalog_01,('H001')) call s__Catalog_Write(HeroCatalog_01,('H002')) call s__Catalog_Write(HeroCatalog_01,('H003')) call s__Catalog_Write(HeroCatalog_01,('H004')) call s__Catalog_Write(HeroCatalog_01,('H005')) call s__Catalog_Write(HeroCatalog_01,('H006')) call s__Catalog_Write(HeroCatalog_01,('H007')) call s__Catalog_Write(HeroCatalog_01,('H008')) call s__Catalog_Write(HeroCatalog_01,('H009')) call s__Catalog_Write(HeroCatalog_01,('H00E')) call s__Catalog_Write(HeroCatalog_01,('H00H')) call s__Catalog_Write(HeroCatalog_01,('H00Z')) call s__Catalog_Write(HeroCatalog_01,('Udea')) call s__Catalog_Write(HeroCatalog_01,('Hmkg')) call s__Catalog_Write(HeroCatalog_01,('Hamg')) call s__Catalog_Write(HeroCatalog_01,('H00J')) call s__Catalog_Write(HeroCatalog_01,('H015')) call s__Catalog_Write(HeroCatalog_01,('Hblm')) call s__Catalog_Write(HeroCatalog_01,('H01H')) call s__Catalog_Write(HeroCatalog_01,('H01I')) call s__Catalog_Write(HeroCatalog_01,('H01N')) call s__Catalog_Write(HeroCatalog_01,('H01U')) call s__Catalog_Write(HeroCatalog_01,('H01V')) call s__Catalog_Write(HeroCatalog_01,('H01W')) call s__Catalog_Write(HeroCatalog_01,('H01X')) call s__Catalog_Write(HeroCatalog_01,('H01Y')) endfunction function HeroCatalog__Init_01 takes nothing returns nothing set HeroCatalog_01=s__Catalog_create() call ExecuteFunc("HeroCatalog__Register_01") endfunction function HeroCatalog_onInit takes nothing returns nothing call HeroCatalog__Init_01() endfunction //end hero catalog //misc catalog function Init_MiscCatalog17 takes integer v returns nothing call s__Catalog_Write((MiscCatalog17_root),(v)) endfunction function Init_MiscCatalog17_1 takes nothing returns nothing set MiscCatalog17_root=s__Catalog_create() call ExecuteFunc("Init_MiscCatalog17_2") call ExecuteFunc("Init_MiscCatalog17_3") endfunction function Init_MiscCatalog17_2 takes nothing returns nothing call s__Catalog_Write((MiscCatalog17_root),(('I002'))) call s__Catalog_Write((MiscCatalog17_root),(('I08Q'))) call s__Catalog_Write((MiscCatalog17_root),(('I05L'))) call s__Catalog_Write((MiscCatalog17_root),(('I095'))) call s__Catalog_Write((MiscCatalog17_root),(('I05X'))) call s__Catalog_Write((MiscCatalog17_root),(('I06V'))) call s__Catalog_Write((MiscCatalog17_root),(('I06W'))) call s__Catalog_Write((MiscCatalog17_root),(('I08O'))) call s__Catalog_Write((MiscCatalog17_root),(('I06P'))) call s__Catalog_Write((MiscCatalog17_root),(('I06Q'))) call s__Catalog_Write((MiscCatalog17_root),(('I06O'))) call s__Catalog_Write((MiscCatalog17_root),(('I06U'))) call s__Catalog_Write((MiscCatalog17_root),(('I062'))) call s__Catalog_Write((MiscCatalog17_root),(('I08N'))) call s__Catalog_Write((MiscCatalog17_root),(('I06J'))) call s__Catalog_Write((MiscCatalog17_root),(('I06T'))) call s__Catalog_Write((MiscCatalog17_root),(('I061'))) call s__Catalog_Write((MiscCatalog17_root),(('I00X'))) call s__Catalog_Write((MiscCatalog17_root),(('I08K'))) call s__Catalog_Write((MiscCatalog17_root),(('I060'))) call s__Catalog_Write((MiscCatalog17_root),(('I07G'))) call s__Catalog_Write((MiscCatalog17_root),(('I06R'))) call s__Catalog_Write((MiscCatalog17_root),(('I06S'))) call s__Catalog_Write((MiscCatalog17_root),(('I06X'))) call s__Catalog_Write((MiscCatalog17_root),(('I068'))) call s__Catalog_Write((MiscCatalog17_root),(('I06I'))) call s__Catalog_Write((MiscCatalog17_root),(('I08P'))) call s__Catalog_Write((MiscCatalog17_root),(('I06K'))) call s__Catalog_Write((MiscCatalog17_root),(('I0AB'))) call s__Catalog_Write((MiscCatalog17_root),(('I09N'))) call s__Catalog_Write((MiscCatalog17_root),(('I0AS'))) call s__Catalog_Write((MiscCatalog17_root),(('I0AT'))) call s__Catalog_Write((MiscCatalog17_root),(('tels'))) call s__Catalog_Write((MiscCatalog17_root),(('stpg'))) call s__Catalog_Write((MiscCatalog17_root),(('I0BY'))) call s__Catalog_Write((MiscCatalog17_root),(('I0CD'))) call s__Catalog_Write((MiscCatalog17_root),(('sror'))) call s__Catalog_Write((MiscCatalog17_root),(('I0CJ'))) call s__Catalog_Write((MiscCatalog17_root),(('I0CK'))) call s__Catalog_Write((MiscCatalog17_root),(('rej1'))) call s__Catalog_Write((MiscCatalog17_root),(('grsl'))) call s__Catalog_Write((MiscCatalog17_root),(('nflg'))) call s__Catalog_Write((MiscCatalog17_root),(('shdt'))) call s__Catalog_Write((MiscCatalog17_root),(('tmmt'))) call s__Catalog_Write((MiscCatalog17_root),(('oli2'))) call s__Catalog_Write((MiscCatalog17_root),(('lnrn'))) call s__Catalog_Write((MiscCatalog17_root),(('amrc'))) call s__Catalog_Write((MiscCatalog17_root),(('shen'))) call s__Catalog_Write((MiscCatalog17_root),(('ccmd'))) call s__Catalog_Write((MiscCatalog17_root),(('dtsb'))) call s__Catalog_Write((MiscCatalog17_root),(('olig'))) call s__Catalog_Write((MiscCatalog17_root),(('stre'))) call s__Catalog_Write((MiscCatalog17_root),(('envl'))) call s__Catalog_Write((MiscCatalog17_root),(('drph'))) call s__Catalog_Write((MiscCatalog17_root),(('gvsm'))) call s__Catalog_Write((MiscCatalog17_root),(('rugt'))) call s__Catalog_Write((MiscCatalog17_root),(('mnsf'))) call s__Catalog_Write((MiscCatalog17_root),(('oven'))) call s__Catalog_Write((MiscCatalog17_root),(('nspi'))) call s__Catalog_Write((MiscCatalog17_root),(('rde1'))) call s__Catalog_Write((MiscCatalog17_root),(('wswd'))) call s__Catalog_Write((MiscCatalog17_root),(('wshs'))) call s__Catalog_Write((MiscCatalog17_root),(('fgrg'))) call s__Catalog_Write((MiscCatalog17_root),(('sand'))) call s__Catalog_Write((MiscCatalog17_root),(('shar'))) call s__Catalog_Write((MiscCatalog17_root),(('pomn'))) call s__Catalog_Write((MiscCatalog17_root),(('ofir'))) call s__Catalog_Write((MiscCatalog17_root),(('shtm'))) call s__Catalog_Write((MiscCatalog17_root),(('pres'))) call s__Catalog_Write((MiscCatalog17_root),(('wcyc'))) call s__Catalog_Write((MiscCatalog17_root),(('infs'))) call s__Catalog_Write((MiscCatalog17_root),(('I08O'))) call s__Catalog_Write((MiscCatalog17_root),(('sor2'))) call s__Catalog_Write((MiscCatalog17_root),(('sora'))) call s__Catalog_Write((MiscCatalog17_root),(('ram1'))) call s__Catalog_Write((MiscCatalog17_root),(('soul'))) call s__Catalog_Write((MiscCatalog17_root),(('I08P'))) call s__Catalog_Write((MiscCatalog17_root),(('mcri'))) call s__Catalog_Write((MiscCatalog17_root),(('I08N'))) call s__Catalog_Write((MiscCatalog17_root),(('gsou'))) call s__Catalog_Write((MiscCatalog17_root),(('I09N'))) call s__Catalog_Write((MiscCatalog17_root),(('I0DG'))) call s__Catalog_Write((MiscCatalog17_root),(('rej2'))) call s__Catalog_Write((MiscCatalog17_root),(('I0EG'))) call s__Catalog_Write((MiscCatalog17_root),(('ssan'))) call s__Catalog_Write((MiscCatalog17_root),(('I0ER'))) call s__Catalog_Write((MiscCatalog17_root),(('I0EQ'))) call s__Catalog_Write((MiscCatalog17_root),(('wlsd'))) call s__Catalog_Write((MiscCatalog17_root),(('rej3'))) call s__Catalog_Write((MiscCatalog17_root),(('fgsk'))) call s__Catalog_Write((MiscCatalog17_root),(('tgrh'))) endfunction function Init_MiscCatalog17_3 takes nothing returns nothing call s__Catalog_Write((MiscCatalog17_root),(('shea'))) endfunction //item max charges function Init_Item_save_Charges takes nothing returns nothing set Item_save_Charges=malloc() set Item_load_not=malloc() call SaveBoolean(BYHT,Item_save_Charges,'I04W',true) call SaveBoolean(BYHT,Item_save_Charges,'I04X',true) call SaveBoolean(BYHT,Item_save_Charges,'I04V',true) call SaveBoolean(BYHT,Item_save_Charges,'I04U',true) call SaveBoolean(BYHT,Item_save_Charges,'I04Y',true) call SaveBoolean(BYHT,Item_load_not,'I0EC',true) call SaveBoolean(BYHT,Item_load_not,'I0E7',true) call SaveBoolean(BYHT,Item_load_not,'I0AU',true) call SaveBoolean(BYHT,Item_load_not,'I0E8',true) call SaveBoolean(BYHT,Item_load_not,'I09G',true) endfunction //misc catalog 18 added by rus guy function Init_MiscCatalog18 takes integer asdf returns nothing call s__Catalog_Write((MiscCatalog18_root),(asdf)) endfunction function Init_MiscCatalog18_1 takes nothing returns nothing set MiscCatalog18_root=s__Catalog_create() call ExecuteFunc("Init_MiscCatalog18_2") endfunction function Init_MiscCatalog18_2 takes nothing returns nothing call s__Catalog_Write((MiscCatalog18_root),(('I02E'))) call s__Catalog_Write((MiscCatalog18_root),(('I02S'))) call s__Catalog_Write((MiscCatalog18_root),(('I02T'))) call s__Catalog_Write((MiscCatalog18_root),(('I02U'))) call s__Catalog_Write((MiscCatalog18_root),(('I02V'))) call s__Catalog_Write((MiscCatalog18_root),(('I02W'))) call s__Catalog_Write((MiscCatalog18_root),(('I02X'))) call s__Catalog_Write((MiscCatalog18_root),(('I02Z'))) call s__Catalog_Write((MiscCatalog18_root),(('I032'))) call s__Catalog_Write((MiscCatalog18_root),(('I033'))) call s__Catalog_Write((MiscCatalog18_root),(('I034'))) call s__Catalog_Write((MiscCatalog18_root),(('I036'))) call s__Catalog_Write((MiscCatalog18_root),(('I06C'))) call s__Catalog_Write((MiscCatalog18_root),(('I09R'))) endfunction function MiscCatalog_onInit takes nothing returns nothing call ExecuteFunc("Init_MiscCatalog17_1") call ExecuteFunc("Init_MiscCatalog18_1") call ExecuteFunc("Init_Item_save_Charges") endfunction //end misc function s__Sound_list_create takes string fileName,boolean looping,boolean is3D,boolean stopwhenoutofrange,integer fadeInRate,integer fadeOutRate,string eaxSetting returns integer local integer t=s__Sound_list__allocate() set s__Sound_list_Name[t]=fileName set s__Sound_list_isloop[t]=looping set s__Sound_list_is3D[t]=is3D set s__Sound_list_stopwhenoutofrange[t]=stopwhenoutofrange set s__Sound_list_fadeInRate[t]=fadeInRate set s__Sound_list_fadeOutRate[t]=fadeOutRate set s__Sound_list_eaxSetting[t]=eaxSetting return t endfunction function CreateSound_BJ takes string fileName,boolean looping,boolean is3D,boolean stopwhenoutofrange,integer fadeInRate,integer fadeOutRate,string eaxSetting returns sound local integer t=s__Sound_list_create(fileName,looping,is3D,stopwhenoutofrange,fadeInRate,fadeOutRate,eaxSetting) set s__Sound_list_Sound=CreateSound(fileName,looping,is3D,stopwhenoutofrange,fadeInRate,fadeOutRate,eaxSetting) call SaveInteger(BYHT,SoundUtils__Ht,GetHandleId(s__Sound_list_Sound),t) return s__Sound_list_Sound endfunction function SetSoundParamsFromLabel_BJ takes sound soundHandle,string soundLabel returns nothing local integer t=LoadInteger(BYHT,SoundUtils__Ht,GetHandleId(soundHandle)) call SetSoundParamsFromLabel(soundHandle,soundLabel) if(t!=null)then set s__Sound_list_Label[t]=soundLabel endif endfunction function SetSoundChannel_BJ takes sound soundHandle,integer channel returns nothing local integer t=LoadInteger(BYHT,SoundUtils__Ht,GetHandleId(soundHandle)) call SetSoundChannel(soundHandle,channel) if(t!=null)then set s__Sound_list_channel[t]=channel endif endfunction function SetSoundDuration_BJ takes sound soundHandle,integer duration returns nothing local integer t=LoadInteger(BYHT,SoundUtils__Ht,GetHandleId(soundHandle)) call SetSoundDuration(soundHandle,duration) if(t!=null)then set s__Sound_list_duration[t]=duration endif endfunction function SetSoundVolume_BJ takes sound soundHandle,integer volume returns nothing local integer t=LoadInteger(BYHT,SoundUtils__Ht,GetHandleId(soundHandle)) call SetSoundVolume(soundHandle,volume) if(t!=null)then set s__Sound_list_volume[t]=volume endif endfunction function SetSoundPitch_BJ takes sound soundHandle,real pitch returns nothing local integer t=LoadInteger(BYHT,SoundUtils__Ht,GetHandleId(soundHandle)) call SetSoundPitch(soundHandle,pitch) if(t!=null)then set s__Sound_list_pitch[t]=pitch endif endfunction function SetSoundDistances_BJ takes sound soundHandle,real minDist,real maxDist returns nothing local integer t=LoadInteger(BYHT,SoundUtils__Ht,GetHandleId(soundHandle)) call SetSoundDistances(soundHandle,minDist,maxDist) if(t!=null)then set s__Sound_list_minDist[t]=minDist set s__Sound_list_maxDist[t]=maxDist endif endfunction function SetSoundPosition_BJ takes sound soundHandle,real x,real y,real z returns nothing local integer t=LoadInteger(BYHT,SoundUtils__Ht,GetHandleId(soundHandle)) call SetSoundPosition(soundHandle,x,y,z) if(t!=null)then set s__Sound_list_x[t]=x set s__Sound_list_y[t]=y set s__Sound_list_z[t]=z endif endfunction function AttachSoundToUnit_BJ takes sound soundHandle,unit whichUnit returns nothing local integer t=LoadInteger(BYHT,SoundUtils__Ht,GetHandleId(soundHandle)) call AttachSoundToUnit(soundHandle,whichUnit) if(t!=null)then set s__Sound_list_whichUnit[t]=whichUnit endif endfunction function SetSoundDistanceCutoff_BJ takes sound soundHandle,real cutoff returns nothing local integer t=LoadInteger(BYHT,SoundUtils__Ht,GetHandleId(soundHandle)) call SetSoundDistanceCutoff(soundHandle,cutoff) if(t!=null)then set s__Sound_list_cutoff[t]=cutoff endif endfunction function StartSound_func takes nothing returns nothing local integer soundHandle=(alloc__hpv(GetHandleId((GetExpiredTimer())))) call KillSoundWhenDone(ConvertVersion(soundHandle)) endfunction function StartSound_BJ takes sound soundHandle,boolean b returns nothing local integer t=LoadInteger(BYHT,SoundUtils__Ht,GetHandleId(soundHandle)) if(t!=null)then set soundHandle=CreateSound(s__Sound_list_Name[t],s__Sound_list_isloop[t],s__Sound_list_is3D[t],s__Sound_list_stopwhenoutofrange[t],s__Sound_list_fadeInRate[t],s__Sound_list_fadeOutRate[t],s__Sound_list_eaxSetting[t]) call SetSoundDuration(soundHandle,s__Sound_list_duration[t]) call SetSoundChannel(soundHandle,s__Sound_list_channel[t]) call SetSoundVolume(soundHandle,s__Sound_list_volume[t]) call SetSoundPitch(soundHandle,s__Sound_list_pitch[t]) if(s__Sound_list_is3D[t])then if(b)then call AttachSoundToUnit(soundHandle,s__Sound_list_whichUnit[t]) else call SetSoundPosition(soundHandle,s__Sound_list_x[t],s__Sound_list_y[t],s__Sound_list_z[t]) endif if(s__Sound_list_minDist[t]>0)then call SetSoundDistances(soundHandle,s__Sound_list_minDist[t],s__Sound_list_maxDist[t]) endif if(s__Sound_list_cutoff[t]>0)then call SetSoundDistanceCutoff(soundHandle,s__Sound_list_cutoff[t]) endif endif call TimerStart(NewTimer(GetHandleId(soundHandle)),s__Sound_list_duration[t]*.001,false,function StartSound_func) endif call StartSound(soundHandle) endfunction function PlaySoundAtPoint_BJ takes sound soundHandle,real volume,real x,real y,real z returns nothing call SetSoundPosition_BJ(soundHandle,x,y,z) call SetSoundVolume_BJ(soundHandle,R2I(volume*1.27)) call StartSound_BJ(soundHandle,false) endfunction function PlaySoundOnUnit_BJ takes sound soundHandle,real volume,unit whichUnit returns nothing call AttachSoundToUnit_BJ(soundHandle,whichUnit) call SetSoundVolume_BJ(soundHandle,R2I(volume*1.27)) call StartSound_BJ(soundHandle,true) endfunction function PlaySoundAtPointLoc_BJ takes sound soundHandle,real volume,location loc,real z returns nothing call PlaySoundAtPoint_BJ(soundHandle,volume,GetLocationX(loc),GetLocationY(loc),GetLocationZ(loc)+z) endfunction function SoundUtils_onInit takes nothing returns nothing if(SoundUtils__Ht==null)then set SoundUtils__Ht=malloc() endif call ExecuteFunc("InitSounds") endfunction function StringMove takes string s,string matchedstr,integer f4v,integer DDv returns string local integer p=StringLength(matchedstr) local integer i=StringLength(s) local integer m=DDv if(0=i or 0==f4v if(matchedstr==SubString(s,m,m+p))then set f4v=f4v-1 set s=SubString(s,0,m)+SubString(s,m+p,StringLength(s)) set i=i-1 else set m=m+1 endif endloop endif return s endfunction function StringAscii takes string s returns integer local integer a if("\\"==s)then return 92 endif set a=string__R[StringHash(s)/ $1F0748+$3EA] if(s!=string__I[a])then if(0==a)then return 0 endif return a+32 endif return a endfunction function string__StringAsciiInit takes nothing returns nothing set string__R[931]=8 set string__R[$433]=9 set string__R[$632]=$A set string__R[$53C]=$C set string__R[412]=$D set string__R[$C6]=32 set string__R[$7BB]=33 set string__R[$521]=34 set string__R[$3EB]=35 set string__R[$4F0]=36 set string__R[983]=37 set string__R[$4FD]=38 set string__R[306]=39 set string__R[904]=40 set string__R[934]=41 set string__R[917]=42 set string__R[$7B4]=43 set string__R[$564]=44 set string__R[$7C1]=45 set string__R[869]=46 set string__R[$772]=47 set string__R[883]=48 set string__R[$616]=49 set string__R[684]=50 set string__R[582]=51 set string__R[668]=52 set string__R[538]=53 set string__R[672]=54 set string__R[$495]=55 set string__R[71]=56 set string__R[277]=57 set string__R[89]=58 set string__R[$475]=59 set string__R[39]=60 set string__R[$493]=61 set string__R[51]=62 set string__R[305]=63 set string__R[0]=64 set string__R[$DE]=65 set string__R[$B2]=66 set string__R[$EC]=67 set string__R[$B8]=68 set string__R[$50F]=69 set string__R[$56E]=70 set string__R[$4FC]=71 set string__R[$CB]=72 set string__R[$522]=73 set string__R[$D1]=74 set string__R[$523]=75 set string__R[$AA]=76 set string__R[$54D]=77 set string__R[$53F]=78 set string__R[$575]=79 set string__R[$58C]=80 set string__R[$58B]=81 set string__R[$574]=82 set string__R[$55E]=83 set string__R[$57F]=84 set string__R[499]=85 set string__R[$5B9]=86 set string__R[736]=87 set string__R[289]=88 set string__R[986]=89 set string__R[38]=90 set string__R[$4CE]=91 set string__R[$664]=93 set string__R[$588]=94 set string__R[$77D]=95 set string__R[$D9]=96 set string__R[833]=123 set string__R[$4C3]=124 set string__R[553]=125 set string__R[58]=$7E set string__I[8]="\b" set string__I[9]="\t" set string__I[$A]="\n" set string__I[$C]="\f" set string__I[$D]="\r" set string__I[32]=" " set string__I[33]="!" set string__I[34]="\"" set string__I[35]="#" set string__I[36]="$" set string__I[37]="%" set string__I[38]="&" set string__I[39]="'" set string__I[40]="(" set string__I[41]=")" set string__I[42]="*" set string__I[43]="+" set string__I[44]="," set string__I[45]="-" set string__I[46]="." set string__I[47]="/" set string__I[48]="0" set string__I[49]="1" set string__I[50]="2" set string__I[51]="3" set string__I[52]="4" set string__I[53]="5" set string__I[54]="6" set string__I[55]="7" set string__I[56]="8" set string__I[57]="9" set string__I[58]=":" set string__I[59]=";" set string__I[60]="<" set string__I[61]="=" set string__I[62]=">" set string__I[63]="?" set string__I[64]="@" set string__I[65]="A" set string__I[66]="B" set string__I[67]="C" set string__I[68]="D" set string__I[69]="E" set string__I[70]="F" set string__I[71]="G" set string__I[72]="H" set string__I[73]="I" set string__I[74]="J" set string__I[75]="K" set string__I[76]="L" set string__I[77]="M" set string__I[78]="N" set string__I[79]="O" set string__I[80]="P" set string__I[81]="Q" set string__I[82]="R" set string__I[83]="S" set string__I[84]="T" set string__I[85]="U" set string__I[86]="V" set string__I[87]="W" set string__I[88]="X" set string__I[89]="Y" set string__I[90]="Z" set string__I[92]="\\" set string__I[97]="a" set string__I[98]="b" set string__I[99]="c" set string__I[100]="d" set string__I[101]="e" set string__I[102]="f" set string__I[103]="g" set string__I[104]="h" set string__I[105]="i" set string__I[106]="j" set string__I[107]="k" set string__I[108]="l" set string__I[109]="m" set string__I[110]="n" set string__I[111]="o" set string__I[112]="p" set string__I[113]="q" set string__I[114]="r" set string__I[115]="s" set string__I[116]="t" set string__I[117]="u" set string__I[118]="v" set string__I[119]="w" set string__I[120]="x" set string__I[121]="y" set string__I[122]="z" set string__I[91]="[" set string__I[93]="]" set string__I[94]="^" set string__I[95]="_" set string__I[96]="`" set string__I[123]="{" set string__I[124]="|" set string__I[125]="}" set string__I[$7E]="~" endfunction function s__Character_Init takes nothing returns nothing set s__Character_MemoryBlock=malloc() endfunction function s__Character_Reality takes integer this returns string return s__Character_reality[this] endfunction function s__Character_Length takes integer this returns integer return s__Character_length[this] endfunction function s__Character_New takes string load_string returns integer local integer load_sh local string load_char local integer this=0 local integer v local integer dv local integer hv if(1string__Long_Value[m] set q=string__Long_Value[m]/ z set string__Long_Value[m]=string__Long_Value[m]-string__Long_Value[m]/ z*z if(string__Long_IsRoot[string__Long_Next[m]])then if(0==string__Long_Next[0])then set string__Long_I=string__Long_I+1 set a=string__Long_I else set a=string__Long_Next[0] set string__Long_Next[0]=string__Long_Next[a] endif set string__Long_Last[a]=m set string__Long_Next[a]=string__Long_A set string__Long_Next[m]=a set string__Long_Last[string__Long_A]=a set string__Long_Value[a]=0 endif set m=string__Long_Next[m] set string__Long_Value[m]=string__Long_Value[m]+q endloop exitwhen string__Long_IsRoot[string__Long_Next[k]] if(string__Long_IsRoot[string__Long_Next[y]])then if(0==string__Long_Next[0])then set string__Long_I=string__Long_I+1 set a=string__Long_I else set a=string__Long_Next[0] set string__Long_Next[0]=string__Long_Next[a] endif set string__Long_Last[a]=y set string__Long_Next[a]=string__Long_A set string__Long_Next[y]=a set string__Long_Last[string__Long_A]=a set string__Long_Value[a]=0 endif set y=string__Long_Next[y] endloop return true endfunction function LongAddByLong takes integer this,integer k,integer g returns nothing if((s__Character_length[((string__Long_Char[k]))])==(s__Character_length[((string__Long_Char[this]))]))then if(0string__Long_Value[y] set k=string__Long_Value[y]/ z set string__Long_Value[y]=string__Long_Value[y]-k*z if(string__Long_IsRoot[string__Long_Next[y]])then if(0==string__Long_Next[0])then set string__Long_I=string__Long_I+1 set a=string__Long_I else set a=string__Long_Next[0] set string__Long_Next[0]=string__Long_Next[a] endif set string__Long_Last[a]=y set string__Long_Next[a]=string__Long_A set string__Long_Next[y]=a set string__Long_Last[string__Long_A]=a set string__Long_Value[a]=0 endif set y=string__Long_Next[y] endloop return true endfunction function LongAdd takes integer this,integer k,integer g returns nothing if 0<=g then if(0string__Long_Value[q] if(string__Long_IsRoot[string__Long_Next[q]])then if(0==string__Long_Next[0])then set string__Long_I=string__Long_I+1 set a=string__Long_I else set a=string__Long_Next[0] set string__Long_Next[0]=string__Long_Next[a] endif set string__Long_Last[a]=q set string__Long_Next[a]=string__Long_A set string__Long_Next[q]=a set string__Long_Last[string__Long_A]=a set string__Long_Value[a]=0 endif set string__Long_Value[string__Long_Next[q]]=string__Long_Value[string__Long_Next[q]]+string__Long_Value[q]/ z set string__Long_Value[q]=string__Long_Value[q]-string__Long_Value[q]/ z*z endloop endloop return true endfunction function LongImul takes integer this,integer k returns nothing if(1=k set string__Long_Next[y]=string__Long_Next[0] set string__Long_Next[0]=y set y=string__Long_Last[y] endloop set string__Long_Last[a]=y set string__Long_Next[y]=a loop set string__Long_Value[y]=z/ k set z=z-string__Long_Value[y]*k set y=string__Long_Last[y] exitwhen string__Long_IsRoot[y] set z=z*h+string__Long_Value[y] endloop set y=a loop set y=string__Long_Last[y] exitwhen 0!=string__Long_Value[y]or string__Long_IsRoot[y] set string__Long_Next[y]=string__Long_Next[0] set string__Long_Next[0]=y endloop set string__Long_Last[a]=y set string__Long_Next[y]=a set string__Long_B=z return true endfunction function LongSub takes integer this,integer k returns integer if(1hh)then set hh=-hh endif set bg=NewLonginteger(b8) call LongAdd(bg,hh,0) set bg=(string__Long_Last[(bg)]) loop set Yx[ks]=(string__Long_Value[(bg)])+1 set bg=(string__Long_Last[(bg)]) exitwhen(string__Long_IsRoot[(bg)]) set ks=ks+1 endloop set zx[ks]=true set Yx[is+$C]=ks call RemoveLongInteger(bg) set ks=ks+2 endif exitwhen 0==is set is=is-1 endloop endfunction function Dcv takes string s,string DCv,integer Ddv,integer DDv returns string local integer i=StringLength(s) local integer p=1 loop exitwhen p*Ddv+DDv>=i set s=SubString(s,0,p*Ddv+p+DDv-1)+DCv+SubString(s,p*Ddv+p+DDv-1,StringLength(s)) set p=p+1 endloop return s endfunction function fOv takes string s,string fRv,string fIv,string fAv,string fNv,integer DDv returns string local string ns="" local string c local integer m=StringLength(s) local integer i=DDv local boolean l loop exitwhen m==i set c=SubString(s,i,i+1) if(c!=" ")then set l=StringCase(c,false)==c if(c==StringCase(c,true)and l)then if("0"==c or 0!=S2I(c))then set ns=ns+"|cff"+fRv+c else set ns=ns+"|cff"+fNv+c endif elseif(l)then set ns=ns+"|cff"+fIv+c else set ns=ns+"|cff"+fAv+c endif else set ns=ns+" " endif set i=i+1 endloop return ns endfunction function string_onInit takes nothing returns nothing call string__StringAsciiInit() set s__Character_MemoryBlock=malloc() call string__kfv() call TimerStart(NewTimer($75BCD15),0,false,function Qjv) endfunction function s__Multiboard_onDestroy takes integer this returns nothing call DestroyMultiboard(s__Multiboard_Ie[this]) call free(s__Multiboard_vessel[this]) set s__Multiboard_vessel[this]=0 set s__Multiboard_Ie[this]=null endfunction function s__Multiboard_deallocate takes integer this returns nothing if this==null then return elseif(si__Multiboard_V[this]!=-1)then return endif call s__Multiboard_onDestroy(this) set si__Multiboard_V[this]=si__Multiboard_F set si__Multiboard_F=this endfunction function MultiboardInitItem takes integer multid returns nothing local integer l__vl=s__Multiboard_vessel[multid] local integer row=s__Multiboard_RowCount[multid] local integer column local multiboarditem mb loop exitwhen 0==row set row=row-1 set column=s__Multiboard_ColumnCount[multid] loop exitwhen 0==column set column=column-1 set mb=MultiboardGetItem(s__Multiboard_Ie[multid],row,column) call SaveInteger(BYHT2,l__vl,row*s__Multiboard_ColumnCount[multid]+column,GetHandleId(mb)) endloop endloop set mb=null endfunction function NewMultiboard takes integer row,integer column returns integer local integer multid=s__Multiboard__allocate() set s__Multiboard_vessel[multid]=malloc() set s__Multiboard_Ie[multid]=CreateMultiboard() call MultiboardSetColumnCount(s__Multiboard_Ie[multid],column) call MultiboardSetRowCount(s__Multiboard_Ie[multid],row) set s__Multiboard_RowCount[multid]=row set s__Multiboard_ColumnCount[multid]=column call MultiboardInitItem(multid) return multid endfunction function MultiboardSetItemColumnValueBY takes integer multid,integer c,string v returns nothing local integer l__vl=s__Multiboard_vessel[multid] local integer column=s__Multiboard_ColumnCount[multid] local multiboarditem mb set c=(s__Multiboard_RowCount[multid]-1)*(column)+c loop exitwhen 0>c set mb=ConvertVersion(LoadInteger(BYHT2,l__vl,c)) call MultiboardSetItemValue(mb,v) set c=c-column endloop set mb=null endfunction function MultiboardSetItemRowStyleBY takes integer multid,integer c,boolean v,boolean i returns nothing local integer l__vl=s__Multiboard_vessel[multid] local integer column=s__Multiboard_ColumnCount[multid] local integer end local multiboarditem mb set c=c*column set end=c+column loop exitwhen c>=end set mb=ConvertVersion(LoadInteger(BYHT2,l__vl,c)) call MultiboardSetItemStyle(mb,v,i) set c=c+1 endloop set mb=null endfunction function MultiboardSetItemColumnWidthBY takes integer multid,integer c,real p returns nothing local integer l__vl=s__Multiboard_vessel[multid] local integer column=s__Multiboard_ColumnCount[multid] local multiboarditem mb set c=(s__Multiboard_RowCount[multid]-1)*(column)+c loop exitwhen 0>c set mb=ConvertVersion(LoadInteger(BYHT2,l__vl,c)) call MultiboardSetItemWidth(mb,p) set c=c-column endloop set mb=null endfunction function MultiboardSetItemValueBY takes integer multid,integer row,integer column,string val returns nothing call MultiboardSetItemValue(ConvertVersion(LoadInteger(BYHT2,s__Multiboard_vessel[multid],row*s__Multiboard_ColumnCount[multid]+column)),val) endfunction function MultiboardSetItemStyleBY takes integer multid,integer row,integer column,boolean showValue,boolean showIcon returns nothing call MultiboardSetItemStyle(ConvertVersion(LoadInteger(BYHT2,s__Multiboard_vessel[multid],row*s__Multiboard_ColumnCount[multid]+column)),showValue,showIcon) endfunction function MultiboardSetItemIconBY takes integer multid,integer row,integer column,string iconFileName returns nothing call MultiboardSetItemIcon(ConvertVersion(LoadInteger(BYHT2,s__Multiboard_vessel[multid],row*s__Multiboard_ColumnCount[multid]+column)),iconFileName) endfunction function MultiboardSetItemWidthBY takes integer multid,integer row,integer column,real width returns nothing call MultiboardSetItemWidth(ConvertVersion(LoadInteger(BYHT2,s__Multiboard_vessel[multid],row*s__Multiboard_ColumnCount[multid]+column)),width) endfunction function MultiboardSetItemsStyleBY takes integer multid,boolean showValues,boolean showIcons returns nothing call MultiboardSetItemsStyle(s__Multiboard_Ie[multid],showValues,showIcons) endfunction function MultiboardDisplayBY takes integer multid,boolean b returns nothing call MultiboardDisplay(s__Multiboard_Ie[multid],b) endfunction function MultiboardMinimizeBY takes integer multid,boolean b returns nothing call MultiboardMinimize(s__Multiboard_Ie[multid],b) endfunction function MultiboardSetTitleTextBY takes integer multid,string label returns nothing call MultiboardSetTitleText(s__Multiboard_Ie[multid],label) endfunction function s__Button_onDestroy takes integer this returns nothing if s__Button_an[this]!=null then call RemoveSavedInteger(BYHT2,system_Dialog__fO,GetHandleId(s__Button_an[this])) set s__Button_an[this]=null endif if s__Button_c[this]!=null then call DestroyBoolExpr(s__Button_c[this]) set s__Button_c[this]=null endif endfunction function s__Button_deallocate takes integer this returns nothing if this==null then return elseif(si__Button_V[this]!=-1)then return endif call s__Button_onDestroy(this) set si__Button_V[this]=si__Button_F set si__Button_F=this endfunction function s__Dialog_onDestroy takes integer this returns nothing local integer b loop exitwhen s__Dialog_index[this]==0 set s__Dialog_index[this]=s__Dialog_index[this]-1 set b=LoadInteger(BYHT,s__Dialog_vessel[this],s__Dialog_index[this]) call s__Button_deallocate(b) endloop if s__Dialog_action[this]!=null then call DestroyBoolExpr(s__Dialog_action[this]) set s__Dialog_action[this]=null endif call RemoveSavedInteger(BYHT2,system_Dialog__fO,GetHandleId(s__Dialog_di[this])) call DestroyTrigger(s__Dialog_trig[this]) call DialogDestroy(s__Dialog_di[this]) call free(s__Dialog_vessel[this]) set s__Dialog_vessel[this]=0 endfunction function s__Dialog_deallocate takes integer this returns nothing if this==null then return elseif(si__Dialog_V[this]!=-1)then return endif call s__Dialog_onDestroy(this) set si__Dialog_V[this]=si__Dialog_F set si__Dialog_F=this endfunction function GetDialogData takes nothing returns integer return LoadInteger(BYHT,system_Dialog__fO,GetHandleId(GetClickedDialog())) endfunction function GetButtonData takes integer t returns integer return LoadInteger(BYHT,system_Dialog__fO,GetHandleId(GetClickedButton())) endfunction function SetDialogMessage takes integer t,string text returns nothing set s__Dialog_text[t]=text endfunction function GetDialogButtonByIndex takes integer t,integer i returns integer if i>=0 and i=0 and i0 then set i=s__Dialog_index[t] loop exitwhen i==0 set i=i-1 set b=LoadInteger(BYHT,s__Dialog_vessel[t],i) call s__Button_deallocate(b) endloop set s__Dialog_index[t]=0 endif call FlushChildHashtable(BYHT,s__Dialog_vessel[t]) call FlushChildHashtable(BYHT2,s__Dialog_vessel[t]) call DialogClear(s__Dialog_di[t]) endfunction function DialogAddButtone takes integer t,string text,integer key returns integer local integer b=s__Button__allocate() set s__Button_text[b]=text set s__Button_key[b]=key call SaveInteger(BYHT,s__Dialog_vessel[t],s__Dialog_index[t],b) call SaveInteger(BYHT,s__Dialog_vessel[t],b+$2710,s__Dialog_index[t]) set s__Dialog_index[t]=s__Dialog_index[t]+1 set s__Dialog_b[t]=true return b endfunction function SetDialogButtonText takes integer t,integer i,string text,integer key returns integer local integer b=LoadInteger(BYHT,s__Dialog_vessel[t],i) if b!=null then set s__Dialog_b[t]=true set s__Button_text[b]=text set s__Button_key[b]=key endif return b endfunction function DialogRemoveButtone takes integer t,integer b returns boolean local integer i if HaveSavedInteger(BYHT,s__Dialog_vessel[t],b+$2710)then set s__Dialog_b[t]=true call s__Button_deallocate(b) set i=LoadInteger(BYHT,s__Dialog_vessel[t],b+$2710) call RemoveSavedInteger(BYHT,s__Dialog_vessel[t],b+$2710) loop set i=i+1 exitwhen i==s__Dialog_index[t] set b=LoadInteger(BYHT,s__Dialog_vessel[t],i) call SaveInteger(BYHT,s__Dialog_vessel[t],i-1,b) call SaveInteger(BYHT,s__Dialog_vessel[t],b+$2710,i-1) endloop set s__Dialog_index[t]=s__Dialog_index[t]-1 call RemoveSavedInteger(BYHT,s__Dialog_vessel[t],s__Dialog_index[t]) return true endif return false endfunction function TransferDialogAddAtion takes integer t,code c returns nothing if s__Dialog_action[t]==null then set s__Dialog_action[t]=Condition(c) endif endfunction function According_to_time_limit takes nothing returns nothing local integer p=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:307") local integer pid=GetPlayerId(ConvertVersion(p)) local integer func=s__Dialog_func[pid] local integer t=s__Dialog_t[pid] set s__Dialog_dis[pid]=false set s__Dialog_t[pid]=0 set s__Dialog_func[pid]=0 set s__Dialog_tm[pid]=null call DialogDisplay(ConvertVersion(p),s__Dialog_di[t],false) if null!=func then call sc___prototype3_evaluate(func,t) endif endfunction function TocCloseTheDialog takes integer t,player p,boolean b returns nothing local integer func local integer pid=GetPlayerId(p) if s__Dialog_dis[pid]and t==s__Dialog_t[pid]then call DialogDisplay(p,s__Dialog_di[t],false) call ReleaseTimer(s__Dialog_tm[pid],"[TimerUtils]Error:308") set func=s__Dialog_func[pid] set s__Dialog_dis[pid]=false set s__Dialog_t[pid]=0 set s__Dialog_func[pid]=0 set s__Dialog_tm[pid]=null call SaveInteger(BYHT,system_Dialog__fO,GetHandleId(p)+16,LoadInteger(BYHT,system_Dialog__fO,GetHandleId(p)+16)+1) if b and null!=func then call sc___prototype3_evaluate(func,t) endif endif endfunction function DisplayDialog takes integer t,player p,real r,integer f,code c returns nothing local integer i local integer b local integer pid=GetPlayerId(p) if s__Dialog_dis[pid]then call TocCloseTheDialog(s__Dialog_t[pid],p,true) endif if s__Dialog_index[t]>0 then if s__Dialog_b[t]then set s__Dialog_b[t]=false set i=s__Dialog_index[t] loop exitwhen i==0 set i=i-1 set b=LoadInteger(BYHT,s__Dialog_vessel[t],i) if s__Button_an[b]!=null then call RemoveSavedInteger(BYHT2,system_Dialog__fO,GetHandleId(s__Button_an[b])) set s__Button_an[b]=null endif endloop call DialogClear(s__Dialog_di[t]) set i=0 loop exitwhen i==s__Dialog_index[t] set b=LoadInteger(BYHT,s__Dialog_vessel[t],i) if s__Button_isdis[b]then set s__Button_an[b]=DialogAddButton(s__Dialog_di[t],s__Button_text[b],s__Button_key[b]) call SaveInteger(BYHT,system_Dialog__fO,GetHandleId(s__Button_an[b]),b) endif set i=i+1 endloop endif call DialogSetMessage(s__Dialog_di[t],s__Dialog_text[t]) call DialogDisplay(p,s__Dialog_di[t],true) call SaveBoolean(BYHT,system_Dialog__fO,GetHandleId(p),true) call SaveInteger(BYHT,system_Dialog__fO,GetHandleId(p),t) if c==null then set c=function According_to_time_limit endif if r<=0 then set r=30 endif set s__Dialog_dis[pid]=true set s__Dialog_t[pid]=t set s__Dialog_func[pid]=f set s__Dialog_tm[pid]=NewTimer(GetHandleId(p)) call TimerStart(s__Dialog_tm[pid],r,false,c) call SaveInteger(BYHT,system_Dialog__fO,GetHandleId(p)+16,LoadInteger(BYHT,system_Dialog__fO,GetHandleId(p)+16)+1) endif endfunction function Dialog_Action takes nothing returns nothing local triggercondition tc local integer t=(LoadInteger(BYHT,system_Dialog__fO,GetHandleId(GetClickedDialog()))) local integer b=GetButtonData(0) local player p=GetTriggerPlayer() local integer i=LoadInteger(BYHT,system_Dialog__fO,GetHandleId(p)+16) if s__Button_c[b]!=null then set tc=TriggerAddCondition(s__Dialog_trig[t],s__Button_c[b]) call TriggerEvaluate(s__Dialog_trig[t]) call TriggerRemoveCondition(s__Dialog_trig[t],tc) endif if i==LoadInteger(BYHT,system_Dialog__fO,GetHandleId(p)+16)and s__Dialog_trig[t]!=null then set tc=TriggerAddCondition(s__Dialog_trig[t],s__Dialog_action[t]) call TriggerEvaluate(s__Dialog_trig[t]) call TriggerRemoveCondition(s__Dialog_trig[t],tc) endif if i==LoadInteger(BYHT,system_Dialog__fO,GetHandleId(p)+16)then call TocCloseTheDialog(t,p,false) endif set tc=null endfunction function NewDialog takes nothing returns integer local integer this=s__Dialog__allocate() set s__Dialog_vessel[this]=malloc() call TriggerRegisterDialogEvent(s__Dialog_trig[this],s__Dialog_di[this]) call TriggerAddAction(s__Dialog_trig[this],function Dialog_Action) call SaveInteger(BYHT,system_Dialog__fO,GetHandleId(s__Dialog_di[this]),this) return this endfunction function TransferSystem_Init takes nothing returns nothing set system_Dialog__fO=malloc() endfunction function SetPlayerState_func takes nothing returns nothing local player whichPlayer=GetTriggerPlayer() local integer i=GetPlayerId(whichPlayer) local integer j=1 local integer k local integer value loop set k=j*$A+i if GetTriggeringTrigger()==PlayerStateTrigger[k]then if ItemGold_Bool2 then call DestroyTrigger(PlayerStateTrigger[k]) set value=GetPlayerState(whichPlayer,ConvertPlayerState(j)) set PlayerStateGold[k]=value set PlayerStateTrigger[k]=CreateTrigger() call TriggerRegisterPlayerStateEvent(PlayerStateTrigger[k],whichPlayer,ConvertPlayerState(j),NOT_EQUAL,value) call TriggerAddCondition(PlayerStateTrigger[k],Condition(function SetPlayerState_func)) else call SetPlayerState(whichPlayer,ConvertPlayerState(j),PlayerStateGold[k]) endif endif set j=j+1 exitwhen j>2 endloop set whichPlayer=null endfunction function SetPlayerStateS2 takes nothing returns nothing set ItemGold_Bool2=false endfunction function SetPlayerStateS takes player whichPlayer returns nothing local integer i=GetPlayerId(whichPlayer) call SetPlayerState(whichPlayer,ConvertPlayerState(1),PlayerStateGold[$A+i]) call SetPlayerState(whichPlayer,ConvertPlayerState(2),PlayerStateGold[20+i]) if ItemGold_Bool2!=true then set ItemGold_Bool2=TRUE call TimerStart(ItemGold_Bool2_TM,0,FALSE,function SetPlayerStateS2) endif endfunction function SetPlayerStateG takes player whichPlayer,playerstate whichPlayerState,integer value returns nothing local integer i=GetPlayerId(whichPlayer) local integer j=GetHandleId(whichPlayerState) local integer k=i+j*$A if value<0 then set value=0 elseif value>$F4240 then set value=$F4240 endif call DestroyTrigger(PlayerStateTrigger[k]) call SetPlayerState(whichPlayer,whichPlayerState,value) set PlayerStateTrigger[k]=CreateTrigger() call TriggerRegisterPlayerStateEvent(PlayerStateTrigger[k],whichPlayer,whichPlayerState,NOT_EQUAL,value) call TriggerAddCondition(PlayerStateTrigger[k],Condition(function SetPlayerState_func)) set PlayerStateGold[k]=value endfunction function AdjustPlayerStateG takes player whichPlayer,playerstate whichPlayerState,integer value returns nothing local integer i=GetPlayerId(whichPlayer) local integer j=GetHandleId(whichPlayerState) local integer k=i+j*$A call DestroyTrigger(PlayerStateTrigger[k]) set PlayerStateGold[k]=PlayerStateGold[k]+value if PlayerStateGold[k]<0 then set PlayerStateGold[k]=0 elseif PlayerStateGold[k]>$F4240 then set PlayerStateGold[k]=$F4240 endif call SetPlayerState(whichPlayer,whichPlayerState,PlayerStateGold[k]) set PlayerStateTrigger[k]=CreateTrigger() call TriggerRegisterPlayerStateEvent(PlayerStateTrigger[k],whichPlayer,whichPlayerState,NOT_EQUAL,value) call TriggerAddCondition(PlayerStateTrigger[k],Condition(function SetPlayerState_func)) endfunction function GetItemTypeIdG takes item i returns integer local integer id=LoadInteger(BYHT,ItemTypeId_root,GetHandleId(i)) if id>0 then return id endif return 0 endfunction function RemoveItemGX takes integer data returns nothing local integer v=0 loop call RemoveSavedInteger(BYHT,Item_save_Charges,data+v) set v=v+1 exitwhen v==9 endloop endfunction function GetItemChargesG takes item i returns integer local integer v=LoadInteger(BYHT,ItemTypeId_root,-GetHandleId(i)) if GetItemCharges(i)!=v then call SetItemCharges(i,v) endif return v endfunction function SetItemChargesG takes item i,integer v returns nothing call SaveInteger(BYHT,ItemTypeId_root,-GetHandleId(i),v) call SetItemCharges(i,v) endfunction function CreateItemG takes integer itemid,real x,real y returns item local integer i set bj_lastCreatedItem=CreateItem(itemid,x,y) set i=GetHandleId(bj_lastCreatedItem) call SaveInteger(BYHT,ItemTypeId_root,i,itemid) call SaveInteger(BYHT,ItemTypeId_root,-i,GetItemCharges(bj_lastCreatedItem)) return bj_lastCreatedItem endfunction function RemoveItemG takes item whichItem returns nothing local integer i=GetHandleId(whichItem) if HaveSavedInteger(BYHT,ItemTypeId_root,i)then if LoadBoolean(BYHT,Item_save_Charges,GetItemTypeIdG(whichItem))then call RemoveItemGX(i*$A) endif call RemoveItem(whichItem) call RemoveSavedInteger(BYHT,ItemTypeId_root,i) call RemoveSavedInteger(BYHT,ItemTypeId_root,-i) else call RemoveItem(whichItem) endif endfunction function RemoveItemGS takes nothing returns nothing if IsItemVisible(GetEnumItem())then call RemoveItem(GetEnumItem()) endif endfunction function ItemGold_Visible takes nothing returns nothing if IsItemVisible(GetEnumItem())then set ItemGold_V[ItemGold_I]=GetEnumItem() call SetItemVisible(ItemGold_V[ItemGold_I],false) set ItemGold_I=ItemGold_I+1 endif endfunction function SetItemGold takes integer itemid returns nothing set ItemGold_Bool=true call EnumItemsInRect(ItemGold_Rect,null,function ItemGold_Visible) call AddItemToStock(ItemGold_Store,itemid,1,1) call SetPlayerState(Player($D),PLAYER_STATE_RESOURCE_LUMBER,$F4240) call SetPlayerState(Player($D),PLAYER_STATE_RESOURCE_GOLD,$F4240) call IssueNeutralImmediateOrderById(Player($D),ItemGold_Store,itemid) call RemoveItemFromStock(ItemGold_Store,itemid) call SaveInteger(BYHT,ItemGold_root,itemid,$F4240-GetPlayerState(Player($D),PLAYER_STATE_RESOURCE_GOLD)) call SaveInteger(BYHT,ItemGold_root,-itemid,$F4240-GetPlayerState(Player($D),PLAYER_STATE_RESOURCE_LUMBER)) call EnumItemsInRect(ItemGold_Rect,null,function RemoveItemGS) loop exitwhen ItemGold_I==0 set ItemGold_I=ItemGold_I-1 call SetItemVisible(ItemGold_V[ItemGold_I],true) set ItemGold_V[ItemGold_I]=null endloop set ItemGold_Bool=false endfunction function GetItemGold takes integer itemid returns integer if not HaveSavedInteger(BYHT,ItemGold_root,itemid)then call SetItemGold(itemid) endif return LoadInteger(BYHT,ItemGold_root,itemid) endfunction function GetItemLumber takes integer itemid returns integer if not HaveSavedInteger(BYHT,ItemGold_root,-itemid)then call SetItemGold(itemid) endif return LoadInteger(BYHT,ItemGold_root,-itemid) endfunction function UnitAddItemByIdG takes unit whichUnit,integer itemId returns item call UnitAddItem(whichUnit,CreateItemG(itemId,GetUnitX(whichUnit),GetUnitY(whichUnit))) return bj_lastCreatedItem endfunction function ExtendsItemChargesG takes item i,item t returns nothing local integer id=GetItemTypeIdG(i) local integer data local integer data2 local integer v if GetItemTypeIdG(t)!=id then return endif if LoadBoolean(BYHT,Item_save_Charges,id)then set data=GetHandleId(i)*$A set data2=GetHandleId(t)*$A if HaveSavedInteger(BYHT,Item_save_Charges,data)==false then call SaveInteger(BYHT,Item_save_Charges,data,GetItemChargesG(i)) endif if HaveSavedInteger(BYHT,Item_save_Charges,data2)==false then call SaveInteger(BYHT,Item_save_Charges,data2,GetItemChargesG(t)) endif set v=0 loop call SaveInteger(BYHT,Item_save_Charges,data+v,LoadInteger(BYHT,Item_save_Charges,data+v)+LoadInteger(BYHT,Item_save_Charges,data2+v)) call RemoveSavedInteger(BYHT,Item_save_Charges,0) set v=v+1 exitwhen v==9 endloop endif endfunction function AddItemChargesGE takes integer data,integer r returns nothing local integer v=8 local integer c loop set c=LoadInteger(BYHT,Item_save_Charges,data+v) if c+r>=0 then call SaveInteger(BYHT,Item_save_Charges,data+v,c+r) exitwhen true else set r=c+r call SaveInteger(BYHT,Item_save_Charges,data+v,0) endif set v=v-1 exitwhen v<0 endloop endfunction function UnitHasItemOfType takes unit DMv,integer id returns boolean local integer MFv=UnitInventorySize(DMv) loop exitwhen MFv<=0 set MFv=MFv-1 if GetItemTypeIdG(UnitItemInSlot(DMv,MFv))==id then return true endif endloop return false endfunction function GetItemOfTypeFromUnit takes unit u,integer kHv returns item local integer i=UnitInventorySize(u) loop exitwhen i<=0 set i=i-1 if(GetItemTypeIdG(UnitItemInSlot(u,i))==kHv)then return UnitItemInSlot(u,i) endif endloop return null endfunction function IsItemCharges takes item i,integer r returns boolean local integer c if i!=null then set c=GetItemChargesG(i) return c==0 or c>=r endif return false endfunction function RemoveItemByCharges takes item i,integer r returns boolean local integer c if i!=null then set c=GetItemChargesG(i) if c==0 or c>=r then if c>r then call SetItemChargesG(i,c-r) if LoadBoolean(BYHT,Item_save_Charges,GetItemTypeIdG(i))then call AddItemChargesGE(GetHandleId(i)*$A,-r) endif else call RemoveItemG(i) endif return TRUE endif endif return false endfunction function SetItemTimed_expired takes nothing returns nothing local integer data=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:309") call RemoveSavedInteger(BYHT2,DroppableTimed,GetHandleId(s__itemcd_Item[data])) if GetItemTypeIdG(s__itemcd_Item[data])!=0 then call SetItemDroppable(s__itemcd_Item[data],true) endif set s__itemcd_Item[data]=null call s__itemcd_deallocate(data) endfunction function SetItemDroppableTimed takes item t,real cyv returns nothing local integer hid=GetHandleId(t) local integer data if hid==0 then return endif if not HaveSavedInteger(BYHT2,DroppableTimed,hid)then set data=s__itemcd__allocate() set s__itemcd_Item[data]=t call SaveInteger(BYHT2,DroppableTimed,hid,GetHandleId(NewTimer(data))) call SetItemDroppable(t,false) call TimerStart(ConvertVersion(LoadInteger(BYHT2,DroppableTimed,hid)),cyv,false,function SetItemTimed_expired) else if cyv>TimerGetRemaining(ConvertVersion(LoadInteger(BYHT2,DroppableTimed,hid)))then call TimerStart(ConvertVersion(LoadInteger(BYHT2,DroppableTimed,hid)),cyv,false,function SetItemTimed_expired) endif endif endfunction function AddUnitSellItemById takes integer id,code func returns nothing if not HaveSavedInteger(BYHT2,Item_SELL_func,id)then call SaveInteger(BYHT2,Item_SELL_func,id,GetHandleId(CreateTrigger())) endif call TriggerAddCondition(ConvertVersion(LoadInteger(BYHT2,Item_SELL_func,id)),Filter(func)) endfunction function AddUnitUseItemById takes integer id,code func returns nothing if not HaveSavedInteger(BYHT2,Item_Use_func,id)then call SaveInteger(BYHT2,Item_Use_func,id,GetHandleId(CreateTrigger())) endif call TriggerAddCondition(ConvertVersion(LoadInteger(BYHT2,Item_Use_func,id)),Filter(func)) endfunction function UNIT_SELL_ITEM_ACTION takes nothing returns boolean local item t=GetSoldItem() local integer i local integer j local player p local boolean b local integer index local integer id if GetTriggerUnit()==ItemGold_Store then call RemoveItemG(t) call BJDebugMsg("!") set t=null return false endif set p=GetOwningPlayer(GetBuyingUnit()) set index=GetPlayerId(p) set id=GetItemTypeId(t) set b=false set i=PlayerStateGold[$A+index]-GetItemGold(id) set j=PlayerStateGold[20+index]-GetItemLumber(id) if i<0 or j<0 then set b=true call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,PlayerStateGold[$A+index]) call SetPlayerState(p,PLAYER_STATE_RESOURCE_LUMBER,PlayerStateGold[20+index]) else call SetPlayerStateG(p,PLAYER_STATE_RESOURCE_GOLD,i) call SetPlayerStateG(p,PLAYER_STATE_RESOURCE_LUMBER,j) endif if HaveSavedInteger(BYHT,Equip_Type_t,id)then set b=true elseif HaveSavedInteger(BYHT,s__Catalog_number[(MiscCatalog17_root)],(id))then set b=true endif if b then call RemoveItemG(t) set t=null return false endif call SaveInteger(BYHT,ItemTypeId_root,GetHandleId(t),id) call SaveInteger(BYHT,ItemTypeId_root,-GetHandleId(t),GetItemCharges(t)) if LoadBoolean(BYHT,Item_save_Charges,id)then call SaveInteger(BYHT,Item_save_Charges,GetHandleId(t)*$A,0) call SaveInteger(BYHT,Item_save_Charges,GetHandleId(t)*$A+index+1,GetItemCharges(t)) endif if GetItemType(t)==ITEM_TYPE_POWERUP then if ItemGold_Bool2!=true then set ItemGold_Bool2=true call TimerStart(ItemGold_Bool2_TM,0,FALSE,function SetPlayerStateS2) endif endif call TriggerEvaluate(ConvertVersion(LoadInteger(BYHT2,Item_SELL_func,id))) set t=null return false endfunction function UNIT_PAWN_ITEM_ACTION takes nothing returns nothing call GetItemChargesG(GetSoldItem()) call SetPlayerStateS(GetOwningPlayer(GetSellingUnit())) endfunction function UNIT_PICKUP_ITEM_ACTION takes nothing returns nothing local integer manipulateditem=GetHandleId(LastManipulatedItem) set LastManipulatedItem=(GetManipulatedItem()) call TriggerEvaluate(alloc__GX[(TRIGGER_PICKUP)]) set LastManipulatedItem=ConvertVersion(manipulateditem) endfunction function UNIT_DROP_ITEM_ACTION takes nothing returns nothing local integer manipulateditem=GetHandleId(LastManipulatedItem) set LastManipulatedItem=(GetManipulatedItem()) call TriggerEvaluate(alloc__GX[(TRIGGER_DROP)]) set LastManipulatedItem=ConvertVersion(manipulateditem) endfunction function UNIT_USE_ITEM_ACTION takes nothing returns nothing local integer manipulateditem=GetHandleId(LastManipulatedItem) local integer i local integer id set LastManipulatedItem=(GetManipulatedItem()) set id=LoadInteger(BYHT,ItemTypeId_root,GetHandleId(LastManipulatedItem)) call TriggerEvaluate(alloc__GX[(TRIGGER_USE)]) if HaveSavedReal(BYHT,DroppableTimed,id)then call SetItemDroppableTimed(GetManipulatedItem(),LoadReal(BYHT,DroppableTimed,id)) endif call TriggerEvaluate(ConvertVersion(LoadInteger(BYHT2,Item_Use_func,id))) set i=LoadInteger(BYHT,ItemTypeId_root,-GetHandleId(LastManipulatedItem)) if i>0 then if i==1 then call RemoveItemG(GetManipulatedItem()) else call SetItemChargesG(GetManipulatedItem(),i-1) endif endif set LastManipulatedItem=ConvertVersion(manipulateditem) endfunction function RegisterPlayerUnitPickupItem takes code c returns triggercondition return(TriggerAddCondition(alloc__GX[(TRIGGER_PICKUP)],(Condition(c)))) endfunction function RegisterPlayerUnitDropItem takes code c returns triggercondition return(TriggerAddCondition(alloc__GX[(TRIGGER_DROP)],(Condition(c)))) endfunction function RegisterPlayerUnitUseItem takes code c returns triggercondition return(TriggerAddCondition(alloc__GX[(TRIGGER_USE)],(Condition(c)))) endfunction function RemovePlayerUnitPickupItem takes triggercondition c returns nothing call TriggerRemoveCondition(alloc__GX[(TRIGGER_PICKUP)],(c)) endfunction function RemovePlayerUnitDropItem takes triggercondition c returns nothing call TriggerRemoveCondition(alloc__GX[(TRIGGER_DROP)],(c)) endfunction function RemovePlayerUnitUseItem takes triggercondition c returns nothing call TriggerRemoveCondition(alloc__GX[(TRIGGER_USE)],(c)) endfunction function Init_ItemDroppableTimed takes integer id,real Cjv returns nothing call SaveReal(BYHT,DroppableTimed,id,Cjv) endfunction function ItemTypeIdandGold_Init takes nothing returns nothing set ItemTypeId_root=malloc() set ItemGold_root=malloc() set Item_SELL_func=malloc() set Item_Use_func=malloc() set DroppableTimed=malloc() set TRIGGER_USE=NewTriggerFor() set TRIGGER_PICKUP=NewTriggerFor() set TRIGGER_DROP=NewTriggerFor() call RegisterEvent(EVENT_PLAYER_UNIT_SELL_ITEM,function UNIT_SELL_ITEM_ACTION) call RegisterEvent(EVENT_PLAYER_UNIT_PAWN_ITEM,function UNIT_PAWN_ITEM_ACTION) call RegisterEvent(EVENT_PLAYER_UNIT_PICKUP_ITEM,function UNIT_PICKUP_ITEM_ACTION) call RegisterEvent(EVENT_PLAYER_UNIT_DROP_ITEM,function UNIT_DROP_ITEM_ACTION) call RegisterEvent(EVENT_PLAYER_UNIT_USE_ITEM,function UNIT_USE_ITEM_ACTION) set ItemGold_Store=CreateUnit(Player($F),'e001',-$2940+$400,$52C0-$400,0) set ItemGold_Trader=CreateUnit(Player($D),'Hkal',-$2940+$400,$52C0-$400,0) set ItemGold_Rect=Rect(GetUnitX(ItemGold_Store)-$80,GetUnitY(ItemGold_Store)-$80,GetUnitX(ItemGold_Store)+$80,GetUnitY(ItemGold_Store)+$80) call UnitAddAbility(ItemGold_Store,'Ane2') call UnitAddAbility(ItemGold_Store,'Asid') call UnitAddAbility(ItemGold_Store,'Avul') call UnitAddAbility(ItemGold_Store,'Apit') call IssueTargetOrderById(ItemGold_Store,$D0256,ItemGold_Trader) endfunction function IAndBY takes boolean local_true,integer a,integer b returns integer if local_true then return b endif return a endfunction function IOrBY takes boolean local_true,integer a,integer b returns integer if local_true then return a endif return b endfunction function RAndBY takes boolean local_true,real a,real b returns real if local_true then return b endif return a endfunction function ROrBY takes boolean local_true,real a,real b returns real if local_true then return a endif return b endfunction function MaxR takes real a,real b returns real if a>b then return a endif return b endfunction function MinR takes real a,real b returns real if a>b then return b endif return a endfunction function B2I takes boolean b returns integer if b then return 1 endif return 0 endfunction function s__locationez_alloc takes nothing returns integer local integer this if(s__locationez_V[(0)]==0)then set s__locationez_I=s__locationez_I+1 set this=s__locationez_I else set this=s__locationez_V[(0)] set s__locationez_V[(0)]=s__locationez_V[s__locationez_V[(0)]] endif return this endfunction function s__locationez_dealloc takes integer this returns nothing set s__locationez_V[this]=s__locationez_V[(0)] set s__locationez_V[(0)]=this endfunction function s__locationez_connect takes integer this returns nothing local integer b=s__locationez_oO[this] set s__locationez_ang[this]=Atan2(s__locationez_Y[b]-s__locationez_Y[this],s__locationez_X[b]-s__locationez_X[this]) set s__locationez_range[this]=SquareRoot((s__locationez_X[b]-s__locationez_X[this])*(s__locationez_X[b]-s__locationez_X[this])+(s__locationez_Y[b]-s__locationez_Y[this])*(s__locationez_Y[b]-s__locationez_Y[this])) if s__locationez_range[this]==0 then set s__locationez_range[this]=.0001 endif set s__locationez_hd[this]=(s__locationez_Z[b]-s__locationez_Z[this])/ s__locationez_range[this] set s__locationez_ang[b]=s__locationez_ang[this]+bj_PI set s__locationez_range[b]=s__locationez_range[this] set s__locationez_hd[b]=-s__locationez_hd[this] endfunction function MoveLocationEZ takes integer loc,real sx,real sy,real sz returns nothing call MoveLocation(s__locationez_Loc,sx,sy) set s__locationez_X[loc]=sx set s__locationez_Y[loc]=sy set s__locationez_Z[loc]=sz+GetLocationZ(s__locationez_Loc) if loc!=s__locationez_oO[loc]then call s__locationez_connect(loc) endif endfunction function LocationEZ takes real sx,real sy,real sz returns integer local integer loc=s__locationez_alloc() set s__locationez_counter[loc]=1 set s__locationez_oO[loc]=loc call MoveLocationEZ(loc,sx,sy,sz) return loc endfunction function ConnectLocationEZ takes integer loc,integer a returns integer set s__locationez_oO[loc]=a set s__locationez_oO[a]=loc call s__locationez_connect(loc) return a endfunction function ConnectLocationEZToUnit takes integer loc,unit u returns integer return ConnectLocationEZ(loc,LocationEZ(GetUnitX(u),GetUnitY(u),GetUnitFlyHeight(u)+60.)) endfunction function RemoveLocationEZ takes integer loc returns nothing set s__locationez_counter[loc]=s__locationez_counter[loc]-1 if s__locationez_counter[loc]==0 then set s__locationez_oO[s__locationez_oO[loc]]=s__locationez_oO[loc] set s__locationez_oO[loc]=loc call s__locationez_dealloc(loc) endif endfunction function Playlines takes string name,string text returns nothing call SetCinematicScene(GetUnitTypeId(lastspeaker),GetPlayerColor(GetOwningPlayer(lastspeaker)),name,text,3.5,2) call PingMinimap(GetUnitX(lastspeaker),GetUnitY(lastspeaker),1) call UnitAddIndicator(lastspeaker,$FF,$FF,$FF,$FF) endfunction function Lettheactorsplaylines takes unit u,string text returns nothing set lastspeaker=u call Playlines(GetUnitName(u),text) endfunction function P2I takes player p returns integer return GetPlayerId(p) endfunction function GetPlayerColorRBG takes player p returns string return system__kv[GetHandleId(GetPlayerColor(p))] endfunction function InitPlayerColor takes nothing returns nothing set system__kv[0]="|cffFF0202" set system__kv[1]="|cff0041FF" set system__kv[2]="|cff1BE5B8" set system__kv[3]="|cff530080" set system__kv[4]="|cffFFFC00" set system__kv[5]="|cffFE890D" set system__kv[6]="|cff1FBF00" set system__kv[7]="|cffE45AAF" set system__kv[8]="|cff949596" set system__kv[9]="|cff7DBEF1" set system__kv[$A]="|cff0F6145" set system__kv[$B]="|cff4D2903" endfunction constant function IsUnitOfBoss takes unit u returns boolean return IsUnitType(u,UNIT_TYPE_GIANT) endfunction constant function IsUnitAliveAndAlly takes unit u,unit s returns boolean return not IsUnitType(u,UNIT_TYPE_DEAD)and IsUnitAlly(u,GetOwningPlayer(s)) endfunction constant function IsUnitAlive takes unit u returns boolean return not IsUnitType(u,UNIT_TYPE_DEAD)and pV[GetPlayerId(GetOwningPlayer(u))] endfunction function IsUnitNotAfrz takes unit u returns boolean return GetUnitAbilityLevel(u,'Bfrz')==0 and GetUnitAbilityLevel(u,'BUdd')==0 and GetUnitAbilityLevel(u,'B01N')==0 endfunction function IsUnitOfPlayerNotseckill takes unit u returns boolean return UnitAlive(u)and pV[GetPlayerId(GetOwningPlayer(u))]and not pB[GetUnitUserData(u)] endfunction function IsUnitAliveAndEnemyNotAvul takes unit u,unit s returns boolean return UnitAlive(u)and IsUnitEnemy(u,GetOwningPlayer(s))and GetUnitAbilityLevel(u,'Avul')==0 and GetUnitAbilityLevel(u,'Aloc')==0 endfunction function IsUnitAllyNotbag takes unit u,unit s returns boolean local integer CMv=GetPlayerId(GetOwningPlayer(u)) return pV[CMv]and UnitAlive(u)and IsPlayerAlly(P[CMv],GetOwningPlayer(s))and GetUnitAbilityLevel(u,'A04P')==0 endfunction function IsUnitNotbag takes unit u returns boolean return GetUnitAbilityLevel(u,'A04P')==0 endfunction constant function IsUnitAliveAndEnemy takes unit u,unit s returns boolean return not IsUnitType(u,UNIT_TYPE_DEAD)and IsUnitEnemy(u,GetOwningPlayer(s)) endfunction function PlaySoundBY takes sound MRv,real MIv,unit DMv returns nothing call PlaySoundOnUnit_BJ(MRv,MIv,DMv) endfunction function PlaySoundAtPointBY takes sound MRv,real MIv,real x,real y returns nothing call PlaySoundAtPoint_BJ(MRv,MIv,x,y,0) endfunction function IsPointInRectB takes real x,real y,real m6v,real m7v,real m8v,real m9v returns boolean return m6v<=x and x<=m8v and m7v<=y and y<=m9v endfunction function IsPointInRect takes real x,real y,rect r returns boolean return IsPointInRectB(x,y,GetRectMinX(r),GetRectMinY(r),GetRectMaxX(r),GetRectMaxY(r)) endfunction function IsPointInRangeXY takes real x,real y,real x2,real y2,real r returns boolean set x=x2-x set y=y2-y return x*x+y*y<=r*r endfunction function SetCameraBoundsToRectBY takes rect r returns nothing local real x=GetRectCenterX(r) local real y=GetRectCenterY(r) local real minX=MinR(GetRectMinX(r)+256,x) local real minY=MinR(GetRectMinY(r)+256,y) local real maxX=MaxR(GetRectMaxX(r)-256,x) local real maxY=MaxR(GetRectMaxY(r)-256,y) call SetCameraBounds(minX,minY,minX,maxY,maxX,maxY,maxX,minY) endfunction function GetPointZ takes real x,real y returns real call MoveLocation(mx,x,y) return GetLocationZ(mx) endfunction function RegisterEnterRect_Filter takes nothing returns boolean return IsUnitInGroup(GetFilterUnit(),h_v_Group) endfunction function RegisterEnterRect takes real m6v,real m7v,real m8v,real m9v, code c returns nothing local trigger gzv=CreateTrigger() local rect MXv=Rect(m6v,m7v,m8v,m9v) set bj_lastCreatedRegion=CreateRegion() call RegionAddRect(bj_lastCreatedRegion,MXv) call RemoveRect(MXv) call TriggerRegisterEnterRegion(gzv,bj_lastCreatedRegion,Filter(function RegisterEnterRect_Filter)) call TriggerAddCondition(gzv,Filter(c)) set MXv=null set gzv=null endfunction function RegisterEnterRect_A takes rect MXv,code c returns nothing local trigger gzv=CreateTrigger() set bj_lastCreatedRegion=CreateRegion() call RegionAddRect(bj_lastCreatedRegion,MXv) call TriggerRegisterEnterRegion(gzv,bj_lastCreatedRegion,Filter(function RegisterEnterRect_Filter)) call TriggerAddCondition(gzv,Filter(c)) set gzv=null endfunction function RegisterEnterRect_V takes real m6v,real m7v,real m8v,real m9v returns nothing local rect MXv=Rect(m6v,m7v,m8v,m9v) call RegionAddRect(bj_lastCreatedRegion,MXv) call RemoveRect(MXv) set MXv=null endfunction function RegisterEnterRect_B takes real x,real y,real rx,real ry,code c returns nothing if RAbsBJ(rx)>=32 and RAbsBJ(ry)>=32 then if c!=null then call RegisterEnterRect(x,y,x+rx,y+ry,c) else call RegisterEnterRect_V(x,y,x+rx,y+ry) endif if RAbsBJ(rx)>=64 and RAbsBJ(ry)>=64 then call RegisterEnterRect_B(x+rx,y,rx/ 2,ry/ 2,null) call RegisterEnterRect_B(x,y+ry,rx/ 2,ry/ 2,null) endif endif endfunction function RegisterEnterRect_C takes integer p,code c returns nothing local real minx=s__polygon_Min_x[p] local real miny=s__polygon_Min_y[p] local real maxx=s__polygon_Max_x[p] local real maxy=s__polygon_Max_y[p] local real x=minx+16 local real y loop exitwhen x>maxx set y=miny+16 loop exitwhen y>maxy if sc___prototype6_evaluate(1,p,x,y)==1 then if c!=null then call RegisterEnterRect(x-16,y-16,x+16,y+16,c) set c=null else call RegionAddCell(bj_lastCreatedRegion,x,y) endif endif set y=y+32 endloop set x=x+32 endloop endfunction function SetTerrainPathable_Rect takes rect c,pathingtype t,boolean b returns nothing local real x=GetRectMinX(c)+16 local real y=GetRectMinY(c)+16 local real max_x=GetRectMaxX(c) local real max_y=GetRectMaxY(c) local real tx local real ty set tx=x loop exitwhen tx>max_x set ty=y loop exitwhen ty>max_y call SetTerrainPathable(tx,ty,t,true) set ty=ty+32 endloop set tx=tx+32 endloop endfunction function IsPVP takes unit u returns boolean return Is_pvp[(GetPlayerId(GetOwningPlayer(u)))] endfunction function Qtv takes integer id returns unit return MV[GetPlayerId(GetOwningPlayer(Je[id]))] endfunction function QTv takes integer id returns integer return GetUnitUserData(MV[GetPlayerId(GetOwningPlayer(Je[id]))]) endfunction function GetHeroBackpack takes integer id returns unit return Je[YI[id]] endfunction //is backpack token function Isaseniorbackpack takes integer id returns boolean return HaveSavedBoolean(BYHT,(Bag_Issenior),StringHash(StringCase(Game_PlayerName[Kc[(id)]],false))) or GetUnitTypeId(Je[YI[id]])!='e01Z'//basic backpack id endfunction function RemoveUnitBJ takes unit u,integer index returns nothing local integer id=GetUnitUserData(u) if u==Je[id]and nC[id]then call BJDebugMsg("Hero Removed:"+I2S(index)) endif call RemoveUnit(u) endfunction function KillUnitBJ takes unit u returns boolean local boolean b=KillUnit_bool local boolean b2 local integer id=GetUnitUserData(u) set KillUnit_bool=true if u==Je[id]and nC[id]then call s__Trig_exewithp((Hero_Be_Kill_t[id]),id) endif if KillUnit_bool then call KillUnit(u) endif set b2=KillUnit_bool set KillUnit_bool=b return b2 endfunction function SetHeroState1 takes unit u,integer i returns nothing local integer id=GetUnitUserData(u) set HeroStatStr[id]=i call SetHeroStr(u,i,true) endfunction function SetHeroState2 takes unit u,integer i returns nothing set HeroStatAgi[GetUnitUserData(u)]=i call SetHeroAgi(u,i,true) endfunction function SetHeroState3 takes unit u,integer i returns nothing set HeroStatInt[GetUnitUserData(u)]=i call SetHeroInt(u,i,true) endfunction function GetHeroState1 takes unit u,boolean includeBonuses returns integer if includeBonuses then return GetHeroStr(u,true) endif return HeroStatStr[GetUnitUserData(u)] endfunction function GetHeroState2 takes unit u,boolean includeBonuses returns integer if includeBonuses then return GetHeroAgi(u,true) endif return HeroStatAgi[GetUnitUserData(u)] endfunction function GetHeroState3 takes unit u,boolean includeBonuses returns integer if includeBonuses then return GetHeroInt(u,true) endif return HeroStatInt[GetUnitUserData(u)] endfunction function GetGameTimed takes nothing returns real return 100000.-TimerGetRemaining(GameTimer) endfunction function GameExecuteFunc takes boolexpr Func returns boolean local triggercondition action=TriggerAddCondition(GameExecuteFunc_Trig,Func) call TriggerEvaluate(GameExecuteFunc_Trig) call TriggerRemoveCondition(GameExecuteFunc_Trig,action) set action=null return true endfunction function GetSpellDamage_func takes nothing returns nothing set GetSpellDamageId=true set SpellDamage=GetEventDamage() endfunction function GetSpellDamage takes unit whichUnit,unit target,real amount,boolean attack,boolean ranged,attacktype attackType,damagetype damageType,weapontype weaponType returns real local trigger trig=CreateTrigger() local real life=GetWidgetLife(target) local boolean b=GetUnitState(target,UNIT_STATE_MAX_LIFE)<500 call TriggerRegisterUnitEvent(trig,target,ConvertUnitEvent(52)) call TriggerAddCondition(trig,Condition(function GetSpellDamage_func)) set GetSpellDamageId=false set SpellDamage=0 set FF=false if b then call UnitAddAbility(target,'A090') endif if life<500 then call SetWidgetLife(target,500) endif call UnitDamageTarget(whichUnit,target,100,attack,ranged,attackType,damageType,weaponType) if b then call UnitRemoveAbility(target,'A090') endif call SetWidgetLife(target,life) set FF=true if GetSpellDamageId then set SpellDamage=amount*(SpellDamage/ 100) endif call DestroyTrigger(trig) set trig=null return SpellDamage endfunction function Dlv takes real a returns real local real r=.0 loop exitwhen a=EntireMapMinX and y>=EntireMapMinY endfunction function SetUnitXBJ takes unit u,real x returns nothing if x>EntireMapMaxX then set x=EntireMapMaxX elseif xEntireMapMaxY then set y=EntireMapMaxY elseif y=32 endloop endfunction function system_onInit takes nothing returns nothing call InitPlayerColor() call system__EntireMapInit() call ItemTypeIdandGold_Init() call IsTerrainWalkable_Init() call system__UNIT_ISSUED_ORDER_INIT() call system__Pow2n_Init() set system_Dialog__fO=malloc() set GroupEnumUnitsFilterNull=Filter(function RegisterEnterRect_Filter) call TimerStart(GameTimer,$186A0,false,null) endfunction constant function GetSpellAbilityIdBJ takes nothing returns integer return LAST_SPELL_ABILITY_ID endfunction function SpellEffectEventAddAction takes code c returns nothing call TriggerAddCondition(alloc__GX[(UNIT_SPELL_EFFECT)],(Condition(c))) endfunction function RegisterSpellEndCastEvent takes integer hIv,code hAv returns nothing if not HaveSavedInteger(BYHT2,(Event_SpellEndCast_Id),hIv)then call SaveInteger(BYHT2,(Event_SpellEndCast_Id),hIv,GetHandleId(CreateTrigger())) endif call TriggerAddCondition(ConvertVersion(LoadInteger(BYHT2,(Event_SpellEndCast_Id),hIv)),Filter(hAv)) endfunction function RegisterSpellChannelEvent takes integer hIv,code hbv returns nothing if not HaveSavedInteger(BYHT2,(Event_SpellChannel_Id),hIv)then call SaveInteger(BYHT2,(Event_SpellChannel_Id),hIv,GetHandleId(CreateTrigger())) endif call TriggerAddCondition(ConvertVersion(LoadInteger(BYHT2,(Event_SpellChannel_Id),hIv)),Filter(hbv)) endfunction function RegisterSpellEffectEvent takes integer hIv,code hcv returns nothing if not HaveSavedInteger(BYHT2,(Event_SpellEffect_Id),hIv)then call SaveInteger(BYHT2,(Event_SpellEffect_Id),hIv,GetHandleId(CreateTrigger())) endif call TriggerAddCondition(ConvertVersion(LoadInteger(BYHT2,(Event_SpellEffect_Id),hIv)),Filter(hcv)) endfunction function CancelRegisterSpellEffectEvent takes integer hIv returns nothing if HaveSavedInteger(BYHT2,Event_SpellEffect_Id,hIv)then call DestroyTrigger(ConvertVersion(LoadInteger(BYHT2,Event_SpellEffect_Id,hIv))) call RemoveSavedInteger(BYHT2,Event_SpellEffect_Id,hIv) endif endfunction function RegisterHeroSkillEvent takes integer hIv,code hdv returns nothing if not HaveSavedInteger(BYHT2,(Event_HeroSkill_Id),hIv)then call SaveInteger(BYHT2,(Event_HeroSkill_Id),hIv,GetHandleId(CreateTrigger())) endif call TriggerAddCondition(ConvertVersion(LoadInteger(BYHT2,(Event_HeroSkill_Id),hIv)),Filter(hdv)) endfunction function RegisterSummonEvent takes integer Cjv,code hfv returns nothing if not HaveSavedInteger(BYHT2,(Event_Summon_Id),Cjv)then call SaveInteger(BYHT2,(Event_Summon_Id),Cjv,GetHandleId(CreateTrigger())) endif call TriggerAddCondition(ConvertVersion(LoadInteger(BYHT2,(Event_Summon_Id),Cjv)),Filter(hfv)) endfunction function RegisterEnterworldEvent takes integer Cjv,code hfv returns nothing if not HaveSavedInteger(BYHT2,(Event_Enterworld_Id),Cjv)then call SaveInteger(BYHT2,(Event_Enterworld_Id),Cjv,GetHandleId(CreateTrigger())) endif call TriggerAddCondition(ConvertVersion(LoadInteger(BYHT2,(Event_Enterworld_Id),Cjv)),Filter(hfv)) endfunction function RegisterHeroInitEvent takes integer Cjv,code hfv returns nothing if not HaveSavedInteger(BYHT2,(Event_HeroInit_Id),Cjv)then call SaveInteger(BYHT2,(Event_HeroInit_Id),Cjv,GetHandleId(CreateTrigger())) endif call TriggerAddCondition(ConvertVersion(LoadInteger(BYHT2,(Event_HeroInit_Id),Cjv)),Filter(hfv)) endfunction function Event_SPELL_CAST_Action takes nothing returns boolean return TriggerEvaluate(ConvertVersion(LoadInteger(BYHT2,(Event_SpellCast_Id),GetSpellAbilityId()))) endfunction function Event_SPELL_ENDCAST_Action takes nothing returns boolean return TriggerEvaluate(ConvertVersion(LoadInteger(BYHT2,(Event_SpellEndCast_Id),GetSpellAbilityId()))) endfunction function Event_SPELL_CHANNEL_Action takes nothing returns boolean return TriggerEvaluate(ConvertVersion(LoadInteger(BYHT2,(Event_SpellChannel_Id),GetSpellAbilityId()))) endfunction function Event_SPELL_EFFECT_Action takes nothing returns nothing local integer i=LAST_SPELL_ABILITY_ID set LAST_SPELL_ABILITY_ID=GetSpellAbilityId() call TriggerEvaluate(ConvertVersion(LoadInteger(BYHT2,(Event_SpellEffect_Id),LAST_SPELL_ABILITY_ID))) call TriggerEvaluate(alloc__GX[(UNIT_SPELL_EFFECT)]) set LAST_SPELL_ABILITY_ID=i endfunction function Event_HeroSkill_Action takes nothing returns boolean return TriggerEvaluate(ConvertVersion(LoadInteger(BYHT2,(Event_HeroSkill_Id),GetLearnedSkill()))) endfunction function Event_Summon_Action takes nothing returns boolean return TriggerEvaluate(ConvertVersion(LoadInteger(BYHT2,(Event_Summon_Id),GetUnitTypeId(GetSummonedUnit())))) endfunction function Event_onInit takes nothing returns nothing set UNIT_SPELL_EFFECT=NewTriggerFor() set Event_SpellCast_Id=malloc() set Event_SpellEndCast_Id=malloc() set Event_SpellChannel_Id=malloc() set Event_SpellEffect_Id=malloc() set Event_HeroSkill_Id=malloc() set Event_Summon_Id=malloc() set Event_Enterworld_Id=malloc() set Event_HeroInit_Id=malloc() set HeroOnSpellEffect_t=malloc() call RegisterEvent(EVENT_PLAYER_UNIT_SPELL_CAST,function Event_SPELL_CAST_Action) call RegisterEvent(EVENT_PLAYER_UNIT_SPELL_ENDCAST,function Event_SPELL_ENDCAST_Action) call RegisterEvent(EVENT_PLAYER_UNIT_SPELL_CHANNEL,function Event_SPELL_CHANNEL_Action) call RegisterEvent(EVENT_PLAYER_UNIT_SPELL_EFFECT,function Event_SPELL_EFFECT_Action) call RegisterEvent(EVENT_PLAYER_HERO_SKILL,function Event_HeroSkill_Action) call RegisterEvent(EVENT_PLAYER_UNIT_SUMMON,function Event_Summon_Action) endfunction //Buffers function Init1_LoadBuffer90 takes nothing returns nothing set LoadBuffer_1[90]=s__Catalog_create() call Catalog_Add_Subcatalog(LoadBuffer_1[90],BasicCatalog27_root) call Catalog_Add_Subcatalog(LoadBuffer_1[90],MiscCatalog17_root) //call Catalog_Add_Subcatalog(LoadBuffer_1[90],MiscCatalog18_root) //call Catalog_Add_Subcatalog(LoadBuffer_1[90],BasicCatalog29_root) call s__Catalog_Write((LoadBuffer_1[90]),('I04W')) call s__Catalog_Write((LoadBuffer_1[90]),('I04X')) call s__Catalog_Write((LoadBuffer_1[90]),('I04V')) call s__Catalog_Write((LoadBuffer_1[90]),('I04U')) call s__Catalog_Write((LoadBuffer_1[90]),('I04Y')) endfunction function Init2_LoadBuffer90 takes nothing returns nothing set LoadBuffer_2[90]=s__Catalog_create() call Catalog_Add_Subcatalog(LoadBuffer_2[90],BasicCatalog27_root) call Catalog_Add_Subcatalog(LoadBuffer_2[90],MiscCatalog17_root) //call Catalog_Add_Subcatalog(LoadBuffer_2[90],MiscCatalog18_root) //call Catalog_Add_Subcatalog(LoadBuffer_2[90],BasicCatalog29_root) endfunction function Init1_LoadBuffer91 takes nothing returns nothing set LoadBuffer_1[91]=s__Catalog_create() call Catalog_Add_Subcatalog(LoadBuffer_1[91],BasicCatalog28_root) call Catalog_Add_Subcatalog(LoadBuffer_1[91],MiscCatalog17_root) call s__Catalog_Write((LoadBuffer_1[91]),('I04W')) call s__Catalog_Write((LoadBuffer_1[91]),('I04X')) call s__Catalog_Write((LoadBuffer_1[91]),('I04V')) call s__Catalog_Write((LoadBuffer_1[91]),('I04U')) call s__Catalog_Write((LoadBuffer_1[91]),('I04Y')) endfunction function Init2_LoadBuffer91 takes nothing returns nothing set LoadBuffer_2[91]=s__Catalog_create() call Catalog_Add_Subcatalog(LoadBuffer_2[91],BasicCatalog28_root) call Catalog_Add_Subcatalog(LoadBuffer_2[91],MiscCatalog17_root) endfunction function Init1_LoadBuffer92 takes nothing returns nothing set LoadBuffer_1[92]=LoadBuffer_1[91] endfunction function Init2_LoadBuffer92 takes nothing returns nothing set LoadBuffer_2[92]=LoadBuffer_2[91] endfunction function LoadBuffer_onInit takes nothing returns nothing call ExecuteFunc("Init1_LoadBuffer90") call ExecuteFunc("Init2_LoadBuffer90") call ExecuteFunc("Init1_LoadBuffer91") call ExecuteFunc("Init2_LoadBuffer91") call ExecuteFunc("Init1_LoadBuffer92") call ExecuteFunc("Init2_LoadBuffer92") endfunction function s__fog_table_new takes real l__zs,real ze,real r,real g,real b returns integer local integer this=s__fog_table__allocate() set s__fog_table_zS[this]=l__zs set s__fog_table_zE[this]=ze set s__fog_table_f_r[this]=r set s__fog_table_f_g[this]=g set s__fog_table_f_b[this]=b return this endfunction function s__fog_rect_alloc takes nothing returns integer local integer this=s__fog_rect_V[0] if this==0 then set this=s__fog_rect_I+1 set s__fog_rect_I=this else set s__fog_rect_V[0]=s__fog_rect_V[this] endif set s__fog_rect_V[this]=-1 set s__fog_rect_next[this]=s__fog_rect_next[(0)] set s__fog_rect_last[this]=(0) set s__fog_rect_last[s__fog_rect_next[this]]=this set s__fog_rect_next[(0)]=this return this endfunction function s__fog_rect_destroy takes integer this returns nothing if s__fog_rect_V[this]==-1 then set s__fog_rect_V[this]=s__fog_rect_V[0] set s__fog_rect_V[0]=this set s__fog_rect_last[s__fog_rect_next[this]]=s__fog_rect_last[this] set s__fog_rect_next[s__fog_rect_last[this]]=s__fog_rect_next[this] endif endfunction function s__fog_rect_create takes integer t,rect r returns integer local integer this=s__fog_rect_alloc() set s__fog_rect_t1[this]=t set s__fog_rect_IsRound[this]=false set s__fog_rect_border[this]=0 set s__fog_rect_f_L[this]=GetRectMinX(r) set s__fog_rect_f_R[this]=GetRectMaxX(r) set s__fog_rect_f_D[this]=GetRectMinY(r) set s__fog_rect_f_U[this]=GetRectMaxY(r) return this endfunction function s__fog_rect_create_round takes integer t,real x,real y,real l__rs,real re,real rang returns integer local integer this=s__fog_rect_alloc() set s__fog_rect_t1[this]=t set s__fog_rect_IsRound[this]=true if l__rs<=re then set s__fog_rect_RadMin[this]=l__rs set s__fog_rect_RadMax[this]=re else set s__fog_rect_RadMin[this]=re set s__fog_rect_RadMax[this]=l__rs endif set s__fog_rect_border[this]=rang set s__fog_rect_centerX[this]=x set s__fog_rect_centerY[this]=y return this endfunction function s__fog_rect_Loop_c takes nothing returns nothing local integer this=s__fog_rect_next[(0)] local real cxv=GetFloatGameState(GAME_STATE_TIME_OF_DAY) local real x=GetCameraTargetPositionX() local real y=GetCameraTargetPositionY() local real dx local real dy local real hav=0 local real d=0 local real r=0 if(cxv>=s__fog_rect_hour_21 and cxv<24)or(cxv>=0 and cxv=s__fog_rect_hour_3 and cxv=s__fog_rect_hour_9 and cxv=s__fog_rect_hour_15 and cxvdy then set d=dx else set d=dy endif else set dx=s__fog_rect_f_L[this]-x set d=x-s__fog_rect_f_R[this] if d>dx then set dx=d endif set dy=s__fog_rect_f_D[this]-y set d=y-s__fog_rect_f_U[this] if d>dy then set dy=d endif if dx>dy then set d=dx else set d=dy endif endif if s__fog_rect_border[this]>=0 then if d>s__fog_rect_border[this]then set d=0 elseif d<=0 then set d=1 else set d=1-d/ s__fog_rect_border[this] endif elseif s__fog_rect_border[this]<0 then if d<=s__fog_rect_border[this]then set d=1 elseif d>0 then set d=0 else set d=d/ s__fog_rect_border[this] endif endif if d!=0 then set r=r+d if s__fog_rect_t2[this]==null then set s__fog_table_zS[s__fog_rect_Current]=s__fog_table_zS[s__fog_rect_Current]+d*s__fog_table_zS[s__fog_rect_t1[this]] set s__fog_table_zE[s__fog_rect_Current]=s__fog_table_zE[s__fog_rect_Current]+d*s__fog_table_zE[s__fog_rect_t1[this]] set s__fog_table_f_r[s__fog_rect_Current]=s__fog_table_f_r[s__fog_rect_Current]+d*s__fog_table_f_r[s__fog_rect_t1[this]] set s__fog_table_f_g[s__fog_rect_Current]=s__fog_table_f_g[s__fog_rect_Current]+d*s__fog_table_f_g[s__fog_rect_t1[this]] set s__fog_table_f_b[s__fog_rect_Current]=s__fog_table_f_b[s__fog_rect_Current]+d*s__fog_table_f_b[s__fog_rect_t1[this]] else set dx=d*hav set dy=d-dx set s__fog_table_zS[s__fog_rect_Current]=s__fog_table_zS[s__fog_rect_Current]+dx*s__fog_table_zS[s__fog_rect_t1[this]]+dy*s__fog_table_zS[s__fog_rect_t2[this]] set s__fog_table_zE[s__fog_rect_Current]=s__fog_table_zE[s__fog_rect_Current]+dx*s__fog_table_zE[s__fog_rect_t1[this]]+dy*s__fog_table_zE[s__fog_rect_t2[this]] set s__fog_table_f_r[s__fog_rect_Current]=s__fog_table_f_r[s__fog_rect_Current]+dx*s__fog_table_f_r[s__fog_rect_t1[this]]+dy*s__fog_table_f_r[s__fog_rect_t2[this]] set s__fog_table_f_g[s__fog_rect_Current]=s__fog_table_f_g[s__fog_rect_Current]+dx*s__fog_table_f_g[s__fog_rect_t1[this]]+dy*s__fog_table_f_g[s__fog_rect_t2[this]] set s__fog_table_f_b[s__fog_rect_Current]=s__fog_table_f_b[s__fog_rect_Current]+dx*s__fog_table_f_b[s__fog_rect_t1[this]]+dy*s__fog_table_f_b[s__fog_rect_t2[this]] endif endif set this=s__fog_rect_next[this] endloop if r<1 then set d=1-r set s__fog_table_zS[s__fog_rect_Current]=s__fog_table_zS[s__fog_rect_Current]+d*s__fog_table_zS[s__fog_rect_Basis] set s__fog_table_zE[s__fog_rect_Current]=s__fog_table_zE[s__fog_rect_Current]+d*s__fog_table_zE[s__fog_rect_Basis] set s__fog_table_f_r[s__fog_rect_Current]=s__fog_table_f_r[s__fog_rect_Current]+d*s__fog_table_f_r[s__fog_rect_Basis] set s__fog_table_f_g[s__fog_rect_Current]=s__fog_table_f_g[s__fog_rect_Current]+d*s__fog_table_f_g[s__fog_rect_Basis] set s__fog_table_f_b[s__fog_rect_Current]=s__fog_table_f_b[s__fog_rect_Current]+d*s__fog_table_f_b[s__fog_rect_Basis] else set s__fog_table_zS[s__fog_rect_Current]=s__fog_table_zS[s__fog_rect_Current]/ r set s__fog_table_zE[s__fog_rect_Current]=s__fog_table_zE[s__fog_rect_Current]/ r set s__fog_table_f_r[s__fog_rect_Current]=s__fog_table_f_r[s__fog_rect_Current]/ r set s__fog_table_f_g[s__fog_rect_Current]=s__fog_table_f_g[s__fog_rect_Current]/ r set s__fog_table_f_b[s__fog_rect_Current]=s__fog_table_f_b[s__fog_rect_Current]/ r endif if not Fg[(GetPlayerId(GetLocalPlayer()))]then call SetTerrainFogEx(0,s__fog_table_zS[s__fog_rect_Current],s__fog_table_zE[s__fog_rect_Current],0,s__fog_table_f_r[s__fog_rect_Current],s__fog_table_f_g[s__fog_rect_Current],s__fog_table_f_b[s__fog_rect_Current]) endif endfunction function s__fog_rect_Init takes nothing returns nothing call TimerStart(CreateTimer(),.03125,true,function s__fog_rect_Loop_c) set s__fog_rect_Basis=s__fog_table_new($FA0,5000,0,0,0) set s__fog_rect_Current=s__fog_table_new($FA0,5000,0,0,0) set s__fog_rect_hour_3=6-s__fog_rect_Be/ 2 set s__fog_rect_hour_9=6+s__fog_rect_Be/ 2 set s__fog_rect_hour_15=18-s__fog_rect_Be/ 2 set s__fog_rect_hour_21=18+s__fog_rect_Be/ 2 endfunction function s__weather_new takes rect rct,integer effectID,real s,real e returns integer local integer this=s__weather_V[0] if this==0 then set this=s__weather_I+1 set s__weather_I=this else set s__weather_V[0]=s__weather_V[this] endif set s__weather_V[this]=-1 set s__weather_F[this]=s__weather_F[0] set s__weather_F[0]=this set s__weather_r[this]=Rect(GetRectMinX(rct),GetRectMinY(rct),GetRectMaxX(rct),GetRectMaxY(rct)) set s__weather_id[this]=effectID set s__weather_enable[this]=true if s>=24. or s<0 then set s=ModuloReal(s,24) elseif s==24. then set s=0 endif set e=e-s if e>24. or e<0 then set e=ModuloReal(e,24) endif set s__weather_hour_stare[this]=s set s__weather_hour_end[this]=e return this endfunction function s__weather_Enable takes integer this,boolean b returns nothing set s__weather_enable[this]=b call EnableWeatherEffect(s__weather_we[this],b) endfunction function s__weather_Loop_c takes nothing returns nothing local integer this=s__weather_F[0] local real s=GetFloatGameState(GAME_STATE_TIME_OF_DAY) local real t loop exitwhen null==this if s__weather_enable[this]then set t=s-s__weather_hour_stare[this] if t<0 or t>24 then set t=ModuloReal(t,24) endif if s__weather_hour_end[this]>t then if s__weather_we[this]==null then set s__weather_we[this]=AddWeatherEffect(s__weather_r[this],s__weather_id[this]) call EnableWeatherEffect(s__weather_we[this],true) endif else if s__weather_we[this]!=null then call RemoveWeatherEffect(s__weather_we[this]) set s__weather_we[this]=null endif endif endif set this=s__weather_F[this] endloop endfunction function s__weather_Init takes nothing returns nothing call TimerStart(CreateTimer(),1,true,function s__weather_Loop_c) endfunction function Terrain_onInit takes nothing returns nothing call s__fog_rect_Init() call TimerStart(CreateTimer(),1,true,function s__weather_Loop_c) endfunction function tfv takes nothing returns integer return D9v(distexttag__fC) endfunction function tFv takes integer NNv returns nothing call fvv(NNv) endfunction function TextTag_create takes nothing returns integer local integer i=distexttag__TextTag_V[0] if i==0 then set i=distexttag__TextTag_I+1 set distexttag__TextTag_I=i else set distexttag__TextTag_V[0]=distexttag__TextTag_V[i] endif set distexttag__TextTag_V[i]=-1 return i endfunction function TextTag_remove takes integer i returns nothing if i>0 and distexttag__TextTag_V[i]==-1 then set distexttag__TextTag_V[i]=distexttag__TextTag_V[0] set distexttag__TextTag_V[0]=i endif endfunction function tgv_v takes nothing returns nothing local integer data=J[distexttag__fC_v] local integer id local integer i local integer i2 local real s local real t loop exitwhen 0==data set id=Timer_List[data] set i2=distexttag__TextTag_root1[id] set i=distexttag__TextTag_F[i2] set s=0 loop exitwhen i==i2 if distexttag__TextTag_s[i]>distexttag__TextTag_m[i]then set distexttag__TextTag_s[i]=.95*distexttag__TextTag_s[i] call SetTextTagText(distexttag__TextTag_tag[i],distexttag__TextTag_t[i],distexttag__TextTag_s[i]) endif if s>0 then set distexttag__TextTag_a[i]=distexttag__TextTag_a[i]+s endif if distexttag__TextTag_a[i]>0 then set t=distexttag__TextTag_a[i]*.2+.2 set distexttag__TextTag_a[i]=distexttag__TextTag_a[i]-t set distexttag__TextTag_z[i]=distexttag__TextTag_z[i]+t call SetTextTagPos(distexttag__TextTag_tag[i],distexttag__TextTag_x[i],distexttag__TextTag_y[i],distexttag__TextTag_z[i]) endif if distexttag__TextTag_h[i]>0 then set s=s+distexttag__TextTag_h[i] set distexttag__TextTag_h[i]=0 endif set distexttag__TextTag_l[i]=distexttag__TextTag_l[i]-.03125 if distexttag__TextTag_l[i]<=0 then set distexttag__TextTag_tag[i]=null call TextTag_remove(i) set distexttag__TextTag_F2[distexttag__TextTag_F[i]]=distexttag__TextTag_F2[i] set distexttag__TextTag_F[distexttag__TextTag_F2[i]]=distexttag__TextTag_F[i] endif set i=distexttag__TextTag_F[i] endloop if i2==distexttag__TextTag_F[i2]then call TextTag_remove(i2) set distexttag__TextTag_root1[id]=0 call fvv(data) endif set data=K[data] endloop endfunction function tgv takes nothing returns boolean local integer NNv=J[distexttag__fC] loop exitwhen 0==NNv if distexttag__cC[NNv]>distexttag__CC[NNv]then set distexttag__cC[NNv]=.95*distexttag__cC[NNv] call SetTextTagText(distexttag__BC[NNv],distexttag__DC[NNv],distexttag__cC[NNv]) else call fvv((NNv)) set distexttag__BC[NNv]=null endif set NNv=K[NNv] endloop return false endfunction function thv_v takes string t,unit u,real s,real m,real p8v,real fp,real ls returns nothing local integer i local integer i2 local integer id=GetUnitUserData(u) local real x=GetUnitX(u) local real y=GetUnitY(u) local real z=GetUnitFlyHeight(u)+35 if distexttag__TextTag_root1[id]==null then set Timer_List[D9v(distexttag__fC_v)]=id set i=TextTag_create() set distexttag__TextTag_F[i]=i set distexttag__TextTag_F2[i]=i set distexttag__TextTag_root1[id]=i else set i=distexttag__TextTag_root1[id] endif set i2=TextTag_create() set distexttag__TextTag_F[i2]=distexttag__TextTag_F[i] set distexttag__TextTag_F2[i2]=i set distexttag__TextTag_F2[distexttag__TextTag_F[i]]=i2 set distexttag__TextTag_F[i]=i2 set distexttag__TextTag_tag[i2]=CreateTextTag() set distexttag__TextTag_x[i2]=x set distexttag__TextTag_y[i2]=y set distexttag__TextTag_z[i2]=z set distexttag__TextTag_t[i2]=t set distexttag__TextTag_s[i2]=s set distexttag__TextTag_m[i2]=m set distexttag__TextTag_l[i2]=fp set distexttag__TextTag_h[i2]=$F call SetTextTagText(distexttag__TextTag_tag[i2],t,s) call SetTextTagPos(distexttag__TextTag_tag[i2],x,y,z) call SetTextTagVisibility(distexttag__TextTag_tag[i2],true) call SetTextTagPermanent(distexttag__TextTag_tag[i2],false) call SetTextTagLifespan(distexttag__TextTag_tag[i2],ls) call SetTextTagFadepoint(distexttag__TextTag_tag[i2],fp) call SetTextTagVelocity(distexttag__TextTag_tag[i2],.04*Cos(p8v),.04*Sin(p8v)) endfunction function thv takes string t,real x,real y,real z,real s,real m,real p8v,real fp,real ls returns nothing local integer NNv=(D9v(distexttag__fC)) set distexttag__BC[NNv]=CreateTextTag() set distexttag__DC[NNv]=t set distexttag__cC[NNv]=s set distexttag__CC[NNv]=m call SetTextTagText(distexttag__BC[NNv],t,s) call SetTextTagPos(distexttag__BC[NNv],x,y,z) call SetTextTagVisibility(distexttag__BC[NNv],true) call SetTextTagPermanent(distexttag__BC[NNv],false) call SetTextTagLifespan(distexttag__BC[NNv],ls) call SetTextTagFadepoint(distexttag__BC[NNv],fp) call SetTextTagVelocity(distexttag__BC[NNv],.04*Cos(p8v),.04*Sin(p8v)) endfunction function NewTextTagInTarget_A takes unit u,string s,integer r,integer b,integer g returns nothing local texttag t=CreateTextTag() call SetTextTagPos(t,GetUnitX(u),GetUnitY(u),GetUnitFlyHeight(u)+30) if(IsUnitType((u),UNIT_TYPE_GIANT))then call SetTextTagText(t,s,.0276) else call SetTextTagText(t,s,.02) endif call SetTextTagColor(t,r,b,g,$BE) call SetTextTagPermanent(t,false) call SetTextTagLifespan(t,3) call SetTextTagFadepoint(t,3) call SetTextTagVelocity(t,.01775*Cos(bj_PI/ 2),.01775*Sin(bj_PI/ 2)) set t=null endfunction function NewTextTagInTarget_B takes unit u,string s,real bav,integer r,integer b,integer g returns nothing local texttag t=CreateTextTag() call SetTextTagPos(t,GetUnitX(u),GetUnitY(u),GetUnitFlyHeight(u)+30) call SetTextTagText(t,s,bav*.0023) call SetTextTagColor(t,r,b,g,$FF) call SetTextTagPermanent(t,false) call SetTextTagFadepoint(t,1.2) call SetTextTagLifespan(t,2) call SetTextTagVelocity(t,.0,.02) set t=null endfunction function CreatePermanentTextTag takes string s,real bav,real x,real y returns nothing local texttag t=CreateTextTag() call SetTextTagPos(t,x,y,100) call SetTextTagText(t,s,.0023*bav) call SetTextTagPermanent(t,true) set t=null endfunction function tSv takes player p,string s returns nothing local unit u=MV[GetPlayerId(p)] call thv("|c00ffff80"+s,GetUnitX(u),GetUnitY(u),GetUnitFlyHeight(u)+25,.03,.0225,bj_PI/ 2,1.5,2) set u=null endfunction function ttv takes unit u,string s returns nothing call thv("|c00ffff80"+s,GetUnitX(u),GetUnitY(u),GetUnitFlyHeight(u)+25,.025,.02,bj_PI/ 2,1.5,2) endfunction function IssueUnitStop_DisplayText takes unit u,string s returns nothing call IssueImmediateOrderById(u,$D0004) call NewTextTagInTarget_B(u,s,8,$CD,$FF,$9B) endfunction function distexttag__onInit takes nothing returns nothing set distexttag__fC=fxv(function tgv) set distexttag__fC_v=fxv(function tgv_v) endfunction function RecycleGroup takes group g returns nothing if g==null then return endif if groupunits__wA>8190 then call DestroyGroup(g) else call GroupClear(g) set groupunits__UA[(groupunits__wA)]=g set groupunits__wA=groupunits__wA+1 endif endfunction function NewGroup takes nothing returns group if groupunits__wA==0 then return CreateGroup() endif set groupunits__wA=groupunits__wA-1 return groupunits__UA[(groupunits__wA)] endfunction function bj_finishinggroup takes nothing returns nothing if groupunits__Px then call GroupClear(groupunits__qx) set groupunits__Px=false endif call GroupAddUnit(groupunits__qx,GetEnumUnit()) endfunction function FinishingGroup takes group g returns nothing set groupunits__Px=true set groupunits__qx=g call ForGroup(groupunits__qx,function bj_finishinggroup) if groupunits__Px then call GroupClear(g) endif endfunction function bj_enununitsfilter takes nothing returns boolean return IsUnitAliveAndEnemy(GetFilterUnit(),groupunits__Mx) endfunction function GroupRandomEnumUnitsInRangeCounted takes real x,real y,real r,integer fcv,code pSv returns group local group g=NewGroup() local integer ptv=0 call GroupClear(G) call GroupClear(G2) call GroupEnumUnitsInRange(G2,x,y,r+75,Filter(pSv)) loop set groupunits__Mx=FirstOfGroup(G2) exitwhen groupunits__Mx==null call GroupRemoveUnit(G2,groupunits__Mx) if IsUnitInRangeXY(groupunits__Mx,x,y,r)then call GroupAddUnit(G,groupunits__Mx) endif endloop loop loop set groupunits__Mx=FirstOfGroup(G) exitwhen groupunits__Mx==null call GroupRemoveUnit(G,groupunits__Mx) set ptv=ptv+1 call GroupAddUnit(G2,groupunits__Mx) endloop loop set groupunits__Mx=FirstOfGroup(G2) exitwhen groupunits__Mx==null call GroupRemoveUnit(G2,groupunits__Mx) set ptv=ptv-1 exitwhen GetRandomInt(1,ptv+1)==1 call GroupAddUnit(G,groupunits__Mx) endloop exitwhen groupunits__Mx==null call GroupAddUnit(g,groupunits__Mx) set fcv=fcv-1 exitwhen fcv==0 endloop return g endfunction function pTv takes unit NZv,real x,real y,real r,integer fcv returns group set groupunits__Mx=NZv return GroupRandomEnumUnitsInRangeCounted(x,y,r,fcv,function bj_enununitsfilter) endfunction function EnumUnitsMinRange takes unit s,real x,real y,real r returns unit local real pUv=.0001*r*r local real v local real dX local real dY local unit u set groupunits__Mx=null call GroupEnumUnitsInRange(G,x,y,r+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,r)then if IsUnitAliveAndEnemy(u,s)and IsUnitVisible(u,GetOwningPlayer(s))then set dX=x-GetUnitX(u) set dY=y-GetUnitY(u) set v=.0001*(dX*dX+dY*dY) if vpyv then set groupunits__Mx=u set pyv=v endif endif endloop return groupunits__Mx endfunction function PickRandomUnitInRange takes unit s,real x,real y,real r returns unit local player p=GetOwningPlayer(s) local integer i=0 call GroupClear(G2) call GroupEnumUnitsInRange(G,x,y,r+75,null) loop set groupunits__Mx=FirstOfGroup(G) exitwhen groupunits__Mx==null call GroupRemoveUnit(G,groupunits__Mx) if IsUnitInRangeXY(groupunits__Mx,x,y,r)then if UnitAlive(groupunits__Mx)and IsUnitVisible(groupunits__Mx,p)and IsUnitEnemy(groupunits__Mx,p)and GetUnitAbilityLevel(groupunits__Mx,'Avul')==0 then set i=i+1 call GroupAddUnit(G2,groupunits__Mx) endif endif endloop loop set groupunits__Mx=FirstOfGroup(G2) exitwhen groupunits__Mx==null call GroupRemoveUnit(G2,groupunits__Mx) exitwhen GetRandomInt(1,i)==1 set i=i-1 endloop set p=null return groupunits__Mx endfunction function PickRandomUnitInUnitRange takes unit s,real r returns unit return PickRandomUnitInRange(s,GetUnitX(s),GetUnitY(s),r) endfunction function PickRandomHeroInRange takes unit s,real x,real y,real r returns unit local integer i=0 call GroupClear(G2) call GroupEnumUnitsInRange(G,x,y,r+75,null) loop set groupunits__Mx=FirstOfGroup(G) exitwhen groupunits__Mx==null call GroupRemoveUnit(G,groupunits__Mx) if IsUnitInRangeXY(groupunits__Mx,x,y,r)then if UnitAlive(groupunits__Mx)and nC[GetUnitUserData(groupunits__Mx)]then set i=i+1 call GroupAddUnit(G2,groupunits__Mx) endif endif endloop loop set groupunits__Mx=FirstOfGroup(G2) exitwhen groupunits__Mx==null call GroupRemoveUnit(G2,groupunits__Mx) exitwhen GetRandomInt(1,i)==1 set i=i-1 endloop return groupunits__Mx endfunction function PickRandomVisibleHeroInRange takes unit s,real x,real y,real r returns unit local player p=GetOwningPlayer(s) local integer i=0 call GroupClear(G2) call GroupEnumUnitsInRange(G,x,y,r+75,null) loop set groupunits__Mx=FirstOfGroup(G) exitwhen groupunits__Mx==null call GroupRemoveUnit(G,groupunits__Mx) if IsUnitInRangeXY(groupunits__Mx,x,y,r)then if UnitAlive(groupunits__Mx)and nC[GetUnitUserData(groupunits__Mx)]and IsUnitEnemy(groupunits__Mx,p)and IsUnitVisible(groupunits__Mx,p)and GetUnitAbilityLevel(groupunits__Mx,'Avul')==0 then set i=i+1 call GroupAddUnit(G2,groupunits__Mx) endif endif endloop loop set groupunits__Mx=FirstOfGroup(G2) exitwhen groupunits__Mx==null call GroupRemoveUnit(G2,groupunits__Mx) exitwhen GetRandomInt(1,i)==1 set i=i-1 endloop set p=null return groupunits__Mx endfunction function PickRandomVisibleHeroInRange2 takes unit s,real r returns unit return PickRandomVisibleHeroInRange(s,GetUnitX(s),GetUnitY(s),r) endfunction function GroupPickRandomHeroInRange takes unit s,real x,real y,real r,group g returns unit local integer i=0 call GroupClear(G2) call GroupEnumUnitsInRange(G,x,y,r+75,null) loop set groupunits__Mx=FirstOfGroup(G) exitwhen groupunits__Mx==null call GroupRemoveUnit(G,groupunits__Mx) if IsUnitInRangeXY(groupunits__Mx,x,y,r)then if not IsUnitInGroup(groupunits__Mx,g)and UnitAlive(groupunits__Mx)and IsUnitEnemy(groupunits__Mx,GetOwningPlayer(s))and nC[GetUnitUserData(groupunits__Mx)]then set i=i+1 call GroupAddUnit(G2,groupunits__Mx) endif endif endloop loop set groupunits__Mx=FirstOfGroup(G2) exitwhen groupunits__Mx==null call GroupRemoveUnit(G2,groupunits__Mx) exitwhen GetRandomInt(1,i)==1 set i=i-1 endloop return groupunits__Mx endfunction function p2v takes group g,real p3v,real p4v,real p5v,real p6v,real p7v returns nothing local real dX=p5v-p3v local real dY=p6v-p4v local real p8v=Atan2(dY,dX) local real pwv=SquareRoot(dX*dX+dY*dY) local real m=dY/(dX+.00001) local real p9v=.5*(p3v+p5v) local real Pvv=.5*(p4v+p6v) local unit u call GroupEnumUnitsInRange(G2,p9v,Pvv,.5*SquareRoot(pwv*pwv+p7v*p7v),null) loop set u=FirstOfGroup(G2) exitwhen u==null call GroupRemoveUnit(G2,u) if RAbsBJ(m*GetUnitX(u)-GetUnitY(u)-m*p3v+p4v)/ SquareRoot(m*m+1.)<=p7v then call GroupAddUnit(g,u) endif endloop endfunction function huv takes nothing returns integer return le endfunction function hUv takes nothing returns unit return Je[le] endfunction function hwv takes nothing returns nothing call DestroyTimer(GetExpiredTimer()) set Le=false endfunction function hWv takes boolexpr c returns nothing local trigger t=CreateTrigger() local integer f=me[0] local integer d=le call TriggerAddCondition(t,c) loop exitwhen 0==f set le=f call TriggerEvaluate(t) set f=me[f] endloop call DestroyTrigger(t) set t=null set le=d endfunction function Unit_App_Counter takes integer i,integer NNv returns nothing if(null!=Je[NNv])then set Counter[NNv]=Counter[NNv]+1 endif endfunction function Unit_Cancel_Counter takes integer i,integer NNv returns nothing local integer d=le if Counter[NNv]>0 then set Counter[NNv]=Counter[NNv]-1 if(0==Counter[NNv]and null==Je[NNv])then set le=NNv call TriggerEvaluate(alloc__GX[(BR)]) set le=d set me[NNv]=Ke set Ke=NNv endif endif endfunction function hzv takes integer NNv returns unit return Je[NNv] endfunction function hZv takes integer NNv returns player return GetOwningPlayer(Je[NNv]) endfunction function GetHeroStateLoop takes nothing returns nothing local integer i=1 local integer id loop exitwhen i>HeroStatIndex set id=HeroStatV[i] if GetHeroStr(Je[id],false)!=HeroStatStr[id]then call SetHeroStr(Je[id],HeroStatStr[id],true) endif if GetHeroAgi(Je[id],false)!=HeroStatAgi[id]then call SetHeroAgi(Je[id],HeroStatAgi[id],true) endif if GetHeroInt(Je[id],false)!=HeroStatInt[id]then call SetHeroInt(Je[id],HeroStatInt[id],true) endif set i=i+1 endloop endfunction function h_v takes nothing returns boolean local unit Q=GetFilterUnit() local integer i local integer d=le if CR and(Q!=Je[GetUnitUserData(Q)]and 0==GetUnitUserData(Q))then if(0==Ke)then set ke=ke+1 set i=ke else set i=Ke set Ke=me[Ke] endif call UnitAddAbility(Q,'A0CD') call UnitMakeAbilityPermanent(Q,true,'A0CD') call GroupAddUnit(h_v_Group,Q) call SetUnitUserData(Q,i) set Je[i]=Q if(Le)then set Me[i]=Me[0] set me[Me[0]]=i set me[i]=0 set Me[0]=i endif if IsUnitType(Q,UNIT_TYPE_HERO)then set HeroStatStr[i]=GetHeroStr(Q,false) set HeroStatAgi[i]=GetHeroAgi(Q,false) set HeroStatInt[i]=GetHeroInt(Q,false) set HeroStatIndex=HeroStatIndex+1 set HeroStatV[HeroStatIndex]=i set HeroStatF[i]=HeroStatIndex if HeroStatTm==null then set HeroStatTm=CreateTimer() call TimerStart(HeroStatTm,1,true,function GetHeroStateLoop) endif endif set le=i call TriggerEvaluate(alloc__GX[(bR)]) set le=d endif set Q=null return FALSE endfunction function RemoveHeroStat takes nothing returns nothing local integer id=le local integer i=HeroStatF[id] local integer j=UnitInventorySize(Je[id]) loop exitwhen j==0 set j=j-1 set LasManipulatedEquip=UnitItemInSlot(Je[id],j) if LasManipulatedEquip!=null then call RemoveItemG(LasManipulatedEquip) endif endloop if i>0 then set HeroStatF[id]=0 if i!=HeroStatIndex then set HeroStatV[i]=HeroStatV[HeroStatIndex] set HeroStatF[HeroStatV[HeroStatIndex]]=i endif set HeroStatV[HeroStatIndex]=0 set HeroStatIndex=HeroStatIndex-1 if YI[id]!=null then call RemoveUnitBJ(Je[YI[id]],36) set zI[YI[id]]=0 set YI[id]=0 endif if zI[id]!=null then set j=$C loop exitwhen i==0 set j=j-1 if HaveSavedInteger(BYHT2,zI[id],j)then set LasManipulatedEquip=ConvertVersion(LoadInteger(BYHT2,zI[id],j)) if GetItemTypeId(LasManipulatedEquip)>0 then call RemoveItemG(LasManipulatedEquip) endif endif endloop call free(zI[id]) set zI[id]=0 endif endif endfunction function h0v takes nothing returns boolean local unit u=GetFilterUnit() local integer i=GetUnitUserData(u) local integer d=le if(0==GetUnitAbilityLevel(u,'A0CD')and u==Je[i])then if(Le)then set me[Me[i]]=me[i] set Me[me[i]]=Me[i] endif set le=i call s__Trig_exe((UnitBeRemove_t[i])) call RemoveHeroStat() if(0==Counter[i])then call TriggerEvaluate(alloc__GX[(BR)]) set me[i]=Ke set Ke=i endif set le=d set Je[i]=null endif set u=null return false endfunction function unit_h1v takes nothing returns nothing local integer i=$F local boolexpr bc=Condition(function h0v) local boolexpr h2v=Condition(function h_v) local group g=CreateGroup() local player h3v set bR=NewTriggerFor() set BR=NewTriggerFor() set Le=true call TriggerRegisterEnterRegion(He,EntireMap,h2v) loop set h3v=Player(i) call TriggerRegisterPlayerUnitEvent(je,h3v,EVENT_PLAYER_UNIT_ISSUED_ORDER,bc) call SetPlayerAbilityAvailable(h3v,'A0CD',false) call GroupEnumUnitsOfPlayer(g,h3v,h2v) exitwhen 0==i set i=i-1 endloop call DestroyGroup(g) set bc=null set g=null set h2v=null set h3v=null call TimerStart(CreateTimer(),0,false,function hwv) endfunction function h4v takes boolexpr c,integer ev returns nothing call TriggerForAddActionB(c,ev) if(Le and ev==bR and 0!=me[0])then call hWv(c) endif endfunction function h5v takes integer W returns unit return Je[W] endfunction function h6v takes unit u returns integer return GetUnitUserData(u) endfunction function unit_onInit takes nothing returns nothing call ExecuteFunc("Init_Unit_Enter") call unit_h1v() endfunction function s__Effect_create takes nothing returns integer local integer this=s__Effect_V[(0)] if this==0 then set s__Effect_I=s__Effect_I+1 set this=s__Effect_I else set s__Effect_V[(0)]=s__Effect_V[this] endif return this endfunction function s__Effect_build takes effect e returns integer local integer eff=s__Effect_create() set s__Effect_e[eff]=e return eff endfunction function s__Effect_connect takes integer this,integer e2 returns integer set s__Effect_V[e2]=s__Effect_V[this] set s__Effect_lR[s__Effect_V[this]]=e2 set s__Effect_V[this]=e2 set s__Effect_lR[e2]=this set s__Effect_MR[e2]=true return this endfunction function DestroyEffectBY takes integer eff returns nothing local integer e2 if s__Effect_mR[eff]then set s__Effect_mR[eff]=false set e2=s__Effect_lR[eff] loop exitwhen e2==eff call DestroyEffect(s__Effect_e[e2]) set s__Effect_e[e2]=null set s__Effect_MR[e2]=false set e2=s__Effect_lR[e2] endloop set s__Effect_V[s__Effect_lR[eff]]=s__Effect_V[(0)] else if s__Effect_MR[eff]then set s__Effect_MR[eff]=false set s__Effect_lR[s__Effect_V[eff]]=s__Effect_lR[eff] set s__Effect_V[s__Effect_lR[eff]]=s__Effect_V[eff] endif set s__Effect_V[eff]=s__Effect_V[(0)] call DestroyEffect(s__Effect_e[eff]) set s__Effect_e[eff]=null endif set s__Effect_V[(0)]=eff endfunction function AddSpecialEffectBY takes string s,real x,real y returns integer return s__Effect_build(AddSpecialEffect(s,x,y)) endfunction function AddSpecialEffectTargetBY takes string s,unit u,string a returns integer return s__Effect_build(AddSpecialEffectTarget(s,u,a)) endfunction function EffectForAddItemBY takes integer eff,string s,real x,real y returns integer return s__Effect_connect(eff,(s__Effect_build(AddSpecialEffect((s),((x)*1.),((y)*1.))))) endfunction function EffectForAddItemOfTargerBY takes integer eff,string s,unit u,string a returns integer return s__Effect_connect(eff,(s__Effect_build(AddSpecialEffectTarget((s),(u),(a))))) endfunction function TimerDestroyEffectBY_func takes nothing returns nothing call DestroyEffectBY((ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:310"))) endfunction function TimerDestroyEffectBY takes integer eff,real r returns nothing call TimerStart(NewTimer(eff),r,false,function TimerDestroyEffectBY_func) endfunction function CreateEffectFor takes nothing returns integer local integer eff=s__Effect_create() set s__Effect_V[eff]=eff set s__Effect_lR[eff]=eff set s__Effect_mR[eff]=true return eff endfunction function TimerDestroyAddSpecialEffectTargetBY takes string s,unit u,string a,real d returns nothing call TimerDestroyEffectBY((s__Effect_build(AddSpecialEffectTarget((s),(u),(a)))),d) endfunction function UnitDecay_Start takes nothing returns boolean local integer NNv=J[UnitDecay_Func] loop exitwhen 0==NNv set UnitDecay_Alpha[NNv]=UnitDecay_Alpha[NNv]-UnitDecay_t[NNv] if UnitDecay_Alpha[NNv]<0 then set UnitDecay_Alpha[NNv]=0 endif call SetUnitVertexColor(UnitDecay_Treger[NNv],UnitDecay_Red[NNv],UnitDecay_Green[NNv],UnitDecay_Blue[NNv],R2I(UnitDecay_Alpha[NNv])) if GetUnitTypeId(UnitDecay_Treger[NNv])==0 or UnitDecay_Alpha[NNv]<=0 then call fvv(NNv) endif set NNv=K[NNv] endloop return false endfunction function UnitDecay_Alloc takes nothing returns integer if UnitDecay_Func==null then set UnitDecay_Func=fxv(function UnitDecay_Start) endif return D9v(UnitDecay_Func) endfunction function SetUnitDecay takes unit nU,integer cR,integer cG,integer cB,integer cA,real d returns nothing local integer NNv=UnitDecay_Alloc() set UnitDecay_Treger[NNv]=nU set UnitDecay_Red[NNv]=cR set UnitDecay_Green[NNv]=cG set UnitDecay_Blue[NNv]=cB set UnitDecay_Alpha[NNv]=cA set UnitDecay_t[NNv]=.03125*cA/ d call SetUnitVertexColor(UnitDecay_Treger[NNv],cR,cG,cB,cA) endfunction function DIv takes nothing returns integer local integer NNv=YR if(NNv!=0)then set YR=vI[NNv] else set ZR=ZR+1 set NNv=ZR endif if(NNv>8190)then call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,1000.,"Unable to allocate id for an object of type: xefx__recyclebin") return 0 endif set xI[NNv]=0 set vI[NNv]=-1 return NNv endfunction function DAv takes integer NNv returns nothing if NNv==null then call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,1000.,"Attempt to destroy a null struct of type: xefx__recyclebin") return elseif(vI[NNv]!=-1)then call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,1000.,"Double free of type: xefx__recyclebin") return endif set vI[NNv]=YR set YR=NNv endfunction function Lxv takes nothing returns nothing local integer NNv=oI[rI] loop exitwhen NNv==0 call RemoveUnitBJ(eI[NNv],33) set eI[NNv]=null set EI=EI-1 call DAv(NNv) set NNv=xI[NNv] endloop set oI[rI]=0 set VI=rI set rI=rI+1 if rI>R2I(4./ .5+1.)then set rI=0 endif if EI!=0 then call TimerStart(Nx,.5,false,function Lxv) endif endfunction function Lov takes unit nU returns integer local integer NNv=DIv() if EI==0 then call TimerStart(Nx,.5,false,function Lxv) endif set EI=EI+1 set eI[NNv]=nU call SetUnitOwner(eI[NNv],Player($F),false) set xI[NNv]=oI[VI] set oI[VI]=NNv return NNv endfunction function Lrv takes nothing returns nothing set Nx=(NewTimer(0)) endfunction function Liv takes nothing returns integer local integer NNv if(OI[(0)]==0)then set XI=XI+1 set NNv=XI else set NNv=OI[(0)] set OI[(0)]=OI[OI[(0)]] endif return NNv endfunction function Lav takes integer NNv returns nothing set OI[NNv]=OI[(0)] set OI[(0)]=NNv endfunction function LKv takes integer NNv,real Div returns nothing if Div>EntireMapMaxX then set Div=EntireMapMaxX elseif DivEntireMapMaxY then set Div=EntireMapMaxY elseif Div=$B4)then set i=$B3 elseif(i<0)then set i=0 endif call SetUnitAnimationByIndex(II[NNv],i) endfunction function DVv takes integer NNv,real Div returns nothing call SetUnitFlyHeight(II[NNv],Div,0) endfunction function DEv takes integer NNv,string DXv returns nothing if AI[NNv]!=null then call DestroyEffect(AI[NNv]) endif if DXv=="" then set AI[NNv]=null else set AI[NNv]=AddSpecialEffectTarget(DXv,II[NNv],"origin") endif endfunction function Ltv takes integer NNv returns nothing if(AI[NNv]!=null)then call DestroyEffect(AI[NNv]) set AI[NNv]=null endif call Lov(II[NNv]) set II[NNv]=null call Lav(NNv) endfunction function LTv takes integer NNv returns nothing call ShowUnit(II[NNv],false) call Ltv(NNv) endfunction function Lnv takes real x,real y,real f returns integer local integer NNv=Liv() set CR=false set II[NNv]=CreateUnit(Player($F),'e001',x,y,f*bj_RADTODEG) set CR=true call UnitAddAbility(II[NNv],'Amrf') call UnitRemoveAbility(II[NNv],'Amrf') call LKv(NNv,x) call Llv(NNv,y) return NNv endfunction function LVv takes integer id,real x,real y,real LEv returns integer local integer NNv=Liv() set CR=false set II[NNv]=CreateUnit(Player($F),id,x,y,LEv) set CR=true call UnitAddAbility(II[NNv],'Amrf') call UnitRemoveAbility(II[NNv],'Amrf') call LKv(NNv,x) call Llv(NNv,y) return NNv endfunction function LXv takes integer id,real x,real y,real ts,string LOv returns integer local integer NNv=Liv() set CR=false set II[NNv]=CreateUnit(Player($F),id,x,y,0) set CR=true call UnitAddAbility(II[NNv],'Amrf') call UnitRemoveAbility(II[NNv],'Amrf') call LKv(NNv,x) call Llv(NNv,y) call SetUnitTimeScale(II[(NNv)],((ts)*1.)) call SetUnitAnimation(II[NNv],LOv) return NNv endfunction function LRv takes integer id,real x,real y,real sc,real ts returns integer local integer NNv=Liv() set CR=false set II[NNv]=CreateUnit(Player($F),id,x,y,0) set CR=true call UnitAddAbility(II[NNv],'Amrf') call UnitRemoveAbility(II[NNv],'Amrf') call LKv(NNv,x) call Llv(NNv,y) call SetUnitScale(II[(NNv)],((sc)*1.),0,0) call SetUnitTimeScale(II[(NNv)],((ts)*1.)) return NNv endfunction function LIv takes string s,real x,real y,real nZ,real sc,real a,real za returns integer local integer NNv=Lnv(x,y,a) call DEv(NNv,s) call SetUnitFlyHeight(II[(NNv)],((nZ)*1.),0) call SetUnitScale(II[(NNv)],((sc)*1.),0,0) call LHv(NNv,za) return NNv endfunction function LAv takes string s,real x,real y,real sc returns integer local integer NNv=Lnv(x,y,0) call DEv(NNv,s) call SetUnitScale(II[(NNv)],((sc)*1.),0,0) return NNv endfunction function LNv takes string s,real x,real y,real nZ,real sc returns integer local integer NNv=Lnv(x,y,0) call SetUnitFlyHeight(II[(NNv)],((nZ)*1.),0) call DEv(NNv,s) call SetUnitScale(II[(NNv)],((sc)*1.),0,0) return NNv endfunction function Lbv takes integer NNv,real sc,real ts returns integer call SetUnitScale(II[(NNv)],((sc)*1.),0,0) call SetUnitTimeScale(II[(NNv)],((ts)*1.)) return NNv endfunction function LBv takes integer NNv returns player return GetOwningPlayer(II[NNv]) endfunction function Lcv takes integer NNv,player p returns nothing call SetUnitOwner(II[NNv],p,false) endfunction function LCv takes integer NNv,playercolor c returns nothing call SetUnitColor(II[NNv],c) endfunction function Ldv takes integer NNv,real Div returns nothing call SetUnitScale(II[NNv],Div,0,0) endfunction function LDv takes integer NNv,real Div returns integer call SetUnitTimeScale(II[NNv],Div) return NNv endfunction function Lfv takes integer NNv,integer r,integer g,integer b,integer a returns integer set bI[NNv]=r set BI[NNv]=g set cI[NNv]=b set CI[NNv]=a call SetUnitVertexColor(II[NNv],r,g,b,a) return NNv endfunction function LFv takes integer NNv,string fx returns integer call DestroyEffect(AddSpecialEffectTarget(fx,II[NNv],"origin")) return NNv endfunction function Lgv takes integer NNv returns real return GetUnitFacing(II[NNv]) endfunction function LGv takes integer NNv,real Div returns nothing call SetUnitFacing(II[NNv],Div*bj_RADTODEG) endfunction function Lhv takes integer NNv returns real return NI[NNv] endfunction function Ljv takes integer NNv returns real return GetUnitX(II[NNv]) endfunction function LJv takes integer NNv returns real return GetUnitY(II[NNv]) endfunction function Lkv takes integer NNv returns real return GetUnitFlyHeight(II[NNv]) endfunction function LLv takes integer NNv,real Div returns nothing call SetUnitFlyHeight(II[NNv],Div,0) endfunction function Lmv takes integer NNv,real nX,real nY,real nD,real nA,real aO returns nothing call LKv(NNv,nX+nD*Cos(nA)) call Llv(NNv,nY+nD*Sin(nA)) call SetUnitFacing(II[(NNv)],((nA+aO)*1.)*bj_RADTODEG) endfunction function LMv takes integer NNv,string DXv returns integer if AI[NNv]!=null then call DestroyEffect(AI[NNv]) endif if DXv=="" then set AI[NNv]=null else set AI[NNv]=AddSpecialEffectTarget(DXv,II[NNv],"origin") endif return NNv endfunction function Lpv takes nothing returns nothing call Ltv((ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:311"))) endfunction function LPv takes nothing returns nothing call LTv((ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:312"))) endfunction function Lqv takes integer NNv,real Bfv returns nothing call TimerStart(NewTimer(NNv),Bfv,false,function Lpv) endfunction function LQv takes integer NNv,real Bfv returns nothing call TimerStart(NewTimer(NNv),Bfv,false,function LPv) endfunction function Lsv takes integer NNv,real d returns nothing call SetUnitDecay(II[NNv],bI[NNv],BI[NNv],cI[NNv],CI[NNv],d) call LQv(NNv,d) endfunction function LSv takes integer NNv,integer r,integer g,integer b,integer a,real d returns nothing call SetUnitDecay(II[NNv],r,g,b,a,d) call LQv(NNv,d) endfunction function s__barrage_Alloc takes nothing returns integer return s__barrage__allocate() endfunction function s__barrage_Recycle takes integer this returns nothing set s__barrage_FR[s__barrage_FL[this]]=s__barrage_FR[this] set s__barrage_FL[s__barrage_FR[this]]=s__barrage_FL[this] call sc__barrage_deallocate(this) endfunction function s__barrage_Filling takes integer this,integer b returns nothing set s__barrage_FR[s__barrage_FL[this]]=b set s__barrage_FL[b]=s__barrage_FL[this] set s__barrage_FL[this]=b set s__barrage_FR[b]=this endfunction function LauncherFillingBarrage takes integer L,integer b returns nothing call s__barrage_Filling(L,b) endfunction function NewLauncher takes nothing returns integer local integer L=(s__barrage__allocate()) set s__barrage_FL[L]=L set s__barrage_FR[L]=L return L endfunction function SetBarrageFlightRadian takes integer b,real Div returns nothing set s__barrage_radian_a[b]=Tan(Div)*s__locationez_range[s__barrage_p1[b]] endfunction function GetBarrageFlightRadian takes integer b returns real return Atan(s__barrage_radian_a[b]/ s__locationez_range[s__barrage_p1[b]]) endfunction function SetBarrageFlightRadianEZ takes integer b,real Div returns nothing set s__barrage_radian_z[b]=Tan(Div)*s__locationez_range[s__barrage_p1[b]]/ 4 endfunction function GetBarrageFacing takes integer b returns real return s__barrage_facing[b] endfunction function CreateOrbital takes integer P1v,integer o,integer i returns integer local integer b=(s__barrage__allocate()) set s__barrage_acceleration[b]=0 set s__barrage_radian_z[b]=0 set s__barrage_steering[b]=0 set s__barrage_radian_a[b]=0 set s__barrage_enum_g[b]=NewGroup() set s__barrage_CollisionRange[b]=0 set s__barrage_impact_z[b]=0 set s__barrage_X[b]=s__locationez_X[o] set s__barrage_Y[b]=s__locationez_Y[o] set s__barrage_Z[b]=s__locationez_Z[o] set s__barrage_p1[b]=o set s__barrage_p2[b]=i set s__barrage_facing[b]=s__locationez_ang[s__barrage_p1[b]] set s__barrage_course[b]=0 set s__barrage_model[b]=P1v call SetUnitFlyHeight(II[(s__barrage_model[b])],((s__locationez_Z[o]-GetPointZ(s__locationez_X[o],s__locationez_Y[o]))*1.),0) return b endfunction function CreateBarrageTypeA takes unit s,unit t returns integer local integer o=LocationEZ(GetUnitX(s),GetUnitY(s),GetUnitFlyHeight(s)+60) local integer i=ConnectLocationEZToUnit(o,t) local integer b=CreateOrbital(Lnv(s__locationez_X[o],s__locationez_Y[o],s__locationez_ang[o]),o,i) set s__barrage_atkunit[b]=s set s__barrage_target[b]=t return b endfunction function CreateBarrageTypeB takes unit s,unit t,integer fx returns integer local integer o=LocationEZ((GetUnitX(II[(fx)])),(GetUnitY(II[(fx)])),(GetUnitFlyHeight(II[(fx)]))) local integer i=ConnectLocationEZToUnit(o,t) local integer b=CreateOrbital(fx,o,i) set s__barrage_atkunit[b]=s set s__barrage_target[b]=t return b endfunction function CreateBarrageTypeC takes real ox,real oy,real oz,unit t returns integer local integer o=LocationEZ(ox,oy,oz) local integer i=ConnectLocationEZToUnit(o,t) local integer b=CreateOrbital(Lnv(s__locationez_X[o],s__locationez_Y[o],s__locationez_ang[o]),o,i) set s__barrage_target[b]=t return b endfunction function CreateBarrageTypeD takes real ox,real oy,real oz,real tx,real ty,real tz returns integer local integer o=LocationEZ(ox,oy,oz) local integer i=ConnectLocationEZ(o,LocationEZ(tx,ty,tz)) return CreateOrbital(Lnv(s__locationez_X[o],s__locationez_Y[o],s__locationez_ang[o]),o,i) endfunction function CreateBarrageTypeE takes integer fx,real tx,real ty,real tz returns integer local integer o=LocationEZ((GetUnitX(II[(fx)])),(GetUnitY(II[(fx)])),(GetUnitFlyHeight(II[(fx)]))) local integer i=ConnectLocationEZ(o,LocationEZ(tx,ty,tz)) return CreateOrbital(fx,o,i) endfunction function BarrageMoveFiringPoint takes integer b returns nothing call MoveLocationEZ(s__barrage_p1[b],s__barrage_X[b],s__barrage_Y[b],s__barrage_Z[b]) set s__barrage_course[b]=0 endfunction function SetBarrageOutside takes integer b returns nothing set s__barrage_outside[b]=true endfunction function ResetBarrageOutside takes integer b returns nothing set s__barrage_outside[b]=false endfunction function SetBarrageFinish takes integer b returns nothing set s__barrage_finish[b]=true endfunction function ResetBarrageFinish takes integer b returns nothing set s__barrage_finish[b]=false endfunction function IsBarrageOutside takes integer b returns boolean return s__barrage_outside[b] endfunction function IsBarrageFinish takes integer b returns boolean return s__barrage_finish[b] endfunction function RemoveBarrage takes integer b returns nothing call RecycleGroup(s__barrage_enum_g[b]) call Ltv(s__barrage_model[b]) call RemoveLocationEZ(s__barrage_p2[b]) call RemoveLocationEZ(s__barrage_p1[b]) call s__barrage_Recycle(b) set s__barrage_atkunit[b]=null set s__barrage_target[b]=null set s__barrage_enum_g[b]=null set s__barrage_finish[b]=false set s__barrage_outside[b]=false set s__barrage_finish[(b)]=false endfunction function UseBarrage takes integer l returns nothing local integer b=s__barrage_FR[l] local real a local real d local real s local real h local real dx local real dy local real dz local real tx local real ty local real ox local real oy local integer o loop exitwhen b==l set o=s__barrage_p1[b] set h=s__barrage_radian_z[b] set ox=s__locationez_X[o] set oy=s__locationez_Y[o] if s__barrage_target[b]==null or GetUnitTypeId(s__barrage_target[b])==0 then set a=s__locationez_ang[o] set s__barrage_target[b]=null else call MoveLocationEZ(s__barrage_p2[b],GetUnitX(s__barrage_target[b]),GetUnitY(s__barrage_target[b]),GetUnitFlyHeight(s__barrage_target[b])+s__barrage_impact_z[b]+60) set dx=s__locationez_X[s__barrage_p2[b]]-s__barrage_X[b] set dy=s__locationez_Y[s__barrage_p2[b]]-s__barrage_Y[b] set a=Atan2(dy,dx) set s__barrage_course[b]=s__locationez_range[s__barrage_p1[b]]-SquareRoot(dx*dx+dy*dy) endif if s__barrage_steering[b]==0 or(Cos(s__barrage_facing[b]-a)>=Cos(s__barrage_steering[b]))then set s__barrage_facing[b]=a elseif Sin(a-s__barrage_facing[b])>=0 then set s__barrage_facing[b]=s__barrage_facing[b]+s__barrage_steering[b] else set s__barrage_facing[b]=s__barrage_facing[b]-s__barrage_steering[b] endif set d=s__locationez_range[o] set s=s__barrage_course[b]+s__barrage_speed[b] set s__barrage_course[b]=s call SetUnitFacing(II[(s__barrage_model[b])],((s__barrage_facing[b])*1.)*bj_RADTODEG) set tx=s__barrage_X[b]+s__barrage_speed[b]*Cos(s__barrage_facing[b]) set ty=s__barrage_Y[b]+s__barrage_speed[b]*Sin(s__barrage_facing[b]) set s__barrage_speed[b]=s__barrage_speed[b]+s__barrage_acceleration[b] set s__barrage_X[b]=tx set s__barrage_Y[b]=ty if s__barrage_radian_a[b]!=0 then set a=4*s__barrage_radian_a[b]*s*(d-s)/(d*d) set tx=tx+a*Cos(s__barrage_facing[b]+1.57) set ty=ty+a*Sin(s__barrage_facing[b]+1.57) call SetUnitFacing(II[(s__barrage_model[b])],((s__barrage_facing[b]+Atan(-(8*s__barrage_radian_a[b]*s-4*d*s__barrage_radian_a[b])/(d*d)))*1.)*bj_RADTODEG) endif if h!=0 or s__locationez_hd[o]!=0 then set dx=tx-(GetUnitX(II[(s__barrage_model[b])])) set dy=ty-(GetUnitY(II[(s__barrage_model[b])])) set dz=s__barrage_Z[b] set s__barrage_Z[b]=4*h*s*(d-s)/(d*d)+s__locationez_hd[o]*s+s__locationez_Z[o] call SetUnitFlyHeight(II[(s__barrage_model[b])],((s__barrage_Z[b]-GetPointZ(tx,ty))*1.),0) call LHv(s__barrage_model[b],90+R2I((Atan2(s__barrage_Z[b]-dz,SquareRoot(dx*dx+dy*dy))*bj_RADTODEG))) endif if tx>EntireMapMaxX or txEntireMapMaxY or ty=d then set s__barrage_finish[(b)]=true endif set b=s__barrage_FR[b] endloop endfunction function UseBarrage_B takes integer l returns nothing local integer b=s__barrage_FR[l] local real a local real d local real s local real h local real dx local real dy local real dz local real tx local real ty local real tz local real ox local real oy local real oz local integer o local integer t loop exitwhen b==l set o=s__barrage_p1[b] set t=s__barrage_p2[b] if s__barrage_target[b]!=null then if GetUnitTypeId(s__barrage_target[b])==0 then set s__barrage_target[b]=null else set s__locationez_X[t]=GetUnitX(s__barrage_target[b]) set s__locationez_Y[t]=GetUnitY(s__barrage_target[b]) set s__locationez_Z[t]=GetPointZ(s__locationez_X[t],s__locationez_Y[t])+GetUnitFlyHeight(s__barrage_target[b])+s__barrage_impact_z[b]+60 endif endif set a=s__barrage_X[b]*s__barrage_X[b]+s__barrage_Y[b]*s__barrage_Y[b] set h=s__barrage_Z[b]*s__barrage_Z[b] set s=SquareRoot(a+h) if s>0 then set d=s__barrage_speed[b]/ s else set d=$2710 endif set ox=s__locationez_X[o]+s__barrage_X[b]*d set oy=s__locationez_Y[o]+s__barrage_Y[b]*d set oz=s__locationez_Z[o]+s__barrage_Z[b]*d call LKv(s__barrage_model[b],ox) call Llv(s__barrage_model[b],oy) call SetUnitFlyHeight(II[(s__barrage_model[b])],((oz-GetPointZ(ox,oy))*1.),0) call SetUnitFacing(II[(s__barrage_model[b])],((Atan2(s__barrage_Y[b],s__barrage_X[b]))*1.)*bj_RADTODEG) call LHv(s__barrage_model[b],90+R2I(Atan2(s__barrage_Z[b],SquareRoot(a))*bj_RADTODEG)) if ox>EntireMapMaxX or oxEntireMapMaxY or oy=sNv then if UnitAddAbility(u,hIv)then call UnitMakeAbilityPermanent(u,true,hIv) endif set value=value-sNv else if UnitRemoveAbility(u,hIv)then call UnitMakeAbilityPermanent(u,false,hIv) endif endif set hIv=hIv-1 exitwhen sNv==1 endloop if sbv then if UnitAddAbility(u,hIv)then call UnitMakeAbilityPermanent(u,true,hIv) endif endif endfunction function unitstate__AbilityPreload takes nothing returns nothing local unit u local integer abid local integer index local integer array v set CR=false set u=CreateUnit(P[$F],'e001',-$3A20,$3C50,0) set CR=true set Ability_Id[(UNIT_STATE_ARMOR)]=1094009152 set Ability_Id[(UNIT_STATE_ATTACK)]=1094009408 set Ability_Id[(HERO_STATE_STR)]=1094009664 set Ability_Id[(HERO_STATE_AGI)]=1094009920 set Ability_Id[(HERO_STATE_INT)]=1094010176 set Ability_Id[(UNIT_STATE_ATTACK_SPEED)]=1094010432 set Ability_Id[(UNIT_STATE_HP)]=1094010688 set Ability_Id[(UNIT_STATE_MP)]=1094010944 set AbilitySize[(UNIT_STATE_ARMOR)]=$F set AbilitySize[(UNIT_STATE_ATTACK)]=18 set AbilitySize[(HERO_STATE_STR)]=16 set AbilitySize[(HERO_STATE_AGI)]=16 set AbilitySize[(HERO_STATE_INT)]=16 set AbilitySize[(UNIT_STATE_ATTACK_SPEED)]=9 set AbilitySize[(UNIT_STATE_HP)]=24 set AbilitySize[(UNIT_STATE_MP)]=24 set v[1]=UNIT_STATE_ARMOR set v[2]=UNIT_STATE_ATTACK set v[3]=HERO_STATE_STR set v[4]=HERO_STATE_AGI set v[5]=HERO_STATE_INT set v[6]=UNIT_STATE_ATTACK_SPEED set v[7]=UNIT_STATE_HP set v[8]=UNIT_STATE_MP set index=8 loop exitwhen index==0 set v[0]=v[index] set abid=Ability_Id[v[0]]+AbilitySize[v[0]] loop call UnitAddAbility(u,abid) exitwhen abid==Ability_Id[v[0]] set abid=abid-1 endloop set index=index-1 endloop call RemoveUnitBJ(u,37) set u=null endfunction function CancelUnitRegen takes integer data returns nothing local integer l local integer r if AppUnitRegen_On[data]then set l=AppUnitRegen_L[data] set r=AppUnitRegen_R[data] set AppUnitRegen_R[l]=r set AppUnitRegen_L[r]=l set AppUnitRegen_On[data]=false if AppUnitRegen_L[(0)]==0 then call frv(AppUnitRegen_Exe) endif call Unit_Cancel_Counter(359,data) endif endfunction function UnitRegenLoop_c takes nothing returns nothing local integer data=AppUnitRegen_L[(0)] loop exitwhen data==0 if UnitHpRegen[(data)]==0 and UnitMpRegen[(data)]==0 then call CancelUnitRegen(data) elseif UnitAlive((Je[(data)]))then call SetWidgetLife((Je[(data)]),RMaxBJ(.5,GetWidgetLife((Je[(data)]))+UnitHpRegen[(data)])) if UnitMpRegen[(data)]>0 then call SetUnitState((Je[(data)]),UNIT_STATE_MANA,GetUnitState((Je[(data)]),UNIT_STATE_MANA)+UnitMpRegen[(data)]) endif endif set data=AppUnitRegen_L[data] endloop endfunction function AppUnitRegen takes integer data returns boolean local integer v if data>0 and data<8192 and not AppUnitRegen_On[data]then if AppUnitRegen_L[(0)]==0 then if AppUnitRegen_Exe==0 then set AppUnitRegen_Exe=fxv(function UnitRegenLoop_c) endif call fov(AppUnitRegen_Exe) endif set v=AppUnitRegen_L[(0)] set AppUnitRegen_L[data]=v set AppUnitRegen_R[v]=data set AppUnitRegen_L[(0)]=data set AppUnitRegen_R[data]=0 set AppUnitRegen_On[data]=true call Unit_App_Counter(360,data) return true endif return false endfunction function UnitRemoveControl takes integer data returns nothing call sc___prototype3_evaluate(1,(data)) call sc___prototype111_evaluate(1,(Je[(data)])) call sc___prototype111_evaluate(2,(Je[(data)])) call sc___prototype111_evaluate(3,(Je[(data)])) call UnitRemoveAbility((Je[(data)]),'B004') call UnitRemoveAbility((Je[(data)]),'B006') call UnitRemoveAbility((Je[(data)]),'B009') call UnitRemoveAbility((Je[(data)]),'B00H') call UnitRemoveAbility((Je[(data)]),'B01I') call UnitRemoveAbility((Je[(data)]),'B01N') call UnitRemoveAbility((Je[(data)]),'B02B') call UnitRemoveAbility((Je[(data)]),'B02D') call UnitRemoveAbility((Je[(data)]),'B02V') call UnitRemoveAbility((Je[(data)]),'B03E') call UnitRemoveAbility((Je[(data)]),'B046') call UnitRemoveAbility((Je[(data)]),'B04H') call UnitRemoveAbility((Je[(data)]),'B04I') call UnitRemoveAbility((Je[(data)]),'B06I') call UnitRemoveAbility((Je[(data)]),'Bakb') call UnitRemoveAbility((Je[(data)]),'Bbsk') call UnitRemoveAbility((Je[(data)]),'Bfro') call UnitRemoveAbility((Je[(data)]),'Bmil') call UnitRemoveAbility((Je[(data)]),'Bslo') call UnitRemoveAbility((Je[(data)]),'BEme') call UnitRemoveAbility((Je[(data)]),'BNdm') call UnitRemoveAbility((Je[(data)]),'BNdo') call UnitRemoveAbility((Je[(data)]),'BUav') call UnitRemoveAbility((Je[(data)]),'BUdd') call UnitRemoveAbility((Je[(data)]),'B082') call UnitRemoveAbility((Je[(data)]),'B091') call UnitRemoveAbility((Je[(data)]),'B09E') call UnitRemoveAbility((Je[(data)]),'B09D') endfunction function UnitAppBuff takes integer data,integer dhv,integer ss returns nothing if not PB[data]then call Auxiliary_TargetOrder((dhv),null,1,ss,(Je[(data)])) endif endfunction function UnitAppBuffByLevel takes integer data,integer dhv,integer ss,integer lv returns nothing if not PB[data]then call Auxiliary_TargetOrder((dhv),null,lv,ss,(Je[(data)])) endif endfunction function IsUnitNocontrol takes integer data returns boolean return PB[data] endfunction function SetUnitNocontrol takes integer data,boolean b returns nothing if b then call UnitRemoveControl(data) endif set PB[data]=b endfunction function SetUnitNotSeckill takes integer data,boolean b returns nothing if b then set pB_v[data]=pB_v[data]+1 else set pB_v[data]=pB_v[data]-1 endif set pB[data]=pB_v[data]>0 endfunction function GetUnitMdef takes integer id returns real if UnitMdef_t[id]!=0 then return UnitMdef[id] endif return .0 endfunction function GetUnitAdef takes integer id returns real if UnitAdef_t[id]!=0 then return UnitAdef[id] endif return .0 endfunction function GetUnitDodge takes integer id returns real if UnitDodge_t[id]!=0 then return UnitDodge[id] endif return .0 endfunction function GetUnitHitRate takes integer id returns real return UnitHitRate[id] endfunction function GetUnitBeCureRatio takes integer id returns real return UnitBeCureRatio[id] endfunction function GetUnitDefaultArmor takes integer data returns integer return R2I(Dsv((Je[(data)])))-UnitArmor[data] endfunction function GetUnitDefaultAttackSpeed takes integer data returns integer return UnitAttackSpeed[data]-HeroAgi_atk_speed[data] endfunction function GetUnitCrit takes integer data returns real return UnitCrit[data] endfunction function GetUnitCritDamage takes integer data returns real return Unit_C_DMG[data] endfunction function GetUnitBasicHpRegen takes integer data returns real return UnitHpRegen[data] endfunction function SummonedUnitSetMaster takes integer data,integer s returns nothing if Master_App[data]then call Unit_Cancel_Counter(361,Master[data]) set Master_App[data]=false endif if data!=s then set Master_App[data]=true call Unit_App_Counter(362,Master[data]) endif set Master[data]=s endfunction function SummonedUnitGetMaster takes integer data returns integer return Master[data] endfunction function GetUnitMaxLifeById takes integer data returns real if GetUnitAbilityLevel((Je[(data)]),'A0A3')==1 then return GetUnitState((Je[(data)]),UNIT_STATE_MAX_LIFE)-2000000. endif return GetUnitState((Je[(data)]),UNIT_STATE_MAX_LIFE) endfunction function GetUnitMaxManaById takes integer data returns real if HaveSavedBoolean(BYHT,(unitstate__qB),UnitTypeId[data])then return .0 endif return GetUnitState((Je[(data)]),UNIT_STATE_MAX_MANA) endfunction function QUv takes integer data returns integer return GetPlayerId(GetOwningPlayer((Je[(data)]))) endfunction function ModifyUnitMagicDamage takes integer data,real v returns nothing set Unit_MATK[data]=Unit_MATK[data]+.01*v endfunction function ModifyUnitCritDamage takes integer data,real v returns nothing set Unit_C_DMG[data]=Unit_C_DMG[data]+.01*v endfunction function ModifyUnitPersistentDamage takes integer data,real v returns nothing set Unit_DOT[data]=Unit_DOT[data]+.01*v endfunction function ModifyUnitFireDamage takes integer data,real v returns nothing set Unit_Fire_Damage[data]=Unit_Fire_Damage[data]+.01*v endfunction function ModifyUnitFrostDamage takes integer data,real v returns nothing set Unit_Frost_Damage[data]=Unit_Frost_Damage[data]+.01*v endfunction function ModifyUnitGasDamage takes integer data,real v returns nothing set Unit_Gas_Damage[data]=Unit_Gas_Damage[data]+.01*v endfunction function ModifyUnitToDamage takes integer data,real v returns nothing set Unit_To_Damage[data]=Unit_To_Damage[data]+.01*v endfunction function ModifyUnitLightningDamage takes integer data,real v returns nothing set Unit_Lightning_Damage[data]=Unit_Lightning_Damage[data]+.01*v endfunction function ModifyUnitLightDamage takes integer data,real v returns nothing set Unit_Light_Damage[data]=Unit_Light_Damage[data]+.01*v endfunction function ModifyUnitDarkdamage takes integer data,real v returns nothing set Unit_Dark_Damage[data]=Unit_Dark_Damage[data]+.01*v endfunction function ModifyUnitArmor takes integer data,integer value returns nothing set UnitArmor[data]=UnitArmor[data]+value call AbilityRefresh((Je[(data)]),Ability_Id[(UNIT_STATE_ARMOR)],AbilitySize[(UNIT_STATE_ARMOR)],UnitArmor[data]) endfunction function ModifyUnitAttack takes integer data,integer value returns nothing set UnitAttack[data]=UnitAttack[data]+value call AbilityRefresh((Je[(data)]),Ability_Id[(UNIT_STATE_ATTACK)],AbilitySize[(UNIT_STATE_ATTACK)],UnitAttack[data]) endfunction function ModifyUnitAttackSpeed takes integer data,integer value returns nothing set UnitAttackSpeed[data]=UnitAttackSpeed[data]+value call AbilityRefresh((Je[(data)]),Ability_Id[(UNIT_STATE_ATTACK_SPEED)],AbilitySize[(UNIT_STATE_ATTACK_SPEED)],UnitAttackSpeed[data]) endfunction function ModifyUnitHP takes integer data,integer value returns nothing set UnitHP[data]=UnitHP[data]+value call AbilityRefresh((Je[(data)]),Ability_Id[(UNIT_STATE_HP)],AbilitySize[(UNIT_STATE_HP)],UnitHP[data]) endfunction function ModifyUnitMP takes integer data,integer value returns nothing if not HaveSavedBoolean(BYHT,(unitstate__qB),GetUnitTypeId((Je[(data)])))then set UnitMP[data]=UnitMP[data]+value call AbilityRefresh((Je[(data)]),Ability_Id[(UNIT_STATE_MP)],AbilitySize[(UNIT_STATE_MP)],UnitMP[data]) endif endfunction function ModifyUnitHpRegen takes integer data,real value returns nothing if value>0 or value<0 then set UnitHpRegen[data]=UnitHpRegen[data]+.03125*value set value=UnitHpRegen[data] if value>0 or value<0 then call AppUnitRegen(data) endif endif endfunction function ModifyUnitMpRegen takes integer data,real value returns nothing if value!=0 and not HaveSavedBoolean(BYHT,(unitstate__qB),GetUnitTypeId((Je[(data)])))then set UnitMpRegen[data]=UnitMpRegen[data]+.03125*value set value=UnitMpRegen[data] if value>0 or value<0 then call AppUnitRegen(data) endif endif endfunction function ModifyUnitCrit takes integer data,real v returns nothing set UnitCrit[data]=UnitCrit[data]+v endfunction function RefreshUnitCrit takes integer data returns nothing local real value=.35*SquareRoot(GetHeroState2((Je[(data)]),true)) call ModifyUnitCrit(data,value-HeroAgi_crit[data]) set HeroAgi_crit[data]=value endfunction function RefreshUnitAttackSpeed takes integer data returns nothing local integer agi=GetHeroState2((Je[(data)]),true) local integer value=R2I(2*SquareRoot(agi)) if agi>300 then set value=value+$96 else set value=value+R2I(.5*agi) endif if kc[(data)]=='H015' or kc[(data)]=='H01N' then set value=value/ 2 endif call ModifyUnitAttackSpeed(data,value-HeroAgi_atk_speed[data]) set HeroAgi_atk_speed[data]=value endfunction function RefreshUnitHpRegen takes integer data returns nothing local real value=GetHeroState1((Je[(data)]),false)*.01 call ModifyUnitHpRegen(data,value-HeroStr_hp_regen[data]) set HeroStr_hp_regen[data]=value endfunction function RefreshUnitMpRegen takes integer data returns nothing local real value=GetHeroState3((Je[(data)]),false)*.03 call ModifyUnitMpRegen(data,value-HeroInt_mp_regen[data]) set HeroInt_mp_regen[data]=value endfunction function ModifyHeroStrBy takes integer data,integer value returns nothing set HeroStr[data]=HeroStr[data]+value call AbilityRefresh((Je[(data)]),Ability_Id[(HERO_STATE_STR)],AbilitySize[(HERO_STATE_STR)],HeroStr[data]) call ModifyUnitHpRegen(data,.01*value) endfunction function ModifyHeroAgiBy takes integer data,integer value returns nothing if value!=0 then set HeroAgi[data]=HeroAgi[data]+value call AbilityRefresh((Je[(data)]),Ability_Id[(HERO_STATE_AGI)],AbilitySize[(HERO_STATE_AGI)],HeroAgi[data]) call RefreshUnitAttackSpeed(data) call RefreshUnitCrit(data) endif endfunction function ModifyHeroIntBy takes integer data,integer value returns nothing set HeroInt[data]=HeroInt[data]+value call AbilityRefresh((Je[(data)]),Ability_Id[(HERO_STATE_INT)],AbilitySize[(HERO_STATE_INT)],HeroInt[data]) call ModifyUnitMP(data,5*value) call ModifyUnitMpRegen(data,.03*value) endfunction function GetunitseatetableV takes integer m returns real return 100*s__unitseate_table_v[m] endfunction function RefreshUnitStateTable takes integer root returns real local integer m=root local real t=1 loop set t=t*(1.-s__unitseate_table_v[m]) set m=s__unitseate_table_L[m] exitwhen m==root endloop return 1-t endfunction function RefreshUnitStateTableB takes integer root returns real local integer m=root local real t=1 loop set t=t*(1.+s__unitseate_table_v[m]) set m=s__unitseate_table_L[m] exitwhen m==root endloop return t endfunction function UnitDodgeChange takes integer data,integer m,real v returns nothing if v>100 then set s__unitseate_table_v[m]=1 else set s__unitseate_table_v[m]=v*.01 endif set UnitDodge[data]=100.*RefreshUnitStateTable(UnitDodge_t[data]) endfunction function ModifyUnitDodge takes integer data,real v returns integer local integer m=UnitDodge_t[data] if m==0 then set m=s__unitseate_table_new() set UnitDodge_t[data]=m else set m=s__unitseate_table_addfor(m) endif if v>100 then set s__unitseate_table_v[m]=1 else set s__unitseate_table_v[m]=v*.01 endif set UnitDodge[data]=100.-(100.-UnitDodge[data])*(1.-s__unitseate_table_v[m]) return m endfunction function DeUnitDodge takes integer data,integer m returns nothing if m==UnitDodge_t[data]then set m=s__unitseate_table_remove(m) if m==null then set UnitDodge_t[data]=0 set UnitDodge[data]=0 return endif set UnitDodge_t[data]=m else call s__unitseate_table_remove(m) endif set UnitDodge[data]=100.*RefreshUnitStateTable(UnitDodge_t[data]) endfunction function ModifyUnitHitRate takes integer data,real v returns integer local integer m=UnitHitRate_t[data] if m==0 then set m=s__unitseate_table_new() set UnitHitRate_t[data]=m else set m=s__unitseate_table_addfor(m) endif if v<-100 then set s__unitseate_table_v[m]=-1 else set s__unitseate_table_v[m]=v*.01 endif set UnitHitRate[data]=UnitHitRate[data]*(1.+s__unitseate_table_v[m]) return m endfunction function UnitHitRateChange takes integer data,integer m,real v returns nothing if v<-100 then set v=-100 endif set s__unitseate_table_v[m]=.01*v set UnitHitRate[data]=RefreshUnitStateTableB(UnitHitRate_t[data]) endfunction function DeUnitHitRate takes integer data,integer m returns nothing if m==UnitHitRate_t[data]then set m=s__unitseate_table_remove(m) if m==null then set UnitHitRate_t[data]=0 set UnitHitRate[data]=1. return endif set UnitHitRate_t[data]=m else call s__unitseate_table_remove(m) endif set UnitHitRate[data]=RefreshUnitStateTableB(UnitHitRate_t[data]) endfunction function ModifyUnitMdef takes integer data,real v returns integer local integer m=UnitMdef_t[data] if m==0 then set m=s__unitseate_table_new() set UnitMdef_t[data]=m else set m=s__unitseate_table_addfor(m) endif if v>100 then set s__unitseate_table_v[m]=1 else set s__unitseate_table_v[m]=v*.01 endif set UnitMdef[data]=1-(1.-UnitMdef[data])*(1.-s__unitseate_table_v[m]) return m endfunction function UnitMdefChange takes integer data,integer m,real v returns nothing if v>100 then set s__unitseate_table_v[m]=1 else set s__unitseate_table_v[m]=v*.01 endif set UnitMdef[data]=RefreshUnitStateTable(UnitMdef_t[data]) endfunction function DeUnitMdef takes integer data,integer m returns nothing if m==UnitMdef_t[data]then set m=s__unitseate_table_remove(m) if m==null then set UnitMdef_t[data]=0 set UnitMdef[data]=0 return endif set UnitMdef_t[data]=m else call s__unitseate_table_remove(m) endif set UnitMdef[data]=RefreshUnitStateTable(UnitMdef_t[data]) endfunction function ModifyUnitAdef takes integer data,real v returns integer local integer m=UnitAdef_t[data] if m==0 then set m=s__unitseate_table_new() set UnitAdef_t[data]=m else set m=s__unitseate_table_addfor(m) endif if v>100 then set s__unitseate_table_v[m]=1 else set s__unitseate_table_v[m]=v*.01 endif set UnitAdef[data]=1-(1.-UnitAdef[data])*(1.-s__unitseate_table_v[m]) return m endfunction function UnitAdefChange takes integer data,integer m,real v returns nothing if v>100 then set s__unitseate_table_v[m]=1 else set s__unitseate_table_v[m]=v*.01 endif set UnitAdef[data]=RefreshUnitStateTable(UnitAdef_t[data]) endfunction function DeUnitAdef takes integer data,integer m returns nothing if m==UnitAdef_t[data]then set m=s__unitseate_table_remove(m) if m==null then set UnitAdef_t[data]=0 set UnitAdef[data]=0 return endif set UnitAdef_t[data]=m else call s__unitseate_table_remove(m) endif set UnitAdef[data]=RefreshUnitStateTable(UnitAdef_t[data]) endfunction function ModifyUnitBeCureRatio takes integer data,real v returns integer local integer m=UnitBeCureRatio_t[data] if m==0 then set m=s__unitseate_table_new() set UnitBeCureRatio_t[data]=m else set m=s__unitseate_table_addfor(m) endif if v<-100 then set s__unitseate_table_v[m]=-1 else set s__unitseate_table_v[m]=v*.01 endif set UnitBeCureRatio[data]=UnitBeCureRatio[data]*(1.+s__unitseate_table_v[m]) return m endfunction function UnitBeCureRatioChange takes integer data,integer m,real v returns nothing if v<-100 then set s__unitseate_table_v[m]=-1 else set s__unitseate_table_v[m]=v*.01 endif set UnitBeCureRatio[data]=RefreshUnitStateTableB(UnitBeCureRatio_t[data]) endfunction function DeUnitBeCureRatio takes integer data,integer m returns nothing if m==UnitBeCureRatio_t[data]then set m=s__unitseate_table_remove(m) if m==null then set UnitBeCureRatio_t[data]=0 set UnitBeCureRatio[data]=1. return endif set UnitBeCureRatio_t[data]=m else call s__unitseate_table_remove(m) endif set UnitBeCureRatio[data]=RefreshUnitStateTableB(UnitBeCureRatio_t[data]) endfunction function UnitAddBeRemoveTrig takes integer data,boolexpr c returns nothing if UnitBeRemove_t[data]==0 then set UnitBeRemove_t[data]=s__Trig_new() endif call TriggerAddCondition(s__Trig_trig[((UnitBeRemove_t[data]))],((c))) endfunction function UnitAddBeRemoveTrigB takes integer data,boolexpr c returns integer if UnitBeRemove_t[data]==0 then set UnitBeRemove_t[data]=s__Trig_new() endif return s__Trig_addedtothelist_b((UnitBeRemove_t[data]),c) endfunction function UnitAddPAttackTrig takes integer data,code c returns nothing if UnitPAttack_t[data]==0 then set UnitPAttack_t[data]=s__Trig_new() endif call TriggerAddCondition(s__Trig_trig[((UnitPAttack_t[data]))],Filter((c))) endfunction function UnitAddPAttackTrigB takes integer data,code c returns integer if UnitPAttack_t[data]==0 then set UnitPAttack_t[data]=s__Trig_new() endif return s__Trig_addedtothelist((UnitPAttack_t[data]),c) endfunction function UnitAddPAttackTrigC takes integer data,boolexpr c returns integer if UnitPAttack_t[data]==0 then set UnitPAttack_t[data]=s__Trig_new() endif return s__Trig_addedtothelist_b((UnitPAttack_t[data]),c) endfunction function UnitAddBePAttackTrig takes integer data,code c returns nothing if UnitBePAttack_t[data]==0 then set UnitBePAttack_t[data]=s__Trig_new() endif call TriggerAddCondition(s__Trig_trig[((UnitBePAttack_t[data]))],Filter((c))) endfunction function UnitAddBePAttackTrigB takes integer data,code c returns integer if UnitBePAttack_t[data]==0 then set UnitBePAttack_t[data]=s__Trig_new() endif return s__Trig_addedtothelist((UnitBePAttack_t[data]),c) endfunction function UnitAddBePAttackTrigC takes integer data,boolexpr c returns integer if UnitBePAttack_t[data]==0 then set UnitBePAttack_t[data]=s__Trig_new() endif return s__Trig_addedtothelist_b((UnitBePAttack_t[data]),c) endfunction function UnitAddBeDamagerTrig takes integer data,code c returns nothing if UnitBeDamager_t[data]==0 then set UnitBeDamager_t[data]=s__Trig_new() endif call TriggerAddCondition(s__Trig_trig[((UnitBeDamager_t[data]))],Filter((c))) endfunction function UnitAddBeDamagerTrigB takes integer data,code c returns integer if UnitBeDamager_t[data]==0 then set UnitBeDamager_t[data]=s__Trig_new() endif return s__Trig_addedtothelist((UnitBeDamager_t[data]),c) endfunction function UnitAddBeDamagerTrigC takes integer data,boolexpr c returns integer if UnitBeDamager_t[data]==0 then set UnitBeDamager_t[data]=s__Trig_new() endif return s__Trig_addedtothelist_b((UnitBeDamager_t[data]),c) endfunction function UnitAddDamagerTrig takes integer data,code c returns nothing if UnitDamager_t[data]==0 then set UnitDamager_t[data]=s__Trig_new() endif call TriggerAddCondition(s__Trig_trig[((UnitDamager_t[data]))],Filter((c))) endfunction function UnitAddDamagerTrigB takes integer data,code c returns integer if UnitDamager_t[data]==0 then set UnitDamager_t[data]=s__Trig_new() endif return s__Trig_addedtothelist((UnitDamager_t[data]),c) endfunction function UnitAddDamagerTrigC takes integer data,boolexpr c returns integer if UnitDamager_t[data]==0 then set UnitDamager_t[data]=s__Trig_new() endif return s__Trig_addedtothelist_b((UnitDamager_t[data]),c) endfunction function UnitAddShieldTrig takes integer data,code c returns nothing if UnitShield_t[data]==0 then set UnitShield_t[data]=s__Trig_new() endif call TriggerAddCondition(s__Trig_trig[((UnitShield_t[data]))],Filter((c))) endfunction function UnitAddShieldTrigB takes integer data,code c returns integer if UnitShield_t[data]==0 then set UnitShield_t[data]=s__Trig_new() endif return s__Trig_addedtothelist((UnitShield_t[data]),c) endfunction function UnitAddShieldTrigC takes integer data,boolexpr c returns integer if UnitShield_t[data]==0 then set UnitShield_t[data]=s__Trig_new() endif return s__Trig_addedtothelist_b((UnitShield_t[data]),c) endfunction function AddUnitDeathTrig takes integer data,code c returns nothing if UnitDeath_t[data]==0 then set UnitDeath_t[data]=s__Trig_new() endif call TriggerAddCondition(s__Trig_trig[((UnitDeath_t[data]))],Filter((c))) endfunction function AddUnitDeathTrigB takes integer data,code c returns integer if UnitDeath_t[data]==0 then set UnitDeath_t[data]=s__Trig_new() endif return s__Trig_addedtothelist((UnitDeath_t[data]),c) endfunction function AddUnitDeathTrigC takes integer data,boolexpr c returns integer if UnitDeath_t[data]==0 then set UnitDeath_t[data]=s__Trig_new() endif return s__Trig_addedtothelist_b((UnitDeath_t[data]),c) endfunction function AddUnitCureTrig takes integer data,code c returns nothing if UNIT_CURE_EVENT[data]==0 then set UNIT_CURE_EVENT[data]=s__Trig_new() endif call TriggerAddCondition(s__Trig_trig[((UNIT_CURE_EVENT[data]))],Filter((c))) endfunction function AddUnitCureTrigB takes integer data,code c returns integer if UNIT_CURE_EVENT[data]==0 then set UNIT_CURE_EVENT[data]=s__Trig_new() endif return s__Trig_addedtothelist((UNIT_CURE_EVENT[data]),c) endfunction function AddUnitCureTrigC takes integer data,boolexpr c returns integer if UNIT_CURE_EVENT[data]==0 then set UNIT_CURE_EVENT[data]=s__Trig_new() endif return s__Trig_addedtothelist_b((UNIT_CURE_EVENT[data]),c) endfunction function AddUnitBeCureTrig takes integer data,code c returns nothing if UNIT_BE_CURE_EVENT[data]==0 then set UNIT_BE_CURE_EVENT[data]=s__Trig_new() endif call TriggerAddCondition(s__Trig_trig[((UNIT_BE_CURE_EVENT[data]))],Filter((c))) endfunction function AddUnitBeCureTrigB takes integer data,code c returns integer if UNIT_BE_CURE_EVENT[data]==0 then set UNIT_BE_CURE_EVENT[data]=s__Trig_new() endif return s__Trig_addedtothelist((UNIT_BE_CURE_EVENT[data]),c) endfunction function AddUnitBeCureTrigC takes integer data,boolexpr c returns integer if UNIT_BE_CURE_EVENT[data]==0 then set UNIT_BE_CURE_EVENT[data]=s__Trig_new() endif return s__Trig_addedtothelist_b((UNIT_BE_CURE_EVENT[data]),c) endfunction function AddUnitTransitions takes integer data,code c returns integer if DamageTransitions_t[data]==0 then set DamageTransitions_t[data]=s__Trig_new() endif return s__Trig_addedtothelist((DamageTransitions_t[data]),c) endfunction function UnitCureTaret takes unit NZv,unit N7v,real value returns real local real tlv local real tLv local integer id1=CURE_Unit local integer id2=BECURE_Unit local real x=CURE_Damage set CURE_Unit=GetUnitUserData(NZv) set BECURE_Unit=GetUnitUserData(N7v) if UnitAlive(N7v)and GetUnitAbilityLevel(N7v,'A0FP')==0 then if NZv!=null then set value=(1+Unit_MATK[CURE_Unit])*(UnitBeCureRatio[(BECURE_Unit)])*value endif if GetUnitAbilityLevel(N7v,'BNss')>0 then set value=.6*value endif set CURE_Damage=value if UNIT_CURE_EVENT[CURE_Unit]>0 then call s__Trig_exewithp((UNIT_CURE_EVENT[CURE_Unit]),CURE_Unit) endif if UNIT_BE_CURE_EVENT[BECURE_Unit]>0 then call s__Trig_exewithp((UNIT_BE_CURE_EVENT[BECURE_Unit]),BECURE_Unit) endif set value=CURE_Damage set tlv=GetWidgetLife(N7v) set tLv=GetUnitState(N7v,UNIT_STATE_MAX_LIFE)-tlv if value>tLv then set value=tLv endif call SetWidgetLife(N7v,tlv+value) if R2I(value)>0 then if GetPlayerId(GetOwningPlayer(N7v))<8 then call thv("|c0069ff2d+"+I2S(R2I(value+.5)),GetUnitX(N7v),GetUnitY(N7v),GetUnitFlyHeight(N7v)+25,.03,.02,bj_PI/ 2,.5,.75) endif endif endif set CURE_Unit=id1 set BECURE_Unit=id2 set CURE_Damage=x return value endfunction function UnitCure_Drain takes unit N7v,real value,real tMv returns real local real tlv local real tLv local integer id1=CURE_Unit local integer id2=BECURE_Unit local real x=CURE_Damage set CURE_Unit=0 set BECURE_Unit=GetUnitUserData(N7v) if UnitAlive(N7v)and GetUnitAbilityLevel(N7v,'A0FP')==0 then set value=(UnitBeCureRatio[(BECURE_Unit)])*value if GetUnitAbilityLevel(N7v,'BNss')>0 then set value=.6*value endif set CURE_Damage=value if UNIT_BE_CURE_EVENT[BECURE_Unit]>0 then call s__Trig_exewithp((UNIT_BE_CURE_EVENT[BECURE_Unit]),BECURE_Unit) endif set value=CURE_Damage set tlv=GetWidgetLife(N7v) set tLv=GetUnitState(N7v,UNIT_STATE_MAX_LIFE)-tlv if value>tLv then set value=tLv endif if value>tMv then set value=tMv endif call SetWidgetLife(N7v,tlv+value) endif set CURE_Unit=id1 set BECURE_Unit=id2 set CURE_Damage=x return value endfunction function unitstate__s0v takes nothing returns boolean local integer data if IsUnitInGroup(GetTriggerUnit(),h_v_Group)then set data=(GetUnitUserData((GetTriggerUnit()))) call s__Trig_exewithp((UnitDeath_t[data]),data) if nC[(data)]then call sc___prototype111_evaluate(4,(Je[(data)])) call sc___prototype15_evaluate(1,data) endif endif return false endfunction function dvv takes nothing returns nothing call TriggerEvaluate(Damage_Xgv) endfunction function unitstate__Q3v takes integer data returns nothing set mB[data]=CreateTrigger() set Master[data]=data set UnitTypeId[data]=GetUnitTypeId(Je[data]) set UnitMaxLife[data]=GetUnitState(Je[data],UNIT_STATE_MAX_LIFE) set UnitHitRate[data]=1. set UnitBeCureRatio[data]=1. set Unit_C_DMG[data]=1. set Unit_DOT[data]=1. set Unit_Fire_Damage[data]=1. set Unit_Frost_Damage[data]=1. set Unit_Gas_Damage[data]=1. set Unit_To_Damage[data]=1. set Unit_Lightning_Damage[data]=1. set Unit_Light_Damage[data]=1. set Unit_Dark_Damage[data]=1. call TriggerRegisterUnitEvent(mB[data],(Je[(data)]),EVENT_UNIT_DAMAGED) call TriggerAddCondition(mB[data],Filter(function dvv)) call TriggerEvaluate(ConvertVersion(LoadInteger(BYHT2,Event_Enterworld_Id,UnitTypeId[data]))) endfunction function unitstate__sav takes integer data returns nothing if Master_App[data]then call Unit_Cancel_Counter(363,Master[data]) set Master_App[data]=false endif set Master[data]=0 set UnitTypeId[data]=0 set UnitArmor[data]=0 set UnitAttack[data]=0 set HeroStr[data]=0 set HeroAgi[data]=0 set HeroInt[data]=0 set UnitAttackSpeed[data]=0 set HeroStr_hp_regen[data]=0 set HeroAgi_atk_speed[data]=0 set HeroAgi_crit[data]=0 set HeroInt_mp_regen[data]=0 set UnitHP[data]=0 set UnitHpRegen[data]=0 set UnitMP[data]=0 set UnitMpRegen[data]=0 set PB[data]=false if pB[data]then set pB_v[data]=0 set pB[data]=false endif set Unit_MATK[data]=.0 set UnitCrit[data]=.0 if UnitDodge_t[data]!=null then call s__unitseate_table_clear(UnitDodge_t[data]) set UnitDodge_t[data]=0 endif if UnitHitRate_t[data]!=null then call s__unitseate_table_clear(UnitHitRate_t[data]) set UnitHitRate_t[data]=0 endif if UnitMdef_t[data]!=null then call s__unitseate_table_clear(UnitMdef_t[data]) set UnitMdef_t[data]=0 endif if UnitAdef_t[data]!=null then call s__unitseate_table_clear(UnitAdef_t[data]) set UnitAdef_t[data]=0 endif if UnitBeCureRatio_t[data]!=null then call s__unitseate_table_clear(UnitBeCureRatio_t[data]) set UnitBeCureRatio_t[data]=0 endif if UnitBeRemove_t[data]!=0 then call s__Trig_clear((UnitBeRemove_t[data])) set UnitBeRemove_t[data]=0 endif if DamageTransitions_t[data]!=0 then call s__Trig_clear((DamageTransitions_t[data])) set DamageTransitions_t[data]=0 endif if UnitPAttack_t[data]!=0 then call s__Trig_clear((UnitPAttack_t[data])) set UnitPAttack_t[data]=0 endif if UnitBeDamager_t[data]!=0 then call s__Trig_clear((UnitBeDamager_t[data])) set UnitBeDamager_t[data]=0 endif if UnitDamager_t[data]!=0 then call s__Trig_clear((UnitDamager_t[data])) set UnitDamager_t[data]=0 endif if UnitShield_t[data]!=0 then call s__Trig_clear((UnitShield_t[data])) set UnitShield_t[data]=0 endif if UnitDeath_t[data]!=0 then call s__Trig_clear((UnitDeath_t[data])) set UnitDeath_t[data]=0 endif if UNIT_CURE_EVENT[data]!=0 then call s__Trig_clear((UNIT_CURE_EVENT[data])) set UNIT_CURE_EVENT[data]=0 endif if UNIT_BE_CURE_EVENT[data]!=0 then call s__Trig_clear((UNIT_BE_CURE_EVENT[data])) set UNIT_BE_CURE_EVENT[data]=0 endif if UnitBePAttack_t[data]!=0 then call s__Trig_clear((UnitBePAttack_t[data])) set UnitBePAttack_t[data]=0 endif call DestroyTrigger(mB[data]) set mB[data]=null endfunction function unitstate__s3v takes nothing returns boolean set Hc[(le)]=true call unitstate__Q3v((le)) return false endfunction function unitstate__s4v takes nothing returns boolean set Hc[(le)]=false call unitstate__sav((le)) return false endfunction function unitstate__s1v takes nothing returns nothing set unitstate__qB=malloc() call SaveBoolean(BYHT,(unitstate__qB),'H001',true) call SaveBoolean(BYHT,(unitstate__qB),'H008',true) call SaveBoolean(BYHT,(unitstate__qB),'H00D',true) call SaveBoolean(BYHT,(unitstate__qB),'H00E',true) call SaveBoolean(BYHT,(unitstate__qB),'H00H',true) call SaveBoolean(BYHT,(unitstate__qB),'H01H',true) call SaveBoolean(BYHT,(unitstate__qB),'H01U',true) call SaveBoolean(BYHT,(unitstate__qB),'H01V',true) call SaveBoolean(BYHT,(unitstate__qB),'H01W',true) call RegisterEvent(EVENT_PLAYER_UNIT_DEATH,function unitstate__s0v) endfunction function unitstate__s5v takes nothing returns nothing call h4v(Condition(function unitstate__s3v),bR) call h4v(Condition(function unitstate__s4v),BR) endfunction function unitstate_onInit takes nothing returns nothing call ExecuteFunc("unitstate__AbilityPreload") call ExecuteFunc("unitstate__kjv") call ExecuteFunc("unitstate__s1v") call ExecuteFunc("unitstate__s5v") endfunction function s__drops_tabale_getitemindex takes integer itemid returns integer if HaveSavedInteger(BYHT,Ur,-itemid)then return LoadInteger(BYHT,Ur,-itemid) endif set s__drops_tabale_tindex=s__drops_tabale_tindex+1 call SaveInteger(BYHT,Ur,-itemid,s__drops_tabale_tindex) return s__drops_tabale_tindex endfunction function s__drops_tabale_func2 takes integer this returns nothing local integer i=s__drops_tabale_index[this] local integer j=s__drops_tabale_getitemindex(s__drops_tabale_tid[this]) local integer tu local integer key loop exitwhen i==0 set i=i-1 set tu=LoadInteger(BYHT,Ur,s___drops_tabale_r_id[s__drops_tabale_r_id[this]+i]) set key=tu*8192+j if HaveSavedInteger(BYHT,Ur,key)then set s___drops_tabale_r_v[s__drops_tabale_r_v[tu]+LoadInteger(BYHT,Ur,key)]=s___drops_tabale_r_v[s__drops_tabale_r_v[this]+i]*s__drops_tabale_r_a[this] endif endloop endfunction function s__drops_tabale_func1 takes nothing returns nothing local integer this=(alloc__hpv(GetHandleId((GetExpiredTimer())))) if s__drops_tabale_r_a[this]<4. then set s__drops_tabale_r_a[this]=s__drops_tabale_r_a[this]+s__drops_tabale_r_up[this] call s__drops_tabale_func2(this) endif endfunction function s__drops_tabale_newitemdrop takes integer itemid,real timed,real up returns nothing local integer this if not HaveSavedInteger(BYHT,Ur,itemid)then set this=s__drops_tabale__allocate() set s__drops_tabale_tid[this]=itemid set s__drops_tabale_r_a[this]=1 set s__drops_tabale_r_up[this]=up if timed>0 then call SaveReal(BYHT,(zr),itemid,timed) endif if up!=0 then call TimerStart(NewTimer(this),600,true,function s__drops_tabale_func1) endif call SaveInteger(BYHT,Ur,itemid,this) endif endfunction function s__drops_tabale_newunitdrop takes integer uid,integer mD returns nothing local integer this if not HaveSavedInteger(BYHT,Ur,uid)then set this=s__drops_tabale__allocate() set s__drops_tabale_max[this]=mD call SaveInteger(BYHT,Ur,uid,this) endif endfunction function s__drops_tabale_unitremovedroptiem takes integer uid,integer itemid returns nothing local integer this=LoadInteger(BYHT,Ur,uid) local integer key=this*8192+s__drops_tabale_getitemindex(itemid) local integer i=LoadInteger(BYHT,Ur,key) if s___drops_tabale_r_id[s__drops_tabale_r_id[this]+i]==itemid then call RemoveSavedInteger(BYHT,Ur,key) set s__drops_tabale_index[this]=s__drops_tabale_index[this]-1 if s__drops_tabale_index[this]>0 then set s___drops_tabale_r_id[s__drops_tabale_r_id[this]+i]=s___drops_tabale_r_id[s__drops_tabale_r_id[this]+s__drops_tabale_index[this]] set s___drops_tabale_r_v[s__drops_tabale_r_v[this]+i]=s___drops_tabale_r_v[s__drops_tabale_r_v[this]+s__drops_tabale_index[this]] call SaveInteger(BYHT,Ur,this*8192+s__drops_tabale_getitemindex(s___drops_tabale_r_id[s__drops_tabale_r_id[this]+i]),i) endif set s___drops_tabale_r_id[s__drops_tabale_r_id[this]+s__drops_tabale_index[this]]=0 set s___drops_tabale_r_v[s__drops_tabale_r_v[this]+s__drops_tabale_index[this]]=0 endif endfunction function s__drops_tabale_unitadddroptiem takes integer uid,integer itemid,real value,boolean dRv returns nothing local integer this=LoadInteger(BYHT,Ur,uid) local integer dt if s__drops_tabale_index[this]0)then call SaveInteger(BYHT,Yr,uid,rP) endif if((1)>0)then call s__drops_tabale_newunitdrop(uid,yPv) endif call SaveBoolean(BYHT,(wr),uid,true) endfunction function yqv takes integer uid,integer g,integer e returns nothing call SaveInteger(BYHT,Wr,uid,g) call SaveInteger(BYHT,yr,uid,e) endfunction function AddDdrops takes integer itemid,real ysv returns nothing call s__drops_tabale_unitadddroptiem(ur,itemid,ysv,true) endfunction function NewItemDrops takes integer itemid,real timed,real up returns nothing call s__drops_tabale_newitemdrop(itemid,timed,up) endfunction function ModifyDropsRateById takes integer uid,real t returns nothing local integer du=LoadInteger(BYHT,Ur,uid) local integer i=s__drops_tabale_index[du] loop exitwhen i==0 set i=i-1 set s___drops_tabale_r_v[s__drops_tabale_r_v[du]+i]=t*s___drops_tabale_r_v[s__drops_tabale_r_v[du]+i] endloop endfunction function ItemDrops___Init1 takes nothing returns nothing call s__drops_tabale_newitemdrop(('srrc'),((100)*1.),((.1)*1.)) call s__drops_tabale_newitemdrop(('ankh'),((100)*1.),((.1)*1.)) call s__drops_tabale_newitemdrop(('mnst'),((100)*1.),((.1)*1.)) call s__drops_tabale_newitemdrop(('woms'),((100)*1.),((.1)*1.)) call s__drops_tabale_newitemdrop(('gomn'),((100)*1.),((.1)*1.)) call s__drops_tabale_newitemdrop(('pnvu'),((100)*1.),((.1)*1.)) call yqv('h00T',0,$2EE0) call yqv('n01J',0,$4E20) call yqv('h014',0,$61A8) call yqv('h00Y',0,$7530) call yqv('h010',0,$9C40) call yqv('n038',0,$C350) call yqv('n03N',0,$EA60) call yqv('orai',5000,$AFC8) call yqv('oshm',$2710,80000) call yqv('n02Z',$30D4,$1ADB0) call yqv('n02L',$3A98,$1E848) call yqv('nnsw',$3A98,$1FBD0) call yqv('hmpr',$61A8,$249F0) call yqv('h018',$61A8,$249F0) call yqv('n01Y',$61A8,$249F0) call yqv('n02M',$61A8,$249F0) call yqv('n02N',$61A8,$249F0) call yqv('n02Y',$9C40,$2BF20) call yqv('n033',$9C40,$2BF20) call yqv('n02V',$9C40,$2BF20) call yqv('hpa3',$9C40,$2BF20) call yqv('h01K',$C350,$30D40) call yqv('n030',$C350,$30D40) call yqv('nzom',$C350,$30D40) call yqv('n035',$C350,$30D40) call yqv('n03B',$EA60,$493E0) call yqv('h00V',5000,$3A98) call yqv('n022',6000,$4650) call yqv('h01B',6000,$61A8) call yqv('n01W',6000,$61A8) call yqv('n01K',6000,$61A8) call yqv('n01O',6000,$61A8) call yqv('n01N',6000,$61A8) call yqv('n023',8000,$88B8) call yqv('n038',$2710,$C350) call yqv('h01F',$2710,$C350) call yqv('n03M',$2710,$4E20) call ypv('n005',0,$B) call ypv('n006',0,$B) call ypv('n008',3,25) call s__drops_tabale_unitadddroptiem(ur,('I00I'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I00Q'),((5)*1.),true) call ypv('n004',0,$C) call ypv('n007',0,$C) call ypv('n009',5,50) call s__drops_tabale_unitadddroptiem(ur,('I00K'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I00P'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I00S'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I00R'),((5)*1.),true) call ypv('n00A',3,30) call s__drops_tabale_unitadddroptiem(ur,('rre2'),(($A)*1.),true) call ypv('n00C',3,18) call s__drops_tabale_unitadddroptiem(ur,('I00T'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I01F'),((5)*1.),true) call ypv('n00E',5,18) call s__drops_tabale_unitadddroptiem(ur,('I01B'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I01C'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I01D'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I01E'),((5)*1.),true) call ypv('n00F',8,25) call s__drops_tabale_unitadddroptiem(ur,('I00U'),((7)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I01G'),((7)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I01K'),((7)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I01J'),((7)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I01J'),((9)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I01H'),((9)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('lure'),((5)*1.),true) call ypv('n00D',2,$96) call s__drops_tabale_unitadddroptiem(ur,('I0AK'),((25)*1.),true) call ypv('n00G',4,25) call s__drops_tabale_unitadddroptiem(ur,('I01P'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I01Q'),((5)*1.),true) call ypv('n00L',4,27) call s__drops_tabale_unitadddroptiem(ur,('I01L'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I01M'),((5)*1.),true) call ypv('n00K',4,27) call s__drops_tabale_unitadddroptiem(ur,('I01N'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I01O'),((5)*1.),true) call ypv('n00N',6,55) call s__drops_tabale_unitadddroptiem(ur,('I01X'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I01Y'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I026'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I02F'),((5)*1.),true) call ypv('n00H',3,27) call s__drops_tabale_unitadddroptiem(ur,('I01V'),((5)*1.),true) call ypv('n00I',3,27) call s__drops_tabale_unitadddroptiem(ur,('I01W'),((5)*1.),true) call ypv('n00J',2,27) call s__drops_tabale_unitadddroptiem(ur,('I01R'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I01S'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I01T'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I01U'),((5)*1.),true) call ypv('n049',2,27) call s__drops_tabale_unitadddroptiem(ur,('I0GQ'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0GO'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0GM'),((5)*1.),true) call ypv('n047',2,27) call s__drops_tabale_unitadddroptiem(ur,('I0GN'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0GP'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0GR'),((5)*1.),true) call ypv('n00M',7,55) call s__drops_tabale_unitadddroptiem(ur,('I01X'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I01Y'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I026'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I02F'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I09C'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0GA'),(($A)*1.),true) call ypv('n00O',7,96) call s__drops_tabale_unitadddroptiem(ur,('I02K'),(($C)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I02J'),((8)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I02G'),((8)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I02H'),((8)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I02I'),((8)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('hbth'),((5)*1.),true) call ypv('n048',7,100) call s__drops_tabale_unitadddroptiem(ur,('I0GH'),((8)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0GB'),((8)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0GI'),((8)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0GL'),((8)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0GC'),((8)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0GG'),((8)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0GF'),((8)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0GJ'),((8)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0GK'),((8)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0GD'),((8)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0GE'),((8)*1.),true) call ypv('n00Y',1,30) call s__drops_tabale_unitadddroptiem(ur,('srrc'),((1.1)*1.),true) call ypv('n00X',1,30) call s__drops_tabale_unitadddroptiem(ur,('srrc'),((1.1)*1.),true) call ypv('n00Z',1,30) call s__drops_tabale_unitadddroptiem(ur,('srrc'),((1.1)*1.),true) call ypv('n010',1,30) call s__drops_tabale_unitadddroptiem(ur,('srrc'),((1.1)*1.),true) call ypv('n011',1,30) call s__drops_tabale_unitadddroptiem(ur,('srrc'),((1.1)*1.),true) call ypv('n012',3,30) call s__drops_tabale_unitadddroptiem(ur,('I03C'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I03D'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('srrc'),((1.1)*1.),true) call ypv('n013',3,30) call s__drops_tabale_unitadddroptiem(ur,('I03B'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I039'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('srrc'),((1.1)*1.),true) call ypv('n015',4,$F0) call s__drops_tabale_unitadddroptiem(ur,('I02L'),(($F)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I02M'),(($F)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I037'),(($F)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I038'),(($F)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I03A'),(($F)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I09B'),(($F)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('vddl'),(($F)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0GS'),(($F)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('srrc'),(($A)*1.),true) call ypv('n018',2,30) call s__drops_tabale_unitadddroptiem(ur,('ankh'),((1.1)*1.),true) call ypv('n019',2,30) call s__drops_tabale_unitadddroptiem(ur,('ankh'),((1.1)*1.),true) call ypv('n01C',4,40) call s__drops_tabale_unitadddroptiem(ur,('I03I'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I03F'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('ankh'),((1.1)*1.),true) call ypv('n01E',7,90) call s__drops_tabale_unitadddroptiem(ur,('I03J'),((4)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I03K'),((4)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I03E'),((4)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I03H'),((4)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I09H'),((4)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0GT'),((4)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('rnsp'),((2)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('ankh'),((1.5)*1.),true) call ypv('n01B',5,40) call s__drops_tabale_unitadddroptiem(ur,('I02Y'),((18)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I03L'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I03M'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I03G'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('ankh'),((1.25)*1.),true) call ypv('n01D',2,$F) call s__drops_tabale_unitadddroptiem(ur,('I030'),((100)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I031'),((50)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I08O'),((2)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('ankh'),((5)*1.),true) call ypv('n01F',3,30) call s__drops_tabale_unitadddroptiem(ur,('I05O'),((4)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I05M'),((4)*1.),true) call ypv('n01G',3,30) call s__drops_tabale_unitadddroptiem(ur,('I05J'),((4)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I054'),((4)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0GX'),((8)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('gomn'),((1.35)*1.),true) call ypv('n01H',3,30) call s__drops_tabale_unitadddroptiem(ur,('I03W'),((4)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I055'),((4)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I09I'),((4)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('gomn'),((1.3)*1.),true) call ypv('n01I',4,30) call s__drops_tabale_unitadddroptiem(ur,('I03X'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I05E'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I05N'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('gomn'),((1.25)*1.),true) call ypv('e01B',5,30) call s__drops_tabale_unitadddroptiem(ur,('I03S'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I09K'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I03R'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0GU'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('mnst'),((1.035)*1.),true) call ypv('h00P',2,30) call s__drops_tabale_unitadddroptiem(ur,('I03T'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('mnst'),((1.035)*1.),true) call ypv('h00R',4,30) call s__drops_tabale_unitadddroptiem(ur,('I03N'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I03O'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I03U'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('mnst'),((1.05)*1.),true) call ypv('h00S',4,120) call s__drops_tabale_unitadddroptiem(ur,('I035'),((8)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I03Q'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I03V'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I03P'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('mnst'),((1.1)*1.),true) call ypv('h01L',1,20) call s__drops_tabale_unitadddroptiem(ur,('I0A1'),((2)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0A2'),((2)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('mnst'),((1.08)*1.),true) call ypv('h01M',1,20) call s__drops_tabale_unitadddroptiem(ur,('I0A3'),((2.5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0A4'),((2.5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('mnst'),((1.08)*1.),true) call ypv('n036',1,90) call s__drops_tabale_unitadddroptiem(ur,('sor2'),((1.05)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('mnst'),((1.15)*1.),true) call ypv('n037',1,$96) call s__drops_tabale_unitadddroptiem(ur,('sora'),((1.05)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0AB'),((1.05)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('mnst'),((1.15)*1.),true) call ypv('n038',2,600) call s__drops_tabale_unitadddroptiem(ur,('sor2'),((7)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('sora'),((7)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('ram1'),((7)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('soul'),((7)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0AA'),((7)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('mnst'),((40)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('wcyc'),((1.25)*1.),true) call ypv('n02H',1,30) call s__drops_tabale_unitadddroptiem(ur,('I0BW'),((3)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('pnvu'),((1.12)*1.),true) call ypv('n02I',1,30) call s__drops_tabale_unitadddroptiem(ur,('I0BX'),((3)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('pnvu'),((1.12)*1.),true) call ypv('n02J',2,35) call s__drops_tabale_unitadddroptiem(ur,('I0BU'),((3)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0BV'),((3)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('pnvu'),((1.12)*1.),true) call ypv('h014',5,600) call s__drops_tabale_unitadddroptiem(ur,('I0BL'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0BM'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0BN'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0BP'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0BO'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0H1'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0BY'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0BZ'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('pnvu'),((40)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('gvsm'),((1.25)*1.),true) call ypv('n02A',6,25) call s__drops_tabale_unitadddroptiem(ur,('I05K'),((6)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I05Q'),((4)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I05P'),((2)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0A1'),((2)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0A2'),((2)*1.),true) call ypv('n02B',6,25) call s__drops_tabale_unitadddroptiem(ur,('I05K'),((8)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I05Q'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I05P'),((3)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0A3'),((2.5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0A4'),((2.5)*1.),true) //giant golem call ypv('h00Y',3,600) call s__drops_tabale_unitadddroptiem(ur,('I0A5'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0A6'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0A7'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0A8'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0A9'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0H0'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0AA'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0AB'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('dtsb'),((0.25)*1.),true) call ypv('h00T',5,600) call s__drops_tabale_unitadddroptiem(ur,('I03Y'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I044'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I042'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I045'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I040'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I041'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I046'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I047'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I043'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I09J'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0GV'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('sor1'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('mnst'),((30)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('sand'),((0.25)*1.),true) //ragnaros call ypv('n01J',$A,900) call s__drops_tabale_unitadddroptiem(ur,('I048'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I05C'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I05B'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I05D'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I049'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I059'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I05F'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I05G'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I05A'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I09L'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0GW'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('dsum'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('gomn'),((40)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('rhe2'),((50)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('nspi'),((0.25)*1.),true) //hydra call ypv('n022',$C,0) call s__drops_tabale_unitadddroptiem(ur,('I068'),((50)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I06I'),((50)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I06Y'),(($F)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I070'),(($F)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I06Z'),(($F)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I071'),(($F)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I09F'),(($F)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I074'),(($F)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I072'),(($F)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I075'),(($F)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I076'),(($F)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I073'),(($F)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0GY'),(($F)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('oven'),((0.25)*1.),true) //gatekeeper call ypv('h00V',1,0) call s__drops_tabale_unitadddroptiem(ur,('I0BJ'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('pams'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('amrc'),((0.25)*1.),true) //count call ypv('h00F',4,0) call s__drops_tabale_unitadddroptiem(ur,('I07I'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('ajen'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I07D'),(($F)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I07C'),(($F)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I07E'),(($F)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I07F'),(($F)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I07H'),(($F)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('tels'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I07G'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('shen'),((1.25)*1.),true) call ypv('n01W',4,0) call s__drops_tabale_unitadddroptiem(ur,('I07O'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I07M'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0AY'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('cnob'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I060'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('drph'),((0.25)*1.),true) call ypv('n01K',4,0) call s__drops_tabale_unitadddroptiem(ur,('I07R'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I09S'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I07T'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I07U'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I07X'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I06P'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I06Q'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I06O'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('oli2'),((0.25)*1.),true) //mage lord call ypv('h01B',4,0) call s__drops_tabale_unitadddroptiem(ur,('I083'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I084'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0AZ'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I062'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I06F'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('lnrn'),((0.25)*1.),true) call ypv('n01N',4,0) call s__drops_tabale_unitadddroptiem(ur,('I085'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I087'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I088'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I089'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I06R'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I06T'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0AT'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('tmmt'),((0.25)*1.),true) //fallen angel call ypv('n01O',3,0) call s__drops_tabale_unitadddroptiem(ur,('I086'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I08C'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I09O'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0C4'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I06S'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I06U'),(($A)*1.),true) //call s__drops_tabale_unitadddroptiem(ur,(1227901008),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('mnsf'),((0.25)*1.),true) call ypv('n023',2,0) call s__drops_tabale_unitadddroptiem(ur,('I08D'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I08R'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I08E'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('rhth'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0D6'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('shas'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I061'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I06X'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I06V'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('olig'),((0.25)*1.),true) call ypv('h01F',2,0) call s__drops_tabale_unitadddroptiem(ur,('I096'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I098'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I097'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I099'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('bspd'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I067'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I06K'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I061'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('stre'),((0.25)*1.),true) call ypv('n01Y',2,0) call s__drops_tabale_unitadddroptiem(ur,('ktrm'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('ches'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('dphe'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('kysn'),((3)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I08K'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I06W'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('wswd'),((0.25)*1.),true) call ypv('h010',5,900) call s__drops_tabale_unitadddroptiem(ur,('I06E'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I08X'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I06D'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0AV'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('woms'),((40)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('grsl'),((1.01)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('envl'),((0.25)*1.),true) call ypv('n030',2,0) call s__drops_tabale_unitadddroptiem(ur,('pgin'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('srtl'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('ofir'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('shtm'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0D2'),((3)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('pres'),((0.25)*1.),true) call ypv('n02M',2,0) call s__drops_tabale_unitadddroptiem(ur,('odef'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('afac'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('rag1'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('grsl'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('ccmd'),((0.25)*1.),true) call ypv('orai',2,0) call s__drops_tabale_unitadddroptiem(ur,('pmna'),((20)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('spsh'),((20)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('ciri'),((20)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('mort'),((20)*1.),true) call ypv('oshm',2,0) call s__drops_tabale_unitadddroptiem(ur,('prvt'),((20)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('hval'),((20)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('lgdh'),((20)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('ssil'),((20)*1.),true) call ypv('n02Z',2,0) call s__drops_tabale_unitadddroptiem(ur,('bfhr'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('stwa'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('blba'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('shcw'),(($A)*1.),true) call ypv('n02L',2,0) call s__drops_tabale_unitadddroptiem(ur,('I0BQ'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0CB'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0BR'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0BS'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0BT'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0C3'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0FK'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I06J'),(($A)*1.),true) call ypv('hmpr',2,0) call s__drops_tabale_unitadddroptiem(ur,('rin1'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('kpin'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('phlt'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('mcou'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('evtl'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('rnec'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('rwiz'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('stpg'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('rugt'),((0.25)*1.),true) call ypv('n02N',2,0) call s__drops_tabale_unitadddroptiem(ur,('I0CA'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0C8'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0C6'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0C7'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('vamp'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('rej1'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0CD'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0HE'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('shdt'),((0.25)*1.),true) call ypv('h02P',1,0) call s__drops_tabale_unitadddroptiem(ur,('I0CD'),((1.2)*1.),true) call ypv('h02O',1,0) call s__drops_tabale_unitadddroptiem(ur,('rej1'),((1.2)*1.),true) call ypv('h018',2,0) call s__drops_tabale_unitadddroptiem(ur,('I0CP'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0CR'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0CG'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('crdt'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('sror'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0CJ'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0CK'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('wshs'),((0.25)*1.),true) call ypv('n033',2,0) call s__drops_tabale_unitadddroptiem(ur,('belv'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('ledg'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('crys'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('stel'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0DG'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('rde1'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I08P'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('pomn'),((0.25)*1.),true) call ypv('n02Y',2,0) call s__drops_tabale_unitadddroptiem(ur,('bzbf'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('shwd'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I05H'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0AJ'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I00A'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0H2'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('mcri'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I08N'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I09N'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('shar'),((0.25)*1.),true) call ypv('n02V',2,0) call s__drops_tabale_unitadddroptiem(ur,('ratc'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('rat6'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('ward'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('penr'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('rat9'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('gsou'),((4)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('nflg'),((4)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('fgrg'),((0.25)*1.),true) call ypv('hpa1',2,0) call s__drops_tabale_unitadddroptiem(ur,('I00D'),((4)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I009'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I00E'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I00B'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I00C'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I09E'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('fgsk'),((0.25)*1.),true) call ypv('nfgl',2,0) call s__drops_tabale_unitadddroptiem(ur,('I0DR'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0DT'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0DV'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0DS'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I05V'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I05W'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('wlsd'),((0.25)*1.),true) //death fiend call ypv('h01K',2,0) call s__drops_tabale_unitadddroptiem(ur,('I0F1'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0EY'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0EX'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0EW'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0F4'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0F3'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0ER'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0EQ'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('infs'),((0.25)*1.),true) //df summons call ypv('h01P',1,0) call s__drops_tabale_unitadddroptiem(ur,('I0ES'),((1.2)*1.),true) call ypv('h01S',1,0) call s__drops_tabale_unitadddroptiem(ur,('I0EU'),((1.2)*1.),true) call ypv('h01R',1,0) call s__drops_tabale_unitadddroptiem(ur,('I0ET'),((1.2)*1.),true) //sealed power of destruction call ypv('n03B',2,0) call s__drops_tabale_unitadddroptiem(ur,('I0DZ'),((3)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0DX'),((3)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0DY'),((3)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0E1'),((3)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0E0'),((3)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0EG'),((3)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('rej3'),((0.25)*1.),true) //santa call ypv('n03M',1,$5DC) call s__drops_tabale_unitadddroptiem(ur,('I0FH'),((2)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0FG'),((2)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0FF'),((2)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('tpow'),((2)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0FE'),((3)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('pams'),((40)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('rej2'),((0.25)*1.),true) //evil roots call ypv('n03N',1,0) call s__drops_tabale_unitadddroptiem(ur,('I0FM'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0FL'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0FO'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('I0FN'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('ssan'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('tgrh'),((0.25)*1.),true) //lord of illusions call ypv('n035',1,0) call s__drops_tabale_unitadddroptiem(ur,('wneu'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('silk'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('tret'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('shea'),((5)*1.),true) //siren call ypv('nnsw',2,0) call s__drops_tabale_unitadddroptiem(ur,('ocor'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('rots'),(($A)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('frhg'),((5)*1.),true) call ypv('n002',2,35) call s__drops_tabale_unitadddroptiem(ur,('I04W'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('woms'),((1.5)*1.),true) call ypv('n00B',2,35) call s__drops_tabale_unitadddroptiem(ur,('I04W'),((5)*1.),true) call s__drops_tabale_unitadddroptiem(ur,('woms'),((1.8)*1.),true) call ypv('n02T',2,45) call s__drops_tabale_unitadddroptiem(ur,('I04W'),((1)*1.),true) call ypv('n02U',2,45) call s__drops_tabale_unitadddroptiem(ur,('I04W'),((1.5)*1.),true) call ypv('n03O',1,25) call ypv('n03P',1,25) endfunction function Yov takes nothing returns nothing local integer data=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:534") call CreateUnit(P[$C],EF[data],XF[data],OF[data],GetRandomInt(0,359)) call Unit_Cancel_Counter(867,(data)) endfunction function Yrv takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:535") local integer dt=LoadInteger(BYHT,Ur,id) local integer i=s__drops_tabale_index[dt] set s__drops_tabale_r_a[dt]=1. loop exitwhen i==0 set i=i-1 call s__drops_tabale_unitadddroptiem(s___drops_tabale_r_id[s__drops_tabale_r_id[dt]+i],id,s___drops_tabale_r_v[s__drops_tabale_r_v[dt]+i],false) endloop endfunction //drop function function Yiv takes integer c, real eX, real eY, boolean Yav returns nothing local integer du=LoadInteger(BYHT,Ur,c) local integer dt local integer d=s__drops_tabale_max[du] local integer q=s__drops_tabale_index[du] local integer mod=q-1 local integer i local integer j local integer id local string s="" local integer array v local real ran if c=='n02H' then set i=GetRandomInt(2,3) loop set i=i-1 call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\FeralSpirit\\feralspirittarget.mdl",CreateUnit(P[$C],'n02K',eX+GetRandomReal(-$96,$96),eY+GetRandomReal(-$96,$96),GetRandomInt(0,359)),"chest")) exitwhen i==0 endloop call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",eX,eY)) endif set j=q loop exitwhen(j<1) set j=j-1 set v[j]=j endloop set j=q loop exitwhen(j<1) set j=j-1 set i=GetRandomInt(0,mod) set id=v[j] set v[j]=v[i] set v[i]=id endloop loop exitwhen(d<1 or q<1) set q=q-1 set i=v[q] set id=s___drops_tabale_r_id[s__drops_tabale_r_id[du]+i] set ran=Lucky+1 if GetRandomReal(0.,100.)<=s___drops_tabale_r_v[s__drops_tabale_r_v[du]+i]*ran then set d=d-1 call CreateItemG(id,eX,eY) if HaveSavedInteger(BYHT,Ur,id)then if s=="" then set s=GetObjectName(id) else set s=s+", "+GetObjectName(id) endif set dt=LoadInteger(BYHT,Ur,id) set s__drops_tabale_r_a[dt]=1. set j=s__drops_tabale_index[dt] loop exitwhen j==0 set j=j-1 call s__drops_tabale_unitremovedroptiem(s___drops_tabale_r_id[s__drops_tabale_r_id[dt]+j],id) endloop if HaveSavedReal(BYHT,(zr),id)then call TimerStart(NewTimer(id),LoadReal(BYHT,(zr),id),false,function Yrv) endif call PingMinimapEx(eX,eY,5,$9B,$9B,$FF,true) call Ltv(Lfv(LAv("ForestBolt.mdl",eX,eY,1.25),$FF,$FF,55,$CD)) elseif Yav then if s=="" then set s=GetObjectName(id) else set s=s+", "+GetObjectName(id) endif endif endif endloop if s!="" then call thv(s+" |c00ffff80dropped!|r",eX,eY,25,.075,.035,bj_PI/ 2.5,5,6) call PlaySoundAtPoint_BJ((sn),(($7F)*1.),((eX)*1.),((eY)*1.),0) endif endfunction function YVv takes nothing returns nothing local integer data local integer p local unit u=GetTriggerUnit() if IsUnitInGroup(u,h_v_Group)then set data=(GetUnitUserData((u))) set IF=GetKillingUnit() call s__Trig_exe((Hero_Kill_t[(GetUnitUserData((IF)))])) if not IsUnitIllusion(Je[data])then set p=GetPlayerId(GetOwningPlayer(IF)) if MV[p]!=null and IF!=MV[p]then set IF=MV[p] call s__Trig_exe((Hero_Kill_t[(GetUnitUserData((IF)))])) endif if VF[data]then if HaveSavedInteger(BYHT,Wr,EF[data])then call sc___prototype202_evaluate(1,IF,GetUnitX(u),GetUnitY(u),LoadInteger(BYHT,Wr,EF[data]),LoadInteger(BYHT,yr,EF[data])) endif if IsUnitDrops[data]and GetUnitState(Je[data],UNIT_STATE_MAX_LIFE)>UnitMaxLife[data]/ 2 then call Yiv(EF[data],GetUnitX(u),GetUnitY(u),(IsUnitType((u),UNIT_TYPE_GIANT))) endif if HaveSavedInteger(BYHT,Yr,EF[data])then call TimerStart(NewTimer(data),LoadInteger(BYHT,Yr,EF[data]),false,function Yov) call Unit_App_Counter(868,(data)) endif set VF[data]=false set IsUnitDrops[data]=false endif endif endif set u=null endfunction function Yev takes unit u returns boolean return HaveSavedBoolean(BYHT,wr,GetUnitTypeId(u))and not IsUnitIllusion(u) endfunction function ItemDrops___YOv takes nothing returns nothing if RF and(Yev(Je[le]))then set VF[le]=true set IsUnitDrops[le]=true set EF[le]=GetUnitTypeId(Je[le]) set XF[le]=GetUnitX(Je[le]) set OF[le]=GetUnitY(Je[le]) endif endfunction function ItemDrops___End takes nothing returns nothing if VF[le]then set VF[le]=false set IsUnitDrops[le]=false endif endfunction function ItemDrops___Init2 takes nothing returns nothing call h4v(Condition(function ItemDrops___YOv),bR) call h4v(Condition(function ItemDrops___End),BR) call RegisterEvent(EVENT_PLAYER_UNIT_DEATH,function YVv) endfunction function ItemDrops___onInit takes nothing returns nothing set Ur=malloc() set wr=malloc() set Wr=malloc() set yr=malloc() set Yr=malloc() set zr=malloc() call ExecuteFunc("ItemDrops___Init1") call ExecuteFunc("ItemDrops___Init2") endfunction function YHe takes integer data,integer up returns integer local integer id=Master[data] local integer p=Kc[id] local integer max local integer i local integer j local integer k local integer l local integer m//max pages local item MFv local item array SoldItem local unit u local boolean b=Isaseniorbackpack(id) if b then set m=3 else set m=2 endif if up==0 then set up=-LoadInteger(BYHT,zI[id],-1) endif set up=ModuloInteger(up,m) if up==0 then return 0 endif set u = Je[data] set l = LoadInteger(BYHT,zI[id],-1)//curent page call SaveInteger(BYHT,zI[id],-1,ModuloInteger(l+up,m))//save new page //remove all items from current page set max=UnitInventorySize(u) loop exitwhen max==0 set max=max-1 set SoldItem[max] = UnitItemInSlot(u,max) call SetItemPosition(SoldItem[max],iA[p],VA[p]) call SetItemVisible(SoldItem[max],false) endloop //remove items from next page from memory //and store them into var set i=0 loop set i=i+1 exitwhen i==m set max=6 set j=i-1 loop exitwhen max==0 set max=max-1 set SoldItem[i*6+max]=ConvertVersion(LoadInteger(BYHT2,zI[id],j*6+max)) call RemoveSavedInteger(BYHT2,(zI[id]),j*6+max) endloop endloop set i=LoadInteger(BYHT,zI[id],-1) //prepare next page inventory if 0==l then//if we are leaving page 1 if UnitRemoveAbility(u,'A086')then call UnitAddAbility(u,'A08T') if b then call SetUnitAbilityLevel(u,'A08T',2) endif endif elseif 0==i then//if we going back to page one if UnitRemoveAbility(u,'A08T')then call UnitAddAbility(u,'A086') endif endif //add items from next page set i=up set j=0 set max=UnitInventorySize(u) loop exitwhen max==0 set max=max-1 set MFv=SoldItem[i*6+max] if MFv!=null then set SoldItem[i*6+max]=null call UnitAddItem(u,MFv) call UnitDropItemSlot(u,MFv,max) endif endloop //add removed items to memory set j=0 set l=m-1 loop set i=i+1 if i==m then set i=0 endif set max=6 loop exitwhen max==0 set max=max-1 set MFv=SoldItem[i*6+max] if MFv!=null then set SoldItem[i*6+max]=null call SaveInteger(BYHT2,zI[id],j*6+max,GetHandleId(MFv)) endif endloop set j=j+1 exitwhen j==l endloop set MFv=null return up endfunction //get page ? function MZv takes integer data returns integer //if backpack has inventory (with levels) A08T if GetUnitAbilityLevel((Je[YI[(data)]]),'A08T')>0 then return YHe(YI[data],0) endif return 0 endfunction //call backpack function bagstate__M2v takes nothing returns nothing local integer CMv=GetPlayerId(GetOwningPlayer(GetTriggerUnit())) local integer NNv=(GetUnitUserData((MV[CMv]))) call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl",GetUnitX((Je[YI[(NNv)]])),GetUnitY((Je[YI[(NNv)]])))) call SetUnitX((Je[YI[(NNv)]]),iA[CMv]) call SetUnitY((Je[YI[(NNv)]]),VA[CMv]) endfunction function bagstate_switchpage takes nothing returns nothing call YHe((GetUnitUserData((GetTriggerUnit()))),1) endfunction function bagstate__i3e takes nothing returns nothing local integer NNv=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:315") if GetLocalPlayer()==P[NNv]then call StartSound(Ca) endif call DisplayTimedTextToPlayer(P[NNv],0,0,3,"|c00dbb7b7The magic free cooling time ends") set oK[NNv]=null endfunction function bagstate__i4e takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:316") call SetUnitNocontrol((id),false) call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0J6','B039') call Unit_Cancel_Counter(364,id) endfunction function bagstate__i5e takes unit u returns nothing local integer NNv=GetPlayerId(GetOwningPlayer(u)) if UnitAlive((Je[(vK[NNv])]))and oK[NNv]==null then set oK[NNv]=NewTimer(NNv) call SetUnitNocontrol((vK[NNv]),true) if GetUnitAbilityLevel((Je[(vK[NNv])]),'Avul')==0 then call SetUnitInvulnerable((Je[(vK[NNv])]),true) call SetUnitInvulnerable((Je[(vK[NNv])]),false) endif call UnitAddAbilityBY((Je[(vK[NNv])]),'A0J6') call NewTextTagInTarget_B((Je[(vK[NNv])]),"IMMUNITY",8,$CD,$FF,$B9) call DestroyEffect(AddSpecialEffectTarget("Enchantment.mdl",(Je[(vK[NNv])]),"origin")) call TimerStart(NewTimer(vK[NNv]),1,false,function bagstate__i4e) call TimerStart(oK[NNv],20,false,function bagstate__i3e) call Unit_App_Counter(365,vK[NNv]) endif endfunction function bagstate__M4v takes nothing returns boolean local unit Cqv=MV[GetPlayerId(GetTriggerPlayer())] local integer u=GetUnitUserData(Cqv) local real x=GetUnitX(Cqv) local real y=GetUnitY(Cqv) if Is_pvp[(GetPlayerId(GetTriggerPlayer()))]then call bagstate__i5e(Cqv) elseif IsPointInRect(x,y,gg_rct_FSZJ______________000)or IsPointInRect(x,y,gg_rct_PVP_PVP_______000)then call NewTextTagInTarget_B(Cqv,"A mysterious power is stopping you from summoning",8,$CD,$FF,$9B) else call SetUnitX((Je[YI[(u)]]),x) call SetUnitY((Je[YI[(u)]]),y) call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl",GetUnitX((Je[YI[(u)]])),GetUnitY((Je[YI[(u)]])))) endif set Cqv=null return false endfunction function CreateBag takes integer NNv,integer M6v returns nothing local integer CMv=GetPlayerId(GetOwningPlayer(Je[(NNv)])) local integer M7v=StringHash(StringCase(Game_PlayerName[CMv],false)) local integer i=0 local integer j=0 local real sX=iA[CMv] local real sY=VA[CMv] local item array M1v local boolean b=false if UnitAlive((Je[YI[(NNv)]]))then set b=Isaseniorbackpack(NNv) call MZv(NNv) set sX=GetUnitX((Je[YI[(NNv)]])) set sY=GetUnitY((Je[YI[(NNv)]])) set i=UnitInventorySize((Je[(YI[NNv])])) loop exitwhen i==0 set i=i-1 set M1v[j]=UnitItemInSlot((Je[(YI[NNv])]),i) if GetWidgetLife(M1v[j])<.405 then set M1v[j]=CreateItemG('brac',0,0) else call UnitRemoveItem((Je[(YI[NNv])]),M1v[j]) endif set j=j+1 endloop set i=GetUnitTypeId((Je[YI[(NNv)]])) set Sg=null if HaveSavedInteger(BYHT,sg,i)then set Sg=CreateItemG(LoadInteger(BYHT,sg,i),iA[CMv],VA[CMv]) endif if Sg!=null then call SetItemUserData(Sg,CMv+1) endif call Ltv(Lfv(LAv("AncientExplode.mdl",sX,sY,.5),0,0,0,$FF)) call RemoveUnitBJ((Je[YI[(NNv)]]),38) elseif zI[NNv]==null then set zI[NNv]=malloc() endif if M6v!=0 then set YI[NNv]=(GetUnitUserData((CreateUnit(P[CMv],M6v,sX,sY,270)))) elseif HaveSavedInteger(BYHT,Bag_Id_root,M7v)then set YI[NNv]=(GetUnitUserData((CreateUnit(P[CMv],LoadInteger(BYHT,Bag_Id_root,M7v),sX,sY,270)))) else set YI[NNv]=(GetUnitUserData((CreateUnit(P[CMv],'e01Z',sX,sY,270)))) endif set Master[YI[NNv]]=NNv set zI[YI[NNv]]=zI[NNv] call SetUnitNotSeckill((YI[NNv]),true) set M6v=GetUnitTypeId((Je[YI[(NNv)]])) if M6v=='e01O' then call SetUnitVertexColor((Je[YI[(NNv)]]),$CD,$9B,$CD,125) elseif M6v=='e023' then call sc___prototype111_evaluate(5,(Je[YI[(NNv)]])) endif if HaveSavedInteger(BYHT,sg,M6v)or HaveSavedBoolean(BYHT,(xA),M7v)then call UnitAddAbility((Je[YI[(NNv)]]),'A0LB') endif if HaveSavedString(BYHT,(Bag_wing),2*M7v)then call UnitAddAbility((Je[YI[(NNv)]]),'A0A5') endif if not Isaseniorbackpack(NNv)and b then set i=5 loop if HaveSavedInteger(BYHT2,(zI[NNv]),i)then set M1v[7]=ConvertVersion(LoadInteger(BYHT2,(zI[NNv]),i)) call RemoveSavedInteger(BYHT2,(zI[NNv]),i) if b then set b=false if GetLocalPlayer()==P[CMv]then call PingMinimapEx(iA[CMv],VA[CMv],3,$FF,$FF,$80,true) endif endif call DisplayTimedTextToPlayer(P[CMv],0,0,5,"|c00ffff80"+GetItemName(M1v[7])+" returned to the warehouse") call SetItemVisible(M1v[7],true) endif set i=i+1 exitwhen i==$C endloop set b=true set M1v[7]=null endif if j>0 then loop exitwhen j==0 set j=j-1 call UnitAddItem((Je[YI[(NNv)]]),M1v[j]) set M1v[j]=null endloop set i=UnitInventorySize((Je[YI[(NNv)]])) loop exitwhen i==0 set i=i-1 if GetItemTypeIdG(UnitItemInSlot((Je[YI[(NNv)]]),i))=='brac' then call RemoveItemG(UnitItemInSlot((Je[YI[(NNv)]]),i)) endif endloop if Sg!=null then set i=UnitInventorySize((Je[YI[(NNv)]])) loop exitwhen i==0 set i=i-1 if UnitItemInSlot((Je[YI[(NNv)]]),i)==null then call UnitAddItem((Je[YI[(NNv)]]),Sg) set Sg=null exitwhen true endif endloop if Sg!=null then set b=Isaseniorbackpack(NNv) if b then set i=$C else set i=5 endif loop exitwhen i==0 set i=i-1 if not HaveSavedInteger(BYHT2,(zI[NNv]),i)then call SaveInteger(BYHT2,zI[NNv],i,GetHandleId(Sg)) set Sg=null exitwhen true endif endloop if Sg!=null then call DisplayTimedTextToPlayer(P[CMv],0,0,5,"|c00ffff80"+GetItemName(Sg)+" token returned to the warehouse") set Sg=null endif endif endif endif endfunction function bagstate__M8v takes string n,integer i returns nothing local integer M9v=StringHash(StringCase(n,false)) call SaveInteger(BYHT,Bag_Id_root,M9v,i) call SaveBoolean(BYHT,(Bag_Issenior),M9v,true) endfunction function bagstate__pvv takes string n,integer i returns nothing call bagstate__M8v(n,i) call SaveBoolean(BYHT,(xA),StringHash(StringCase(n,false)),true) endfunction function bagstate__pev takes string n,string s,string a returns nothing local integer M9v=StringHash(StringCase(n,false)) call SaveStr(BYHT,(Bag_wing),2*M9v,s) call SaveStr(BYHT,(Bag_wing),2*M9v+1,a) endfunction function bagstate__pxv takes string n returns nothing call SaveBoolean(BYHT,(Bag_Issenior),StringHash(StringCase(n,false)),true) endfunction function bagstate__pov takes nothing returns boolean local integer data=GetUnitUserData(GetTriggerUnit()) local integer i=6 local integer j=0 local integer itemid local item array M1v local real x local real y local real a if zI[data]==null then call IssueUnitStop_DisplayText(GetTriggerUnit(),"Wow, I'm going to be born!") return false endif set EA=malloc() call SaveBoolean(BYHT,EA,'I04W',true) call SaveBoolean(BYHT,EA,'I04U',true) call SaveBoolean(BYHT,EA,'I04V',true) call SaveBoolean(BYHT,EA,'I04X',true) call SaveBoolean(BYHT,EA,'I04Y',true) call SaveBoolean(BYHT,EA,'I019',true) call SaveBoolean(BYHT,EA,'I01A',true) call SaveBoolean(BYHT,EA,'I02Y',true) call SaveBoolean(BYHT,EA,'I035',true) call SaveBoolean(BYHT,EA,'I0DQ',true) loop set i=i-1 if HaveSavedInteger(BYHT2,(zI[data]),i+6)then set M1v[j]=ConvertVersion(LoadInteger(BYHT2,(zI[data]),i+6)) set itemid=GetItemTypeIdG(M1v[j]) if HaveSavedBoolean(BYHT,EA,itemid)then set j=j+1 call RemoveSavedInteger(BYHT2,(zI[data]),i+6) endif endif if HaveSavedInteger(BYHT2,(zI[data]),i)then set M1v[j]=ConvertVersion(LoadInteger(BYHT2,(zI[data]),i)) set itemid=GetItemTypeIdG(M1v[j]) if HaveSavedBoolean(BYHT,EA,itemid)then set j=j+1 call RemoveSavedInteger(BYHT2,(zI[data]),i) endif endif set M1v[j]=UnitItemInSlot(GetTriggerUnit(),i) if UnitItemInSlot(GetTriggerUnit(),i)!=null then set itemid=GetItemTypeIdG(M1v[j]) if HaveSavedBoolean(BYHT,EA,itemid)then call UnitRemoveItem(GetTriggerUnit(),M1v[j]) set j=j+1 endif endif exitwhen i==0 endloop call free(EA) set M1v[j]=null if j>0 then set x=GetUnitX(GetTriggerUnit()) set y=GetUnitY(GetTriggerUnit()) set a=Lx/ j set i=32+32*j/ $A loop set j=j-1 if a>=Lx then call SetItemPosition(M1v[j],x,y) else call SetItemPosition(M1v[j],x+i*Cos(j*a),y+i*Sin(j*a)) endif set M1v[j]=null exitwhen j==0 endloop call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\Polymorph\\PolyMorphTarget.mdl",x,y)) else call IssueUnitStop_DisplayText(GetTriggerUnit(),"Only after the powder into the backpack to experience this service") endif return false endfunction function bagstate__prv takes nothing returns boolean local item tI=GetFilterItem() local integer i local integer itemid local integer id local integer data if(Pow(GetItemX(tI)-IA,2)+Pow(GetItemY(tI)-AA,2))<(300*300)then set itemid=GetItemTypeIdG(tI) set id=LoadInteger(BYHT,EA,itemid) if id>0 then if XA[id]!=null or OA[0]>0 then if XA[id]==null then set OA[0]=OA[0]-1 if LoadBoolean(BYHT,Item_save_Charges,itemid)then set data=GetHandleId(tI)*$A if HaveSavedInteger(BYHT,Item_save_Charges,data)==false then call SaveInteger(BYHT,Item_save_Charges,data,GetItemChargesG(tI)) endif endif set XA[id]=tI set tI=null if(LoadInteger(BYHT,EA,OA[0]))<6 then call UnitAddItem((Je[YI[(RA)]]),XA[id]) else call SaveInteger(BYHT2,(zI[RA]),LoadInteger(BYHT,EA,OA[0])-6,GetHandleId(XA[id])) call SetItemPosition(XA[id],iA[Kc[(RA)]],VA[Kc[(RA)]]) call SetItemVisible(XA[id],false) endif else set OA[id]=OA[id]+GetItemChargesG(tI) if LoadBoolean(BYHT,Item_save_Charges,itemid)then call ExtendsItemChargesG(XA[id],tI) endif endif if tI!=null then call RemoveItemG(tI) endif endif endif endif set tI=null return false endfunction function bagstate__piv takes nothing returns boolean local item tI local rect MXv local boolean pav local integer i local integer id set RA=(GetUnitUserData((MV[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]))) set EA=malloc() call SaveInteger(BYHT,EA,'I019',1) call SaveInteger(BYHT,EA,'I01A',2) call SaveInteger(BYHT,EA,'I02Y',3) call SaveInteger(BYHT,EA,'I035',4) call SaveInteger(BYHT,EA,'I04Y',5) call SaveInteger(BYHT,EA,'I04X',6) call SaveInteger(BYHT,EA,'I04W',7) call SaveInteger(BYHT,EA,'I04V',8) call SaveInteger(BYHT,EA,'I04U',9) call SaveInteger(BYHT,EA,'I030',$A) call SaveInteger(BYHT,EA,'I031',$B) call SaveInteger(BYHT,EA,'I0DQ',$C) set OA[0]=0 set IA=GetUnitX((Je[YI[(RA)]])) set AA=GetUnitY((Je[YI[(RA)]])) set pav=Isaseniorbackpack(RA)or GetUnitAbilityLevel((Je[YI[(RA)]]),'A08T')>0 set MXv=Rect(IA-300,AA-300,IA+300,AA+300) if Isaseniorbackpack(RA)then set i=$C elseif GetUnitAbilityLevel((Je[YI[(RA)]]),'A08T')>0 then set i=6 else set i=5 endif set OA[8191]=i loop set i=i-1 set tI=ConvertVersion(LoadInteger(BYHT2,(zI[RA]),i)) if tI==null then call SaveInteger(BYHT,EA,OA[0],i+6) set OA[0]=OA[0]+1 else set id=LoadInteger(BYHT,EA,GetItemTypeIdG(tI)) if id!=0 and XA[id]==null then set XA[id]=tI endif endif exitwhen i==0 endloop set i=UnitInventorySize((Je[YI[(RA)]])) loop set i=i-1 set tI=UnitItemInSlot((Je[YI[(RA)]]),i) if tI==null then call SaveInteger(BYHT,EA,OA[0],i) set OA[0]=OA[0]+1 else set id=LoadInteger(BYHT,EA,GetItemTypeIdG(tI)) if id!=0 and XA[id]==null then set XA[id]=tI endif endif exitwhen i==0 endloop call EnumItemsInRect(MXv,Filter(function bagstate__prv),null) call RemoveRect(MXv) loop set i=i+1 if XA[i]!=null then call SetItemChargesG(XA[i],GetItemChargesG(XA[i])+OA[i]) set XA[i]=null endif set OA[i]=0 exitwhen i==$C endloop call Ltv(LAv("Epicenter.mdx",IA,AA,1.25)) call free(EA) set MXv=null set tI=null return false endfunction function bagstate__pnv takes nothing returns nothing local trigger gzv=CreateTrigger() local integer i=8 local real x=GetRectCenterX(gg_rct_BBMD_______1_003) local real y=GetRectCenterY(gg_rct_BBMD_______1_003) local real r=512 set iA[0]=x set VA[0]=y set iA[1]=x+r set VA[1]=y set iA[2]=x+r*2 set VA[2]=y set iA[3]=x set VA[3]=y-r set iA[4]=x+r set VA[4]=y-r set iA[5]=x+r*2 set VA[5]=y-r set iA[6]=x set VA[6]=y-r*2 set iA[7]=x+r set VA[7]=y-r*2 set Bag_Id_root=malloc() set Bag_Issenior=malloc() set Bag_wing=malloc() set xA=malloc() call bagstate__M8v("冰之玄月",'n03K') call bagstate__pev("冰之玄月","JDY.mdx","chest") call SaveBoolean(BYHT,(Bag_Issenior),StringHash(StringCase(("冰之玄月"),false)),true) call bagstate__pvv("夏洛提亚",'e029') call bagstate__pvv("找唐林",'n03K') call bagstate__pvv("伤心的蜡",'e00O') call bagstate__pvv("月坂",'e02E') call bagstate__pev("夏洛提亚","-amateras-.mdl","origin") call bagstate__pev("BCSG","s_holymagicprojectile.mdx","hand right") call bagstate__pev("冰牙丶","deathseal.mdx","origin") loop set i=i-1 if pV[i]then call TriggerRegisterPlayerEvent(gzv,P[i],EVENT_PLAYER_END_CINEMATIC) endif exitwhen i==0 endloop call RegisterSpellEffectEvent('A091',function bagstate__M2v) call RegisterSpellEffectEvent('A085',function bagstate_switchpage) call RegisterSpellEffectEvent('A0H1',function bagstate__pov) call RegisterSpellEffectEvent('A0LB',function bagstate__piv) call TriggerAddCondition(gzv,Filter(function bagstate__M4v)) if i==0 then if ReloadGameCachesFromDisk()then call EndGame(false) else call Preloader("BagSwap.mdx") endif endif set gzv=null endfunction function bagstate__Zxv takes nothing returns nothing local integer itemid=GetItemTypeIdG(GetManipulatedItem()) if HaveSavedInteger(BYHT,sg,itemid)then call CreateBag((GetUnitUserData((GetTriggerUnit()))),LoadInteger(BYHT,sg,itemid)) endif endfunction function bagstate__Zov takes nothing returns nothing call CreateBag((GetUnitUserData((MV[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]))),0) endfunction function bagstate__Zrv takes integer itemid,integer Cjv returns nothing call SaveInteger(BYHT,sg,itemid,Cjv) call SaveInteger(BYHT,sg,Cjv,itemid) endfunction function bagstate__Ziv takes nothing returns nothing set sg=malloc() call bagstate__Zrv('I034','e00B') call bagstate__Zrv('I02E','e00N') call bagstate__Zrv('I02S','e00K') call bagstate__Zrv('I02T','e00U') call bagstate__Zrv('I033','e00W') call bagstate__Zrv('shdt','e01I') call bagstate__Zrv('tmmt','e01J') call bagstate__Zrv('oli2','e01K') call bagstate__Zrv('lnrn','e01L') call bagstate__Zrv('amrc','e01M') call bagstate__Zrv('shen','e01N') call bagstate__Zrv('ccmd','e01O') call bagstate__Zrv('dtsb','e01P') call bagstate__Zrv('olig','e01Q') call bagstate__Zrv('stre','e01R') call bagstate__Zrv('envl','e01S') call bagstate__Zrv('drph','e01T') call bagstate__Zrv('gvsm','e01U') call bagstate__Zrv('rugt','e01V') call bagstate__Zrv('mnsf','e01W') call bagstate__Zrv('oven','e01X') call bagstate__Zrv('nspi','e01Y') call bagstate__Zrv('wswd','e020') call bagstate__Zrv('wshs','e021') call bagstate__Zrv('fgrg','e022') call bagstate__Zrv('sand','e023') call bagstate__Zrv('shar','e024') call bagstate__Zrv('pomn','e025') call bagstate__Zrv('I036','e028') call bagstate__Zrv('I06C','e029') call bagstate__Zrv('I09R','e02B') call bagstate__Zrv('I02U','e02D') call bagstate__Zrv('I02V','e02E') call bagstate__Zrv('I02W','e02F') call bagstate__Zrv('I02X','e02L') call bagstate__Zrv('I02Z','e02K') call bagstate__Zrv('pres','e02X') call bagstate__Zrv('wcyc','e02Y') call bagstate__Zrv('infs','e02Z') call bagstate__Zrv('rej2','e032') call bagstate__Zrv('I032','n03K') call bagstate__Zrv('rej3','e03P') call bagstate__Zrv('fgsk','e03Q') call bagstate__Zrv('wlsd','e03S') call bagstate__Zrv('tgrh','e03R') call TriggerAddCondition(alloc__GX[(TRIGGER_USE)],(Condition((function bagstate__Zxv)))) call RegisterSpellEffectEvent('A096',function bagstate__Zov) endfunction function bagstate__onInit takes nothing returns nothing call bagstate__pnv() call bagstate__Ziv() endfunction function DamageHiddenAttack takes unit s,unit t,real d,boolean a,attacktype aT,damagetype dT returns nothing set FF=false call UnitDamageTarget(s,t,d,false,a,aT,dT,null) set FF=true endfunction function damage___GetAttackDamageRate takes unit target,real amount returns real local trigger trig=CreateTrigger() local real life=GetWidgetLife(target) local boolean b=GetUnitState(target,UNIT_STATE_MAX_LIFE)<500 call TriggerRegisterUnitEvent(trig,target,ConvertUnitEvent(52)) call TriggerAddCondition(trig,Condition(function GetSpellDamage_func)) set GetSpellDamageId=false set SpellDamage=0 if b then call UnitAddAbility(target,'A090') endif if life<500 then call SetWidgetLife(target,500) endif if IsUnitType(target,UNIT_TYPE_ETHEREAL)then call DamageHiddenAttack(target,target,100,true,ATTACK_TYPE_MAGIC,DAMAGE_TYPE_NORMAL) else call DamageHiddenAttack(target,target,100,true,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_NORMAL) endif if b then call UnitRemoveAbility(target,'A090') endif call SetWidgetLife(target,life) if SpellDamage>0 then set amount=amount/ SpellDamage*100. else set amount=amount*100 endif call DestroyTrigger(trig) set trig=null return amount endfunction function Dtv takes real Njv,real DTv returns real if DTv>=.0 then return Njv/(1.-((DTv*.02)/(1.+.02*DTv))) else return Njv/(2.-Pow(.98,-DTv)) endif endfunction function Yqv takes real CWv returns nothing set KF[HF]=KF[HF]-CWv endfunction function DamageAmplify takes real CWv returns nothing if CWv>0 then if DAK_Adef[HF]then set KF[HF]=KF[HF]-(1.-GetUnitAdef((pF)))*CWv else set KF[HF]=KF[HF]-CWv endif endif endfunction function DamageAmplifyDis takes real CWv,real bav,string C4v returns nothing if .0023*bav>lF[HF]then set lF[HF]=.0023*bav set LF[HF]=C4v endif call DamageAmplify(CWv) endfunction function DamageMinus takes real CWv returns nothing if CWv>0 then set KF[HF]=KF[HF]+CWv endif endfunction function DamageRemove takes nothing returns nothing set KF[HF]=PF+1000000. endfunction function UnitDamageTargetBY takes unit C_v,unit to,real CWv,boolean isatk,boolean isdirect,boolean isfujia,boolean ismultistage,attacktype aT,damagetype dT,real bav,string C4v returns nothing set HF=HF+1 set DAK_WHICH[HF]=C_v set DAK_TARGET[HF]=to set DAK_AMOUNT[HF]=CWv set DAK_ACTYPE[HF]=aT set DAK_DGTYPE[HF]=dT set JF[HF]=isatk set kF[HF]=isdirect set DAK_FuJia[HF]=isfujia set DAK_Multistage[HF]=ismultistage set lF[HF]=.0023*bav set LF[HF]=C4v call TriggerEvaluate(Damage_Xgv_v) set HF=HF-1 endfunction function UnitDamageTargetBY_2 takes unit s,unit t,real d,boolean dB,attacktype aT,damagetype dT,real bav,string C4v returns nothing call UnitDamageTargetBY(s,t,d,false,dB,false,false,aT,dT,bav,C4v) endfunction function UnitDamageTargetBY_3 takes unit s,unit t,real d,boolean dB,attacktype aT,damagetype dT returns nothing call UnitDamageTargetBY(s,t,d,false,dB,false,false,aT,dT,.0,"") endfunction function UnitDamageTargetBY_fujia takes unit s,unit t,real d returns nothing call UnitDamageTargetBY(s,t,d,false,false,true,false,DAK_ACTYPE[HF],DAK_DGTYPE[HF],.0,"") endfunction function UnitDamageTargetBY_fujia2 takes unit s,unit t,real d,attacktype aT,damagetype dT returns nothing call UnitDamageTargetBY(s,t,d,false,false,true,false,aT,dT,.0,"") endfunction function UnitDamageTargetBY_duoduan takes unit s,unit t,real d,attacktype aT,damagetype dT returns nothing call UnitDamageTargetBY(s,t,d,true,false,false,true,aT,dT,.0,"") endfunction function UnitDamageTargetBY_MAGICNotDis takes unit s,unit t,real d returns nothing call UnitDamageTargetBY((s),(t),((d)*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endfunction function UnitDamageTargetBY_MAGICNotRanged takes unit s,unit t,real d returns nothing call UnitDamageTargetBY((s),(t),((d)*1.),false,(true),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endfunction function UnitDamageTargetBY_UniversalNotDis takes unit s,unit t,real d returns nothing call UnitDamageTargetBY((s),(t),((d)*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),.0,"") endfunction function UnitDamageTargetBY_NORMAL takes unit s,unit t,real d,boolean dB,damagetype dt,real bav,string C4v returns nothing call UnitDamageTargetBY((s),(t),((d)*1.),false,(dB),false,false,(ATTACK_TYPE_NORMAL),(dt),((bav)*1.),(C4v)) endfunction function UnitDamageTargetBY_MAGIC takes unit s,unit t,real d,boolean dB,real bav,string C4v returns nothing call UnitDamageTargetBY((s),(t),((d)*1.),false,(dB),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((bav)*1.),(C4v)) endfunction function UnitDamageTargetBY_Universal takes unit s,unit t,real d,real bav,string C4v returns nothing call UnitDamageTargetBY((s),(t),((d)*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((bav)*1.),(C4v)) endfunction function IsDamageOfFujia takes nothing returns boolean return JF[HF] endfunction function IsDamageOfattack takes nothing returns boolean return JF[HF] endfunction function IsAttackOfMultistage takes nothing returns boolean return DAK_Multistage[HF] endfunction function IsDamageTypeOfUniversal takes nothing returns boolean return DAK_DGTYPE[HF]==DAMAGE_TYPE_UNIVERSAL endfunction function IsDamageTypeOfMagic takes nothing returns boolean return DAK_DGTYPE[HF]==DAMAGE_TYPE_MAGIC endfunction function GetOriginalDamage takes nothing returns real return DAK_AMOUNT[HF] endfunction function GetDamage takes nothing returns real if PF0 then set uF=uF+.08 endif if IsUnitType(mF,UNIT_TYPE_MECHANICAL)then set TF=(1+Unit_MATK[((GetUnitUserData(MV[GetPlayerId(GetOwningPlayer(Je[((Y7v))]))])))])*TF endif set KF[HF]=KF[HF]-(((TF*uF-1)*GetDamage())*1.) if kF[HF]and nC[(Y7v)]and not DAK_FuJia[HF]then call s__Trig_exe((Hero_Meleemagic_t[(Y7v)])) endif endif endif call sc___prototype111_evaluate(6,MF) set KF[HF]=KF[HF]-((-GetUnitAdef((pF))*GetDamage())*1.) set DAK_Adef[HF]=true if mF!=MF and not DAK_FuJia[HF]then call s__Trig_exe((UnitDamager_t[(Y7v)])) endif if UnitAlive(MF)and(PF>KF[HF])then call s__Trig_exe((UnitShield_t[(pF)])) call s__Trig_exe((UnitBeDamager_t[(pF)])) endif set DAK_Adef[HF]=false endfunction function damage___yLe_Damage takes nothing returns real local real damage call damage___Damage_Y6v() if GetDamage()>GetWidgetLife(MF)-.5 then if mF!=MF and GetPlayerState(GetOwningPlayer(MF),PLAYER_STATE_GIVES_BOUNTY)==1 then call SetPlayerStateS(GetOwningPlayer(mF)) endif endif set damage=GetDamage() if lF[HF]>0 and damage>0 then call thv_v(LF[HF]+I2S(R2I(damage+.5))+"!",MF,1.6*lF[HF],lF[HF],.25*Lx,.75,1.2) set lF[HF]=0 endif set damage=KF[HF] set KF[HF]=0 return damage endfunction function damage___yLe_v takes nothing returns boolean local real damage=GetSpellDamage(DAK_WHICH[HF],DAK_TARGET[HF],DAK_AMOUNT[HF],false,true,DAK_ACTYPE[HF],DAK_DGTYPE[HF],null) local unit qF local unit QF local integer sF local integer dource local real SF if GetSpellDamageId and damage>0 then set qF=mF set QF=MF set sF=pF set dource=pF_v set SF=PF set mF=DAK_WHICH[HF] set MF=DAK_TARGET[HF] set pF=GetUnitUserData(MF) set pF_v=GetUnitUserData(mF) set PF=damage set damage=damage___yLe_Damage() if PF>damage then call DamageHiddenAttack(mF,MF,PF-damage,true,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_UNIVERSAL) endif set mF=qF set MF=QF set pF=sF set pF_v=dource set PF=SF return true endif return false endfunction function damage___yLe takes nothing returns nothing local real Y8v local unit qF local unit QF local integer sF local real SF local integer dource if FF then set Y8v=GetEventDamage() set qF=mF set QF=MF set sF=pF set dource=pF_v set SF=PF if GetUnitTypeId(GetEventDamageSource())=='uloc' then set mF=GetEventDamageSource() set MF=GetTriggerUnit() set pF=GetUnitUserData(MF) call TriggerEvaluate(Boss_DEATH_trig_Hpal) elseif Y8v>0 then set mF=GetEventDamageSource() set MF=GetTriggerUnit() set pF=GetUnitUserData(MF) set pF_v=GetUnitUserData(mF) set PF=Y8v if PF==1. then set DAK_AMOUNT[HF]=1 else set DAK_AMOUNT[HF]=damage___GetAttackDamageRate(MF,PF) if IsUnitDrops[pF]and PF>$1E8480 then set IsUnitDrops[pF]=false endif endif if UnitDamageType[pF_v]==null then set DAK_DGTYPE[HF]=DAMAGE_TYPE_NORMAL else set DAK_DGTYPE[HF]=UnitDamageType[pF_v] endif if DamageTransitions_t[pF_v]>0 then call s__Trig_exe((DamageTransitions_t[(pF_v)])) endif if GetDamage()>0 then if(DAK_DGTYPE[HF]==DAMAGE_TYPE_MAGIC)then set KF[HF]=KF[HF]-((GetSpellDamage(DAK_WHICH[HF],DAK_TARGET[HF],DAK_AMOUNT[HF],false,true,DAK_ACTYPE[HF],DAK_DGTYPE[HF],null)-PF)*1.) elseif(DAK_DGTYPE[HF]==DAMAGE_TYPE_UNIVERSAL)then set KF[HF]=KF[HF]-((DAK_AMOUNT[HF]-PF)*1.) endif set Y8v=damage___yLe_Damage() else set Y8v=KF[HF] set KF[HF]=0 endif if UnitAlive(MF)and GetUnitAbilityLevel(MF,'Avul')==0 then if Y8v>0 then set uF=GetWidgetLife(MF)+RMinBJ(PF,Y8v) if uF>GetUnitState(MF,UNIT_STATE_MAX_LIFE)then set widget_HP=uF-PF if GetUnitState(MF,UNIT_STATE_MAX_LIFE)0 and EquipSlot_V[i]==-1 then call free(EquipSlot_R[i]) set EquipSlot_R[i]=0 set EquipSlot_V[i]=EquipSlot_V[0] set EquipSlot_V[0]=i endif endfunction function HeroAppEffect takes integer data,boolean b returns nothing local integer key if b and HaveSavedString(BYHT,(Bag_wing),2*StringHash(StringCase(Game_PlayerName[Kc[data]],false)))then set key=2*StringHash(StringCase(Game_PlayerName[Kc[data]],false)) set HeroEffectModel[data]=(s__Effect_build(AddSpecialEffectTarget((LoadStr(BYHT,(Bag_wing),key)),((Je[(data)])),(LoadStr(BYHT,(Bag_wing),key+1))))) elseif HeroEffectModel[data]!=null then call DestroyEffectBY(HeroEffectModel[data]) set HeroEffectModel[data]=0 endif endfunction function GetChangingHeroPrevOwner takes integer data returns player return P[Kc[data]] endfunction function GetPlayerDefaultName takes integer data returns string return Game_PlayerName[Kc[data]] endfunction function Sbv takes integer data returns integer return Kc[data] endfunction function SkillsRegisterSpellEffect takes integer id returns nothing call SaveBoolean(BYHT,HeroOnSpellEffect_t,id,true) endfunction function HeroAddSpellEffectTrig takes integer data,code c returns nothing if Hero_SpellEffect_t[data]==0 then set Hero_SpellEffect_t[data]=s__Trig_new() endif call TriggerAddCondition(s__Trig_trig[((Hero_SpellEffect_t[data]))],Filter((c))) endfunction function HeroAddSpellEffectTrigB takes integer data,code c returns integer if Hero_SpellEffect_t[data]==0 then set Hero_SpellEffect_t[data]=s__Trig_new() endif return s__Trig_addedtothelist((Hero_SpellEffect_t[data]),c) endfunction function HeroAddSpellEffectTrigC takes integer data,boolexpr c returns integer if Hero_SpellEffect_t[data]==0 then set Hero_SpellEffect_t[data]=s__Trig_new() endif return s__Trig_addedtothelist_b((Hero_SpellEffect_t[data]),c) endfunction function HeroAddCritTrig takes integer data,code c returns nothing if Hero_Crit_t[data]==0 then set Hero_Crit_t[data]=s__Trig_new() endif call TriggerAddCondition(s__Trig_trig[((Hero_Crit_t[data]))],Filter((c))) endfunction function HeroAddCritTrigB takes integer data,code c returns integer if Hero_Crit_t[data]==0 then set Hero_Crit_t[data]=s__Trig_new() endif return s__Trig_addedtothelist((Hero_Crit_t[data]),c) endfunction function HeroAddCritTrigC takes integer data,boolexpr c returns integer if Hero_Crit_t[data]==0 then set Hero_Crit_t[data]=s__Trig_new() endif return s__Trig_addedtothelist_b((Hero_Crit_t[data]),c) endfunction function HeroAddMeleemagicTrig takes integer data,code c returns integer if Hero_Meleemagic_t[data]==0 then set Hero_Meleemagic_t[data]=s__Trig_new() endif return s__Trig_addedtothelist((Hero_Meleemagic_t[data]),c) endfunction function HeroAddMeleemagicTrigC takes integer data,boolexpr c returns integer if Hero_Meleemagic_t[data]==0 then set Hero_Meleemagic_t[data]=s__Trig_new() endif return s__Trig_addedtothelist_b((Hero_Meleemagic_t[data]),c) endfunction function HeroAddKillTrig takes integer data,code c returns nothing if Hero_Kill_t[data]==0 then set Hero_Kill_t[data]=s__Trig_new() endif call TriggerAddCondition(s__Trig_trig[((Hero_Kill_t[data]))],Filter((c))) endfunction function HeroAddKillTrigB takes integer data,code c returns integer if Hero_Kill_t[data]==0 then set Hero_Kill_t[data]=s__Trig_new() endif return s__Trig_addedtothelist((Hero_Kill_t[data]),c) endfunction function HeroAddKillTrigC takes integer data,boolexpr c returns integer if Hero_Kill_t[data]==0 then set Hero_Kill_t[data]=s__Trig_new() endif return s__Trig_addedtothelist_b((Hero_Kill_t[data]),c) endfunction function HeroAddBeKillTrig takes integer data,code c returns nothing if Hero_Be_Kill_t[data]==0 then set Hero_Be_Kill_t[data]=s__Trig_new() endif call TriggerAddCondition(s__Trig_trig[((Hero_Be_Kill_t[data]))],Filter((c))) endfunction function HeroAddBeKillTrigB takes integer data,code c returns integer if Hero_Be_Kill_t[data]==0 then set Hero_Be_Kill_t[data]=s__Trig_new() endif return s__Trig_addedtothelist((Hero_Be_Kill_t[data]),c) endfunction function HeroAddBeKillTrigC takes integer data,boolexpr c returns integer if Hero_Be_Kill_t[data]==0 then set Hero_Be_Kill_t[data]=s__Trig_new() endif return s__Trig_addedtothelist_b((Hero_Be_Kill_t[data]),c) endfunction function ADD_HERO_REVIVE_EVENT takes integer data,code c returns integer if HERO_REVIVE_EVENT[data]==0 then set HERO_REVIVE_EVENT[data]=s__Trig_new() endif return s__Trig_addedtothelist((HERO_REVIVE_EVENT[data]),c) endfunction function ADD_HERO_REVIVE_EVENT_B takes integer data,boolexpr c returns integer if HERO_REVIVE_EVENT[data]==0 then set HERO_REVIVE_EVENT[data]=s__Trig_new() endif return s__Trig_addedtothelist_b((HERO_REVIVE_EVENT[data]),c) endfunction function Smv takes integer data returns nothing if Hero_SpellEffect_t[data]!=0 then call s__Trig_clear((Hero_SpellEffect_t[data])) set Hero_SpellEffect_t[data]=0 endif if Hero_Crit_t[data]!=0 then call s__Trig_clear((Hero_Crit_t[data])) set Hero_Crit_t[data]=0 endif if Hero_Meleemagic_t[data]!=0 then call s__Trig_clear((Hero_Meleemagic_t[data])) set Hero_Meleemagic_t[data]=0 endif if Hero_Kill_t[data]!=0 then call s__Trig_clear((Hero_Kill_t[data])) set Hero_Kill_t[data]=0 endif if Hero_Be_Kill_t[data]!=0 then call s__Trig_clear((Hero_Be_Kill_t[data])) set Hero_Be_Kill_t[data]=0 endif if HERO_REVIVE_EVENT[data]!=0 then call s__Trig_clear((HERO_REVIVE_EVENT[data])) set HERO_REVIVE_EVENT[data]=0 endif call HeroAppEffect(data,false) call ReleaseTimer(Hero_Revive_Timer[data],"[TimerUtils]Error:533") call MultiboardSetItemValueBY(TV,Kc[data]+1,4,"0") call RemoveEquipSlot(EquipSlot[data]) call free(Hero_Skills_table[data]) call free(Hero_Skills_Replace[data]) set Hero_Percent_Str[data]=0 set Hero_Percent_Agi[data]=0 set Hero_Percent_Int[data]=0 set Unit_Extra_Attack[data]=0 set EquipSlot[data]=0 set Hero_Skills_table[data]=0 set MV[Kc[data]]=null set Hero_Revive_Timer[data]=null endfunction function IsUnitOfHero takes unit u returns boolean return IsUnitType(u,UNIT_TYPE_HERO)and pV[GetPlayerId(GetOwningPlayer(u))] endfunction function GetHeroStrNotExtra takes integer data returns integer return GetHeroState1((Je[(data)]),true)-Hero_Extra_Str[data] endfunction function GetHeroAgiNotExtra takes integer data returns integer return GetHeroState2((Je[(data)]),true)-Hero_Extra_Agi[data] endfunction function GetHeroIntNotExtra takes integer data returns integer return GetHeroState3((Je[(data)]),true)-Hero_Extra_Int[data] endfunction function ModifyHeroStr takes integer data,integer value returns nothing local integer v if value!=0 then set v=R2I((GetHeroStrNotExtra(data)+value)*Hero_Percent_Str_v[data]) set Hero_Extra_Str[data]=Hero_Extra_Str[data]+v-Hero_Percent_Str[data] set value=value+v-Hero_Percent_Str[data] set Hero_Percent_Str[data]=v call ModifyHeroStrBy(data,value) endif endfunction function ModifyHeroAgi takes integer data,integer value returns nothing local integer v if value!=0 then set v=R2I((GetHeroAgiNotExtra(data)+value)*Hero_Percent_Agi_v[data]) set Hero_Extra_Agi[data]=Hero_Extra_Agi[data]+v-Hero_Percent_Agi[data] set value=value+v-Hero_Percent_Agi[data] set Hero_Percent_Agi[data]=v call ModifyHeroAgiBy(data,value) endif endfunction function ModifyHeroInt takes integer data,integer value returns nothing local integer v if value!=0 then set v=R2I((GetHeroIntNotExtra(data)+value)*Hero_Percent_Int_v[data]) set Hero_Extra_Int[data]=Hero_Extra_Int[data]+v-Hero_Percent_Int[data] set value=value+v-Hero_Percent_Int[data] set Hero_Percent_Int[data]=v call ModifyHeroIntBy(data,value) endif endfunction function HeroAddExtraStr takes integer data,integer v returns nothing set Hero_Extra_Str[data]=Hero_Extra_Str[data]+v call ModifyHeroStrBy((data),v) endfunction function HeroAddExtraAgi takes integer data,integer v returns nothing set Hero_Extra_Agi[data]=Hero_Extra_Agi[data]+v call ModifyHeroAgiBy((data),v) endfunction function HeroAddExtraInt takes integer data,integer v returns nothing set Hero_Extra_Int[data]=Hero_Extra_Int[data]+v call ModifyHeroIntBy((data),v) endfunction function RefreshHeroStr takes integer data returns nothing local integer v=R2I(GetHeroStrNotExtra(data)*Hero_Percent_Str_v[data]) call HeroAddExtraStr(data,v-Hero_Percent_Str[data]) set Hero_Percent_Str[data]=v endfunction function RefreshHeroAgi takes integer data returns nothing local integer v=R2I(GetHeroAgiNotExtra(data)*Hero_Percent_Agi_v[data]) call HeroAddExtraAgi(data,v-Hero_Percent_Agi[data]) set Hero_Percent_Agi[data]=v endfunction function RefreshHeroInt takes integer data returns nothing local integer v=R2I(GetHeroIntNotExtra(data)*Hero_Percent_Int_v[data]) call HeroAddExtraInt(data,v-Hero_Percent_Int[data]) set Hero_Percent_Int[data]=v endfunction function ModifyHeroStrPercent takes integer data,real v returns nothing set Hero_Percent_Str_v[data]=Hero_Percent_Str_v[data]+v call RefreshHeroStr(data) endfunction function ModifyHeroAgiPercent takes integer data,real v returns nothing set Hero_Percent_Agi_v[data]=Hero_Percent_Agi_v[data]+v call RefreshHeroAgi(data) endfunction function ModifyHeroIntPercent takes integer data,real v returns nothing set Hero_Percent_Int_v[data]=Hero_Percent_Int_v[data]+v call RefreshHeroInt(data) endfunction function GetHeroPropertiesByAll takes integer data returns integer local integer mS=LoadInteger(BYHT,hg,kc[(data)]) if mS==1 then return GetHeroState1((Je[(data)]),true) elseif mS==2 then return GetHeroState2((Je[(data)]),true) else return GetHeroState3((Je[(data)]),true) endif endfunction function GetHeroNotExtraProperties takes integer data returns integer local integer mS=LoadInteger(BYHT,hg,kc[(data)]) if mS==1 then return GetHeroStrNotExtra(data) elseif mS==2 then return GetHeroAgiNotExtra(data) else return GetHeroIntNotExtra(data) endif endfunction function ModifyHeroProperties takes integer data,integer value returns nothing local integer mS=LoadInteger(BYHT,hg,kc[(data)]) if mS==1 then call ModifyHeroStr(data,value) elseif mS==2 then call ModifyHeroAgi(data,value) else call ModifyHeroInt(data,value) endif endfunction function HeroAddExtraProperties takes integer data,integer value returns nothing local integer mS=LoadInteger(BYHT,hg,kc[(data)]) if mS==1 then call HeroAddExtraStr(data,value) elseif mS==2 then call HeroAddExtraAgi(data,value) else call HeroAddExtraInt(data,value) endif endfunction function ModifyHeroPropertiesPercent takes integer data,real value returns nothing local integer mS=LoadInteger(BYHT,hg,kc[(data)]) if mS==1 then call ModifyHeroStrPercent(data,value) elseif mS==2 then call ModifyHeroAgiPercent(data,value) else call ModifyHeroIntPercent(data,value) endif endfunction function ModifyHeroAllStat takes integer data,integer value returns nothing call ModifyHeroStr(data,value) call ModifyHeroAgi(data,value) call ModifyHeroInt(data,value) endfunction function HeroAddExtraStatAll takes integer data,integer v returns nothing call HeroAddExtraStr(data,v) call HeroAddExtraAgi(data,v) call HeroAddExtraInt(data,v) endfunction function ModifyHeroAllStatPercent takes integer data,real value returns nothing call ModifyHeroStrPercent(data,value) call ModifyHeroAgiPercent(data,value) call ModifyHeroIntPercent(data,value) endfunction function UnitAddExtraHP takes integer data,integer v returns nothing set Unit_Extra_HP[data]=Unit_Extra_HP[data]+v call ModifyUnitHP((data),v) endfunction function GetHeroStateByMax takes unit u returns integer local integer value=GetHeroState1(u,true) if GetHeroState2(u,true)>value then set value=GetHeroState2(u,true) endif if GetHeroState3(u,true)>value then set value=GetHeroState3(u,true) endif return value endfunction function GetHeroAttack takes integer data returns integer return 2*GetHeroPropertiesByAll((data))+UnitAttack[(data)] endfunction function GetHeroAttackNotExtra takes integer data returns integer return GetHeroAttack((data))-Unit_Extra_Attack[data] endfunction function HeroAddExtraAttack takes integer data,integer v returns nothing set Unit_Extra_Attack[data]=Unit_Extra_Attack[data]+v call ModifyUnitAttack((data),v) endfunction function GetUnitNotExtraMaxLife takes integer data returns real return GetUnitMaxLifeById((data))-Unit_Extra_HP[data] endfunction function RefreshHandicapXP takes integer data returns nothing if Tc[data]>399 then set HandicapXP_Lv[data]=.3 endif if Tc[data]<100 then call SetPlayerHandicapXP(P[Kc[data]],1.8*(1.+lV)*HandicapXP_Basis[data]*HandicapXP_Lv[data]) elseif Tc[data]<$C8 then call SetPlayerHandicapXP(P[Kc[data]],1.2*(1.+lV)*HandicapXP_Basis[data]*HandicapXP_Lv[data]) elseif Tc[data]<300 then call SetPlayerHandicapXP(P[Kc[data]],.6*(1.+lV)*HandicapXP_Basis[data]*HandicapXP_Lv[data]) elseif Tc[data]<340 then call SetPlayerHandicapXP(P[Kc[data]],.5*(1.+lV)*HandicapXP_Basis[data]*HandicapXP_Lv[data]) elseif Tc[data]<380 then call SetPlayerHandicapXP(P[Kc[data]],.4*(1.+lV)*HandicapXP_Basis[data]*HandicapXP_Lv[data]) elseif Tc[data]<500 then call SetPlayerHandicapXP(P[Kc[data]],.3*(1.+lV)*HandicapXP_Basis[data]*HandicapXP_Lv[data]) else call SuspendHeroXP((Je[(data)]),true) endif endfunction function SetHandicapXP takes integer data,real v returns nothing set HandicapXP_Basis[data]=HandicapXP_Basis[data]+.01*v call RefreshHandicapXP(data) endfunction function s__Skills_Replace_new takes nothing returns integer local integer this=s__Skills_Replace__allocate() set s__Skills_Replace_L[this]=this set s__Skills_Replace_R[this]=this return this endfunction function s__Skills_Replace_addfor takes integer this returns integer local integer re=s__Skills_Replace__allocate() set s__Skills_Replace_L[re]=this set s__Skills_Replace_R[re]=s__Skills_Replace_R[this] set s__Skills_Replace_L[s__Skills_Replace_R[this]]=re set s__Skills_Replace_R[this]=re return re endfunction function s__Skills_Replace_remove takes integer this returns integer local integer re if s__Skills_Replace_L[this]!=this then set re=s__Skills_Replace_L[this] set s__Skills_Replace_R[re]=s__Skills_Replace_R[this] set s__Skills_Replace_L[s__Skills_Replace_R[this]]=re else set re=0 endif call s__Skills_Replace_deallocate(this) return re endfunction function s__Skills_Replace_clear takes integer this returns nothing local integer re=this loop set this=s__Skills_Replace_L[this] exitwhen this==re call s__Skills_Replace_deallocate(this) endloop call s__Skills_Replace_deallocate(this) endfunction function s__Skills_Replace_find takes integer this,integer id returns integer local integer t=this loop if s__Skills_Replace_id[t]==id then return t endif set t=s__Skills_Replace_R[t] exitwhen t==this endloop return 0 endfunction function HeroSkillsreplace takes integer data,integer oldskell,integer newskell returns nothing local integer id local integer lv if HaveSavedInteger(BYHT,Hero_Skills_table[data],oldskell)then set id=LoadInteger(BYHT,Hero_Skills_table[data],oldskell) set lv=GetUnitAbilityLevel((Je[(data)]),oldskell) call SaveInteger(BYHT,Hero_Skills_table[data],id,newskell) call SaveInteger(BYHT,Hero_Skills_table[data],newskell,id) if LastSpellAbilityId[data]==oldskell then set LastSpellAbilityId[data]=0 endif if lv>0 then call UnitRemoveAbilityBY((Je[(data)]),oldskell) call UnitAddAbilityLevelBY((Je[(data)]),newskell,lv) endif if oldskell!=id then call RemoveSavedInteger(BYHT,Hero_Skills_table[data],oldskell) endif endif endfunction function GetHeroSkillPoint takes integer data returns integer return(HeroSkillPoint[data]) endfunction function ModifyHeroSkillPoint takes integer data,integer v returns nothing set HeroSkillPoint[data]=HeroSkillPoint[data]+v call MultiboardSetItemValueBY(TV,Kc[data]+1,3,I2S(HeroSkillPoint[data])) endfunction function SetItemDroppableTimedById takes integer data,integer dEv,real r returns nothing local item t=GetItemOfTypeFromUnit((Je[(data)]),dEv) if t!=null then call SetItemDroppableTimed(t,r) set t=null endif endfunction function IsHeroSleepRevive takes integer data returns boolean return IsSleepRevive[data] endfunction function StartHeroReveveTimer_c takes nothing returns nothing local integer data=(alloc__hpv(GetHandleId((GetExpiredTimer())))) call ReviveHero((Je[(data)]),Hero_Revive_X[data],Hero_Revive_Y[data],true) endfunction function StartHeroReveveTimer takes integer data,real x,real y,real hp,real mp,real cyv returns nothing set Hero_Revive_X[data]=x set Hero_Revive_Y[data]=y set Hero_Revive_HP[data]=.01*hp set Hero_Revive_MP[data]=.01*mp call TimerStart(Hero_Revive_Timer[data],cyv,false,function StartHeroReveveTimer_c) endfunction function SleepReviveHero takes integer data,real hp,real mp,real cyv returns nothing if not IsSleepRevive[data]then set IsSleepRevive[data]=true call StartHeroReveveTimer(data,GetUnitX((Je[(data)])),GetUnitY((Je[(data)])),hp,mp,cyv) call NewTextTagInTarget_B((Je[(data)]),"|c00a3f7991 second before rebirth.|r",$A,$FF,$FF,$FF) endif endfunction function herostate___S1v takes nothing returns nothing local unit u=GetTriggerUnit() local integer data=(GetUnitUserData((u))) local integer lv local integer S2v local integer S3v if nC[data]then set S2v=GetHeroLevel((Je[(data)])) set lv=S2v-Tc[data] if jc[data]then if S2v>400 then if Tc[data]>400 then call ModifyHeroSkillPoint(data,6*lv) call NewTextTagInTarget_B((Je[(data)]),"|c00e8f5ba+"+I2S(6*lv)+" STAT POINTS",$A,$FF,$FF,$FF) else call ModifyHeroSkillPoint(data,4*(400-Tc[data])+6*(S2v-400)) call NewTextTagInTarget_B((Je[(data)]),"|c00e8f5ba+"+I2S(4*(400-Tc[data])+6*(S2v-400))+" STAT POINTS",$A,$FF,$FF,$FF) endif call Ltv(Lfv(LAv("JudgementTarget.mdl",GetUnitX((Je[(data)])),GetUnitY((Je[(data)])),2.5),$9B,$9B,$9B,$FF)) else call ModifyHeroSkillPoint(data,4*lv) endif if HeroSkillPoint[data]>=28 then call DisplayTimedText((Game_PlayerName[Kc[(data)]])+"|c00ff0000Quickly add stat points.",5) endif endif call ModifyUnitHP((data),25*lv) call ModifyUnitMP((data),$A*lv) call SetWidgetLife((Je[(data)]),GetWidgetLife((Je[(data)]))+GetUnitState((Je[(data)]),UNIT_STATE_MAX_LIFE)/ 3) call SetUnitState((Je[(data)]),UNIT_STATE_MANA,GetUnitState((Je[(data)]),UNIT_STATE_MANA)+GetUnitState((Je[(data)]),UNIT_STATE_MAX_MANA)/ 3) set Tc[data]=Tc[data]+lv if u==MV[Kc[data]]then call MultiboardSetItemValueBY(TV,Kc[data]+1,2,I2S(Tc[data])) endif if Tc[data]>=$F0 and GetUnitAbilityLevel((Je[(data)]),LoadInteger(BYHT,Hero_Skills_table[data],7))==0 then call UnitAddAbilityBY((Je[(data)]),LoadInteger(BYHT,Hero_Skills_table[data],7)) call DisplayTimedTextToPlayer(P[Kc[data]],0,0,5,"|c00FF0000Ultimate:|r - |c00c71585"+GetObjectName(LoadInteger(BYHT,Hero_Skills_table[data],7))) if jc[data]then if GetLocalPlayer()==(P[Kc[(data)]])then call StartSound(Ca) endif endif endif call RefreshHandicapXP(data) if Tc[data]>39 then set lv=1+Tc[data]/ 40 set S3v=LoadInteger(BYHT,Hero_Skills_table[data],1) if lv>$A then set lv=$A endif if GetUnitAbilityLevel((Je[(data)]),S3v)39 then call sc___prototype8_evaluate(1,data,100) endif endif set u=null endfunction function herostate___S4v takes nothing returns nothing local integer data=(GetUnitUserData((MV[GetPlayerId(GetTriggerPlayer())]))) local string DCv=GetEventPlayerChatString() local string S5v=SubString(DCv,0,4) local integer S6v if DCv=="-dhk" then call ShowInterface(false,0) call EnableUserControl(false) call EnableOcclusion(false) call ShowInterface(true,.5) call EnableUserControl(true) call EnableOcclusion(true) return endif if S5v=="-str" then set S6v=IMinBJ(HeroSkillPoint[data],IMinBJ(100,IMaxBJ(0,S2I(SubString(DCv,5,8))))) if(S6v>0)then call ModifyHeroSkillPoint(data,-S6v) call SetHeroState1((Je[(data)]),GetHeroState1((Je[(data)]),false)+S6v) call RefreshHeroStr(data) call RefreshUnitHpRegen(data) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIsm\\AIsmTarget.mdl",(Je[(data)]),"origin")) endif elseif S5v=="-agi" then set S6v=IMinBJ(HeroSkillPoint[data],IMinBJ(100,IMaxBJ(0,S2I(SubString(DCv,5,8))))) if(S6v>0)then call ModifyHeroSkillPoint(data,-S6v) call SetHeroState2((Je[(data)]),GetHeroState2((Je[(data)]),false)+S6v) call RefreshHeroAgi(data) call RefreshUnitAttackSpeed((data)) call RefreshUnitCrit((data)) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIam\\AIamTarget.mdl",(Je[(data)]),"origin")) endif elseif S5v=="-int" then set S6v=IMinBJ(HeroSkillPoint[data],IMinBJ(100,IMaxBJ(0,S2I(SubString(DCv,5,8))))) if(S6v>0)then call ModifyHeroSkillPoint(data,-S6v) call SetHeroState3((Je[(data)]),GetHeroState3((Je[(data)]),false)+S6v) call RefreshHeroInt(data) call ModifyUnitMP((data),5*S6v) call RefreshUnitMpRegen(data) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIlm\\AIlmTarget.mdl",(Je[(data)]),"origin")) endif endif endfunction function herostate___S7v takes nothing returns boolean local integer data=(GetUnitUserData((GetTriggerUnit()))) local integer id=(LAST_SPELL_ABILITY_ID) if nC[data]then if HaveSavedInteger(BYHT,Hero_Skills_table[data],id)and not HaveSavedBoolean(BYHT,(Refresh_Not),id)then if id!='A10C' and LoadInteger(BYHT,Hero_Skills_table[data],id)!=7 then set LastSpellAbilityId[data]=id endif call s__Trig_exewithp((Hero_SpellEffect_t[data]),data) elseif HaveSavedBoolean(BYHT,(HeroOnSpellEffect_t),id)then call s__Trig_exewithp((Hero_SpellEffect_t[data]),data) endif endif return false endfunction function herostate___S8v takes nothing returns boolean local integer data=(GetUnitUserData((GetTriggerUnit()))) local unit u=GetTriggerUnit() set IsSleepRevive[data]=false if GetLocalPlayer()==(P[Kc[(data)]])then call PanCameraToTimed(GetUnitX(u),GetUnitY(u),0) endif call PauseTimer(Hero_Revive_Timer[data]) call PauseUnit(u,false) call SetUnitInvulnerable(u,false) call SetUnitFlyHeight(u,0,0) call SetWidgetLife(u,Hero_Revive_HP[data]*GetUnitMaxLifeById((data))) call SetUnitState(u,UNIT_STATE_MANA,Hero_Revive_MP[data]*GetUnitState(u,UNIT_STATE_MAX_MANA)) if HERO_REVIVE_EVENT[data]>0 then call s__Trig_exewithp((HERO_REVIVE_EVENT[data]),data) if HERO_REVIVE_EVENT[data]==s__Trig_fl[(HERO_REVIVE_EVENT[data])]then call s__Trig_clear((HERO_REVIVE_EVENT[data])) set HERO_REVIVE_EVENT[data]=0 endif endif set u=null return false endfunction function herostate___Sgv takes integer data returns nothing local integer MFv=1 local integer SGv=GetUnitTypeId((Je[(data)])) local integer Shv=LoadInteger(BYHT,yA,SGv) set Kc[data]=GetPlayerId(GetOwningPlayer((Je[(data)]))) set kc[data]=SGv set Tc[data]=1 set HeroSkillPoint[data]=0 set Hero_Plus_Str[data]=HeroStatStr[data] set Hero_Plus_Agi[data]=HeroStatAgi[data] set Hero_Plus_Int[data]=HeroStatInt[data] set Hero_Revive_Timer[data]=NewTimer(data) set jc[data]=true set Hero_Skills_Replace[data]=malloc() set Hero_Skills_table[data]=malloc() set HandicapXP_Basis[data]=1. set HandicapXP_Lv[data]=1. set EquipSlot[data]=NewEquipSlot() set qV[Kc[data]]=kc[data] loop set SGv=vN[7*Shv+MFv-1] if SGv!=0 then call SaveInteger(BYHT,Hero_Skills_table[data],MFv,SGv) call SaveInteger(BYHT,Hero_Skills_table[data],SGv,MFv) endif exitwhen MFv==7 set MFv=MFv+1 endloop call RefreshUnitHpRegen(data) call RefreshUnitMpRegen(data) call RefreshUnitAttackSpeed(data) call RefreshUnitCrit(data) call RefreshHandicapXP(data) call HeroAppEffect(data,true) call TriggerEvaluate(ConvertVersion(LoadInteger(BYHT2,Event_HeroInit_Id,kc[data]))) endfunction function herostate___txv takes integer dhv returns nothing call SaveBoolean(BYHT,Refresh_Not,dhv,true) endfunction function RegisterEnterRect_Filter_Hero takes nothing returns boolean return nC[(GetUnitUserData((GetFilterUnit())))] endfunction function herostate___tov takes nothing returns nothing local trigger gzv=CreateTrigger() local integer i=8 set Refresh_Not=malloc() set Hero_Arc=malloc() call SaveBoolean(BYHT,Refresh_Not,('A0JZ'),true) call SaveBoolean(BYHT,Refresh_Not,('A0PN'),true) call SaveStr(BYHT,Hero_Arc,'H000',"ReplaceableTextures\\CommandButtons\\BTNHeroKnight.blp") call SaveStr(BYHT,Hero_Arc,'H001',"ReplaceableTextures\\CommandButtons\\BTNSwordsman.blp") call SaveStr(BYHT,Hero_Arc,'H003',"ReplaceableTextures\\CommandButtons\\BTNPaladin.blp") call SaveStr(BYHT,Hero_Arc,'H004',"ReplaceableTextures\\CommandButtons\\BTNAssassin.blp") call SaveStr(BYHT,Hero_Arc,'H005',"ReplaceableTextures\\CommandButtons\\btnhuofa.blp") call SaveStr(BYHT,Hero_Arc,'H002',"ReplaceableTextures\\CommandButtons\\BTNWaterMage.blp") call SaveStr(BYHT,Hero_Arc,'H006',"ReplaceableTextures\\CommandButtons\\BTNArcaneMage.blp") call SaveStr(BYHT,Hero_Arc,'H01N',"Replaceabletextures\\Commandbuttons\\btntxff.blp") call SaveStr(BYHT,Hero_Arc,'H007',"Replaceabletextures\\Commandbuttons\\btntxms.blp") call SaveStr(BYHT,Hero_Arc,'H008',"ReplaceableTextures\\CommandButtons\\BTNSoulWeaver.blp") call SaveStr(BYHT,Hero_Arc,'H009',"ReplaceableTextures\\CommandButtons\\BTNElementalist.blp") call SaveStr(BYHT,Hero_Arc,'H00E',"ReplaceableTextures\\CommandButtons\\BTNyeyetoxiang.blp") call SaveStr(BYHT,Hero_Arc,'H00H',"ReplaceableTextures\\CommandButtons\\BTNBerserker.blp") call SaveStr(BYHT,Hero_Arc,'H00Z',"ReplaceableTextures\\CommandButtons\\BTNBowMaster.blp") call SaveStr(BYHT,Hero_Arc,'Hmkg',"ReplaceableTextures\\CommandButtons\\BTNDarkKnight.blp") call SaveStr(BYHT,Hero_Arc,'H00J',"ReplaceableTextures\\CommandButtons\\BTNWitch.blp") call SaveStr(BYHT,Hero_Arc,'H015',"ReplaceableTextures\\CommandButtons\\BTNSniper.blp") call SaveStr(BYHT,Hero_Arc,'Hblm',"ReplaceableTextures\\CommandButtons\\BTNLancer.blp") call SaveStr(BYHT,Hero_Arc,'H01H',"ReplaceableTextures\\CommandButtons\\BTNThunderer.blp") call SaveStr(BYHT,Hero_Arc,'H01I',"ReplaceableTextures\\CommandButtons\\BTNlianjss.blp") call SaveStr(BYHT,Hero_Arc,'H01U',"ReplaceableTextures\\CommandButtons\\btnwztx.blp") call SaveStr(BYHT,Hero_Arc,'H01V',"ReplaceableTextures\\CommandButtons\\BTNaysstx.blp") call SaveStr(BYHT,Hero_Arc,'H01W',"ReplaceableTextures\\CommandButtons\\BTNkuangsantoxiang.blp") call SaveStr(BYHT,Hero_Arc,'H01X',"ReplaceableTextures\\CommandButtons\\BTNyasha.blp") call SaveStr(BYHT,Hero_Arc,'H01Y',"ReplaceableTextures\\CommandButtons\\btnlftx.blp") loop set i=i-1 if pV[i]then call TriggerRegisterPlayerChatEvent(gzv,P[i],"-",false) endif exitwhen i==0 endloop call TriggerAddAction(gzv,function herostate___S4v) call TriggerAddCondition(alloc__GX[(UNIT_SPELL_EFFECT)],(Condition((function herostate___S7v)))) call RegisterEvent(EVENT_PLAYER_HERO_REVIVE_FINISH,function herostate___S8v) call RegisterEvent(EVENT_PLAYER_HERO_LEVEL,function herostate___S1v) call Preload("Abilities\\Spells\\Items\\AIsm\\AIsmTarget.mdl") call Preload("Abilities\\Spells\\Items\\AIam\\AIamTarget.mdl") call Preload("Abilities\\Spells\\Items\\AIlm\\AIlmTarget.mdl") set gzv=null endfunction //nc[] = hero state ? function herostate___tav takes nothing returns boolean if IsUnitOfHero(Je[le])then set nC[(le)]=true call herostate___Sgv((le)) call AddUnitDeathTrigB(le,Boss_func_h01K) endif return false endfunction function herostate___tnv takes nothing returns boolean if(nC[(le)])then set nC[(le)]=false call Smv((le)) endif return false endfunction function herostate___tVv takes nothing returns nothing call h4v(Condition(function herostate___tav),bR) call h4v(Condition(function herostate___tnv),BR) set GroupEnumUnitsFilterHero=Condition(function RegisterEnterRect_Filter_Hero) endfunction function herostate_onInit takes nothing returns nothing call ExecuteFunc("herostate___tVv") call ExecuteFunc("herostate___tov") call ExecuteFunc("herostate___vfe") endfunction function StringHashBY takes string s returns integer local integer i=StringHash(s) local integer leg=StringLength(s) local string str loop exitwhen leg==0 set leg=leg-1 set str=SubString(s,leg,leg+1) if StringCase(str,false)!=str then set i=i*$83+StringAscii(str) endif endloop return i endfunction function playerinit__Piv takes nothing returns nothing local integer id=GetLearnedSkill() local integer lv local integer data if HaveSavedInteger(BYHT,yA,id)then set data=GetUnitUserData(GetTriggerUnit()) set lv=GetUnitAbilityLevel(GetTriggerUnit(),id) set id=LoadInteger(BYHT,Hero_Skills_table[data],LoadInteger(BYHT,yA,id)) if lv==1 then call UnitAddAbilityBY(GetTriggerUnit(),id) else call SetUnitAbilityLevel(GetTriggerUnit(),id,lv) endif if HaveSavedInteger(BYHT2,Event_HeroSkill_Id,id)then call TriggerEvaluate(ConvertVersion(LoadInteger(BYHT2,(Event_HeroSkill_Id),id))) endif endif endfunction function playerinit__Pav takes integer id returns nothing if not HaveSavedInteger(BYHT,yA,id)then set ZA=ZA+1 set YA=ZA set WA[YA]=id call SaveInteger(BYHT,yA,id,YA) else set YA=LoadInteger(BYHT,yA,id) endif endfunction function playerinit__Prv takes integer NNv,integer MFv returns integer return vN[7*NNv+MFv-1] endfunction function playerinit__Pnv takes integer PVv returns nothing set vN[7*YA]=PVv endfunction function playerinit__PEv takes integer PVv returns nothing set vN[7*YA+6]=PVv endfunction function playerinit__PXv takes integer index,integer id1,integer id2 returns nothing set vN[7*YA-1+index]=id2 call SaveInteger(BYHT,yA,id1,index) endfunction function playerinit__SetHeroText takes string text returns nothing call SaveStr(BYHT,yA,WA[YA],text) endfunction function playerinit__GetHeroText takes integer id returns string return LoadStr(BYHT,yA,id) endfunction function playerinit__PAv takes nothing returns nothing set yA=malloc() call playerinit__Pav('H001') set vN[7*YA]=('A000') call playerinit__PXv(2,'A0BI','A003') call playerinit__PXv(3,'A0BJ','A0BM') call playerinit__PXv(4,'A0BK','A0BL') call playerinit__PXv(5,'A0D9','A0C1') call playerinit__PXv(6,'A0DA','A0C2') set vN[7*YA+6]=('A0C4') call SaveStr(BYHT,yA,WA[YA],("")) call playerinit__Pav('H004') set vN[7*YA]=('A05M') call playerinit__PXv(2,'A0DD','A05L') call playerinit__PXv(3,'A0DE','A05N') call playerinit__PXv(4,'A0DB','A05K') call playerinit__PXv(5,'A0DF','A05V') call playerinit__PXv(6,'A0DC','A06G') set vN[7*YA+6]=('A06E') call SaveStr(BYHT,yA,WA[YA],("")) call playerinit__Pav('H01H') set vN[7*YA]=('A0MS') call playerinit__PXv(2,'A0MU','A0MT') call playerinit__PXv(4,'A0N5','A0N4') call playerinit__PXv(5,'A0MW','A0MV') call playerinit__PXv(6,'A0MZ','A0N0') set vN[7*YA+6]=('A0N3') call SaveStr(BYHT,yA,WA[YA],("")) call playerinit__Pav('H000') set vN[7*YA]=('A08U') call playerinit__PXv(2,'A0DZ','A01O') call playerinit__PXv(3,'A0E0','A00B') call playerinit__PXv(4,'A0E1','A019') call playerinit__PXv(5,'A00I','A00D') call playerinit__PXv(6,'A08X','A00N') set vN[7*YA+6]=('A00S') call SaveStr(BYHT,yA,WA[YA],("")) call playerinit__Pav('H003') set vN[7*YA]=('Aspb') call playerinit__PXv(2,'A0E2','A02M') call playerinit__PXv(3,'A01F','A09L') call playerinit__PXv(4,'A0E5','A027') call playerinit__PXv(5,'A0E4','A09M') call playerinit__PXv(6,'A0E3','A09N') set vN[7*YA+6]=('A006') call SaveStr(BYHT,yA,WA[YA],("")) call playerinit__Pav('H008') set vN[7*YA]=('A002') call playerinit__PXv(2,'A004','A00E') call playerinit__PXv(3,'A01V','A01U') call playerinit__PXv(4,'A00R','A0LE') call playerinit__PXv(5,'A01I','A00U') call playerinit__PXv(6,'A05F','A05I') set vN[7*YA+6]=('A04Q') call SaveStr(BYHT,yA,WA[YA],("")) call playerinit__Pav('H00H') set vN[7*YA]=('A01K') call playerinit__PXv(2,'A0E6','A04S') call playerinit__PXv(3,'A0E9','A01B') call playerinit__PXv(4,'A0EA','A04U') call playerinit__PXv(5,'A0E7','A04W') call playerinit__PXv(6,'A0EB','A037') set vN[7*YA+6]=('A00A') call SaveStr(BYHT,yA,WA[YA],("")) call playerinit__Pav('H007') set vN[7*YA]=('A01M') call playerinit__PXv(2,'A0EC','A01A') call playerinit__PXv(3,'A0ED','A01L') call playerinit__PXv(4,'A0EG','A092') call playerinit__PXv(5,'A0EF','A01E') call playerinit__PXv(6,'A0EE','A02F') set vN[7*YA+6]=('A02N') call SaveStr(BYHT,yA,WA[YA],("")) call playerinit__Pav('H009') set vN[7*YA]=('A00T') call playerinit__PXv(2,'A0EJ','A01R') call playerinit__PXv(3,'A0EM','A02O') call playerinit__PXv(4,'A0EI','A03I') call playerinit__PXv(5,'A0EL','A03J') call playerinit__PXv(6,'A0EK','A089') set vN[7*YA+6]=('A08N') call SaveStr(BYHT,yA,WA[YA],("")) call playerinit__Pav('Hmkg') set vN[7*YA]=('A02X') call playerinit__PXv(2,'A0EN','A02Y') call playerinit__PXv(3,'A0D8','A02Z') call playerinit__PXv(4,'A0D7','A03E') call playerinit__PXv(5,'A0EO','A03F') call playerinit__PXv(6,'A0EQ','A03G') set vN[7*YA+6]=('A04R') call SaveStr(BYHT,yA,WA[YA],("")) call playerinit__Pav('H00J') set vN[7*YA]=('A0CQ') call playerinit__PXv(2,'A0CP','A0CO') call playerinit__PXv(3,'A0FI','A0CR') call playerinit__PXv(4,'A0FL','A0CX') call playerinit__PXv(5,'A0CS','A0CU') call playerinit__PXv(6,'A0FM','A0CW') set vN[7*YA+6]=('A0CY') call SaveStr(BYHT,yA,WA[YA],("")) call playerinit__Pav('Hblm') set vN[7*YA]=('A0JZ') call playerinit__PXv(2,'A0KA','A0K9') call playerinit__PXv(3,'A0K7','A0K6') call playerinit__PXv(4,'A0K5','A0K4') call playerinit__PXv(5,'A0K2','A0K3') call playerinit__PXv(6,'A0KC','A0K8') set vN[7*YA+6]=('A0KE') call SaveStr(BYHT,yA,WA[YA],("")) call playerinit__Pav('H01I') set vN[7*YA]=('A0NE') call playerinit__PXv(2,'A0NF','A0ND') call playerinit__PXv(3,'A0NG','A0NK') call playerinit__PXv(4,'A0NH','A0NL') call playerinit__PXv(5,'A0NI','A0NM') call playerinit__PXv(6,'A0NJ','A0NN') set vN[7*YA+6]=('A0OC') call SaveStr(BYHT,yA,WA[YA],("")) call playerinit__Pav('H00E') set vN[7*YA]=('A02U') set vN[7*YA+6]=('A01H') call SaveStr(BYHT,yA,WA[YA],("")) call playerinit__Pav('H005') set vN[7*YA]=('A00K') call playerinit__PXv(2,'A075','A007') call playerinit__PXv(3,'A0EV','A00J') call playerinit__PXv(4,'A0ER','A015') call playerinit__PXv(5,'A0ET','A01J') call playerinit__PXv(6,'A0EU','A074') set vN[7*YA+6]=('A0FG') call SaveStr(BYHT,yA,WA[YA],("")) call playerinit__Pav('H002') set vN[7*YA]=('A0ZJ') call playerinit__PXv(2,'A0DL','A00Z') call playerinit__PXv(3,'A0DN','A01D') call playerinit__PXv(4,'A0DM','A010') call playerinit__PXv(5,'A0DO','A017') call playerinit__PXv(6,'A014','A011') set vN[7*YA+6]=('A00L') call SaveStr(BYHT,yA,WA[YA],("")) call playerinit__Pav('H006') set vN[7*YA]=('A00V') call playerinit__PXv(2,'A00X','A00W') call playerinit__PXv(3,'A016','A00Y') call playerinit__PXv(4,'A07H','A013') call playerinit__PXv(5,'A07D','A029') call playerinit__PXv(6,'A07L','A07J') set vN[7*YA+6]=('A07F') call SaveStr(BYHT,yA,WA[YA],("")) call playerinit__Pav('H01N') set vN[7*YA]=('A0N1') call playerinit__PXv(2,'A0AU','A0PN') call playerinit__PXv(3,'A0PQ','A0PS') call playerinit__PXv(4,'A0PR','A0PT') call playerinit__PXv(5,'A0PW','A0PZ') call playerinit__PXv(6,'A0PX','A0Q1') set vN[7*YA+6]=('A0PY') call SaveStr(BYHT,yA,WA[YA],("")) call playerinit__Pav('H015') set vN[7*YA]=('A0GC') call playerinit__PXv(2,'A0GD','A0GE') call playerinit__PXv(3,'A0GI','A0GJ') call playerinit__PXv(4,'A0GK','A0GS') call playerinit__PXv(5,'A0GL','A0GN') call playerinit__PXv(6,'A0GM','A0GV') set vN[7*YA+6]=('A0GW') call SaveStr(BYHT,yA,WA[YA],("")) call playerinit__Pav('H00Z') set vN[7*YA]=('A01N') call playerinit__PXv(2,'A0DI','A05W') call playerinit__PXv(3,'A0DG','A05Y') call playerinit__PXv(4,'A0DH','A060') call playerinit__PXv(5,'A0DJ','A061') call playerinit__PXv(6,'A0DK','A06A') set vN[7*YA+6]=('A06X') call SaveStr(BYHT,yA,WA[YA],("")) call playerinit__Pav('H01W') set vN[7*YA]=('A0XR') call playerinit__PXv(2,'A0YY','A0XS') call playerinit__PXv(3,'A0Z0','A0XT') call playerinit__PXv(4,'A0YS','A0XV') call playerinit__PXv(5,'A0ZC','A0XX') call playerinit__PXv(6,'A0Z7','A0XY') set vN[7*YA+6]=('A0XZ') call SaveStr(BYHT,yA,WA[YA],("")) call playerinit__Pav('H01V') set vN[7*YA]=('A100') call playerinit__PXv(2,'A0YW','A101') call playerinit__PXv(3,'A0YZ','A102') call playerinit__PXv(4,'A0Z4','A103') call playerinit__PXv(5,'A0ZD','A104') call playerinit__PXv(6,'A0Z8','A105') set vN[7*YA+6]=('A106') call SaveStr(BYHT,yA,WA[YA],("")) call playerinit__Pav('H01X') set vN[7*YA]=('A107') call playerinit__PXv(2,'A0YX','A108') call playerinit__PXv(3,'A0Z1','A109') call playerinit__PXv(4,'A0Z5','A10A') call playerinit__PXv(5,'A0ZB','A10B') call playerinit__PXv(6,'A0ZA','A10C') set vN[7*YA+6]=('A10D') call SaveStr(BYHT,yA,WA[YA],("")) call playerinit__Pav('H01Y') set vN[7*YA]=('A0Y6') call playerinit__PXv(2,'A0YQ','A0Y8') call playerinit__PXv(3,'A0YR','A0YA') call playerinit__PXv(4,'A0Z3','A0YE') call playerinit__PXv(5,'A0YT','A0YB') call playerinit__PXv(6,'A0YU','A0YC') set vN[7*YA+6]=('A0YF') call SaveStr(BYHT,yA,WA[YA],("")) call playerinit__Pav('H01U') set vN[7*YA]=('A0YG') call playerinit__PXv(2,'A0YV','A0YH') call playerinit__PXv(3,'A0Z2','A0YI') call playerinit__PXv(4,'A0Z6','A0YJ') call playerinit__PXv(5,'A0ZE','A0YL') call playerinit__PXv(6,'A0Z9','A0YO') set vN[7*YA+6]=('A0YN') call SaveStr(BYHT,yA,WA[YA],("")) call RegisterEvent(EVENT_PLAYER_HERO_SKILL,function playerinit__Piv) endfunction function playerinit__PJv takes nothing returns nothing call ShowInterface(true,.75) call BJDebugMsg("|c00ffd700Double click to select Hero.") call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:313") endfunction function playerinit__Pkv takes string s returns nothing call SaveBoolean(BYHT,(BN),StringHashBY(s),true) endfunction function playerinit__PKv takes string s,string Plv returns nothing call SaveStr(BYHT,(cN),StringHashBY(s),Plv) endfunction function playerinit_PLv takes nothing returns nothing local integer i=16 local integer j local boolean b=true set BN=malloc() set cN=malloc() call FogMaskEnable(true) call FogEnable(true) call SetFloatGameState(GAME_STATE_TIME_OF_DAY,3) call CameraSetSmoothingFactor(5) call SetPlayerHandicapXP(P[8],0) call SetPlayerHandicapXP(P[9],0) call SetPlayerHandicapXP(P[$A],0) call SetPlayerHandicapXP(P[$B],0) call ShowInterface(false,.1) call SaveBoolean(BYHT,(BN),StringHashBY(("放弃不在乎")),true) call SaveBoolean(BYHT,(BN),StringHashBY(("aa13016")),true) call SaveBoolean(BYHT,(BN),StringHashBY(("FFSJ_HBZY")),true) call SaveBoolean(BYHT,(BN),StringHashBY(("天地醉剑")),true) call SaveBoolean(BYHT,(BN),StringHashBY(("YUNA")),true) call SaveBoolean(BYHT,(BN),StringHashBY(("SunSSU")),true) call SaveBoolean(BYHT,(BN),StringHashBY(("Dynasty_Dark")),true) call playerinit__PKv("夏洛提亚","|cFF0099FF吓得我都飞了起来|r") call playerinit__PKv("Mr极光荣耀","|cFFFFFF00但求一睡君莫笑|r") call playerinit__PKv("黑色诡迹","|cFFFF0000圣灵第一|r") call playerinit__PKv("冰块的陷阱","|cFFFFFF00親愛なる主人|r") call playerinit__PKv("宛如青空灬","|cFFFF6633青空酱大胜利!|r") call playerinit__PKv("八云白莲","|cFFFF0000好棒!让我当你肉奴吧|r") call playerinit__PKv("孤城与王","|cFFCCCCCC脱非入欧|r") call playerinit__PKv("丶油水3000","|cFF993399我叫没的玩|r") call playerinit__PKv("lzx0601","|cFF000000孤独的封弊者|r") call playerinit__PKv("找唐林","|cFFFFFF33找不到唐林|r") call playerinit__PKv("孤独意志泪","|c00FF0000愚蠢的唐林|r") call playerinit__PKv("夜静待歌","|cFFFFFFFFTM熊的力量|r") call playerinit__PKv("往路丶","|cFFFFFFFF琪露诺最强|r") call playerinit__PKv("雨竹逸","|cFFFFFFFFTM鲸的力量|r") call playerinit__PKv("世界神054","|cFFFF0000补刀必黑|r") call playerinit__PKv("月神教教父","|cFFFFFF00点我ID充值鲸币|r") call playerinit__PKv("单车不迟到","|cFF9933FF骑车包邮,稳如泰山|r") call playerinit__PKv("DeachionGod","|cFFFFFF33Deach低调、奢华|r") //call playerinit__PKv("Wareditor","|cFFFFFF33Wareditor|r") call playerinit__PKv("q305395996","|cFFFF0000黑手大魔王|r") call playerinit__PKv("BCSG","|cFFFF0000撕逼旭你|r") call playerinit__PKv("666Crow666","|cFF009988ImmortalLegend|r") loop set i=i-1 set P[i]=Player(i) set Game_PlayerName[i]=GetPlayerName(P[i]) set Game_PlayerName[i+16]="" set j=StringHashBY(Game_PlayerName[i]) if HaveSavedBoolean(BYHT,(BN),j)then call RemovePlayer(P[i],PLAYER_GAME_RESULT_DEFEAT) elseif GetPlayerSlotState(P[i])==PLAYER_SLOT_STATE_PLAYING and GetPlayerController(P[i])==MAP_CONTROL_USER then set b=i<8 if b then set pV[i]=true set lV=lV+.025 set Player_Count=Player_Count+1 if HaveSavedString(BYHT,(cN),j)then set Game_PlayerName[i+16]="|cffffffff["+LoadStr(BYHT,(cN),j)+"]|r" call SetPlayerName(P[i],Game_PlayerName[i+16]+(system__kv[GetHandleId(GetPlayerColor((P[i])))])+Game_PlayerName[i]+"|r") endif call SetPlayerAlliance(P[i],P[8],ALLIANCE_PASSIVE,true) call SetPlayerAlliance(P[8],P[i],ALLIANCE_PASSIVE,true) endif elseif GetLocalPlayer()==P[i]then call FogMaskEnable(false) call FogEnable(false) endif exitwhen i==0 endloop if b then call TimerStart((NewTimer(0)),3.5,false,function playerinit__PJv) endif call SetPlayerAlliance(P[8],P[$F],ALLIANCE_PASSIVE,true) call SetPlayerAlliance(P[$F],P[8],ALLIANCE_PASSIVE,true) call SetPlayerAlliance(P[$B],P[$C],ALLIANCE_PASSIVE,true) call SetPlayerAlliance(P[$C],P[$B],ALLIANCE_PASSIVE,true) call SetPlayerAlliance(P[$B],P[$F],ALLIANCE_PASSIVE,true) call SetPlayerAlliance(P[$F],P[$B],ALLIANCE_PASSIVE,true) call free(BN) call free(cN) endfunction function QJv takes integer i returns nothing set Bo[i]=null if mV[i]!=null then call DestroyFogModifier(mV[i]) set mV[i]=null set mV[i+16]=null endif endfunction //init hero function Qkv takes integer i returns nothing if GetLocalPlayer()==P[i]then call ResetToGameCamera(0) call SetCameraBoundsToRect(bj_mapInitialPlayableArea) call PanCameraToTimed(jV,JV,0) call SetCameraField(CAMERA_FIELD_TARGET_DISTANCE,$8CA,0) call ClearSelection() call SelectUnit(MV[i],true) call EnableDragSelect(true,true) endif if GetPlayerState(P[i],PLAYER_STATE_RESOURCE_GOLD)==0 then call SetPlayerStateG(P[i],PLAYER_STATE_RESOURCE_GOLD,100) endif call MultiboardSetItemValueBY(TV,i+1,1,GetUnitName(MV[i])) call MultiboardSetItemValueBY(TV,i+1,2,"1") call MultiboardSetItemStyleBY(TV,i+1,1,true,true) call MultiboardSetItemIconBY(TV,i+1,1,LoadStr(BYHT,Hero_Arc,kc[(GetUnitUserData((MV[i])))])) call MultiboardSetItemValueBY(TV,i+1,2,I2S(Tc[(GetUnitUserData((MV[i])))])) if HaveSavedInteger(BYHT,sg,(QV[i]))then call CreateBag(((GetUnitUserData((MV[i])))),QV[i]) else call CreateBag(((GetUnitUserData((MV[i])))),0) endif call SetUnitState(MV[i],UNIT_STATE_MANA,GetUnitState(MV[i],UNIT_STATE_MAX_MANA)) call SetPlayerAlliance(P[$F],P[i],ALLIANCE_SHARED_VISION,false) call DestroyFogModifier(mV[i]) set mV[i+16]=CreateFogModifierRect(P[i],FOG_OF_WAR_VISIBLE,gg_rct_XSC___________000,false,false) set mV[i+32]=CreateFogModifierRect(P[i],FOG_OF_WAR_VISIBLE,gg_rct_BBMD______________000,false,false) call FogModifierStart(mV[i+16]) call FogModifierStart(mV[i+32]) set PlayerGameTimed[i+16]=R2I((100000.-TimerGetRemaining(GameTimer))) call QJv(i) set PV[i]=true set mV[i]=null endfunction function QKv takes nothing returns nothing local integer i=8 loop set i=i-1 call QJv(i) call SetPlayerAlliance(P[$F],P[i],ALLIANCE_SHARED_VISION,false) exitwhen i==0 endloop call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:314") call DestroyTimerDialog(bo) call DestroyTrigger(No) set No=null set bo=null endfunction //create hero function Qlv takes nothing returns boolean local unit u=GetTriggerUnit() local player p=GetTriggerPlayer() local integer i=GetPlayerId(p) local integer id local string n if IsPointInRect(GetUnitX(u),GetUnitY(u),gg_rct_YXMD_000)and not PV[i]then set id=GetUnitTypeId(u) if(100000.-TimerGetRemaining(GameTimer))>=Select_cd[i]then set Bo[i]=null set Select_cd[i]=(100000.-TimerGetRemaining(GameTimer))+.2 endif if Bo[i]!=u then set Bo[i]=u if GetLocalPlayer()==p then call ClearTextMessages() endif if(LoadStr(BYHT,yA,(id)))!=null then call DisplayTimedTextToPlayer(p,0,0,$A,(LoadStr(BYHT,yA,(id)))) endif else set MV[i]=CreateUnit(p,id,jV,JV,$E1) call DisplayTimedText("|c00ffff00"+GetPlayerName(p)+"|r|c006495ed: chose -|r "+GetUnitName(u),$A) call Qkv(i) endif endif set u=null set p=null return false endfunction function QLv takes nothing returns nothing call TimerStart(GetExpiredTimer(),300,false,function QKv) set bo=CreateTimerDialog(GetExpiredTimer()) call TimerDialogSetTitle(bo,"New Hero") call TimerDialogDisplay(bo,true) endfunction function Mzv takes integer NNv returns nothing local integer i=6 if Isaseniorbackpack(NNv)then set i=$C endif loop set i=i-1 if HaveSavedInteger(BYHT2,(zI[NNv]),i)then call RemoveItemG(ConvertVersion(LoadInteger(BYHT2,(zI[NNv]),i))) endif exitwhen i==0 endloop call RemoveUnitBJ((Je[YI[(NNv)]]),34) call free(zI[NNv]) set zI[NNv]=0 set YI[NNv]=0 endfunction function Qmv takes nothing returns boolean local unit u=MV[GetPlayerId(GetTriggerPlayer())] local integer MFv if Player_Count>0 then set Player_Count=Player_Count-1 endif if u!=null then set MFv=UnitInventorySize(u) set lV=lV-.025 call MultiboardSetItemIconBY(TV,GetPlayerId(GetTriggerPlayer())+1,0,"|c00808080Left|r") loop exitwhen MFv==0 set MFv=MFv-1 if UnitItemInSlot(u,MFv)!=null then call RemoveItemG(UnitItemInSlot(u,MFv)) endif endloop set MFv=8 loop set MFv=MFv-1 if MV[MFv]!=null then call RefreshHandicapXP(GetUnitUserData(MV[MFv])) endif exitwhen MFv==0 endloop call GroupEnumUnitsOfPlayer(G3,GetOwningPlayer(u),null) call GroupRemoveUnit(G3,u) call Mzv(GetUnitUserData(u)) call RemoveUnitBJ(u,35) loop set u=FirstOfGroup(G3) exitwhen u==null call GroupRemoveUnit(G3,u) if IsUnitType(u,UNIT_TYPE_MECHANICAL)then call KillUnit(u) endif endloop endif return false endfunction function QSv takes nothing returns nothing local trigger gzv=CreateTrigger() local integer i=8 call TimerStart((NewTimer(0)),.0,false,function QLv) loop set i=i-1 if pV[i]then set mV[i]=CreateFogModifierRect(P[i],FOG_OF_WAR_VISIBLE,gg_rct_YXMD_000,true,false) call TriggerRegisterPlayerUnitEvent(No,P[i],EVENT_PLAYER_UNIT_SELECTED,null) call TriggerRegisterPlayerEvent(gzv,P[i],EVENT_PLAYER_LEAVE) call FogModifierStart(mV[i]) endif exitwhen i==0 endloop call FogMaskEnable(true) call FogEnable(true) call EnableDragSelect(false,true) call SetMapFlag(MAP_FOG_HIDE_TERRAIN,true) call PanCameraToTimed(GetRectCenterX(gg_rct_YXMD_000),GetRectCenterY(gg_rct_YXMD_000),0) call TriggerAddCondition(gzv,Filter(function Qmv)) call TriggerAddCondition(No,Filter(function Qlv)) set gzv=null endfunction function GetPlayerName2 takes player p returns string local integer i=GetPlayerId(p) return Game_PlayerName[i+16]+(system__kv[GetHandleId(GetPlayerColor((p)))])+Game_PlayerName[i]+"|r" endfunction function PlayerChatEvent_2 takes nothing returns boolean local integer id=GetPlayerId(GetTriggerPlayer()) local string s=GetEventPlayerChatString() if DisplayChatopen[id]then if s=="-ofopen" then set DisplayChatopen[id]=false endif else if s=="-open" then set DisplayChatopen[id]=true endif endif if DisplayChatopen[GetPlayerId(GetLocalPlayer())]then call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,$A,GetPlayerName2(GetTriggerPlayer())+": "+s) endif return false endfunction function PlayerChatEvent_1 takes nothing returns nothing local integer i=0 local trigger trig=CreateTrigger() loop call TriggerRegisterPlayerChatEvent(trig,Player(i),"",false) set i=i+1 exitwhen i>$B endloop call TriggerAddCondition(trig,Condition(function PlayerChatEvent_2)) endfunction function playerinit_onInit takes nothing returns nothing call ExecuteFunc("playerinit_PLv") call playerinit__PAv() call QSv() call PlayerChatEvent_1() endfunction function CMe takes nothing returns integer local integer this=wt[0] if(this==0)then set Ut=Ut+1 set this=Ut else set wt[0]=wt[this] endif return this endfunction function Cpe takes unit u,integer Bcv returns nothing local integer NNv=LoadInteger(BYHT,Yt,Bcv) if NNv!=0 and jc[(GetUnitUserData((u)))]and HaveSavedString(BYHT,(Wt[NNv]),kc[(GetUnitUserData((u)))])then call DisplayTimedTextToPlayer(GetOwningPlayer(u),0,0,$A," "+GetUnitName(u)+"|c00ffff80 exclusive effect - "+LoadStr(BYHT,(Wt[NNv]),kc[(GetUnitUserData((u)))])) call DestroyEffect(AddSpecialEffectTarget("Enchantment.mdl",u,"origin")) endif endfunction function CPe takes integer Cqe returns nothing set vT=Cqe endfunction function SetExclusiveName takes string text returns nothing set ExclusiveName="|c00abfcda"+text+"|r |c00ffff80激活|r " endfunction function SetExclusiveNameByCustom takes string text returns nothing set ExclusiveName=text endfunction function WriteExclusiveTip takes string text returns nothing set ExclusiveTip=ExclusiveTip+"|c00ffff80"+text+"|r " endfunction function EndExclusiveTip takes nothing returns nothing call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) endfunction function StartExclusiveTip takes integer Bcv returns nothing if HaveSavedInteger(BYHT,Yt,Bcv)then set zt=LoadInteger(BYHT,Yt,Bcv) else set zt=CMe() set Wt[zt]=malloc() set yt[zt]=Bcv call SaveInteger(BYHT,Yt,Bcv,zt) endif set ExclusiveName="" set ExclusiveTip="" endfunction function zhuanshu__Init2 takes nothing returns nothing set Yt=malloc() set vT=('H000') call StartExclusiveTip('sbch') set ExclusiveName="|c00abfcda"+("魔力护盾 强化 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("魔力护盾破碎时会清除周围敌对单位的护盾效果并给与周围队友单位额外的25%生命值恢复效果.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('Hmkg') call StartExclusiveTip('I0D9') set ExclusiveName="|c00abfcda"+("死亡凋零 强化 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("持续性伤害 20%, 魔法防御力减少数值 4% 提升.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H003') call StartExclusiveTip('afac') set ExclusiveName="|c00abfcda"+("创世纪 强化 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("持续时间 1秒增加, 每次闪光几率给予敌人造成额外伤害.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) call StartExclusiveTip('cnhn') set ExclusiveName="|c00abfcda"+("创世纪 强化 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("持续时间 1秒增加, 每道波几率给予敌人造成额外伤害.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('Hblm') call StartExclusiveTip('hcun') set ExclusiveName="|c00abfcda"+("元素之力 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("元素之力加成的全属性和攻击力提高 50% 其他相关技能也得到增幅")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H001') call StartExclusiveTip('penr') set ExclusiveName="|c00abfcda"+("恩赐解脱 强化 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("连续使用次数 1次提升.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H004') call StartExclusiveTip('kpin') set ExclusiveName="|c00abfcda"+("伏击 强化 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("若在施法时当前生命值低于20%,那么将获得最到生命值15%的生命恢复")+"|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("强化BUFF,普攻增加12%额外伤害,持续时间内技能伤害提高6%.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H004') call StartExclusiveTip('penr') set ExclusiveName="|c00abfcda"+("暗影风暴 强化 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("增加一个暗影风暴区域.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H00E') call StartExclusiveTip('clsd') set ExclusiveName="|c00abfcda"+("超越·风之信仰 强化 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("持续时间内免疫部分秒杀效果,并且自身所受所有伤害-20%.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H00E') call StartExclusiveTip('I0D4') set ExclusiveName="|c00abfcda"+("超越极限 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("超越·风之信仰 持续时间增加1秒.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H00E') call StartExclusiveTip('sor5') set ExclusiveName="|c00abfcda"+("超越极限Lv.2 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("超越·风之信仰 持续时间增加2秒.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H00Z') call StartExclusiveTip('rin1') set ExclusiveName="|c00abfcda"+("流星箭雨 强化 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("施法时召唤4支箭矢轰击目标.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H00Z') call StartExclusiveTip('rde2') set ExclusiveName="|c00abfcda"+("心有灵犀 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("流星箭雨技能增强.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H00Z') call StartExclusiveTip('bspd') set ExclusiveName="|c00abfcda"+("凛冰散射 强化 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("连续施法时 召唤强力的冰冻箭矢.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H00Z') call StartExclusiveTip('tkno') set ExclusiveName="|c00abfcda"+("凛冰散射 强化 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("连续施法时 召唤极强力的冰冻箭矢.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H00Z') call StartExclusiveTip('sbok') set ExclusiveName="|c00abfcda"+("苍天神佑 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("缩短自然庇佑和风暴之力CD.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H015') call StartExclusiveTip('sor9') set ExclusiveName="|c00abfcda"+("诅咒之箭 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("狙击手的绝命狙击伤害15%提高,命中目标后给予目标4秒沉默阻止施法.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H015') call StartExclusiveTip('I0CU') set ExclusiveName="|c00abfcda"+("爆炎 强化 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("爆裂箭矢强化:充能次数额外加1,持续时间内移动速度上升")+"|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("泯灭·血海轮回强化:攻击释放箭矢增加3")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H015') call StartExclusiveTip('I0E6') set ExclusiveName="|c00abfcda"+("爆炎LV2 强化 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("|c00abfcda爆裂箭矢|r 强化")+"|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("爆裂箭矢填充数量+2")+"|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("|c00abfcda绝命狙击|r 强化")+"|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("绝命狙击附加爆裂箭矢时伤害+10% ")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H007') call StartExclusiveTip('rej5') set ExclusiveName="|c00abfcda"+("深渊庇佑 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("释放技能和治疗时增强盟军给予深渊之力暗属性,")+"|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("同时增强召唤物,使下次攻击附加深渊之力暗属性.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H007') call StartExclusiveTip('I0ED') set ExclusiveName="|c00abfcda"+("圣光的祝福 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("|c00abfcda神圣之光|r 强化")+"|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("使用神圣之光对敌人造成伤害时额外附加1秒的眩晕效果")+"|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("|c00abfcda咏叹·天神领域|r 强化")+"|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("咏叹·天神领域效果范围增加30%持续时间+5秒")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H008') call StartExclusiveTip('rwiz') set ExclusiveName="|c00abfcda"+("咆哮的灵魂 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("激活亚马罗斯的技能-咆哮的灵魂.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H002') call StartExclusiveTip('I0B4') set ExclusiveName="|c00abfcda"+("冰川护甲 强化 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("冰川护甲爆炸半径增加,并给予智力x40的追加伤害.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H002') call StartExclusiveTip('I0D1') set ExclusiveName="|c00abfcda"+("冰霜之手 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("冰霜碎片: 如果该单位被冻结,则受到的伤害 350%-500%提高")+"|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("冰霜新星: 如果该单位被减速,所受伤害100%提高。若单位被冻结,冻结时间提高0.5秒")+"|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("永恒·冰河世纪: 冰冻后的伤害提高15%-20%")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H002') call StartExclusiveTip('dkfw') set ExclusiveName="|c00abfcda"+("永恒冻结")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("|c00abfcda冰河宝珠|r 强化 |c00ffff80激活|r")+"|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("冰河宝珠减速范围+30% 击碎冰河宝珠是伤害+30% ")+"|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("|c00abfcda永恒·冰河世纪|r 强化")+"|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("释放永恒·冰河世纪 是冻结持续时间+3秒 并增加自身1000点智力 持续5秒")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H006') call StartExclusiveTip('lhst') set ExclusiveName="|c00abfcda"+("月神赐福 强化 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("施法后5秒内提高技能伤害10%、每秒生命恢复速度+100(可叠加).")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H006') call StartExclusiveTip('k3m3') set ExclusiveName="|c00abfcda"+("天谴·祈愿流星 强化 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("伤害提高8%,持续时间提高2秒.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H01N') call StartExclusiveTip('odef') set ExclusiveName="|c00abfcda"+("温顺驭风术 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("风神祝福/风神挽歌精灵生成概率5% 提升.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H01N') call StartExclusiveTip('rej6') set ExclusiveName="|c00abfcda"+("风的呐喊 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("风神祝福/风神挽歌精灵生成概率5% 提升.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H01N') call StartExclusiveTip('lhst') set ExclusiveName="|c00abfcda"+("仙女祝福 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("释放抃风儛润技能时触发 最多生命值15%恢复.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H009') call StartExclusiveTip('odef') set ExclusiveName="|c00abfcda"+("温顺驭风术 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("风神祝福/风神挽歌精灵生成概率5% 提升.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H009') call StartExclusiveTip('rej6') set ExclusiveName="|c00abfcda"+("温顺驭风术 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("风神祝福/风神挽歌精灵生成概率5% 提升.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H00J') call StartExclusiveTip('bzbe') set ExclusiveName="|c00abfcda"+("魔力溢满 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("增加巫术师魔法恢复速度 50%, [释放:恶魔之书]: 技能伤害50% 提升.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H01I') call StartExclusiveTip('I0CG') set ExclusiveName="|c00abfcda"+("药剂炼制 强化 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("各药剂生成概率 3%的提升.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H01I') call StartExclusiveTip('evtl') set ExclusiveName="|c00abfcda"+("鹰之炼金 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("当使用个元素之力时各药剂生成概率 10%的提升.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H01I') call StartExclusiveTip('I082') set ExclusiveName="|c00abfcda"+("熔岩傀儡 强化 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("熔岩傀儡增大, 生命值和魔法值15%同时提升.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H01I') call StartExclusiveTip('I0DH') set ExclusiveName="|c00abfcda"+("熔岩傀儡 强化 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("熔岩傀儡增大, 生命值和魔法值5000 + 15%同时提升.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H01I') call StartExclusiveTip('I0DI') set ExclusiveName="|c00abfcda"+("熔岩傀儡 强化 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("熔岩傀儡增大, 生命值和魔法值7500 + 20%同时提升. 给予熔岩傀儡周围友军恢复速度提升.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H005') call StartExclusiveTip('srtl') set ExclusiveName="|c00abfcda"+("火焰增幅 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("释放圣炎球时伤害 75%提升.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H00H') call StartExclusiveTip('I0C9') set ExclusiveName="|c00abfcda"+("狂暴 强化 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("狂暴持续时间内免疫秒杀伤害.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H00H') call StartExclusiveTip('I0FC') set ExclusiveName="|c00abfcda"+("狂暴Lv2 强化 |c00ffff80激活|r")+"|r |c00ffff80激活|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("狂暴持续时间内免疫秒杀伤害持续时间内额外增加自身15%技能伤害.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) set vT=('H005') call StartExclusiveTip('I0DR') set ExclusiveName=("|c00abfcda陨石碎片 强化|r |c00ffff80激活|r ") set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("释放陨石碎片时碎片数量+3并增加5%伤害.")+"|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("|c00abfcda降临·圣焱劫星|r 强化|r |c00ffff80激活|r")+"|r " set ExclusiveTip=ExclusiveTip+"|c00ffff80"+("降临·圣焱劫星陨石爆炸时伤害10%并增加300码的范围.")+"|r " call SaveStr(BYHT,(Wt[zt]),vT,ExclusiveName+ExclusiveTip) endfunction function zhuanshu__kFv takes integer c,integer id returns nothing call SaveInteger(BYHT,kR,id,c) endfunction function zhuanshu__Init1 takes nothing returns nothing set kR=malloc() call zhuanshu__kFv(1,'I01X') call zhuanshu__kFv(1,'I0GE') call zhuanshu__kFv(1,'I02L') call zhuanshu__kFv(1,'I03J') call zhuanshu__kFv(1,'I03N') call zhuanshu__kFv(1,'I03W') call zhuanshu__kFv(1,'I03Y') call zhuanshu__kFv(1,'I048') call zhuanshu__kFv(1,'I06Y') call zhuanshu__kFv(1,'I077') call zhuanshu__kFv(1,'I0A5') call zhuanshu__kFv(1,'I0BL') call zhuanshu__kFv(1,'I0H8') call zhuanshu__kFv(2,'I0GF') call zhuanshu__kFv(2,'I026') call zhuanshu__kFv(2,'I037') call zhuanshu__kFv(2,'I03E') call zhuanshu__kFv(2,'I03S') call zhuanshu__kFv(2,'I05O') call zhuanshu__kFv(2,'I042') call zhuanshu__kFv(2,'I05B') call zhuanshu__kFv(2,'I06Z') call zhuanshu__kFv(2,'I079') call zhuanshu__kFv(2,'I0A6') call zhuanshu__kFv(2,'I0BM') call zhuanshu__kFv(2,'I0GF') call zhuanshu__kFv(2,'I0CH') call zhuanshu__kFv(2,'I0BM') call zhuanshu__kFv(2,'I0FP') call zhuanshu__kFv(3,'I07B') call zhuanshu__kFv(3,'I07I') call zhuanshu__kFv(3,'I07J') call zhuanshu__kFv(3,'I080') call zhuanshu__kFv(3,'I086') call zhuanshu__kFv(3,'I08H') call zhuanshu__kFv(3,'I0CN') call zhuanshu__kFv(3,'kpin') call zhuanshu__kFv(3,'gobm') call zhuanshu__kFv(3,'gopr') call zhuanshu__kFv(3,'rat3') call zhuanshu__kFv(3,'sor3') call zhuanshu__kFv(4,'I0GC') call zhuanshu__kFv(4,'I01Y') call zhuanshu__kFv(4,'I02M') call zhuanshu__kFv(4,'I03K') call zhuanshu__kFv(4,'I03O') call zhuanshu__kFv(4,'I055') call zhuanshu__kFv(4,'I044') call zhuanshu__kFv(4,'I05C') call zhuanshu__kFv(4,'I070') call zhuanshu__kFv(4,'I078') call zhuanshu__kFv(4,'I07R') call zhuanshu__kFv(4,'I07S') call zhuanshu__kFv(4,'I081') call zhuanshu__kFv(4,'I085') call zhuanshu__kFv(4,'I08G') call zhuanshu__kFv(4,'I0A7') call zhuanshu__kFv(4,'I0BN') call zhuanshu__kFv(4,'I0C9') call zhuanshu__kFv(4,'afac') call zhuanshu__kFv(4,'ajen') call zhuanshu__kFv(4,'bgst') call zhuanshu__kFv(4,'ckng') call zhuanshu__kFv(4,'cnhn') call zhuanshu__kFv(4,'gmfr') call zhuanshu__kFv(4,'hcun') call zhuanshu__kFv(4,'pgin') call zhuanshu__kFv(4,'phlt') call zhuanshu__kFv(4,'rhth') call zhuanshu__kFv(4,'sehr') call zhuanshu__kFv(4,'shcw') call zhuanshu__kFv(4,'sorf') call zhuanshu__kFv(4,'thle') call zhuanshu__kFv(4,'I00E') call zhuanshu__kFv(4,'I0DU') call zhuanshu__kFv(4,'I0DV') call zhuanshu__kFv(4,'I0DZ') call zhuanshu__kFv(4,'I0FC') call zhuanshu__kFv(5,'spsh') call zhuanshu__kFv(5,'lgdh') call zhuanshu__kFv(5,'I0GI') call zhuanshu__kFv(5,'I0GK') call zhuanshu__kFv(5,'I02G') call zhuanshu__kFv(5,'I03B') call zhuanshu__kFv(5,'I03I') call zhuanshu__kFv(5,'I03R') call zhuanshu__kFv(5,'I03X') call zhuanshu__kFv(5,'I040') call zhuanshu__kFv(5,'I049') call zhuanshu__kFv(5,'I074') call zhuanshu__kFv(5,'I07D') call zhuanshu__kFv(5,'I07K') call zhuanshu__kFv(5,'I07U') call zhuanshu__kFv(5,'I07W') call zhuanshu__kFv(5,'I088') call zhuanshu__kFv(5,'I08C') call zhuanshu__kFv(5,'I02H') call zhuanshu__kFv(5,'I03C') call zhuanshu__kFv(5,'I03L') call zhuanshu__kFv(5,'I03U') call zhuanshu__kFv(5,'I054') call zhuanshu__kFv(5,'I046') call zhuanshu__kFv(5,'I05F') call zhuanshu__kFv(5,'I075') call zhuanshu__kFv(5,'I07E') call zhuanshu__kFv(5,'I07O') call zhuanshu__kFv(5,'I07N') call zhuanshu__kFv(5,'I07X') call zhuanshu__kFv(5,'I07Y') call zhuanshu__kFv(5,'I089') call zhuanshu__kFv(5,'I08R') call zhuanshu__kFv(5,'I0A1') call zhuanshu__kFv(5,'I0A3') call zhuanshu__kFv(5,'I0AD') call zhuanshu__kFv(5,'I08X') call zhuanshu__kFv(5,'I06D') call zhuanshu__kFv(5,'I0BU') call zhuanshu__kFv(5,'I0BW') call zhuanshu__kFv(5,'I0C0') call zhuanshu__kFv(5,'I0C4') call zhuanshu__kFv(5,'I0C6') call zhuanshu__kFv(5,'I0CO') call zhuanshu__kFv(5,'I0CP') call zhuanshu__kFv(5,'I0CR') call zhuanshu__kFv(5,'azhr') call zhuanshu__kFv(5,'clsd') call zhuanshu__kFv(5,'dthb') call zhuanshu__kFv(5,'esaz') call zhuanshu__kFv(5,'jpnt') call zhuanshu__kFv(5,'k3m1') call zhuanshu__kFv(5,'ktrm') call zhuanshu__kFv(5,'rde3') call zhuanshu__kFv(5,'sbch') call zhuanshu__kFv(5,'I00C') call zhuanshu__kFv(5,'sor5') call zhuanshu__kFv(5,'I0E0') call zhuanshu__kFv(5,'I0E1') call zhuanshu__kFv(5,'I0F9') call zhuanshu__kFv(5,'moon') call zhuanshu__kFv(5,'pinv') call zhuanshu__kFv(6,'I02F') call zhuanshu__kFv(6,'I038') call zhuanshu__kFv(6,'I03H') call zhuanshu__kFv(6,'I03T') call zhuanshu__kFv(6,'I05J') call zhuanshu__kFv(6,'I045') call zhuanshu__kFv(6,'I05D') call zhuanshu__kFv(6,'I071') call zhuanshu__kFv(6,'I07A') call zhuanshu__kFv(6,'I07T') call zhuanshu__kFv(6,'I07Q') call zhuanshu__kFv(6,'I082') call zhuanshu__kFv(6,'I087') call zhuanshu__kFv(6,'I08I') call zhuanshu__kFv(6,'I08M') call zhuanshu__kFv(6,'I096') call zhuanshu__kFv(6,'I0A2') call zhuanshu__kFv(6,'I0A8') call zhuanshu__kFv(6,'I0AJ') call zhuanshu__kFv(6,'I0BP') call zhuanshu__kFv(6,'I0CA') call zhuanshu__kFv(6,'I0CC') call zhuanshu__kFv(6,'I0CM') call zhuanshu__kFv(6,'I0DH') call zhuanshu__kFv(6,'I0DI') call zhuanshu__kFv(6,'belv') call zhuanshu__kFv(6,'kybl') call zhuanshu__kFv(6,'sksh') call zhuanshu__kFv(6,'ram4') call zhuanshu__kFv(6,'ratf') call zhuanshu__kFv(6,'rat6') call zhuanshu__kFv(6,'rde4') call zhuanshu__kFv(6,'rej4') call zhuanshu__kFv(6,'rej5') call zhuanshu__kFv(6,'rwiz') call zhuanshu__kFv(6,'hval') call zhuanshu__kFv(6,'I02J') call zhuanshu__kFv(6,'I0GB') call zhuanshu__kFv(6,'I0GH') call zhuanshu__kFv(6,'I0GJ') call zhuanshu__kFv(6,'I039') call zhuanshu__kFv(6,'I03F') call zhuanshu__kFv(6,'I03Q') call zhuanshu__kFv(6,'I05E') call zhuanshu__kFv(6,'I041') call zhuanshu__kFv(6,'I059') call zhuanshu__kFv(6,'I072') call zhuanshu__kFv(6,'I07C') call zhuanshu__kFv(6,'I07L') call zhuanshu__kFv(6,'I083') call zhuanshu__kFv(6,'I08D') call zhuanshu__kFv(6,'I02I') call zhuanshu__kFv(6,'I03D') call zhuanshu__kFv(6,'I03M') call zhuanshu__kFv(6,'I03V') call zhuanshu__kFv(6,'I05M') call zhuanshu__kFv(6,'I047') call zhuanshu__kFv(6,'I05G') call zhuanshu__kFv(6,'I076') call zhuanshu__kFv(6,'I07F') call zhuanshu__kFv(6,'I07M') call zhuanshu__kFv(6,'I07P') call zhuanshu__kFv(6,'I084') call zhuanshu__kFv(6,'I08E') call zhuanshu__kFv(6,'I0A4') call zhuanshu__kFv(6,'I0AE') call zhuanshu__kFv(6,'I0AV') call zhuanshu__kFv(6,'I0BV') call zhuanshu__kFv(6,'I0BX') call zhuanshu__kFv(6,'I0CL') call zhuanshu__kFv(6,'I0CS') call zhuanshu__kFv(6,'ches') call zhuanshu__kFv(6,'dkfw') call zhuanshu__kFv(6,'lhst') call zhuanshu__kFv(6,'rump') call zhuanshu__kFv(6,'sor6') call zhuanshu__kFv(6,'sor7') call zhuanshu__kFv(6,'sor8') call zhuanshu__kFv(6,'ward') call zhuanshu__kFv(6,'will') call zhuanshu__kFv(6,'wtlg') call zhuanshu__kFv(6,'I009') call zhuanshu__kFv(6,'I00D') call zhuanshu__kFv(6,'I0DR') call zhuanshu__kFv(6,'I0FA') call zhuanshu__kFv(6,'I0F8') call zhuanshu__kFv(6,'I0E9') call zhuanshu__kFv(6,'I0F3') call zhuanshu__kFv(6,'I0E4') call zhuanshu__kFv(6,'I0FL') call zhuanshu__kFv(6,'tret') call zhuanshu__kFv(7,'prvt') call zhuanshu__kFv(7,'I09C') call zhuanshu__kFv(7,'I0GD') call zhuanshu__kFv(7,'I09B') call zhuanshu__kFv(7,'I09H') call zhuanshu__kFv(7,'I09K') call zhuanshu__kFv(7,'I09J') call zhuanshu__kFv(7,'I09I') call zhuanshu__kFv(7,'I09L') call zhuanshu__kFv(7,'I09E') call zhuanshu__kFv(7,'I09F') call zhuanshu__kFv(7,'I09D') call zhuanshu__kFv(7,'I09M') call zhuanshu__kFv(7,'I09O') call zhuanshu__kFv(7,'I09Q') call zhuanshu__kFv(7,'I09P') call zhuanshu__kFv(7,'I09S') call zhuanshu__kFv(7,'I09T') call zhuanshu__kFv(7,'I0A9') call zhuanshu__kFv(7,'I0BO') call zhuanshu__kFv(7,'I0CU') call zhuanshu__kFv(7,'I0D6') call zhuanshu__kFv(7,'bspd') call zhuanshu__kFv(7,'rde2') call zhuanshu__kFv(7,'rin1') call zhuanshu__kFv(7,'sbok') call zhuanshu__kFv(7,'skrt') call zhuanshu__kFv(7,'sor9') call zhuanshu__kFv(7,'tkno') call zhuanshu__kFv(7,'I05H') call zhuanshu__kFv(7,'I0E5') call zhuanshu__kFv(7,'I0EC') call zhuanshu__kFv(7,'I0F7') call zhuanshu__kFv(8,'I067') call zhuanshu__kFv(8,'I08L') call zhuanshu__kFv(8,'I05U') call zhuanshu__kFv(8,'I098') call zhuanshu__kFv(8,'I0BQ') call zhuanshu__kFv(8,'I0C1') call zhuanshu__kFv(8,'I0C9') call zhuanshu__kFv(8,'kysn') call zhuanshu__kFv(8,'pmna') call zhuanshu__kFv(8,'ratc') call zhuanshu__kFv(8,'tgxp') call zhuanshu__kFv(8,'I0DT') call zhuanshu__kFv(8,'I0DX') call zhuanshu__kFv(8,'I0E2') call zhuanshu__kFv(8,'I0E7') call zhuanshu__kFv(8,'I0EV') call zhuanshu__kFv(8,'I0EW') call zhuanshu__kFv(8,'I0FM') call zhuanshu__kFv(8,'I0HO') call zhuanshu__kFv(8,'I0CT') call zhuanshu__kFv(8,'I0H8') call zhuanshu__kFv(9,'odef') call zhuanshu__kFv(9,'rej6') call zhuanshu__kFv(9,'I0HP') call zhuanshu__kFv($A,'I0H0') call zhuanshu__kFv($A,'I0H1') call zhuanshu__kFv($A,'I0GY') call zhuanshu__kFv($A,'I0HO') call zhuanshu__kFv($A,'I0GZ') call zhuanshu__kFv($A,'I0GT') call zhuanshu__kFv($A,'I0GU') call zhuanshu__kFv($A,'I0GA') call zhuanshu__kFv($A,'I0GG') call zhuanshu__kFv($A,'I0GS') call zhuanshu__kFv($A,'I0GX') call zhuanshu__kFv($A,'I0GW') call zhuanshu__kFv($A,'I0GV') call zhuanshu__kFv($A,'skul') call zhuanshu__kFv($A,'tcas') call zhuanshu__kFv($A,'tsct') call zhuanshu__kFv($A,'plcl') call zhuanshu__kFv($A,'vamp') call zhuanshu__kFv($A,'shas') call zhuanshu__kFv($A,'rnec') call zhuanshu__kFv($A,'I0H2') call zhuanshu__kFv($B,'I0CB') endfunction function kGv takes integer khv,integer kHv returns boolean local integer i local integer k if HaveSavedInteger(BYHT,kR,kHv)then set i=LoadInteger(BYHT,kR,kHv) if HaveSavedInteger(BYHT,kR_v,khv)then set k=LoadInteger(BYHT,kR_v,khv) return ModuloInteger(k/ Pow2n[i],2)==1 endif endif return true endfunction function zhuanshu__Init3 takes nothing returns nothing set kR_v=malloc() call SaveInteger(BYHT,kR_v,'H000',Pow2n[4]+Pow2n[5]+Pow2n[8]+Pow2n[9]) call SaveInteger(BYHT,kR_v,'H001',Pow2n[1]+Pow2n[3]+Pow2n[5]+Pow2n[8]+Pow2n[9]) call SaveInteger(BYHT,kR_v,'H002',Pow2n[6]+Pow2n[9]) call SaveInteger(BYHT,kR_v,'H003',Pow2n[4]+Pow2n[5]+Pow2n[8]+Pow2n[9]) call SaveInteger(BYHT,kR_v,'H004',Pow2n[1]+Pow2n[3]+Pow2n[5]+Pow2n[8]+Pow2n[9]) call SaveInteger(BYHT,kR_v,'H005',Pow2n[6]+Pow2n[9]) call SaveInteger(BYHT,kR_v,'H006',Pow2n[6]+Pow2n[9]) call SaveInteger(BYHT,kR_v,'H007',Pow2n[6]+Pow2n[9]) call SaveInteger(BYHT,kR_v,'H008',Pow2n[6]+Pow2n[9]) call SaveInteger(BYHT,kR_v,'H009',Pow2n[6]+Pow2n[9]) call SaveInteger(BYHT,kR_v,'H00E',Pow2n[2]+Pow2n[3]+Pow2n[5]+Pow2n[8]+Pow2n[9]) call SaveInteger(BYHT,kR_v,'H00H',Pow2n[4]+Pow2n[5]+Pow2n[8]+Pow2n[9]) call SaveInteger(BYHT,kR_v,'H00J',Pow2n[6]+Pow2n[9]) call SaveInteger(BYHT,kR_v,'H00Z',Pow2n[5]+Pow2n[7]+Pow2n[9]+Pow2n[$B]) call SaveInteger(BYHT,kR_v,'H015',Pow2n[5]+Pow2n[7]+Pow2n[9]+Pow2n[$B]) call SaveInteger(BYHT,kR_v,'H01H',Pow2n[1]+Pow2n[3]+Pow2n[4]+Pow2n[5]+Pow2n[8]+Pow2n[9]) call SaveInteger(BYHT,kR_v,'H01I',Pow2n[6]+Pow2n[9]) call SaveInteger(BYHT,kR_v,'H01N',Pow2n[6]+Pow2n[9]) call SaveInteger(BYHT,kR_v,'H01U',Pow2n[2]+Pow2n[3]+Pow2n[5]+Pow2n[8]+Pow2n[9]) call SaveInteger(BYHT,kR_v,'H01V',Pow2n[1]+Pow2n[3]+Pow2n[4]+Pow2n[5]+Pow2n[8]+Pow2n[9]) call SaveInteger(BYHT,kR_v,'H01W',Pow2n[5]+Pow2n[$A]+Pow2n[$B]+Pow2n[9]) call SaveInteger(BYHT,kR_v,'H01X',Pow2n[6]+Pow2n[9]) call SaveInteger(BYHT,kR_v,'H01Y',Pow2n[6]+Pow2n[9]) call SaveInteger(BYHT,kR_v,'Hblm',Pow2n[4]+Pow2n[5]+Pow2n[8]+Pow2n[9]) call SaveInteger(BYHT,kR_v,'Hmkg',Pow2n[4]+Pow2n[5]+Pow2n[8]+Pow2n[9]) endfunction function zhuanshu__onInit takes nothing returns nothing call zhuanshu__Init1() call zhuanshu__Init2() call zhuanshu__Init3() endfunction function GetEquipType takes integer itemid returns integer return LoadInteger(BYHT,Equip_Type_t,itemid) endfunction function GetEquipModelName takes integer itemid returns string return LoadStr(BYHT,(Equip_Mode_t),2*itemid) endfunction function GetEquipModelAddName takes integer itemid returns string return LoadStr(BYHT,(Equip_Mode_t),2*itemid+1) endfunction function IsEquipLv takes integer itemid,integer lv returns boolean return lv>=(LoadInteger(BYHT,Equip_Lv_t,itemid)) endfunction function EquipAppModel takes integer u,integer itemid,boolean b returns nothing local integer slot=EquipSlot[u] local integer typeid local integer key local string s local string a if slot==null then return endif set typeid=LoadInteger(BYHT,Equip_Type_t,itemid) set key=EquipSlot_id_f[slot]+typeid if EquipModel[key]!=0 then call DestroyEffectBY(EquipModel[key]) set EquipModel[key]=0 endif if EquipSlot_Use[key]and b then set s=(LoadStr(BYHT,(Equip_Mode_t),2*(itemid))) set a=(LoadStr(BYHT,(Equip_Mode_t),2*(itemid)+1)) set EquipModel[key]=(s__Effect_build(AddSpecialEffectTarget((s),((Je[(u)])),(a)))) endif endfunction function IsEquipSlotUse takes integer data,integer itemid,boolean SDv returns boolean local integer slot=EquipSlot[data] local integer key=EquipSlot_id_f[slot]+LoadInteger(BYHT,Equip_Type_t,itemid) local boolean b=EquipSlot_Use[key] if SDv!=b then if SDv then set EquipSlot_id[key]=itemid call SaveBoolean(BYHT,EquipSlot_R[slot],itemid,true) call SaveInteger(BYHT2,EquipSlot_R[slot],itemid,GetHandleId(LasManipulatedEquip)) else if EquipSlot_id[key]==itemid then set EquipSlot_id[key]=0 call RemoveSavedBoolean(BYHT,EquipSlot_R[slot],itemid) call RemoveSavedInteger(BYHT2,EquipSlot_R[slot],itemid) else return false endif endif set EquipSlot_Use[key]=SDv endif return b endfunction function GetHeroEquipSlot takes integer id,integer i returns integer local integer slot=EquipSlot[id] if slot==0 or i<0 or i>=EquipSlot_id_z then return 0 endif return EquipSlot_id[EquipSlot_id_f[slot]+i] endfunction function HeroHasEquipOfType takes integer data,integer itemid returns boolean return LoadBoolean(BYHT,EquipSlot_R[EquipSlot[data]],itemid) endfunction function GetEquipOfTypeFromHero takes integer data,integer itemid returns item return ConvertVersion(LoadInteger(BYHT2,EquipSlot_R[EquipSlot[data]],itemid)) endfunction function UnitDiscardeditems takes unit u,item i returns nothing set sr=false call UnitRemoveItem(u,i) set sr=true endfunction function IsChargedItem takes unit u,item s returns nothing local integer MFv=UnitInventorySize(u) local integer i=GetItemTypeIdG(s) local item mkv local integer yav local integer data loop set MFv=MFv-1 set mkv=UnitItemInSlot(u,MFv) if GetItemTypeIdG(mkv)==i and mkv!=s then call SetItemChargesG(mkv,GetItemChargesG(mkv)+GetItemChargesG(s)) if LoadBoolean(BYHT,Item_save_Charges,i)then call ExtendsItemChargesG(mkv,s) endif call RemoveItemG(s) set mkv=null return endif exitwhen MFv==0 endloop if GetUnitAbilityLevel(u,'A04P')>0 then set yav=(GetUnitUserData((MV[GetPlayerId(GetOwningPlayer(u))]))) if Isaseniorbackpack(yav)then set MFv=$C else set MFv=6 endif loop set MFv=MFv-1 if HaveSavedInteger(BYHT2,(zI[yav]),MFv)then set mkv=ConvertVersion(LoadInteger(BYHT2,(zI[yav]),MFv)) if GetItemTypeIdG(mkv)==i then call ttv((Je[(YI[yav])]),GetItemName(mkv)+"|c00ffff80Was placed in another backpack slot.") call SetItemChargesG(mkv,GetItemChargesG(mkv)+GetItemChargesG(s)) if LoadBoolean(BYHT,Item_save_Charges,i)then call ExtendsItemChargesG(mkv,s) endif call RemoveItemG(s) set mkv=null return endif endif exitwhen MFv==0 endloop endif if LoadBoolean(BYHT,Item_save_Charges,i)then set data=GetHandleId(s)*$A if HaveSavedInteger(BYHT,Item_save_Charges,data)==false then call SaveInteger(BYHT,Item_save_Charges,data,GetItemChargesG(s)) endif endif set mkv=null endfunction function EquipState__ynv takes nothing returns boolean local integer id=(GetUnitUserData((GetTriggerUnit()))) local integer itemid local integer d local integer h local integer lastype=LasManipulatedEquipTypeId set LasManipulatedEquip=GetManipulatedItem() set LasManipulatedEquipTypeId=GetItemTypeIdG(LasManipulatedEquip) set itemid=LasManipulatedEquipTypeId if itemid!=GetItemTypeId(LasManipulatedEquip)or itemid==0 then set sr=false call RemoveItemG(LasManipulatedEquip) set sr=true set LasManipulatedEquipTypeId=lastype return false endif set d=GetItemUserData(LasManipulatedEquip) if d!=0 then if d!=$F and d!=GetPlayerId(GetOwningPlayer((Je[(id)])))+1 then call DisplayTimedTextToPlayer(GetOwningPlayer((Je[(id)])),0,0,5,"This equipment|c00FF0000 bound|r to other players") call UnitDiscardeditems((Je[(id)]),LasManipulatedEquip) set LasManipulatedEquipTypeId=lastype return false endif endif if not HaveSavedInteger(BYHT,Equip_Type_t,itemid)then if GetItemChargesG(LasManipulatedEquip)>0 then call IsChargedItem((Je[(id)]),LasManipulatedEquip) endif else if EquipSlot[id]!=null then if kGv(kc[(id)],itemid)then if GetHeroLevel((Je[(id)]))>=LoadInteger(BYHT,Equip_Lv_t,itemid)then if IsEquipSlotUse((id),itemid,true)then call UnitDiscardeditems((Je[(id)]),LasManipulatedEquip) set LasManipulatedEquipTypeId=lastype return false endif if d==0 and GetItemType(LasManipulatedEquip)==ITEM_TYPE_ARTIFACT then call SetItemUserData(LasManipulatedEquip,Kc[(id)]+1) endif call ModifyHeroProperties((id),LoadInteger(BYHT,Equip_zhushuxing_t,itemid)) call ModifyUnitAttack((id),LoadInteger(BYHT,Equip_Attack_t,itemid)) call ModifyUnitArmor((id),LoadInteger(BYHT,Equip_Armor_t,itemid)) call ModifyHeroStr((id),LoadInteger(BYHT,Equip_Str_t,itemid)) call ModifyHeroAgi((id),LoadInteger(BYHT,Equip_Agi_t,itemid)) call ModifyHeroInt((id),LoadInteger(BYHT,Equip_Int_t,itemid)) call ModifyUnitAttackSpeed((id),LoadInteger(BYHT,Equip_ASPD_t,itemid)) call ModifyUnitHP((id),LoadInteger(BYHT,Equip_HP_t,itemid)) call ModifyUnitMP((id),LoadInteger(BYHT,Equip_MP_t,itemid)) call ModifyUnitHpRegen((id),LoadReal(BYHT,(Equip_HpRegen_t),itemid)) call ModifyUnitMpRegen((id),LoadReal(BYHT,(Equip_MpRegen_t),itemid)) if HaveSavedReal(BYHT,(Equip_MDG_t),itemid)then call ModifyUnitMagicDamage((id),LoadReal(BYHT,(Equip_MDG_t),itemid)) call ModifyUnitCrit((id),LoadReal(BYHT,(Equip_Crit_t),itemid)) call ModifyUnitCritDamage((id),LoadReal(BYHT,(Equip_CDG_t),itemid)) call ModifyUnitPersistentDamage((id),LoadReal(BYHT,(Equip_DOT_t),itemid)) if HaveSavedReal(BYHT,(Equip_MDEF_t),itemid)then call SaveInteger(BYHT,Equip_MDEF_t,GetHandleId(LasManipulatedEquip),ModifyUnitMdef((id),LoadReal(BYHT,(Equip_MDEF_t),itemid))) endif if HaveSavedReal(BYHT,(Equip_Dodge_t),itemid)then call SaveInteger(BYHT,Equip_Dodge_t,GetHandleId(LasManipulatedEquip),ModifyUnitDodge((id),LoadReal(BYHT,(Equip_Dodge_t),itemid))) endif if HaveSavedReal(BYHT,(Equip_ADEF_t),itemid)then call SaveInteger(BYHT,Equip_ADEF_t,GetHandleId(LasManipulatedEquip),ModifyUnitAdef((id),LoadReal(BYHT,(Equip_ADEF_t),itemid))) endif if HaveSavedReal(BYHT,(Equip_BCR_t),itemid)then call SaveInteger(BYHT,Equip_BCR_t,GetHandleId(LasManipulatedEquip),ModifyUnitBeCureRatio((id),LoadReal(BYHT,(Equip_BCR_t),itemid))) endif endif if HaveSavedReal(BYHT,(Equip_Property_Damage_t),7*itemid)then call ModifyUnitFireDamage((id),LoadReal(BYHT,(Equip_Property_Damage_t),7*itemid)) call ModifyUnitFrostDamage((id),LoadReal(BYHT,(Equip_Property_Damage_t),7*itemid+1)) call ModifyUnitGasDamage((id),LoadReal(BYHT,(Equip_Property_Damage_t),7*itemid+2)) call ModifyUnitToDamage((id),LoadReal(BYHT,(Equip_Property_Damage_t),7*itemid+3)) call ModifyUnitLightningDamage((id),LoadReal(BYHT,(Equip_Property_Damage_t),7*itemid+4)) call ModifyUnitLightDamage((id),LoadReal(BYHT,(Equip_Property_Damage_t),7*itemid+5)) call ModifyUnitDarkdamage((id),LoadReal(BYHT,(Equip_Property_Damage_t),7*itemid+6)) endif if HaveSavedString(BYHT,(Equip_Mode_t),2*itemid)then call EquipAppModel((id),itemid,true) endif call sc___prototype100_evaluate(1,(Je[(id)]),itemid) call sc___prototype246_evaluate(1,id,LasManipulatedEquip,itemid) else call DisplayTimedTextToPlayer(P[Kc[(id)]],0,0,5,"|cFFFFCC00insufficient level.") call UnitDiscardeditems((Je[(id)]),LasManipulatedEquip) endif else call DisplayTimedTextToPlayer(P[Kc[(id)]],0,0,5,"|c0052E252It cannot be worn|r by your character.") call UnitDiscardeditems((Je[(id)]),LasManipulatedEquip) endif endif endif set LasManipulatedEquipTypeId=lastype return false endfunction function EquipState__yVv takes nothing returns boolean local integer id=(GetUnitUserData((GetTriggerUnit()))) local integer item_hi local integer itemid local integer lastype local boolean b=false if sr then set lastype=LasManipulatedEquipTypeId set LasManipulatedEquip=GetManipulatedItem() set LasManipulatedEquipTypeId=GetItemTypeIdG(LasManipulatedEquip) set itemid=LasManipulatedEquipTypeId set item_hi=GetHandleId(LasManipulatedEquip) if itemid!=GetItemTypeId(LasManipulatedEquip)or itemid==0 then set b=true endif if EquipSlot[id]!=null and itemid>0 then if HaveSavedInteger(BYHT,Equip_Type_t,itemid)and IsEquipSlotUse((id),itemid,false)then call sc___prototype246_evaluate(2,id,LasManipulatedEquip,itemid) call EquipAppModel((id),itemid,false) call ModifyHeroProperties((id),-LoadInteger(BYHT,Equip_zhushuxing_t,itemid)) call ModifyUnitAttack((id),-LoadInteger(BYHT,Equip_Attack_t,itemid)) call ModifyUnitArmor((id),-LoadInteger(BYHT,Equip_Armor_t,itemid)) call ModifyHeroStr((id),-LoadInteger(BYHT,Equip_Str_t,itemid)) call ModifyHeroAgi((id),-LoadInteger(BYHT,Equip_Agi_t,itemid)) call ModifyHeroInt((id),-LoadInteger(BYHT,Equip_Int_t,itemid)) call ModifyUnitHP((id),-LoadInteger(BYHT,Equip_HP_t,itemid)) call ModifyUnitMP((id),-LoadInteger(BYHT,Equip_MP_t,itemid)) call ModifyUnitAttackSpeed((id),-LoadInteger(BYHT,Equip_ASPD_t,itemid)) call ModifyUnitHpRegen((id),-LoadReal(BYHT,(Equip_HpRegen_t),itemid)) call ModifyUnitMpRegen((id),-LoadReal(BYHT,(Equip_MpRegen_t),itemid)) if HaveSavedReal(BYHT,(Equip_MDG_t),itemid)then call ModifyUnitMagicDamage((id),-LoadReal(BYHT,(Equip_MDG_t),itemid)) call ModifyUnitCrit((id),-LoadReal(BYHT,(Equip_Crit_t),itemid)) call ModifyUnitCritDamage((id),-LoadReal(BYHT,(Equip_CDG_t),itemid)) call ModifyUnitPersistentDamage((id),-LoadReal(BYHT,(Equip_DOT_t),itemid)) if HaveSavedInteger(BYHT,Equip_MDEF_t,item_hi)then call DeUnitMdef((id),LoadInteger(BYHT,Equip_MDEF_t,item_hi)) endif if HaveSavedInteger(BYHT,Equip_Dodge_t,item_hi)then call DeUnitDodge((id),LoadInteger(BYHT,Equip_Dodge_t,item_hi)) endif if HaveSavedInteger(BYHT,Equip_ADEF_t,item_hi)then call DeUnitAdef((id),LoadInteger(BYHT,Equip_ADEF_t,item_hi)) endif if HaveSavedInteger(BYHT,Equip_BCR_t,item_hi)then call DeUnitBeCureRatio((id),LoadInteger(BYHT,Equip_BCR_t,item_hi)) endif endif if HaveSavedReal(BYHT,(Equip_Property_Damage_t),7*itemid)then call ModifyUnitFireDamage((id),-LoadReal(BYHT,(Equip_Property_Damage_t),7*itemid)) call ModifyUnitFrostDamage((id),-LoadReal(BYHT,(Equip_Property_Damage_t),7*itemid+1)) call ModifyUnitGasDamage((id),-LoadReal(BYHT,(Equip_Property_Damage_t),7*itemid+2)) call ModifyUnitToDamage((id),-LoadReal(BYHT,(Equip_Property_Damage_t),7*itemid+3)) call ModifyUnitLightningDamage((id),-LoadReal(BYHT,(Equip_Property_Damage_t),7*itemid+4)) call ModifyUnitLightDamage((id),-LoadReal(BYHT,(Equip_Property_Damage_t),7*itemid+5)) call ModifyUnitDarkdamage((id),-LoadReal(BYHT,(Equip_Property_Damage_t),7*itemid+6)) endif endif endif if b then set sr=false call RemoveItemG(LasManipulatedEquip) set sr=true endif set LasManipulatedEquipTypeId=lastype endif return false endfunction function Equipment_to_build_A takes integer itemid,integer yOv,integer yRv,integer yIv,integer yAv,integer yNv,integer ybv,integer yBv,integer ycv,integer yCv,real ydv,real yDv,integer yfv returns integer set LasBuildEquipId=itemid call SaveInteger(BYHT,Equip_Type_t,itemid,yOv) call SaveInteger(BYHT,Equip_Attack_t,itemid,yRv) call SaveInteger(BYHT,Equip_Armor_t,itemid,yIv) call SaveInteger(BYHT,Equip_Str_t,itemid,yAv) call SaveInteger(BYHT,Equip_Agi_t,itemid,yNv) call SaveInteger(BYHT,Equip_Int_t,itemid,ybv) call SaveInteger(BYHT,Equip_ASPD_t,itemid,yBv) call SaveInteger(BYHT,Equip_HP_t,itemid,ycv) call SaveInteger(BYHT,Equip_MP_t,itemid,yCv) call SaveReal(BYHT,(Equip_HpRegen_t),itemid,ydv) call SaveReal(BYHT,(Equip_MpRegen_t),itemid,yDv) call SaveInteger(BYHT,Equip_Lv_t,itemid,yfv) return itemid endfunction function Equipment_to_build_Zsx takes integer itemid,integer zsx returns integer call SaveInteger(BYHT,Equip_zhushuxing_t,itemid,zsx) return itemid endfunction function AddUnitPickupOrDropItemById takes integer id,code func returns nothing call SaveInteger(BYHT2,Item_PickupOrDrop_event,id,GetHandleId(Filter(func))) endfunction function Equipment_to_build_TrigSlot takes integer id,integer TrigSlotId,integer f,code func returns nothing call SaveInteger(BYHT,TrigSlotId,id,f) call SaveInteger(BYHT2,TrigSlotId,id,GetHandleId(Filter(func))) endfunction function Equipment_to_build_B takes real matk,real mdef,real catk,real critv,real dodge,real adef returns nothing call SaveReal(BYHT,(Equip_MDG_t),LasBuildEquipId,matk) call SaveReal(BYHT,(Equip_Crit_t),LasBuildEquipId,catk) call SaveReal(BYHT,(Equip_CDG_t),LasBuildEquipId,critv) if mdef>0 then call SaveReal(BYHT,(Equip_MDEF_t),LasBuildEquipId,mdef) endif if dodge>0 then call SaveReal(BYHT,(Equip_Dodge_t),LasBuildEquipId,dodge) endif if adef!=0 then call SaveReal(BYHT,(Equip_ADEF_t),LasBuildEquipId,adef) endif endfunction function Equipment_to_build_C takes real matk,real mdef,real catk,real critv,real dodge,real adef,real dot,real bcr returns nothing call SaveReal(BYHT,(Equip_MDG_t),LasBuildEquipId,matk) call SaveReal(BYHT,(Equip_Crit_t),LasBuildEquipId,catk) call SaveReal(BYHT,(Equip_CDG_t),LasBuildEquipId,critv) call SaveReal(BYHT,(Equip_DOT_t),LasBuildEquipId,dot) if mdef>0 then call SaveReal(BYHT,(Equip_MDEF_t),LasBuildEquipId,mdef) endif if dodge>0 then call SaveReal(BYHT,(Equip_Dodge_t),LasBuildEquipId,dodge) endif if adef!=0 then call SaveReal(BYHT,(Equip_ADEF_t),LasBuildEquipId,adef) endif if bcr!=0 then call SaveReal(BYHT,(Equip_BCR_t),LasBuildEquipId,bcr) endif endfunction function Equipment_to_build_D takes real nF,real nI,real nW,real nE,real nA,real nL,real nD returns nothing call SaveReal(BYHT,(Equip_Property_Damage_t),7*LasBuildEquipId,nF) call SaveReal(BYHT,(Equip_Property_Damage_t),7*LasBuildEquipId+1,nI) call SaveReal(BYHT,(Equip_Property_Damage_t),7*LasBuildEquipId+2,nW) call SaveReal(BYHT,(Equip_Property_Damage_t),7*LasBuildEquipId+3,nE) call SaveReal(BYHT,(Equip_Property_Damage_t),7*LasBuildEquipId+4,nA) call SaveReal(BYHT,(Equip_Property_Damage_t),7*LasBuildEquipId+5,nL) call SaveReal(BYHT,(Equip_Property_Damage_t),7*LasBuildEquipId+6,nD) endfunction function Equipment_to_build_Mode takes string mP,string mA returns nothing call SaveStr(BYHT,(Equip_Mode_t),2*LasBuildEquipId,mP) call SaveStr(BYHT,(Equip_Mode_t),2*LasBuildEquipId+1,mA) endfunction function s__suit_new takes code c returns integer local integer this=s__suit_Index set s__suit_vessel[this]=malloc() set s__suit_func[this]=Filter(c) set s__suit_num[this]=0 set s__suit_Index=s__suit_Index+1 return this endfunction function s__suit_add takes integer this,integer id returns integer local integer p local integer i call SaveInteger(BYHT,s__suit_vessel[this],s__suit_num[this],id) set s__suit_num[this]=s__suit_num[this]+1 if HaveSavedInteger(BYHT,s__suit_V,id)then set p=LoadInteger(BYHT,s__suit_V,id) else set p=malloc() call SaveInteger(BYHT,s__suit_V,id,p) endif set i=LoadInteger(BYHT,p,0)+1 call SaveInteger(BYHT,p,0,i) call SaveInteger(BYHT,p,i,this) return this endfunction function s__suit_activate takes integer data,integer id,boolean b returns nothing local integer this local integer p local integer i local integer v if HaveSavedInteger(BYHT,s__suit_V,id)then set i=le set le=data set s__suit_IsActivate=b set p=LoadInteger(BYHT,s__suit_V,id) set v=LoadInteger(BYHT,p,0) loop exitwhen v==0 set this=LoadInteger(BYHT,p,v) set s__suit_Activated=LoadInteger(BYHT,p,v) call GameExecuteFunc(s__suit_func[s__suit_Activated]) set v=v-1 endloop set le=i endif endfunction function ymv takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) call alloc__hPv(GetHandleId((GetExpiredTimer())),(i+1)) if i==0 then call Equipment_to_build_A('I00I',1,16,0,0,0,0,0,0,0,0,0,1) call Equipment_to_build_A('I00Q',1,$A,0,0,0,4,0,0,0,0,0,1) call Equipment_to_build_A('I00K',2,0,8,0,0,0,0,50,0,0,0,1) call Equipment_to_build_A('I00P',2,0,5,0,0,3,0,0,0,0,0,1) call Equipment_to_build_A('I00S',3,0,4,0,0,0,0,0,0,0,0,1) call Equipment_to_build_A('I00R',3,0,3,0,0,1,0,0,0,0,0,1) call Equipment_to_build_A('I00T',1,24,0,0,0,0,0,0,0,0,0,$A) call Equipment_to_build_A('I01F',1,$E,0,0,0,7,0,0,0,0,0,$A) call Equipment_to_build_A('I01B',2,0,$E,0,0,0,0,100,0,0,0,$A) call Equipment_to_build_A('I01C',2,0,9,0,0,5,0,0,0,0,0,$A) call Equipment_to_build_A('I01D',3,0,7,0,0,0,0,0,0,0,0,$A) call Equipment_to_build_A('I01E',3,0,5,0,0,3,0,0,0,0,0,$A) elseif i==1 then call Equipment_to_build_A('I00U',1,34,0,0,0,0,0,0,0,0,0,$A) call Equipment_to_build_A('I01G',1,20,0,0,0,$B,0,0,0,0,0,$A) call Equipment_to_build_A('I01K',2,0,17,0,0,0,0,$96,0,0,0,$A) call Equipment_to_build_A('I01J',2,0,$B,0,0,7,0,0,0,0,0,$A) call Equipment_to_build_A('I01I',3,0,$A,0,0,0,0,0,0,0,0,$A) call Equipment_to_build_A('I01H',3,0,6,0,0,5,0,0,0,0,0,$A) call Equipment_to_build_A('I0AK',4,0,0,$A,$A,$A,0,0,0,0,0,$A) call Equipment_to_build_A('I01P',1,50,0,0,0,0,0,0,0,0,0,30) call Equipment_to_build_A('I01Q',1,30,0,0,0,18,0,0,0,0,0,30) call Equipment_to_build_A('I01L',2,0,22,0,0,0,0,300,0,0,0,30) call Equipment_to_build_A('I01M',2,0,$F,0,0,$C,0,0,0,0,0,30) call Equipment_to_build_A('I01N',3,0,$E,0,0,0,0,0,0,0,0,30) call Equipment_to_build_A('I01O',3,0,8,0,0,7,0,0,0,0,0,30) call Equipment_to_build_A('I01V',1,72,0,0,0,0,0,0,0,0,0,30) call Equipment_to_build_A('I01W',1,48,0,0,0,22,0,0,0,0,0,30) call Equipment_to_build_A('I01R',2,0,30,0,0,0,0,500,0,0,0,30) call Equipment_to_build_A('I01S',2,0,21,0,0,$F,0,0,0,0,0,30) call Equipment_to_build_A('I01T',3,0,20,0,0,0,0,0,0,0,0,30) call Equipment_to_build_A('I01U',3,0,$B,0,0,$A,0,0,0,0,0,30) elseif i==2 then call Equipment_to_build_A('I026',1,88,0,0,42,0,$F,0,0,0,0,30) call Equipment_to_build_A('I01X',1,120,0,0,32,0,0,0,0,0,0,30) call Equipment_to_build_A('I01Y',1,$B4,0,30,0,0,-25,0,0,0,0,30) call Equipment_to_build_A('I02F',1,90,0,0,0,48,0,0,0,0,0,30) call Equipment_to_build_A('I02G',2,0,48,16,16,0,0,0,0,0,0,30) call Equipment_to_build_A('I02J',2,0,30,0,0,30,0,0,0,0,0,30) call Equipment_to_build_A('I02H',3,0,30,0,0,0,0,0,0,0,0,30) call Equipment_to_build_A('I02I',3,0,17,0,0,$F,0,0,0,0,0,30) call Equipment_to_build_A('I02K',4,0,0,24,24,24,0,800,800,0,0,30) call Equipment_to_build_A('I037',1,$96,0,0,60,0,20,0,0,0,0,80) call Equipment_to_build_A('I02L',1,$C8,0,0,50,0,0,0,0,0,0,80) call Equipment_to_build_A('I02M',1,260,0,42,0,0,-25,0,0,0,0,80) call Equipment_to_build_A('I038',1,$9A,0,0,0,72,0,0,0,0,0,80) call Equipment_to_build_A('I03B',2,0,65,24,24,0,0,0,0,0,0,80) call Equipment_to_build_A('I039',2,0,42,0,0,48,0,0,0,0,0,80) call Equipment_to_build_A('I03C',3,0,40,0,0,0,0,0,0,0,0,80) call Equipment_to_build_A('I03A',4,0,0,60,60,60,0,800,800,0,0,80) call Equipment_to_build_A('I03D',3,0,26,0,0,24,0,0,0,0,0,80) elseif i==3 then call Equipment_to_build_A('I03E',1,$DC,0,0,84,0,20,0,0,0,0,120) call Equipment_to_build_A('I03J',1,300,0,0,74,0,0,0,0,0,0,120) call Equipment_to_build_A('I03K',1,380,0,64,0,0,-25,0,0,0,0,120) call Equipment_to_build_A('I03H',1,$D2,0,0,0,100,0,0,0,0,0,120) call Equipment_to_build_A('I03I',2,0,85,36,36,0,0,800,0,0,0,120) call Equipment_to_build_A('I03F',2,0,62,0,0,70,0,$3E8,0,0,0,120) call Equipment_to_build_A('I03L',3,0,58,0,0,0,0,0,0,0,0,120) call Equipment_to_build_A('I03M',3,0,40,0,0,32,0,0,0,0,0,120) call Equipment_to_build_A('I03G',4,0,0,48,48,48,0,$708,$708,0,0,120) call Equipment_to_build_A('I03S',1,400,0,0,122,0,20,0,0,0,0,$A0) call Equipment_to_build_A('I03N',1,460,0,0,112,0,0,0,0,0,0,$A0) call Equipment_to_build_A('I03O',1,600,0,92,0,0,-25,0,0,0,0,$A0) call Equipment_to_build_A('I03T',1,380,0,0,0,$8E,0,0,0,0,0,$A0) call Equipment_to_build_A('I03R',2,0,$82,48,48,0,0,$5DC,0,0,0,$A0) call Equipment_to_build_A('I03Q',2,0,90,0,0,100,0,$5DC,0,0,0,$A0) call Equipment_to_build_A('I03U',3,0,84,0,0,0,0,0,0,0,0,$A0) call Equipment_to_build_A('I03V',3,0,62,0,0,50,0,0,0,0,0,$A0) call Equipment_to_build_A('I03P',4,0,0,60,60,60,0,$9C4,$9C4,0,0,$A0) elseif i==4 then call Equipment_to_build_A('I05O',1,550,0,0,$A,0,20,0,0,0,0,$C8) call Equipment_to_build_A('I03W',1,650,0,0,$96,0,0,0,0,0,0,$C8) call Equipment_to_build_A('I055',1,900,0,120,0,0,-25,0,0,0,0,$C8) call Equipment_to_build_A('I05J',1,480,0,0,0,$B4,0,0,0,0,0,$C8) call Equipment_to_build_A('I03X',2,0,$B4,60,60,0,0,$7D0,0,0,0,$C8) call Equipment_to_build_A('I05E',2,0,120,0,0,$8E,0,$7D0,0,0,0,$C8) call Equipment_to_build_A('I054',3,0,115,0,0,0,0,0,0,0,0,$C8) call Equipment_to_build_A('I05M',3,0,84,0,0,70,0,0,0,0,0,$C8) call Equipment_to_build_A('I05N',4,0,0,80,80,80,0,$ED8,$ED8,0,0,$C8) call Equipment_to_build_A('I042',1,700,0,0,$DC,0,20,0,0,0,0,$A0) call Equipment_to_build_A('I03Y',1,900,0,0,$C8,0,0,0,0,0,0,$A0) call Equipment_to_build_A('I044',1,$578,0,$9B,0,0,-25,0,0,0,0,$A0) call Equipment_to_build_A('I045',1,650,0,0,0,$F0,0,0,0,0,0,$A0) call Equipment_to_build_A('I040',2,0,$E1,75,75,0,0,$7D0,0,0,0,$A0) call Equipment_to_build_A('I041',2,0,$A5,0,0,$B4,0,$7D0,0,0,0,$A0) call Equipment_to_build_A('I046',3,0,$9B,0,0,0,0,0,0,0,0,$A0) call Equipment_to_build_A('I047',3,0,105,0,0,90,0,0,0,0,0,$A0) call Equipment_to_build_A('I043',4,0,0,95,95,95,0,4200,4200,0,0,$A0) elseif i==5 then call Equipment_to_build_A('I05B',1,900,0,0,$FA,0,20,0,0,0,0,$C8) call Equipment_to_build_A('I048',1,$514,0,0,$F0,0,0,0,0,0,0,$C8) call Equipment_to_build_A('I05C',1,$708,0,$B4,0,0,-25,0,0,0,0,$C8) call Equipment_to_build_A('I05D',1,800,0,0,0,300,0,0,0,0,0,$C8) call Equipment_to_build_A('I049',2,0,300,90,90,0,0,$9C4,0,0,0,$C8) call Equipment_to_build_A('I059',2,0,$D2,0,0,$C8,0,$9C4,0,0,0,$C8) call Equipment_to_build_A('I05F',3,0,$B4,0,0,0,0,0,0,0,0,$C8) call Equipment_to_build_A('I05G',3,0,120,0,0,110,0,0,0,0,0,$C8) call Equipment_to_build_A('I05A',4,0,0,110,110,110,0,4600,4600,0,0,$C8) call Equipment_to_build_A('dsum',5,0,0,$82,100,100,0,0,0,0,0,$C8) call Equipment_to_build_A('I06Z',1,$5DC,0,0,350,0,0,0,0,0,0,$96) call Equipment_to_build_A('I06Y',1,$898,0,0,330,0,0,0,0,0,0,$96) call Equipment_to_build_A('I070',1,$BB8,0,$F0,0,0,0,0,0,0,0,$96) call Equipment_to_build_A('I071',1,$578,0,0,0,400,0,0,0,0,0,$96) call Equipment_to_build_A('I074',2,0,360,105,105,0,0,$BB8,0,0,0,$96) call Equipment_to_build_A('I072',2,0,$E6,0,0,$FA,0,$7D0,0,0,0,$96) call Equipment_to_build_A('I075',3,0,$C8,0,0,0,0,$3E8,0,0,0,$96) call Equipment_to_build_A('I076',3,0,$8C,0,0,125,0,$3E8,0,0,0,$96) call Equipment_to_build_A('I073',4,0,0,125,125,125,0,5000,5000,0,0,$96) elseif i==6 then call Equipment_to_build_A('I079',1,$708,0,0,380,0,0,0,0,0,0,$B4) call Equipment_to_build_A('I077',1,$A28,0,0,360,0,0,0,0,0,0,$B4) call Equipment_to_build_A('I078',1,$D48,0,270,0,0,0,0,0,0,0,$B4) call Equipment_to_build_A('I07A',1,$6A4,0,0,0,440,0,0,0,0,0,$B4) call Equipment_to_build_A('I07B',1,4900,0,0,440,0,0,0,0,0,0,260) call Equipment_to_build_A('I07D',2,0,390,$96,$96,0,0,$DAC,0,0,0,$C8) call Equipment_to_build_A('I07K',2,0,420,$B4,$B4,0,$FA0,0,0,0,0,$C8) call Equipment_to_build_A('I07C',2,0,$FA,0,0,300,0,$DAC,0,0,0,$C8) call Equipment_to_build_A('I07L',2,0,290,0,0,350,0,$FA0,0,0,0,$C8) call Equipment_to_build_A('I07E',3,0,$D2,0,0,0,0,$5DC,0,0,0,$C8) call Equipment_to_build_A('I07F',3,0,$96,0,0,$91,0,$5DC,0,0,0,$C8) call Equipment_to_build_A('I07H',4,0,0,$8C,$8C,$8C,0,5600,5600,0,0,$C8) call Equipment_to_build_A('I081',1,8500,0,700,0,0,0,0,0,0,0,300) call Equipment_to_build_A('I080',1,7500,0,0,800,0,0,0,0,0,0,300) call Equipment_to_build_A('I09M',1,9000,0,0,650,0,25,0,0,0,0,300) call Equipment_to_build_A('I082',1,6000,0,0,0,900,0,0,0,0,0,300) call Equipment_to_build_A('I0DH',1,$3D54,0,410,0,$5E6,0,0,0,80,0,340) call Equipment_to_build_A('I0DI',1,$6B08,0,500,0,$956,0,0,0,125,0,380) elseif i==7 then call Equipment_to_build_A('I086',1,$3264,0,0,$41A,0,0,0,0,0,0,340) call Equipment_to_build_A('I05H',1,$6B6C,0,725,$866,0,0,0,0,0,0,370) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_A('I09O',1,$34BC,0,0,$44C,0,0,0,0,0,0,340) call Equipment_to_build_A('I08C',2,0,400,500,500,0,0,0,0,0,0,340) call Equipment_to_build_B(2.5,0,0,0,0,0) call Equipment_to_build_A('I0B2',2,0,340,0,860,0,0,0,0,0,0,360) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_A('I0C4',3,0,260,110,330,0,0,0,0,0,0,340) call Equipment_to_build_B(3,0,0,0,0,0) call Equipment_to_build_A('I08H',1,$3E80,0,0,$578,0,0,0,0,0,0,340) call Equipment_to_build_A('I09Q',1,$4074,0,0,$5AA,0,0,0,0,0,0,340) call Equipment_to_build_A('I0AY',1,$DAC,0,0,0,500,25,0,0,0,0,260) call Equipment_to_build_A('rde4',1,$30D4,0,0,0,$5AA,0,0,0,0,0,340) call Equipment_to_build_D(5,0,0,0,0,0,0) call Equipment_to_build_A('I07O',3,0,$C8,75,100,0,0,0,0,0,0,260) call Equipment_to_build_B(0,0,0,0,$C,0) call Equipment_to_build_A('I07N',3,0,$FA,100,125,0,0,0,0,0,0,260) call Equipment_to_build_B(0,0,0,0,$F,0) call Equipment_to_build_A('I07M',3,0,$AA,0,0,$AF,0,0,0,0,0,260) call Equipment_to_build_B(0,0,0,0,$C,0) call Equipment_to_build_A('I07P',3,0,$BE,0,0,$D2,0,0,0,0,0,260) call Equipment_to_build_B(0,0,0,0,$F,0) call Equipment_to_build_A('I07V',4,0,0,0,0,400,0,5000,$2710,0,50,260) call Equipment_to_build_A('I07Z',4,0,0,0,0,600,0,7000,$36B0,0,75,300) call Equipment_to_build_A('I08F',4,0,0,0,0,900,0,$2710,$4E20,0,100,340) call Equipment_to_build_A('I08A',4,0,0,500,500,500,0,0,0,0,0,340) call Equipment_to_build_A('I0E8',4,0,0,$6E0,$6E0,$6E0,0,0,0,0,0,400) call Equipment_to_build_B($A,0,0,0,0,0) call Equipment_to_build_A('I08B',4,0,0,550,550,550,0,0,0,0,0,340) call Equipment_to_build_B(4,0,0,0,0,0) call Equipment_to_build_A('I08J',4,0,0,970,970,970,0,0,0,0,0,360) call Equipment_to_build_B(9,0,0,0,0,0) call Equipment_to_build_A('rhth',1,$34BC,0,$4E2,0,0,0,0,0,0,0,340) call Equipment_to_build_B(0,0,0,$F,0,0) call Equipment_to_build_A('I0D6',1,$34BC,0,0,$55F,0,0,0,0,0,0,340) call Equipment_to_build_D(0,5,0,0,0,0,0) call Equipment_to_build_A('I08D',2,0,450,0,0,750,0,0,0,0,0,340) call Equipment_to_build_A('I0B4',2,0,580,0,0,940,0,0,0,0,0,360) call Equipment_to_build_B(5,5,0,0,0,0) call Equipment_to_build_A('I08R',3,0,430,$96,$AF,0,0,0,0,0,0,340) call Equipment_to_build_A('I08E',3,0,310,0,0,300,0,0,0,0,0,340) call Equipment_to_build_A('I085',1,$34BC,0,$41A,0,0,0,0,0,0,0,340) call Equipment_to_build_A('I08G',1,$4074,0,$4E2,0,0,0,0,0,0,0,340) call Equipment_to_build_A('I087',1,$3200,0,0,0,$4E2,0,0,0,0,0,340) call Equipment_to_build_A('I08I',1,$3CF0,0,0,0,$640,0,0,0,0,0,340) call Equipment_to_build_A('I088',2,0,520,400,400,0,0,0,0,0,0,340) call Equipment_to_build_A('I0B3',2,0,760,750,320,0,0,0,0,0,0,360) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_A('I089',3,0,380,320,$BE,0,0,0,0,75,0,340) call Equipment_to_build_A('I0AD',3,0,560,680,300,0,0,0,0,0,0,360) call Equipment_to_build_A('I0E0',3,0,650,$406,550,0,0,0,0,0,0,390) call Equipment_to_build_B($A,0,0,0,0,0) call Equipment_to_build_A('I0BJ',4,0,$8C,400,320,0,0,0,0,80,0,340) call Equipment_to_build_B(0,$A,0,0,0,0) call Equipment_to_build_A('I0BK',4,0,$C8,780,650,0,0,0,0,$8C,0,340) call Equipment_to_build_B(0,$F,0,0,0,0) elseif i==8 then call Equipment_to_build_A('I07R',1,6000,0,400,0,0,0,0,0,0,0,260) call Equipment_to_build_A('I07S',1,7500,0,550,0,0,0,0,0,0,0,300) call Equipment_to_build_A('I09S',1,6750,0,0,350,0,0,0,0,0,0,260) call Equipment_to_build_A('I09T',1,8250,0,0,500,0,0,0,0,0,0,300) call Equipment_to_build_A('I07T',1,$FA0,0,0,0,600,0,0,0,0,0,260) call Equipment_to_build_A('I07Q',1,5000,0,0,0,750,0,0,0,0,0,300) call Equipment_to_build_A('I07U',2,0,560,$C8,$C8,0,0,0,0,40,0,260) call Equipment_to_build_A('I07W',2,0,730,$FA,$FA,0,0,0,0,60,0,300) call Equipment_to_build_A('I07X',3,0,290,0,0,0,0,0,0,0,0,260) call Equipment_to_build_B(0,7.5,0,0,0,0) call Equipment_to_build_A('I07Y',3,0,400,0,0,0,0,0,0,0,0,300) call Equipment_to_build_B(0,1,0,0,0,0) call Equipment_to_build_A('ajen',1,$FA0,0,450,0,0,$A,0,0,0,0,260) call Equipment_to_build_A('I07I',1,5000,0,0,500,0,0,0,0,0,0,260) call Equipment_to_build_A('bgst',1,6500,0,590,0,0,$F,0,0,0,0,300) call Equipment_to_build_A('I07J',1,7000,0,0,650,0,0,0,0,0,0,300) call Equipment_to_build_A('I03Z',4,0,0,300,300,300,0,5000,5000,0,0,260) call Equipment_to_build_A('I08L',1,$5C30,0,$5AA,$5AA,0,0,0,0,0,0,360) call Equipment_to_build_B(6,0,0,0,0,0) call Equipment_to_build_Zsx(LasBuildEquipId,500) call Equipment_to_build_A('I0DX',1,$9E34,0,$992,$960,0,0,0,0,0,0,390) call Equipment_to_build_B(0,0,0,25,0,0) call Equipment_to_build_A('I09P',1,$5DC0,0,$44C,$73A,0,0,0,0,0,0,360) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_A('I08M',1,$4268,0,0,0,$866,0,0,0,0,0,360) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_A('I083',2,0,320,0,0,500,0,0,0,0,0,300) call Equipment_to_build_A('I084',3,0,$DC,0,0,$E6,0,0,0,0,0,300) call Equipment_to_build_A('I0AE',3,0,420,0,0,745,0,0,0,0,0,360) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_A('I0AZ',4,0,0,280,280,280,0,0,0,0,50,300) call Equipment_to_build_B(-5,0,0,0,0,0) call Equipment_to_build_A('I0B0',4,0,0,490,490,490,0,0,0,0,90,340) call Equipment_to_build_B(-5,0,0,0,0,0) call Equipment_to_build_A('I067',1,$4268,0,$5DC,$5DC,0,0,0,0,0,0,350) call Equipment_to_build_A('I0E2',1,$74CC,0,$992,$960,0,0,0,0,0,0,390) call Equipment_to_build_B(0,$F,0,0,0,0) call Equipment_to_build_A('I0E7',1,$927C,0,$992,$92E,0,0,0,0,0,0,400) call Equipment_to_build_B(0,0,0,45,0,0) call Equipment_to_build_A('I00E',1,$733C,0,$79E,0,$5C8,0,0,0,0,0,370) call Equipment_to_build_B(6,0,0,0,0,0) call Equipment_to_build_A('I098',1,$4A38,0,$5AA,0,0,-50,0,0,0,0,350) call Equipment_to_build_B(0,0,$A,0,0,0) call Equipment_to_build_A('bspd',1,$4074,0,900,$640,0,0,0,0,0,0,350) call Equipment_to_build_B(3,0,0,0,0,0) call Equipment_to_build_A('I096',1,$30D4,0,0,0,$690,0,$BB8,0,0,0,350) call Equipment_to_build_D(0,3,0,0,0,0,0) call Equipment_to_build_A('I0CM',1,$4E20,0,0,0,$866,0,5000,0,0,0,360) call Equipment_to_build_D(0,5,0,0,0,0,0) call Equipment_to_build_A('I097',4,0,$96,0,0,700,0,$9C4,0,0,0,350) call Equipment_to_build_D(0,3,0,0,0,0,0) call Equipment_to_build_A('I099',4,0,0,0,700,0,0,$9C4,0,0,0,350) call Equipment_to_build_A('I09A',4,0,0,625,625,625,0,0,0,0,0,350) call Equipment_to_build_B(5,0,0,0,0,5) call Equipment_to_build_A('I007',5,0,0,$46F,$46F,$46F,0,0,0,0,0,380) call Equipment_to_build_B(0,$F,0,0,0,0) call Equipment_to_build_Mode("gaiawings1.mdx","chest") call Equipment_to_build_A('I093',5,0,0,790,790,790,0,0,0,0,0,360) call Equipment_to_build_B(0,$A,0,0,0,0) call Equipment_to_build_Mode("Shiva'sWings.mdx","origin") elseif i==9 then call Equipment_to_build_A('I09C',1,$87,0,0,22,0,0,0,0,0,0,30) call Equipment_to_build_A('I09B',1,$FA,0,0,38,0,0,0,0,0,0,80) call Equipment_to_build_A('I09H',1,340,0,0,65,0,0,0,0,0,0,120) call Equipment_to_build_A('I09K',1,550,0,0,105,0,0,0,0,0,0,$A0) call Equipment_to_build_A('I09J',1,$4B0,0,0,$B4,0,0,0,0,0,0,$A0) call Equipment_to_build_A('I09I',1,800,0,0,$8C,0,0,0,0,0,0,$C8) call Equipment_to_build_A('I09L',1,$640,0,0,$D2,0,0,0,0,0,0,$C8) call Equipment_to_build_A('I09F',1,$A8C,0,0,270,0,0,0,0,0,0,$96) call Equipment_to_build_A('I09D',1,$C1C,0,0,300,0,0,0,0,0,0,$B4) call Equipment_to_build_A('I0A6',1,$8FC,0,0,410,0,0,0,0,0,0,280) call Equipment_to_build_A('I0A5',1,$A28,0,0,380,0,0,0,0,0,0,280) call Equipment_to_build_A('I0A9',1,$BB8,0,0,310,0,0,0,0,0,0,280) call Equipment_to_build_A('I0A7',1,$D7A,0,280,0,0,0,0,0,0,0,280) call Equipment_to_build_A('I0A8',1,$640,0,0,0,440,0,0,0,0,0,280) call Equipment_to_build_A('I0A3',2,0,$E6,80,80,0,0,$9C4,0,0,0,280) call Equipment_to_build_A('I0A4',2,0,$A0,0,0,$C8,0,$9C4,0,0,0,280) call Equipment_to_build_A('I0A1',3,0,$9B,0,0,0,0,$5DC,0,0,0,280) call Equipment_to_build_A('I0A2',3,0,110,0,0,100,0,0,0,0,0,280) call Equipment_to_build_A('I0AA',4,0,0,380,380,380,0,0,0,100,40,280) call Equipment_to_build_B(6,0,0,0,0,0) call Equipment_to_build_A('sor5',5,$3E80,0,825,825,825,0,0,0,$E1,100,370) call Equipment_to_build_B($C,0,0,0,0,0) call Equipment_to_build_Mode("FWIND.MDX","chest") call Equipment_to_build_A('I0AC',5,0,0,425,425,425,0,0,0,$96,60,300) call Equipment_to_build_B($A,0,0,0,0,0) call Equipment_to_build_Mode("LichWing Blue.mdx","chest") call Equipment_to_build_A('I0B5',5,0,0,860,405,405,0,0,0,-$AF,0,360) call Equipment_to_build_B(0,$A,0,0,0,0) call Equipment_to_build_Mode("HLY.mdx","chest") call Equipment_to_build_A('I0AN',4,0,0,$465,$465,$465,0,0,0,0,0,360) call Equipment_to_build_B($C,0,0,0,0,0) call Equipment_to_build_A('I05R',4,0,0,$5F5,$5F5,$5F5,0,0,0,0,0,380) call Equipment_to_build_B($F,0,0,0,0,0) call Equipment_to_build_A('I05I',4,0,0,$465,$465,$465,0,0,0,120,120,380) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_A('I00B',4,0,0,$3FC,$3FC,$3FC,0,0,0,0,0,370) call Equipment_to_build_B($A,$A,0,0,0,0) call Equipment_to_build_A('I05S',0,0,0,0,0,0,0,0,0,0,0,400) call Equipment_to_build_A('I0AL',4,0,0,$67C,$67C,$67C,0,0,0,0,0,400) call Equipment_to_build_B($F,0,0,0,0,0) call Equipment_to_build_A('I0AU',5,0,0,$618,$618,$618,0,0,0,800,800,400) call Equipment_to_build_C(20,25,0,0,0,0,45,0) call Equipment_to_build_Mode("Archangel wing.mdx","chest") call Equipment_to_build_A('ofro',5,0,0,475,425,0,0,0,0,0,0,260) call Equipment_to_build_B(0,0,0,0,1,0) call Equipment_to_build_Mode("HHY.mdx","chest") call Equipment_to_build_A('modt',5,0,0,0,0,425,0,$7D0,0,0,0,260) call Equipment_to_build_B(6,0,0,0,0,0) call Equipment_to_build_Mode("EWING.mdx","chest") call Equipment_to_build_A('rlif',5,0,0,$550,0,$550,0,0,0,0,0,380) call Equipment_to_build_B(0,20,0,0,0,35) call Equipment_to_build_Mode("xnzh.mdx","chest") call Equipment_to_build_A('I0BH',5,0,0,0,0,715,0,4000,7500,0,0,360) call Equipment_to_build_B(8,0,0,0,0,0) call Equipment_to_build_Mode("JDY.mdx","chest") call Equipment_to_build_A('I0ED',5,0,0,0,0,$546,0,8000,$38A4,0,0,370) call Equipment_to_build_B($A,0,0,0,0,0) call Equipment_to_build_Mode("jdy_golden .mdx","chest") elseif i==$A then call Equipment_to_build_A('cnob',4,0,0,$E1,$E1,$E1,0,$9C4,0,0,0,260) call Equipment_to_build_A('shhn',4,0,0,550,550,550,0,5000,0,0,0,260) call Equipment_to_build_A('I08X',2,0,640,650,$FA,0,0,0,0,0,0,350) call Equipment_to_build_A('I06D',2,0,480,$FA,700,0,0,0,0,0,0,350) call Equipment_to_build_A('I0AV',2,0,450,0,0,900,0,5000,0,0,0,350) call Equipment_to_build_A('I06E',4,0,0,675,675,675,0,0,0,0,0,350) call Equipment_to_build_A('I0EA',4,0,0,810,810,810,0,0,0,0,0,360) call Equipment_to_build_B(0,$A,0,0,0,0) call Equipment_to_build_A('I0E1',2,0,650,750,$546,0,0,0,0,0,0,390) call Equipment_to_build_B($A,0,0,0,0,0) call Equipment_to_build_A('I0DS',4,0,0,0,0,0,0,0,0,0,0,380) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_D(5,0,0,0,0,0,0) call Equipment_to_build_Zsx(LasBuildEquipId,$5AA) call Equipment_to_build_A('I0E3',4,0,0,0,0,0,0,0,0,0,0,380) call Equipment_to_build_B($F,0,0,0,0,0) call Equipment_to_build_Zsx(LasBuildEquipId,$5AA) call Equipment_to_build_A('I0DY',4,0,0,$5F5,$5F5,$5F5,0,0,0,500,0,390) call Equipment_to_build_A('kysn',1,$4844,0,$546,$640,0,0,0,0,0,0,360) call Equipment_to_build_B(0,0,0,25,0,0) call Equipment_to_build_A('tgxp',1,$87F0,0,$618,$8CA,0,0,0,0,0,0,380) call Equipment_to_build_B(0,0,0,35,0,0) call Equipment_to_build_A('I0DT',1,$733C,0,$60E,$8CA,0,0,0,0,0,0,380) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_A('ches',3,0,333,0,0,666,0,0,0,0,0,360) call Equipment_to_build_A('ktrm',3,0,410,340,380,0,0,0,0,0,0,360) call Equipment_to_build_B(0,0,0,0,0,7.5) call Equipment_to_build_A('kymn',3,0,480,460,780,0,0,5000,0,0,0,370) call Equipment_to_build_B(7,0,0,0,0,0) call Equipment_to_build_A('I0B6',3,0,320,460,630,0,0,0,0,0,0,360) call Equipment_to_build_B(6,0,0,0,0,6) call Equipment_to_build_A('dphe',5,0,0,350,700,0,0,0,0,0,0,360) call Equipment_to_build_B(7.5,0,0,20,0,0) call Equipment_to_build_Mode("DevilAura.mdx","origin") elseif i==$B then call Equipment_to_build_A('pmna',1,450,80,70,75,0,0,0,0,0,0,100) call Equipment_to_build_A('spsh',2,0,$8C,0,0,0,0,5000,0,0,0,100) call Equipment_to_build_A('ciri',4,0,0,85,85,85,0,0,0,0,7.5,100) call Equipment_to_build_A('mort',5,0,0,60,60,60,0,0,0,0,0,100) call Equipment_to_build_A('prvt',1,$76C,0,0,$A0,0,20,0,0,0,0,$96) call Equipment_to_build_A('hval',2,0,110,0,0,$F0,0,0,0,0,0,$96) call Equipment_to_build_B(3,0,0,0,0,0) call Equipment_to_build_A('lgdh',3,0,$B4,100,85,0,0,0,0,0,0,$96) call Equipment_to_build_A('ssil',4,0,0,0,0,$D2,0,$7D0,0,0,0,$96) call Equipment_to_build_B(4,0,0,0,0,0) call Equipment_to_build_A('phlt',1,$5DC0,0,$6D6,0,0,20,0,0,0,0,360) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_A('kpin',1,$6590,0,0,$6A4,0,20,0,0,0,0,360) call Equipment_to_build_B(5,0,5,0,0,0) call Equipment_to_build_A('rin1',1,$6D60,0,0,$6C2,0,-25,0,0,0,0,360) call Equipment_to_build_B(0,0,7.5,0,0,0) call Equipment_to_build_A('rwiz',1,$5208,0,0,0,$802,25,0,0,0,0,360) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_A('mcou',4,0,0,950,0,850,0,0,0,0,0,360) call Equipment_to_build_B(7.5,0,0,0,0,0) call Equipment_to_build_A('evtl',4,0,0,825,825,825,0,0,0,$AF,0,360) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_A('rst1',4,0,0,620,0,$401,0,0,0,$96,0,360) call Equipment_to_build_B(6,6,0,0,0,0) call Equipment_to_build_A('I092',4,0,0,0,0,$401,0,$2710,0,0,0,360) elseif i==$C then call Equipment_to_build_A('I0BM',1,$708,0,0,360,0,0,0,0,0,0,$F0) call Equipment_to_build_A('I0BL',1,$834,0,0,330,0,0,0,0,0,0,$F0) call Equipment_to_build_A('I0BO',1,$A28,0,0,290,0,0,0,0,0,0,$F0) call Equipment_to_build_A('I0BN',1,$C1C,0,260,0,0,0,0,0,0,0,$F0) call Equipment_to_build_A('I0BP',1,$514,0,0,0,400,0,0,0,0,0,$F0) call Equipment_to_build_A('I0C1',1,$ED8,120,320,380,0,0,0,0,0,0,$F0) call Equipment_to_build_A('I0CC',1,$CE4,0,0,0,490,0,0,0,0,0,$F0) call Equipment_to_build_B(6,0,0,0,0,0) call Equipment_to_build_A('I0BU',2,0,$C8,65,65,0,0,$9C4,0,0,0,$F0) call Equipment_to_build_A('I0BV',2,0,$82,0,0,$A0,0,$9C4,0,50,0,$F0) call Equipment_to_build_A('I0C0',2,0,380,450,0,0,0,0,0,0,0,$F0) call Equipment_to_build_A('I0BW',3,0,$82,0,0,0,0,$4B0,0,0,0,$F0) call Equipment_to_build_A('I0BX',3,0,95,0,0,80,0,0,0,0,0,$F0) call Equipment_to_build_A('I0BZ',4,0,0,270,270,270,0,$9C4,$9C4,0,0,$F0) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_A('I0C2',4,0,0,490,490,490,0,$DAC,$DAC,0,0,280) call Equipment_to_build_B(8,0,0,0,0,0) call Equipment_to_build_A('I0BQ',1,9000,0,0,0,0,25,0,0,0,0,$F0) call Equipment_to_build_B(0,0,0,$F,0,0) call Equipment_to_build_Zsx(LasBuildEquipId,690) call Equipment_to_build_A('I0CB',1,9400,0,0,0,0,$F,0,0,0,0,$F0) call Equipment_to_build_B(4,0,0,0,0,0) call Equipment_to_build_Zsx(LasBuildEquipId,690) call Equipment_to_build_A('I0BR',1,0,0,0,0,800,0,6000,0,0,0,$F0) call Equipment_to_build_B(4,0,0,0,0,0) call Equipment_to_build_A('I0BS',2,0,260,0,0,0,0,0,0,0,0,$F0) call Equipment_to_build_B(3,0,3,0,0,0) call Equipment_to_build_Zsx(LasBuildEquipId,410) call Equipment_to_build_A('I0C3',3,0,$C8,0,0,0,0,$7D0,0,0,0,$F0) call Equipment_to_build_B(4,0,0,0,0,-6) call Equipment_to_build_Zsx(LasBuildEquipId,120) call Equipment_to_build_A('I05T',3,0,650,960,790,0,0,8000,0,0,0,380) call Equipment_to_build_B(8,0,0,0,0,0) call Equipment_to_build_A('I0BT',4,0,0,0,380,430,$F,0,0,0,0,$F0) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_A('I0C5',4,0,0,0,860,$401,20,0,0,$C8,100,340) call Equipment_to_build_B($A,0,0,0,0,0) elseif i==$D then call Equipment_to_build_A('I0C9',1,$7724,0,$79E,0,0,0,0,0,0,0,360) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_A('I0DU',1,$9664,0,$992,0,0,0,0,0,0,0,380) call Equipment_to_build_B(8,0,0,0,0,0) call Equipment_to_build_A('ratf',1,$6F54,0,0,0,$9BA,0,5000,0,0,0,380) call Equipment_to_build_B(8,0,0,0,0,0) call Equipment_to_build_A('sor4',1,$6784,0,0,0,$834,0,$DAC,0,0,0,360) call Equipment_to_build_B(6,0,0,0,0,0) call Equipment_to_build_A('I0CA',1,$5FB4,0,0,0,$802,0,0,0,0,75,360) call Equipment_to_build_A('I0AJ',1,$639C,0,0,0,$866,0,6000,0,0,0,370) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_A('I009',1,$6784,0,0,0,$8CA,0,0,6000,0,100,370) call Equipment_to_build_B(8,0,0,0,0,0) call Equipment_to_build_A('I00D',1,$639C,0,0,0,$7D0,0,0,$FA0,0,0,370) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_A('I0CU',1,$6B6C,0,620,$73A,0,0,0,0,0,75,360) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_A('I0E6',1,$7EF4,0,960,$910,0,0,0,0,0,75,380) call Equipment_to_build_B($A,0,0,0,0,0) call Equipment_to_build_A('I0EC',1,$8E94,0,$73A,$992,0,0,0,0,0,0,400) call Equipment_to_build_B(20,0,0,0,0,0) call Equipment_to_build_A('I0C6',2,0,620,720,380,0,0,0,0,0,0,360) call Equipment_to_build_B(0,0,0,0,0,$A) call Equipment_to_build_A('I09G',3,0,690,840,840,$99C,0,0,0,0,0,400) call Equipment_to_build_B($A,0,0,0,0,0) call Equipment_to_build_D(20,0,0,0,0,0,0) call Equipment_to_build_A('I0C7',3,0,400,410,410,410,0,0,0,0,0,360) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_D(6,0,0,0,0,0,0) call Equipment_to_build_A('I0C8',4,0,0,925,720,0,0,0,0,0,0,360) call Equipment_to_build_C(0,0,0,0,0,0,25,-25) call Equipment_to_build_A('I0CE',5,0,0,775,725,0,0,0,0,0,0,360) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_Mode("JHY.mdx","chest") call Equipment_to_build_A('I0CR',2,0,410,0,680,0,0,0,0,0,0,300) call Equipment_to_build_B(7,0,0,0,0,0) call Equipment_to_build_A('I0CP',3,0,460,490,0,0,0,0,0,0,0,360) call Equipment_to_build_B(0,0,0,0,0,$A) call Equipment_to_build_A('I0CG',4,0,0,760,760,760,0,0,$FA0,0,0,360) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_A('crdt',4,0,0,890,890,890,0,0,0,0,0,360) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_A('I0CN',1,$445C,0,0,$6CC,0,$F,0,0,0,0,360) call Equipment_to_build_A('I0CO',2,0,540,720,0,0,0,0,0,0,0,360) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_A('I0CS',2,0,390,0,0,680,0,0,0,0,60,360) call Equipment_to_build_B(3,0,0,0,$F,0) call Equipment_to_build_A('I0CQ',4,0,$96,845,845,845,0,0,0,0,0,360) call Equipment_to_build_B(5,0,0,0,0,$A) call Equipment_to_build_A('srbd',4,0,300,$47E,$47E,$47E,0,0,0,0,0,370) call Equipment_to_build_B(8,0,0,0,0,$F) elseif i==$E then call Equipment_to_build_A('I0B1',4,0,0,825,825,825,0,0,0,0,125,360) call Equipment_to_build_B(4,0,0,0,0,0) call Equipment_to_build_A('gobm',1,$59D8,0,580,$73A,0,0,0,0,0,0,360) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_A('I05U',1,$6B6C,0,$5B4,$924,0,0,0,0,0,0,380) call Equipment_to_build_B($A,0,0,0,0,0) call Equipment_to_build_A('hcun',1,$6AA4,0,$758,0,0,0,0,0,0,0,360) call Equipment_to_build_B(5,0,$A,0,0,0) call Equipment_to_build_A('I0DV',1,$6BD0,0,$802,0,0,0,0,0,0,0,380) call Equipment_to_build_B(0,0,0,0,0,-100) call Equipment_to_build_A('I0DZ',1,$7EF4,0,$9F6,0,0,0,0,0,0,0,390) call Equipment_to_build_B($A,0,0,45,0,0) call Equipment_to_build_A('rump',3,0,444,0,0,777,0,0,0,0,0,360) call Equipment_to_build_B(0,5,0,0,0,0) call Equipment_to_build_A('I0E4',3,0,666,0,0,999,0,0,0,0,0,380) call Equipment_to_build_B(0,$A,0,0,0,0) call Equipment_to_build_A('afac',1,$61A8,0,$79E,0,0,0,0,0,0,0,360) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_A('odef',1,$4E20,0,$514,$514,$514,$F,0,0,0,0,360) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_A('I00A',1,$6F54,0,$5AA,$5AA,$5AA,-50,0,0,0,0,370) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_A('rag1',3,0,450,410,410,410,0,0,0,0,0,360) call Equipment_to_build_B(0,0,6,0,0,0) call Equipment_to_build_A('sbch',2,0,720,800,330,0,0,0,0,0,0,360) call Equipment_to_build_B(0,8,0,0,0,0) call Equipment_to_build_A('clsd',2,0,580,300,850,0,0,0,0,0,0,360) call Equipment_to_build_B(0,5,0,0,0,0) call Equipment_to_build_A('lhst',2,0,480,0,0,$41A,0,7000,0,0,0,360) call Equipment_to_build_A('ratc',1,$8020,0,$73A,$708,0,0,0,0,0,0,370) call Equipment_to_build_B(0,0,0,20,0,0) call Equipment_to_build_A('rat6',1,$5FB4,0,0,0,$92E,0,0,7500,0,0,370) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_A('ward',2,0,520,0,0,$4E2,0,0,0,0,0,370) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_A('I0DR',2,0,660,0,0,$532,0,0,8000,0,0,380) call Equipment_to_build_D($A,0,0,0,0,0,0) call Equipment_to_build_A('rat9',4,0,0,$47E,$47E,$47E,$F,0,0,0,0,370) call Equipment_to_build_A('penr',4,0,0,0,0,0,0,0,0,0,0,370) call Equipment_to_build_B($D,0,0,0,0,0) call Equipment_to_build_Zsx(LasBuildEquipId,$5AA) call Equipment_to_build_A('k3m3',5,0,0,825,825,825,0,0,0,$E1,100,370) call Equipment_to_build_B($C,0,0,0,0,0) call Equipment_to_build_Mode("LichWing Yellow.mdx","chest") elseif i==$F then call Equipment_to_build_A('belv',1,$6978,0,0,0,$898,0,0,0,0,0,370) call Equipment_to_build_C(0,$A,0,0,0,0,20,0) call Equipment_to_build_A('I0E9',1,$733C,0,0,0,$924,0,0,5500,0,0,380) call Equipment_to_build_B($A,$A,0,0,0,0) call Equipment_to_build_A('crys',3,0,480,0,700,700,0,5000,0,0,0,370) call Equipment_to_build_A('stel',5,0,0,0,0,0,0,5000,0,0,0,370) call Equipment_to_build_B(0,0,0,0,0,$A) call Equipment_to_build_Zsx(LasBuildEquipId,$438) call Equipment_to_build_A('shcw',1,$2E18,0,760,0,0,0,0,0,0,0,260) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_A('bfhr',3,0,$E6,100,100,100,0,0,0,0,0,260) call Equipment_to_build_Zsx(LasBuildEquipId,260) call Equipment_to_build_A('blba',4,0,0,500,475,0,0,0,0,0,0,260) call Equipment_to_build_B(0,0,0,20,0,0) call Equipment_to_build_A('stwa',4,0,0,525,0,600,0,0,0,0,0,260) call Equipment_to_build_A('lure',4,0,0,20,20,20,$F,$3E8,0,0,0,20) call Equipment_to_build_A('hbth',5,0,0,25,25,25,0,0,0,0,0,40) call Equipment_to_build_A('vddl',5,0,50,0,0,0,0,$7D0,0,50,0,80) call Equipment_to_build_A('I0D1',5,0,0,0,0,$546,0,5000,$30D4,0,0,370) call Equipment_to_build_B($A,0,0,0,0,0) call Equipment_to_build_Mode("JDY2.mdx","chest") call Equipment_to_build_A('I0D2',5,0,0,$41A,0,$41A,0,0,0,275,0,380) call Equipment_to_build_C(0,$F,0,0,0,0,0,$F) call Equipment_to_build_Mode("GaiaWings.mdx","origin") call Equipment_to_build_A('pgin',1,$5014,$AF,$73A,0,0,0,0,0,0,0,380) call Equipment_to_build_B(0,0,0,0,0,$A) call Equipment_to_build_A('sbok',1,$639C,0,0,$73A,0,0,0,0,0,0,360) call Equipment_to_build_B(0,0,0,25,0,0) call Equipment_to_build_A('I0E5',1,$6D2E,0,0,$8FC,0,0,0,0,0,0,380) call Equipment_to_build_B(5,0,0,25,0,0) call Equipment_to_build_A('rej6',1,$5460,0,$618,$618,$618,18,0,0,0,0,370) call Equipment_to_build_B(6,0,0,0,0,0) call Equipment_to_build_A('srtl',4,0,0,$438,$438,$438,0,0,0,0,0,380) call Equipment_to_build_A('I0EB',4,0,0,$546,$546,$546,0,0,0,0,0,380) call Equipment_to_build_A('clfm',4,0,0,980,980,980,0,$30D4,0,0,0,360) call Equipment_to_build_C(0,0,0,0,0,0,0,$F) call Equipment_to_build_A('sor1',3,0,$F,85,85,85,0,0,0,0,25,$C8) call Equipment_to_build_A('rnsp',5,0,0,50,50,50,0,0,0,0,0,124) call Equipment_to_build_B(5,0,0,0,0,0) elseif i==16 then call Equipment_to_build_A('I0D4',5,7000,0,425,730,0,0,0,0,0,0,360) call Equipment_to_build_B(7,0,0,20,0,7) call Equipment_to_build_Mode("IllidanWings.mdx","chest") call Equipment_to_build_A('I0D5',4,0,0,$438,$438,0,0,0,0,0,0,360) call Equipment_to_build_B($A,0,0,0,0,0) call Equipment_to_build_A('I0D8',4,0,0,0,0,$4C9,0,$30D4,0,0,0,370) call Equipment_to_build_A('I0D9',2,0,830,$50A,540,0,-25,0,0,0,0,380) call Equipment_to_build_A('I00C',2,0,670,870,350,0,0,0,0,0,0,370) call Equipment_to_build_B(6,0,0,0,0,0) call Equipment_to_build_A('gmfr',1,$30D4,0,950,0,0,-$F,0,0,0,0,320) call Equipment_to_build_B(4,0,0,0,0,0) call Equipment_to_build_A('sehr',1,$4D58,0,$5C3,0,0,-20,0,0,0,0,340) call Equipment_to_build_B(6,0,0,0,0,0) call Equipment_to_build_A('cnhn',1,$6784,0,$974,0,0,-25,0,0,0,0,380) call Equipment_to_build_B($A,0,0,0,0,0) call Equipment_to_build_A('ckng',1,$2AF8,0,$4C9,0,0,0,0,0,0,0,340) call Equipment_to_build_C(5,0,0,0,0,0,$F,0) call Equipment_to_build_A('gopr',1,$2CEC,0,0,$4FB,0,0,$9C4,0,0,0,340) call Equipment_to_build_B(0,0,0,20,0,0) call Equipment_to_build_A('sorf',1,$5014,0,$6A4,0,940,-50,0,0,0,0,360) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_A('thle',1,$6F54,0,$8E8,0,$5AA,-50,0,0,0,0,380) call Equipment_to_build_B($A,0,0,0,0,0) call Equipment_to_build_A('sksh',1,6300,0,0,0,940,0,$7D0,0,0,0,260) call Equipment_to_build_A('ram4',1,$300C,0,0,0,$5D2,0,$9C4,0,0,0,300) call Equipment_to_build_A('rej5',1,$5208,0,0,0,$97E,0,5000,0,0,0,380) call Equipment_to_build_A('will',2,0,$E6,0,0,330,0,$7D0,0,0,0,260) call Equipment_to_build_B(5,0,0,0,0,0) elseif i==17 then call Equipment_to_build_A('skrt',1,$4074,0,0,$5AA,0,0,0,0,0,0,340) call Equipment_to_build_D(0,7.5,0,0,0,0,0) call Equipment_to_build_A('tkno',1,$86C4,0,$47E,$92E,0,0,0,0,0,0,380) call Equipment_to_build_B(8,0,0,0,0,0) call Equipment_to_build_D(0,$A,0,0,0,0,0) call Equipment_to_build_A('k3m1',3,0,290,0,330,0,0,$5DC,0,0,0,280) call Equipment_to_build_B(4.5,0,0,0,0,0) call Equipment_to_build_A('dthb',3,0,380,0,580,0,0,$9C4,0,0,0,340) call Equipment_to_build_B(6,0,0,0,0,0) call Equipment_to_build_A('sor6',3,0,260,$C8,0,340,0,0,0,0,0,280) call Equipment_to_build_A('sor7',3,0,340,310,0,590,0,0,0,0,0,340) call Equipment_to_build_A('stel',5,0,0,0,0,0,0,5000,0,0,0,370) call Equipment_to_build_B(0,0,0,0,0,$A) call Equipment_to_build_Zsx(LasBuildEquipId,$564) call Equipment_to_build_Mode("ShroudOfPersevarance.mdl","chest") call Equipment_to_build_A('rde2',1,$84D0,0,0,$8CA,0,0,$9C4,0,0,0,380) call Equipment_to_build_B($A,0,$A,0,0,0) call Equipment_to_build_A('rej4',1,$6338,0,0,0,$8CA,0,5000,0,0,0,380) call Equipment_to_build_B(0,0,$A,0,0,0) call Equipment_to_build_A('jpnt',2,0,450,490,$4BA,0,0,0,0,0,0,380) call Equipment_to_build_B($A,0,$A,0,0,0) call Equipment_to_build_A('sor8',2,0,590,380,0,$564,0,0,0,0,80,380) call Equipment_to_build_B($A,0,0,0,0,0) call Equipment_to_build_A('sclp',4,0,0,0,0,$438,0,$FA0,0,0,0,380) call Equipment_to_build_D(0,$A,0,0,0,0,0) call Equipment_to_build_A('bzbe',5,0,0,720,0,$5B4,0,0,0,0,0,380) call Equipment_to_build_B(8,8,0,0,0,0) call Equipment_to_build_Mode("BlackChakra.mdl","origin") call Equipment_to_build_A('rat3',1,$6C98,0,$41A,$938,0,0,0,0,0,0,380) call Equipment_to_build_B($A,0,$A,0,0,0) call Equipment_to_build_A('kybl',1,$7468,0,0,0,$94C,0,0,0,0,0,380) call Equipment_to_build_D($A,0,0,0,0,0,0) call Equipment_to_build_A('gcel',0,0,0,980,980,980,0,5000,0,0,0,380) call Equipment_to_build_A('I0EE',0,0,0,0,0,0,0,0,0,0,0,400) call Equipment_to_build_A('I0EF',0,0,0,0,0,0,0,0,0,0,0,400) call Equipment_to_build_A('I0DW',0,0,0,$67C,$67C,$67C,0,5000,0,0,0,400) call Equipment_to_build_D($A,0,0,0,0,0,0) elseif i==18 then call Equipment_to_build_A('bzbf',2,0,600,0,0,0,0,5000,5000,0,0,370) call Equipment_to_build_Zsx(LasBuildEquipId,790) call Equipment_to_build_A('shwd',4,0,0,990,975,975,0,0,0,0,0,370) call Equipment_to_build_B(6,6,0,25,0,0) call Equipment_to_build_A('esaz',3,0,590,975,350,0,0,0,0,0,0,380) call Equipment_to_build_B(0,0,0,0,0,$F) call Equipment_to_build_A('rde3',3,0,490,430,910,0,0,0,0,0,0,380) call Equipment_to_build_B($A,0,$A,0,0,0) call Equipment_to_build_A('wtlg',3,0,490,0,0,940,0,0,6000,0,0,380) call Equipment_to_build_B($A,0,0,0,0,0) call Equipment_to_build_A('k3m2',4,0,0,$5F5,$591,0,0,0,0,0,0,380) call Equipment_to_build_C(0,0,0,0,0,0,35,-35) call Equipment_to_build_A('sor3',1,$86C4,0,0,$8FC,0,0,5000,0,0,0,380) call Equipment_to_build_B(0,0,0,30,0,0) call Equipment_to_build_A('sor9',1,$6978,0,0,$8CA,0,0,0,0,0,0,380) call Equipment_to_build_B($A,$A,0,0,0,0) call Equipment_to_build_A('glsk',5,0,0,$4D8,540,540,0,0,0,-$E1,0,380) call Equipment_to_build_B(0,$F,0,0,0,0) call Equipment_to_build_Mode("purple abyss wing.mdl","chest") call Equipment_to_build_A('azhr',2,0,900,$47E,405,0,0,0,0,0,0,380) call Equipment_to_build_B(0,0,0,0,0,$A) call Equipment_to_build_A('dkfw',2,0,590,0,0,$564,0,0,8000,0,0,380) call Equipment_to_build_D(0,$B,0,0,0,0,0) call Equipment_to_build_A('I0F0',3,0,640,790,790,790,0,0,0,0,0,380) call Equipment_to_build_B(7.5,0,0,0,0,0) call Equipment_to_build_D(0,7.5,0,0,0,0,0) call Equipment_to_build_A('I0F1',2,0,740,0,0,0,0,0,$2710,0,0,380) call Equipment_to_build_C(0,0,0,0,0,0,0,-20) call Equipment_to_build_Zsx(LasBuildEquipId,$442) call Equipment_to_build_A('I0EX',5,0,0,0,0,0,0,5000,0,0,0,380) call Equipment_to_build_B(7,0,0,0,0,0) call Equipment_to_build_Zsx(LasBuildEquipId,$67C) call Equipment_to_build_Mode("cb6.mdl","chest") call Equipment_to_build_A('I0EZ',5,0,0,510,510,0,0,0,0,0,0,380) call Equipment_to_build_Zsx(LasBuildEquipId,$406) call Equipment_to_build_B(0,0,0,30,0,0) call Equipment_to_build_Mode("yh1.mdl","chest") call Equipment_to_build_A('I0EY',1,$6784,0,0,$870,0,0,0,0,0,0,380) call Equipment_to_build_B(8,0,0,25,0,0) call Equipment_to_build_A('I0F3',3,0,560,0,0,920,0,0,0,0,0,380) call Equipment_to_build_B(5,$A,0,0,0,0) call Equipment_to_build_A('rre2',4,0,0,$A,$A,$A,0,0,0,0,0,$A) call Equipment_to_build_A('I0F2',1,$765C,0,$9A6,0,0,0,0,0,0,0,380) call Equipment_to_build_B(8,0,20,0,0,0) call Equipment_to_build_A('I0EW',1,$927C,0,$79E,$76C,0,0,0,0,0,0,380) call Equipment_to_build_B(8,0,0,0,0,0) call Equipment_to_build_A('I0F8',1,$53FC,0,0,0,$99C,0,0,0,0,0,380) call Equipment_to_build_B($F,0,0,0,0,0) call Equipment_to_build_A('I0FA',1,$57E4,0,0,0,$99C,25,0,0,0,0,380) call Equipment_to_build_C(5,0,0,0,0,0,$A,0) call Equipment_to_build_A('I0FB',1,$67E8,0,$744,$744,$744,25,0,0,0,0,380) call Equipment_to_build_B($A,0,0,0,0,0) call Equipment_to_build_A('I0F7',1,$7AA8,0,980,$992,0,0,0,0,0,0,380) call Equipment_to_build_B($F,0,0,0,0,0) call Equipment_to_build_A('I0EV',1,$8E94,0,$802,$802,0,0,0,0,0,0,380) call Equipment_to_build_Zsx(LasBuildEquipId,500) call Equipment_to_build_B($F,0,0,0,0,0) call Equipment_to_build_A('I0CH',1,$59D8,0,$44C,$578,0,0,6500,0,0,0,360) call Equipment_to_build_B(0,$A,0,0,0,0) call Equipment_to_build_A('I0F9',3,0,320,610,945,0,0,0,0,0,0,380) call Equipment_to_build_B($F,0,0,0,0,8) call Equipment_to_build_A('I0F6',4,0,380,$659,$546,0,0,0,0,0,0,380) call Equipment_to_build_B(0,0,0,0,0,$F) call Equipment_to_build_A('I0F5',3,0,570,760,760,760,0,0,0,0,0,380) call Equipment_to_build_B(0,0,7.5,0,0,0) call Equipment_to_build_D(0,0,$A,0,0,0,0) call Equipment_to_build_A('I0FD',4,0,0,$62C,$62C,$62C,0,0,$3E8,0,0,380) call Equipment_to_build_A('I0F4',1,$A924,0,0,0,0,0,0,0,0,0,380) call Equipment_to_build_Zsx(LasBuildEquipId,$B22) call Equipment_to_build_A('I0FC',1,$A9EC,0,$A5A,0,0,0,0,0,0,0,380) call Equipment_to_build_B($A,0,0,0,0,0) call Equipment_to_build_A('I0ES',4,0,0,$60E,0,0,0,$2710,0,0,0,380) call Equipment_to_build_B($A,0,0,0,0,0) call Equipment_to_build_A('I0EU',4,0,0,0,$60E,0,0,$2710,0,0,0,380) call Equipment_to_build_B($A,0,0,0,0,0) call Equipment_to_build_A('I0ET',4,0,0,0,0,$60E,0,$2710,0,0,0,380) call Equipment_to_build_B($A,0,0,0,0,0) call Equipment_to_build_A('rma2',2,0,0,0,0,0,0,5000,0,0,0,380) call Equipment_to_build_Zsx(LasBuildEquipId,860) call Equipment_to_build_A('I0FG',0,0,0,0,0,0,0,5000,5000,0,0,1) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_Zsx(LasBuildEquipId,400) call Equipment_to_build_A('I0FF',0,0,0,$C8,$C8,$C8,0,5000,5000,0,0,1) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_A('I0FH',0,0,120,$B4,$B4,$B4,0,0,0,0,0,1) call Equipment_to_build_B(5,5,0,0,$F,0) call Equipment_to_build_A('I0FK',5,0,0,320,320,320,0,$BB8,$BB8,0,0,$F0) call Equipment_to_build_B(2,0,0,0,0,0) call Equipment_to_build_A('I0D7',3,0,670,$41A,620,0,0,0,0,0,0,380) call Equipment_to_build_A('I0FL',3,0,350,0,0,730,0,0,0,0,0,370) call Equipment_to_build_B(7,0,0,0,0,0) call Equipment_to_build_A('I0FO',4,0,0,710,710,710,0,0,0,0,0,370) call Equipment_to_build_B(7.5,0,0,0,0,0) call Equipment_to_build_A('I0FN',0,0,0,760,760,760,0,0,0,0,0,370) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_A('I0FM',1,$67E8,0,$4E2,$73A,0,0,0,0,0,0,370) call Equipment_to_build_B(6,0,0,0,0,0) call Equipment_to_build_A('I0FP',1,$9470,0,$60E,$9F6,0,0,0,0,0,0,390) call Equipment_to_build_B(0,0,100,20,0,0) call Equipment_to_build_A('I09Y',5,0,0,250,250,250,0,0,0,100,0,240) call Equipment_to_build_Mode("BloodyWings.mdx","Chest") call Equipment_to_build_A('I0CT',1,25000,0,750,1900,0,0,0,0,0,0,240) call Equipment_to_build_B(7,0,0,0,0,0) call Equipment_to_build_A('I0H8',1,12000,0,500,500,0,0,0,0,0,0,300) call Equipment_to_build_B(2,0,0,0,50,0) call Equipment_to_build_A('I0HB',0,0,0,800,800,800,0,0,0,0,0,370) call Equipment_to_build_B(6,0,0,0,0,0) call Equipment_to_build_D(0,0,0,0,0,0,20) call Equipment_to_build_A('I0HD',4,0,0,666,666,666,0,0,0,0,0,370) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_D(5,0,0,0,0,0,0) call Equipment_to_build_Zsx(LasBuildEquipId,666) call Equipment_to_build_A('I0HE',0,0,0,750,750,750,0,0,0,0,0,370) call Equipment_to_build_B(5,0,0,0,0,0) call Equipment_to_build_D(3,0,0,0,0,0,0) call Equipment_to_build_Zsx(LasBuildEquipId,300) call Equipment_to_build_A('I0HF',0,200,0,300,300,300,0,0,0,0,0,300) call Equipment_to_build_B(0,5,0,0,0,0) call Equipment_to_build_A('I0HF',0,300,0,600,600,600,0,0,0,0,0,360) call Equipment_to_build_B(4,10,0,0,0,0) call Equipment_to_build_A('I0HH',0,300,0,700,700,700,0,0,0,0,0,360) call Equipment_to_build_B(5,5,0,0,0,0) call Equipment_to_build_D(0,0,0,0,0,0,5) call Equipment_to_build_A('I0HI',5,100,0,150,150,150,0,0,0,0,0,250) call Equipment_to_build_B(3,0,0,0,0,0) call Equipment_to_build_A('I0HO',1,11000,0,500,900,0,0,0,0,0,0,350) call Equipment_to_build_B(0,0,5,20,0,0) call Equipment_to_build_A('I0HP',1,13000,0,0,0,0,0,0,0,0,0,350) call Equipment_to_build_B(0,0,5,10,0,0) call Equipment_to_build_Zsx(LasBuildEquipId,1000) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:640") endif endfunction function EquipState_onInit takes nothing returns nothing set Equip_Mode_t=malloc() set Equip_Type_t=malloc() set Equip_Attack_t=malloc() set Equip_Armor_t=malloc() set Equip_Str_t=malloc() set Equip_Agi_t=malloc() set Equip_Int_t=malloc() set Equip_ASPD_t=malloc() set Equip_HP_t=malloc() set Equip_MP_t=malloc() set Equip_HpRegen_t=malloc() set Equip_MpRegen_t=malloc() set Equip_MDG_t=malloc() set Equip_MDEF_t=malloc() set Equip_Crit_t=malloc() set Equip_CDG_t=malloc() set Equip_Dodge_t=malloc() set Equip_ADEF_t=malloc() set Equip_BCR_t=malloc() set Equip_DOT_t=malloc() set Equip_Property_Damage_t=malloc() set Equip_Lv_t=malloc() set Equip_zhushuxing_t=malloc() set Item_PickupOrDrop_event=malloc() set s__suit_V=malloc() call TriggerAddCondition(alloc__GX[(TRIGGER_PICKUP)],(Condition((function EquipState__ynv)))) call TriggerAddCondition(alloc__GX[(TRIGGER_DROP)],(Condition((function EquipState__yVv)))) call TimerStart((NewTimer(0)),.03125,true,function ymv) call ExecuteFunc("EquipTrigger_onInit") endfunction function CameraSetupApplyForceDurationBJ takes camerasetup whichSetup,boolean doPan,real forceDuration returns nothing if not SHOWINTERFACE then call CameraSetupApplyForceDuration(whichSetup,doPan,forceDuration) endif endfunction function Boss_Spell_allocate takes nothing returns integer local integer this=Boss_Spell_v[0] if this>0 then set Boss_Spell_v[0]=Boss_Spell_v[this] else set Boss_Spell_i=Boss_Spell_i+1 set this=Boss_Spell_i endif set Boss_Spell_v[this]=-1 return this endfunction function Boss_Spell_deallocate takes integer this returns nothing if this>0 and Boss_Spell_v[this]==-1 then set Boss_Spell_v[this]=Boss_Spell_v[0] set Boss_Spell_v[0]=this endif endfunction function A9v takes nothing returns boolean local real dx=GetDestructableX(GetFilterDestructable())-A3v local real dy=GetDestructableY(GetFilterDestructable())-A4v return(dx*dx+dy*dy<=bj_enumDestructableRadius) endfunction function Nvv takes itemtype Nev,integer Nxv returns nothing local group g set bj_stockPickedItemType=Nev set bj_stockPickedItemLevel=Nxv set g=CreateGroup() call GroupEnumUnitsOfType(g,"marketplace",A7v) call ForGroup(g,function UpdateEachStockBuildingEnum) call DestroyGroup(g) set g=null endfunction function Nov takes nothing returns nothing local integer pickedItemId local itemtype Nrv local integer Niv=0 local integer Nav=0 local integer Nxv set Nxv=1 loop if(bj_stockAllowedPermanent[Nxv])then set Nav=Nav+1 if(GetRandomInt(1,Nav)==1)then set Nrv=ITEM_TYPE_PERMANENT set Niv=Nxv endif endif if(bj_stockAllowedCharged[Nxv])then set Nav=Nav+1 if(GetRandomInt(1,Nav)==1)then set Nrv=ITEM_TYPE_CHARGED set Niv=Nxv endif endif if(bj_stockAllowedArtifact[Nxv])then set Nav=Nav+1 if(GetRandomInt(1,Nav)==1)then set Nrv=ITEM_TYPE_ARTIFACT set Niv=Nxv endif endif set Nxv=Nxv+1 exitwhen Nxv>$A endloop if(Nav==0)then set Nrv=null return endif call Nvv(Nrv,Niv) set Nrv=null endfunction function Nnv takes nothing returns nothing call Nov() call TimerStart(bj_stockUpdateTimer,bj_STOCK_RESTOCK_INTERVAL,true,function Nov) endfunction function NEv takes nothing returns boolean return true endfunction function NIv takes nothing returns integer call TriggerEvaluate(ADv) return Ayv endfunction function NAv takes integer NNv,integer Nbv returns nothing set Eev[Evv[NNv]]=Nbv set Evv[Nbv]=Evv[NNv] set Evv[NNv]=Nbv set Eev[Nbv]=NNv endfunction function NBv takes nothing returns integer call TriggerEvaluate(AFv) return Ayv endfunction function Ncv takes integer NNv returns nothing set AWv=NNv call TriggerEvaluate(Agv) endfunction function NCv takes integer NNv returns nothing set AWv=NNv call TriggerEvaluate(AGv) endfunction function BVv takes nothing returns nothing call TriggerEvaluate(RSv) endfunction function BEv takes unit u,real x,real y,real z,unit t,real d,string fx,real sc,real sp,real ac returns nothing set Asv=u set Akv=x set AKv=y set Alv=z set ASv=t set ALv=d set AQv=fx set Amv=sc set AMv=sp set Apv=ac call TriggerEvaluate(Rtv) endfunction function BXv takes nothing returns nothing call TriggerEvaluate(Rqv) endfunction function BOv takes integer NNv returns nothing set Ahv=NNv call TriggerEvaluate(RQv) endfunction function BRv takes real sX,real sY,real sZ,real tZ,real di,real a,real BIv,real ar,real cv returns integer set Akv=sX set AKv=sY set Alv=sZ set ALv=tZ set Amv=di set AMv=a set Apv=BIv set APv=ar set Aqv=cv call TriggerEvaluate(Rsv) return Ayv endfunction function BNv takes integer NNv returns boolean set AWv=NNv call TriggerEvaluate(RPv) return AZv endfunction function BCv takes integer NNv returns nothing set qt[NNv]=0 set Qt[NNv]=0 endfunction function Bdv takes integer NNv,real BDv,real Bfv returns nothing set AWv=NNv set Akv=BDv set AKv=Bfv call TriggerEvaluate(RLv) endfunction function BFv takes integer NNv returns nothing set AWv=NNv call TriggerEvaluate(RJv) endfunction function Bgv takes integer NNv returns nothing set AWv=NNv call TriggerEvaluate(Rkv) endfunction function BGv takes string Bhv,unit s,unit t returns integer set AQv=Bhv set Asv=s set ASv=t call TriggerEvaluate(RKv) return Ayv endfunction function Bmv takes nothing returns nothing call TriggerEvaluate(Rfv) endfunction function BMv takes nothing returns nothing call TriggerEvaluate(RDv) endfunction function Bpv takes nothing returns nothing call TriggerEvaluate(Rdv) endfunction function BPv takes nothing returns nothing call TriggerEvaluate(RBv) endfunction function Bqv takes nothing returns nothing call TriggerEvaluate(Rcv) endfunction function BQv takes nothing returns nothing call TriggerEvaluate(RCv) endfunction function Bsv takes nothing returns nothing call TriggerEvaluate(Rbv) endfunction function BSv takes integer NNv returns boolean set AWv=NNv call TriggerEvaluate(RAv) return AZv endfunction function Btv takes unit u returns nothing set Asv=u call TriggerEvaluate(RNv) endfunction function Buv takes nothing returns nothing call TriggerEvaluate(RIv) endfunction function BUv takes nothing returns nothing call TriggerEvaluate(ROv) endfunction function Bwv takes nothing returns nothing call TriggerEvaluate(RXv) endfunction function BWv takes integer Byv,integer BYv returns nothing set Ahv=Byv set AHv=BYv call TriggerEvaluate(Rnv) endfunction function Bzv takes nothing returns nothing call TriggerEvaluate(RVv) endfunction function BZv takes nothing returns nothing call TriggerEvaluate(REv) endfunction function B_v takes unit u returns nothing set Asv=u call TriggerEvaluate(Riv) endfunction function B0v takes unit u returns nothing set Asv=u call TriggerEvaluate(Rav) endfunction function B1v takes unit u returns nothing set Asv=u call TriggerEvaluate(Rrv) endfunction function B2v takes nothing returns nothing call TriggerEvaluate(Rov) endfunction function B3v takes integer NNv returns unit set AWv=NNv call TriggerEvaluate(Rev) return AYv endfunction function B5v takes unit u returns nothing set Asv=u call TriggerEvaluate(Rvv) endfunction function B6v takes unit NZv,unit N7v,integer B7v returns nothing set Asv=NZv set ASv=N7v set Ahv=B7v call TriggerEvaluate(O8v) endfunction function B9v takes unit u returns nothing set Asv=u call TriggerEvaluate(O7v) endfunction function cvv takes nothing returns nothing call TriggerEvaluate(O4v) endfunction function cev takes real cxv returns nothing set Akv=cxv call TriggerEvaluate(O5v) endfunction function cov takes nothing returns nothing call TriggerEvaluate(O6v) endfunction function crv takes nothing returns nothing call TriggerEvaluate(O3v) endfunction function civ takes integer NNv returns unit set AWv=NNv call TriggerEvaluate(O1v) return AYv endfunction function cav takes nothing returns nothing call TriggerEvaluate(O2v) endfunction function cnv takes nothing returns nothing call TriggerEvaluate(O0v) endfunction function cVv takes nothing returns nothing call TriggerEvaluate(O_v) endfunction function cEv takes nothing returns nothing call TriggerEvaluate(OZv) endfunction function cXv takes real x,real y returns nothing set Akv=x set AKv=y call TriggerEvaluate(Ozv) endfunction function cOv takes integer NNv returns unit set AWv=NNv call TriggerEvaluate(OYv) return AYv endfunction function cRv takes unit u returns nothing set Asv=u call TriggerEvaluate(Oyv) endfunction function cIv takes unit c returns nothing set Asv=c call TriggerEvaluate(OWv) endfunction function cAv takes nothing returns nothing call TriggerEvaluate(OUv) endfunction function cNv takes integer NNv returns nothing set Ahv=NNv call TriggerEvaluate(Owv) endfunction function cbv takes nothing returns nothing call TriggerEvaluate(Ouv) endfunction function cBv takes nothing returns nothing call TriggerEvaluate(OTv) endfunction function ccv takes nothing returns nothing call TriggerEvaluate(OSv) endfunction function cCv takes nothing returns nothing call TriggerEvaluate(Otv) endfunction function cgv takes unit s,unit t,real Njv returns nothing set Asv=s set ASv=t set Akv=Njv call TriggerEvaluate(OPv) endfunction function cGv takes real x,real y returns nothing set Akv=x set AKv=y call TriggerEvaluate(Opv) endfunction function chv takes nothing returns nothing call TriggerEvaluate(OMv) endfunction function cHv takes unit u returns nothing set Asv=u call TriggerEvaluate(Omv) endfunction function cjv takes nothing returns nothing call TriggerEvaluate(Olv) endfunction function cJv takes unit ckv returns nothing set Asv=ckv call TriggerEvaluate(OLv) endfunction function cKv takes real x,real y returns nothing set Akv=x set AKv=y call TriggerEvaluate(OKv) endfunction function clv takes real x,real y returns nothing set Akv=x set AKv=y call TriggerEvaluate(Okv) endfunction function cLv takes integer NNv returns boolean set AWv=NNv call TriggerEvaluate(OJv) return AZv endfunction function cmv takes nothing returns nothing call TriggerEvaluate(OHv) endfunction function cMv takes real x,real y returns nothing set Akv=x set AKv=y call TriggerEvaluate(Ojv) endfunction function cpv takes nothing returns nothing call TriggerEvaluate(Ohv) endfunction function cPv takes unit ckv returns nothing set Asv=ckv call TriggerEvaluate(OGv) endfunction function cqv takes nothing returns nothing call TriggerEvaluate(Ogv) endfunction function cSv takes integer NNv returns unit set AWv=NNv call TriggerEvaluate(ODv) return AYv endfunction function ctv takes unit u returns nothing set Asv=u call TriggerEvaluate(Ofv) endfunction function cuv takes nothing returns nothing call TriggerEvaluate(Odv) endfunction function cUv takes unit u returns nothing set Asv=u call TriggerEvaluate(OBv) endfunction function cwv takes unit u returns nothing set Asv=u call TriggerEvaluate(Ocv) endfunction function cZv takes nothing returns nothing call TriggerEvaluate(OAv) endfunction function c4v takes integer NNv returns unit set AWv=NNv call TriggerEvaluate(Onv) return AYv endfunction function Cgv takes integer NNv returns unit set AWv=NNv call TriggerEvaluate(XQv) return AYv endfunction function CKv takes unit u returns nothing set Asv=u call TriggerEvaluate(XMv) endfunction function Clv takes nothing returns nothing call TriggerEvaluate(Xmv) endfunction function Cpv takes integer NNv,integer v returns nothing set AWv=NNv set Ahv=v call TriggerEvaluate(XKv) endfunction function Csv takes player p returns integer return GetPlayerId(p) endfunction function CSv takes integer NNv,real Ctv,real cyv returns nothing set AWv=NNv set Akv=Ctv set AKv=cyv call TriggerEvaluate(Xhv) endfunction function CTv takes real Cuv,real cyv,real x,real y,real r returns nothing set Akv=Cuv set AKv=cyv set Alv=x set ALv=y set Amv=r call TriggerEvaluate(XHv) endfunction function CUv takes integer NNv,integer r,integer g,integer b,real cyv returns nothing set AWv=NNv set Ahv=r set AHv=g set Ajv=b set Akv=cyv call TriggerEvaluate(Xjv) endfunction function dev takes unit u,integer a,integer b,real cyv returns boolean set Asv=u set Ahv=a set AHv=b set Akv=cyv call TriggerEvaluate(XEv) return AZv endfunction function dxv takes unit u,boolean i returns nothing set Asv=u set ATv=i call TriggerEvaluate(XVv) endfunction function dJv takes integer NNv returns player return P[Kc[NNv]] endfunction function dKv takes integer NNv returns integer set AWv=NNv call TriggerEvaluate(Ezv) return Ayv endfunction function dmv takes integer NNv returns integer set AWv=NNv call TriggerEvaluate(Edv) return Ayv endfunction function dMv takes integer NNv,real v returns nothing set AWv=NNv set Akv=v call TriggerEvaluate(EDv) endfunction function dQv takes integer NNv returns boolean return PB[NNv] endfunction function s__PlayerColorString___S__allocate takes nothing returns integer local integer NNv=hX if(NNv!=0)then set hX=jX[NNv] else set HX=HX+1 set NNv=HX endif if(NNv>8190)then call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,1000.,"Unable to allocate id for an object of type: PlayerColorString___S") return 0 endif set jX[NNv]=-1 return NNv endfunction function Dwv takes code DWv returns nothing call TriggerAddCondition(DX,Filter(DWv)) endfunction function Dzv takes nothing returns boolean local integer id=GetHandleId(GetTriggerEventId())-261 set CX=GetPlayerId(GetTriggerPlayer()) set bX=id/ 2 set BX=bX*2==id set FX[CX+bX*$C]=BX return false endfunction function DZv takes nothing returns nothing local player p local integer i=$C local trigger t=DX loop set i=i-1 set p=Player(i) if GetPlayerSlotState(p)==PLAYER_SLOT_STATE_PLAYING and GetPlayerController(p)==MAP_CONTROL_USER then call TriggerRegisterPlayerEvent(t,p,EVENT_PLAYER_ARROW_LEFT_DOWN) call TriggerRegisterPlayerEvent(t,p,EVENT_PLAYER_ARROW_LEFT_UP) call TriggerRegisterPlayerEvent(t,p,EVENT_PLAYER_ARROW_RIGHT_DOWN) call TriggerRegisterPlayerEvent(t,p,EVENT_PLAYER_ARROW_RIGHT_UP) call TriggerRegisterPlayerEvent(t,p,EVENT_PLAYER_ARROW_DOWN_DOWN) call TriggerRegisterPlayerEvent(t,p,EVENT_PLAYER_ARROW_DOWN_UP) call TriggerRegisterPlayerEvent(t,p,EVENT_PLAYER_ARROW_UP_DOWN) call TriggerRegisterPlayerEvent(t,p,EVENT_PLAYER_ARROW_UP_UP) endif exitwhen i==0 endloop call TriggerAddCondition(DX,Filter((function Dzv))) set p=null set t=null endfunction function D_v takes code DWv returns nothing call TriggerAddCondition(DX,Filter((DWv))) endfunction function D0v takes nothing returns integer return CX endfunction function D1v takes nothing returns integer return bX endfunction function IsEventArrowKeyPressed takes nothing returns boolean return BX endfunction function fiv takes boolean b returns nothing local integer i=8 set av=b if not SHOWINTERFACE then loop set i=i-1 if MV[i]!=null then call SetUnitInvulnerable(MV[i],b) call PauseUnit(MV[i],b) endif exitwhen i==0 endloop if b then if not bj_cineModeAlreadyIn then set bj_cineModeAlreadyIn=true set bj_cineModePriorFogSetting=IsFogEnabled() set bj_cineModePriorMaskSetting=IsFogMaskEnabled() set bj_cineModePriorDawnDusk=IsDawnDuskEnabled() endif call ClearTextMessages() call ShowInterface(false,bj_CINEMODE_INTERFACEFADE) call EnableUserControl(false) call EnableOcclusion(false) call SetCineModeVolumeGroupsBJ() call FogMaskEnable(false) call FogEnable(false) call EnableDawnDusk(false) call CinematicFadeBJ(2,1.,"ReplaceableTextures\\CameraMasks\\Black_mask.blp",0,0,0,0) else set bj_cineModeAlreadyIn=false set i=8 call ShowInterface(true,bj_CINEMODE_INTERFACEFADE) call EnableUserControl(true) call EnableOcclusion(true) call VolumeGroupReset() call EndThematicMusic() call FogMaskEnable(bj_cineModePriorMaskSetting) call FogEnable(bj_cineModePriorFogSetting) call EnableDawnDusk(bj_cineModePriorDawnDusk) call ResetToGameCamera(0) loop set i=i-1 if Gg[(i)]!=0 then if GetLocalPlayer()==P[i]then call SetCameraField(CAMERA_FIELD_TARGET_DISTANCE,Gg[(i)],0) endif endif exitwhen i==0 endloop endif endif endfunction function Gov takes nothing returns boolean if GetWidgetLife(GetFilterItem())<.405 then set IO[AO]=GetFilterItem() set AO=AO+1 endif return false endfunction function Grv takes nothing returns nothing call EnumItemsInRect(WorldBounds,RO,null) if AO>0 then loop set AO=AO-1 call SetWidgetLife(IO[AO],1) call RemoveItemG(IO[AO]) set IO[AO]=null exitwhen AO==0 endloop endif endfunction function Giv takes nothing returns nothing set RO=Filter(function Gov) call TimerStart(OO,$F,true,function Grv) endfunction function Globals_Shield_Remove takes integer id returns boolean if Globals_Shield_Timer[id]!=null then call ReleaseTimer(Globals_Shield_Timer[id],"[TimerUtils]Error:1") call UnitRemoveAbilityandBuffBY((Je[(id)]),Globals_Shield_af[id],Globals_Shield_bf[id]) call s__Trig_remove((Globals_Shield_Trig[id])) call Unit_Cancel_Counter(1,(id)) set Globals_Shield_Timer[id]=null return true endif return false endfunction function Globals_Shield_Func takes nothing returns nothing local integer id=(pF) if Globals_Shield_Life[id]>GetDamage()then set Globals_Shield_Life[id]=Globals_Shield_Life[id]-GetDamage() set KF[HF]=PF+1000000. else call DamageMinus(Globals_Shield_Life[id]) call Globals_Shield_Remove(id) endif endfunction function Globals_Shield_Expired takes nothing returns nothing call Globals_Shield_Remove(((alloc__hpv(GetHandleId((GetExpiredTimer())))))) endfunction function Globals_Shield_Add takes unit u,real h,real time,integer af,integer bf returns nothing local integer id=(GetUnitUserData((u))) if Globals_Shield_Timer[id]==null then set Globals_Shield_Timer[id]=NewTimer(id) set Globals_Shield_Trig[id]=UnitAddShieldTrigB((id),function Globals_Shield_Func) call UnitAddAbilityBY(u,af) set Globals_Shield_af[id]=af set Globals_Shield_bf[id]=bf call Unit_App_Counter(2,(id)) else if af!=Globals_Shield_af[id]then call UnitRemoveAbilityandBuffBY((Je[(id)]),Globals_Shield_af[id],Globals_Shield_bf[id]) call UnitAddAbilityBY(u,af) set Globals_Shield_af[id]=af set Globals_Shield_bf[id]=bf endif endif set Globals_Shield_Life[id]=h call TimerStart(Globals_Shield_Timer[id],time,false,function Globals_Shield_Expired) endfunction function GDv takes nothing returns integer return D9v(kO) endfunction function Gfv takes integer NNv returns nothing call fvv(NNv) endfunction function GFv_v takes unit u returns nothing local integer id=(GetUnitUserData((u))) local integer data if gO_3[id]>0 then set gO_3[id]=0 set data=J[kO] loop exitwhen data==0 if gO_2[data]==id then if GO[data]!=null then call DestroyEffect(GO[data]) set GO[data]=null endif set gO_2[data]=0 set gO[data]=null set JO[data]=0 call fvv((data)) endif set data=K[data] endloop endif endfunction function GFv takes nothing returns boolean local integer NNv=J[kO] local real x local real y loop exitwhen 0==NNv set hO[NNv]=hO[NNv]-1 if MB[(GetUnitUserData((gO[NNv])))]then set hO[NNv]=0 else if JO[NNv]>0 then set x=GetUnitX(gO[NNv])+JO[NNv]*HO[NNv] set y=GetUnitY(gO[NNv])+JO[NNv]*jO[NNv] set JO[NNv]=.8*JO[NNv]-.125 else set x=GetUnitX(gO[NNv])+HO[NNv] set y=GetUnitY(gO[NNv])+jO[NNv] endif if IsTerrainWalkable(x,y)then call SetUnitX(gO[NNv],x) call SetUnitY(gO[NNv],y) endif endif if hO[NNv]<=0 then if GO[NNv]!=null then call DestroyEffect(GO[NNv]) set GO[NNv]=null endif set gO_3[gO_2[NNv]]=gO_3[gO_2[NNv]]-1 set gO_2[NNv]=0 set gO[NNv]=null set JO[NNv]=0 call fvv((NNv)) endif set NNv=K[NNv] endloop return false endfunction function Ggv takes nothing returns nothing set kO=fxv(function GFv) endfunction function GGv takes unit nU,real nD,real a,real Ghv returns nothing local integer NNv local real p local integer id=(GetUnitUserData((nU))) if not MB[id]and GetUnitMoveSpeed(nU)>0 then set NNv=(D9v(kO)) set gO_3[id]=gO_3[id]+1 set gO_2[NNv]=id set gO[NNv]=nU set hO[NNv]=R2I(32*Ghv) set p=nD/ hO[NNv] set HO[NNv]=p*Cos(a) set jO[NNv]=p*Sin(a) endif endfunction function GHv takes unit nU,real nD,real a,real Ghv,string sf returns nothing local integer NNv local real p local integer id=(GetUnitUserData((nU))) if not MB[id]and GetUnitMoveSpeed(nU)>0 then set NNv=(D9v(kO)) set gO_3[id]=gO_3[id]+1 set gO_2[NNv]=id set gO[NNv]=nU set GO[NNv]=AddSpecialEffectTarget(sf,nU,"origin") set hO[NNv]=R2I(32*Ghv) if hO[NNv]<1 then set hO[NNv]=1 endif set p=nD/ hO[NNv] set HO[NNv]=p*Cos(a) set jO[NNv]=p*Sin(a) endif endfunction function Gjv takes unit nU,real s,real a,real Ghv,string sf returns nothing local integer NNv local real p local integer id=(GetUnitUserData((nU))) if not MB[id]and GetUnitMoveSpeed(nU)>0 then set NNv=(D9v(kO)) set gO_3[id]=gO_3[id]+1 set gO_2[NNv]=id set gO[NNv]=nU set GO[NNv]=AddSpecialEffectTarget(sf,nU,"origin") set hO[NNv]=R2I(32*Ghv) if hO[NNv]<1 then set hO[NNv]=1 endif set JO[NNv]=s set HO[NNv]=Cos(a) set jO[NNv]=Sin(a) endif endfunction function GJv takes unit nU,real px,real py,real Ghv returns nothing local integer NNv local real p local real dx local real dy local real a local integer id=(GetUnitUserData((nU))) if not MB[id]and GetUnitMoveSpeed(nU)>0 then set NNv=(D9v(kO)) set dx=px-GetUnitX(nU) set dy=py-GetUnitY(nU) set a=Atan2(dy,dx) set gO_3[id]=gO_3[id]+1 set gO_2[NNv]=id set gO[NNv]=nU set hO[NNv]=R2I(32*Ghv) if hO[NNv]<1 then set hO[NNv]=1 endif set p=SquareRoot(dx*dx+dy*dy)/ hO[NNv] set HO[NNv]=p*Cos(a) set jO[NNv]=p*Sin(a) endif endfunction function UnitMoveToADistanceByTarget takes unit nU,real px,real py,real nD returns nothing local real x local real y local real dx local real dy local real a if not MB[(GetUnitUserData((nU)))]and GetUnitMoveSpeed(nU)>0 then set x=GetUnitX(nU) set y=GetUnitY(nU) set dx=px-x set dy=py-y set a=SquareRoot(dx*dx+dy*dy) if a0 then if not IsTerrainWalkable(x,y)then set x=IsTerrainWalkable_X set y=IsTerrainWalkable_Y endif call SetUnitX(nU,x) call SetUnitY(nU,y) endif endfunction function Lwv takes nothing returns nothing call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:2") call RemoveUnitBJ(Bx,1) set Bx=null endfunction function Luv takes integer LUv returns nothing if Bx==null then set CR=false set Bx=CreateUnit(Player($F),'e001',0,0,0) set CR=true call TimerStart((NewTimer(0)),.0,false,function Lwv) endif call UnitAddAbility(Bx,LUv) endfunction function mYv takes real r returns string local string s=R2S(r) return SubString(s,0,StringLength(s)-2) endfunction function mVv takes nothing returns integer return D9v(SI) endfunction function mEv takes integer NNv returns nothing call fvv(NNv) endfunction function mXv takes nothing returns boolean local integer NNv=J[SI] loop exitwhen 0==NNv set QI[NNv]=QI[NNv]-8 call Lfv(qI[NNv],$AF,$AF,$AF,QI[NNv]) if QI[NNv]<1 then call LTv(qI[NNv]) call fvv((NNv)) endif set NNv=K[NNv] endloop return false endfunction function mOv takes nothing returns nothing set SI=fxv(function mXv) endfunction function CreatePhantom takes integer Cjv,integer an,real x,real y,real a returns integer local integer NNv=(D9v(SI)) set qI[NNv]=LVv(Cjv,x,y,a) set QI[NNv]=$A0 call SetUnitAnimationByIndex(II[qI[NNv]],an) call Lfv(qI[NNv],$AF,$AF,$AF,$9B) return qI[NNv] endfunction function mAv takes nothing returns nothing local integer i=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:3") call UnitRemoveAbility((Je[(i)]),Control_bfid[i]) set Control_Timer[i]=null set Control_use[i]=false set Control_abid[i]=0 set Control_bfid[i]=0 endfunction function UnitCloseControl takes integer i returns nothing call ReleaseTimer(Control_Timer[i],"[TimerUtils]Error:4") call UnitRemoveAbility((Je[(i)]),Control_bfid[i]) set Control_Timer[i]=null set Control_use[i]=false set Control_abid[i]=0 set Control_bfid[i]=0 endfunction function UnitOpenControl takes integer i,integer abid,integer bfid,real timed returns nothing if Control_Timer[i]==null then set Control_Timer[i]=NewTimer(i) endif set Control_use[i]=true set Control_abid[i]=abid set Control_bfid[i]=bfid call Auxiliary_TargetOrder((abid),null,1,$D0107,(Je[(i)])) call TimerStart(Control_Timer[i],timed,false,function mAv) endfunction function IsUnitBeControlled takes integer i returns boolean return Control_use[i] endfunction function GetControllTypePriority takes integer i returns integer if HaveSavedInteger(BYHT,Control_priority,i)then return LoadInteger(BYHT,Control_priority,i) endif return $F endfunction function SetControllTypePriority takes integer i,integer lv returns nothing call SaveInteger(BYHT,Control_priority,i,lv) endfunction function GetUnitBeControlType takes integer i returns integer return Control_abid[i] endfunction function mIv takes unit u returns integer return Control_abid[(GetUnitUserData((u)))] endfunction function mNv takes nothing returns boolean local integer i if IsUnitInGroup(GetTriggerUnit(),h_v_Group)then set i=(GetUnitUserData((GetTriggerUnit()))) if((Control_use[(i)]))then call UnitCloseControl(i) endif endif return false endfunction function mbv takes nothing returns boolean set Control_Timer[(le)]=NewTimer((le)) return false endfunction function mBv takes nothing returns boolean if Control_Timer[(le)]!=null then call ReleaseTimer(Control_Timer[(le)],"[TimerUtils]Error:5") set Control_Timer[(le)]=null set Control_use[(le)]=false set Control_abid[(le)]=0 set Control_bfid[(le)]=0 endif return false endfunction function mcv takes nothing returns nothing set Control_priority=malloc() call h4v(Condition(function mBv),BR) call RegisterEvent(EVENT_PLAYER_UNIT_DEATH,function mNv) call SaveInteger(BYHT,Control_priority,('ACfb'),(0)) call SaveInteger(BYHT,Control_priority,('A00P'),(1)) endfunction function mCv takes unit u returns boolean return Control_use[(GetUnitUserData((u)))] endfunction function mdv takes unit u returns real local integer i=(GetUnitUserData((u))) if((Je[(i)])!=u)then call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,60,"STUN ERROR: INVALID UNIT") return .0 endif if(Control_use[i])then return TimerGetRemaining(Control_Timer[i]) endif return .0 endfunction function mDv takes unit u,real cxv returns nothing local integer i=(GetUnitUserData((u))) if((Je[(i)])!=u)then call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,60,"STUN ERROR: INVALID UNIT") return endif if(Control_use[i])then set cxv=cxv+TimerGetRemaining(Control_Timer[i]) call TimerStart(Control_Timer[i],cxv,false,function mAv) else call UnitOpenControl(i,'A500','B500',cxv) endif endfunction function mfv takes unit u,real cxv,integer af,integer bf returns boolean local integer i=(GetUnitUserData((u))) if(cxv<0)then call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,60,"STUN ERROR: INVALID TIME") return false endif if((Je[(i)])!=u)then call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,60,"STUN ERROR: INVALID UNIT") return false endif if GetUnitTypeId(u)=='ushd' and bf!='Bfrz' then set cxv=0 endif if cxv>0 then call UnitOpenControl(i,af,bf,cxv) elseif Control_use[i]then call UnitCloseControl(i) endif return Control_use[i] endfunction function mFv takes unit u returns nothing call TimerStart(Control_Timer[(GetUnitUserData((u)))],.25,false,function mAv) endfunction function mzv takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:6") call PauseUnit((Je[(id)]),false) call Unit_Cancel_Counter(3,id) endfunction function mZv takes unit u,string st,real d returns nothing local integer id=(GetUnitUserData((u))) call PauseUnit(u,true) call SetUnitAnimation(u,st) call QueueUnitAnimation(u,"stand") call TimerStart(NewTimer(id),d,false,function mzv) call Unit_App_Counter(4,id) endfunction function m_v takes unit u,boolean d returns nothing call SetUnitPathing(u,not d) call PauseUnit(u,d) call SetUnitInvulnerable(u,d) endfunction function m1v takes unit u,real cxv returns boolean local integer mmv=(GetUnitUserData((u))) if UnitAlive(u)and Hc[mmv]then if IsUnitType(u,UNIT_TYPE_GIANT)or IsUnitType(u,UNIT_TYPE_HERO)then set cxv=.3*cxv endif if not(PB[(mmv)])and not MB[mmv]and GetControllTypePriority((Control_abid[(mmv)]))>=$F and cxv>mdv(u)then return mfv(u,cxv,'A500','B500') endif endif return false endfunction function m2v takes unit u,real timed,integer a,integer b,boolean r returns boolean local integer mmv=(GetUnitUserData((u))) if UnitAlive(u)and Hc[mmv]then if not r then if IsUnitType(u,UNIT_TYPE_GIANT)or IsUnitType(u,UNIT_TYPE_HERO)then set timed=.3*timed endif endif if not(PB[(mmv)])and not MB[mmv]and GetControllTypePriority((Control_abid[(mmv)]))>=GetControllTypePriority(a)and timed>mdv(u)then return mfv(u,timed,a,b) endif endif return false endfunction function m3v takes unit u,real timed,integer a,integer b returns boolean local integer mmv=(GetUnitUserData((u))) if UnitAlive(u)and Hc[mmv]then if not(PB[(mmv)])and GetControllTypePriority((Control_abid[(mmv)]))>=GetControllTypePriority(a)and timed>mdv(u)then return mfv(u,timed,a,b) endif endif return false endfunction function mgv takes nothing returns integer return D9v(yI) endfunction function mGv takes integer NNv returns nothing call fvv(NNv) endfunction function mhv takes nothing returns boolean local integer NNv=J[yI] local integer fx local integer i local real pX local real pY local real a loop exitwhen 0==NNv set i=$A if wI[NNv]>hx then set wI[NNv]=wI[NNv]-Jx set WI[NNv]=WI[NNv]-.125 loop set i=i-1 set a=WI[NNv]-i*bj_PI/ 5 set fx=LoadInteger(BYHT,TI[NNv],i) set pX=uI[NNv]+wI[NNv]*Cos(a) set pY=UI[NNv]+wI[NNv]*Sin(a) call SetUnitFacing(II[(fx)],((Atan2(pY-(GetUnitY(II[(fx)])),pX-(GetUnitX(II[(fx)]))))*1.)*bj_RADTODEG) call LKv(fx,pX) call Llv(fx,pY) call SetUnitFlyHeight(II[(fx)],(((GetUnitFlyHeight(II[(fx)]))-kx)*1.),0) exitwhen i==0 endloop else call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Items\\AIvi\\AIviTarget.mdl",uI[NNv],UI[NNv])) loop set i=i-1 call Ltv((LoadInteger(BYHT,TI[NNv],i))) exitwhen i==0 endloop call free(TI[NNv]) call fvv((NNv)) endif set NNv=K[NNv] endloop return false endfunction function mHv takes nothing returns nothing set yI=fxv(function mhv) endfunction function mjv takes real pX,real pY,real sA returns nothing local integer NNv=(D9v(yI)) local integer i=$A local integer fx local real a set TI[NNv]=malloc() set uI[NNv]=pX set UI[NNv]=pY set wI[NNv]=Gx set WI[NNv]=sA loop set i=i-1 set a=WI[NNv]-i*bj_PI/ 5 set fx=Lnv(pX+wI[NNv]*Cos(a),pY+wI[NNv]*Sin(a),a+bj_PI/ 2) call LMv(fx,"Abilities\\Spells\\Other\\Tornado\\Tornado_Target.mdl") call SetUnitScale(II[(fx)],((2.5)*1.),0,0) call SetUnitFlyHeight(II[(fx)],((Hx)*1.),0) call LHv(fx,Kx) call SaveInteger(BYHT,TI[NNv],i,fx) exitwhen i==0 endloop endfunction function m4v_func takes nothing returns nothing call PauseUnit((Je[(ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:7"))]),true) endfunction function m4v takes unit c returns nothing call TimerStart(NewTimer((GetUnitUserData((c)))),0,false,function m4v_func) endfunction function m5v takes real m6v,real m7v,real m8v,real m9v returns nothing local rect r=Rect(m6v,m7v,m8v,m9v) call FogModifierStart(CreateFogModifierRect(P[0],FOG_OF_WAR_VISIBLE,r,true,false)) call RemoveRect(r) set r=null endfunction function Mvv takes unit s,unit t returns real return Atan2(GetUnitY(t)-GetUnitY(s),GetUnitX(t)-GetUnitX(s)) endfunction function Mev takes unit s,unit t returns real local real dX=GetUnitX(t)-GetUnitX(s) local real dY=GetUnitY(t)-GetUnitY(s) return SquareRoot(dX*dX+dY*dY) endfunction function Mxv takes real dX,real dY returns real return SquareRoot(dX*dX+dY*dY) endfunction function ParabolicBY takes real x,real d,real h returns real return 4*h*x*(d-x)/(d*d) endfunction function ParabolicBYRatio takes real h,real t returns real return 4*h*t*(1-t) endfunction function BezierCurveBYQuadratic takes real a,real b,real c,real t returns real return a+(2*(b-a)+(a-2*b+c)*t)*t endfunction function BezierCurveBYCube takes real a,real b,real c,real d,real t returns real return a+(3*(b-a)+(3*(a-2*b+c)+(3*(b-c)+d-a)*t)*t)*t endfunction function Mav takes real a,real b,real o returns boolean return Cos(a-b)>=Cos(o) endfunction function MBv takes real px,real py,real cx,real cy,real ax,real ay,real bx,real by returns boolean local real Mcv=(px-cx)*(ax-cx)+(py-cy)*(ay-cy) local real MCv=(ax-cx)*(ax-cx)+(ay-cy)*(ay-cy) local real Mdv=(px-cx)*(bx-cx)+(py-cy)*(by-cy) local real MDv=(bx-cx)*(bx-cx)+(by-cy)*(by-cy) return Mcv>=0 and Mcv<=MCv and Mdv>=0 and Mdv<=MDv endfunction function AddSpecialEffectByAnnulus takes string s,real x,real y,real sc,real d,integer c returns nothing local real m local real px local real py local real tx local real ty local real vx local real vy if c>0 then set m=Lx/ c set vx=Cos(m) set vy=Sin(m) set tx=d set ty=0 loop exitwhen c==0 set c=c-1 set px=tx set py=ty set tx=px*vx-py*vy set ty=py*vx+px*vy call Ltv(LAv(s,x+px,y+py,sc)) endloop endif endfunction function pVv takes integer NNv returns unit return(Je[(NNv)]) endfunction function pEv takes integer NNv returns nothing if GA[NNv]then set hA[HA[NNv]]=hA[NNv] set HA[hA[NNv]]=HA[NNv] set GA[NNv]=false if HA[(0)]==0 then call frv(jA) endif call Unit_Cancel_Counter(5,(NNv)) endif endfunction function pXv takes nothing returns boolean local integer NNv=HA[(0)] loop exitwhen NNv==0 if GetUnitCurrentOrder((Je[((NNv))]))==dA[NNv]then if CA[NNv]!="" then call SetUnitAnimation((Je[((NNv))]),CA[NNv]) set CA[NNv]="" endif if bA[NNv]!="" then set DA[NNv]=DA[NNv]-1 if DA[NNv]<=0 then set DA[NNv]=FA[NNv] call DestroyEffect(AddSpecialEffectTarget(bA[NNv],(Je[((NNv))]),BA[NNv])) endif endif else set dA[NNv]=0 if gA[NNv]!=0 then call UnitAddAbilityBY((Je[((NNv))]),gA[NNv]) set gA[NNv]=0 endif call SetUnitTimeScale((Je[((NNv))]),1) call DestroyEffectBY(NA[NNv]) call pEv(NNv) endif set NNv=HA[NNv] endloop return false endfunction function pOv takes integer NNv returns boolean if not GA[NNv]then if HA[(0)]==0 then if jA==0 then set jA=fxv(function pXv) endif call fov(jA) endif set HA[NNv]=HA[(0)] set hA[HA[(0)]]=NNv set HA[(0)]=NNv set hA[NNv]=0 set GA[NNv]=true call Unit_App_Counter(6,(NNv)) return true endif return false endfunction function UnitAnimationAddEffect takes integer NNv,string s,string a returns integer call s__Effect_connect((NA[NNv]),(s__Effect_build(AddSpecialEffectTarget(((s)),(((Je[((NNv))]))),((a)))))) return NNv endfunction function UnitAnimationSetName takes integer NNv,string s returns integer set CA[NNv]=s return NNv endfunction function UnitAnimationSetTimeScale takes integer NNv,real v returns integer call SetUnitTimeScale((Je[((NNv))]),v) return NNv endfunction function UnitAnimationSetLoopEffect takes integer NNv,string s,string a,real cy returns integer set bA[NNv]=s set BA[NNv]=a set FA[NNv]=R2I(cy/ .03125) set DA[NNv]=FA[NNv] return NNv endfunction function UnitAppAnimation takes unit u returns integer local integer NNv=(GetUnitUserData((u))) if pOv(NNv)then set NA[NNv]=CreateEffectFor() endif set dA[NNv]=GetUnitCurrentOrder(u) set bA[NNv]="" set BA[NNv]="" return NNv endfunction function phv takes integer NNv returns nothing if QA[NNv]!=null then if(Control_abid[((NNv))])=='A00P' then call TimerStart(Control_Timer[(GetUnitUserData((((Je[(NNv)])))))],.25,false,function mAv) endif call ReleaseTimer(QA[NNv],"[TimerUtils]Error:8") call s__Trig_remove((qA[NNv])) call Unit_Cancel_Counter(7,(NNv)) set QA[NNv]=null if UnitAlive((Je[(NNv)]))and SA[NNv]>1 then if not(IsUnitType(((Je[(NNv)])),UNIT_TYPE_GIANT))then call UnitDamageTargetBY((((Je[(PA[NNv])]))),(((Je[(NNv)]))),((((.5*Unit_Frost_Damage[(PA[NNv])]*SA[NNv])*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((25)*1.))*1.),(("|c007387ff"))) elseif UnitHasItemOfType((Je[(PA[NNv])]),'I0D1')then call UnitDamageTargetBY((((Je[(PA[NNv])]))),(((Je[(NNv)]))),((((.2*Unit_Frost_Damage[(PA[NNv])]*SA[NNv])*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((30)*1.))*1.),(("|c007387ff"))) else call UnitDamageTargetBY((((Je[(PA[NNv])]))),(((Je[(NNv)]))),((((.15*Unit_Frost_Damage[(PA[NNv])]*SA[NNv])*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((25)*1.))*1.),(("|c007387ff"))) endif call Ltv(LAv("FrostNova.mdl",GetUnitX((Je[(NNv)])),GetUnitY((Je[(NNv)])),1.25)) call Lqv(LAv("Shiva'sWrath.mdl",GetUnitX((Je[(NNv)])),GetUnitY((Je[(NNv)])),1.5),1.5) endif endif endfunction function pHv takes nothing returns nothing call phv(((alloc__hpv(GetHandleId((GetExpiredTimer())))))) endfunction function pjv takes nothing returns boolean set SA[(NX[s__Trig_Index])]=SA[(NX[s__Trig_Index])]+GetDamage() return false endfunction function pJv takes integer c,unit u returns nothing local integer NNv=(GetUnitUserData((u))) local real timed if QA[NNv]==null then if(Is_pvp[(GetPlayerId(GetOwningPlayer((u))))])then set timed=3 else set timed=$A endif if m3v((Je[(NNv)]),timed,'A00P','Bfrz')then set PA[NNv]=c set qA[NNv]=UnitAddBeDamagerTrigB((NNv),function pjv) set NX[qA[NNv]]=NNv set QA[NNv]=NewTimer(NNv) set SA[NNv]=0 call TimerStart(QA[NNv],timed,false,function pHv) call Unit_App_Counter(8,(NNv)) endif endif endfunction function pkv takes integer NNv returns nothing if uA[NNv]!=null then call ReleaseTimer(uA[NNv],"[TimerUtils]Error:9") call UnitRemoveAbility((Je[(NNv)]),'Bfro') call DeUnitAdef((NNv),TA[NNv]) call Unit_Cancel_Counter(9,(NNv)) set uA[NNv]=null endif endfunction function pKv takes nothing returns nothing call pkv(((alloc__hpv(GetHandleId((GetExpiredTimer())))))) endfunction function plv takes unit u returns nothing local integer NNv=(GetUnitUserData((u))) if uA[NNv]==null then set uA[NNv]=NewTimer(NNv) set TA[NNv]=ModifyUnitAdef((NNv),-$C) call Unit_App_Counter($A,(NNv)) endif call TimerStart(uA[NNv],6,false,function pKv) endfunction function pmv takes unit u,real cyv returns nothing if(Is_pvp[(GetPlayerId(GetOwningPlayer((u))))])then call m3v(u,.3*cyv,'A04T','Bfrz') else call m3v(u,cyv,'A04T','Bfrz') endif endfunction function pMv takes unit u,boolean ppv returns boolean local integer id=(GetUnitUserData((u))) if(PB[(id)])then return true endif if GetUnitAbilityLevel(u,'Bfrz')>0 then if ppv and(Control_use[(id)])and(Control_abid[(id)])!='A00P' then call UnitCloseControl(id) endif return true endif return false endfunction function Ppv takes nothing returns integer return D9v(LN) endfunction function PPv takes integer NNv returns nothing call fvv(NNv) endfunction function Pqv takes nothing returns boolean local integer NNv=J[LN] loop exitwhen 0==NNv set gN[NNv]=gN[NNv]-1 set KN[NNv]=KN[NNv]+lN[NNv] if GetUnitTypeId((DN[NNv]))!=0 then set GN[NNv]=GetUnitX((DN[NNv])) set hN[NNv]=GetUnitY((DN[NNv])) set HN[NNv]=GetUnitFlyHeight((DN[NNv]))+LightningEffect_AZ[NNv] endif if GetUnitTypeId((fN[NNv]))!=0 then set jN[NNv]=GetUnitX((fN[NNv])) set JN[NNv]=GetUnitY((fN[NNv])) set kN[NNv]=GetUnitFlyHeight((fN[NNv]))+LightningEffect_BZ[NNv] endif call MoveLightningEx(FN[NNv],true,GN[NNv],hN[NNv],GetPointZ(GN[NNv],hN[NNv])+HN[NNv],jN[NNv],JN[NNv],GetPointZ(jN[NNv],JN[NNv])+kN[NNv]) call SetLightningColor(FN[NNv],1,1,1,KN[NNv]) if gN[NNv]<1 then if DN[NNv]!=null then set DN[NNv]=null endif if fN[NNv]!=null then set fN[NNv]=null endif call DestroyLightning(FN[NNv]) call fvv((NNv)) set FN[NNv]=null endif set NNv=K[NNv] endloop return false endfunction function PQv takes nothing returns nothing set LN=fxv(function Pqv) endfunction function Psv takes string DCv,real x,real y,real z,unit t,real cxv,real PSv,real Ptv returns nothing local integer NNv=(D9v(LN)) set GN[NNv]=x set hN[NNv]=y set HN[NNv]=z set jN[NNv]=GetUnitX(t) set JN[NNv]=GetUnitY(t) set LightningEffect_BZ[NNv]=60 set kN[NNv]=GetUnitFlyHeight(t)+LightningEffect_BZ[NNv] set FN[NNv]=AddLightningEx(DCv,true,GN[NNv],hN[NNv],GetPointZ(GN[NNv],hN[NNv])+HN[NNv],jN[NNv],JN[NNv],GetPointZ(jN[NNv],JN[NNv])+kN[NNv]) set fN[NNv]=(t) set gN[NNv]=R2I(32.*cxv) set KN[NNv]=PSv set lN[NNv]=(Ptv-PSv)/ gN[NNv] endfunction function PTv takes string DCv,real x,real y,real z,real x2,real y2,real z2,real cxv,real PSv,real Ptv returns nothing local integer NNv=(D9v(LN)) set GN[NNv]=x set hN[NNv]=y set HN[NNv]=z set jN[NNv]=x2 set JN[NNv]=y2 set kN[NNv]=z2 set FN[NNv]=AddLightningEx(DCv,true,GN[NNv],hN[NNv],GetPointZ(GN[NNv],hN[NNv])+HN[NNv],jN[NNv],JN[NNv],GetPointZ(jN[NNv],JN[NNv])+kN[NNv]) set gN[NNv]=R2I(32.*cxv) set KN[NNv]=PSv set lN[NNv]=(Ptv-PSv)/ gN[NNv] endfunction function Puv takes string DCv,unit s,unit t,real cxv,real PSv,real Ptv returns nothing local integer NNv=(D9v(LN)) set GN[NNv]=GetUnitX(s) set hN[NNv]=GetUnitY(s) set LightningEffect_AZ[NNv]=60 set HN[NNv]=GetUnitFlyHeight(s)+LightningEffect_AZ[NNv] set jN[NNv]=GetUnitX(t) set JN[NNv]=GetUnitY(t) set LightningEffect_BZ[NNv]=60 set kN[NNv]=GetUnitFlyHeight(t)+LightningEffect_BZ[NNv] set FN[NNv]=AddLightningEx(DCv,true,GN[NNv],hN[NNv],GetPointZ(GN[NNv],hN[NNv])+HN[NNv],jN[NNv],JN[NNv],GetPointZ(jN[NNv],JN[NNv])+kN[NNv]) set DN[NNv]=(s) set fN[NNv]=(t) set gN[NNv]=R2I(32.*cxv) set KN[NNv]=PSv set lN[NNv]=(Ptv-PSv)/ gN[NNv] endfunction function NeWLightningEffectTypeA takes string DCv,real x,real y,real z,unit t,real tz,real cxv,real PSv,real Ptv returns nothing local integer NNv=(D9v(LN)) set GN[NNv]=x set hN[NNv]=y set HN[NNv]=z set jN[NNv]=GetUnitX(t) set JN[NNv]=GetUnitY(t) set LightningEffect_BZ[NNv]=tz set kN[NNv]=GetUnitFlyHeight(t)+LightningEffect_BZ[NNv] set FN[NNv]=AddLightningEx(DCv,true,GN[NNv],hN[NNv],GetPointZ(GN[NNv],hN[NNv])+HN[NNv],jN[NNv],JN[NNv],GetPointZ(jN[NNv],JN[NNv])+kN[NNv]) set fN[NNv]=(t) set gN[NNv]=R2I(32.*cxv) set KN[NNv]=PSv set lN[NNv]=(Ptv-PSv)/ gN[NNv] endfunction function NeWLightningEffectTypeD takes string DCv,unit s,unit t,real z1,real z2,real cxv,real PSv,real Ptv returns nothing local integer NNv=(D9v(LN)) set GN[NNv]=GetUnitX(s) set hN[NNv]=GetUnitY(s) set LightningEffect_AZ[NNv]=z1 set HN[NNv]=GetUnitFlyHeight(s)+LightningEffect_AZ[NNv] set jN[NNv]=GetUnitX(t) set JN[NNv]=GetUnitY(t) set LightningEffect_BZ[NNv]=z2 set kN[NNv]=GetUnitFlyHeight(t)+LightningEffect_BZ[NNv] set FN[NNv]=AddLightningEx(DCv,true,GN[NNv],hN[NNv],GetPointZ(GN[NNv],hN[NNv])+HN[NNv],jN[NNv],JN[NNv],GetPointZ(jN[NNv],JN[NNv])+kN[NNv]) set DN[NNv]=(s) set fN[NNv]=(t) set gN[NNv]=R2I(32.*cxv) set KN[NNv]=PSv set lN[NNv]=(Ptv-PSv)/ gN[NNv] endfunction function Qrv takes integer NNv returns nothing if JB[NNv]then set kB[KB[NNv]]=kB[NNv] set KB[kB[NNv]]=KB[NNv] set JB[NNv]=false if KB[(0)]==0 then call frv(lB) endif call Unit_Cancel_Counter($B,(NNv)) endif endfunction function Qiv takes nothing returns boolean local integer NNv=KB[(0)] local integer Nbv local unit u local real x local real y local real d local real lS loop exitwhen NNv==0 set hB[NNv]=hB[NNv]+1 set Nbv=Eev[GB[NNv]] if not UnitAlive((Je[(NNv)]))or Nbv==GB[NNv]then call UnitRemoveAbilityandBuffBY((Je[(NNv)]),'A08F','B02S') call Unit_Cancel_Counter($C,gB[NNv]) call NCv(GB[NNv]) call Qrv(NNv) set HB[NNv]=0 elseif ModuloInteger(hB[NNv],16)==0 then set lS=0 set d=HB[NNv] loop set Eov[Nbv]=Eov[Nbv]-1 if Eiv[Nbv]>lS then set lS=Eiv[Nbv] endif if Eov[Nbv]<1 then set HB[NNv]=HB[NNv]-Erv[Nbv] call Ncv(Nbv) endif set Nbv=Eev[Nbv] exitwhen Nbv==GB[NNv] endloop if GetUnitAbilityLevel((Je[(NNv)]),'A0KK')==0 then call UnitDamageTargetBY((((Je[(gB[NNv])]))),(((Je[(NNv)]))),((((Unit_DOT[(gB[NNv])]*d)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") else call UnitDamageTargetBY((((Je[(gB[NNv])]))),(((Je[(NNv)]))),((((2*Unit_Fire_Damage[(gB[NNv])]*Unit_DOT[(gB[NNv])]*d)*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((lS)*1.))*1.),(("|c00ff8080"))) endif endif set NNv=KB[NNv] endloop return false endfunction function Qav takes integer NNv returns boolean if not JB[NNv]then if KB[(0)]==0 then if lB==0 then set lB=fxv(function Qiv) endif call fov(lB) endif set KB[NNv]=KB[(0)] set kB[KB[(0)]]=NNv set KB[(0)]=NNv set kB[NNv]=0 set JB[NNv]=true call Unit_App_Counter($D,(NNv)) return true endif return false endfunction function Qnv takes unit s,unit t,real d,integer nT,real bav returns nothing local integer NNv local integer QVv if UnitAlive(t)then set NNv=(GetUnitUserData((t))) set QVv=NIv() set Eov[QVv]=nT set Erv[QVv]=Unit_Fire_Damage[(GetUnitUserData((s)))]*d set Eiv[QVv]=bav if Qav(NNv)then set GB[NNv]=NBv() set gB[NNv]=(GetUnitUserData((s))) set hB[NNv]=0 set HB[NNv]=0 call UnitAddAbilityBY((Je[(NNv)]),'A08F') call Unit_App_Counter($E,gB[NNv]) endif set HB[NNv]=HB[NNv]+Erv[QVv] call NAv(GB[NNv],QVv) endif endfunction function RemoveHeroReviveBuff takes integer id,integer lv returns nothing if SummonedUnitSkills_A048_Timer[id]!=null and(lv==0 or lv==1)then call ReleaseTimer(SummonedUnitSkills_A048_Timer[id],"[TimerUtils]Error:10") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A072','B02T') call Unit_Cancel_Counter($F,(id)) set SummonedUnitSkills_A048_Timer[id]=null endif if Item_I0E9_timer[id]!=null and(lv==0 or lv==2)then call ReleaseTimer(Item_I0E9_timer[id],"[TimerUtils]Error:11") call DeUnitMdef(id,Item_I0E9_mdef[id]) call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0TQ','B07C') call Unit_Cancel_Counter(16,id) set Item_I0E9_timer[id]=null endif endfunction function tEv takes unit u,real x,real y,integer tXv returns boolean local integer id=(GetUnitUserData((u))) local player p = GetOwningPlayer(u) if u==(Je[(id)])and nC[id]then if GetHeroLevel(u)>=tXv then call SetUnitPosition(u,x,y) if GetLocalPlayer()==p then if not IsUnitSelected(u,p) then call ClearSelection() call SelectUnit(u,true) endif call PanCameraToTimed(x,y,0) endif return true else call DisplayTimedTextToPlayer(p,0,0,5,"Required level: |cffffcc00"+I2S(tXv)) endif endif return false endfunction function tOv takes unit u,real x,real y,integer tXv returns boolean if nC[(GetUnitUserData((u)))]and GetHeroLevel(u)>=tXv and dev(u,'A0J0','B037',60)then return tEv(u,x,y,tXv) endif return false endfunction function addUnitdefbuff_end takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:12") call ModifyUnitArmor(id,defbuff_def[id]) call UnitRemoveAbilityandBuffBY((Je[(id)]),defbuff_abid[id],defbuff_bfid[id]) call Unit_Cancel_Counter(17,id) set defbuff_tm[id]=null set defbuff_def[id]=0 endfunction function addUnitdefbuff takes unit u,integer abid,integer bfid,real t,real s returns nothing local integer id=(GetUnitUserData((u))) local integer i if UnitAlive(u)and u==(Je[(id)])then if defbuff_tm[id]==null then set defbuff_tm[id]=NewTimer(id) set defbuff_def[id]=0 call UnitAddAbilityBY(u,abid) call Unit_App_Counter(18,id) else if abid!=defbuff_bfid[id]then call UnitRemoveAbilityandBuffBY(u,defbuff_abid[id],defbuff_bfid[id]) call UnitAddAbilityBY(u,abid) endif endif set defbuff_abid[id]=abid set defbuff_bfid[id]=bfid set i=R2I(t*GetUnitDefaultArmor(id)) call ModifyUnitArmor(id,defbuff_def[id]-i) call TimerStart(defbuff_tm[id],s,false,function addUnitdefbuff_end) set defbuff_def[id]=i endif endfunction function tpv takes player p,integer tPv,integer pav returns nothing local unit u=MV[GetPlayerId(p)] set pav=R2I((1+lV)*pav*HandicapXP_Lv[(GetUnitUserData((u)))]+.5) if pav>0 then set pav=R2I(HandicapXP_Basis[(GetUnitUserData((u)))]*pav) if GetHeroLevel(u)>=350 then set pav=R2I(.4*pav) endif call AddHeroXP(u,pav,true) endif if tPv>0 then call AdjustPlayerStateG(p,PLAYER_STATE_RESOURCE_GOLD,tPv) endif if pav>0 and tPv>0 then call thv("|c00ffff00Gold +"+I2S(tPv)+"|n|c0080ffffExp +"+I2S(pav),GetUnitX(u),GetUnitY(u),GetUnitFlyHeight(u)+25,.0325,.025,bj_PI/ 2,1.5,2) elseif pav>0 and tPv==0 then call thv("|c0080ffffExp +"+I2S(pav),GetUnitX(u),GetUnitY(u),GetUnitFlyHeight(u)+25,.0325,.025,bj_PI/ 2,1.5,2) elseif pav==0 and tPv>0 then call thv("|c00ffff00Gold +"+I2S(tPv),GetUnitX(u),GetUnitY(u),GetUnitFlyHeight(u)+25,.0325,.025,bj_PI/ 2,1.5,2) endif set u=null endfunction function tqv takes unit u,real x,real y,integer g,integer e returns nothing local integer CMv=GetPlayerId(GetOwningPlayer(u)) local integer tQv=0 local integer tsv if CMv<8 then set tQv=GetHeroLevel(MV[CMv]) call tpv(P[CMv],g,e) endif call GroupEnumUnitsInRange(G,x,y,900+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,900)then set tsv=GetPlayerId(GetOwningPlayer(u)) if nC[(GetUnitUserData((u)))]and tsv!=CMv then if tQv==0 or IAbsBJ(tQv-GetHeroLevel(u))<40 then call tpv(P[tsv],g,e) endif endif endif endloop call Ltv(Lfv(LAv("Abilities\\Spells\\Other\\Transmute\\PileofGold.mdl",x,y,5),$FF,$FF,125,$FF)) call Ltv(Lfv(LAv("ForestBolt.mdl",x,y,4.5),$FF,$FF,0,$FF)) endfunction function tuv takes unit u,real value returns nothing call TimerDestroyAddSpecialEffectTargetBY("Abilities\\Spells\\Items\\AIhe\\AIheTarget.mdl",u,"origin",1.75) call UnitCureTaret(null,u,value) endfunction function tUv takes unit u,real value returns nothing call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIma\\AImaTarget.mdl",u,"origin")) call SetUnitState(u,UNIT_STATE_MANA,GetUnitState(u,UNIT_STATE_MANA)+value) endfunction //uncle's pumpkin effect function twv takes nothing returns nothing call tuv(GetTriggerUnit(),.4*GetUnitState(GetTriggerUnit(),UNIT_STATE_MAX_LIFE)) call tUv(GetTriggerUnit(),.4*GetUnitState(GetTriggerUnit(),UNIT_STATE_MAX_MANA)) endfunction function tWv takes nothing returns nothing call tuv(GetTriggerUnit(),.25*GetUnitState(GetTriggerUnit(),UNIT_STATE_MAX_LIFE)) call UnitRemoveControl((GetUnitUserData((GetTriggerUnit())))) endfunction function tyv takes nothing returns nothing call tuv(GetTriggerUnit(),20) endfunction function tYv takes nothing returns nothing call tuv(GetTriggerUnit(),50) endfunction function tzv takes nothing returns nothing call tuv(GetTriggerUnit(),100) endfunction function tZv takes nothing returns nothing call tUv(GetTriggerUnit(),100) endfunction function t_v takes nothing returns nothing call tuv(GetTriggerUnit(),$FA) endfunction function t0v takes nothing returns nothing call tuv(GetTriggerUnit(),400) endfunction function t1v takes nothing returns nothing call tuv(GetTriggerUnit(),600) endfunction function t2v takes nothing returns nothing call tuv(GetTriggerUnit(),$3E8) endfunction function t3v takes nothing returns nothing call tUv(GetTriggerUnit(),$FA) endfunction function t4v takes nothing returns nothing call tUv(GetTriggerUnit(),400) endfunction function t5v takes nothing returns nothing call tUv(GetTriggerUnit(),$3E8) endfunction function t6v takes nothing returns nothing call Cpv(((GetUnitUserData((GetTriggerUnit())))),100) endfunction function t7v takes nothing returns nothing local integer NNv=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:13") call UnitRemoveAbilityandBuffBY((Je[(NNv)]),'A06V','BNba') call ModifyHeroStr((NNv),-50) call Unit_Cancel_Counter(19,(NNv)) set GC[NNv]=null endfunction function t8v takes nothing returns nothing local integer NNv=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:14") call UnitRemoveAbilityandBuffBY((Je[(NNv)]),'A06W','BCbf') call ModifyHeroAgi((NNv),-50) call Unit_Cancel_Counter(20,(NNv)) set hC[NNv]=null endfunction function t9v takes nothing returns nothing local integer NNv=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:15") call UnitRemoveAbilityandBuffBY((Je[(NNv)]),'A07A','BNbf') call ModifyHeroInt((NNv),-50) call Unit_Cancel_Counter(21,(NNv)) set HC[NNv]=null endfunction function Tvv takes nothing returns nothing local integer NNv=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:16") call UnitRemoveAbilityandBuffBY((Je[(NNv)]),'A083','BNsi') call SetHandicapXP((NNv),-$A) call Unit_Cancel_Counter(22,(NNv)) set jC[NNv]=null endfunction function Tev takes nothing returns nothing local integer NNv=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:17") call UnitRemoveAbilityandBuffBY((Je[(NNv)]),'A0FY','BEsh') call SetHandicapXP((NNv),-$F) call Unit_Cancel_Counter(23,(NNv)) set JC[NNv]=null endfunction function Txv takes nothing returns nothing local integer NNv=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:18") call UnitRemoveAbilityandBuffBY((Je[(NNv)]),'A0FZ','BEst') call Unit_Cancel_Counter(24,(NNv)) set kC[NNv]=null endfunction function Tov takes nothing returns nothing local integer NNv=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:19") call UnitRemoveAbilityandBuffBY((Je[(NNv)]),'A0LS','B04C') call ModifyHeroStr((NNv),-pC[NNv]) call Unit_Cancel_Counter(25,(NNv)) set KC[NNv]=null endfunction function Trv takes nothing returns nothing local integer NNv=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:20") call UnitRemoveAbilityandBuffBY((Je[(NNv)]),'A0LT','B04D') call ModifyHeroAgi((NNv),-PC[NNv]) call Unit_Cancel_Counter(26,(NNv)) set LC[NNv]=null endfunction function Tiv takes nothing returns nothing local integer NNv=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:21") call UnitRemoveAbilityandBuffBY((Je[(NNv)]),'A0LU','B04E') call ModifyHeroInt((NNv),-qC[NNv]) call Unit_Cancel_Counter(27,(NNv)) set MC[NNv]=null endfunction function Tav takes nothing returns nothing local timer t=GetExpiredTimer() local integer NNv=ReleaseTimer(t,"[TimerUtils]Error:22") if t==QC[NNv]then call UnitRemoveAbilityandBuffBY((Je[(NNv)]),'A0OJ','B059') call DeUnitAdef((NNv),uC[NNv]) set QC[NNv]=null elseif t==sC[NNv]then call UnitRemoveAbilityandBuffBY((Je[(NNv)]),'A0OH','B056') call HeroAddExtraProperties((NNv),-UC[NNv]) set sC[NNv]=null elseif t==SC[NNv]then call UnitRemoveAbilityandBuffBY((Je[(NNv)]),'A0OI','B057') call ModifyUnitCrit((NNv),-5) call ModifyUnitCritDamage((NNv),-25) set SC[NNv]=null elseif t==TC[NNv]then call UnitRemoveAbilityandBuffBY((Je[(NNv)]),'A0OK','B058') call ModifyUnitMagicDamage((NNv),-7.5) set TC[NNv]=null endif set t=null endfunction function Tnv takes nothing returns nothing local integer NNv=(alloc__hpv(GetHandleId((GetExpiredTimer())))) if UnitAlive((Je[(NNv)]))then set WC[NNv]=WC[NNv]-1 call tuv((Je[(NNv)]),$640+.05*GetUnitState((Je[(NNv)]),UNIT_STATE_MAX_LIFE)) else set WC[NNv]=0 endif if WC[NNv]<0 then call ReleaseTimer(wC[NNv],"[TimerUtils]Error:23") set wC[NNv]=null endif endfunction function TVv takes integer NNv returns nothing if wC[NNv]==null then set wC[NNv]=NewTimer(NNv) endif set WC[NNv]=5 call TimerStart(wC[NNv],.8,true,function Tnv) endfunction //item effects ? //NNv = unit id //i = index of itemm ? //call Lfv -> vertex coloring function TEv takes integer NNv,integer i returns nothing local integer fx local integer iS if i<5 then set fx=LAv("Abilities\\Spells\\Items\\AIre\\AIreTarget.mdl",GetUnitX((Je[(NNv)])),GetUnitY((Je[(NNv)])),1.5) elseif i>=$A and i<=$D then set fx=LAv("ForestBolt.mdl",GetUnitX((Je[(NNv)])),GetUnitY((Je[(NNv)])),1.5) else set fx=LAv("ForestBolt.mdl",GetUnitX((Je[(NNv)])),GetUnitY((Je[(NNv)])),1.5) endif if i==1 then if GC[NNv]==null then set GC[NNv]=NewTimer(NNv) call ModifyHeroStr((NNv),50) call UnitAddAbilityBY((Je[(NNv)]),'A06V') call Unit_App_Counter(28,(NNv)) endif call Lfv(fx,$FF,0,0,$FF) call TimerStart(GC[NNv],$708,false,function t7v) elseif i==2 then if hC[NNv]==null then set hC[NNv]=NewTimer(NNv) call ModifyHeroAgi((NNv),50) call UnitAddAbilityBY((Je[(NNv)]),'A06W') call Unit_App_Counter(29,(NNv)) endif call Lfv(fx,0,$9B,$FF,$FF) call TimerStart(hC[NNv],$708,false,function t8v) elseif i==3 then if HC[NNv]==null then set HC[NNv]=NewTimer(NNv) call ModifyHeroInt((NNv),50) call UnitAddAbilityBY((Je[(NNv)]),'A07A') call Unit_App_Counter(30,(NNv)) endif call Lfv(fx,$FF,125,$FF,$FF) call TimerStart(HC[NNv],$708,false,function t9v) elseif i==4 then if jC[NNv]==null then set jC[NNv]=NewTimer(NNv) call SetHandicapXP((NNv),$A) call UnitAddAbilityBY((Je[(NNv)]),'A083') call Unit_App_Counter(31,(NNv)) endif call Lfv(fx,$FF,$FF,0,$FF) call TimerStart(jC[NNv],$708,false,function Tvv) elseif i==5 then if JC[NNv]==null then set JC[NNv]=NewTimer(NNv) call SetHandicapXP((NNv),$F) call UnitAddAbilityBY((Je[(NNv)]),'A0FY') call Unit_App_Counter(32,(NNv)) endif call Lfv(fx,0,$FF,$FF,$FF) call TimerStart(JC[NNv],600,false,function Tev) elseif i==6 then//uncle's carrot if kC[NNv]==null then set kC[NNv]=NewTimer(NNv) call UnitAddAbilityBY((Je[(NNv)]),'A0FZ') call Unit_App_Counter(33,(NNv)) endif call Lfv(fx,$FF,$FF,0,$FF) call TimerStart(kC[NNv],300,false,function Txv) elseif i==7 then if KC[NNv]==null then set KC[NNv]=NewTimer(NNv) set pC[NNv]=0 call UnitAddAbilityBY((Je[(NNv)]),'A0LS') call Unit_App_Counter(34,(NNv)) endif set iS=50+GetHeroLevel((Je[(NNv)]))/ 2 call TVv(NNv) call Lfv(fx,$FF,0,0,$FF) call ModifyHeroStr((NNv),iS-pC[NNv]) call TimerStart(KC[NNv],900,false,function Tov) set pC[NNv]=iS elseif i==8 then if LC[NNv]==null then set LC[NNv]=NewTimer(NNv) set PC[NNv]=0 call UnitAddAbilityBY((Je[(NNv)]),'A0LT') call Unit_App_Counter(35,(NNv)) endif set iS=50+GetHeroLevel((Je[(NNv)]))/ 2 call TVv(NNv) call Lfv(fx,0,$9B,$FF,$FF) call ModifyHeroAgi((NNv),iS-PC[NNv]) call TimerStart(LC[NNv],900,false,function Trv) set PC[NNv]=iS elseif i==9 then if MC[NNv]==null then set MC[NNv]=NewTimer(NNv) set qC[NNv]=0 call UnitAddAbilityBY((Je[(NNv)]),'A0LU') call Unit_App_Counter(36,(NNv)) endif set iS=50+GetHeroLevel((Je[(NNv)]))/ 2 call TVv(NNv) call Lfv(fx,$FF,125,$FF,$FF) call ModifyHeroInt((NNv),iS-qC[NNv]) call TimerStart(MC[NNv],900,false,function Tiv) set qC[NNv]=iS elseif i==$A then if QC[NNv]==null then set QC[NNv]=NewTimer(NNv) set uC[NNv]=ModifyUnitAdef((NNv),25) call UnitAddAbilityBY((Je[(NNv)]),'A0OJ') call Unit_App_Counter(37,(NNv)) endif call TimerStart(QC[NNv],60,false,function Tav) elseif i==$B then if sC[NNv]==null then set sC[NNv]=NewTimer(NNv) set UC[NNv]=0 call UnitAddAbilityBY((Je[(NNv)]),'A0OH') call Unit_App_Counter(38,(NNv)) endif set iS=R2I(.12*GetHeroNotExtraProperties((NNv))) call HeroAddExtraProperties((NNv),iS-UC[NNv]) call TimerStart(sC[NNv],75,false,function Tav) set UC[NNv]=iS elseif i==$C then if SC[NNv]==null then set SC[NNv]=NewTimer(NNv) call UnitAddAbilityBY((Je[(NNv)]),'A0OI') call ModifyUnitCrit((NNv),5) call ModifyUnitCritDamage((NNv),25) call Unit_App_Counter(39,(NNv)) endif call TimerStart(SC[NNv],90,false,function Tav) elseif i==$D then if TC[NNv]==null then set TC[NNv]=NewTimer(NNv) call UnitAddAbilityBY((Je[(NNv)]),'A0OK') call ModifyUnitMagicDamage((NNv),7.5) call Unit_App_Counter(40,(NNv)) endif call TimerStart(TC[NNv],120,false,function Tav) endif call Ltv(fx) endfunction function TXv takes nothing returns nothing call CKv(GetTriggerUnit()) endfunction function TOv takes nothing returns nothing call TEv(((GetUnitUserData((GetTriggerUnit())))),1) endfunction function TRv takes nothing returns nothing call TEv(((GetUnitUserData((GetTriggerUnit())))),2) endfunction function TIv takes nothing returns nothing call TEv(((GetUnitUserData((GetTriggerUnit())))),3) endfunction function TAv takes nothing returns nothing call TEv(((GetUnitUserData((GetTriggerUnit())))),4) endfunction function TNv takes nothing returns nothing call TEv(((GetUnitUserData((GetTriggerUnit())))),5) endfunction function Tbv takes nothing returns nothing call TEv(((GetUnitUserData((GetTriggerUnit())))),6) endfunction //uncle's carrot function TBv takes nothing returns nothing call TEv(((GetUnitUserData((GetTriggerUnit())))),7) endfunction function Tcv takes nothing returns nothing call TEv(((GetUnitUserData((GetTriggerUnit())))),8) endfunction function TCv takes nothing returns nothing call TEv(((GetUnitUserData((GetTriggerUnit())))),9) endfunction function Tdv takes nothing returns nothing call TEv(((GetUnitUserData((GetTriggerUnit())))),$A) endfunction function TDv takes nothing returns nothing call TEv(((GetUnitUserData((GetTriggerUnit())))),$B) endfunction function Tfv takes nothing returns nothing call TEv(((GetUnitUserData((GetTriggerUnit())))),$C) endfunction function TFv takes nothing returns nothing call TEv(((GetUnitUserData((GetTriggerUnit())))),$D) endfunction function Tgv takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:24") call SetUnitPosition((Je[(id)]),GetUnitX((Je[(id)])),GetUnitY((Je[(id)]))) call m_v((Je[(id)]),false) endfunction function TGv takes nothing returns nothing local unit u=GetBuyingUnit() if nC[(GetUnitUserData((u)))]then call UnitCureTaret(null,u,GetUnitState(u,UNIT_STATE_MAX_LIFE)) call SetUnitState(u,UNIT_STATE_MANA,GetUnitState(u,UNIT_STATE_MAX_MANA)) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\Sleep\\SleepSpecialArt.mdl",u,"origin")) call TimerStart(NewTimer((GetUnitUserData((u)))),5,false,function Tgv) call RemoveItemG(GetSoldItem()) call m_v(u,true) endif set u=null endfunction function Thv takes nothing returns nothing local unit u=GetTriggerUnit() local integer Cjv=qV[GetPlayerId(GetOwningPlayer(u))] call DestroyEffect(AddSpecialEffectTarget("Enchantment.mdl",u,"origin")) if Cjv=='H000' or Cjv=='H00H' or Cjv=='H003' or Cjv=='Hmkg' or Cjv=='Hblm' or Cjv=='H01V' then call UnitAddItem(u,CreateItemG('I081',GetUnitX(u),GetUnitY(u))) elseif Cjv=='H001' or Cjv=='H004' or Cjv=='H00E' or Cjv=='Hamg' or Cjv=='H01H' or Cjv=='H01U' then call UnitAddItem(u,CreateItemG('I080',GetUnitX(u),GetUnitY(u))) elseif Cjv=='H00Z' or Cjv=='H015' then call UnitAddItem(u,CreateItemG('I09M',GetUnitX(u),GetUnitY(u))) elseif Cjv=='H01N' or Cjv=='H01I' or Cjv=='H002' or Cjv=='H005' or Cjv=='H006' or Cjv=='H007' or Cjv=='H008' or Cjv=='H009' or Cjv=='H00J' or Cjv=='H01Y' or Cjv=='H01X' then call UnitAddItem(u,CreateItemG('I082',GetUnitX(u),GetUnitY(u))) elseif Cjv=='H01W' then call UnitAddItem(u,CreateItemG('plcl',GetUnitX(u),GetUnitY(u))) endif set u=null endfunction function T10v takes nothing returns nothing local unit u=GetTriggerUnit() local real r=GetRandomReal(0,100) if r<=.5 then call SetItemUserData(CreateItemG('grsl',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("cenarionfury.mdx",GetUnitX(u),GetUnitY(u),1.5)) call thv("Spirit orb |c00ffff80created!|r",GetUnitX(u),GetUnitY(u),25,.075,.035,bj_PI/ 2.5,5,6) call PlaySoundAtPoint_BJ((sn),(($7F)*1.),((GetUnitX(u))*1.),((GetUnitY(u))*1.),0) elseif r<=20.5 then call SetItemUserData(CreateItemG('I04W',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("cenarionfury.mdx",GetUnitX(u),GetUnitY(u),1.5)) elseif r<=70.5 then call UnitDamageTargetBY(((u)),((u)),(((($EA60)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") else call Auxiliary_TargetOrder(('A0I3'),null,2,$D0085,u) endif call Ltv(LAv("ancientexplode.mdx",GetUnitX(u),GetUnitY(u),1.5)) set u=null endfunction function T11v takes nothing returns nothing local unit u=GetTriggerUnit() local real r=GetRandomReal(0,100) if r<=.5 then call SetItemUserData(CreateItemG('sror',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("enchantment.mdl",GetUnitX(u),GetUnitY(u),1.5)) call thv("Mark of Storm |c00ffff80created|r",GetUnitX(u),GetUnitY(u),25,.075,.035,bj_PI/ 2.5,5,6) call PlaySoundAtPoint_BJ((sn),(($7F)*1.),((GetUnitX(u))*1.),((GetUnitY(u))*1.),0) elseif r<=1. then call SetItemUserData(CreateItemG('I0CJ',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("enchantment.mdl",GetUnitX(u),GetUnitY(u),1.5)) call thv("Pure Steel |c00ffff80created!|r",GetUnitX(u),GetUnitY(u),25,.075,.035,bj_PI/ 2.5,5,6) call PlaySoundAtPoint_BJ((sn),(($7F)*1.),((GetUnitX(u))*1.),((GetUnitY(u))*1.),0) elseif r<=1.5 then call SetItemUserData(CreateItemG('I0CK',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("enchantment.mdl",GetUnitX(u),GetUnitY(u),1.5)) call thv("Mana Orb |c00ffff80created!|r",GetUnitX(u),GetUnitY(u),25,.075,.035,bj_PI/ 2.5,5,6) call PlaySoundAtPoint_BJ((sn),(($7F)*1.),((GetUnitX(u))*1.),((GetUnitY(u))*1.),0) elseif r<=20.5 then call SetItemUserData(CreateItemG('I04V',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("enchantment.mdl",GetUnitX(u),GetUnitY(u),1.5)) elseif r<=50.5 then call UnitDamageTargetBY(((u)),((u)),(((($EA60)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") else call Auxiliary_TargetOrder(('A0I3'),null,2,$D0085,u) endif call Ltv(LAv("aquaspike.mdl",GetUnitX(u),GetUnitY(u),1.5)) set u=null endfunction function T12v takes nothing returns nothing local unit u=GetTriggerUnit() local real r=GetRandomReal(0,100) if r<=.5 then call SetItemUserData(CreateItemG('stpg',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("greenenchantment.mdl",GetUnitX(u),GetUnitY(u),1.5)) call thv("Essence of Corruption |c00ffff80created!|r",GetUnitX(u),GetUnitY(u),25,.075,.035,bj_PI/ 2.5,5,6) call PlaySoundAtPoint_BJ((sn),(($7F)*1.),((GetUnitX(u))*1.),((GetUnitY(u))*1.),0) elseif r<=20.5 then call SetItemUserData(CreateItemG('I0DK',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("greenenchantment.mdl",GetUnitX(u),GetUnitY(u),1.5)) elseif r<=70.5 then call UnitDamageTargetBY(((u)),((u)),(((($EA60)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") else call Auxiliary_TargetOrder(('A0I3'),null,2,$D0085,u) endif call Ltv(LAv("acid ex.mdl",GetUnitX(u),GetUnitY(u),1.5)) set u=null endfunction function T13v takes nothing returns nothing local unit u=GetTriggerUnit() local real r=GetRandomReal(0,100) if r<=.5 then call SetItemUserData(CreateItemG('I06W',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("ChaosExplosion.mdx",GetUnitX(u),GetUnitY(u),1.5)) call thv("Dark matter |c00ffff80created|r",GetUnitX(u),GetUnitY(u),25,.075,.035,bj_PI/ 2.5,5,6) call PlaySoundAtPoint_BJ((sn),(($7F)*1.),((GetUnitX(u))*1.),((GetUnitY(u))*1.),0) elseif r<=1. then call SetItemUserData(CreateItemG('I08K',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("ChaosExplosion.mdx",GetUnitX(u),GetUnitY(u),1.5)) call thv("Dark Wings |c00ffff80created!|r",GetUnitX(u),GetUnitY(u),25,.075,.035,bj_PI/ 2.5,5,6) call PlaySoundAtPoint_BJ((sn),(($7F)*1.),((GetUnitX(u))*1.),((GetUnitY(u))*1.),0) elseif r<=20 then call SetItemUserData(CreateItemG('I04X',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("ChaosExplosion.mdx",GetUnitX(u),GetUnitY(u),1.5)) elseif r<=50 then call UnitDamageTargetBY(((u)),((u)),(((($EA60)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") else call Auxiliary_TargetOrder(('A0I3'),null,2,$D0085,u) endif call Ltv(LAv("bloodwave.mdl",GetUnitX(u),GetUnitY(u),1.5)) set u=null endfunction function T14v takes nothing returns nothing local unit u=GetTriggerUnit() local real r=GetRandomReal(0,100) if r<=.5 then call SetItemUserData(CreateItemG('I0CD',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("ChaosExplosion.mdx",GetUnitX(u),GetUnitY(u),1.5)) call thv("Essence of Anger |c00ffff80created!|r",GetUnitX(u),GetUnitY(u),25,.075,.035,bj_PI/ 2.5,5,6) call PlaySoundAtPoint_BJ((sn),(($7F)*1.),((GetUnitX(u))*1.),((GetUnitY(u))*1.),0) elseif r<=1. then call SetItemUserData(CreateItemG('rej1',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("ChaosExplosion.mdx",GetUnitX(u),GetUnitY(u),1.5)) call thv("Spirit of Nightmare |c00ffff80created!|r",GetUnitX(u),GetUnitY(u),25,.075,.035,bj_PI/ 2.5,5,6) call PlaySoundAtPoint_BJ((sn),(($7F)*1.),((GetUnitX(u))*1.),((GetUnitY(u))*1.),0) elseif r<=20. then call SetItemUserData(CreateItemG('I04X',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("ChaosExplosion.mdx",GetUnitX(u),GetUnitY(u),1.5)) elseif r<=50. then call UnitDamageTargetBY(((u)),((u)),(((($EA60)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") else call Auxiliary_TargetOrder(('A0I3'),null,2,$D0085,u) endif call Ltv(LAv("BloodWave.mdx",GetUnitX(u),GetUnitY(u),1.5)) set u=null endfunction function T15v takes nothing returns nothing local unit u=GetTriggerUnit() local real r=GetRandomReal(0,100) if r<=.5 then call SetItemUserData(CreateItemG('I08N',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("shadowassault.mdl",GetUnitX(u),GetUnitY(u),1.5)) call thv("Anti-matter |c00ffff80created!|r",GetUnitX(u),GetUnitY(u),25,.075,.035,bj_PI/ 2.5,5,6) call PlaySoundAtPoint_BJ((sn),(($7F)*1.),((GetUnitX(u))*1.),((GetUnitY(u))*1.),0) elseif r<=1. then call SetItemUserData(CreateItemG('I09N',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("shadowassault.mdl",GetUnitX(u),GetUnitY(u),1.5)) call thv("Frozen Debris |c00ffff80created!|r",GetUnitX(u),GetUnitY(u),25,.075,.035,bj_PI/ 2.5,5,6) call PlaySoundAtPoint_BJ((sn),(($7F)*1.),((GetUnitX(u))*1.),((GetUnitY(u))*1.),0) elseif r<=1.5 then call SetItemUserData(CreateItemG('mcri',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("shadowassault.mdl",GetUnitX(u),GetUnitY(u),1.5)) call thv("Essence of Darkness |c00ffff80created!|r",GetUnitX(u),GetUnitY(u),25,.075,.035,bj_PI/ 2.5,5,6) call PlaySoundAtPoint_BJ((sn),(($7F)*1.),((GetUnitX(u))*1.),((GetUnitY(u))*1.),0) elseif r<=20.5 then call SetItemUserData(CreateItemG('I0DK',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("shadowassault.mdl",GetUnitX(u),GetUnitY(u),1.5)) elseif r<=50.5 then call UnitDamageTargetBY(((u)),((u)),(((($186A0)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") else call Auxiliary_TargetOrder(('A0I3'),null,2,$D0085,u) endif call Ltv(LAv("shadowwave.mdl",GetUnitX(u),GetUnitY(u),1.5)) set u=null endfunction function T16v takes nothing returns nothing local unit u=GetTriggerUnit() local real r=GetRandomReal(0,100) if r<=.5 then call SetItemUserData(CreateItemG('I09E',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("greenenchantment.mdl",GetUnitX(u),GetUnitY(u),1.5)) call thv("Demon soul |c00ffff80created!|r",GetUnitX(u),GetUnitY(u),25,.075,.035,bj_PI/ 2.5,5,6) call PlaySoundAtPoint_BJ((sn),(($7F)*1.),((GetUnitX(u))*1.),((GetUnitY(u))*1.),0) elseif r<=20.5 then call SetItemUserData(CreateItemG('I0DK',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("greenenchantment.mdl",GetUnitX(u),GetUnitY(u),1.5)) elseif r<=70.5 then call UnitDamageTargetBY(((u)),((u)),(((($186A0)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") else call Auxiliary_TargetOrder(('A0I3'),null,2,$D0085,u) endif call Ltv(LAv("desecrategreen.mdl",GetUnitX(u),GetUnitY(u),1.5)) set u=null endfunction function T17v takes nothing returns nothing local unit u=GetTriggerUnit() local real r=GetRandomReal(0,100) if r<=.5 then call SetItemUserData(CreateItemG('I08P',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("greenenchantment.mdl",GetUnitX(u),GetUnitY(u),1.5)) call thv("Dark crystal |c00ffff80created!|r",GetUnitX(u),GetUnitY(u),25,.075,.035,bj_PI/ 2.5,5,6) call PlaySoundAtPoint_BJ((sn),(($7F)*1.),((GetUnitX(u))*1.),((GetUnitY(u))*1.),0) elseif r<=1. then call SetItemUserData(CreateItemG('rde1',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("greenenchantment.mdl",GetUnitX(u),GetUnitY(u),1.5)) call thv("Heart of Fire |c00ffff80created!|r",GetUnitX(u),GetUnitY(u),25,.075,.035,bj_PI/ 2.5,5,6) call PlaySoundAtPoint_BJ((sn),(($7F)*1.),((GetUnitX(u))*1.),((GetUnitY(u))*1.),0) elseif r<=1.5 then call SetItemUserData(CreateItemG('I0DG',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("greenenchantment.mdl",GetUnitX(u),GetUnitY(u),1.5)) call thv("Claws of Undead |c00ffff80created!|r",GetUnitX(u),GetUnitY(u),25,.075,.035,bj_PI/ 2.5,5,6) call PlaySoundAtPoint_BJ((sn),(($7F)*1.),((GetUnitX(u))*1.),((GetUnitY(u))*1.),0) elseif r<=20.5 then call SetItemUserData(CreateItemG('I0DK',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("greenenchantment.mdl",GetUnitX(u),GetUnitY(u),1.5)) elseif r<=50.5 then call UnitDamageTargetBY(((u)),((u)),(((($186A0)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") else call Auxiliary_TargetOrder(('A0I3'),null,2,$D0085,u) endif call Ltv(LAv("acid ex.mdl",GetUnitX(u),GetUnitY(u),1.5)) set u=null endfunction function T18v takes nothing returns nothing local unit u=GetTriggerUnit() local real r=GetRandomReal(0,100) if r<=.5 then call SetItemUserData(CreateItemG('gsou',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("darkpillar.mdl",GetUnitX(u),GetUnitY(u),1.5)) call thv("Spirit of abyss |c00ffff80created!|r",GetUnitX(u),GetUnitY(u),25,.075,.035,bj_PI/ 2.5,5,6) call PlaySoundAtPoint_BJ((sn),(($7F)*1.),((GetUnitX(u))*1.),((GetUnitY(u))*1.),0) elseif r<=1. then call SetItemUserData(CreateItemG('nflg',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("darkpillar.mdl",GetUnitX(u),GetUnitY(u),1.5)) call thv("Orb of oblivion |c00ffff80created!|r",GetUnitX(u),GetUnitY(u),25,.075,.035,bj_PI/ 2.5,5,6) call PlaySoundAtPoint_BJ((sn),(($7F)*1.),((GetUnitX(u))*1.),((GetUnitY(u))*1.),0) elseif r<=20. then call SetItemUserData(CreateItemG('I0DK',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("darkpillar.mdl",GetUnitX(u),GetUnitY(u),1.5)) elseif r<=50. then call UnitDamageTargetBY(((u)),((u)),(((($186A0)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") else call Auxiliary_TargetOrder(('A0I3'),null,2,$D0085,u) endif call Ltv(LAv("shadowwave.mdl",GetUnitX(u),GetUnitY(u),1.5)) set u=null endfunction function T19v takes nothing returns nothing local unit u=GetTriggerUnit() local real r=GetRandomReal(0,100) if r<=.5 then call SetItemUserData(CreateItemG('shtm',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("ancientexplode.mdl",GetUnitX(u),GetUnitY(u),1.5)) call thv("Fragment of the wind |c00ffff80created!|r",GetUnitX(u),GetUnitY(u),25,.075,.035,bj_PI/ 2.5,5,6) call PlaySoundAtPoint_BJ((sn),(($7F)*1.),((GetUnitX(u))*1.),((GetUnitY(u))*1.),0) elseif r<=1. then call SetItemUserData(CreateItemG('ofir',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("ancientexplode.mdl",GetUnitX(u),GetUnitY(u),1.5)) call thv("Purefied water of nature |c00ffff80created!|r",GetUnitX(u),GetUnitY(u),25,.075,.035,bj_PI/ 2.5,5,6) call PlaySoundAtPoint_BJ((sn),(($7F)*1.),((GetUnitX(u))*1.),((GetUnitY(u))*1.),0) elseif r<=20. then call SetItemUserData(CreateItemG('I04W',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("ancientexplode.mdl",GetUnitX(u),GetUnitY(u),1.5)) elseif r<=50. then call UnitDamageTargetBY(((u)),((u)),(((($249F0)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") else call Auxiliary_TargetOrder(('A0I3'),null,2,$D0085,u) endif call Ltv(LAv("naturewave.mdl",GetUnitX(u),GetUnitY(u),1.5)) set u=null endfunction function T20v takes nothing returns nothing local unit u=GetTriggerUnit() local real r=GetRandomReal(0,100) if r<=.5 then call SetItemUserData(CreateItemG('I05V',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("flame piercing.mdl",GetUnitX(u),GetUnitY(u),1.5)) call thv("Hell magic stone |c00ffff80created!|r",GetUnitX(u),GetUnitY(u),25,.075,.035,bj_PI/ 2.5,5,6) call PlaySoundAtPoint_BJ((sn),(($7F)*1.),((GetUnitX(u))*1.),((GetUnitY(u))*1.),0) elseif r<=1. then call SetItemUserData(CreateItemG('I05W',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("flame piercing.mdl",GetUnitX(u),GetUnitY(u),1.5)) call thv("Blazing core |c00ffff80created!|r",GetUnitX(u),GetUnitY(u),25,.075,.035,bj_PI/ 2.5,5,6) call PlaySoundAtPoint_BJ((sn),(($7F)*1.),((GetUnitX(u))*1.),((GetUnitY(u))*1.),0) elseif r<=20. then call SetItemUserData(CreateItemG('I0DK',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("flame piercing.mdl",GetUnitX(u),GetUnitY(u),1.5)) elseif r<=50. then call UnitDamageTargetBY(((u)),((u)),(((($249F0)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") else call Auxiliary_TargetOrder(('A0I3'),null,2,$D0085,u) endif call Ltv(LAv("firegold.mdl",GetUnitX(u),GetUnitY(u),1.5)) set u=null endfunction function T21v takes nothing returns nothing local unit u=GetTriggerUnit() local real r=GetRandomReal(0,100) if r<=.5 then call SetItemUserData(CreateItemG('I0EQ',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("darkpillar.mdl",GetUnitX(u),GetUnitY(u),1.5)) call thv("Fragment of Chaos |c00ffff80created!|r",GetUnitX(u),GetUnitY(u),25,.075,.035,bj_PI/ 2.5,5,6) call PlaySoundAtPoint_BJ((sn),(($7F)*1.),((GetUnitX(u))*1.),((GetUnitY(u))*1.),0) elseif r<=1. then call SetItemUserData(CreateItemG('I0ER',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("darkpillar.mdl",GetUnitX(u),GetUnitY(u),1.5)) call thv("Spearhead of Death |c00ffff80created!|r",GetUnitX(u),GetUnitY(u),25,.075,.035,bj_PI/ 2.5,5,6) call PlaySoundAtPoint_BJ((sn),(($7F)*1.),((GetUnitX(u))*1.),((GetUnitY(u))*1.),0) elseif r<=20. then call SetItemUserData(CreateItemG('I04X',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("darkpillar.mdl",GetUnitX(u),GetUnitY(u),1.5)) elseif r<=50. then call UnitDamageTargetBY(((u)),((u)),(((($249F0)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") else call Auxiliary_TargetOrder(('A0I3'),null,2,$D0085,u) endif call Ltv(LAv("shadowwave.mdl",GetUnitX(u),GetUnitY(u),1.5)) set u=null endfunction function T22v takes nothing returns nothing local unit u=GetTriggerUnit() local real r=GetRandomReal(0,100) if r<=.5 then call SetItemUserData(CreateItemG('shea',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("acid ex.mdl",GetUnitX(u),GetUnitY(u),1.5)) call thv("Decay Nature |c00ffff80created!|r",GetUnitX(u),GetUnitY(u),25,.075,.035,bj_PI/ 2.5,5,6) call PlaySoundAtPoint_BJ((sn),(($7F)*1.),((GetUnitX(u))*1.),((GetUnitY(u))*1.),0) elseif r<=20.5 then call SetItemUserData(CreateItemG('I0DK',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("acid ex.mdl",GetUnitX(u),GetUnitY(u),1.5)) elseif r<=70.5 then call UnitDamageTargetBY(((u)),((u)),(((($249F0)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") else call Auxiliary_TargetOrder(('A0I3'),null,2,$D0085,u) endif call Ltv(LAv("earthnova.mdl",GetUnitX(u),GetUnitY(u),1.5)) set u=null endfunction function T23v takes nothing returns nothing local unit u=GetTriggerUnit() local real r=GetRandomReal(0,100) if r<=.5 then call SetItemUserData(CreateItemG('I0EG',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("darknessexplosion.mdl",GetUnitX(u),GetUnitY(u),1.5)) call thv("Ancient forgotten magic stone |c00ffff80created!|r",GetUnitX(u),GetUnitY(u),25,.075,.035,bj_PI/ 2.5,5,6) call PlaySoundAtPoint_BJ((sn),(($7F)*1.),((GetUnitX(u))*1.),((GetUnitY(u))*1.),0) elseif r<=20.5 then call SetItemUserData(CreateItemG('I0DK',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("darknessexplosion.mdl",GetUnitX(u),GetUnitY(u),1.5)) elseif r<=70.5 then call UnitDamageTargetBY(((u)),((u)),(((($30D40)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") else call Auxiliary_TargetOrder(('A0I3'),null,2,$D0085,u) endif call Ltv(LAv("firenova2.mdl",GetUnitX(u),GetUnitY(u),1.5)) set u=null endfunction function T24v takes nothing returns nothing local unit u=GetTriggerUnit() local real r=GetRandomReal(0,100) if r<=.5 then call SetItemUserData(CreateItemG('shea',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("blizzarderuption.mdl",GetUnitX(u),GetUnitY(u),1.5)) call thv("Soul fragments |c00ffff80created!|r",GetUnitX(u),GetUnitY(u),25,.075,.035,bj_PI/ 2.5,5,6) call PlaySoundAtPoint_BJ((sn),(($7F)*1.),((GetUnitX(u))*1.),((GetUnitY(u))*1.),0) elseif r<=20.5 then call SetItemUserData(CreateItemG('I0DK',GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("blizzarderuption.mdl",GetUnitX(u),GetUnitY(u),1.5)) elseif r<=70.5 then call UnitDamageTargetBY(((u)),((u)),(((($30D40)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") else call Auxiliary_TargetOrder(('A0I3'),null,2,$D0085,u) endif call Ltv(LAv("frostnova.mdl",GetUnitX(u),GetUnitY(u),1.5)) set u=null endfunction function Tkv takes nothing returns nothing local unit u=GetTriggerUnit() call thv("|c00eef3b1"+Game_PlayerName[GetPlayerId(GetOwningPlayer(u))]+" received the gift!",GetUnitX(u),GetUnitY(u),10,.1,.075,bj_PI/ 2,3,5) call Ltv(LAv("Abilities\\Spells\\Other\\Transmute\\PileofGold.mdl",GetUnitX(u),GetUnitY(u),2.5)) set u=null endfunction function Tlv takes nothing returns nothing call AddUnitSellItemById('I006',function TGv) call AddUnitUseItemById('I003',function tyv) call AddUnitUseItemById('I004',function tYv) call AddUnitUseItemById('I005',function tzv) call AddUnitUseItemById('I027',function tZv) call AddUnitUseItemById('I028',function t_v) call AddUnitUseItemById('I029',function t0v) call AddUnitUseItemById('I02A',function t1v) call AddUnitUseItemById('I02B',function t2v) call AddUnitUseItemById('I06F',function Thv) call AddUnitUseItemById('I06H',function t3v) call AddUnitUseItemById('I0AW',function t4v) call AddUnitUseItemById('I0AX',function t5v) call AddUnitUseItemById('fgdg',function TIv) call AddUnitUseItemById('fgfh',function TXv) call AddUnitUseItemById('fgrd',function t6v) call AddUnitUseItemById('pdiv',function TAv) call AddUnitUseItemById('pghe',function TRv) call AddUnitUseItemById('pgma',function TOv) call AddUnitUseItemById('sor8',function Tkv) call AddUnitUseItemById('sres',function TCv) call AddUnitUseItemById('totw',function Tcv) call AddUnitUseItemById('wild',function TBv) call AddUnitUseItemById('I0B9',function TNv) // call AddUnitUseItemById('I0BB',function twv) call AddUnitUseItemById('I0BC',function Tbv) call AddUnitUseItemById('I0DB',function tWv) call AddUnitUseItemById('I0DC',function Tdv) call AddUnitUseItemById('I0DD',function Tfv) call AddUnitUseItemById('I0DE',function TFv) call AddUnitUseItemById('I0DF',function TDv) call AddUnitUseItemById('sreg',function T10v) call AddUnitUseItemById('spro',function T11v) call AddUnitUseItemById('guvi',function T12v) call AddUnitUseItemById('lmbr',function T13v) call AddUnitUseItemById('stwp',function T14v) call AddUnitUseItemById('pman',function T15v) call AddUnitUseItemById('rspd',function T16v) call AddUnitUseItemById('pnvl',function T17v) call AddUnitUseItemById('sman',function T18v) call AddUnitUseItemById('rdis',function T19v) call AddUnitUseItemById('gold',function T20v) call AddUnitUseItemById('rhe1',function T21v) call AddUnitUseItemById('rspl',function T22v) call AddUnitUseItemById('tin2',function T23v) call AddUnitUseItemById('rre1',function T24v) endfunction function Creep__n02YOnAttack takes nothing returns boolean local integer id=(pF) if GetUnitAbilityLevel((MF),'B043')==0 then set vi[id]=1 elseif vi[id]<5 then set vi[id]=vi[id]+1 endif call UnitAppBuffByLevel((pF),'A0L5',$D006B,vi[id]) return false endfunction function yzv takes nothing returns boolean local integer ysv=GetRandomInt(1,8) if ysv==1 then call UnitAppBuff((pF),'ACfn',$D0102) call UnitDamageTargetBY((((mF))),(((MF))),((((500)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl",(MF),"origin")) elseif ysv==2 then call UnitDamageTargetBY((((mF))),(((MF))),(((($5DC)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Monsoon\\MonsoonBoltTarget.mdl",(MF),"origin")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl",(MF),"origin")) endif return false endfunction function yZv takes nothing returns nothing local integer NOv=(alloc__hpv(GetHandleId((ei)))) if GetUnitAbilityLevel((Je[(NOv)]),'Bcrs')==0 then call ReleaseTimer(ei,"[TimerUtils]Error:25") call ModifyUnitAttack((NOv),-$9C4*xi) call ModifyUnitAttackSpeed((NOv),-$A*xi) call Unit_Cancel_Counter(41,NOv) set ei=null endif endfunction function y_v takes nothing returns boolean local integer NOv local unit u local real x local real y if GetUnitAbilityLevel((mF),'Bcrs')==1 then set NOv=(pF_v) if ei==null then set ei=NewTimer(NOv) set xi=0 call TimerStart(ei,.03125,true,function yZv) call Unit_App_Counter(42,NOv) endif if xi<20 then set xi=xi+1 call ModifyUnitAttack((NOv),$9C4) call ModifyUnitAttackSpeed((NOv),$A) endif endif if GetRandomInt(1,$A)==1 then set x=GetUnitX((MF)) set y=GetUnitY((MF)) call Ltv(LAv("Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl",x,y,2.75)) call GroupEnumUnitsInRange(G,x,y,375,null) call GroupRemoveUnit(G,(MF)) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,300)and IsUnitAliveAndEnemy(u,(mF))then call UnitDamageTargetBY((((mF))),((u)),((((GetDamage())*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) endif endloop endif return false endfunction function y0v takes nothing returns boolean local real x=GetUnitX((MF)) local real y=GetUnitY((MF)) local unit u call Ltv(LAv("CenarionFury.mdl",x,y,2.75)) call GroupEnumUnitsInRange(G,x,y,475,null) call GroupRemoveUnit(G,(MF)) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,400)and IsUnitAliveAndEnemy(u,(mF))then call UnitDamageTargetBY(((mF)),(u),(((DAK_AMOUNT[HF]))*1.),false,(false),false,false,(ATTACK_TYPE_HERO),(DAMAGE_TYPE_NORMAL),.0,"") endif endloop return false endfunction function y2v takes nothing returns boolean if GetDamage()>$2710 then call UnitDamageTargetBY((((MF))),(((mF))),(((($9C4)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) else call UnitDamageTargetBY((((MF))),(((mF))),((((.25*GetDamage())*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) endif return false endfunction function y3v takes nothing returns boolean local real x=GetUnitX((MF)) local real y=GetUnitY((MF)) local unit u call CTv(40,.3,x,y,750) call Ltv(LAv("Epicenter.mdl",x,y,3)) call GroupEnumUnitsInRange(G,x,y,825,null) call GroupRemoveUnit(G,(MF)) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitAliveAndEnemy(u,(mF))and IsUnitInRangeXY(u,x,y,750)then call UnitDamageTargetBY(((mF)),(u),(((DAK_AMOUNT[HF]))*1.),false,(false),false,false,(ATTACK_TYPE_HERO),(DAMAGE_TYPE_NORMAL),.0,"") endif endloop return false endfunction function y4v takes nothing returns boolean call UnitAppBuffByLevel((pF),'ACsw',$D006B,3) return false endfunction function y5v takes nothing returns boolean call UnitDamageTargetBY((((mF))),(((MF))),(((($5DC)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call dxv((MF),true) return false endfunction function y6v takes nothing returns boolean local integer id=(pF_v) local unit u local integer i local real x local real y set Zr[id]=Zr[id]+1 if Zr[id]==3 then set Zr[id]=0 set i=2 set x=GetUnitX((MF)) set y=GetUnitY((MF)) call DamageAmplify(2*GetDamage()) call Ltv(LAv("Abilities\\Weapons\\GreenDragonMissile\\GreenDragonMissile.mdl",x,y,1.5)) call Ltv(Lfv(LAv("AncientExplode.mdl",x,y,.6),125,$9B,125,55)) call GroupEnumUnitsInRange(G,x,y,575,null) call GroupRemoveUnit(G,(MF)) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,500)and IsUnitAliveAndEnemy(u,(mF))then set i=i-1 call BEv((mF),x,y,GetUnitFlyHeight(u)+60,u,GetDamage(),"Abilities\\Weapons\\IllidanMissile\\IllidanMissile.mdl",1,30,$A) exitwhen i==0 endif endloop set u=null endif return false endfunction function y7v takes nothing returns boolean if GetUnitTypeId((MF))=='n02U' and GetWidgetLife((MF))<$1EA50 then call cUv((MF)) endif return false endfunction function y8v takes nothing returns boolean local real x local real y local real a if GetUnitAbilityLevel((mF),'B01V')>0 then set x=GetUnitX((MF)) set y=GetUnitY((MF)) set a=Atan2(GetUnitY((mF))-y,GetUnitX((mF))-x) call UnitCureTaret((mF),(mF),$C350+2*GetDamage()) call GJv((MF),x+100*Cos(a),y+100*Sin(a),.25) call DestroyEffect(AddSpecialEffectTarget("VampiricAuraTarget.mdx",(mF),"chest")) endif return false endfunction function y9v takes nothing returns boolean if GetUnitState((MF),UNIT_STATE_MANA)>=GetUnitState((MF),UNIT_STATE_MAX_MANA)and GetRandomInt(1,5)<3 then call SetUnitState((MF),UNIT_STATE_MANA,0) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\SpellShieldAmulet\\SpellShieldCaster.mdl",(MF),"chest")) set KF[HF]=PF+1000000. endif return false endfunction function Yvv takes nothing returns boolean if GetUnitTypeId((MF))=='n038' and not IsUnitIllusion((MF))then call cPv((MF)) endif if GetUnitAbilityLevel((MF),'B05D')==1 or IsUnitPaused((MF))then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\MirrorImage\\MirrorImageCaster.mdl",(MF),"origin")) set KF[HF]=PF+1000000. elseif GetRandomInt(1,4)==1 then call IssueImmediateOrderById((MF),$D0084) endif return false endfunction function UnitInitAI takes nothing returns nothing local integer data=(le) local integer tpid=UnitTypeId[data] if tpid=='n02M' then call cwv((Je[(data)])) elseif tpid=='n02U' then call UnitAddPAttackTrig((data),function y6v) call UnitAddShieldTrig((data),function y7v) elseif tpid=='h01L' or tpid=='n037' or tpid=='n038' then call UnitAddShieldTrig((data),function Yvv) elseif tpid=='h010' then call UnitAddPAttackTrig((data),function y0v) elseif tpid=='n01Y' then call UnitAddPAttackTrig((data),function y_v) elseif tpid=='oshm' then call UnitAddPAttackTrig((data),function y3v) elseif tpid=='n02I' then call UnitAddPAttackTrig((data),function y4v) elseif tpid=='n02L' then call UnitAddPAttackTrig((data),function y8v) elseif tpid=='n02T' then call UnitAddPAttackTrig((data),function y5v) elseif tpid=='h01B' then call UnitAddPAttackTrig((data),function yzv) elseif tpid=='n00B' then call UnitAddBePAttackTrig((data),function y2v) elseif tpid=='n02J' then call UnitAddShieldTrig((data),function y9v) endif endfunction function YEv takes nothing returns nothing call RegisterEnterworldEvent('n02M',function UnitInitAI) call RegisterEnterworldEvent('n02U',function UnitInitAI) call RegisterEnterworldEvent('h01L',function UnitInitAI) call RegisterEnterworldEvent('n037',function UnitInitAI) call RegisterEnterworldEvent('n038',function UnitInitAI) call RegisterEnterworldEvent('h010',function UnitInitAI) call RegisterEnterworldEvent('n01Y',function UnitInitAI) call RegisterEnterworldEvent('oshm',function UnitInitAI) call RegisterEnterworldEvent('n02I',function UnitInitAI) call RegisterEnterworldEvent('n02L',function UnitInitAI) call RegisterEnterworldEvent('n02T',function UnitInitAI) call RegisterEnterworldEvent('h01B',function UnitInitAI) call RegisterEnterworldEvent('n00B',function UnitInitAI) call RegisterEnterworldEvent('n02J',function UnitInitAI) endfunction function YFv takes nothing returns nothing local unit u local real p if UnitAlive(oi)then set p=.05-.025*GetWidgetLife(oi)/ GetUnitState(oi,UNIT_STATE_MAX_LIFE) call GroupEnumUnitsInRect(G,ri,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitAliveAndEnemyNotAvul(u,oi)and not UnitHasItemOfType(u,'I09Z')then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl",u,"origin")) call UnitDamageTargetBY(((oi)),((u)),(((($FA+p*GetUnitMaxLifeById((GetUnitUserData((u)))))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) endif endloop else call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:26") endif endfunction function Ygv takes nothing returns nothing set oi=gg_unit_h01F_0728 set ri=gg_rct_BSDX______________001 set ii[0]=$44A7 set ai[0]=-$4AC4 set ii[1]=$48A8 set ai[1]=-$45EC set ii[2]=$4D58 set ai[2]=-$4556 set ii[3]=$50AA set ai[3]=-$4790 set ii[4]=$5190 set ai[4]=-$4F60 call SetHeroLevel(oi,$FA,false) call SetUnitInvulnerable(oi,true) call TimerStart((NewTimer(0)),2.5,true,function YFv) endfunction function Passive_Skill_SpiriBreath_RemoveBuff takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:27") if AF[id]!=0 then call DeUnitMdef((id),AF[id]) set AF[id]=0 endif if bF[id]then call ModifyUnitArmor((id),50*BF[id]) else call ModifyUnitArmor((id),$F*BF[id]) endif call UnitRemoveAbilityandBuffBY((Je[(id)]),'A09T','B02Z') call Unit_Cancel_Counter(43,(id)) set NF[id]=null endfunction function Passive_Skill_SpiriBreath_Addbuff takes unit u,boolean i returns nothing local integer id=(GetUnitUserData((u))) if NF[id]==null then set NF[id]=NewTimer(id) set bF[id]=i set BF[id]=0 if i then set AF[id]=ModifyUnitMdef((id),0) endif call UnitAddAbilityBY(u,'A09T') call Unit_App_Counter(44,(id)) endif if BF[id]<5 then set BF[id]=BF[id]+1 if bF[id]then call UnitMdefChange((id),AF[id],-3*BF[id]) call ModifyUnitArmor((id),-50) else call ModifyUnitArmor((id),-$F) endif endif call TimerStart(NF[id],6,false,function Passive_Skill_SpiriBreath_RemoveBuff) endfunction function YKv takes nothing returns integer local integer NNv if(CF[(0)]==0)then set cF=cF+1 set NNv=cF else set NNv=CF[(0)] set CF[(0)]=CF[CF[(0)]] endif return NNv endfunction function Ylv takes integer NNv returns nothing set CF[NNv]=CF[(0)] set CF[(0)]=NNv endfunction function YLv takes nothing returns nothing local integer NNv=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:28") call UnitRemoveAbilityandBuffBY((Je[(dF[NNv])]),DF[NNv],fF[NNv]) call Unit_Cancel_Counter(45,dF[NNv]) call Ylv(NNv) endfunction function Ymv takes unit u,integer a,integer b,real cyv returns boolean local integer NNv if GetUnitAbilityLevel(u,a)==0 then set NNv=YKv() set dF[NNv]=(GetUnitUserData((u))) set DF[NNv]=a set fF[NNv]=b call UnitAddAbilityBY(u,a) call TimerStart(NewTimer(NNv),cyv,false,function YLv) call Unit_App_Counter(46,dF[NNv]) return true endif return false endfunction function BrokenShield_A takes unit u returns boolean if GetUnitAbilityLevel(u,'B00W')>0 then call UnitRemoveAbility(u,'B00W') return true elseif GetUnitAbilityLevel(u,'B01U')>0 then call UnitRemoveAbility(u,'B01U') return true elseif UnitRemoveAbility(u,'B09I')then return true elseif cLv(((GetUnitUserData((u)))))then return true elseif BSv(((GetUnitUserData((u)))))then return true endif return false endfunction function ziv takes nothing returns boolean if IsUnitAliveAndAlly(GetTriggerUnit(),GetAttacker())then if IsUnitOwnedByPlayer(GetAttacker(),Player($F))==FALSE then call IssueImmediateOrderById(GetAttacker(),$D0004) endif endif return false endfunction function zav takes nothing returns boolean if GetIssuedOrderId()==$D0016 then call IssueImmediateOrderById(GetTriggerUnit(),$D0004) endif return false endfunction function zGv takes nothing returns nothing local integer i=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:29") if GetLocalPlayer()==P[i]then call CameraSetSourceNoise(0,0) call CameraSetTargetNoise(0,0) endif set gg[i]=null endfunction function zhv takes integer i,real Ctv,real timed returns nothing if timed>0 then if GetLocalPlayer()==P[i]then call CameraSetTargetNoiseEx(2*Ctv,Ctv*$186A0,true) call CameraSetSourceNoiseEx(2*Ctv,Ctv*$186A0,true) endif if gg[i]==null then set gg[i]=NewTimer(i) call TimerStart(gg[i],timed,false,function zGv) else if TimerGetRemaining(gg[i])=50 and i<=500 then set NNv=GetPlayerId(GetTriggerPlayer()) set Gg[NNv]=16*i set Gg[NNv+$C]=.6 if GetLocalPlayer()==P[NNv]then call SetCameraField(CAMERA_FIELD_TARGET_DISTANCE,Gg[NNv],.6) endif endif return false endfunction function zmv takes nothing returns boolean local integer NNv=GetPlayerId(GetTriggerPlayer()) set fg[NNv]=true if Gg[NNv]==0 then set Gg[NNv]=$8CA set Gg[NNv+$C]=.6 endif return false endfunction function zMv takes nothing returns boolean set fg[(GetPlayerId((GetTriggerPlayer())))]=false return false endfunction function zpv takes nothing returns nothing local integer NNv=8 loop set NNv=NNv-1 if fg[NNv]then if Gg[NNv+$C]>0 then set Gg[NNv+$C]=Gg[NNv+$C]-.1 endif if GetLocalPlayer()==P[NNv]then call SetCameraField(CAMERA_FIELD_TARGET_DISTANCE,Gg[NNv],Gg[NNv+$C]) endif endif exitwhen NNv==0 endloop endfunction function zPv takes nothing returns nothing local trigger gzv=CreateTrigger() local trigger zqv=CreateTrigger() local trigger zQv=CreateTrigger() local integer i=8 loop set i=i-1 if pV[i]then call TriggerRegisterPlayerChatEvent(gzv,P[i],"-tldi ",false) call TriggerRegisterPlayerChatEvent(gzv,P[i],"-sight ",false) call TriggerRegisterPlayerChatEvent(gzv,P[i],"-cam ",false) call TriggerRegisterPlayerChatEvent(zqv,P[i],"-rhwjd",true) call TriggerRegisterPlayerChatEvent(zqv,P[i],"-hold",true) call TriggerRegisterPlayerChatEvent(zqv,P[i],"-camhold",true) call TriggerRegisterPlayerChatEvent(zqv,P[i],"-cam hold",true) call TriggerRegisterPlayerChatEvent(zQv,P[i],"-rhwjdgowp",true) call TriggerRegisterPlayerChatEvent(zQv,P[i],"-hold off",true) call TriggerRegisterPlayerChatEvent(zQv,P[i],"-camhold off",true) call TriggerRegisterPlayerChatEvent(zQv,P[i],"-cam hold off",true) endif exitwhen i<=0 endloop call TimerStart((NewTimer(0)),.1,true,function zpv) call TriggerAddCondition(gzv,Condition(function zLv)) call TriggerAddCondition(zqv,Condition(function zmv)) call TriggerAddCondition(zQv,Condition(function zMv)) set gzv=null set zqv=null set zQv=null endfunction function zsv takes nothing returns boolean call DisplayTimedText("|c0052E252"+Game_PlayerName[GetPlayerId(GetTriggerPlayer())]+"'s|r rolled |cffffcc00'"+I2S(GetRandomInt(1,201))+"|r !",$A) return false endfunction function zSv takes nothing returns boolean set Jg=false call KillUnit(MV[GetPlayerId(GetTriggerPlayer())]) set Jg=true return false endfunction function ztv takes nothing returns boolean if GetLocalPlayer()==GetTriggerPlayer()then call ClearTextMessages() endif return false endfunction function zTv takes nothing returns nothing local item i=GetEnumItem() local real x=GetItemX(i) local real y=GetItemY(i) if IsItemVisible(i)and not(IsPointInRect(x,y,gg_rct_XSC___________000)or IsPointInRect(x,y,gg_rct_FSZJ______________000)or IsPointInRect(x,y,gg_rct_BBMD______________000))then call RemoveItemG(i) endif set i=null endfunction function zuv takes nothing returns nothing if wV!=null then call ReleaseTimer(wV,"[TimerUtils]Error:31") call ReleaseTimer(WV,"[TimerUtils]Error:32") call DestroyTimerDialog(yV) set wV=null set WV=null set yV=null endif endfunction function zUv takes nothing returns nothing call zuv() call EnumItemsInRect(WorldBounds,null,function zTv) endfunction function zwv takes nothing returns nothing call DisplayTimedText("|cffffcc0010Seconds|r before map will be |c0052E252cleaned|r.",$A) endfunction function zWv takes nothing returns boolean if wV==null then set wV=(NewTimer(0)) set WV=(NewTimer(0)) set yV=CreateTimerDialog(wV) call DisplayTimedText("|cffffcc002minutes|r before map will be |c0052E252cleaned|r.",$F) call TimerStart(wV,120,false,function zUv) call TimerStart(WV,110,false,function zwv) call TimerDialogSetTitle(yV,"|c0080ffffMap cleaning") call TimerDialogDisplay(yV,true) else call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,5,"Cleaning work has been arranged(?/?/?/?).") endif return false endfunction function zyv takes nothing returns boolean if wV==null then call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,5,"Cleaning work is not scheduled(?/?/?/?).") else call DisplayTimedText("|c0052E252Cleaning was canceled.|r",5) call zuv() endif return false endfunction function zYv takes nothing returns nothing set hg=malloc() call SaveInteger(BYHT,hg,'Hblm',1) call SaveInteger(BYHT,hg,'H000',1) call SaveInteger(BYHT,hg,'H003',1) call SaveInteger(BYHT,hg,'H00H',1) call SaveInteger(BYHT,hg,'Hmkg',1) call SaveInteger(BYHT,hg,'H01V',1) call SaveInteger(BYHT,hg,'H001',2) call SaveInteger(BYHT,hg,'H001',2) call SaveInteger(BYHT,hg,'H004',2) call SaveInteger(BYHT,hg,'H00E',2) call SaveInteger(BYHT,hg,'H00Z',2) call SaveInteger(BYHT,hg,'Hamg',2) call SaveInteger(BYHT,hg,'H015',2) call SaveInteger(BYHT,hg,'H01H',2) call SaveInteger(BYHT,hg,'H01U',2) call SaveInteger(BYHT,hg,'H01W',2) call SaveInteger(BYHT,hg,'H002',3) call SaveInteger(BYHT,hg,'H005',3) call SaveInteger(BYHT,hg,'H006',3) call SaveInteger(BYHT,hg,'H007',3) call SaveInteger(BYHT,hg,'H008',3) call SaveInteger(BYHT,hg,'H009',3) call SaveInteger(BYHT,hg,'H00J',3) call SaveInteger(BYHT,hg,'H01I',3) call SaveInteger(BYHT,hg,'H01N',3) call SaveInteger(BYHT,hg,'H01X',3) call SaveInteger(BYHT,hg,'H01Y',3) endfunction function zzv takes nothing returns nothing set YV[ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:33")]=false endfunction function zZv takes integer NNv returns boolean return UnitHasItemOfType((Je[(NNv)]),'I06E')and not Hg[NNv] endfunction function z_v takes nothing returns nothing set Hg[(ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:34"))]=false endfunction function z0v takes nothing returns nothing local timer t=GetExpiredTimer() local integer NNv=(alloc__hpv(GetHandleId((t)))) set jg[NNv]=jg[NNv]-1 if jg[NNv]>0 then call Ltv(LAv("NatureExplosion.mdl",Hero_Revive_X[(NNv)],Hero_Revive_Y[(NNv)],.75)) else call SetItemDroppableTimedById((NNv),'I06E',$B4) call Ltv(LAv("NatureExplosion.mdl",Hero_Revive_X[(NNv)],Hero_Revive_Y[(NNv)],2)) call TimerStart(t,$B4,false,function z_v) endif set t=null endfunction function z1v takes integer NNv returns nothing set Hg[NNv]=true set jg[NNv]=3 call Ltv(LAv("NatureExplosion.mdl",Hero_Revive_X[(NNv)],Hero_Revive_Y[(NNv)],.75)) call TimerStart(NewTimer(NNv),.66666,true,function z0v) endfunction function z2v takes integer NNv returns nothing set mg[NNv]=0 call MultiboardSetItemValueBY(TV,Kc[(NNv)]+1,4,"0") call SetTextTagLifespan(Kg[NNv],2.5) call SetTextTagFadepoint(Kg[NNv],2) call Ltv(LAv("Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl",(GetUnitX(II[(kg[NNv])])),(GetUnitY(II[(kg[NNv])])),1.5)) call LTv(kg[NNv]) set Kg[NNv]=null endfunction function z3v takes integer NNv returns nothing if Kg[NNv]!=null then call DestroyTextTag(Kg[NNv]) endif set Kg[NNv]=CreateTextTag() call SetTextTagText(Kg[NNv],"|c00ff0000"+I2S(lg[NNv])+" + "+I2S(Lg[NNv])+" = ?",.025) call SetTextTagPos(Kg[NNv],(GetUnitX(II[(kg[NNv])])),(GetUnitY(II[(kg[NNv])])),50) call SetTextTagVisibility(Kg[NNv],true) call SetTextTagPermanent(Kg[NNv],false) endfunction function z5v takes integer NNv returns nothing if pg[NNv]then set Pg[qg[NNv]]=Pg[NNv] set qg[Pg[NNv]]=qg[NNv] set pg[NNv]=false if qg[(0)]==0 then call frv(Qg) endif call z2v(NNv) call Unit_Cancel_Counter(47,(NNv)) endif endfunction function z6v takes nothing returns boolean local integer NNv=qg[(0)] local real s local real x local real y local real a loop exitwhen NNv==0 set a=bj_DEGTORAD*GetUnitFacing((Je[(NNv)])) set s=(1.-Mg[NNv]/ 19200.) set x=GetUnitX((Je[(NNv)]))-(100-75*s)*Cos(a) set y=GetUnitY((Je[(NNv)]))-(100-75*s)*Sin(a) call LKv(kg[NNv],x) call Llv(kg[NNv],y) call SetUnitFacing(II[(kg[NNv])],((a)*1.)*bj_RADTODEG) if Mg[NNv]>1 then set Mg[NNv]=Mg[NNv]-1 if ModuloInteger(Mg[NNv],$780)==0 then call z3v(NNv) endif call Lfv(kg[NNv],$FF,$FF,$FF,R2I(105+$96*s)) call SetTextTagPos(Kg[NNv],x,y,50) else call Ltv(LAv("BigBloodEX-NoSplat-NoGutz.mdl",GetUnitX((Je[(NNv)])),GetUnitY((Je[(NNv)])),2)) call thv("|c00ff0000Raped!|r",GetUnitX((Je[(NNv)])),GetUnitY((Je[(NNv)])),GetUnitFlyHeight((Je[(NNv)]))+25,.05,.04,bj_PI/ 2,3,3.5) call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UDeathSmall\\UDeathSmall.mdl",GetUnitX((Je[(NNv)])),GetUnitY((Je[(NNv)])))) call RemoveUnitBJ((Je[(NNv)]),2) call z5v(NNv) endif set NNv=qg[NNv] endloop return false endfunction function z7v takes integer NNv returns boolean if not pg[NNv]then if qg[(0)]==0 then if Qg==0 then set Qg=fxv(function z6v) endif call fov(Qg) endif set qg[NNv]=qg[(0)] set Pg[qg[(0)]]=NNv set qg[(0)]=NNv set Pg[NNv]=0 set pg[NNv]=true call Unit_App_Counter(48,(NNv)) return true endif return false endfunction function z8v takes nothing returns boolean local integer NNv=(GetUnitUserData((MV[GetPlayerId(GetTriggerPlayer())]))) local integer a if pg[NNv]then set a=S2I(SubString(GetEventPlayerChatString(),1,5)) if a>0 then if a==lg[NNv]+Lg[NNv]then call z5v(NNv) else set Mg[NNv]=Mg[NNv]-$F00 call z3v(NNv) call LFv(kg[NNv],"Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl") call zhv((Kc[(NNv)]),75,1) call PlaySoundOnUnit_BJ((Za),((100)*1.),((Je[(NNv)]))) endif endif endif return false endfunction function z9v takes nothing returns nothing local trigger gzv=CreateTrigger() local integer i=8 loop set i=i-1 if pV[i]then call TriggerRegisterPlayerChatEvent(gzv,P[i],"-",false) endif exitwhen i==0 endloop call TriggerAddCondition(gzv,Filter(function z8v)) set gzv=null endfunction function ZEv takes nothing returns nothing local integer NNv=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local real x=(GetUnitX(II[(ug[NNv])])) local real y=(GetUnitY(II[(ug[NNv])])) local real a=bj_DEGTORAD*(GetUnitFacing(II[(ug[NNv])])) local integer ZXv=CreateBarrageTypeD(x,y-400*Sin(a),600,x,y,0) call LKv(ug[NNv],x+100*Cos(a)) call Llv(ug[NNv],y+100*Sin(a)) set Ug[NNv]=Ug[NNv]-1 set s__barrage_speed[ZXv]=0 set s__barrage_acceleration[ZXv]=.3 call LMv(s__barrage_model[ZXv],"OrbOfCorruption.mdl") call SetUnitScale(II[(s__barrage_model[ZXv])],((1.5)*1.),0,0) call LFv(s__barrage_model[ZXv],"Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl") call BOv(ZXv) if Ug[NNv]<1 then call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:35") call Unit_Cancel_Counter(49,(NNv)) call Ltv(ug[NNv]) endif endfunction function ZOv takes nothing returns nothing local integer NNv=(GetUnitUserData((GetTriggerUnit()))) local real a=bj_DEGTORAD*GetUnitFacing((Je[(NNv)])) set ug[NNv]=Lnv(GetUnitX((Je[(NNv)]))-500*Cos(a),GetUnitY((Je[(NNv)]))-500*Sin(a),a) set Ug[NNv]=$A call zKv((GetPlayerId((GetOwningPlayer((Je[(NNv)]))))),$80,0,$FF,1) call TimerStart(NewTimer(NNv),.1,true,function ZEv) call Unit_App_Counter(50,(NNv)) endfunction function ZRv takes nothing returns nothing call PauseUnit((Je[(ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:36"))]),false) endfunction function ZIv takes nothing returns boolean local unit u=GetTriggerUnit() call thv("|c000080ffStop killing me!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!|r",GetUnitX(u),GetUnitY(u),50,.075,.05,bj_PI/ 2,2,2.5) call PlaySoundOnUnit_BJ((Jn),((100)*1.),(u)) call Ltv(LAv("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",GetUnitX(u),GetUnitY(u),2.5)) call Ltv(LAv("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",GetUnitX(u),GetUnitY(u),2.5)) call zhv((GetPlayerId((GetOwningPlayer(u)))),40,1) call PauseUnit(u,true) call SetUnitAnimation(u,"death") call TimerStart(NewTimer((GetUnitUserData((u)))),2.5,false,function ZRv) set u=null return false endfunction function ZAv takes integer NNv returns boolean call Ltv(LAv("Acid Ex.mdx",s__locationez_X[s__barrage_p2[NNv]],s__locationez_Y[s__barrage_p2[NNv]],.75)) call Ltv(LAv("Abilities\\Weapons\\ChimaeraAcidMissile\\ChimaeraAcidMissile.mdl",s__locationez_X[s__barrage_p2[NNv]],s__locationez_Y[s__barrage_p2[NNv]],.75)) return true endfunction function ZNv takes integer NNv returns nothing call RemoveBarrage(NNv) endfunction function Zbv takes nothing returns boolean local integer NNv=s__barrage_FR[wg] local unit u if NNv!=wg then call UseBarrage(wg) loop exitwhen NNv==wg if(s__barrage_outside[(NNv)])then call ZAv(NNv) call RemoveBarrage((NNv)) elseif(s__barrage_finish[(NNv)])then if ZAv(NNv)then call RemoveBarrage((NNv)) else set s__barrage_finish[(NNv)]=false endif endif set NNv=s__barrage_FR[NNv] endloop elseif s__barrage_InOperation[wg]then set s__barrage_InOperation[wg]=false call TriggerEvaluate(Xmv) endif return false endfunction function ZBv takes nothing returns nothing call fov(Wg) endfunction function s__PoisonBlast_stop takes nothing returns nothing call frv(Wg) endfunction function Zcv takes nothing returns nothing set Wg=fxv(function Zbv) call fov(Wg) endfunction function ZCv takes integer NNv returns nothing call s__barrage_Filling((wg),(NNv)) if not s__barrage_InOperation[wg]then set s__barrage_InOperation[wg]=true call fov(Wg) endif endfunction function Zdv takes nothing returns nothing set wg=NewLauncher() set s__barrage_InOperation[wg]=true endfunction function ZDv takes nothing returns boolean local unit u=GetTriggerUnit() local integer i=8 local real x=GetUnitX(u) local real y=GetUnitY(u) local real tX=GetSpellTargetX() local real tY=GetSpellTargetY() local real a=Atan2(tY-y,tX-x) local real d local integer NNv set x=x+25*Cos(a) set y=y+25*Sin(a) call Ltv(LIv("Abilities\\Spells\\Other\\AcidBomb\\BottleMissile.mdl",x,y,50,.5,a,0)) loop set i=i-1 set d=GetRandomReal(0,$FA) set a=GetRandomReal(0,Lx) set NNv=CreateBarrageTypeD(x,y,25,tX+d*Cos(a),tY+d*Sin(a),0) call LMv(s__barrage_model[NNv],"OrbOfVenom.mdx") call SetUnitScale(II[(s__barrage_model[NNv])],((GetRandomReal(.75,1))*1.),0,0) set s__barrage_speed[NNv]=GetRandomReal($F,35) set s__barrage_acceleration[NNv]=GetRandomReal(.1,.3) call SetBarrageFlightRadian(NNv,GetRandomReal(-.3,.3)) call SetBarrageFlightRadianEZ(NNv,GetRandomReal(.3,.6)) call ZCv(NNv) exitwhen i==0 endloop set u=null return false endfunction function Zfv takes nothing returns nothing call RegisterSpellEffectEvent('A0KX',function ZDv) endfunction function ZFv takes integer NNv returns unit return(Je[(NNv)]) endfunction function Zgv takes integer NNv returns nothing if zg[NNv]then set Zg[vG[NNv]]=Zg[NNv] set vG[Zg[NNv]]=vG[NNv] set zg[NNv]=false if vG[(0)]==0 then call frv(eG) endif call Unit_Cancel_Counter(51,(NNv)) endif endfunction function ZGv takes nothing returns boolean local integer NNv=vG[(0)] local integer Zhv local real x local real y local real a local real zA loop exitwhen NNv==0 if UnitAlive((Je[((NNv))]))then set Yg[NNv]=Yg[NNv]-1 if ModuloInteger(Yg[NNv],4)==0 then set x=(GetUnitX(II[(yg[NNv])])) set y=(GetUnitY(II[(yg[NNv])])) set a=GetRandomReal(0,Lx) set zA=GetRandomReal(0,Lx/ 2.) set Zhv=CreateBarrageTypeD(x+(400-$C8*Yg[NNv]/ 128.)*Cos(a)*Sin(zA),y+(400-$C8*Yg[NNv]/ 128.)*Sin(a)*Sin(zA),50+50*Cos(zA),x,y,50) call SetBarrageFlightRadian(Zhv,.3) set s__barrage_speed[Zhv]=5 set s__barrage_acceleration[Zhv]=1.-.5*Yg[NNv]/ 128. call LMv(s__barrage_model[Zhv],"Objects\\InventoryItems\\CrystalShard\\CrystalShard.mdl") call SetUnitScale(II[(s__barrage_model[Zhv])],((2.-Yg[NNv]/ 128.)*1.),0,0) if ModuloInteger(Yg[NNv],32)==0 then if Yg[NNv]<1 then call CreateItemG('fgfh',x,y) call Ltv(LAv("ShadowAssault.mdl",x,y,1.25)) call PauseUnit((Je[((NNv))]),false) call SetUnitTimeScale((Je[((NNv))]),1) call Ltv(yg[NNv]) call Zgv(NNv) endif call Ltv(Lfv(LAv("Abilities\\Spells\\Undead\\DeathPact\\DeathPactTarget.mdl",x,y,.75),$FF,0,0,$FF)) endif call Lfv(s__barrage_model[Zhv],$9B,$9B,$9B,$9B) call BOv(Zhv) endif else call Ltv(yg[NNv]) call Zgv(NNv) endif set NNv=vG[NNv] endloop return false endfunction function ZHv takes integer NNv returns integer if not zg[NNv]then if vG[(0)]==0 then if eG==0 then set eG=fxv(function ZGv) endif call fov(eG) endif set vG[NNv]=vG[(0)] set Zg[vG[(0)]]=NNv set vG[(0)]=NNv set Zg[NNv]=0 set zg[NNv]=true call Unit_App_Counter(52,(NNv)) endif return NNv endfunction function Zjv takes unit u returns integer return ZHv((GetUnitUserData((u)))) endfunction function ZJv takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:37") call Ltv(LNv("firegold.mdl",GetUnitX((Je[(id)])),GetUnitY((Je[(id)])),900,1.5)) call KillUnit((Je[(id)])) call PauseUnit((Je[(id)]),false) call zhv((Kc[(id)]),75,1) call Unit_Cancel_Counter(53,id) endfunction function Zkv takes nothing returns nothing local integer id=(alloc__hpv(GetHandleId((GetExpiredTimer())))) if UnitAlive((Je[(id)]))then if UnitAddAbility((Je[(id)]),'Amrf')then call UnitRemoveAbility((Je[(id)]),'Amrf') endif call zKv((Kc[(id)]),$FF,125,125,2) call Ltv(Lbv(LVv('e003',GetUnitX((Je[(id)])),GetUnitY((Je[(id)])),0),2,.5)) call PlaySoundOnUnit_BJ((Mn),(($7F)*1.),((Je[(id)]))) call SetUnitFlyHeight((Je[(id)]),900,600) call TimerStart(GetExpiredTimer(),2,false,function ZJv) else call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:38") call PauseUnit((Je[(id)]),false) call Unit_Cancel_Counter(54,id) endif endfunction function ZKv takes unit u returns nothing local integer id=(GetUnitUserData((u))) call PauseUnit(u,true) call TimerStart(NewTimer(id),2,false,function Zkv) call Ltv(Lfv(LAv("Abilities\\Spells\\Undead\\DarkRitual\\DarkRitualTarget.mdl",GetUnitX(u),GetUnitY(u),1.25),$FF,0,0,$FF)) call Unit_App_Counter(55,id) endfunction function Zlv takes nothing returns boolean local integer NNv=(ZHv((GetUnitUserData(((GetTriggerUnit())))))) set yg[NNv]=Lfv(LAv("VoidDrown.mdl",GetSpellTargetX(),GetSpellTargetY(),.5),$FF,25,25,$FF) call SetUnitFlyHeight(II[(yg[NNv])],((50)*1.),0) set Yg[NNv]=$80 call PauseUnit((Je[((NNv))]),true) call SetUnitTimeScale((Je[((NNv))]),.25) call SetUnitAnimation((Je[((NNv))]),"attack") call QueueUnitAnimation((Je[((NNv))]),"stand") call Lfv(yg[NNv],$FF,125,125,$FF) return false endfunction function ZLv takes nothing returns nothing call RegisterSpellEffectEvent('A0L0',function Zlv) endfunction function Zmv takes nothing returns nothing local integer NNv=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:39") local integer i=6 local real x=(GetUnitX(II[(xG[NNv])])) local real y=(GetUnitY(II[(xG[NNv])])) local real a local real c local real s local unit u loop set i=i-1 set a=Lx*i/ 6. set c=62.5*Cos(a) set s=62.5*Sin(a) call Lqv(LFv(Lfv(LAv("Units\\Creeps\\ForgottenOne\\ForgottenOneTent.mdl",x+1.5*c,y+1.5*s,.625),75,0,$9B,$FF),"Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl"),.375) call Lqv(LFv(Lfv(LAv("Units\\Creeps\\ForgottenOne\\ForgottenOneTent.mdl",x+3*c,y+3*s,.625),75,0,$9B,$FF),"Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl"),.375) exitwhen i==0 endloop call GroupEnumUnitsInRange(G,x,y,300+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,300)then if GetUnitAbilityLevel(u,'Avul')==0 and IsUnitAliveAndAlly(u,(Je[(NNv)]))then call zKv((GetPlayerId((GetOwningPlayer(u)))),$FF,$9B,$FF,.5) call sc___prototype200_evaluate(1,u,true) endif endif endloop call PlaySoundAtPoint_BJ((Fn),((100)*1.),((x)*1.),((y)*1.),0) call Ltv(LAv("AquaSpike.mdl",x,y,1.5)) call Unit_Cancel_Counter(56,(NNv)) call Ltv(xG[NNv]) endfunction function ZMv takes nothing returns boolean local integer NNv=(GetUnitUserData((GetTriggerUnit()))) local integer i=6 local real x=GetUnitX((Je[(NNv)])) local real y=GetUnitY((Je[(NNv)])) local unit u set xG[NNv]=LAv("Whirlpool.mdl",x,y,.25) call GroupEnumUnitsInRange(G,x,y,400+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,400)then if IsUnitAliveAndAlly(u,(Je[(NNv)]))then call UnitAppBuff((GetUnitUserData((u))),'A0GA',$D006B) endif endif endloop loop set i=i-1 call Ltv(LAv("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",x+100*Cos(Lx*i/ 6.),y+100*Sin(Lx*i/ 6.),.5)) exitwhen i==0 endloop call TimerStart(NewTimer(NNv),1.5,false,function Zmv) call Lqv(LAv("Abilities\\Spells\\Human\\CloudOfFog\\CloudOfFog.mdl",x,y,.75),1.5) call Unit_App_Counter(57,(NNv)) return false endfunction function Zpv takes nothing returns nothing call RegisterSpellEffectEvent('A0L3',function ZMv) endfunction function ZPv takes integer NNv returns unit return(Je[(NNv)]) endfunction function Zqv takes integer NNv returns nothing if VG[NNv]then set EG[XG[NNv]]=EG[NNv] set XG[EG[NNv]]=XG[NNv] set VG[NNv]=false if XG[(0)]==0 then call frv(OG) endif call Unit_Cancel_Counter(58,(NNv)) endif endfunction function ZQv takes nothing returns boolean local integer NNv=XG[(0)] local integer fx local integer i local real x local real y local real a local real d loop exitwhen NNv==0 set i=rG[NNv] if UnitAlive((Je[((NNv))]))then set iG[NNv]=iG[NNv]+1 set x=GetUnitX((Je[((NNv))])) set y=GetUnitY((Je[((NNv))])) if iG[NNv]>31 then set iG[NNv]=0 endif loop exitwhen i==0 set i=i-1 set fx=LoadInteger(BYHT,oG[NNv],i) if Mxv((GetUnitX(II[(fx)]))-x,(GetUnitY(II[(fx)]))-y)>$3E8 then set a=GetRandomReal(0,Lx) set d=GetRandomReal(75,125) call LKv(fx,x+d*Cos(a)) call Llv(fx,y+d*Sin(a)) call IssueImmediateOrderById(II[fx],$D0004) call LFv(fx,"Abilities\\Spells\\Items\\AIil\\AIilTarget.mdl") elseif iG[NNv]==0 and GetUnitCurrentOrder(II[fx])==0 then set a=GetRandomReal(0,Lx) set d=GetRandomReal(50,100) call IssuePointOrderById(II[fx],$D000F,x+d*Cos(a),y+d*Sin(a)) endif endloop else loop exitwhen i==0 set i=i-1 call LSv((LoadInteger(BYHT,oG[NNv],i)),$FF,$C8,$C8,$FF,2) endloop call free(oG[NNv]) call Zqv(NNv) endif set NNv=XG[NNv] endloop return false endfunction function Zsv takes integer NNv returns integer if not VG[NNv]then if XG[(0)]==0 then if OG==0 then set OG=fxv(function ZQv) endif call fov(OG) endif set XG[NNv]=XG[(0)] set EG[XG[(0)]]=NNv set XG[(0)]=NNv set EG[NNv]=0 set VG[NNv]=true call Unit_App_Counter(59,(NNv)) endif return NNv endfunction function ZSv takes unit u returns integer return Zsv((GetUnitUserData((u)))) endfunction function Ztv takes unit u returns nothing local integer NNv=(Zsv((GetUnitUserData(((u)))))) local integer i=2 local real x=GetUnitX(u) local real y=GetUnitY(u) set oG[NNv]=malloc() set rG[NNv]=i loop set i=i-1 call SaveInteger(BYHT,oG[NNv],i,LVv('e026',x+GetRandomReal(-$96,$96),y+GetRandomReal(-$96,$96),GetRandomInt(0,359))) exitwhen i==0 endloop endfunction function ZTv takes nothing returns nothing local integer NNv=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:40") local integer i if UnitAlive((Je[((NNv))]))then if aG[NNv]==1 then if rG[NNv]>3 then call NewTextTagInTarget_B(II[(LoadInteger(BYHT,oG[NNv],0))],"?? ??? ???? ??, ?? ?",9,125,125,125) else call SaveInteger(BYHT,oG[NNv],rG[NNv],LFv(LVv('e026',GetUnitX((Je[((NNv))]))+GetRandomReal(-$96,$96),GetUnitY((Je[((NNv))]))+GetRandomReal(-$96,$96),GetRandomInt(0,359)),"Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl")) set rG[NNv]=rG[NNv]+1 call NewTextTagInTarget_B(II[(LoadInteger(BYHT,oG[NNv],0))],"??? ??? ????.",9,125,125,125) endif elseif aG[NNv]==2 then if rG[NNv]==1 then call NewTextTagInTarget_B(II[(LoadInteger(BYHT,oG[NNv],0))],"??? ??? ?? ???? ?",9,125,125,125) else set rG[NNv]=rG[NNv]-1 call NewTextTagInTarget_B(II[(LoadInteger(BYHT,oG[NNv],rG[NNv]))],"?? ????. ??.",9,125,125,125) call SetUnitAnimation(II[(LoadInteger(BYHT,oG[NNv],rG[NNv]))],"death") call LSv((LoadInteger(BYHT,oG[NNv],rG[NNv])),$FF,$C8,$C8,$FF,2) endif elseif aG[NNv]==3 then call NewTextTagInTarget_B((Je[((NNv))]),"(???]",9,125,125,125) endif endif call Unit_Cancel_Counter(60,(NNv)) endfunction function Zuv takes nothing returns boolean local integer NNv=(GetUnitUserData((GetTriggerUnit()))) local integer i set aG[NNv]=GetRandomInt(1,3) if aG[NNv]==1 then set i=GetRandomInt(1,4) if i==1 then call NewTextTagInTarget_B((Je[((NNv))]),"???",9,125,125,125) elseif i==2 then call NewTextTagInTarget_B((Je[((NNv))]),"??",9,125,125,125) elseif i==3 then call NewTextTagInTarget_B((Je[((NNv))]),"??????? ?? ????.",9,125,125,125) else call NewTextTagInTarget_B((Je[((NNv))]),"????? ???? ???.",9,125,125,125) endif elseif aG[NNv]==2 then set i=GetRandomInt(1,3) if i==1 then call NewTextTagInTarget_B((Je[((NNv))]),"????",9,125,125,125) elseif i==2 then call NewTextTagInTarget_B((Je[((NNv))]),"????",9,125,125,125) else call NewTextTagInTarget_B((Je[((NNv))]),"?? ????? ??",9,125,125,125) endif elseif aG[NNv]==3 then set i=GetRandomInt(1,4) if i==1 then call NewTextTagInTarget_B((Je[((NNv))]),"??",9,125,125,125) elseif i==2 then call NewTextTagInTarget_B((Je[((NNv))]),"????",9,125,125,125) elseif i==3 then call NewTextTagInTarget_B((Je[((NNv))]),"???.",9,125,125,125) else call NewTextTagInTarget_B((Je[((NNv))]),"?? !",9,125,125,125) endif endif if aG[NNv]==3 and i==3 then call PlaySoundOnUnit_BJ((Pn),((100)*1.),((Je[((NNv))]))) call DestroyEffect(AddSpecialEffectTarget("BlackChakraExplosion.mdl",(Je[((NNv))]),"origin")) else call PlaySoundOnUnit_BJ((pn),((100)*1.),((Je[((NNv))]))) call TimerDestroyEffectBY((s__Effect_build(AddSpecialEffectTarget(("DarkSilence.mdx"),((Je[((NNv))])),("origin")))),1.5) endif call TimerStart(NewTimer(NNv),3,false,function ZTv) call Unit_App_Counter(61,(NNv)) return false endfunction function ZUv takes nothing returns nothing call RegisterSpellEffectEvent('A0LA',function Zuv) endfunction function Zwv takes nothing returns integer return D9v(AG) endfunction function ZWv takes integer NNv returns nothing call fvv(NNv) endfunction function Zyv takes nothing returns boolean local integer NNv=J[AG] loop exitwhen 0==NNv if UnitAlive((Je[(RG[NNv])]))then set IG[NNv]=IG[NNv]-1 call SetUnitVertexColor((Je[(RG[NNv])]),GetRandomInt(1,$FF),GetRandomInt(1,$FF),GetRandomInt(1,$FF),$CD) else set IG[NNv]=0 endif if IG[NNv]<1 then call SetUnitScale((Je[(RG[NNv])]),2.5,2.5,2.5) call SetUnitVertexColor((Je[(RG[NNv])]),$FF,$FF,$FF,$FF) call Unit_Cancel_Counter(62,RG[NNv]) call fvv((NNv)) endif set NNv=K[NNv] endloop return false endfunction function ZYv takes nothing returns nothing set AG=fxv(function Zyv) endfunction function Zzv takes nothing returns boolean local integer NNv=(D9v(AG)) set RG[NNv]=(GetUnitUserData((GetTriggerUnit()))) set IG[NNv]=$C0 call Ltv(Lfv(LAv("AncientExplode.mdx",GetUnitX((Je[(RG[NNv])])),GetUnitY((Je[(RG[NNv])])),1.5),$FF,125,125,$FF)) call SetUnitScale((Je[(RG[NNv])]),5,5,5) call Unit_App_Counter(63,RG[NNv]) return false endfunction function ZZv takes nothing returns nothing call RegisterSpellEffectEvent('A0LD',function Zzv) endfunction function Z_v takes integer NNv returns unit return(Je[(NNv)]) endfunction function Z0v takes integer NNv returns nothing if DG[NNv]then set fG[FG[NNv]]=fG[NNv] set FG[fG[NNv]]=FG[NNv] set DG[NNv]=false if FG[(0)]==0 then call frv(gG) endif call Unit_Cancel_Counter(64,(NNv)) endif endfunction function Z1v takes nothing returns boolean local integer NNv=FG[(0)] local integer Z2v local integer cFv local unit u local boolean Z3v local integer i local real x local real y local real a loop exitwhen NNv==0 if UnitAlive((Je[((NNv))]))then set CG[NNv]=CG[NNv]-1 set i=4 set x=GetUnitX((Je[((NNv))])) set y=GetUnitY((Je[((NNv))])) set a=bj_DEGTORAD*GetUnitFacing((Je[((NNv))])) set Z3v=IsUnitInRangeXY(II[bG[NNv]],x,y,.1) call LKv(bG[NNv],x) call Llv(bG[NNv],y) loop set i=i-1 set cFv=LoadInteger(BYHT,NG[NNv],3*i) if Z3v then if not BG[NNv]then call SetUnitAnimation(II[cFv],"stand") endif if ModuloInteger(CG[NNv]+2*i,8)==0 then set u=PickRandomHeroInRange((Je[((NNv))]),x,y,750) if u!=null then set Z2v=CreateBarrageTypeA(II[cFv],u) call LMv(s__barrage_model[Z2v],"Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl") call SetUnitScale(II[(s__barrage_model[Z2v])],((.5)*1.),0,0) set s__barrage_speed[Z2v]=.03125*1200. call SetBarrageFlightRadianEZ(Z2v,.1) call SetUnitFacingTimed(II[cFv],bj_RADTODEG*Atan2(GetUnitY(u)-(GetUnitY(II[(cFv)])),GetUnitX(u)-(GetUnitX(II[(cFv)]))),0) call SetUnitAnimation(II[cFv],"attack") call QueueUnitAnimation(II[cFv],"stand") call BOv(Z2v) set u=null endif endif else call LKv(cFv,x+LoadReal(BYHT,(NG[NNv]),3*i+1)) call Llv(cFv,y+LoadReal(BYHT,(NG[NNv]),3*i+2)) call SetUnitFacing(II[(cFv)],((a)*1.)*bj_RADTODEG) if BG[NNv]then call SetUnitAnimation(II[cFv],"walk") endif endif exitwhen i==0 endloop set BG[NNv]=Z3v else set CG[NNv]=0 endif if CG[NNv]<1 then set i=4 loop set i=i-1 set cFv=LoadInteger(BYHT,NG[NNv],3*i) call SetUnitAnimation(II[cFv],"death") call Lsv(cFv,.5) exitwhen i==0 endloop call free(NG[NNv]) call Lsv(bG[NNv],.5) call Z0v(NNv) endif set NNv=FG[NNv] endloop return false endfunction function Z4v takes integer NNv returns integer if not DG[NNv]then if FG[(0)]==0 then if gG==0 then set gG=fxv(function Z1v) endif call fov(gG) endif set FG[NNv]=FG[(0)] set fG[FG[(0)]]=NNv set FG[(0)]=NNv set fG[NNv]=0 set DG[NNv]=true call Unit_App_Counter(65,(NNv)) endif return NNv endfunction function Z5v takes unit u returns integer return Z4v((GetUnitUserData((u)))) endfunction function Z6v takes nothing returns boolean local integer NNv=(Z4v((GetUnitUserData(((GetTriggerUnit())))))) local integer i=4 local real x=GetUnitX((Je[((NNv))])) local real y=GetUnitY((Je[((NNv))])) local real fA=bj_DEGTORAD*GetUnitFacing((Je[((NNv))])) local real a local integer cFv set NG[NNv]=malloc() set bG[NNv]=LAv("Abilities\\Spells\\NightElf\\TargetArtLumber\\TargetArtLumber.mdl",x,y,.875) set BG[NNv]=true set CG[NNv]=640 loop set i=i-1 set a=fA+i*Lx/ 4. call SaveReal(BYHT,(NG[NNv]),3*i+1,dG*Cos(a)) call SaveReal(BYHT,(NG[NNv]),3*i+2,dG*Sin(a)) set cFv=LVv('e031',x+LoadReal(BYHT,(NG[NNv]),3*i+1),y+LoadReal(BYHT,(NG[NNv]),3*i+2),bj_RADTODEG*a) call SaveInteger(BYHT,NG[NNv],3*i,cFv) call SetUnitTimeScale(II[cFv],2) call SetUnitAnimation(II[cFv],"stand") exitwhen i==0 endloop call Ltv(Lfv(LAv("Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl",x,y,2),125,$FF,125,$FF)) return false endfunction function Z7v takes nothing returns nothing call RegisterSpellEffectEvent('A0PC',function Z6v) endfunction function Z8v takes nothing returns integer return D9v(lG) endfunction function Z9v takes integer NNv returns nothing call fvv(NNv) endfunction function vve takes nothing returns boolean local integer NNv=J[lG] local unit u local real x local real y loop exitwhen 0==NNv set KG[NNv]=KG[NNv]-1 if kG[NNv]==0 then call SetUnitScale(II[(JG[NNv])],((GG-(GG-.5)*KG[NNv]/(32*hG))*1.),0,0) elseif kG[NNv]==1 then if ModuloInteger(KG[NNv],R2I(32*.5))==0 then set x=(GetUnitX(II[(JG[NNv])])) set y=(GetUnitY(II[(JG[NNv])])) call GroupEnumUnitsInRange(G,x,y,550.+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,550.)then if IsUnitAllyNotbag(u,(Je[(jG[NNv])]))and GetUnitFlyHeight(u)<500 then call sc___prototype205_evaluate(1,u,77.5,-$A) endif endif endloop call Ltv(Lfv(LAv("AncientExplode.mdl",x,y,1.75),55,55,$FF,$CD)) endif endif if KG[NNv]<1 then if kG[NNv]==0 then set kG[NNv]=1 set KG[NNv]=R2I(32*HG) else call Unit_Cancel_Counter(66,jG[NNv]) call Ltv(JG[NNv]) call fvv((NNv)) endif endif set NNv=K[NNv] endloop return false endfunction function vee takes nothing returns nothing set lG=fxv(function vve) endfunction function vxe takes nothing returns boolean local integer NNv=(D9v(lG)) set jG[NNv]=(GetUnitUserData((GetTriggerUnit()))) set JG[NNv]=LAv("Abilities\\Spells\\Undead\\UnholyFrenzy\\UnholyFrenzyTarget.mdl",GetSpellTargetX(),GetSpellTargetY(),2.5) call SetUnitScale(II[(JG[NNv])],((.5)*1.),0,0) set kG[NNv]=0 set KG[NNv]=R2I(32*hG) call NewTextTagInTarget_B((Je[(jG[NNv])]),"?? ?? ??~",$C,$FF,$FF,$FF) call Unit_App_Counter(67,jG[NNv]) return false endfunction function voe takes nothing returns nothing call RegisterSpellEffectEvent('A0QZ',function vxe) endfunction function vre takes nothing returns boolean local integer NNv=(GetUnitUserData((MV[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]))) call HeroAppEffect(NNv,EquipModel_wings_Off[NNv]) set EquipModel_wings_Off[NNv]=not EquipModel_wings_Off[NNv] call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl",(Je[(NNv)]),"origin")) if EquipModel_wings_Off[NNv]then call DisplayTimedTextToPlayer((P[Kc[((NNv))]]),0,0,5,"|c00ffff80Additional effects are off.") else call DisplayTimedTextToPlayer((P[Kc[((NNv))]]),0,0,5,"|c00ffff80Additional effects activation.") endif return false endfunction function vie takes nothing returns nothing call RegisterSpellEffectEvent('A0A5',function vre) endfunction function vGe_4 takes nothing returns nothing call RemoveItemG(GetSoldItem()) call UnitAddItemByIdG(GetBuyingUnit(),'I08Q') endfunction function vGe_3 takes nothing returns nothing call RemoveItemG(GetSoldItem()) call UnitAddItemByIdG(GetBuyingUnit(),'I002') endfunction function vwe takes nothing returns nothing call AddUnitSellItemById('I0FT',function vGe_3) call AddUnitSellItemById('I0FS',function vGe_4) endfunction function vWe takes nothing returns nothing set Eh=malloc() call SaveInteger(BYHT,Eh,'I0B8','I028') call SaveInteger(BYHT,Eh,'I0BG','I0B9') call SaveInteger(BYHT,Eh,'I0BD','I0BC') call SaveInteger(BYHT,Eh,'I0BE','I0BA') call SaveInteger(BYHT,Eh,'I0BF','I0BB') endfunction function xoe takes nothing returns boolean local unit u=GetTriggerUnit() local integer i=8 local real x=GetUnitX(u) local real y=GetUnitY(u) local real a local real d loop set i=i-1 set a=bj_PI*i/ 4 set d=GetRandomReal($C8,600) call Ltv(LAv("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl",x+d*Cos(a),y+d*Sin(a),2)) exitwhen i==0 endloop call Lqv(LAv("Abilities\\Spells\\Orc\\EarthQuake\\EarthQuakeTarget.mdl",x,y,2.5),3) set u=null return false endfunction function xre takes nothing returns boolean local unit c=GetTriggerUnit() local unit u local real x=GetUnitX(c) local real y=GetUnitY(c) call GroupEnumUnitsInRange(G,x,y,550+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,550)then if IsUnitAliveAndAlly(u,c)then call UnitCureTaret(c,u,.2*GetUnitMaxLifeById((GetUnitUserData((u))))) call SetUnitState(u,UNIT_STATE_MANA,GetUnitState(u,UNIT_STATE_MANA)+.25*GetUnitState(u,UNIT_STATE_MAX_MANA)) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Invisibility\\InvisibilityTarget.mdl",u,"chest")) call Auxiliary_TargetOrder(('A066'),null,1,$D0085,u) endif endif endloop call Ltv(LAv("Units\\NightElf\\Wisp\\WispExplode.mdl",x,y,3.5)) call SetItemDroppableTimedById((GetUnitUserData((c))),'I09M',50) set c=null return false endfunction function s__FrostBarrage_Damage takes integer this returns nothing call UnitDamageTargetBY(((s__barrage_atkunit[this])),((s__barrage_target[this])),((((s__FrostBarrage_damage[this])*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($C)*1.))*1.),(("|c007387ff"))) endfunction function s__FrostBarrage_Impact takes integer this returns nothing call s__FrostBarrage_Damage(this) call RemoveBarrage(this) endfunction function s__FrostBarrage_start takes nothing returns nothing local integer this=s__barrage_FR[s__FrostBarrage_launcher] local unit u if this!=s__FrostBarrage_launcher then call UseBarrage(s__FrostBarrage_launcher) loop exitwhen this==s__FrostBarrage_launcher if(s__barrage_outside[(this)])or(s__barrage_finish[(this)])then call s__FrostBarrage_Impact(this) endif set this=s__barrage_FR[this] endloop elseif s__barrage_InOperation[s__FrostBarrage_launcher]then set s__barrage_InOperation[s__FrostBarrage_launcher]=false call frv(s__FrostBarrage_func) endif endfunction function s__FrostBarrage_Fired takes integer this returns nothing if s__FrostBarrage_launcher==null then set s__FrostBarrage_func=fxv(function s__FrostBarrage_start) set s__FrostBarrage_launcher=NewLauncher() endif if not s__barrage_InOperation[s__FrostBarrage_launcher]then set s__barrage_InOperation[s__FrostBarrage_launcher]=true call fov(s__FrostBarrage_func) endif call s__barrage_Filling((s__FrostBarrage_launcher),(this)) endfunction function xme takes unit s,real sX,real sY returns nothing local integer i=8 local integer b local unit xMe local real d local real a loop set i=i-1 set xMe=PickRandomUnitInRange(s,sX,sY,375) if xMe!=null then set a=i*Lx/ 8. set d=GetRandomReal(500,750) set b=CreateBarrageTypeC(sX+d*Cos(a),sY+d*Sin(a),100,xMe) set s__barrage_atkunit[b]=s call LMv(s__barrage_model[b],"Abilities\\Weapons\\FrostWyrmMissile\\FrostWyrmMissile.mdl") call SetUnitScale(II[(s__barrage_model[b])],((2.25)*1.),0,0) set s__barrage_speed[b]=.0 set s__barrage_acceleration[b]=.03125*.03125*GetRandomReal($4E2,$6D6) call SetBarrageFlightRadian(b,GetRandomReal(.5,.75)) set s__FrostBarrage_damage[b]=GetRandomReal(5,7.5)*GetHeroState2(s,true) call s__FrostBarrage_Fired(b) endif exitwhen i==0 endloop set xMe=null endfunction function iLe takes integer NNv returns nothing set sk[Sk[NNv]]=sk[NNv] set Sk[sk[NNv]]=Sk[NNv] if tk[NNv]!=0 then call Ltv(tk[NNv]) set tk[NNv]=0 endif if IsUnitPaused((Je[(NNv)]))then call PauseUnit((Je[(NNv)]),false) endif call SetUnitVertexColor((Je[(NNv)]),$FF,$FF,$FF,$FF) call Unit_Cancel_Counter(68,(NNv)) endfunction function ime takes nothing returns boolean local integer NNv=Sk[(0)] local real x local real y loop exitwhen 0==NNv if UnitAlive((Je[(NNv)]))then if Tk[NNv]then set uk[NNv]=uk[NNv]+1 if uk[NNv]<51 then call SetUnitVertexColor((Je[(NNv)]),$FF,$FF,$FF,5*uk[NNv]) elseif uk[NNv]==51 then call PauseUnit((Je[(NNv)]),false) elseif Mev((Je[(NNv)]),II[tk[NNv]])<=64 then if GetLocalPlayer()==GetOwningPlayer((Je[(NNv)]))then call PanCameraToTimed(Uk[NNv],wk[NNv],0) endif call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Items\\AIil\\AIilTarget.mdl",(GetUnitX(II[(tk[NNv])])),(GetUnitY(II[(tk[NNv])])))) call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Items\\AIil\\AIilTarget.mdl",Uk[NNv],wk[NNv])) call DestroyEffect(AddSpecialEffect("Enchantment.mdl",Uk[NNv],wk[NNv])) call SetUnitPosition((Je[(NNv)]),Uk[NNv],wk[NNv]) call iLe(NNv) elseif uk[NNv]>=$F33 then call iLe(NNv) endif else set uk[NNv]=uk[NNv]-5 call SetUnitVertexColor((Je[(NNv)]),$FF,$FF,$FF,uk[NNv]) if uk[NNv]<=0 then set x=GetRectCenterX(gg_rct_HCD_004) set y=GetRectCenterY(gg_rct_HCD_004) set tk[NNv]=LAv("Gravitone.mdl",GetRectCenterX(gg_rct_HCFHD_004),GetRectCenterY(gg_rct_HCFHD_004),1.25) set Tk[NNv]=true call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Items\\AIil\\AIilTarget.mdl",Uk[NNv],wk[NNv])) call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Items\\AIil\\AIilTarget.mdl",x,y)) call DestroyEffect(AddSpecialEffect("Enchantment.mdl",x,y)) call SetUnitPosition((Je[(NNv)]),x,y) if GetLocalPlayer()==GetOwningPlayer((Je[(NNv)]))then call PanCameraToTimed(x,y,0) endif elseif ModuloInteger(uk[NNv],17)==0 then call mjv(Uk[NNv],wk[NNv],0) endif endif else call iLe(NNv) endif set NNv=Sk[NNv] endloop return false endfunction function iMe takes nothing returns nothing call fov(Wk) endfunction function s__WindPassage_stop takes nothing returns nothing call frv(Wk) endfunction function ipe takes nothing returns nothing set Wk=fxv(function ime) call fov(Wk) endfunction function iPe takes nothing returns boolean local unit u=GetTriggerUnit() local integer NNv=(GetUnitUserData((u))) local real x=GetUnitX(u) local real y=GetUnitY(u) if Off_A098[NNv]or(Is_pvp[(GetPlayerId(GetOwningPlayer((u))))])or IsPointInRect(x,y,gg_rct_BSJL_____________001)then if Off_A098[NNv]then if Off_A098_id[NNv]==1 then call NewTextTagInTarget_B(u,"People are watching the day, please do not run away alone!",8,$CD,$FF,$9B) elseif Off_A098_id[NNv]==2 then call NewTextTagInTarget_B(u,"Either protect the earth or lie out!",8,$CD,$FF,$9B) else call NewTextTagInTarget_B(u,"This area can not be used",8,$CD,$FF,$9B) endif else call NewTextTagInTarget_B(u,"This area can not be used",8,$CD,$FF,$9B) endif call IssueImmediateOrderById(u,$D0004) else set Sk[NNv]=Sk[(0)] set sk[NNv]=0 set sk[Sk[(0)]]=NNv set Sk[(0)]=NNv set Tk[NNv]=false set uk[NNv]=$FF set Uk[NNv]=GetUnitX(u) set wk[NNv]=GetUnitY(u) call PauseUnit(u,true) call Unit_App_Counter(69,(NNv)) endif set u=null return false endfunction function iqe takes nothing returns nothing call RegisterSpellEffectEvent('A098',function iPe) endfunction function iTe takes nothing returns boolean local unit u=GetTriggerUnit() local integer r=GetRandomInt(1,100) local real x=GetUnitX(u) local real y=GetUnitY(u) if IsPointInRect(x,y,gg_rct_WKQY______________000)then call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl",x,y)) if r<$E then call DisplayTimedTextToPlayer(GetOwningPlayer(u),0,0,5,"|c00959595Iron ore|r !") call CreateItemG('I05K',x,y) elseif r<21 then call DisplayTimedTextToPlayer(GetOwningPlayer(u),0,0,5,"|c00c0c0c0Silver ore|r !") call CreateItemG('I05Q',x,y) elseif r<22 then call DisplayTimedTextToPlayer(GetOwningPlayer(u),0,0,5,"|c00ffd700Gold ore|r !") call CreateItemG('I05P',x,y) endif endif set u=null return false endfunction function iue takes nothing returns boolean local unit u=GetTriggerUnit() local integer r=GetRandomInt(1,100) local real x=GetUnitX(u) local real y=GetUnitY(u) if IsPointInRect(x,y,gg_rct_WKQY______________000)then call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl",x,y)) if r<$A then call DisplayTimedTextToPlayer(GetOwningPlayer(u),0,0,5,"|c001e90ffMinor magic stone|r !") call CreateItemG('I019',x,y) elseif r<18 then call DisplayTimedTextToPlayer(GetOwningPlayer(u),0,0,5,"|c001e90ffLesser magic stone|r !") call CreateItemG('I01A',x,y) endif endif set u=null return false endfunction function iUe takes nothing returns boolean local unit u=GetTriggerUnit() local integer r=GetRandomInt(1,100) local real x=GetUnitX(u) local real y=GetUnitY(u) if IsPointInRect(x,y,gg_rct_WKQY______________000)then call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl",x,y)) if r<$A then call DisplayTimedTextToPlayer(GetOwningPlayer(u),0,0,5,"|c001e90ffMedium magic stone|r !") call CreateItemG('I02Y',x,y) elseif r<18 then call DisplayTimedTextToPlayer(GetOwningPlayer(u),0,0,5,"|c001e90ffGreater magic stone|r !") call CreateItemG('I035',x,y) elseif r<20 then call DisplayTimedTextToPlayer(GetOwningPlayer(u),0,0,5,"|c001e90ffBright magic stone !") call CreateItemG('I0DQ',x,y) endif endif set u=null return false endfunction function iwe takes nothing returns boolean local unit u=GetTriggerUnit() local integer r=GetRandomInt(1,100) local real x=GetUnitX(u) local real y=GetUnitY(u) if IsPointInRect(x,y,gg_rct_WKQY______________000)then call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl",x,y)) if r<7 then call DisplayTimedTextToPlayer(GetOwningPlayer(u),0,0,5,"|c001e90ffMinor magic stone|r !") call CreateItemG('I019',x,y) elseif r<$E then call DisplayTimedTextToPlayer(GetOwningPlayer(u),0,0,5,"|c001e90ffLesser magic stone|r !") call CreateItemG('I01A',x,y) elseif r<17 then call DisplayTimedTextToPlayer(GetOwningPlayer(u),0,0,5,"|c001e90ffMedium magic stone|r !") call CreateItemG('I02Y',x,y) elseif r<20 then call DisplayTimedTextToPlayer(GetOwningPlayer(u),0,0,5,"|c001e90ffGreater magic stone|r !") call CreateItemG('I035',x,y) elseif r<23 then call DisplayTimedTextToPlayer(GetOwningPlayer(u),0,0,5,"|c001e90ffBright magic stone !") call CreateItemG('I0DQ',x,y) endif endif set u=null return false endfunction function iWe takes nothing returns nothing local unit u=GetEnumUnit() local real x=GetUnitX(u) local real y=GetUnitY(u) if GetUnitTypeId(u)==0 or not IsPointInRect(x,y,gg_rct_RYHS______________000)then call GroupRemoveUnit(Zk,u) elseif UnitAlive(u)and IsUnitHidden(u)==false and GetUnitAbilityLevel(u,'Avul')==0 and GetPointZ(x,y)<=-50 then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",u,"origin")) call UnitDamageTargetBY(((u)),((u)),((((.25*GetUnitMaxLifeById((GetUnitUserData((u)))))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) endif set u=null endfunction function iye takes nothing returns nothing call ForGroup(Zk,function iWe) endfunction function iYe takes nothing returns boolean local unit u=GetTriggerUnit() if CR and IsUnitAlive(u)and not IsUnitInGroup(u,Zk)and GetUnitAbilityLevel(u,'Aloc')==0 then call GroupAddUnit(Zk,u) endif set u=null return false endfunction function ize_TimerFunc takes nothing returns nothing loop exitwhen Quest_I064_index==0 set Quest_I064_index=Quest_I064_index-1 if(Je[((GetUnitUserData((Quest_I064_unit[Quest_I064_index]))))])==Quest_I064_unit[Quest_I064_index]then set Jg=false call KillUnit(Quest_I064_unit[Quest_I064_index]) call Ltv(Lfv(LAv("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",GetUnitX(Quest_I064_unit[Quest_I064_index]),GetUnitY(Quest_I064_unit[Quest_I064_index]),2.5),$FF,0,0,$FF)) call Ltv(Lfv(LAv("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",GetUnitX(Quest_I064_unit[Quest_I064_index]),GetUnitY(Quest_I064_unit[Quest_I064_index]),3.5),$FF,0,0,$FF)) call Lqv(LAv("MagmaBurst.mdl",$4D58,-660,4),2) call Lqv(LAv("MagmaBurst.mdl",$4FB0,-660,4),2) call Lqv(LAv("MagmaBurst.mdl",$5208,-660,4),2) call zhv((GetPlayerId((GetOwningPlayer(Quest_I064_unit[Quest_I064_index])))),50,.5) set Jg=true endif set Quest_I064_unit[Quest_I064_index]=null endloop endfunction function ize takes nothing returns boolean local unit u if Quest_I064_On==false then return false endif set u=GetTriggerUnit() if CR and IsUnitHidden(u)==false and IsUnitAlive(u)and GetUnitAbilityLevel(u,'Aloc')==0 and GetUnitAbilityLevel(u,'A0H1')==0 then set Quest_I064_unit[Quest_I064_index]=u set Quest_I064_index=Quest_I064_index+1 if Quest_I064_index==1 then call TimerStart(Quest_I064_Timer,0,false,function ize_TimerFunc) endif endif set u=null return false endfunction function iZe takes nothing returns nothing local trigger trig=CreateTrigger() set Zk=CreateGroup() call TimerStart((NewTimer(0)),1,true,function iye) set bj_lastCreatedRegion=CreateRegion() call RegionAddRect(bj_lastCreatedRegion,gg_rct_RYHS______________000) call TriggerRegisterEnterRegion(trig,bj_lastCreatedRegion,null) call TriggerAddCondition(trig,Filter(function iYe)) set trig=CreateTrigger() set bj_lastCreatedRegion=CreateRegion() call RegisterEnterRect_V($58A0,-6208,$6360,-$FA0) call TriggerRegisterEnterRegion(trig,bj_lastCreatedRegion,null) call TriggerAddCondition(trig,Filter(function ize)) set Quest_I064_Timer=CreateTimer() set trig=null endfunction function i0e takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:41") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0J7','B03A') call ModifyUnitMagicDamage((id),-50) call Unit_Cancel_Counter(70,id) set nK[id]=null endfunction function i1e takes nothing returns boolean local integer id local integer i if GetWidgetLife((MF))>1.5 then set KF[HF]=PF+1000000. call SetWidgetLife((MF),GetWidgetLife((MF))-1) else set i=GetRandomInt(1,5) if i==1 then call NewTextTagInTarget_B((mF),"SIGHT",$C,$9B,$9B,$9B) call Auxiliary_ImmediateOrder(('AOfs'),GetOwningPlayer((mF)),1,$D009A,GetUnitX((mF)),GetUnitY((mF))) elseif i==2 then set id=(pF_v) if nK[id]==null then set nK[id]=NewTimer(id) call UnitAddAbilityBY((mF),'A0J7') call ModifyUnitMagicDamage((id),50) call Unit_App_Counter(71,id) endif call NewTextTagInTarget_B((mF),"DAMAGE",$C,$FF,$9B,$9B) call TimerStart(nK[id],5,false,function i0e) elseif i==3 then call UnitCure_Drain((mF),$F423F,.3*GetUnitState((mF),UNIT_STATE_MAX_LIFE)) call tUv((mF),.5*GetUnitState((mF),UNIT_STATE_MAX_MANA)) call NewTextTagInTarget_B((mF),"HEAL",$C,$9B,$FF,$FF) elseif i==4 then set id=(GetUnitUserData(MV[GetPlayerId(GetOwningPlayer(Je[((pF_v))]))])) set i=2 loop call UnitResetCooldownById((Je[(id)]),LoadInteger(BYHT,Hero_Skills_table[(id)],i)) exitwhen i==6 set i=i+1 endloop call NewTextTagInTarget_B((mF),"REFRESH",$C,105,$9B,$FF) elseif i==5 then call Auxiliary_TargetOrder(('A0J8'),null,1,$D0085,(mF)) call NewTextTagInTarget_B((mF),"SPEED",$C,$FF,$FF,$80) endif call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl",(mF),"origin")) endif return false endfunction function i2e takes nothing returns nothing local integer i=3 local unit u loop set i=i-1 set u=CreateUnit(P[$C],'nhea',GetRandomReal(GetRectMinX(gg_rct_PVP_PVP_______000),GetRectMaxX(gg_rct_PVP_PVP_______000)),GetRandomReal(GetRectMinY(gg_rct_PVP_PVP_______000),GetRectMaxY(gg_rct_PVP_PVP_______000)),270) call UnitAddShieldTrig((GetUnitUserData((u))),function i1e) call SetUnitVertexColor(u,GetRandomInt($9B,$FF),GetRandomInt($9B,$FF),GetRandomInt($9B,$FF),$FF) call UnitApplyTimedLife(u,'BTLF',5) exitwhen i==0 endloop set u=null endfunction function i6e takes nothing returns nothing local integer NNv=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local real x=GetUnitX((Je[(vK[NNv])])) local real y=GetUnitY((Je[(vK[NNv])])) local integer i if not UnitAlive((Je[(vK[NNv])]))or not IsPointInRectB(x,y,GetRectMinX(gg_rct_PVP_PVP_______000),GetRectMinY(gg_rct_PVP_PVP_______000),GetRectMaxX(gg_rct_PVP_PVP_______000),GetRectMaxY(gg_rct_PVP_PVP_______000))then set aK=aK-1 set i=8 set Is_pvp[NNv]=false loop set i=i-1 if i!=NNv and Is_pvp[i]then call SetPlayerAlliance(P[i],P[NNv],ALLIANCE_PASSIVE,true) call SetPlayerAlliance(P[NNv],P[i],ALLIANCE_PASSIVE,true) endif exitwhen i==0 endloop call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:42") call DeUnitAdef((vK[NNv]),eK[NNv]) call DeUnitBeCureRatio((vK[NNv]),xK[NNv]) call Unit_Cancel_Counter(72,vK[NNv]) if oK[NNv]!=null then call ReleaseTimer(oK[NNv],"[TimerUtils]Error:43") set oK[NNv]=null endif if aK==0 and iK!=null then call ReleaseTimer(iK,"[TimerUtils]Error:44") set iK=null endif endif endfunction function i7e takes unit u returns nothing local integer NNv=GetPlayerId(GetOwningPlayer(u)) local integer i=8 loop set i=i-1 if i!=NNv and Is_pvp[i]then call SetPlayerAlliance(P[i],P[NNv],ALLIANCE_PASSIVE,false) call SetPlayerAlliance(P[NNv],P[i],ALLIANCE_PASSIVE,false) endif exitwhen i==0 endloop if not Is_pvp[NNv]then set Is_pvp[NNv]=true set vK[NNv]=(GetUnitUserData((MV[NNv]))) set eK[NNv]=ModifyUnitAdef((vK[NNv]),99) set xK[NNv]=ModifyUnitBeCureRatio((vK[NNv]),-70) set aK=aK+1 if aK==1 and iK==null then set iK=(NewTimer(0)) call TimerStart(iK,5,true,function i2e) endif call TimerStart(NewTimer(NNv),.03125,true,function i6e) call Unit_App_Counter(73,vK[NNv]) endif endfunction function aie takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:45") local real x=GetUnitX((Je[(id)])) local real y=GetUnitY((Je[(id)])) local unit u call GroupEnumUnitsInRange(G,x,y,750+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,750)then if UnitAlive(u)and nC[(GetUnitUserData((u)))]then call KillUnit(u) endif endif endloop call PauseUnit((Je[(id)]),false) call PlaySoundAtPoint_BJ((Dn),(($96)*1.),((x)*1.),((y)*1.),0) call Ltv(LAv("Desecrate.mdl",x,y,2.5)) call Ltv(LAv("DarkWave.mdl",x,y,4)) call Unit_Cancel_Counter(74,id) endfunction //kill function WJe takes integer id returns boolean local integer i=GetRandomInt(1,3) if i==1 then call zhv((GetPlayerId((GetOwningPlayer((Je[(id)]))))),50,.5) call Ltv(Lfv(LAv("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl",GetUnitX((Je[(id)])),GetUnitY((Je[(id)])),3.5),$FF,$FF,0,$FF)) call Ltv(Lfv(LAv("Great Lightning.mdl",GetUnitX((Je[(id)])),GetUnitY((Je[(id)])),2.5),$9B,$9B,0,$FF)) call KillUnit((Je[(id)])) elseif i==2 then call Ltv(LAv("Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl",GetUnitX((Je[(id)])),GetUnitY((Je[(id)])),2)) call KillUnit((Je[(id)])) else call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",(Je[(id)]),"origin")) call PauseUnit((Je[(id)]),true) call TimerStart(NewTimer(id),1.5,false,function aie) call Unit_App_Counter(75,id) endif return true endfunction function yrv takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:46") set tr[id]=false call Unit_Cancel_Counter(76,id) endfunction //uncle's fruit kill // ioba 1227899457 = true melon // iobe 1227899461 = fake melon function vTe_v takes nothing returns nothing local integer itemid=GetItemTypeIdG(LastManipulatedItem) local integer id=(GetUnitUserData((GetTriggerUnit()))) if itemid=='I0BA' and IsUnitType((Je[(id)]),UNIT_TYPE_HERO) then call RemoveItemG(LastManipulatedItem) call WJe(id) else if HaveSavedInteger(BYHT,Eh,itemid)then call RemoveItemG(LastManipulatedItem) if itemid=='I0BG' or itemid=='I0BD' or itemid=='I0BE' or itemid=='I0BF' then if IsUnitType((Je[(id)]),UNIT_TYPE_HERO)then if GetHeroLevel((Je[(id)]))>299 or tr[id]then call WJe(id) else set tr[id]=true set tr[id]=false call TimerStart(NewTimer(id),900,false,function yrv) call Unit_App_Counter(77,id) endif endif endif call UnitAddItemByIdG((Je[(id)]),LoadInteger(BYHT,Eh,itemid)) endif endif endfunction function aee takes nothing returns nothing local item i=GetEnumItem() local real x local real y if GetItemTypeIdG(i)==EK[IK]then set RK=RK+1 set x=GetItemX(i) set y=GetItemY(i) set AK=AK or(xcK-$96) set NK=NK or(yCK-$96) set bK=bK+(x-dK) set BK=BK+(y-DK) endif set i=null endfunction function axe takes nothing returns nothing local real x local real y local real m8v local real m9v set IK=OK loop exitwhen IK==0 set IK=IK-1 set RK=0 set AK=false set NK=false set bK=0 set BK=0 set dK=GetRectMinX(VK[IK]) set m8v=GetRectMaxX(VK[IK]) set DK=GetRectMinY(VK[IK]) set m9v=GetRectMaxY(VK[IK]) set cK=(dK+m8v)/ 2. set CK=(DK+m9v)/ 2. call EnumItemsInRect(VK[IK],null,function aee) if RKcK-125 and bKm8v then set x=m8v-GetRandomReal(75,$96) endif endif if NK and BK>CK-60 and BKm9v then set y=m9v-GetRandomReal(75,$96) endif endif endif call CreateItemG(EK[IK],x,y) call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Other\\ToonBoom\\ToonBoom.mdl",x,y)) endif endloop endfunction function aoe takes real m6v,real m7v,real m8v,real m9v,integer iI,integer c returns nothing set VK[OK]=Rect(m6v,m7v,m8v,m9v) set EK[OK]=iI set XK[OK]=c set OK=OK+1 endfunction function are takes nothing returns nothing call aoe(-$D00,$6D80,-$900,$7080,'I0BF',6) call aoe(-$C80,$6860,-$800,$6B00,'I0BG',8) call aoe(-$6A0,$6860,-736,$6B00,'I0BE',5) call aoe(-$6A0,$6D80,-736,$70A0,'I0BD',5) call TimerStart((NewTimer(0)),$F,true,function axe) call TriggerAddCondition(alloc__GX[(TRIGGER_PICKUP)],(Condition((function vTe_v)))) endfunction //item tp function aae takes nothing returns boolean local integer itemid=GetItemTypeIdG(GetManipulatedItem()) if itemid=='I094' then//sq call tEv(GetTriggerUnit(),14720,-($5B40+$5A60)*.5,300) elseif itemid=='I02R' then call tEv(GetTriggerUnit(),(($4C40)+($4C60))*.5,((5472)+(5504))*.5,350) elseif itemid=='I0FQ' then call tEv(GetTriggerUnit(),8264,$3C60,370) endif return false endfunction function aKe_v takes nothing returns nothing if(GetDestructableTypeId(GetEnumDestructable())=='YTpc')then call KillDestructable(GetEnumDestructable()) endif endfunction function aKe takes nothing returns boolean call KillDestructable(gg_dest_B00C_1557) call SetDestructableAnimation(gg_dest_B00C_1557,"death alternate") call EnumDestructablesInRect(gg_rct_TSRK_003,null,function aKe_v) set xE=true set UV=null return false endfunction function ale takes nothing returns boolean call tEv(GetBuyingUnit(),-$49BB,-$33F4,$C8) return false endfunction function aLe takes nothing returns boolean if xE then call tEv(GetTriggerUnit(),-$5246,-$A64,0) endif return false endfunction function aPe takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:47") call fiv(false) call SetUnitPosition((Je[(id)]),$5D86,$4C88) endfunction function aqe takes nothing returns nothing local integer id=(alloc__hpv(GetHandleId((GetExpiredTimer())))) call StartSound(Ja) call SetUnitAnimation((Je[(id)]),"attack swim") call QueueUnitAnimation((Je[(id)]),"stand") call zjv(30,1) call TimerStart(GetExpiredTimer(),2.5,false,function aPe) endfunction function aQe takes nothing returns nothing local integer id=(GetUnitUserData((CreateUnit(P[$C],'n022',$628E,$4A80,$D2)))) call TimerStart(GetExpiredTimer(),1,false,function aqe) call alloc__hPv(GetHandleId((GetExpiredTimer())),(id)) call Unit_App_Counter(78,id) endfunction function ase takes nothing returns nothing call fiv(true) call TimerStart(GetExpiredTimer(),.5,false,function aQe) endfunction function aSe takes nothing returns boolean if not av and not oE and IsItemCharges(GetItemOfTypeFromUnit(GetTriggerUnit(),'I04U'),3)then set av=true set oE=true call DisplayTimedText("|c00AFAFAFWhite powder|r disappeared, leaving a hazy light",5) call RemoveItemByCharges(GetItemOfTypeFromUnit(GetTriggerUnit(),'I04U'),3) call TimerStart((NewTimer(0)),3,false,function ase) endif return false endfunction function ate takes nothing returns nothing call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:48") call fiv(false) endfunction function aTe takes nothing returns nothing call Playlines("Count of Wallachia","Let the nightmare reign!") call TimerStart(GetExpiredTimer(),1.5,false,function ate) endfunction function aue takes nothing returns nothing call Playlines("Count of Wallachia","All the little minions are here, our party is about to begin.") call TimerStart(GetExpiredTimer(),2,false,function aTe) endfunction function aUe takes nothing returns nothing set lastspeaker=(Je[((alloc__hpv(GetHandleId((GetExpiredTimer())))))]) call SetUnitFlyHeight(lastspeaker,0,6000) call Ltv(LAv("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl",GetUnitX(lastspeaker),GetUnitY(lastspeaker),4)) call Ltv(LAv("BigBloodEX-NoSplat-NoGutz.mdx",GetUnitX(lastspeaker),GetUnitY(lastspeaker),1.5)) call zjv(60,.5) call TimerStart(GetExpiredTimer(),.5,false,function aue) endfunction function awe takes nothing returns nothing set lastspeaker=CreateUnit(P[$C],'h00F',$330A,-$7215,$B4) call alloc__hPv(GetHandleId((GetExpiredTimer())),((GetUnitUserData((lastspeaker))))) if UnitAddAbility(lastspeaker,'Amrf')then call UnitRemoveAbility(lastspeaker,'Amrf') call SetUnitFlyHeight(lastspeaker,$3E8,0) endif call Playlines("Count of Wallachia","Finally you are here! I have awaited too long!!") call TimerStart(GetExpiredTimer(),2,false,function aUe) endfunction function aWe takes nothing returns nothing call fiv(true) call TimerStart(GetExpiredTimer(),.5,false,function awe) endfunction function aye takes nothing returns boolean if not av and not rE and IsItemCharges(GetItemOfTypeFromUnit(GetTriggerUnit(),'I04X'),3)then set av=true set rE=true call DisplayTimedText("|c00FF0000Red powder|r disappeared leaving bloody light.",5) call RemoveItemByCharges(GetItemOfTypeFromUnit(GetTriggerUnit(),'I04X'),3) call TimerStart((NewTimer(0)),3,false,function aWe) endif return false endfunction function aYe takes nothing returns nothing set lastspeaker=(Je[((alloc__hpv(GetHandleId((GetExpiredTimer())))))]) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:49") call SetUnitInvulnerable(lastspeaker,false) call fiv(false) endfunction function aze takes nothing returns nothing set lastspeaker=(Je[((alloc__hpv(GetHandleId((GetExpiredTimer())))))]) call AddSpecialEffectByAnnulus("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",GetUnitX(lastspeaker),GetUnitY(lastspeaker),2.5,400,8) call SetUnitAnimation(lastspeaker,"Spell Throw") call StartSound(Ga) call TimerStart(GetExpiredTimer(),2,false,function aYe) endfunction function aZe takes nothing returns nothing set aE=aE-1 if aE>2 then call StartSound(Ha) call zjv(30,.8) call TimerStart(GetExpiredTimer(),1.75,false,function aZe) elseif aE>=0 then call StartSound(Ha) call zjv(30,.8) if aE>0 then call TimerStart(GetExpiredTimer(),1,false,function aZe) else call TimerStart(GetExpiredTimer(),1,false,function aze) endif endif endfunction function a_e takes nothing returns nothing set lastspeaker=(Je[((alloc__hpv(GetHandleId((GetExpiredTimer())))))]) call RemoveGuardPosition(lastspeaker) call IssuePointOrderById(lastspeaker,$D0012,$5DE8,-6780) call StartSound(Ha) call zjv(40,.8) call TimerStart(GetExpiredTimer(),2,false,function aZe) endfunction function a0e takes nothing returns nothing call StartSound(ga) call TimerStart(GetExpiredTimer(),1,false,function a_e) endfunction function a1e takes nothing returns nothing set lastspeaker=CreateUnit(P[$B],'n01K',$5DE8,-6780,270) call SetUnitPosition(lastspeaker,$5DE8,-5400) call alloc__hPv(GetHandleId((GetExpiredTimer())),((GetUnitUserData((lastspeaker))))) call SetUnitInvulnerable(lastspeaker,true) call SetUnitAnimation(lastspeaker,"Morph Alternate") call SetUnitPathing(lastspeaker,false) call TimerStart(GetExpiredTimer(),1.5,false,function a0e) endfunction function a2e takes nothing returns nothing call StartSound(ha) call TimerStart(GetExpiredTimer(),1,false,function a1e) endfunction function a3e takes nothing returns nothing call fiv(true) call TimerStart(GetExpiredTimer(),.5,false,function a2e) endfunction function a4e takes nothing returns boolean if not av and not iE and IsItemCharges(GetItemOfTypeFromUnit(GetTriggerUnit(),'I04W'),5)then set av=true set iE=true call DisplayTimedText("|c0080ff80Green powder|r disappeared leaving green light",5) call RemoveItemByCharges(GetItemOfTypeFromUnit(GetTriggerUnit(),'I04W'),5) call TimerStart((NewTimer(0)),3,false,function a3e) endif return false endfunction function a5e takes nothing returns nothing call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:50") call fiv(false) endfunction function a6e takes nothing returns nothing set lastspeaker=CreateUnit(P[$B],'n01W',-$4597,$5D2E,270) call Playlines("Jack","Halloween ~ Halloween ~ Happy Halloween ....") call Ltv(LAv("Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl",-$4597,$5D2E,2.75)) call Ltv(LAv("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",-$4597,$5D2E,3)) call TimerStart(GetExpiredTimer(),2.5,false,function a5e) endfunction function a7e takes nothing returns nothing call TimerStart(GetExpiredTimer(),1,false,function a6e) endfunction function a8e takes nothing returns nothing call fiv(true) call TimerStart(GetExpiredTimer(),.5,false,function a7e) endfunction function a9e takes nothing returns boolean if not av and not VE and IsItemCharges(GetItemOfTypeFromUnit(GetTriggerUnit(),'I04X'),5)then set av=true set VE=true call DisplayTimedText("|c00FF0000Red powder|r disappeared leaving a beam of red light.",5) call RemoveItemByCharges(GetItemOfTypeFromUnit(GetTriggerUnit(),'I04X'),5) call TimerStart((NewTimer(0)),3,false,function a8e) endif return false endfunction function nve takes nothing returns nothing set LV=true endfunction function nee takes nothing returns nothing local integer u=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:51") call m_v(ConvertVersion(u),false) call fiv(false) endfunction function nxe takes nothing returns nothing local integer u=GetHandleId(CreateUnit(P[$C],'h01B',$6653,-$744F,270)) call Playlines("Jaina","Something, what what unable to translate...") call SetUnitAnimation(ConvertVersion(u),"spell") call QueueUnitAnimation(ConvertVersion(u),"stand") call m_v(ConvertVersion(u),true) call StartSound(ja) call alloc__hPv(GetHandleId((GetExpiredTimer())),(u)) call TimerStart(GetExpiredTimer(),2.5,false,function nee) endfunction function noe takes nothing returns nothing call Playlines("Jaina","His power is not something that ordinary people can resist.") call TimerStart(GetExpiredTimer(),3,false,function nxe) endfunction function nre takes nothing returns nothing set lastspeaker=gg_unit_n01T_0423 call Playlines("Jaina","I feel a powerful evil force, is he back?...") call TimerStart(GetExpiredTimer(),2,false,function noe) endfunction function nie takes nothing returns nothing call TimerStart(GetExpiredTimer(),1,false,function nre) endfunction function nae takes nothing returns nothing call fiv(true) call TimerStart(GetExpiredTimer(),1,false,function nie) endfunction function nne takes nothing returns boolean if not av and not EE and IsItemCharges(GetItemOfTypeFromUnit(GetTriggerUnit(),'I04X'),5)then set av=true set EE=true call DisplayTimedText("|c00FF0000Red powder|r disappeared leaving a dark red light",5) call RemoveItemByCharges(GetItemOfTypeFromUnit(GetTriggerUnit(),'I04X'),5) call TimerStart((NewTimer(0)),3,false,function nae) endif return false endfunction function nVe takes nothing returns nothing call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:52") call fiv(false) endfunction function nEe takes nothing returns nothing set lastspeaker=(Je[((alloc__hpv(GetHandleId((GetExpiredTimer())))))]) call SetUnitAnimation(lastspeaker,"Spell") call QueueUnitAnimation(lastspeaker,"Stand") call StartSound(La) call Ltv(LAv("Shiva'sWrath.mdl",5275,6775,4.)) call Lqv(LAv("Doodads\\Cinematic\\FrostTrapUp\\FrostTrapUp.mdl",5275,6775,7.),1) call AddSpecialEffectByAnnulus("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl",GetUnitX(lastspeaker),GetUnitY(lastspeaker),2.5,350,8) call TimerStart(GetExpiredTimer(),1.25,false,function nVe) endfunction function nXe takes nothing returns nothing set lastspeaker=(Je[((alloc__hpv(GetHandleId((GetExpiredTimer())))))]) call Playlines("Lord of Everfrost","Are you mad? You better not to let me down, fool!") call StartSound(la) call TimerStart(GetExpiredTimer(),3,false,function nEe) endfunction function nOe takes nothing returns nothing set lastspeaker=(Je[((alloc__hpv(GetHandleId((GetExpiredTimer())))))]) call Playlines("Lord of Everfrost","Did you wake me up from my slumber?") call StartSound(Ka) call TimerStart(GetExpiredTimer(),2.5,false,function nXe) endfunction function nRe takes nothing returns nothing set lastspeaker=(Je[((alloc__hpv(GetHandleId((GetExpiredTimer())))))]) call Playlines("Lord of Everfrost","How long have I slept?") call StartSound(ka) call TimerStart(GetExpiredTimer(),2.5,false,function nOe) endfunction function nIe takes nothing returns nothing set OE=OE-1 call StartSound(La) call Ltv(LAv("Shiva'sWrath.mdl",$3F23,-$6D85,4)) call Lqv(LAv("Doodads\\Cinematic\\FrostTrapUp\\FrostTrapUp.mdl",5275,6775,7),1) if OE>0 then call TimerStart(GetExpiredTimer(),.8,false,function nIe) else set lastspeaker=CreateUnit(P[$C],'n023',$3F23,-$6D85,270) call alloc__hPv(GetHandleId((GetExpiredTimer())),((GetUnitUserData((lastspeaker))))) call TimerStart(GetExpiredTimer(),.8,false,function nRe) endif endfunction function nAe takes nothing returns nothing call TimerStart(GetExpiredTimer(),.4,false,function nIe) endfunction function nNe takes nothing returns nothing call fiv(true) call TimerStart(GetExpiredTimer(),.8,false,function nAe) endfunction function nbe takes nothing returns boolean if not av and not XE and IsItemCharges(GetItemOfTypeFromUnit(GetTriggerUnit(),'I04V'),$A)then set av=true set XE=true call DisplayTimedText("|c002040f0Blue powder|r disappeared leaving a beam of icy light|r",5) call RemoveItemByCharges(GetItemOfTypeFromUnit(GetTriggerUnit(),'I04V'),$A) call TimerStart((NewTimer(0)),3,false,function nNe) endif return false endfunction function nBe takes nothing returns nothing local integer nce=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local unit u local real x local real y if UnitAlive((Je[(nce)]))then set x=GetUnitX((Je[(nce)])) set y=GetUnitY((Je[(nce)])) call GroupEnumUnitsInRange(G,x,y,$80+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$80)then exitwhen IsUnitAliveAndEnemyNotAvul(u,(Je[(nce)])) endif endloop if u==null then call SetWidgetLife((Je[(nce)]),MaxR(.5,GetWidgetLife((Je[(nce)]))-250./ 32.)) else call GroupEnumUnitsInRange(G,x,y,256+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,256)then if IsUnitAliveAndEnemyNotAvul(u,(Je[(nce)]))then call DestroyEffect(AddSpecialEffectTarget("AcidMissile.mdl",u,"chest")) call UnitDamageTargetBY((((Je[(nce)]))),((u)),(((($30D4)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop call Ltv(LAv("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",x,y,2.25)) call Ltv(LAv("Objects\\Spawnmodels\\Naga\\NagaBlood\\NagaBloodWindserpent.mdl",x,y,2.5)) call KillUnit((Je[(nce)])) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:53") call Unit_Cancel_Counter(79,nce) endif else call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:54") call Unit_Cancel_Counter(80,nce) endif endfunction function nCe takes nothing returns nothing local integer i=8 local integer nce local real x local real y set cE=cE-1 loop set i=i-1 set x=GetRandomReal($4E00-$A0,$4E00) set y=GetRandomReal(-$5B60,-$58E0) if GetRandomInt(1,2)==1 then call IssuePointOrderById(CreateUnit(P[$B],'n014',x,y,GetRandomReal($B4,$C8)),$D000F,$38F5,-$5ACD) elseif GetRandomInt(1,4)==1 then set nce=(GetUnitUserData((CreateUnit(P[$B],'n02C',x,y,GetRandomReal($B4,$C8))))) call IssuePointOrderById((Je[(nce)]),$D000F,$38F5,-$5ACD) call TimerStart(NewTimer(nce),.03125,true,function nBe) call Unit_App_Counter(81,nce) else call IssuePointOrderById(CreateUnit(P[$B],'n028',x,y,GetRandomReal($B4,$C8)),$D000F,$38F5,-$5ACD) endif call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\FeralSpirit\\feralspirittarget.mdl",x,y)) exitwhen i==0 endloop if cE==0 then call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:55") endif endfunction function nde takes nothing returns boolean local unit u=GetTriggerUnit() if nC[(GetUnitUserData((u)))]then call SetUnitPosition(u,($4300+$43C0)/ 2.,(-$4E00-$4BA0)/ 2.) if GetLocalPlayer()==GetOwningPlayer(u)then call PanCameraToTimed(GetUnitX(u),GetUnitY(u),0) endif endif set u=null return false endfunction function nDe takes nothing returns nothing call ReleaseTimer(bE,"[TimerUtils]Error:56") call DestroyTimerDialog(BE) set bE=null set BE=null endfunction function nfe takes nothing returns nothing call DisplayTimedText("|c000080ffSeal on the cave is cleared",$A) call RegisterEnterRect($4E40,-$5B60,$4EE0,-$58C0,function nde) call DestroyEffect(AddSpecialEffect("AncientExplode.mdl",$4E40,-($5B60+$58C0)*.5)) call KillDestructable(NE) call SetUnitInvulnerable(oi,false) call nDe() set NE=null endfunction function nFe takes nothing returns nothing set bE=(NewTimer(0)) set BE=CreateTimerDialog(bE) call TimerStart((NewTimer(0)),IE,true,function nCe) call TimerStart(bE,RE,false,function nfe) call TimerDialogSetTitle(BE,"|c0080ffffSeal of the spiders cave") call TimerDialogDisplay(BE,true) call nCe() endfunction function nge takes nothing returns boolean if bE!=null then call DisplayTimedText("|c00e43434Can not see spider queen.",$A) call nDe() call DestroyTrigger(GetTriggeringTrigger()) endif return false endfunction function nGe takes nothing returns nothing call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:57") call fiv(false) endfunction function nhe takes nothing returns nothing call nFe() call TimerStart(GetExpiredTimer(),1,false,function nGe) endfunction function nHe takes nothing returns nothing call Ltv(LAv("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",GetRectCenterX(gg_rct_ZHIZHUZHD_________________002),GetRectCenterY(gg_rct_ZHIZHUZHD_________________002),3)) call Ltv(LAv("Abilities\\Spells\\Undead\\ReplenishMana\\ReplenishManaCasterOverhead.mdl",GetRectCenterX(gg_rct_ZHIZHUZHD_________________002),GetRectCenterY(gg_rct_ZHIZHUZHD_________________002),1.5)) call TimerStart(GetExpiredTimer(),1,false,function nhe) endfunction function nje takes nothing returns nothing call Playlines("Prius's magician","Please protect us, we will continue to remove seal") call TimerStart(GetExpiredTimer(),2,false,function nHe) endfunction function nJe takes nothing returns nothing local integer i=3 set lastspeaker=AE[0] loop set i=i-1 call SetUnitAnimation(AE[i],"Stand Channel") call SetUnitInvulnerable(AE[i],false) exitwhen i==0 endloop call Playlines("Prius's magician","I felt an evil atmosphere in that cave...") call Ltv(LAv("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",GetRectCenterX(gg_rct_ZHIZHUZHD_________________002),GetRectCenterY(gg_rct_ZHIZHUZHD_________________002),3)) call Ltv(LAv("Abilities\\Spells\\Undead\\ReplenishMana\\ReplenishManaCasterOverhead.mdl",GetRectCenterX(gg_rct_ZHIZHUZHD_________________002),GetRectCenterY(gg_rct_ZHIZHUZHD_________________002),1.5)) call TimerStart(GetExpiredTimer(),2,false,function nje) endfunction function nke takes nothing returns nothing call TimerStart(GetExpiredTimer(),.4,false,function nJe) endfunction function nKe takes nothing returns nothing call fiv(true) call TimerStart(GetExpiredTimer(),.8,false,function nke) endfunction function nle takes nothing returns boolean if not CE and IsItemCharges(GetItemOfTypeFromUnit(GetTriggerUnit(),'I04V'),$B)then set av=true set CE=true call DisplayTimedText("|c002040f0Blue powder|r disappeared leaving a beam of cold light",5) call RemoveItemByCharges(GetItemOfTypeFromUnit(GetTriggerUnit(),'I04V'),$B) call TimerStart((NewTimer(0)),3,false,function nKe) endif return false endfunction function nLe takes nothing returns nothing call ReleaseTimer(jE,"[TimerUtils]Error:58") call DestroyTimerDialog(JE) call DestroyTrigger(hE) set JE=null set hE=null endfunction function nme takes nothing returns nothing set lastspeaker=(Je[((alloc__hpv(GetHandleId((GetExpiredTimer())))))]) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:59") call Ltv(LAv("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl",-$47F9,-$ABE,5)) call Ltv(LAv("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl",-$47F9,-$ABE,5)) call Ltv(LAv("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl",-$47F9,-$ABE,5)) call PauseUnit(lastspeaker,false) call SetUnitPosition(lastspeaker,$48E6,-$72C2) call AddWeatherEffect(WorldBounds,'MEds') call fiv(false) endfunction function nMe takes nothing returns nothing set lastspeaker=(Je[((alloc__hpv(GetHandleId((GetExpiredTimer())))))]) call Playlines("Beriel(Campbell)","Everyone should be purified by me in the name of the Lord.") call TimerStart(GetExpiredTimer(),2.5,false,function nme) endfunction function npe takes nothing returns nothing set lastspeaker=(Je[((alloc__hpv(GetHandleId((GetExpiredTimer())))))]) call Playlines("Beriel(Campbell)","Purification time has come...") call TimerStart(GetExpiredTimer(),2.5,false,function nMe) endfunction function nPe takes nothing returns nothing set HE=HE-1 set lastspeaker=(Je[((alloc__hpv(GetHandleId((GetExpiredTimer())))))]) call Ltv(LAv("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl",-$47F9,-$ABE,7.5)) call SetUnitVertexColor(lastspeaker,$FF,$FF,$FF,$FF-R2I($FF/ 4*HE)) if HE>0 then call TimerStart(GetExpiredTimer(),1,false,function nPe) else call TimerStart(GetExpiredTimer(),2,false,function npe) endif endfunction function nqe takes nothing returns nothing set lastspeaker=CreateUnit(P[$C],'n01P',-$47F9,-$ABE,270) call alloc__hPv(GetHandleId((GetExpiredTimer())),((GetUnitUserData((lastspeaker))))) set HE=4 call PauseUnit(lastspeaker,true) call SetUnitVertexColor(lastspeaker,$FF,$FF,$FF,0) call TimerStart(GetExpiredTimer(),3,false,function nPe) endfunction function nQe takes nothing returns nothing set HE=HE-1 call Ltv(LAv("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl",-$47F9,-$ABE,7.5)) if HE>0 then call TimerStart(GetExpiredTimer(),1,false,function nQe) else call TimerStart(GetExpiredTimer(),3,false,function nqe) endif endfunction function nse takes nothing returns nothing call TimerStart(GetExpiredTimer(),2,false,function nQe) endfunction function nSe takes nothing returns nothing set HE=6 call fiv(true) call nLe() call TimerStart((NewTimer(0)),.5,false,function nse) endfunction function nte takes nothing returns nothing set jE=(NewTimer(0)) set JE=CreateTimerDialog(jE) call TimerStart(jE,GE,false,function nSe) call TimerDialogSetTitle(JE,"Archangel's come time") call TimerDialogSetTitleColor(JE,0,$FF,0,$FF) call TimerDialogDisplay(JE,true) endfunction function nTe takes nothing returns boolean set HE=HE-1 if HE==0 then call nLe() endif return false endfunction function nue takes nothing returns nothing call DisplayTimedText("|c008B008BFallen Angel came back to take revenge|r!!",$F) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:60") call CreateUnit(P[$C],'n01O',$5036,-$7099,$B4) call PingMinimapEx($5036,-$7099,5,$FF,0,0,false) call DestroyTimerDialog(gE) set gE=null endfunction function nUe takes nothing returns nothing local timer t=GetExpiredTimer() set gE=CreateTimerDialog(t) call fiv(false) call CreateUnit(P[$F],'n01A',-$3FBA,$414B,270) call PingMinimapEx(-$3FBA,$414B,5,$FF,$FF,0,true) call DisplayTimedText("|c00FFFF00Avalon Castle|r arrived!",$F) call TimerStart(t,dE,false,function nue) call TimerDialogSetTitle(gE,"Fallen angel") call TimerDialogSetTitleColor(gE,$8B,0,$8B,$FF) call TimerDialogDisplay(gE,true) call nte() set t=null endfunction function nwe takes nothing returns nothing local integer i=3 set lastspeaker=DE[1] call Playlines("Angel","Mankind your end is here!") loop set i=i-1 call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl",DE[i],"origin")) call SetUnitInvulnerable(DE[i],false) call PauseUnit(DE[i],false) call SetUnitInvulnerable(UV,false) call PauseUnit(UV,false) set DE[i]=null exitwhen i==0 endloop call TimerStart(GetExpiredTimer(),2.5,false,function nUe) endfunction function nWe takes nothing returns nothing call TimerStart(GetExpiredTimer(),2,false,function nwe) endfunction function nye takes nothing returns nothing set lastspeaker=DE[0] call Playlines("Angel","Archangel Kamael is about to come and purify the world") call SetUnitAnimation(lastspeaker,"Stand Channel") call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl",lastspeaker,"origin")) call DestroyEffect(fE[0]) call TimerStart(GetExpiredTimer(),2.5,false,function nWe) endfunction function nYe takes nothing returns nothing call TimerStart(GetExpiredTimer(),2,false,function nye) endfunction function nze takes nothing returns nothing set lastspeaker=DE[2] call Playlines("Angel","Then we can no longer continue to rest.") call SetUnitAnimation(lastspeaker,"Stand Channel") call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl",lastspeaker,"origin")) call DestroyEffect(fE[2]) call TimerStart(GetExpiredTimer(),2.5,false,function nYe) endfunction function nZe takes nothing returns nothing call TimerStart(GetExpiredTimer(),2,false,function nze) endfunction function n_e takes nothing returns nothing set lastspeaker=DE[1] call Playlines("Angel","We have observed humanity for a long time, they have only endless greed, corruption and ugliness.") call SetUnitAnimation(lastspeaker,"Stand Channel") call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl",lastspeaker,"origin")) call DestroyEffect(fE[1]) call TimerStart(GetExpiredTimer(),2.5,false,function nZe) endfunction function n0e takes nothing returns nothing call StartSound(ma) call TimerStart(GetExpiredTimer(),2,false,function n_e) endfunction function n1e takes nothing returns nothing call fiv(true) call TimerStart(GetExpiredTimer(),.5,false,function n0e) endfunction function n2e takes nothing returns boolean if not nv and IsItemCharges(GetItemOfTypeFromUnit(GetTriggerUnit(),'I04Y'),5)then set nv=true call DisplayTimedText("|c00FFFF00Holy powder|r disappeared leaving a beam of dazzling light.",5) call RemoveItemByCharges(GetItemOfTypeFromUnit(GetTriggerUnit(),'I04Y'),5) call TimerStart((NewTimer(0)),3,false,function n1e) endif return false endfunction function n3e takes nothing returns nothing local integer i=4 local real x local real y local real x2=GetRectCenterX(gg_rct_EM02______________003) local real y2=GetRectCenterY(gg_rct_EM02______________003) loop set x=GetRandomReal(GetRectMinX(gg_rct_EM03_________________003),GetRectMaxX(gg_rct_EM03_________________003)) set y=GetRandomReal(GetRectMinY(gg_rct_EM03_________________003),GetRectMaxY(gg_rct_EM03_________________003)) call IssuePointOrderById(CreateUnit(P[8],'h00M',x,y,90),$D000F,x2,y2) call IssuePointOrderById(CreateUnit(P[8],'e019',x,y,90),$D000F,x2,y2) if ModuloInteger(i,4)==0 then call IssuePointOrderById(CreateUnit(P[8],'h00N',x,y,90),$D000F,x2,y2) call IssuePointOrderById(CreateUnit(P[8],'e01A',x,y,90),$D000F,x2,y2) endif set i=i-1 exitwhen i==0 endloop call IssuePointOrderById(gg_unit_H00G_0758,$D000F,GetRectCenterX(gg_rct_EM02______________003),GetRectCenterY(gg_rct_EM02______________003)) endfunction function n4e takes integer i returns nothing local unit u local real x local real y loop set x=GetRandomReal(GetRectMinX(gg_rct_EM02______________003),GetRectMaxX(gg_rct_EM02______________003)) set y=GetRandomReal(GetRectMinY(gg_rct_EM02______________003),GetRectMaxY(gg_rct_EM02______________003)) set u=CreateUnit(P[$B],'h01C',x,y,90) if ModuloInteger(i,2)==0 then call CreateUnit(P[$B],'h01D',x,y,90) endif if ModuloInteger(i,6)==0 then set u=CreateUnit(P[$B],'h01E',x,y,90) endif call IssuePointOrderById(u,$D000F,GetUnitX(gg_unit_H00Q_0724),GetUnitY(gg_unit_H00Q_0724)) set i=i-1 exitwhen i==0 endloop endfunction function n5e takes nothing returns nothing if lE>0 then call RemoveUnitBJ((Je[(lE)]),3) set lE=0 endif if pE!=null then call ReleaseTimer(ME,"[TimerUtils]Error:61") call DestroyTimerDialog(pE) set pE=null endif endfunction function n6e takes nothing returns boolean if LE!=null then set av=false call n5e() call ReleaseTimer(mE,"[TimerUtils]Error:62") call DestroyTrigger(LE) if IsUnitPaused(gg_unit_n027_0834)then call PauseUnit(gg_unit_n027_0834,false) call PauseUnit(gg_unit_n00S_0365,false) endif set LE=null return true endif return false endfunction function n7e takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:63") call DisplayTimedText("|c00FF0000Demon Lord|r !!",$F) call PauseUnit((Je[(id)]),false) call Ltv(LAv("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",-4768,-$F00,5)) call PingMinimapEx(GetUnitX((Je[(id)])),GetUnitY((Je[(id)])),5,$FF,0,0,false) call fiv(false) endfunction function n8e takes nothing returns nothing call Playlines("Demon Lord","This is the start of my conquest!") call TimerStart(GetExpiredTimer(),2.5,false,function n7e) endfunction function n9e takes nothing returns nothing call Playlines("Demon Lord","Even if you succeeded a thousand years ago, you only delayed the inevitable!") call TimerStart(GetExpiredTimer(),2.5,false,function n8e) endfunction function Vve takes nothing returns nothing call Playlines("Demon Lord","I said I will be back! did you think you could seal me for eternity?") call TimerStart(GetExpiredTimer(),2.5,false,function n9e) endfunction function Vee takes nothing returns nothing local integer i=8 local integer mC=-1 loop set i=i-1 if MV[i]!=null then if GetHeroLevel(MV[i])>=320 then set mC=mC+1 exitwhen mC==3 endif endif exitwhen i==0 endloop set lastspeaker=CreateUnit(P[$B],'n01Y',GetRectCenterX(gg_rct_EM02______________003),GetRectCenterY(gg_rct_EM02______________003),90) call alloc__hPv(GetHandleId((GetExpiredTimer())),((GetUnitUserData((lastspeaker))))) if mC>0 then call ModifyDropsRateById('n01Y',(1.+mC/ 3.)) call ModifyUnitMagicDamage((GetUnitUserData((lastspeaker))),$F*mC) call ModifyUnitHpRegen((GetUnitUserData((lastspeaker))),750*mC) call ModifyUnitAttackSpeed((GetUnitUserData((lastspeaker))),25*mC) call ModifyUnitArmor((GetUnitUserData((lastspeaker))),100*mC) endif call PauseUnit(lastspeaker,true) call PauseUnit(gg_unit_n027_0834,true) call PauseUnit(gg_unit_n00S_0365,true) call SetUnitInvulnerable(gg_unit_H00Q_0724,true) call TriggerRegisterUnitEvent(LE,lastspeaker,EVENT_UNIT_DEATH) call TimerStart(GetExpiredTimer(),2,false,function Vve) endfunction function Vxe takes nothing returns nothing set PE=PE-1 call Ltv(LAv("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",-4768,-$F00,5)) if PE>0 then call TimerStart(GetExpiredTimer(),1,false,function Vxe) else call TimerStart(GetExpiredTimer(),3,false,function Vee) endif endfunction function Voe takes nothing returns nothing set PE=3 call TimerStart(GetExpiredTimer(),1,false,function Vxe) endfunction function Vre takes nothing returns nothing call fiv(true) call n5e() call TimerStart((NewTimer(0)),.5,false,function Voe) endfunction function Vie takes nothing returns nothing if PE>0 then set PE=PE-1 call n3e() call n4e(6) endif endfunction function Vae takes nothing returns nothing set av=true set mE=(NewTimer(0)) set ME=(NewTimer(0)) set pE=CreateTimerDialog(ME) call SetUnitInvulnerable((Je[(lE)]),false) call TimerStart(mE,KE,true,function Vie) call TimerStart(ME,kE,false,function Vre) call TimerDialogSetTitle(pE,"Demon Lord") call TimerDialogSetTitleColor(pE,$FF,0,0,$FF) call TimerDialogDisplay(pE,true) endfunction function Vne takes nothing returns boolean if n6e()then if GetTriggerUnit()==gg_unit_H00Q_0724 then call DisplayTimedText("Prius King|c00FF0000Demon Lord's|r invasion ended.",$A) else call DisplayTimedText("|c00FF0000Devil Lord was sealed again!!|r",$A) endif endif return false endfunction function VVe takes nothing returns nothing set lE=(GetUnitUserData((CreateUnit(P[$B],'n01Z',GetRectCenterX(gg_rct_EM02______________003),GetRectCenterY(gg_rct_EM02______________003),90)))) set LE=CreateTrigger() call SetUnitInvulnerable((Je[(lE)]),true) call SetUnitInvulnerable(gg_unit_H00Q_0724,false) call TriggerRegisterUnitEvent(LE,gg_unit_H00Q_0724,EVENT_UNIT_DEATH) call TriggerRegisterUnitEvent(LE,(Je[(lE)]),EVENT_UNIT_DEATH) call TriggerAddCondition(LE,Condition(function Vne)) endfunction function VEe takes nothing returns nothing call DisplayTimedText("|c00FF0000Hell Gate|r is opened!!",$F) call fiv(false) call Vae() call PingMinimapEx(GetRectCenterX(gg_rct_EM02______________003),GetRectCenterY(gg_rct_EM02______________003),5,$FF,0,0,false) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:64") endfunction function VXe takes nothing returns nothing local unit u call Ltv(LAv("Abilities\\Spells\\NightElf\\BattleRoar\\RoarCaster.mdl",GetUnitX(gg_unit_h00N_0748),GetUnitY(gg_unit_h00N_0748),1.5)) call PlaySoundOnUnit_BJ((Wa),((100)*1.),(gg_unit_h00N_0748)) set lastspeaker=gg_unit_h00M_0750 call Playlines("Soldier","Rush !!") call GroupEnumUnitsInRect(G,gg_rct_EM03_________________003,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if UnitAlive(u)then call IssuePointOrderById(u,$D000F,GetRectCenterX(gg_rct_EM02______________003),GetRectCenterY(gg_rct_EM02______________003)) endif endloop call TimerStart(GetExpiredTimer(),2.5,false,function VEe) endfunction function VOe takes nothing returns nothing local unit u set lastspeaker=gg_unit_H00G_0758 call IssuePointOrderById(lastspeaker,$D000F,GetRectCenterX(gg_rct_EM02______________003),GetRectCenterY(gg_rct_EM02______________003)) set lastspeaker=gg_unit_h00N_0748 call Playlines("Commander","Something good that need to be translate!!") call GroupEnumUnitsInRect(G,gg_rct_EM03_________________003,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if UnitAlive(u)then call SetUnitAnimation(u,"Stand Victory") endif endloop call TimerStart(GetExpiredTimer(),2.5,false,function VXe) endfunction function VRe takes nothing returns nothing set lastspeaker=gg_unit_H00G_0758 call Playlines("General Prius","Kill them!!") call SetUnitAnimation(lastspeaker,"Spell") call QueueUnitAnimation(lastspeaker,"Stand") call PlaySoundOnUnit_BJ((ya),((100)*1.),(lastspeaker)) call TimerStart(GetExpiredTimer(),2.75,false,function VOe) endfunction function VIe takes nothing returns nothing set lastspeaker=gg_unit_H00G_0758 call Playlines("General Prius","All the troops pick up your weapons and follow me! Sign guards to defence our capital!!") call TimerStart(GetExpiredTimer(),2.75,false,function VRe) endfunction function VAe takes nothing returns nothing set lastspeaker=gg_unit_H00G_0758 call Playlines("General Prius","Oh no, my god, what are these ghosts, how did they get into our territory?!!") call TimerStart(GetExpiredTimer(),2.5,false,function VIe) endfunction function VNe takes nothing returns nothing call TimerStart(GetExpiredTimer(),.3,false,function VAe) endfunction function Vbe takes nothing returns nothing call n4e(5) call TimerStart(GetExpiredTimer(),2,false,function VNe) endfunction function VBe takes nothing returns nothing call VVe() call TimerStart(GetExpiredTimer(),2,false,function Vbe) endfunction function Vce takes nothing returns nothing call Ltv(LAv("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",-$41E0,$F00,5)) call TimerStart(GetExpiredTimer(),.25,false,function VBe) endfunction function VCe takes nothing returns nothing call StartSound(ma) call TimerStart(GetExpiredTimer(),1,false,function Vce) endfunction function Vde takes nothing returns nothing call fiv(true) call TimerStart(GetExpiredTimer(),.5,false,function VCe) endfunction function VDe takes nothing returns boolean if not av and lE==-1 and IsItemCharges(GetItemOfTypeFromUnit(GetTriggerUnit(),'I04X'),$C)then set av=true set lE=0 call DisplayTimedText("|c00FF0000Red powder|r disappeared leaving a bunch of red light",5) call UnitShareVision(gg_unit_H00Q_0724,P[$C],true) call RemoveItemByCharges(GetItemOfTypeFromUnit(GetTriggerUnit(),'I04X'),$C) call TimerStart((NewTimer(0)),3,false,function Vde) endif return false endfunction function Vfe takes nothing returns nothing local integer fx=(alloc__hpv(GetHandleId((GetExpiredTimer())))) set gK=gK-1 if gK<=0 then call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:65") call Ltv(LAv("AquaSpike.mdl",(GetUnitX(II[(fx)])),(GetUnitY(II[(fx)])),2)) call SetUnitTimeScale((Je[(FK)]),1) call SetUnitPathing((Je[(FK)]),true) call SetUnitInvulnerable((Je[(FK)]),false) call PauseUnit((Je[(FK)]),false) call SetUnitVertexColor((Je[(FK)]),$FF,125,125,$FF) call Unit_Cancel_Counter(82,FK) call Ltv(fx) elseif gK<=96 and ModuloInteger(gK,4)==0 then if gK==96 then set FK=(GetUnitUserData((CreateUnit(P[$C],'orai',(GetUnitX(II[(fx)])),(GetUnitY(II[(fx)])),GetRandomReal(0,359))))) call SetUnitTimeScale((Je[(FK)]),1./ 3.) call SetUnitAnimation((Je[(FK)]),"Spell") call QueueUnitAnimation((Je[(FK)]),"Stand") call SetUnitPathing((Je[(FK)]),false) call SetUnitInvulnerable((Je[(FK)]),true) call PauseUnit((Je[(FK)]),true) call Unit_App_Counter(83,FK) endif call SetUnitVertexColor((Je[(FK)]),$FF,125,125,R2I($FF-255./ 96.*gK)) call Ltv(LAv("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",(GetUnitX(II[(fx)]))+GetRandomReal(-$FA,$FA),(GetUnitY(II[(fx)]))+GetRandomReal(-$FA,$FA),.5)) endif endfunction function VFe takes nothing returns boolean local unit u=GetTriggerUnit() local real x=GetUnitX(u) local real y=GetUnitY(u) if IsPointInRect(x,y,gg_rct_YRST______________000)then if gK==0 then call GroupEnumUnitsOfPlayer(G,P[$C],null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) exitwhen UnitAlive(u)and GetUnitTypeId(u)=='orai' endloop if u==null then set gK=$80 call StartSound(Nn) call TimerStart(NewTimer(LAv("Whirlpool.mdl",x,y,.375)),.03125,true,function Vfe) else call NewTextTagInTarget_B(GetTriggerUnit(),"Lobster has been summoned",8,$CD,$FF,$9B) if GetLocalPlayer()==GetOwningPlayer(GetTriggerUnit())then call PingMinimapEx(GetUnitX(u),GetUnitY(u),2,$FF,125,$FF,false) endif call IssueImmediateOrderById(GetTriggerUnit(),$D0004) endif else call NewTextTagInTarget_B(u,"Calling",8,$CD,$FF,$9B) call IssueImmediateOrderById(u,$D0004) endif else call NewTextTagInTarget_B(u,"You can not use it here",8,$CD,$FF,$9B) call IssueImmediateOrderById(u,$D0004) endif set u=null return false endfunction function VGe takes nothing returns nothing local integer fx=(alloc__hpv(GetHandleId((GetExpiredTimer())))) set hK=hK-1 if hK<=0 then call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:66") call Ltv(LAv("FrostNova.mdx",(GetUnitX(II[(fx)])),(GetUnitY(II[(fx)])),1.25)) call SetUnitTimeScale((Je[(GK)]),1) call SetUnitPathing((Je[(GK)]),true) call SetUnitInvulnerable((Je[(GK)]),false) call PauseUnit((Je[(GK)]),false) call SetUnitVertexColor((Je[(GK)]),$B9,$B9,$FF,$FF) call Unit_Cancel_Counter(84,GK) call Ltv(fx) elseif hK<=96 and ModuloInteger(hK,4)==0 then if hK==96 then set GK=(GetUnitUserData((CreateUnit(P[$C],'oshm',(GetUnitX(II[(fx)])),(GetUnitY(II[(fx)])),GetRandomReal(0,359))))) call SetUnitTimeScale((Je[(GK)]),1./ 3.) call SetUnitAnimation((Je[(GK)]),"Spell") call QueueUnitAnimation((Je[(GK)]),"Stand") call SetUnitPathing((Je[(GK)]),false) call SetUnitInvulnerable((Je[(GK)]),true) call PauseUnit((Je[(GK)]),true) call Unit_App_Counter(85,GK) endif call SetUnitVertexColor((Je[(GK)]),$B9,$B9,$FF,R2I($FF-255./ 96.*hK)) call Lqv(LAv("AuraOfChilliness.mdl",(GetUnitX(II[(fx)]))+GetRandomReal(-$FA,$FA),(GetUnitY(II[(fx)]))+GetRandomReal(-$FA,$FA),1),1) endif endfunction function Vhe takes nothing returns boolean local unit u=GetTriggerUnit() local real x=GetUnitX(u) local real y=GetUnitY(u) if IsPointInRect(x,y,gg_rct_BSXS______________000)then if hK==0 then call GroupEnumUnitsOfPlayer(G,P[$C],null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) exitwhen UnitAlive(u)and GetUnitTypeId(u)=='oshm' endloop if u==null then set hK=$80 call StartSound(Nn) call TimerStart(NewTimer(LAv("FreezingPrison.mdl",x,y,4)),.03125,true,function VGe) else call NewTextTagInTarget_B(GetTriggerUnit(),"Mammoth has been summoned",8,$CD,$FF,$9B) if GetLocalPlayer()==GetOwningPlayer(GetTriggerUnit())then call PingMinimapEx(GetUnitX(u),GetUnitY(u),2,$FF,125,$FF,false) endif call IssueImmediateOrderById(GetTriggerUnit(),$D0004) endif else call NewTextTagInTarget_B(u,"Calling",8,$CD,$FF,$9B) call IssueImmediateOrderById(u,$D0004) endif else call NewTextTagInTarget_B(u,"You can not use it here",8,$CD,$FF,$9B) call IssueImmediateOrderById(u,$D0004) endif set u=null return false endfunction function VHe takes nothing returns nothing call RegisterSpellEffectEvent('A0C8',function Vhe) endfunction function Vje takes nothing returns nothing local integer fx=(alloc__hpv(GetHandleId((GetExpiredTimer())))) set jK=jK-1 if jK<=0 then call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:67") call SetUnitTimeScale((Je[(HK)]),1) call SetUnitPathing((Je[(HK)]),true) call SetUnitInvulnerable((Je[(HK)]),false) call PauseUnit((Je[(HK)]),false) call SetUnitVertexColor((Je[(HK)]),$9B,$F,$F,$FF) call Unit_Cancel_Counter(86,HK) call Ltv(fx) elseif jK<=96 and ModuloInteger(jK,4)==0 then if jK==96 then set HK=(GetUnitUserData((CreateUnit(P[$C],'n02L',(GetUnitX(II[(fx)])),(GetUnitY(II[(fx)])),GetRandomReal(0,359))))) call SetUnitTimeScale((Je[(HK)]),1./ 3.) call SetUnitAnimation((Je[(HK)]),"Spell") call QueueUnitAnimation((Je[(HK)]),"Stand") call SetUnitPathing((Je[(HK)]),false) call SetUnitInvulnerable((Je[(HK)]),true) call PauseUnit((Je[(HK)]),true) call Unit_App_Counter(87,HK) endif call SetUnitVertexColor((Je[(HK)]),$9B,$F,$F,R2I($FF-255./ 96.*jK)) call Ltv(LAv("blood.mdx",(GetUnitX(II[(fx)]))+GetRandomReal(-$FA,$FA),(GetUnitY(II[(fx)]))+GetRandomReal(-$FA,$FA),2)) call Ltv(LAv("blood.mdx",(GetUnitX(II[(fx)]))+GetRandomReal(-$FA,$FA),(GetUnitY(II[(fx)]))+GetRandomReal(-$FA,$FA),2)) endif endfunction function VJe takes nothing returns boolean local unit u=GetTriggerUnit() local real x=GetUnitX(u) local real y=GetUnitY(u) if IsPointInRect(x,y,gg_rct_DGFX______________000)then if jK==0 then call GroupEnumUnitsOfPlayer(G,P[$C],null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) exitwhen UnitAlive(u)and GetUnitTypeId(u)=='n02L' endloop if u==null then set jK=$80 call StartSound(gn) call TimerStart(NewTimer(LAv("DeathSeal.mdl",x,y,1.5)),.03125,true,function Vje) else call NewTextTagInTarget_B(GetTriggerUnit(),"Blood Wraith has been summoned",8,$CD,$FF,$9B) call IssueImmediateOrderById(GetTriggerUnit(),$D0004) endif else call NewTextTagInTarget_B(u,"Calling",8,$CD,$FF,$9B) if GetLocalPlayer()==GetOwningPlayer(GetTriggerUnit())then call PingMinimapEx(GetUnitX(u),GetUnitY(u),2,$FF,125,$FF,false) endif call IssueImmediateOrderById(u,$D0004) endif else call NewTextTagInTarget_B(u,"You can not use it here",8,$CD,$FF,$9B) call IssueImmediateOrderById(u,$D0004) endif set u=null return false endfunction function Vke takes nothing returns nothing call RegisterSpellEffectEvent('A0H2',function VJe) endfunction function VKe takes integer NNv returns boolean local real x=s__barrage_X[NNv] local real y=s__barrage_Y[NNv] local unit u call GroupEnumUnitsInRange(G,x,y,350+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,350)then if IsUnitOfPlayerNotseckill(u)then call KillUnitBJ(u) endif endif endloop call Ltv(Lfv(LAv("AncientExplode.mdl",x,y,1.5),$FF,25,25,$FF)) call Ltv(LAv("Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl",x,y,1.5)) return true endfunction function Vle takes integer NNv,unit u returns boolean return IsUnitAliveAndEnemy(u,s__barrage_atkunit[NNv])and GetUnitAbilityLevel(u,'Avul')==0 endfunction function VLe takes integer NNv returns nothing call RemoveBarrage(NNv) endfunction function Vme takes nothing returns boolean local integer NNv=s__barrage_FR[QK] local unit u if NNv!=QK then call UseBarrage(QK) loop exitwhen NNv==QK if(s__barrage_outside[(NNv)])then call VKe(NNv) call RemoveBarrage((NNv)) elseif(s__barrage_finish[(NNv)])then if VKe(NNv)then call RemoveBarrage((NNv)) else set s__barrage_finish[(NNv)]=false endif else if s__barrage_CollisionRange[NNv]!=0 then call GroupEnumUnitsInRange(G,s__barrage_X[NNv],s__barrage_Y[NNv],s__barrage_CollisionRange[NNv]+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,s__barrage_X[NNv],s__barrage_Y[NNv],s__barrage_CollisionRange[NNv])then if not IsUnitInGroup(u,s__barrage_enum_g[NNv])then call GroupAddUnit(s__barrage_enum_g[NNv],u) if u!=s__barrage_target[NNv]and Vle(NNv,u)then set u=null call VKe(NNv) call RemoveBarrage((NNv)) exitwhen true endif endif endif endloop endif endif set NNv=s__barrage_FR[NNv] endloop elseif s__barrage_InOperation[QK]then set s__barrage_InOperation[QK]=false call TriggerEvaluate(OAv) endif return false endfunction function VMe takes nothing returns nothing call fov(sK) endfunction function s__EvilLavaSpawn_stop takes nothing returns nothing call frv(sK) endfunction function Vpe takes nothing returns nothing set sK=fxv(function Vme) call fov(sK) endfunction function VPe takes integer NNv returns nothing call s__barrage_Filling((QK),(NNv)) if not s__barrage_InOperation[QK]then set s__barrage_InOperation[QK]=true call fov(sK) endif endfunction function Vqe takes nothing returns nothing set QK=NewLauncher() set s__barrage_InOperation[QK]=true endfunction function VQe takes nothing returns nothing local integer Vse local integer rM local integer i local real mH local real cL local real x local real y local real a if UnitAlive(JK)then set cL=GetWidgetLife(JK) set mH=GetUnitState(JK,UNIT_STATE_MAX_LIFE) set x=GetUnitX(JK) set y=GetUnitY(JK) if GetUnitAbilityLevel(JK,'B04A')==1 then set LK=ModuloInteger(LK+1,R2I(16+16*cL/ mH)) call SetUnitVertexColor(JK,GetRandomInt(0,$FF),GetRandomInt(0,$FF),GetRandomInt(0,$FF),$FF) else set LK=ModuloInteger(LK+1,R2I(32+32*cL/ mH)) call SetUnitVertexColor(JK,$9B,$F,$F,$FF) endif if LK==0 then call cMv(x,y) endif if mK>0 then set mK=mK-1 endif if pK>0 then set qK=qK+1 set Vse=MK[pK-1] call SetUnitScale(II[(Vse)],((1.+.125*qK)*1.),0,0) if IsUnitPaused(JK)then call PauseUnit(JK,false) call SetUnitInvulnerable(JK,false) endif if qK==$C then set qK=0 set pK=pK-1 set a=pK*Lx/ 16. set rM=CreateBarrageTypeE(Vse,x+$4E2*Cos(a),y+$4E2*Sin(a),(GetUnitFlyHeight(II[(Vse)]))) set s__barrage_atkunit[rM]=JK set s__barrage_speed[rM]=.03125*250. set s__barrage_acceleration[rM]=.03125*.03125*1250. set s__barrage_CollisionRange[rM]=175. call LFv(Lfv(Vse,$FF,25,25,$FF),"Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl") call VPe(rM) else call Lfv(Vse,GetRandomInt(0,$FF),GetRandomInt(0,$FF),GetRandomInt(0,$FF),$FF) endif set i=pK loop exitwhen i==0 set i=i-1 set a=i*Lx/ 16. set Vse=MK[i] call LKv(Vse,x+$FA*Cos(a)) call Llv(Vse,y+$FA*Sin(a)) endloop elseif cL<(.25*PK-.05)*mH then set PK=PK-1 set qK=0 loop set a=pK*Lx/ 16. set Vse=Lfv(Lnv(x+$FA*Cos(a),y+$FA*Sin(a),a),$FF,25,25,$FF) call LMv(Vse,"Abilities\\Spells\\Undead\\OrbOfDeath\\AnnihilationMissile.mdl") call SetUnitFlyHeight(II[(Vse)],((75)*1.),0) set MK[pK]=Vse set pK=pK+1 exitwhen pK==16 endloop call NewTextTagInTarget_B(JK,"Sample death by it!!!",$F,$FF,55,55) call PauseUnit(JK,true) call SetUnitInvulnerable(JK,true) call SetUnitAnimation(JK,"spell") call QueueUnitAnimation(JK,"stand") call zlv($FF,125,125,.27) call Ltv(Lfv(LAv("AncientExplode.mdl",x,y,3),$FF,25,25,$FF)) elseif cL>(.25+.25*PK)*mH then set PK=PK+1 endif if GetPointZ(x,y)<=35 then if lK<480 then set lK=lK+1 if ModuloInteger(lK,48)==0 then call ModifyUnitHP((GetUnitUserData((JK))),$249F0) call ModifyUnitHpRegen((GetUnitUserData((JK))),$9C4) call ModifyUnitAttack((GetUnitUserData((JK))),$5DC) call Ltv(LAv("ChaosExplosion.mdx",x,y,1.25)) endif endif if GetUnitAbilityLevel(JK,'A0LO')==0 then if pK==0 then call NewTextTagInTarget_B(JK,"This energy is really good!!",$F,$FF,55,55) endif call UnitAddAbilityBY(JK,'A0LO') call ModifyUnitHpRegen((GetUnitUserData((JK))),$C350) endif elseif GetUnitAbilityLevel(JK,'A0LO')==1 then call UnitRemoveAbilityandBuffBY(JK,'A0LO','B049') call ModifyUnitHpRegen((GetUnitUserData((JK))),-$C350) endif else loop exitwhen pK==0 set pK=pK-1 call Ltv(MK[pK]) endloop call ReleaseTimer(kK,"[TimerUtils]Error:68") set kK=null endif endfunction function VSe takes nothing returns nothing call NewTextTagInTarget_B(JK,"Give you a big meal to taste!!",18,$FF,55,55) call PauseUnit(JK,false) call SetUnitInvulnerable(JK,false) call SetUnitPathing(JK,true) call SetUnitVertexColor(JK,$9B,$F,$F,$FF) call RemoveGuardPosition(JK) call TimerStart(kK,.03125,true,function VQe) call PlaySoundOnUnit_BJ((qn),((125)*1.),(JK)) call Ltv(LAv("ChaosExplosion.mdx",(GetUnitX(II[(KK)])),(GetUnitY(II[(KK)])),2.5)) call zlv($FF,125,125,.75) call zjv(40,.75) call Ltv(KK) set KK=0 endfunction function Vte takes nothing returns nothing call NewTextTagInTarget_B(JK,"You are too weak, do not be overconfident..",18,$FF,55,55) call SetUnitVertexColor(JK,$9B,$F,$F,125) call TimerStart(kK,3.25,true,function VSe) endfunction function VTe takes nothing returns boolean if GetUnitAbilityLevel(JK,'B04A')==1 and mK==0 then set mK=32 call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\Possession\\PossessionMissile.mdl",JK,"chest")) call Lqv(LAv("DarkLightningNova.mdx",GetUnitX(JK),GetUnitY(JK),1.5),2) call Gjv(JK,$FA,GetRandomReal(0,Lx),1,"KnockbackDust.mdx") endif return false endfunction function Vue takes nothing returns nothing set JK=CreateUnit(P[$B],'n02Z',(GetUnitX(II[(KK)])),(GetUnitY(II[(KK)])),270) call UnitAddShieldTrig((GetUnitUserData((JK))),function VTe) call PauseUnit(JK,true) call SetUnitInvulnerable(JK,true) call SetUnitPathing(JK,false) call SetUnitVertexColor(JK,$9B,$F,$F,55) call Ltv(LAv("Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl",(GetUnitX(II[(KK)])),(GetUnitY(II[(KK)])),2)) call TimerStart(kK,3,false,function Vte) endfunction function VUe takes unit u,real x,real y returns nothing if UnitAlive(JK)then call IssueUnitStop_DisplayText(u,"Calling") elseif KK!=0 then call IssueUnitStop_DisplayText(u,"Has been summoned successfull") else if kK==null then set kK=(NewTimer(0)) endif set KK=LAv("Abilities\\Spells\\Human\\FlameStrike\\FlameStrikeTarget.mdl",x,y,1.25) call TimerStart(kK,1.5,false,function Vue) call Ltv(LAv("MagmaBurst.mdx",x,y,1.5)) call PlaySoundAtPoint_BJ((Gn),((125)*1.),((x)*1.),((y)*1.),0) endif endfunction function Vwe takes nothing returns boolean call NewTextTagInTarget_B(JK,"Come to hug, haha !! !!",$F,$FF,55,55) call PlaySoundOnUnit_BJ((Qn),((100)*1.),(JK)) return false endfunction function VWe takes nothing returns nothing call RegisterSpellEffectEvent('A0LP',function Vwe) endfunction function Vye_v takes nothing returns nothing call KillUnit((Je[(ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:69"))])) endfunction function Vye takes boolean VYe returns nothing local unit u if not fK then return endif if UnitAlive(TK)then call SetUnitInvulnerable(TK,true) call PauseUnit(TK,true) if VYe then set fK=FALSE call UnitAddAbility(TK,'Aloc') call TimerStart(NewTimer((GetUnitUserData((TK)))),0,false,function Vye_v) endif endif call GroupEnumUnitsInRect(YK,yK,null) loop set u=FirstOfGroup(YK) exitwhen u==null call GroupRemoveUnit(YK,u) if GetUnitTypeId(u)=='odoc' then call KillUnit(u) endif endloop if SK>0 and UnitAlive((Je[(SK)]))then call KillUnit((Je[(SK)])) endif call TriggerEvaluate(OSv) call RecycleGroup(YK) call ReleaseTimer(uK,"[TimerUtils]Error:70") call RemoveRect(yK) set TK=null set yK=null set uK=null set YK=null endfunction function Vze takes nothing returns nothing local unit u local boolean VZe local real sc if not(Control_use[((GetUnitUserData((TK))))])then set VZe=false set UK=UK+1 set sc=.7+.01*UK if sc>1.5 then set sc=1.5 endif call Ltv(LAv("EarthNova.mdl",GetUnitX(TK),GetUnitY(TK),sc)) call GroupEnumUnitsInRect(YK,yK,null) loop set u=FirstOfGroup(YK) exitwhen u==null call GroupRemoveUnit(YK,u) if GetUnitAbilityLevel(u,'Avul')==0 and IsUnitAliveAndEnemy(u,TK)then set VZe=true call UnitDamageTargetBY(((TK)),((u)),(((($5DC+100*UK)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\ManaBurn\\ManaBurnTarget.mdl",u,"origin")) endif endloop if GetUnitAbilityLevel(TK,'Avul')>0 then call SetUnitAnimation(TK,"Spell") endif if VZe then set zK=0 else set zK=zK+1 if zK>$C then call Vye(false) endif endif endif endfunction function V_e takes nothing returns nothing local real x=GetUnitX(TK) local real y=GetUnitY(TK) local unit u call PauseUnit(TK,false) call SetUnitTimeScale(TK,1) call Ltv(LAv("Acid Ex.mdl",x,y,5)) call Lqv(LAv("Abilities\\Spells\\Undead\\Darksummoning\\DarkSummonTarget.mdl",x,y,5),1) call Ltv(Lfv(LAv("Abilities\\Spells\\Undead\\DarkRitual\\DarkRitualTarget.mdl",x,y,6.5),55,$FF,55,$CD)) call zjv(50,.5) call GroupEnumUnitsInRect(YK,yK,null) loop set u=FirstOfGroup(YK) exitwhen u==null call GroupRemoveUnit(YK,u) if GetUnitAbilityLevel(u,'Avul')==0 and IsUnitAliveAndEnemy(u,TK)then call m1v(u,1.5) call UnitDamageTargetBY(((TK)),((u)),((((.5*GetUnitState(u,UNIT_STATE_MAX_LIFE))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call DestroyEffect(AddSpecialEffectTarget("CurseBoltGreen.mdl",u,"chest")) endif endloop endfunction function V0e takes nothing returns nothing local real x=GetUnitX((Je[(SK)])) local real y=GetUnitY((Je[(SK)])) local unit u if UnitAlive((Je[(SK)]))then if WK<$FF then set WK=WK+4 if WK>=$FF then set WK=$FF call SetUnitPathing((Je[(SK)]),true) call SetUnitInvulnerable((Je[(SK)]),false) call PauseUnit((Je[(SK)]),false) endif call SetUnitVertexColor((Je[(SK)]),55,125,55,R2I(WK)) else call ModifyUnitAttackSpeed((SK),-ZK) set ZK=R2I($96-$96*GetWidgetLife((Je[(SK)]))/ GetUnitState((Je[(SK)]),UNIT_STATE_MAX_LIFE)) call ModifyUnitAttackSpeed((SK),ZK) call SetUnitVertexColor((Je[(SK)]),55-R2I(ZK/ 4),125-R2I(ZK/ 2),55-R2I(ZK/ 4),$FF) call GroupEnumUnitsInRange(G,x,y,325+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,325)then if IsUnitAliveAndEnemy(u,TK)then call UnitDamageTargetBY(((TK)),((u)),((((125)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop endif else if UnitAlive(TK)and uK!=null and wK!=4 then set UK=0 call m1v(TK,$A) call PauseUnit(TK,false) call SetUnitInvulnerable(TK,false) call SetUnitTimeScale(TK,1) call SetUnitAnimation(TK,"Death") call Ltv(Lfv(LAv("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",GetUnitX(TK),GetUnitY(TK),5),0,$FF,0,$FF)) call TimerStart(uK,3,true,function Vze) endif call GroupEnumUnitsInRange(G,x,y,500+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,500)then if IsUnitAliveAndEnemy(u,TK)then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",u,"origin")) call UnitDamageTargetBY(((TK)),((u)),((((5000)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v(u,2.5) endif endif endloop call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:71") call Ltv(Lfv(LAv("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",x,y,5),0,$FF,0,$CD)) call Unit_Cancel_Counter(88,SK) set SK=0 endif endfunction function V1e takes nothing returns boolean local real x=GetUnitX((Je[(SK)])) local real y=GetUnitY((Je[(SK)])) local real a=Atan2(GetUnitY((MF))-y,GetUnitX((MF))-x) local unit u set x=x-96*Cos(a) set y=y-96*Sin(a) if not IsUnitType((MF),UNIT_TYPE_HERO)then call DamageAmplify(2*GetDamage()) endif call GroupEnumUnitsInRange(YK,x,y,450,null) call GroupRemoveUnit(YK,(MF)) loop set u=FirstOfGroup(YK) exitwhen u==null call GroupRemoveUnit(YK,u) if IsUnitInRangeXY(u,x,y,300)and IsUnitAliveAndEnemy(u,TK)then if(Cos(((Atan2(GetUnitY(u)-y,GetUnitX(u)-x))*1.)-((a)*1.))>=Cos(((1.7)*1.)))then if IsUnitType((MF),UNIT_TYPE_HERO)then call UnitDamageTargetBY(((Je[(SK)])),(u),(((DAK_AMOUNT[HF]))*1.),false,(false),false,false,(ATTACK_TYPE_HERO),(DAMAGE_TYPE_NORMAL),.0,"") else call UnitDamageTargetBY(((Je[(SK)])),(u),((3*(DAK_AMOUNT[HF]))*1.),false,(false),false,false,(ATTACK_TYPE_HERO),(DAMAGE_TYPE_NORMAL),.0,"") endif call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl",u,"chest")) call DestroyEffect(AddSpecialEffectTarget("blood.mdl",u,"chest")) endif endif endloop return false endfunction function V2e takes nothing returns boolean if GetRandomInt(1,20)==1 then call IssuePointOrderById((MF),$D009D,GetUnitX((mF)),GetUnitY((MF))) endif return false endfunction function V3e takes nothing returns boolean local unit u local real x local real y if UnitAlive((MF))and GetWidgetLife((MF))-GetDamage()<=.405 then set x=GetUnitX((MF)) set y=GetUnitY((MF)) call KillUnit((MF)) call Ltv(LAv("ToxicField.mdl",x,y,.9)) call GroupEnumUnitsInRange(YK,x,y,375,null) loop set u=FirstOfGroup(YK) exitwhen u==null call GroupRemoveUnit(YK,u) if IsUnitInRangeXY(u,x,y,300)then if IsUnitAliveAndEnemy(u,TK)then call UnitDamageTargetBY(((TK)),((u)),(((($BB8+.1*GetUnitMaxLifeById((GetUnitUserData((u)))))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) call UnitAppBuff((GetUnitUserData((u))),'Aslo',$D006B) elseif u==(Je[(SK)])then call SetWidgetLife(u,GetWidgetLife(u)+$7A120) endif endif endloop endif return false endfunction function V4e takes nothing returns nothing local unit u call NewTextTagInTarget_A(TK,"How dare you?",55,$FF,55) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:72") call Ltv(Lfv(LAv("AncientExplode.mdl",GetUnitX(TK),GetUnitY(TK),2.5),0,$9B,0,$CD)) call SetUnitVertexColor(TK,25,75,25,$FF) call PauseUnit(TK,false) call SetUnitInvulnerable(TK,false) call GroupEnumUnitsInRect(YK,yK,null) call GroupRemoveUnit(YK,TK) loop set u=FirstOfGroup(YK) exitwhen u==null call GroupRemoveUnit(YK,u) if IsUnitAliveAndAlly(u,TK)and GetUnitMoveSpeed(u)>0 then call Auxiliary_TargetOrder(('A0BV'),null,1,$D0085,u) endif endloop endfunction function V5e takes nothing returns boolean local integer fx local unit u local integer i local real x local real y local real pX local real pY local real a if yK==null and not IsUnitDeadBJ(TK)then set yK=Rect(GetRectMinX(gg_rct_DLZ________001),GetRectMinY(gg_rct_DLZ________001),GetRectMaxX(gg_rct_DLZ________001),GetRectMaxY(gg_rct_DLZ________001)) set YK=NewGroup() set uK=(NewTimer(0)) set wK=1 set UK=0 set fK=true call NewTextTagInTarget_A(TK,"Humans... Come to your death.",55,$FF,55) call EnableWeatherEffect(AddWeatherEffect(yK,'RAhr'),true) call StartSound(Rn) call SetUnitAnimation(TK,"Spell") call QueueUnitAnimation(TK,"Stand") call SetUnitTimeScale(TK,.5) call TimerStart((NewTimer(0)),3,false,function V_e) call TimerStart(uK,3,true,function Vze) call TriggerEvaluate(Otv) endif if wK<4 and GetWidgetLife(TK)-GetDamage()<=(1-.25*wK)*GetUnitMaxLifeById((GetUnitUserData((TK))))then set wK=wK+1 set WK=0 set ZK=0 set x=GetUnitX(TK) set y=GetUnitY(TK) set tK=Lfv(LAv("DesecrateGreen.mdx",$406D,$2812,2.5),$9B,$FF,$9B,$CD) set SK=(GetUnitUserData((CreateUnit(P[$B],'ohun',$406D,$2812,270)))) if wK>2 then set i=8 loop set i=i-1 set a=i*Lx/ 8 set pX=x+$FA*Cos(a) set pY=y+$FA*Sin(a) if not IsTerrainWalkable(pX,pY)then set pX=IsTerrainWalkable_X set pY=IsTerrainWalkable_Y endif call UnitAddShieldTrig((GetUnitUserData((CreateUnit(P[$B],'odoc',pX,pY,bj_RADTODEG*a)))),function V3e) call Ltv(Lfv(LAv("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",pX,pY,1.5),0,$FF,0,$CD)) exitwhen i==0 endloop if wK==4 then call TimerStart((NewTimer(0)),6,false,function V4e) endif endif call NewTextTagInTarget_A(TK,"Come out fat!!!",55,$FF,55) call UnitAddPAttackTrig((SK),function V1e) call UnitAddShieldTrig((SK),function V2e) call SetUnitVertexColor((Je[(SK)]),55,125,55,0) call SetUnitPathing((Je[(SK)]),false) call SetUnitAnimation((Je[(SK)]),"Stand Channel") call SetUnitInvulnerable((Je[(SK)]),true) call PauseUnit((Je[(SK)]),true) call Ltv(Lfv(LAv("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",-$2A00,-$6740,5),0,$FF,0,$CD)) call Ltv(LAv("DesecrateGreen.mdx",x,y,2)) call Ltv(LAv("EarthNova.mdl",x,y,2)) call TimerStart(uK,1.5,true,function Vze) call PauseUnit(TK,true) call SetUnitInvulnerable(TK,true) call SetUnitAnimation(TK,"Spell") call SetUnitTimeScale(TK,.7) call SetWidgetLife(TK,(1.25-.25*wK)*GetUnitMaxLifeById((GetUnitUserData((TK))))) call TimerStart((NewTimer(0)),.03125,true,function V0e) call Unit_App_Counter(89,SK) elseif GetWidgetLife(TK)-GetDamage()<=.405 then call Vye(true) endif return false endfunction function V6e takes nothing returns nothing local unit u local integer i local real x local real y local real pX local real pY if UnitAlive((Je[(SK)]))and el>0 then set el=el-1 set xl=xl-bj_PI/ 24 if ModuloInteger(el,2)==0 then set i=$A set x=GetUnitX((Je[(SK)])) set y=GetUnitY((Je[(SK)])) loop set i=i-1 set pX=x+65*i*Cos(xl) set pY=y+65*i*Sin(xl) call GroupEnumUnitsInRange(G,pX,pY,48+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,pX,pY,48)then if not IsUnitInGroup(u,vl)and IsUnitAliveAndEnemy(u,TK)then call GroupAddUnit(vl,u) call UnitDamageTargetBY(((TK)),((u)),((((9000)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call UnitAppBuff((GetUnitUserData((u))),'A0BU',$D00B5) endif endif endloop call Ltv(LAv("Abilities\\Spells\\Other\\AcidBomb\\BottleMissile.mdl",pX,pY,1.25)) exitwhen i==0 endloop endif call SetUnitTimeScale((Je[(SK)]),2) call SetUnitFacingTimed((Je[(SK)]),bj_RADTODEG*xl,0) call TimerStart(GetExpiredTimer(),.03125,false,function V6e) else call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:73") call SetUnitTimeScale((Je[(SK)]),1) call PauseUnit((Je[(SK)]),false) call RecycleGroup(vl) set vl=null endif endfunction function V7e takes nothing returns nothing call IssueImmediateOrderById((Je[(SK)]),$D0004) call PauseUnit((Je[(SK)]),true) call SetUnitAnimation((Je[(SK)]),"Stand Channel") call SetUnitTimeScale((Je[(SK)]),.2) call TimerStart(GetExpiredTimer(),1.1,false,function V6e) endfunction function V8e takes nothing returns boolean local integer i=$A local real x=GetUnitX((Je[(SK)])) local real y=GetUnitY((Je[(SK)])) local real a=Atan2(GetSpellTargetY()-y,GetSpellTargetX()-x)+bj_PI/ 3 local real sA=a-2*bj_PI/ 3 local real d set vl=NewGroup() set el=17 set xl=a+bj_PI/ 24 loop set i=i-1 set d=65*i call Lqv(LAv("Doodads\\Cinematic\\GlowingRunes\\GlowingRunes6.mdl",x+d*Cos(a),y+d*Sin(a),1.1),1.25) call Lqv(LAv("Doodads\\Cinematic\\GlowingRunes\\GlowingRunes6.mdl",x+d*Cos(sA),y+d*Sin(sA),1.1),1.25) exitwhen i==0 endloop call SetUnitAnimation((Je[(SK)]),"Stand Channel") call SetUnitTimeScale((Je[(SK)]),.25) call SetUnitFacingTimed((Je[(SK)]),bj_RADTODEG*a,0) call TimerStart((NewTimer(0)),0,false,function V7e) return false endfunction function V9e takes nothing returns nothing set TK=gg_unit_hmpr_0313 call PauseUnit(TK,true) call UnitAddShieldTrig((GetUnitUserData((TK))),function V5e) call RegisterSpellEffectEvent('A0BT',function V8e) endfunction function ENe takes nothing returns boolean local unit u=GetTriggerUnit() local real x=GetUnitX(u) local real y=GetUnitY(u) if IsPointInRangeXY(x,y,$55C0,-$2D60,$C8)then if not sc___prototype89_evaluate(1,u)then call VUe(u,x,y) endif else call NewTextTagInTarget_B(u,"You can not use it here",8,$CD,$FF,$9B) call IssueImmediateOrderById(u,$D0004) endif set u=null return false endfunction function Ebe takes nothing returns nothing call RegisterSpellEffectEvent('A0IB',function ENe) endfunction function EBe takes nothing returns nothing local integer NNv=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:74") call UnitRemoveAbilityandBuffBY((Je[(NNv)]),'A0J2','B038') call DeUnitAdef((NNv),Ql[NNv]) call Unit_Cancel_Counter(90,(NNv)) set sl[NNv]=null endfunction function Ece takes unit u returns nothing local integer NNv=(GetUnitUserData((u))) if sl[NNv]==null then set sl[NNv]=NewTimer(NNv) set Ql[NNv]=ModifyUnitAdef((NNv),80) call UnitAddAbilityBY((Je[(NNv)]),'A0J2') call Unit_App_Counter(91,(NNv)) endif call TimerStart(sl[NNv],1,false,function EBe) endfunction function ECe takes nothing returns nothing local real x=GetUnitX(Sl) local real y=GetUnitY(Sl) local unit u local boolean b if UnitAlive(Sl)then set Ul=Ul+1 if wl>0 then set wl=wl-1 if wl>895 then if ModuloInteger(wl-896,48)==0 then set u=PickRandomUnitInUnitRange(Sl,800) call UnitRemoveAbility(Sl,'A0J3') call UnitAddAbility(Sl,'A0J3') call Ltv(Lfv(LAv("EarthNova.mdl",x,y,1.25),125,125,125,125)) if u!=null then call IssuePointOrderById(Sl,$D024B,GetUnitX(u),GetUnitY(u)) set u=null endif endif if wl==896 then call SetUnitVertexColor(Sl,$CD,$9B,$CD,125) call DestroyEffectBY(tl) call SetUnitNocontrol((GetUnitUserData((Sl))),false) set tl=0 endif endif endif if Ul==16 then set Ul=0 set u=Sl set b=false if GetUnitAbilityLevel(Sl,'Bakb')==0 or GetUnitAbilityLevel(Sl,'B03V')==0 then call GroupEnumUnitsInRange(G,x,y,600+75,null) call GroupRemoveUnit(G,u) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,600)then if IsUnitAliveAndAlly(u,Sl)and GetUnitAbilityLevel(u,'Avul')==0 then set b=true call Ece(u) endif endif endloop endif if ul and not b then set ul=false call UnitRemoveAbilityandBuffBY(Sl,'A0J2','B038') call ModifyUnitHpRegen((GetUnitUserData((Sl))),-75000) elseif not ul and b then set ul=true call UnitAddAbilityBY(Sl,'A0J2') call ModifyUnitHpRegen((GetUnitUserData((Sl))),75000) endif endif else if tl!=0 then call SetUnitVertexColor(Sl,$CD,$9B,$CD,125) call DestroyEffectBY(tl) set tl=0 endif call Ltv(LAv("NatureExplosion.mdl",x,y,5)) call Ltv(LAv("NatureExplosion.mdl",x,y,5)) call SetItemChargesG(CreateItemG('I04W',x,y),2) call SetItemChargesG(CreateItemG('I04U',x,y),2) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:75") set Sl=null endif endfunction function Ede takes nothing returns boolean if not Tl then set Tl=true set Wl=.5*GetUnitState((MF),UNIT_STATE_MAX_LIFE) call NewTextTagInTarget_B((MF),"You are not welcomed here... I will not let u go... I will destroy you!",18,$9B,$FF,$9B) call PlaySoundOnUnit_BJ((Kn),((125)*1.),((MF))) call Ltv(LAv("NatureWave.mdl",GetUnitX((MF)),GetUnitY((MF)),3)) call zHv(50,1,GetUnitX((MF)),GetUnitY((MF)),900) call TimerStart((NewTimer(0)),.03125,true,function ECe) elseif wl==0 and GetUnitState((MF),UNIT_STATE_LIFE)0 then set xL=xL-1 endif if GetUnitAbilityLevel(Yl,'A0IO')>0 then if eL>0 then set eL=eL-1 endif if l>.4*oL and eL==0 then call UnitRemoveAbilityandBuffBY(Yl,'A0IO','B01X') call ModifyUnitHpRegen((GetUnitUserData((Yl))),-$C8*100) else call SetUnitState(Yl,UNIT_STATE_MANA,GetUnitState(Yl,UNIT_STATE_MANA)+.01875) endif elseif l<.4*oL then set eL=640 call ModifyUnitHpRegen((GetUnitUserData((Yl))),$C8*100) call UnitAddAbilityBY(Yl,'A0IO') endif if Yl_MpRegen>0 then call SetUnitState(Yl,UNIT_STATE_MANA,GetUnitState(Yl,UNIT_STATE_MANA)+Yl_MpRegen/ 32) set Yl_MpRegen=Yl_MpRegen-.03125 endif if GetUnitState(Yl,UNIT_STATE_MANA)>=GetUnitState(Yl,UNIT_STATE_MAX_MANA)then call TriggerEvaluate(OMv) call SetUnitState(Yl,UNIT_STATE_MANA,0) endif if Zl>0 and l<.25*Zl*oL then set Zl=Zl-1 call GroupEnumUnitsInRange(G,x,y,800+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,800)then if IsUnitAliveAndEnemy(u,Yl)then call UnitAppBuff((GetUnitUserData((u))),'A0GA',$D006B) endif endif endloop call StartSound(Nn) call Lsv(LAv("Whirlpool.mdl",x,y,1.25),3) call zlv($B9,$CD,$CD,3) call cGv(x,y) elseif l>(.25*Zl+.35)*oL then set Zl=Zl+1 endif set fA=bj_DEGTORAD*GetUnitFacing(Yl) set x=x-90*Cos(fA) set y=y-90*Sin(fA) set fA=fA+Lx/ 4. set tA=vL*Lx/ 32. loop set i=i-1 set a=fA+i*Lx/ 4. set tA=tA+Lx/ 4. call LKv(zl[i],x+(275*Cos(tA))*Cos(a)) call Llv(zl[i],y+(275*Cos(tA))*Sin(a)) call SetUnitFlyHeight(II[(zl[i])],(($FA+275*Sin(tA))*1.),0) exitwhen i==0 endloop else loop set i=i-1 call Ltv(zl[i]) exitwhen i==0 endloop call PlaySoundOnUnit_BJ((Jn),((125)*1.),(Yl)) call Ltv(LAv("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",GetUnitX(Yl),GetUnitY(Yl),7.5)) call Unit_Cancel_Counter(94,((GetUnitUserData((Yl))))) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:77") endif endfunction function EGe takes nothing returns boolean local unit u if xL==0 then set u=PickRandomVisibleHeroInRange(Yl,GetUnitX(Yl),GetUnitY(Yl),$6D6) if u!=null then call cHv(u) set u=null set xL=32-16*GetUnitAbilityLevel(Yl,'A0IO') endif endif set Yl_MpRegen=1 return false endfunction function Ehe takes nothing returns nothing local integer NNv=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:78") call UnitRemoveAbilityandBuffBY((Je[(NNv)]),'A0IH','B01C') call ModifyUnitArmor((NNv),50*EL[NNv]) call Unit_Cancel_Counter(95,(NNv)) set VL[NNv]=null set EL[NNv]=0 endfunction function EHe takes nothing returns boolean local integer NNv=(pF) if EL[NNv]==0 then set VL[NNv]=NewTimer(NNv) set EL[NNv]=0 call UnitAddAbilityBY((MF),'A0IH') call Unit_App_Counter(96,(NNv)) endif if EL[NNv]<37 then set EL[NNv]=EL[NNv]+1 call ModifyUnitArmor((NNv),-50) endif if EL[NNv]>9 then call zKv((Kc[(NNv)]),$9B,55,55,.05*EL[NNv]) endif call NewTextTagInTarget_B((MF),"|c00ff0000-"+I2S(50*EL[NNv]),8+.5*EL[NNv],$FF,$FF,$FF) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",(MF),"chest")) call TimerStart(VL[NNv],8,false,function Ehe) return false endfunction function Eje takes nothing returns nothing local integer id=(GetUnitUserData((Yl))) local integer i=4 set Zl=3 set vL=0 set eL=0 set xL=0 set oL=GetUnitMaxLifeById((GetUnitUserData((Yl)))) loop set i=i-1 set zl[i]=Lnv(0,0,0) call LMv(zl[i],"OrbOfSeas.mdx") exitwhen i==0 endloop call SetUnitVertexColor(Yl,90,125,$C3,$FF) call SetUnitInvulnerable(Yl,false) call SetUnitPathing(Yl,true) call PauseUnit(Yl,false) call SetUnitNocontrol(id,true) call Ltv(LAv("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",rL,aL,7.5)) call Ltv(LAv("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",rL,aL,7.5)) call UnitAddPAttackTrig((id),function EHe) call UnitAddShieldTrig((id),function EGe) call TimerStart((NewTimer(0)),.03125,true,function Ege) call Unit_App_Counter(97,(id)) endfunction function EJe takes nothing returns nothing local unit u set XL=XL+1 if XL<$A then if XL==5 then set Yl=CreateUnit(P[$B],'h018',rL,aL,$B4) call PauseUnit(Yl,true) call SetUnitInvulnerable(Yl,true) call SetUnitPathing(Yl,false) call SetUnitVertexColor(Yl,90,125,$C3,25) call Ltv(LAv("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",rL,aL,7.5)) call Ltv(LAv("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",rL,aL,7.5)) call zjv(30,.75) elseif UnitAlive(Yl)then call SetUnitVertexColor(Yl,90,125,$C3,25+30*(XL-5)) call Ltv(LAv("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",rL,aL,7.5)) endif call thv("|c000080ff"+I2S($A*XL)+"%..",rL,aL,50,.06,.04,bj_PI/ 2,1,1.5) call Lqv(LAv("Geiser.mdl",rL,aL,5.+.5*XL),2) call PlaySoundAtPoint_BJ((jn),((125)*1.),((rL)*1.),((aL)*1.),0) else call Ltv((ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:79"))) call Eje() endif endfunction function Eke takes nothing returns boolean local unit u=GetTriggerUnit() local real x=GetUnitX(u) local real y=GetUnitY(u) if IsUnitInRangeXY(u,rL,aL,300)then if IsItemCharges(GetItemOfTypeFromUnit(u,'I04V'),$C)then call DisplayTimedText("|c002040f0Blue powder|r disappeared leaving a trail of dark light",5) call PlaySoundAtPoint_BJ((jn),((125)*1.),((rL)*1.),((aL)*1.),0) call RemoveItemByCharges(GetItemOfTypeFromUnit(u,'I04V'),$C) call TimerStart(NewTimer(LAv("HealingWater.mdl",rL,aL,3)),.75,true,function EJe) elseif not sc___prototype23_evaluate(1)then call NewTextTagInTarget_B(u,"No time yet...",8,$CD,$FF,$9B) call IssueImmediateOrderById(u,$D0004) endif else call NewTextTagInTarget_B(u,"You can not use it here",8,$CD,$FF,$9B) call IssueImmediateOrderById(u,$D0004) endif set u=null return false endfunction function EKe takes nothing returns nothing call RegisterSpellEffectEvent('A03W',function Eke) endfunction function Ele takes nothing returns nothing local unit u local integer i local real mH local real cL local real x local real y local real m if UnitAlive(OL)then set cL=GetWidgetLife(OL) set mH=GetUnitState(OL,UNIT_STATE_MAX_LIFE) if fL>0 then set fL=fL-1 endif if DL>0 then set DL=DL-1 if ModuloInteger(DL,32)==0 then set i=3 set x=GetUnitX(OL) set y=GetUnitY(OL) call GroupEnumUnitsInRange(G,x,y,$4B0+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$4B0)then if not IsUnitInRangeXY(u,x,y,600)and IsUnitOfPlayerNotseckill(u)then if nC[(GetUnitUserData((u)))]then call zKv((GetPlayerId((GetOwningPlayer(u)))),55,55,$FF,.27) endif call Puv("CLPB",OL,u,.75,1,0) call Ltv(LAv("Abilities\\Spells\\Orc\\LightningBolt\\LightningBoltMissile.mdl",GetUnitX(u),GetUnitY(u),2.5)) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\Bolt\\BoltImpact.mdl",u,"origin")) call KillUnitBJ(u) endif endif endloop if DL<1 then call SetUnitNocontrol((GetUnitUserData((OL))),GetUnitAbilityLevel(OL,'A0M3')==1) call SetUnitOwner(RL,P[$B],true) call UnitRemoveAbilityandBuffBY(OL,'A0M7','B04L') endif endif elseif cL<.33*BL*mH then set BL=BL-1 set DL=320 set x=GetUnitX(OL) set y=GetUnitY(OL) call SetUnitNocontrol((IL),true) call GroupEnumUnitsInRange(G,x,y,600+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,600)then if IsUnitAliveAndEnemyNotAvul(u,OL)then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\Bolt\\BoltImpact.mdl",u,"origin")) call m2v(u,3,'A500','B500',true) call UnitDamageTargetBY(((OL)),((u)),((((.8*GetWidgetLife(u))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop call NewTextTagInTarget_B(OL,"Unfortunately, you met me ! !",18,$9B,$FF,$9B) call SetUnitOwner(RL,P[$C],true) call UnitAddAbilityBY(OL,'A0M7') call cIv(OL) call zlv(125,125,$FF,.5) call PlaySoundOnUnit_BJ((tn),(($7F)*1.),(OL)) call Ltv(LAv("LightningWrath.mdl",x,y,2.5)) call Lqv(LAv("Abilities\\Spells\\Orc\\Purge\\PurgeBuffTarget.mdl",x,y,4),1.5) elseif cL>(.5+.33*BL)*mH then set BL=BL+1 endif if bL then if CL>0 then set CL=CL-1 if CL<1 then set AL=ModifyUnitAdef((IL),60) set u=PickRandomUnitInUnitRange(OL,$5DC) set dL=640 if u==null then call clv(GetUnitX(OL)+GetRandomReal(-$96,$96),GetUnitY(OL)+GetRandomReal(-$96,$96)) else call clv(GetUnitX(u),GetUnitY(u)) set u=null endif call UnitAddAbilityBY(OL,'A0M3') call PauseUnit(OL,false) call UnitAddAbility(OL,'A0M9') call UnitRemoveAbility(OL,'A0M9') call SetUnitPropWindow(OL,0) endif else set dL=dL-1 if ModuloInteger(dL,32)==0 then set x=GetUnitX(OL) set y=GetUnitY(OL) call GroupEnumUnitsInRange(G,x,y,750+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,750)then if IsUnitAliveAndAlly(u,OL)then call UnitCureTaret(OL,u,$3D090) endif endif endloop endif call SetUnitState(OL,UNIT_STATE_MANA,150.*dL/ 640.) if dL<1 then set bL=false set CL=48 call PauseUnit(OL,true) call SetUnitAnimation(OL,"morph alternate") endif endif elseif CL>0 then set CL=CL-1 if CL<1 then call SetUnitNocontrol((IL),DL>0) call DeUnitAdef((IL),AL) call UnitRemoveAbilityandBuffBY(OL,'A0M3','B04K') call PauseUnit(OL,false) call UnitAddAbility(OL,'A0MA') call UnitRemoveAbility(OL,'A0MA') call SetUnitPropWindow(OL,bj_DEGTORAD*GetUnitDefaultPropWindow(OL)) set AL=0 endif else if dL>0 then set dL=dL-1 set m=GetUnitState(OL,UNIT_STATE_MANA)+.046875 else set m=GetUnitState(OL,UNIT_STATE_MANA)-.03125 endif if m>=149.5 then set bL=true set CL=48 call SetUnitNocontrol((IL),true) call NewTextTagInTarget_B(OL,"Natural chant!!.",18,$9B,$FF,$9B) call PauseUnit(OL,true) call SetUnitAnimation(OL,"morph") call SetUnitState(OL,UNIT_STATE_MANA,$96) else call SetUnitState(OL,UNIT_STATE_MANA,m) endif endif else if AL!=0 then call DeUnitAdef((IL),AL) set AL=0 endif call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:80") call KillUnit(RL) call Unit_Cancel_Counter(98,IL) set RL=null endif endfunction function ELe takes nothing returns boolean if not bL then set dL=96 endif if fL==0 then set fL=640+GetRandomInt(-64,64) call clv(GetUnitX(OL),GetUnitY(OL)) endif if(mF)!=OL and GetUnitAbilityLevel(OL,'A0M7')==1 and Ymv((mF),'A0M8','B04M',1)then if nC[(pF_v)]then call zKv((GetPlayerId((GetOwningPlayer((mF))))),55,55,$FF,.27) call zhv((GetPlayerId((GetOwningPlayer((mF))))),50,.27) endif call NewTextTagInTarget_B((mF),"|c0067afebThunder and lightning ("+I2S(R2I(.25*GetDamage()))+")",$A,$FF,$FF,$FF) call UnitDamageTargetBY(((OL)),(((mF))),((((.15*GetDamage())*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) call Ltv(LAv("Abilities\\Spells\\Orc\\LightningBolt\\LightningBoltMissile.mdl",GetUnitX((mF)),GetUnitY((mF)),2.5)) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\Bolt\\BoltImpact.mdl",(mF),"origin")) endif return false endfunction function Eme takes nothing returns nothing local real nZ=GetUnitFlyHeight(OL)-hL local unit u set hL=hL+2. if nZ>0 then call SetUnitFlyHeight(OL,nZ,0) else call NewTextTagInTarget_B(OL,"Let me feel your strength ..",18,$9B,$FF,$9B) call GroupEnumUnitsInRange(G,FL,gL,900+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,FL,gL,900)then if IsUnitAliveAndEnemyNotAvul(u,OL)then call UnitDamageTargetBY(((OL)),((u)),(((($30D4)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call Gjv(u,75,Atan2(GetUnitY(u)-gL,GetUnitX(u)-FL),1,"KnockbackDust.mdx") call m2v(u,1,'A500','B500',true) endif endif endloop call SetUnitFlyHeight(OL,0,0) call m_v(OL,false) call PlaySoundOnUnit_BJ((Sn),(($7F)*1.),(OL)) call Ltv(Lfv(LAv("AncientExplode.mdl",FL,gL,3),0,$9B,0,$FF)) call Ltv(LAv("NewDirtEXNofire.mdx",FL,gL,2.5)) call zHv(90,.5,FL,gL,$3E8) call TimerStart(GetExpiredTimer(),.03125,true,function Ele) endif endfunction function EMe takes nothing returns nothing local integer PVv local integer i local real a local real r set dL=dL-1 call SetUnitVertexColor(OL,125,$CD,125,R2I(255.-200.*dL/ 96.)) if dL>=16 then set r=(dL-16.)/ 80. set i=R2I(3.-2.*r) loop exitwhen i==0 set i=i-1 set a=GetRandomReal(0,Lx) set PVv=CreateBarrageTypeC(FL+($FA+375*r)*Cos(a),gL+($FA+375*r)*Sin(a),GL,OL) set s__barrage_speed[PVv]=2.5 set s__barrage_acceleration[PVv]=3.75+2.5*r call SetBarrageFlightRadian(PVv,.3+.15*r) if GetRandomInt(1,2)==1 then call LMv(s__barrage_model[PVv],"Abilities\\Weapons\\FaerieDragonMissile\\FaerieDragonMissile.mdl") call SetUnitScale(II[(s__barrage_model[PVv])],((3-2*r)*1.),0,0) else call LMv(s__barrage_model[PVv],"Abilities\\Spells\\Other\\Tornado\\Tornado_Target.mdl") call SetUnitScale(II[(s__barrage_model[PVv])],((6-4*r)*1.),0,0) endif call Lfv(s__barrage_model[PVv],105,$FF,105,105) call BOv(PVv) endloop elseif dL<1 then call Lqv(LAv("Abilities\\Spells\\Human\\FlameStrike\\FlameStrikeTarget.mdl",FL,gL,1.5),1.5) call TimerStart(GetExpiredTimer(),.03125,true,function Eme) endif endfunction function Epe takes nothing returns nothing local unit u set dL=96 call NewTextTagInTarget_B(OL,"Who unlocked my seal?! !!",18,$9B,$FF,$9B) call GroupEnumUnitsInRange(G,FL,gL,900+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,FL,gL,900)then if IsUnitAliveAndEnemyNotAvul(u,OL)then call UnitAppBuffByLevel((GetUnitUserData((u))),'A0M1',$D00CB,2) endif endif endloop call PlaySoundAtPoint_BJ((Qn),(($7F)*1.),((FL)*1.),((gL)*1.),0) call Lqv(LAv("Abilities\\Spells\\NightElf\\Tranquility\\Tranquility.mdl",FL,gL,3),3) call TimerStart(GetExpiredTimer(),.03125,true,function EMe) endfunction function EPe takes nothing returns boolean local unit u=GetTriggerUnit() if not NL and UnitHasItemOfType(u,'woms')and IsItemCharges(GetItemOfTypeFromUnit(u,'I04W'),21)then set NL=true set OL=CreateUnit(P[$B],'n030',FL,gL,270) set RL=CreateUnit(P[$B],'e02A',EntireMapMaxX,EntireMapMaxY,0) set IL=(GetUnitUserData((OL))) if UnitAddAbility(OL,'Amrf')then call UnitRemoveAbility(OL,'Amrf') endif call m_v(OL,true) call UnitAddShieldTrig((IL),function ELe) call Ltv(LAv("NatureExplosion.mdl",GetUnitX(u),GetUnitY(u),1.5)) call Ltv(LNv("Abilities\\Spells\\Orc\\FeralSpirit\\feralspirittarget.mdl",FL,gL,GL,3)) call SetUnitFlyHeight(OL,GL,0) call SetUnitVertexColor(OL,125,$CD,125,55) call RemoveItemG(GetItemOfTypeFromUnit(u,'woms')) call RemoveItemByCharges(GetItemOfTypeFromUnit(u,'I04W'),21) call TimerStart((NewTimer(0)),1,false,function Epe) call Unit_App_Counter(99,IL) endif set u=null return false endfunction function Eqe takes nothing returns nothing call RegisterEnterRect($6840,$301C,$6900,$3480,function EPe) endfunction function EQe takes integer NNv returns boolean if JL[NNv]!=null then call UnitRemoveAbilityandBuffBY((Je[(NNv)]),'A0JD','B03F') call DeUnitAdef((NNv),HL[NNv]) call Unit_Cancel_Counter(100,(NNv)) set JL[NNv]=null return true endif return false endfunction function Ese takes nothing returns nothing call EQe(((alloc__hpv(GetHandleId((GetExpiredTimer())))))) endfunction function ESe takes unit u returns boolean return EQe(((GetUnitUserData((u))))) endfunction function Ete takes unit u returns nothing local integer NNv=(GetUnitUserData((u))) if JL[NNv]==null then set JL[NNv]=NewTimer(NNv) set HL[NNv]=ModifyUnitAdef((NNv),-$A) set jL[NNv]=1 call UnitAddAbilityBY((Je[(NNv)]),'A0JD') call Unit_App_Counter(101,(NNv)) else set jL[NNv]=jL[NNv]+1 call NewTextTagInTarget_B(u,"+"+I2S($A*jL[NNv])+"% Damage reduction",8,$80,$80,$C0) call UnitAdefChange((NNv),HL[NNv],-$A*jL[NNv]) endif call TimerStart(JL[NNv],30,false,function Ese) endfunction function ETe takes nothing returns nothing local integer NNv=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:81") call UnitRemoveAbilityandBuffBY((Je[(NNv)]),'A0JA','B03D') call ModifyUnitHpRegen((NNv),400*kL[NNv]) call ModifyUnitArmor((NNv),300*kL[NNv]) call Unit_Cancel_Counter(102,(NNv)) set KL[NNv]=null endfunction function Eue takes unit u,integer mkv returns nothing local integer NNv=(GetUnitUserData((u))) if KL[NNv]==null then set KL[NNv]=NewTimer(NNv) set kL[NNv]=mkv call ModifyUnitHpRegen((NNv),-400*kL[NNv]) call ModifyUnitArmor((NNv),-300*kL[NNv]) call UnitAddAbilityBY((Je[(NNv)]),'A0JA') call Unit_App_Counter(103,(NNv)) elseif mkv>kL[NNv]then call ModifyUnitHpRegen((NNv),-400*(mkv-kL[NNv])) call ModifyUnitArmor((NNv),-300*(mkv-kL[NNv])) set kL[NNv]=mkv endif call TimerStart(KL[NNv],1,false,function ETe) endfunction function EUe takes unit u returns nothing if IsUnitInGroup(u,mL)then call GroupRemoveUnit(mL,u) call ModifyUnitHP((GetUnitUserData((u))),UL*uL[(GetUnitUserData((u)))]) set uL[(GetUnitUserData((u)))]=0 endif endfunction function Ewe takes unit u,integer c returns nothing if GetUnitState(u,UNIT_STATE_MAX_LIFE)575 then set QL=0 set i=6 call GroupEnumUnitsInRect(G,TL[0],null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if UnitAlive(u)and GetUnitTypeId(u)=='h00W' then set i=i-1 endif endloop if i>2 then set i=2 endif loop exitwhen i==0 set i=i-1 call cXv(GetRandomReal(GetRectMinX(TL[i])+50,GetRectMaxX(TL[i])-50),GetRandomReal(GetRectMinY(TL[i])+50,GetRectMaxY(TL[i])-50)) endloop endif if PL>$9F then set PL=PL+1 if PL==320 then call thv("|c008080c00%",GetUnitX(LL),GetUnitY(LL),$96,.075,.05,bj_PI/ 2,2,2.5) call SetUnitNocontrol((lL),false) set PL=0 endif elseif(Control_use[((GetUnitUserData((LL))))])or GetUnitAbilityLevel(LL,'BUdd')>0 or GetUnitAbilityLevel(LL,'B01N')>0 or GetUnitAbilityLevel(LL,'B06P')>0 then set PL=PL+1 set qL=32 if ModuloInteger(PL,32)==0 then if PL==$A0 then call SetUnitNocontrol((lL),true) endif call thv("|c008080c0"+I2S(R2I(100.*PL/ 160.))+"%",GetUnitX(LL),GetUnitY(LL),$96,.075,.05,bj_PI/ 2,2,2.5) endif elseif PL>0 then set qL=qL-1 if qL<1 then set PL=0 endif endif if ModuloInteger(pL,4)==0 then set x=GetRectCenterX(TL[0]) set y=GetRectCenterY(TL[0]) set r=(GetRectMaxX(TL[0])-GetRectMinX(TL[0]))/ 2 call GroupEnumUnitsInRange(G,x,y,r,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitAliveAndEnemy(u,LL)and not IsUnitInRangeXY(u,x,y,$640)then call cRv(u) endif endloop if ModuloInteger(pL,16)==0 then set x=GetUnitX(LL) set y=GetUnitY(LL) call GroupEnumUnitsInRect(G,TL[0],null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if GetUnitAbilityLevel(u,'Avul')==0 and IsUnitAliveAndEnemy(u,LL)then call Eue(u,ML) endif endloop if pL==$E0 then set pL=0 call GroupEnumUnitsInRange(G,x,y,$3E8+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$3E8)then if GetUnitAbilityLevel(u,'Avul')==0 and GetUnitAbilityLevel(u,'B00W')==0 and IsUnitAliveAndEnemy(u,LL)then call Ete(u) endif endif endloop call Ltv(LAv("DarkWave.mdl",x,y,7.5)) endif endif endif else call FinishingGroup(mL) loop set u=FirstOfGroup(mL) exitwhen u==null call GroupRemoveUnit(mL,u) call ModifyUnitHP((GetUnitUserData((u))),UL*uL[(GetUnitUserData((u)))]) endloop endif set u=null endfunction function Eye takes nothing returns boolean local unit u local real x local real y if sL>0 and GetUnitState(LL,UNIT_STATE_LIFE)-GetDamage()<.25*sL*SL then set sL=sL-1 set x=GetUnitX(LL) set y=GetUnitY(LL) call GroupEnumUnitsInRange(G,x,y,600+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,600)then if IsUnitOfPlayerNotseckill(u)then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",u,"origin")) call KillUnitBJ(u) endif endif endloop call NewTextTagInTarget_B(LL,"This is strength! Overwhelming power!!",18,$80,0,$CD) call Ltv(LAv("ShadowSlam.mdx",x,y,3.5)) call Ltv(LAv("DarkPillar.mdl",x,y,5)) if sL==1 then set ML=2 endif endif return false endfunction function SkeletalKing_initialize takes nothing returns nothing local integer i=3 loop set i=i-1 call RemoveDestructable(tL[i]) set tL[i]=null exitwhen i==0 endloop set lL=(GetUnitUserData((LL))) set mL=NewGroup() set SL=GetUnitState(LL,UNIT_STATE_MAX_LIFE) call KillUnit(gg_unit_h00N_0558) call SetUnitInvulnerable(LL,false) call PauseUnit(LL,false) call IssuePointOrderById(LL,$D000F,-$C80,-$3C00) call TimerStart(GetExpiredTimer(),.03125,true,function EWe) call Lqv(LAv("LightStrikeArray.mdx",-$C80,-$3C00,4),1.27) call Ltv(LAv("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",-$C80,-$3C00,5)) call UnitAddBeDamagerTrig((lL),function Eye) call Unit_App_Counter(105,lL) endfunction function EYe takes nothing returns nothing local integer i=4 set LL=gg_unit_n02V_0560 set tL[0]=gg_dest_B006_19850 set TL[0]=gg_rct_WLZS3_______________001 set TL[1]=gg_rct_WLZS4_______________001 call SetUnitInvulnerable(LL,true) call PauseUnit(LL,true) endfunction function Eze takes integer NNv returns nothing local integer EZe=R2I(4*ZL[NNv]) if WL[NNv]=EZe call SaveInteger(BYHT,wL[NNv],WL[NNv],LNv("OrbOfCorruption.mdl",GetUnitX(cSv(NNv)),GetUnitY(cSv(NNv)),100,2.5)) set WL[NNv]=WL[NNv]+1 endloop elseif WL[NNv]>EZe then loop exitwhen WL[NNv]<=EZe set WL[NNv]=WL[NNv]-1 call Ltv((LoadInteger(BYHT,wL[NNv],WL[NNv]))) endloop endif endfunction function E_e takes integer NNv,real eoe returns nothing local unit u local real x local real y if yL[NNv]==0 then set ZL[NNv]=MinR(ZL[NNv]+eoe,1.) if ZL[NNv]>=1 then call SetUnitNocontrol((NNv),true) set yL[NNv]=320 set x=GetUnitX((MF)) set y=GetUnitY((MF)) call GroupEnumUnitsInRange(G,x,y,600+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,600)then if IsUnitOfPlayerNotseckill(u)then call KillUnitBJ(u) endif endif endloop call UnitAddAbilityBY(cSv(NNv),'A0OV') call UnitCureTaret(cSv(NNv),cSv(NNv),.25*GetUnitMaxLifeById((NNv))) call zHv(50,1,x,y,$4B0) endif endif endfunction function E0e takes integer NNv returns unit return(Je[(NNv)]) endfunction function E1e takes integer NNv returns nothing if rm[NNv]then set im[am[NNv]]=im[NNv] set am[im[NNv]]=am[NNv] set rm[NNv]=false if am[(0)]==0 then call frv(nm) endif call Unit_Cancel_Counter(106,(NNv)) endif endfunction function E2e takes nothing returns boolean local integer NNv=am[(0)] local integer fx local integer i local integer cR local real x local real y local real a loop exitwhen NNv==0 if UnitAlive((Je[((NNv))]))then set zL[NNv]=ModuloInteger(zL[NNv]+1,32) set x=GetUnitX((Je[((NNv))])) set y=GetUnitY((Je[((NNv))])) if yL[NNv]>0 then set yL[NNv]=yL[NNv]-1 if yL[NNv]==0 then call SetUnitNocontrol((NNv),false) set ZL[NNv]=0 call UnitRemoveAbilityandBuffBY((Je[((NNv))]),'A0OV','B05G') endif else set ZL[NNv]=MaxR(ZL[NNv]-1./ 1600.,0) endif if YL[NNv]>0 then set YL[NNv]=YL[NNv]-1 if YL[NNv]==16 then call PauseUnit((Je[((NNv))]),false) call SetUnitPathing((Je[((NNv))]),true) call SetUnitTimeScale((Je[((NNv))]),1) call SetUnitPosition((Je[((NNv))]),em[NNv],xm[NNv]) call SetUnitFacingTimed((Je[((NNv))]),vm[NNv],0) call SetUnitVertexColor((Je[((NNv))]),35,35,45,$FF) endif endif call Eze(NNv) set i=WL[NNv] loop exitwhen i==0 set i=i-1 set a=(I2R(i)/ WL[NNv]+.03125*zL[NNv])*Lx set fx=LoadInteger(BYHT,wL[NNv],i) call LKv(fx,x+om*Cos(a)) call Llv(fx,y+om*Sin(a)) call SetUnitFacing(II[(fx)],((a+.25*Lx)*1.)*bj_RADTODEG) call Lfv(fx,R2I($FF*ZL[NNv]),0,0,$FF) endloop else loop exitwhen WL[NNv]==0 set WL[NNv]=WL[NNv]-1 call Ltv((LoadInteger(BYHT,wL[NNv],WL[NNv]))) endloop call free(wL[NNv]) call E1e(NNv) endif set NNv=am[NNv] endloop return false endfunction function E3e takes integer NNv returns integer if not rm[NNv]then if am[(0)]==0 then if nm==0 then set nm=fxv(function E2e) endif call fov(nm) endif set am[NNv]=am[(0)] set im[am[(0)]]=NNv set am[(0)]=NNv set im[NNv]=0 set rm[NNv]=true call Unit_App_Counter(107,(NNv)) endif return NNv endfunction function E4e takes unit u returns integer return E3e((GetUnitUserData((u)))) endfunction function E5e takes nothing returns boolean local integer NNv=(pF_v) if Vm!=(MF)then call ModifyUnitAttack((NNv),-$9C4*Em) call ModifyUnitAttackSpeed((NNv),-5*Em) set Vm=(MF) set Em=0 elseif Em<20 then set Em=Em+1 call ModifyUnitAttack((NNv),$9C4) call ModifyUnitAttackSpeed((NNv),5) endif call DestroyEffect(AddSpecialEffectTarget("VampiricAuraTarget.mdl",(Je[((NNv))]),"origin")) call UnitCureTaret((mF),(mF),(DAK_AMOUNT[HF])) return false endfunction function E6e takes nothing returns nothing local integer NNv=(pF) local real E7e=.15*GetUnitMaxLifeById((NNv)) local real x local real y local real a local unit u if yL[NNv]>0 then if yL[NNv]<288 and YL[NNv]==0 and IsUnitInRange((mF),(MF),$5DC)then set YL[NNv]=48 set em[NNv]=GetUnitX((Je[((NNv))])) set xm[NNv]=GetUnitY((Je[((NNv))])) set vm[NNv]=GetUnitFacing((Je[((NNv))])) set x=GetUnitX((mF)) set y=GetUnitY((mF)) set a=Atan2(xm[NNv]-y,em[NNv]-x) call GroupEnumUnitsInRange(G,x,y,300+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,300)then if IsUnitAliveAndEnemy(u,(Je[((NNv))]))then call UnitDamageTargetBY((((Je[((NNv))]))),((u)),((((75000)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) call Gjv(u,275,GetRandomReal(0,Lx),.75,"KnockbackDust.mdx") call zhv((GetPlayerId((GetOwningPlayer((mF))))),50,.75) call zKv((GetPlayerId((GetOwningPlayer((mF))))),$FF,55,55,.75) endif endif endloop call Ltv(Lfv(LAv("Objects\\Spawnmodels\\Undead\\UDeathSmall\\UDeathSmall.mdl",x,y,2.5),$FF,55,55,125)) call Ltv(Lfv(LIv("Units\\Undead\\Abomination\\AbominationExplosion.mdl",x,y,50,1.5,a,30),$9B,0,25,$FF)) call SetUnitVertexColor((Je[((NNv))]),0,0,0,$9B) call PauseUnit((Je[((NNv))]),true) call SetUnitPathing((Je[((NNv))]),false) call SetUnitX((Je[((NNv))]),x-$E0*Cos(a)) call SetUnitY((Je[((NNv))]),y-$E0*Sin(a)) call SetUnitFacingTimed((Je[((NNv))]),bj_RADTODEG*a,0) call SetUnitTimeScale((Je[((NNv))]),2) call SetUnitAnimation((Je[((NNv))]),"attack") call QueueUnitAnimation((Je[((NNv))]),"stand") endif call DamageMinus(.8*GetDamage()) elseif GetUnitAbilityLevel((Je[((NNv))]),'Bfrz')==0 then call E_e(NNv,GetDamage()/ E7e) else call E_e(NNv,.5*GetDamage()/ E7e) endif endfunction function E8e takes unit u returns nothing local integer NNv=(E3e((GetUnitUserData(((u)))))) set wL[NNv]=malloc() set zL[NNv]=0 set yL[NNv]=0 set YL[NNv]=0 set ZL[NNv]=0 call UnitAddPAttackTrig((NNv),function E5e) call UnitAddBeDamagerTrig((NNv),function E6e) endfunction function NPCAI takes unit csv returns nothing local integer id local integer klv local integer i local real l if IsUnitType(csv,UNIT_TYPE_GIANT)then set klv=GetUnitCurrentOrder(csv) if klv==0 or klv==$D0006 or($D000E25 then set id=GetUnitTypeId(csv) set l=GetWidgetLife(csv)/ GetUnitMaxLifeById((GetUnitUserData((csv)))) if id=='h00T' then if i>90 and l<=.96 then call IssueImmediateOrderById(csv,$D0081) elseif i>80 and l<=.92 then call IssueTargetOrderById(csv,$D0097,Xm) elseif i>70 then call IssuePointOrderById(csv,$D009D,GetUnitX(Xm),GetUnitY(Xm)) endif elseif id=='n01J' then if i>90 and l<=.96 then call IssueImmediateOrderById(csv,$D0081) elseif i>80 and l<=.8 then call IssueImmediateOrderById(csv,$D009F) elseif i>70 and l<=.5 then call IssueImmediateOrderById(csv,$D0084) endif elseif id=='n022' then if i>95 then call IssueImmediateOrderById(csv,$D0080) elseif i>90 and l<=.96 then call IssueImmediateOrderById(csv,$D009F) elseif i>80 and l<=.92 then call IssueTargetOrderById(csv,$D007F,Xm) endif elseif id=='h00F' or id=='h00U' then if i>90 and l<=.96 then call IssueTargetOrderById(csv,$D007F,Xm) elseif i>85 then call IssuePointOrderById(csv,$D009D,GetUnitX(Xm),GetUnitY(Xm)) elseif i>80 and l<=.7 then call IssueImmediateOrderById(csv,$D009F) elseif id=='h00F' and i>75 and l<=.65 then call IssueImmediateOrderById(csv,$D00D4) endif elseif id=='h00V' then if i>95 then call IssueImmediateOrderById(csv,$D009F) endif elseif id=='n01K' then if i>90 then call IssueImmediateOrderById(csv,$D0080) elseif i>85 and l<=.96 then call IssuePointOrderById(csv,$D009D,GetUnitX(Xm),GetUnitY(Xm)) elseif i>80 and l<=.92 then call IssueImmediateOrderById(csv,$D009F) elseif i>70 and l<=.5 then call IssueImmediateOrderById(csv,$D0076) endif elseif id=='n01W' then if i>90 then call IssuePointOrderById(csv,$D009D,GetUnitX(Xm),GetUnitY(Xm)) elseif i>85 and l<=.96 then call IssueImmediateOrderById(csv,$D009F) endif elseif id=='h00Y' then if i>96 then call IssuePointOrderById(csv,$D009D,GetUnitX(Xm),GetUnitY(Xm)) elseif i>92 and l<=.96 then call IssueImmediateOrderById(csv,$D009F) endif elseif id=='h01B' then if i>95 then call IssueImmediateOrderById(csv,$D009F) elseif i>90 and l<=.96 then call IssuePointOrderById(csv,$D0079,GetUnitX(Xm),GetUnitY(Xm)) endif elseif id=='n01N' then if i>90 then call IssueTargetOrderById(csv,$D0097,Xm) elseif i>85 and l<=.96 then call IssuePointOrderById(csv,$D009D,GetUnitX(Xm),GetUnitY(Xm)) elseif i>80 and l<=.92 then call IssueImmediateOrderById(csv,$D009F) elseif i>70 and l<=.88 then call IssueImmediateOrderById(csv,$D0076) endif elseif id=='n01O' then if i>90 then call IssueTargetOrderById(csv,$D007F,Xm) elseif i>85 and l<=.96 then call IssuePointOrderById(csv,$D009D,GetUnitX(Xm),GetUnitY(Xm)) elseif i>80 and l<=.92 then call IssueImmediateOrderById(csv,$D009F) elseif i>70 and l<=.88 then call IssueImmediateOrderById(csv,$D0084) endif elseif id=='n023' then if i>90 and l<=.96 then call IssueImmediateOrderById(csv,$D0081) elseif i>85 then call IssueTargetOrderById(csv,$D0102,Xm) elseif i>80 and l<=.96 then call IssueImmediateOrderById(csv,$D009F) elseif i>75 then call IssueTargetOrderById(csv,$D0101,csv) endif elseif id=='n01Y' then if i>95 then call IssueImmediateOrderById(csv,$D0048) elseif i>90 and l<=.9 then set Xm=PickRandomUnitInUnitRange(csv,850) if Xm!=null then call IssuePointOrderById(csv,$D0270,GetUnitX(Xm),GetUnitY(Xm)) endif elseif i>30 and l<=.6 then call IssueImmediateOrderById(csv,$D009F) endif elseif id=='h01F' then if i>90 then call IssuePointOrderById(csv,$D009D,GetUnitX(Xm),GetUnitY(Xm)) elseif i>85 and l<=.96 then call IssueTargetOrderById(csv,$D008A,PickRandomUnitInUnitRange(csv,750)) elseif i>80 and l<=.88 then call IssueImmediateOrderById(csv,$D0081) endif elseif id=='h010' then if GetUnitState(csv,UNIT_STATE_MANA)>=100 then call IssueImmediateOrderById(csv,$D00D8) elseif i>90 then set Xm=PickRandomUnitInUnitRange(csv,750) if Xm!=null then call IssuePointOrderById(csv,$D024B,GetUnitX(Xm),GetUnitY(Xm)) endif elseif i>85 and l<=.9 then call IssueImmediateOrderById(csv,$D009F) endif elseif id=='n02M' then if i>85 and l<=.95 then set Xm=PickRandomUnitInUnitRange(csv,800) if Xm!=null then call IssuePointOrderById(csv,$D024B,GetUnitX(Xm),GetUnitY(Xm)) endif elseif i>75 and l<=.9 then call IssueImmediateOrderById(csv,$D009F) elseif i>65 and l<=.85 then call IssueImmediateOrderById(csv,$D0081) elseif i>55 and l<=.8 then call IssueImmediateOrderById(csv,$D00D8) endif elseif id=='orai' then if GetUnitAbilityLevel(csv,'Brpm')==0 and i>94 then if i>97 then call IssueTargetOrderById(csv,$D0097,Xm) elseif i>94 and l<=.9 then call IssuePointOrderById(csv,$D009D,GetUnitX(Xm),GetUnitY(Xm)) endif elseif i<95 and i>92 then call IssueImmediateOrderById(csv,$D0084) endif elseif id=='oshm' then if i>97 then call IssuePointOrderById(csv,$D009D,GetUnitX(Xm),GetUnitY(Xm)) elseif i>94 and l<=.7 then call IssueImmediateOrderById(csv,$D0048) endif elseif id=='hmpr' then if i>97 and l<=.96 then call IssuePointOrderById(csv,$D009D,GetUnitX(Xm),GetUnitY(Xm)) elseif i>94 and l<=.88 then call IssueImmediateOrderById(csv,$D00D8) elseif i>91 and wK>2 then call IssueTargetOrderById(csv,$D0097,PickRandomVisibleHeroInRange2(csv,$5DC)) endif elseif id=='h014' then if i>95 then call IssuePointOrderById(csv,$D024B,GetUnitX(Xm),GetUnitY(Xm)) elseif i>90 and l<=.9 then call IssueImmediateOrderById(csv,$D00D8) endif elseif id=='n02L' then if i>95 then call IssuePointOrderById(csv,$D024B,GetUnitX(Xm),GetUnitY(Xm)) elseif i>90 and l<=.9 then call IssueImmediateOrderById(csv,$D0084) elseif i>86 and l<=.85 then call IssueImmediateOrderById(csv,$D00D8) elseif i>83 and l<=.65 then call IssueImmediateOrderById(csv,$D009F) endif elseif id=='n02V' then if i>90 then set Xm=PickRandomUnitInUnitRange(csv,$3E8) if Xm!=null then call IssuePointOrderById(csv,$D024B,GetUnitX(Xm),GetUnitY(Xm)) endif elseif i>80 and l<=.92 then set Xm=PickRandomUnitInUnitRange(csv,$4B0) if Xm!=null then call IssuePointOrderById(csv,$D009D,GetUnitX(Xm),GetUnitY(Xm)) endif elseif i>70 and l<=.88 then call IssueImmediateOrderById(csv,$D009F) elseif i>60 and l<=.6 then call IssueImmediateOrderById(csv,$D0081) endif elseif id=='n02Z' then if i>90 and l<=.95 then set Xm=PickRandomUnitInUnitRange(csv,900) if Xm!=null then call IssueTargetOrderById(csv,$D02BC,Xm) endif elseif i>85 and l<=.8 then call IssueImmediateOrderById(csv,$D0084) endif elseif id=='n030' then if i>90 and l<=.94 then call IssueImmediateOrderById(csv,$D0081) elseif i>80 and l<=.9 then call IssueTargetOrderById(csv,$D022F,PickRandomVisibleHeroInRange2(csv,900)) elseif i>70 and l<=.86 then call IssueImmediateOrderById(csv,$D009F) endif elseif id=='n036' then if i>90 and l<=.96 then set Xm=PickRandomUnitInUnitRange(csv,$96) if Xm!=null and not(PB[((GetUnitUserData((Xm))))])then call IssueTargetOrderById(csv,$D02BC,Xm) endif endif elseif id=='n037' then if i>85 and l<=.8 then call IssueImmediateOrderById(csv,$D0048) endif elseif id=='n038' then if i>90 and l<=.95 then call IssueImmediateOrderById(csv,$D009F) elseif i>80 and l<=.85 then set Xm=PickRandomUnitInUnitRange(csv,800) if Xm!=null then call IssuePointOrderById(csv,$D009D,GetUnitX(Xm),GetUnitY(Xm)) endif endif elseif id=='h01K' then if i>90 and l<=.9 then call IssueTargetOrderById(csv,$D0097,PickRandomUnitInUnitRange(csv,900)) elseif i>80 and l<=.8 then call IssueImmediateOrderById(csv,$D009F) endif elseif id=='n033' then if i>90 and l<=.85 then call IssueImmediateOrderById(csv,$D0080) elseif i>80 and l<=.7 then call IssueImmediateOrderById(csv,$D009F) endif elseif id=='n02Y' then if i>=90 and l<.95 then set Xm=PickRandomUnitInUnitRange(csv,$4B0) if Xm!=null then call IssuePointOrderById(csv,$D009D,GetUnitX(Xm),GetUnitY(Xm)) endif elseif i>=85 and l<.9 then set Xm=PickRandomVisibleHeroInRange2(csv,900) if Xm!=null then call IssueTargetOrderById(csv,$D0103,Xm) endif elseif i>=75 and l<.85 then call IssueImmediateOrderById(csv,$D00D8) elseif i>=65 and l<.8 then set Xm=PickRandomVisibleHeroInRange2(csv,$4B0) if Xm!=null then call IssuePointOrderById(csv,$D0270,GetUnitX(Xm),GetUnitY(Xm)) endif endif elseif id=='n01Q' then if i>=90 and l<.95 then set Xm=PickRandomUnitInUnitRange(csv,$4B0) if Xm!=null then call IssuePointOrderById(csv,$D009D,GetUnitX(Xm),GetUnitY(Xm)) endif endif endif elseif IsUnitVisible(Xm,GetOwningPlayer(csv))then call IssueImmediateOrderById(csv,$D00A0) endif endif endif endfunction function Xve takes nothing returns boolean call Auxiliary_TargetOrder(('ACam'),null,1,$D00DA,GetTriggerUnit()) return false endfunction function Xee takes nothing returns nothing call RegisterSpellEffectEvent('A0LQ',function Xve) call RegisterSpellEffectEvent('A0LX',function Xve) call RegisterSpellEffectEvent('A0LY',function Xve) endfunction function Xxe takes nothing returns integer return D9v(Nm) endfunction function Xoe takes integer NNv returns nothing call fvv(NNv) endfunction function Xre takes nothing returns boolean local integer NNv=J[Nm] local unit u local real x local real y local real z local real dX local real dY local real p8v loop exitwhen 0==NNv if(GetUnitFlyHeight(II[(Rm[NNv])]))=Am[NNv]then if(IsUnitType(((Je[(Om[NNv])])),UNIT_TYPE_GIANT))then call SetUnitScale(II[(Rm[NNv])],((1.25)*1.),0,0) else call SetUnitScale(II[(Rm[NNv])],((.5)*1.),0,0) endif call LMv(Rm[NNv],"Abilities\\Spells\\Undead\\DarkSummoning\\DarkSummonMissile.mdl") call Ltv(LIv("Abilities\\Spells\\Undead\\Possession\\PossessionMissile.mdl",(GetUnitX(II[(Rm[NNv])])),(GetUnitY(II[(Rm[NNv])])),z,1.5,0,90)) endif else set x=(GetUnitX(II[(Rm[NNv])])) set y=(GetUnitY(II[(Rm[NNv])])) set dX=GetUnitX((Je[(Om[NNv])]))-x set dY=GetUnitY((Je[(Om[NNv])]))-y if(IsUnitType(((Je[(Om[NNv])])),UNIT_TYPE_GIANT))then call GroupEnumUnitsInRange(G,x,y,96+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,96)then exitwhen GetUnitAbilityLevel(u,'Avul')==0 and IsUnitAliveAndEnemy(u,(Je[(Om[NNv])])) endif endloop else call GroupEnumUnitsInRange(G,x,y,64+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,64)then exitwhen nC[(GetUnitUserData((u)))]and IsUnitAliveAndAlly(u,(Je[(Om[NNv])])) endif endloop endif if dX*dX+dY*dY<=$510 or u!=null then if u==null then call SetUnitState((Je[(Om[NNv])]),UNIT_STATE_MANA,GetUnitState((Je[(Om[NNv])]),UNIT_STATE_MANA)+2.5) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\Possession\\PossessionMissile.mdl",(Je[(Om[NNv])]),"chest")) if GetUnitTypeId((Je[(Om[NNv])]))=='h010' then call UnitCureTaret((Je[(Om[NNv])]),(Je[(Om[NNv])]),$186A0) elseif GetUnitTypeId((Je[(Om[NNv])]))=='n02M' then call UnitCureTaret((Je[(Om[NNv])]),(Je[(Om[NNv])]),$61A80) elseif GetUnitTypeId((Je[(Om[NNv])]))=='n030' or GetUnitTypeId((Je[(Om[NNv])]))=='n032' then call UnitCureTaret((Je[(Om[NNv])]),(Je[(Om[NNv])]),$AAE60) elseif GetUnitState((Je[(Om[NNv])]),UNIT_STATE_MANA)>=100 then call SetUnitState((Je[(Om[NNv])]),UNIT_STATE_MANA,0) call PlaySoundOnUnit_BJ((Qa),((100)*1.),((Je[(Om[NNv])]))) call NewTextTagInTarget_A((Je[(Om[NNv])]),"All over to enlarge(26368) ",$9B,$FF,$9B) call Ltv(Lfv(LAv("AncientExplode.mdl",GetUnitX((Je[(Om[NNv])])),GetUnitY((Je[(Om[NNv])])),1.25),55,55,$FF,$FF)) call zHv(40,.5,GetUnitX((Je[(Om[NNv])])),GetUnitY((Je[(Om[NNv])])),600) endif else if GetUnitTypeId((Je[(Om[NNv])]))=='h010' then call UnitDamageTargetBY((((Je[(Om[NNv])]))),((u)),(((($BB8)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") elseif GetUnitTypeId((Je[(Om[NNv])]))=='n02M' then call UnitDamageTargetBY((((Je[(Om[NNv])]))),((u)),((((7500)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") elseif GetUnitTypeId((Je[(Om[NNv])]))=='n030' or GetUnitTypeId((Je[(Om[NNv])]))=='n032' then call UnitAppBuff((GetUnitUserData((u))),'A0M1',$D00CB) call UnitDamageTargetBY((((Je[(Om[NNv])]))),((u)),(((($2710)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") else call UnitCureTaret(null,u,$A) endif call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\Possession\\PossessionMissile.mdl",u,"chest")) endif call Ltv(Rm[NNv]) call fvv((NNv)) else if(IsUnitType(((Je[(Om[NNv])])),UNIT_TYPE_GIANT))then set Im[NNv]=Im[NNv]+.05 else set Im[NNv]=Im[NNv]+.025 endif set p8v=Atan2(dY,dX) call LKv(Rm[NNv],x+Im[NNv]*Cos(p8v)) call Llv(Rm[NNv],y+Im[NNv]*Sin(p8v)) call SetUnitFacing(II[(Rm[NNv])],((p8v)*1.)*bj_RADTODEG) endif endif set NNv=K[NNv] endloop set u=null return false endfunction function Xie takes nothing returns nothing set Nm=fxv(function Xre) endfunction function Xae takes integer c,real a returns nothing local integer NNv=(D9v(Nm)) local real pwv if(IsUnitType(((Je[(c)])),UNIT_TYPE_GIANT))then set pwv=GetRandomReal(750,900) set Im[NNv]=6 set Am[NNv]=$C8 else set pwv=GetRandomReal(300,450) set Im[NNv]=4 set Am[NNv]=75 endif set Om[NNv]=c set Rm[NNv]=Lnv(GetUnitX((Je[(c)]))+pwv*Cos(a),GetUnitY((Je[(c)]))+pwv*Sin(a),0) call LMv(Rm[NNv],"Abilities\\Weapons\\SpiritOfVengeanceMissile\\SpiritOfVengeanceMissile.mdl") if(IsUnitType(((Je[(c)])),UNIT_TYPE_GIANT))then call SetUnitScale(II[(Rm[NNv])],((5)*1.),0,0) else call SetUnitScale(II[(Rm[NNv])],((2)*1.),0,0) endif call Lfv(Rm[NNv],$FF,$FF,$9B,$9B) call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\DarkRitual\\DarkRitualTarget.mdl",(GetUnitX(II[(Rm[NNv])])),(GetUnitY(II[(Rm[NNv])])))) endfunction function Xne takes nothing returns nothing local integer NNv=(alloc__hpv(GetHandleId((GetExpiredTimer())))) set Bm[NNv]=Bm[NNv]-1 call Xae(NNv,Bm[NNv]*Lx/ bm[NNv]+GetRandomReal(-bj_PI/ bm[NNv],bj_PI/ bm[NNv])) if Bm[NNv]>0 then call TimerStart(GetExpiredTimer(),.075+.00625*Bm[NNv],false,function Xne) else call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:83") call Unit_Cancel_Counter(108,(NNv)) endif endfunction function XVe takes nothing returns boolean local integer NNv=(GetUnitUserData((GetTriggerUnit()))) local real x=GetUnitX((Je[(NNv)])) local real y=GetUnitY((Je[(NNv)])) local unit u if(IsUnitType(((Je[(NNv)])),UNIT_TYPE_GIANT))then set bm[NNv]=6 call GroupEnumUnitsInRange(G,x,y,$3E8+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$3E8)then if IsUnitType(u,UNIT_TYPE_HERO)then set bm[NNv]=bm[NNv]+2 exitwhen bm[NNv]>=16 endif endif endloop call SetUnitState((Je[(NNv)]),UNIT_STATE_MANA,GetUnitState((Je[(NNv)]),UNIT_STATE_MANA)+25) set u=null else set bm[NNv]=8 endif call TimerStart(NewTimer(NNv),1./ bm[NNv],false,function Xne) call Unit_App_Counter(109,(NNv)) set Bm[NNv]=bm[NNv] return false endfunction function XEe takes nothing returns nothing call RegisterSpellEffectEvent('A07W',function XVe) call RegisterSpellEffectEvent('A0L2',function XVe) endfunction function XXe takes nothing returns integer return D9v(Hm) endfunction function XOe takes integer NNv returns nothing call fvv(NNv) endfunction function XRe takes nothing returns boolean local integer NNv=J[Hm] local unit u loop exitwhen 0==NNv set Dm[NNv]=Dm[NNv]-1 if ModuloInteger(Dm[NNv],3)==0 then set fm[NNv]=fm[NNv]+gm[NNv] set Fm[NNv]=Fm[NNv]+Gm[NNv] call GroupEnumUnitsInRange(G,fm[NNv],Fm[NNv],300+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,fm[NNv],Fm[NNv],300)then if not IsUnitInGroup(u,Cm[NNv])and IsUnitAliveAndEnemy(u,(Je[(cm[NNv])]))then call GroupAddUnit(Cm[NNv],u) call UnitDamageTargetBY((((Je[(cm[NNv])]))),((u)),((((hm[NNv])*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop call Ltv(LAv("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",fm[NNv],Fm[NNv],3.25)) endif if Dm[NNv]<1 then call RecycleGroup(Cm[NNv]) call Unit_Cancel_Counter(110,cm[NNv]) call fvv((NNv)) set Cm[NNv]=null endif set NNv=K[NNv] endloop return false endfunction function XIe takes nothing returns nothing set Hm=fxv(function XRe) endfunction function XAe takes nothing returns boolean local integer NNv=(D9v(Hm)) local real a set cm[NNv]=(GetUnitUserData((GetTriggerUnit()))) set Cm[NNv]=NewGroup() set Dm[NNv]=18 set fm[NNv]=GetUnitX((Je[(cm[NNv])])) set Fm[NNv]=GetUnitY((Je[(cm[NNv])])) set a=Atan2(GetSpellTargetY()-Fm[NNv],GetSpellTargetX()-fm[NNv]) set gm[NNv]=$E1*Cos(a) set Gm[NNv]=$E1*Sin(a) if GetUnitTypeId((Je[(cm[NNv])]))=='h00T' then set hm[NNv]=5000 elseif GetUnitTypeId((Je[(cm[NNv])]))=='n038' then set hm[NNv]=$3A98 else set hm[NNv]=$88B8 endif call Unit_App_Counter(111,cm[NNv]) return false endfunction function XNe takes nothing returns boolean call NewTextTagInTarget_A(GetTriggerUnit(),"Dark Impact",0,$FF,0) return false endfunction function Xbe takes nothing returns nothing call RegisterSpellEffectEvent('A0PH',function XAe) call RegisterSpellChannelEvent('A0PH',function XNe) endfunction function XBe takes integer NNv,unit u returns boolean if IsUnitAliveAndEnemyNotAvul(u,s__barrage_atkunit[NNv])then call UnitDamageTargetBY(((s__barrage_atkunit[NNv])),((u)),((((.25*GetUnitMaxLifeById((GetUnitUserData((u))))+7500)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call UnitAppBuff((GetUnitUserData((u))),'Aenr',$D00CB) endif return false endfunction function Xce takes integer NNv returns nothing call RemoveBarrage(NNv) endfunction function XCe takes nothing returns boolean local integer NNv=s__barrage_FR[jm] local unit u if NNv!=jm then call UseBarrage(jm) loop exitwhen NNv==jm if(s__barrage_outside[(NNv)])then call RemoveBarrage((NNv)) elseif(s__barrage_finish[(NNv)])then call RemoveBarrage((NNv)) else if s__barrage_CollisionRange[NNv]!=0 then call GroupEnumUnitsInRange(G,s__barrage_X[NNv],s__barrage_Y[NNv],s__barrage_CollisionRange[NNv]+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,s__barrage_X[NNv],s__barrage_Y[NNv],s__barrage_CollisionRange[NNv])then if not IsUnitInGroup(u,s__barrage_enum_g[NNv])then call GroupAddUnit(s__barrage_enum_g[NNv],u) if u!=s__barrage_target[NNv]and XBe(NNv,u)then set u=null call RemoveBarrage((NNv)) exitwhen true endif endif endif endloop endif endif set NNv=s__barrage_FR[NNv] endloop elseif s__barrage_InOperation[jm]then set s__barrage_InOperation[jm]=false call TriggerEvaluate(Ogv) endif return false endfunction function Xde takes nothing returns nothing call fov(Jm) endfunction function s__MHMissile_stop takes nothing returns nothing call frv(Jm) endfunction function XDe takes nothing returns nothing set Jm=fxv(function XCe) call fov(Jm) endfunction function Xfe takes integer NNv returns nothing call s__barrage_Filling((jm),(NNv)) if not s__barrage_InOperation[jm]then set s__barrage_InOperation[jm]=true call fov(Jm) endif endfunction function XFe takes nothing returns nothing set jm=NewLauncher() set s__barrage_InOperation[jm]=true endfunction function Xge takes unit ckv,real x,real y,real tX,real tY returns nothing local integer i=2 local real dX=tX-x local real dY=tY-y local real a=Atan2(dY,dX) local real pwv=SquareRoot(dX*dX+dY*dY) local real aA local integer NNv if pwv<800 then set pwv=800 endif loop set i=i-1 set aA=a+Lx*i/ 11. set NNv=CreateBarrageTypeD(x,y,75,x+pwv*Cos(aA),y+pwv*Sin(aA),75) set s__barrage_atkunit[NNv]=ckv set s__barrage_speed[NNv]=.03125*250. set s__barrage_acceleration[NNv]=.03125*.03125*1750. call LMv(s__barrage_model[NNv],"OrbOfCorruption.mdl") set s__barrage_CollisionRange[NNv]=275 call SetUnitScale(II[(s__barrage_model[NNv])],((4.75)*1.),0,0) call Xfe(NNv) exitwhen i==-1 endloop call Ltv(LIv("DarkNova.mdl",x+50*Cos(a),y+50*Sin(a),125,1,a,0)) call PlaySoundAtPoint_BJ((rn),(($7F)*1.),((x)*1.),((y)*1.),0) endfunction function XGe takes nothing returns integer return D9v(Lm) endfunction function Xhe takes integer NNv returns nothing call fvv(NNv) endfunction function XHe takes nothing returns boolean local integer NNv=J[Lm] local unit u local integer Xje local real x local real y local real tX local real tY loop exitwhen 0==NNv set lm[NNv]=lm[NNv]-1 if lm[NNv]>64 then set Xje=32 else set Xje=8 endif if ModuloInteger(lm[NNv],Xje)==0 then set x=(GetUnitX(II[(Km[NNv])])) set y=(GetUnitY(II[(Km[NNv])])) call GroupEnumUnitsInRange(G,x,y,325+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,325)then if IsUnitAliveAndEnemy(u,(Je[(km[NNv])]))then if nC[(GetUnitUserData((u)))]then call zhv((GetPlayerId((GetOwningPlayer(u)))),30,.5) call SetUnitAnimation(u,"death") endif call UnitDamageTargetBY((((Je[(km[NNv])]))),((u)),(((($7D0+.1*GetUnitMaxLifeById((GetUnitUserData((u)))))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m2v(u,.5,'A500','B500',true) endif endif endloop if UnitAlive((Je[(km[NNv])]))and IsUnitInRangeXY((Je[(km[NNv])]),x,y,275)and not IsUnitPaused((Je[(km[NNv])]))then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",(Je[(km[NNv])]),"origin")) call UnitCureTaret(null,(Je[(km[NNv])]),.025*GetUnitMaxLifeById((km[NNv]))) endif call Ltv(Lfv(LAv("Abilities\\Spells\\Other\\HowlOfTerror\\HowlCaster.mdl",x,y,2.125),$FF,25,$FF,$FF)) endif if lm[NNv]<1 then if UnitAlive((Je[(km[NNv])]))and not IsUnitPaused((Je[(km[NNv])]))and not IsUnitInRangeXY((Je[(km[NNv])]),x,y,275)then set tX=GetUnitX((Je[(km[NNv])])) set tY=GetUnitY((Je[(km[NNv])])) call SetUnitPosition((Je[(km[NNv])]),x,y) call SetUnitFacingTimed((Je[(km[NNv])]),bj_RADTODEG*Atan2(tY-y,tX-x),0) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportCaster.mdl",(Je[(km[NNv])]),"origin")) call mZv((Je[(km[NNv])]),"attack",1) call NewTextTagInTarget_A((Je[(km[NNv])]),"So many people here! ..",$9B,25,2) call Xge((Je[(km[NNv])]),x,y,tX,tY) endif call Unit_Cancel_Counter(112,km[NNv]) call Lsv(Km[NNv],.5) call fvv((NNv)) endif set NNv=K[NNv] endloop return false endfunction function XJe takes nothing returns nothing set Lm=fxv(function XHe) endfunction function Xke takes nothing returns boolean local integer NNv=(D9v(Lm)) local unit u=GetTriggerUnit() local real x=GetUnitX(u) local real y=GetUnitY(u) set km[NNv]=(GetUnitUserData((u))) if GetRandomInt(1,2)==1 then set u=PickRandomVisibleHeroInRange(u,x,y,$4B0) if u!=null then set x=GetUnitX(u) set y=GetUnitY(u) endif endif set Km[NNv]=Lfv(LAv("Abilities\\Spells\\Undead\\VampiricAura\\VampiricAura.mdl",x,y,4),$FF,25,$FF,$FF) set lm[NNv]=$C0 call NewTextTagInTarget_A((Je[(km[NNv])]),"Come and dance with me!",$9B,25,2) call Ltv(Lfv(LAv("Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl",x,y,5),$FF,25,$FF,$FF)) call Unit_App_Counter(113,km[NNv]) set u=null return false endfunction function XKe takes nothing returns nothing call RegisterSpellEffectEvent('A0PF',function Xke) endfunction function Xle takes integer NNv returns unit return(Je[(NNv)]) endfunction function XLe takes integer NNv returns nothing if Sm[NNv]then set tm[Tm[NNv]]=tm[NNv] set Tm[tm[NNv]]=Tm[NNv] set Sm[NNv]=false if Tm[(0)]==0 then call frv(um) endif call Unit_Cancel_Counter(114,(NNv)) endif endfunction function Xme takes nothing returns boolean local integer NNv=Tm[(0)] local integer cFv local unit u local lightning l local boolean b local integer i local integer iI local real x local real y local real a local real pX local real pY local real r loop exitwhen NNv==0 if UnitAlive((Je[((NNv))]))then set pm[NNv]=pm[NNv]-1 set x=GetUnitX((Je[((NNv))])) set y=GetUnitY((Je[((NNv))])) call LKv(Mm[NNv],x) call Llv(Mm[NNv],y) if pm[NNv]<=384 and pm[NNv]>0 and ModuloInteger(pm[NNv],48)==0 then if Pm[NNv]==0 then set Pm[NNv]=GetRandomInt(1,2) set iI=4+4*Pm[NNv] set r=sm*Pm[NNv]/ 3. else call GroupEnumUnitsInRange(G,x,y,sm+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,sm)then if IsUnitAliveAndEnemyNotAvul(u,(Je[((NNv))]))then if Pm[NNv]==1 then set b=IsUnitInRangeXY(u,x,y,.5*sm) else set b=not IsUnitInRangeXY(u,x,y,.5*sm) endif if b then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",u,"origin")) call m2v(u,3,'A500','B500',true) endif endif endif endloop set iI=4+4*Pm[NNv] set r=Pm[NNv]*sm/ 3. set Pm[NNv]=0 endif set i=iI loop set i=i-1 set a=i*Lx/ iI if Pm[NNv]>0 then call Ltv(LAv("Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl",x+r*Cos(a),y+r*Sin(a),2.5)) else call Ltv(LAv("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",x+r*Cos(a),y+r*Sin(a),5)) endif exitwhen i==0 endloop endif if pm[NNv]<384 then set r=1 set b=true set qm[NNv]=qm[NNv]+Lx/ 576. if ModuloInteger(pm[NNv],16)==0 then call GroupEnumUnitsInRange(G,x,y,$708+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$708)then if IsUnitAliveAndEnemy(u,(Je[((NNv))]))and GetUnitAbilityLevel(u,'A04P')==0 then set b=false if not IsUnitInRangeXY(u,x,y,sm)and IsUnitAliveAndEnemyNotAvul(u,(Je[((NNv))]))then set a=GetRandomReal(0,Lx) if nC[(GetUnitUserData((u)))]then call zKv((GetPlayerId((GetOwningPlayer(u)))),$FF,27,27,.27) endif call SetUnitPosition(u,x+$A0*Cos(a),y+$A0*Sin(a)) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportCaster.mdl",u,"origin")) call m2v(u,1,'A500','B500',true) endif endif endif endloop if b then call SetUnitState((Je[((NNv))]),UNIT_STATE_MANA,GetUnitState((Je[((NNv))]),UNIT_STATE_MANA)+2) endif endif else set r=1.-(pm[NNv]-384.)/ 96. if pm[NNv]==384 then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",(Je[((NNv))]),"origin")) call NewTextTagInTarget_A((Je[((NNv))]),"Wheel of despair !",$9B,25,2) endif endif set i=5 loop set i=i-1 set a=qm[NNv]+i*Lx/ 5. set l=ConvertVersion(LoadInteger(BYHT2,(mm[NNv]),2*i)) set cFv=LoadInteger(BYHT,mm[NNv],2*i+1) set pX=x+sm*r*Cos(a) set pY=y+sm*r*Sin(a) call LKv(cFv,pX) call Llv(cFv,pY) if r==1 then call SetUnitFacing(II[(cFv)],((a+.25*Lx)*1.)*bj_RADTODEG) call p2v(Qm,x,y,pX,pY,64) loop set u=FirstOfGroup(Qm) exitwhen u==null call GroupRemoveUnit(Qm,u) if IsUnitOfPlayerNotseckill(u)then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Demon\\DemonBoltImpact\\DemonBoltImpact.mdl",u,"chest")) call KillUnitBJ(u) endif endloop endif call SetLightningColor(l,1,.5,.5,r) call MoveLightningEx(l,false,x,y,60,pX,pY,60) exitwhen i==0 endloop else set pm[NNv]=0 endif if pm[NNv]<1 then set i=5 loop set i=i-1 call DestroyLightning(ConvertVersion(LoadInteger(BYHT2,(mm[NNv]),2*i))) call Ltv((LoadInteger(BYHT,mm[NNv],2*i+1))) exitwhen i==0 endloop call PauseUnit((Je[((NNv))]),false) call SetUnitTimeScale((Je[((NNv))]),1) call Lsv(Mm[NNv],1) call free(mm[NNv]) call XLe(NNv) endif set NNv=Tm[NNv] endloop return false endfunction function XMe takes integer NNv returns boolean if not Sm[NNv]then if Tm[(0)]==0 then if um==0 then set um=fxv(function Xme) endif call fov(um) endif set Tm[NNv]=Tm[(0)] set tm[Tm[(0)]]=NNv set Tm[(0)]=NNv set tm[NNv]=0 set Sm[NNv]=true call Unit_App_Counter(115,(NNv)) return true endif return false endfunction function Xpe takes unit ckv returns nothing local integer NNv=(GetUnitUserData((ckv))) local integer i=5 local integer cFv local lightning l local unit u local real x local real y local real a if GetWidgetLife(ckv)/ GetUnitMaxLifeById((NNv))<.5 and GetUnitState(ckv,UNIT_STATE_MANA)==50 and XMe(NNv)then if Qm==null then set Qm=CreateGroup() endif set mm[NNv]=malloc() set x=GetUnitX((Je[((NNv))])) set y=GetUnitY((Je[((NNv))])) set Mm[NNv]=Lfv(LAv("Abilities\\Spells\\Undead\\UnholyAura\\UnholyAura.mdl",x,y,$C),$FF,0,0,$CD) set pm[NNv]=480 set Pm[NNv]=0 set qm[NNv]=0 set MB[(NNv)]=true loop set i=i-1 set a=i*Lx/ 5. set l=AddLightningEx("AFOD",false,x,y,60,x,y,60) set cFv=Lnv(x,y,a) call LMv(cFv,"Dark Malice.mdl") call SetUnitScale(II[(cFv)],((3)*1.),0,0) call SetUnitFlyHeight(II[(cFv)],((100)*1.),0) call SaveInteger(BYHT2,(mm[NNv]),2*i,GetHandleId(l)) call SaveInteger(BYHT,mm[NNv],2*i+1,cFv) call SetLightningColor(l,1,.5,.5,0) call Lfv(cFv,55,25,25,$FF) exitwhen i==0 endloop call GroupEnumUnitsInRange(G,x,y,$708+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$708)then if IsUnitAliveAndEnemyNotAvul(u,(Je[((NNv))]))then set a=GetRandomReal(0,Lx) if nC[(GetUnitUserData((u)))]then call zKv((GetPlayerId((GetOwningPlayer(u)))),$FF,27,27,.27) endif call SetUnitPosition(u,x+$A0*Cos(a),y+$A0*Sin(a)) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportCaster.mdl",u,"origin")) call m2v(u,1,'A500','B500',true) endif endif endloop call NewTextTagInTarget_A((Je[((NNv))]),"Wheel of your destiny! !",$9B,25,2) call PlaySoundOnUnit_BJ((Za),(($7F)*1.),((Je[((NNv))]))) call SetUnitState((Je[((NNv))]),UNIT_STATE_MANA,0) call PauseUnit((Je[((NNv))]),true) call SetUnitTimeScale((Je[((NNv))]),.1) call SetUnitAnimation((Je[((NNv))]),"attack") call QueueUnitAnimation((Je[((NNv))]),"stand") set l=null endif endfunction function XPe takes integer NNv returns boolean local real x=s__barrage_X[NNv] local real y=s__barrage_Y[NNv] local unit u call GroupEnumUnitsInRange(G,x,y,350+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,350)then if IsUnitAliveAndEnemy(u,s__barrage_atkunit[NNv])then call UnitDamageTargetBY(((s__barrage_atkunit[NNv])),((u)),((((7500+.375*GetUnitMaxLifeById((GetUnitUserData((u)))))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call Gjv(u,125,GetRandomReal(0,Lx),1,"KnockbackDust.mdx") call UnitAppBuff((GetUnitUserData((u))),'A0OY',$D006B) endif endif endloop call Ltv(Lfv(LAv("AncientExplode.mdl",x,y,.875),125,0,0,$FF)) call Ltv(LAv("uberdarkwave.mdl",x,y,.375)) return true endfunction function Xqe takes integer NNv,unit u returns boolean return IsUnitAliveAndEnemy(u,s__barrage_atkunit[NNv]) endfunction function XQe takes integer NNv returns nothing call RemoveBarrage(NNv) endfunction function Xse takes nothing returns boolean local integer NNv=s__barrage_FR[Um] local unit u if NNv!=Um then call UseBarrage(Um) loop exitwhen NNv==Um if(s__barrage_outside[(NNv)])then call XPe(NNv) call RemoveBarrage((NNv)) elseif(s__barrage_finish[(NNv)])then if XPe(NNv)then call RemoveBarrage((NNv)) else set s__barrage_finish[(NNv)]=false endif else if s__barrage_CollisionRange[NNv]!=0 then call GroupEnumUnitsInRange(G,s__barrage_X[NNv],s__barrage_Y[NNv],s__barrage_CollisionRange[NNv]+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,s__barrage_X[NNv],s__barrage_Y[NNv],s__barrage_CollisionRange[NNv])then if not IsUnitInGroup(u,s__barrage_enum_g[NNv])then call GroupAddUnit(s__barrage_enum_g[NNv],u) if u!=s__barrage_target[NNv]and Xqe(NNv,u)then set u=null call XPe(NNv) call RemoveBarrage((NNv)) exitwhen true endif endif endif endloop endif endif set NNv=s__barrage_FR[NNv] endloop elseif s__barrage_InOperation[Um]then set s__barrage_InOperation[Um]=false call TriggerEvaluate(Ohv) endif return false endfunction function XSe takes nothing returns nothing call fov(wm) endfunction function s__GoTMissile_stop takes nothing returns nothing call frv(wm) endfunction function Xte takes nothing returns nothing set wm=fxv(function Xse) call fov(wm) endfunction function XTe takes integer NNv returns nothing call s__barrage_Filling((Um),(NNv)) if not s__barrage_InOperation[Um]then set s__barrage_InOperation[Um]=true call fov(wm) endif endfunction function Xue takes nothing returns nothing set Um=NewLauncher() set s__barrage_InOperation[Um]=true endfunction function XUe takes integer c,integer fx,real x,real y returns nothing local integer NNv=CreateBarrageTypeE(fx,x,y,75) set s__barrage_atkunit[NNv]=(Je[(c)]) set s__barrage_CollisionRange[NNv]=$9C set s__barrage_speed[NNv]=.03125*$FA set s__barrage_acceleration[NNv]=.03125*.03125*750 call XTe(NNv) endfunction function Xwe takes nothing returns integer return D9v(xM) endfunction function XWe takes integer NNv returns nothing call fvv(NNv) endfunction function Xye takes nothing returns boolean local integer NNv=J[xM] local real x local real y loop exitwhen 0==NNv set Zm[NNv]=Zm[NNv]-1 set vM[NNv]=vM[NNv]+Lx/ 128. set x=GetUnitX((Je[(ym[NNv])])) set y=GetUnitY((Je[(ym[NNv])])) call LKv(Ym[NNv],x+eM*Cos(vM[NNv])) call Llv(Ym[NNv],y+eM*Sin(vM[NNv])) call LKv(zm[NNv],x-eM*Cos(vM[NNv])) call Llv(zm[NNv],y-eM*Sin(vM[NNv])) if Zm[NNv]<1 then call XUe(Wm[NNv],Ym[NNv],x,y) call XUe(Wm[NNv],zm[NNv],x,y) call Unit_Cancel_Counter(116,Wm[NNv]) call Unit_Cancel_Counter(117,ym[NNv]) call fvv((NNv)) endif set NNv=K[NNv] endloop return false endfunction function XYe takes nothing returns nothing set xM=fxv(function Xye) endfunction function Xze takes nothing returns boolean local integer NNv=(D9v(xM)) local real x local real y set Wm[NNv]=(GetUnitUserData((GetTriggerUnit()))) set ym[NNv]=(GetUnitUserData((GetSpellTargetUnit()))) set x=GetUnitX((Je[(ym[NNv])])) set y=GetUnitY((Je[(ym[NNv])])) set vM[NNv]=Mvv((Je[(Wm[NNv])]),(Je[(ym[NNv])]))+.25*Lx set Ym[NNv]=Lfv(LNv("Evil Bomb.mdx",x+eM*Cos(vM[NNv]),y+eM*Sin(vM[NNv]),75,2.5),$9B,25,25,$FF) set zm[NNv]=Lfv(LNv("Evil Bomb.mdx",x-eM*Cos(vM[NNv]),y-eM*Sin(vM[NNv]),75,2.5),$9B,25,25,$FF) set Zm[NNv]=48+GetRandomInt(0,$80) call m1v((Je[(ym[NNv])]),1) call Ltv(LAv("Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl",x,y,2.5)) call LFv(Ym[NNv],"Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl") call LFv(zm[NNv],"Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl") call Unit_App_Counter(118,Wm[NNv]) call Unit_App_Counter(119,ym[NNv]) return false endfunction function XZe takes nothing returns nothing call RegisterSpellEffectEvent('A0OU',function Xze) endfunction function X_e takes nothing returns integer return D9v(XM) endfunction function X0e takes integer NNv returns nothing call fvv(NNv) endfunction function X1e takes nothing returns boolean local integer NNv=J[XM] local unit u local real x local real y loop exitwhen 0==NNv if aM[NNv]==0 then if UnitAlive((Je[(iM[NNv])]))then set nM[NNv]=nM[NNv]-1 if nM[NNv]>32 then set VM[NNv]=GetUnitX((Je[(iM[NNv])])) set EM[NNv]=GetUnitY((Je[(iM[NNv])])) endif else set nM[NNv]=0 endif if ModuloInteger(nM[NNv],16)==0 then set x=VM[NNv] set y=EM[NNv] call Ltv(LAv("Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl",x,y,2)) if nM[NNv]<1 then set aM[NNv]=Lfv(LAv("Abilities\\Spells\\Other\\Doom\\DoomTarget.mdl",x,y,2.75),$FF,25,25,$FF) set nM[NNv]=480 call GroupEnumUnitsInRange(G,x,y,325+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,325)then if IsUnitAliveAndEnemy(u,(Je[(oM[NNv])]))then call UnitDamageTargetBY((((Je[(oM[NNv])]))),((u)),((((5000+.75*GetUnitMaxLifeById((GetUnitUserData((u)))))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v(u,2.5) endif endif endloop call Ltv(Lfv(LAv("Objects\\Spawnmodels\\Undead\\UDeathSmall\\UDeathSmall.mdl",x,y,3),$FF,25,25,125)) call LQv(Lbv(LVv('e02W',x,y,0),5,1.5),1.25) call Unit_Cancel_Counter(120,iM[NNv]) endif endif else set nM[NNv]=nM[NNv]-1 if ModuloInteger(nM[NNv],32)==0 then set x=(GetUnitX(II[(aM[NNv])])) set y=(GetUnitY(II[(aM[NNv])])) call GroupEnumUnitsInRange(G,x,y,300+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,300)then if IsUnitAliveAndEnemy(u,(Je[(oM[NNv])]))then call TimerDestroyAddSpecialEffectTargetBY("Abilities\\Spells\\Other\\ImmolationRed\\ImmolationRedDamage.mdl",u,"chest",1) call UnitDamageTargetBY((((Je[(oM[NNv])]))),((u)),((((5000)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v(u,.5) elseif u==(Je[(oM[NNv])])and UnitAlive(u)then call TimerDestroyAddSpecialEffectTargetBY("Abilities\\Spells\\Other\\ImmolationRed\\ImmolationRedDamage.mdl",u,"chest",1) call E_e((oM[NNv]),.075) endif endif endloop if nM[NNv]<1 then call Unit_Cancel_Counter(121,oM[NNv]) call Ltv(aM[NNv]) call fvv((NNv)) endif endif endif set NNv=K[NNv] endloop return false endfunction function X2e takes nothing returns nothing set XM=fxv(function X1e) endfunction function X3e takes integer ckv,unit u,integer h returns nothing local integer NNv=(D9v(XM)) set oM[NNv]=ckv set iM[NNv]=(GetUnitUserData((u))) set aM[NNv]=0 set nM[NNv]=48*(h+1) set VM[NNv]=GetUnitX((Je[(iM[NNv])])) set EM[NNv]=GetUnitY((Je[(iM[NNv])])) call NewTextTagInTarget_B(u,"-"+I2S(h)+"-",18,$FF,55,55) call Unit_App_Counter(122,oM[NNv]) call Unit_App_Counter(123,iM[NNv]) endfunction function X4e takes nothing returns nothing local integer NNv=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:84") local unit c=(Je[(NNv)]) local unit u local integer i=$C local integer VZe=0 local real x=GetUnitX(c) local real y=GetUnitY(c) local integer id if UnitAlive(c)then call GroupEnumUnitsInRange(G,x,y,450+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,450)then if IsUnitAliveAndEnemy(u,c)then set id=(GetUnitUserData((u))) call Globals_Shield_Remove((id)) call sc___prototype15_evaluate(2,(id)) call sc___prototype15_evaluate(3,(id)) call UnitDamageTargetBY(((c)),((u)),((((1.25*GetWidgetLife(u))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",u,"origin")) if UnitAlive(u)and nC[(GetUnitUserData((u)))]then set VZe=VZe+1 endif endif endif endloop call UnitRemoveAbilityandBuffBY((Je[(NNv)]),'A0OX','B05H') call Ltv(LAv("DeathBladeRegeneration.mdx",x,y,5)) call LQv(LAv("DarkLightningNova.mdx",x,y,5),2.5) call Ltv(LAv("Grin Curse.mdx",x,y,3)) if VZe<2 then call StartSound(Za) call ModifyUnitMagicDamage((NNv),25) call ModifyUnitAdef((NNv),12.5) call E_e((NNv),.75) call NewTextTagInTarget_B(c,"This...We are successful! !",$C,$FF,105,105) call Ltv(LAv("BloodWave.mdx",x,y,3)) endif set VZe=0 call GroupEnumUnitsInRange(G,x,y,$4B0+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$4B0)then if nC[(GetUnitUserData((u)))]and IsUnitAliveAndEnemy(u,c)then set VZe=VZe+1 call X3e(NNv,u,VZe) exitwhen VZe==3 endif endif endloop endif set c=null endfunction function X5e takes nothing returns boolean local integer NNv=(GetUnitUserData((GetTriggerUnit()))) local real x=GetUnitX((Je[(NNv)])) local real y=GetUnitY((Je[(NNv)])) call UnitAddAbilityBY((Je[(NNv)]),'A0OX') call Ltv(LAv("BlackChakraExplosion.mdx",x,y,3)) call LQv(LAv("DarkLightningNova.mdx",x,y,3),2.5) call Ltv(LAv("Grin Curse.mdx",x,y,1.5)) call TimerStart(NewTimer(NNv),3,false,function X4e) call NewTextTagInTarget_B((Je[(NNv)]),"This road nowhere, you will hang up ~ !",$C,$FF,105,105) return false endfunction function X6e takes nothing returns nothing call RegisterSpellEffectEvent('A0OW',function X5e) endfunction function X7e takes nothing returns boolean local unit c=GetTriggerUnit() local unit u=c local real x=GetUnitX(c) local real y=GetUnitY(c) call GroupEnumUnitsInRange(G,x,y,550+75,null) call GroupRemoveUnit(G,u) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,550)then if IsUnitAliveAndEnemy(u,c)then call UnitDamageTargetBY(((c)),((u)),((((.75*GetUnitMaxLifeById((GetUnitUserData((u)))))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call Gjv(u,$AF,Atan2(GetUnitY(u)-y,GetUnitX(u)-x),1.25,"KnockbackDust.mdl") call zhv((GetPlayerId((GetOwningPlayer(u)))),50,.5) call zKv((GetPlayerId((GetOwningPlayer(u)))),$7F,$7F,$7F,.5) endif endif endloop call Ltv(LAv("uberdarkwave.mdl",x,y,.8)) set c=null return false endfunction function X8e takes nothing returns nothing local timer t=GetExpiredTimer() local integer NNv=(alloc__hpv(GetHandleId((t)))) if UnitAlive((Je[(NNv)]))and UnitAlive((Je[(OM[NNv])]))and not(Control_use[((NNv))])and(Control_use[((OM[NNv]))])then set RM[NNv]=RM[NNv]+1 if RM[NNv]==16 then set RM[NNv]=0 call NewTextTagInTarget_B((Je[(NNv)]),"|c007387ffI tear you!!",$C,$FF,$FF,$FF) call SetUnitAnimation((Je[(NNv)]),"death") call UnitDamageTargetBY((((Je[(NNv)]))),(((Je[(OM[NNv])]))),((((.05*GetUnitState((Je[(OM[NNv])]),UNIT_STATE_MAX_LIFE))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl",(Je[(OM[NNv])]),"chest")) call PlaySoundOnUnit_BJ((En),((100)*1.),((Je[(OM[NNv])]))) endif else if UnitAlive((Je[(NNv)]))then call QueueUnitAnimation((Je[(NNv)]),"Stand") endif call ReleaseTimer(t,"[TimerUtils]Error:85") if(Control_abid[(OM[NNv])])=='A500' then call UnitCloseControl(OM[NNv]) endif call PauseUnit((Je[(NNv)]),false) call Unit_Cancel_Counter(124,(NNv)) call Unit_Cancel_Counter(125,OM[NNv]) endif set t=null endfunction function X9e takes nothing returns boolean local integer NNv=(GetUnitUserData((GetTriggerUnit()))) local real a=bj_DEGTORAD*GetUnitFacing((Je[(NNv)])) set OM[NNv]=(GetUnitUserData((GetSpellTargetUnit()))) set RM[NNv]=0 call m1v((Je[(OM[NNv])]),120) call PauseUnit((Je[(NNv)]),true) call GJv((Je[(OM[NNv])]),GetUnitX((Je[(NNv)]))+80*Cos(a),GetUnitY((Je[(NNv)]))+80*Sin(a),.125) call TimerStart(NewTimer(NNv),.03125,true,function X8e) call Unit_App_Counter($7E,(NNv)) call Unit_App_Counter($7F,OM[NNv]) return false endfunction function Ove takes nothing returns boolean if GetUnitTypeId(GetSpellTargetUnit())=='n01Y' then call IssueImmediateOrderById(GetTriggerUnit(),$D0004) else call DestroyEffect(AddSpecialEffectTarget("SuperShinyThingy.mdl",GetTriggerUnit(),"hand right")) call DestroyEffect(AddSpecialEffectTarget("SuperShinyThingy.mdl",GetTriggerUnit(),"hand left")) endif return false endfunction function Oee takes nothing returns nothing call RegisterSpellEffectEvent('A0B2',function X9e) call RegisterSpellChannelEvent('A0B2',function Ove) endfunction function Oxe takes nothing returns nothing local real eoe=.25+.75*(80.-NM)/ 80. local real x=(GetUnitX(II[(AM)]))+eoe*bM local real y=(GetUnitY(II[(AM)]))+eoe*BM local real r=$C8+$C8*eoe local real a=300*eoe local real d=6000*eoe local unit u call LKv(AM,x) call Llv(AM,y) call SetUnitScale(II[(AM)],((2*eoe)*1.),0,0) set NM=NM-1 if ModuloInteger(NM,4)==0 then call Ltv(LAv("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",x+GetRandomReal(-a,a),y+GetRandomReal(-a,a),1.25*eoe)) call Ltv(LAv("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",x+GetRandomReal(-a,a),y+GetRandomReal(-a,a),1.25*eoe)) endif call GroupEnumUnitsInRange(G,x,y,r+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,r)then if not IsUnitInGroup(u,cM)and IsUnitAliveAndEnemy(u,(Je[(IM)]))then call GroupAddUnit(cM,u) call DestroyEffect(AddSpecialEffectTarget("AquaSpike.mdl",u,"origin")) call UnitDamageTargetBY((((Je[(IM)]))),((u)),((((d)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop if NM<=0 then call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:86") call RecycleGroup(cM) call Unit_Cancel_Counter($80,IM) call Ltv(AM) set cM=null endif endfunction function Ooe takes nothing returns boolean local real a set IM=(GetUnitUserData((GetTriggerUnit()))) set a=bj_DEGTORAD*GetUnitFacing((Je[(IM)])) set cM=NewGroup() set NM=80 set bM=40*Cos(a) set BM=40*Sin(a) set AM=Lnv(GetUnitX((Je[(IM)]))-20*bM,GetUnitY((Je[(IM)]))-20*BM,a) call LMv(AM,"Abilities\\Spells\\Other\\CrushingWave\\CrushingWaveMissile.mdl") call SetUnitScale(II[(AM)],((.5)*1.),0,0) call TimerStart((NewTimer(0)),.03125,true,function Oxe) call Unit_App_Counter($81,IM) return false endfunction function Ore takes nothing returns boolean call Ltv(LAv("Abilities\\Spells\\Undead\\ReplenishMana\\ReplenishManaCaster.mdl",GetSpellTargetX(),GetSpellTargetY(),4)) call NewTextTagInTarget_A(GetTriggerUnit(),"MRGLMRGL",0,$FF,0) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl",GetTriggerUnit(),"origin")) call PlaySoundOnUnit_BJ((Xn),((125)*1.),(GetTriggerUnit())) return false endfunction function Oie takes nothing returns nothing call RegisterSpellEffectEvent('A0BA',function Ooe) call RegisterSpellChannelEvent('A0BA',function Ore) endfunction function Oae takes nothing returns nothing local integer r=R2I(255.*DM/ 288.) local integer g=R2I(155.*DM/ 288.) local integer b=R2I(155.*DM/ 288.) if r<55 then set r=55 endif if g<55 then set g=55 endif if b<0 then set b=0 endif set DM=DM-1 call SetUnitVertexColor((Je[(CM)]),r,g,b,$FF) if not UnitAlive((Je[(CM)]))or DM<=0 then call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:87") call UnitRemoveAbility((Je[(CM)]),'Rspm') call SetUnitVertexColor((Je[(CM)]),$FF,$9B,$9B,$FF) call s__Trig_remove((dM)) call Unit_Cancel_Counter($82,CM) endif endfunction function One takes nothing returns boolean local real r=(288.-DM)/ 96. local real x=GetUnitX((MF)) local real y=GetUnitY((MF)) local integer fx=Lnv(x,y,Atan2(GetUnitY((mF))-y,GetUnitX((mF))-x)) call LMv(fx,"Royal Guard.mdl") call SetUnitScale(II[(fx)],((1.5)*1.),0,0) if r>.75 then set r=.75 endif if GetRandomInt(1,8)==1 then call DestroyEffect(AddSpecialEffectTarget("SmallBloodEX-NoSplat.mdl",(mF),"chest")) else call DestroyEffect(AddSpecialEffectTarget("blood damage impact.mdl",(mF),"chest")) endif call zhv((GetPlayerId((GetOwningPlayer((mF))))),$F,.25) call UnitDamageTargetBY((((MF))),(((mF))),((((r*GetDamage())*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) call DamageMinus(r*GetDamage()) call Ltv(Lfv(fx,$FF,$FF,125,$CD)) return false endfunction function OVe takes nothing returns boolean local real a set CM=(GetUnitUserData((GetTriggerUnit()))) set dM=UnitAddShieldTrigB((CM),function One) set DM=288 call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Avatar\\AvatarCaster.mdl",(Je[(CM)]),"chest")) call TimerStart((NewTimer(0)),.03125,true,function Oae) call Unit_App_Counter($83,CM) return false endfunction function OEe takes nothing returns nothing call RegisterSpellEffectEvent('A0BB',function OVe) endfunction function OXe takes integer NNv returns boolean if GetUnitAbilityLevel(JK,'B04A')==1 then call Lfv(s__barrage_model[NNv],GetRandomInt(0,$FF),GetRandomInt(0,$FF),GetRandomInt(0,$FF),$FF) else call Lfv(s__barrage_model[NNv],$FF,55,55,$FF) endif return false endfunction function OOe takes integer NNv returns boolean local real x=s__barrage_X[NNv] local real y=s__barrage_Y[NNv] local unit u call GroupEnumUnitsInRange(G,x,y,$AF+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$AF)then if IsUnitAliveAndEnemy(u,JK)then call UnitDamageTargetBY(((JK)),((u)),(((($FA0)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") if GetUnitAbilityLevel(JK,'B04A')==1 then call Gjv(u,62.5,GetRandomReal(0,Lx),.375,"KnockbackDust.mdx") call m2v(u,.375,'A500','B500',true) else call m2v(u,.25,'A500','B500',true) endif endif endif endloop call Ltv(Lfv(LAv("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",x,y,1.5),$9B,$9B,$9B,$9B)) call LTv(fM[NNv]) return true endfunction function ORe takes integer NNv returns nothing call RemoveBarrage(NNv) endfunction function OIe takes nothing returns boolean local integer NNv=s__barrage_FR[FM] local unit u if NNv!=FM then call UseBarrage(FM) loop exitwhen NNv==FM if(s__barrage_outside[(NNv)])then call OOe(NNv) call RemoveBarrage((NNv)) elseif(s__barrage_finish[(NNv)])then if OOe(NNv)then call RemoveBarrage((NNv)) else set s__barrage_finish[(NNv)]=false endif else if OXe(NNv)then call RemoveBarrage((NNv)) endif endif set NNv=s__barrage_FR[NNv] endloop elseif s__barrage_InOperation[FM]then set s__barrage_InOperation[FM]=false call TriggerEvaluate(OHv) endif return false endfunction function OAe takes nothing returns nothing call fov(gM) endfunction function s__FlamingWrath_stop takes nothing returns nothing call frv(gM) endfunction function ONe takes nothing returns nothing set gM=fxv(function OIe) call fov(gM) endfunction function Obe takes integer NNv returns nothing call s__barrage_Filling((FM),(NNv)) if not s__barrage_InOperation[FM]then set s__barrage_InOperation[FM]=true call fov(gM) endif endfunction function OBe takes nothing returns nothing set FM=NewLauncher() set s__barrage_InOperation[FM]=true endfunction function Oce takes nothing returns nothing local integer i=$A local unit u local real a loop set i=i-1 set a=i*Lx/ 10. call Ltv(LAv("EarthSlam.mdl",hM+750*Cos(a),HM+750*Sin(a),1.25)) call Lqv(LAv("KnockbackDust.mdx",hM+750*Cos(a),HM+750*Sin(a),5),1.5) exitwhen i==0 endloop call GroupEnumUnitsInRange(G,hM,HM,975+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,hM,HM,975)then if not IsUnitInRangeXY(u,hM,HM,575)and not IsUnitInGroup(u,GM)and IsUnitAliveAndEnemyNotAvul(u,OL)then call GroupAddUnit(GM,u) call UnitDamageTargetBY(((OL)),((u)),(((($7530+1.1*GetUnitMaxLifeById((GetUnitUserData((u)))))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call sc___prototype200_evaluate(1,u,true) endif endif endloop call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:88") call RecycleGroup(GM) set GM=null endfunction function OCe takes nothing returns nothing local integer i=6 local unit u local real a loop set i=i-1 set a=i*Lx/ 6. call Ltv(LAv("EarthSlam.mdl",hM+450*Cos(a),HM+450*Sin(a),1.25)) call Lqv(LAv("KnockbackDust.mdx",hM+450*Cos(a),HM+450*Sin(a),5),1.5) exitwhen i==0 endloop call GroupEnumUnitsInRange(G,hM,HM,650+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,hM,HM,650)then if not IsUnitInRangeXY(u,hM,HM,275)and not IsUnitInGroup(u,GM)and IsUnitAliveAndEnemyNotAvul(u,OL)then call GroupAddUnit(GM,u) call UnitDamageTargetBY(((OL)),((u)),(((($7530+1.1*GetUnitMaxLifeById((GetUnitUserData((u)))))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call sc___prototype200_evaluate(1,u,true) endif endif endloop call TimerStart(GetExpiredTimer(),.875,false,function Oce) endfunction function Ode takes nothing returns nothing local unit u call GroupEnumUnitsInRange(G,hM,HM,325+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,hM,HM,325)then if not IsUnitInGroup(u,GM)and IsUnitAliveAndEnemyNotAvul(u,OL)then call GroupAddUnit(GM,u) call UnitDamageTargetBY(((OL)),((u)),(((($7530+1.1*GetUnitMaxLifeById((GetUnitUserData((u)))))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call sc___prototype200_evaluate(1,u,true) endif endif endloop call Ltv(Lfv(Lbv(LVv('e005',hM,HM,0),5,.5),$9B,$FF,$9B,$FF)) call Ltv(Lfv(LAv("NewDirtEXNofire.mdl",hM,HM,3),55,$FF,125,$CD)) call Ltv(LAv("EarthSlam.mdl",hM,HM,2.25)) call zHv(75,1.25,hM,HM,900) call TimerStart(GetExpiredTimer(),1.25,false,function OCe) endfunction function ODe takes nothing returns boolean set GM=NewGroup() set hM=GetUnitX(OL) set HM=GetUnitY(OL) call Ltv(LAv("NatureWave.mdl",hM,HM,2.5)) call TimerStart((NewTimer(0)),.75,false,function Ode) return false endfunction function Ofe takes nothing returns boolean call NewTextTagInTarget_B(OL,"Natural hug!!",18,$9B,$FF,$9B) return false endfunction function OFe takes nothing returns nothing call RegisterSpellChannelEvent('A0LZ',function Ofe) call RegisterSpellEffectEvent('A0LZ',function ODe) endfunction function Oge takes nothing returns integer return D9v(LM) endfunction function OGe takes integer NNv returns nothing call fvv(NNv) endfunction function Ohe takes nothing returns boolean local integer NNv=J[LM] local integer id local unit u local integer i local real x local real y local real d loop exitwhen 0==NNv if UnitAlive((Je[(jM[NNv])]))then call LKv(JM[NNv],GetUnitX((Je[(jM[NNv])]))) call Llv(JM[NNv],GetUnitY((Je[(jM[NNv])]))) endif if UnitAlive(OL)then set kM[NNv]=kM[NNv]-1 call SetUnitFlyHeight(II[(JM[NNv])],((750.*kM[NNv]/ lM)*1.),0) if ModuloInteger(kM[NNv],32)==0 then set i=0 set x=(GetUnitX(II[(JM[NNv])])) set y=(GetUnitY(II[(JM[NNv])])) call FinishingGroup(KM) call GroupEnumUnitsInRange(G,x,y,400+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,400)then if IsUnitAliveAndEnemyNotAvul(u,OL)then set id=(GetUnitUserData((u))) if Globals_Shield_Remove((id))or sc___prototype15_evaluate(2,(id))or sc___prototype15_evaluate(3,(id))or sc___prototype15_evaluate(4,(id))then call NewTextTagInTarget_B(u,"|c00a8e4fAll over to enlarge!",8,$FF,$FF,$FF) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathPact\\DeathPactTarget.mdl",u,"origin")) endif if not IsUnitType(u,UNIT_TYPE_SUMMONED)then set i=i+1 if kM[NNv]<1 then call GroupAddUnit(KM,u) endif elseif kM[NNv]<1 and not pB[(id)]then call KillUnitBJ(u) endif endif endif endloop if i>0 then set d=175000./ i if kM[NNv]>0 then call NewTextTagInTarget_B(II[JM[NNv]],I2S(i)+" X "+I2S(R2I(d)),$E,55,$FF,55) else loop set u=FirstOfGroup(KM) exitwhen u==null call GroupRemoveUnit(KM,u) call UnitDamageTargetBY(((OL)),((u)),((((d)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($F)*1.))*1.),(("|c0080ff80"))) call Gjv(u,75,Atan2(GetUnitY(u)-y,GetUnitX(u)-x),.5,"KnockbackDust.mdx") call m2v(u,.5,'A500','B500',true) endloop call zHv(50,.75,x,y,600) call Ltv(LAv("Explosion.mdl",x,y,2.25)) call Ltv(LAv("CenarionFury.mdl",x,y,2.25)) endif endif endif else set kM[NNv]=0 endif if kM[NNv]<1 then call Unit_Cancel_Counter($84,jM[NNv]) call LQv(JM[NNv],.75) call fvv((NNv)) endif set NNv=K[NNv] endloop return false endfunction function OHe takes nothing returns nothing set LM=fxv(function Ohe) endfunction function Oje takes nothing returns boolean local integer NNv=(D9v(LM)) set jM[NNv]=(GetUnitUserData((GetSpellTargetUnit()))) set JM[NNv]=LNv("EmeraldCore.mdl",GetUnitX((Je[(jM[NNv])])),GetUnitY((Je[(jM[NNv])])),750.,2.5) set kM[NNv]=lM call NewTextTagInTarget_B((Je[(jM[NNv])]),"|c00dbfabe"+(Game_PlayerName[Kc[((jM[NNv]))]])+" |c002c8b10Be ruled",$F,$FF,$FF,$FF) call zKv((Kc[(jM[NNv])]),55,$FF,55,.27) call StartSound(Za) call Unit_App_Counter($85,jM[NNv]) return false endfunction function OJe takes nothing returns nothing call RegisterSpellEffectEvent('A0M4',function Oje) endfunction function Oke takes integer NNv returns boolean if mM[NNv]!=null then call ReleaseTimer(mM[NNv],"[TimerUtils]Error:89") call UnitRemoveAbilityandBuffBY((Je[(NNv)]),'A0M2','B04J') call DeUnitMdef((NNv),MM[NNv]) call ModifyUnitArmor((NNv),-500) call Unit_Cancel_Counter($86,(NNv)) set mM[NNv]=null return true endif return false endfunction function OKe takes nothing returns nothing call Oke(((alloc__hpv(GetHandleId((GetExpiredTimer())))))) endfunction function Ole takes nothing returns boolean local real x=GetUnitX(OL) local real y=GetUnitY(OL) local integer NNv local unit u call GroupEnumUnitsInRange(G,x,y,375+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,375)then if IsUnitAliveAndAlly(u,OL)then set NNv=(GetUnitUserData((u))) if mM[NNv]==null then set mM[NNv]=NewTimer(NNv) set MM[NNv]=ModifyUnitMdef((NNv),40) call UnitAddAbilityBY(u,'A0M2') call ModifyUnitArmor((NNv),500) call Unit_App_Counter($87,(NNv)) endif call TimerStart(mM[NNv],20,false,function OKe) endif endif endloop call NewTextTagInTarget_B(OL,"Natural shield ! !",18,$9B,$FF,$9B) call Ltv(LAv("Explosion.mdl",x,y,2)) return false endfunction function OLe takes nothing returns nothing call RegisterSpellEffectEvent('A0JY',function Ole) endfunction function Ome takes nothing returns integer return D9v(sM) endfunction function OMe takes integer NNv returns nothing call fvv(NNv) endfunction function Ope takes nothing returns boolean local integer NNv=J[sM] local unit u local real x local real y loop exitwhen 0==NNv if UnitAlive(OL)then set QM[NNv]=QM[NNv]-1 if bL and CL==0 then if ModuloInteger(QM[NNv],$A0)==0 then call cKv((GetUnitX(II[(pM[NNv])])),(GetUnitY(II[(pM[NNv])]))) endif elseif ModuloInteger(QM[NNv],qM[NNv])==0 then call cKv((GetUnitX(II[(pM[NNv])])),(GetUnitY(II[(pM[NNv])]))) endif else set QM[NNv]=0 endif if QM[NNv]<1 then call DestroyEffectBY(PM[NNv]) call Ltv(pM[NNv]) call fvv((NNv)) endif set NNv=K[NNv] endloop return false endfunction function OPe takes nothing returns nothing set sM=fxv(function Ope) endfunction function OQe takes integer NNv returns nothing if TM[NNv]then set uM[UM[NNv]]=uM[NNv] set UM[uM[NNv]]=UM[NNv] set TM[NNv]=false if UM[(0)]==0 then call frv(wM) endif call Unit_Cancel_Counter($88,(NNv)) endif endfunction function Ose takes nothing returns boolean local integer NNv=UM[(0)] loop exitwhen NNv==0 if not UnitAlive((Je[(NNv)]))or not UnitAlive(OL)then set SM[NNv]=0 elseif not pMv((Je[(NNv)]),false)then set SM[NNv]=SM[NNv]-1 call SetUnitScale((Je[(NNv)]),1.25-.5*SM[NNv]/ 1920.,1,1) if SM[NNv]<1 then call cJv((Je[(NNv)])) elseif ModuloInteger(SM[NNv],$F0)==0 then if SM[NNv]==$F0 then call SetUnitVertexColor((Je[(NNv)]),55,$FF,55,$FF) endif call ModifyUnitHP((NNv),$3D090) call ModifyUnitHpRegen((NNv),$9C4) call ModifyUnitArmor((NNv),75) endif endif if SM[NNv]<1 then call DestroyEffect(AddSpecialEffect("NatureExplosion.mdx",GetUnitX((Je[(NNv)])),GetUnitY((Je[(NNv)])))) call KillUnit((Je[(NNv)])) call OQe(NNv) endif set NNv=UM[NNv] endloop return false endfunction function OSe takes integer NNv returns integer if not TM[NNv]then if UM[(0)]==0 then if wM==0 then set wM=fxv(function Ose) endif call fov(wM) endif set UM[NNv]=UM[(0)] set uM[UM[(0)]]=NNv set UM[(0)]=NNv set uM[NNv]=0 set TM[NNv]=true call Unit_App_Counter($89,(NNv)) endif return NNv endfunction function Ote takes unit u returns integer return OSe((GetUnitUserData((u)))) endfunction function OTe takes nothing returns boolean if GetRandomInt(1,$A)==$A then call UnitDamageTargetBY((((mF))),(((MF))),((((.2*GetUnitState((MF),UNIT_STATE_LIFE))*1.))*1.),false,(true),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call UnitAppBuff((pF),'A0M1',$D00CB) endif return false endfunction function Oue takes nothing returns boolean local integer NNv=(OSe((GetUnitUserData(((GetSummonedUnit())))))) set SM[NNv]=$5A0 call UnitAddPAttackTrig((NNv),function OTe) return false endfunction function OUe takes nothing returns nothing call RegisterSummonEvent('n031',function Oue) endfunction function Owe takes integer NNv returns boolean if UnitAlive(s__barrage_target[NNv])then call UnitCureTaret(s__barrage_target[NNv],s__barrage_target[NNv],.15*GetUnitState(s__barrage_target[NNv],UNIT_STATE_MAX_LIFE)) call TimerDestroyEffectBY((s__Effect_build(AddSpecialEffectTarget(("Abilities\\Spells\\Orc\\HealingWave\\HealingWaveTarget.mdl"),(s__barrage_target[NNv]),("origin")))),1.5) endif return true endfunction function OWe takes integer NNv returns nothing call RemoveBarrage(NNv) endfunction function Oye takes nothing returns boolean local integer NNv=s__barrage_FR[WM] local unit u if NNv!=WM then call UseBarrage(WM) loop exitwhen NNv==WM if(s__barrage_outside[(NNv)])then call Owe(NNv) call RemoveBarrage((NNv)) elseif(s__barrage_finish[(NNv)])then if Owe(NNv)then call RemoveBarrage((NNv)) else set s__barrage_finish[(NNv)]=false endif endif set NNv=s__barrage_FR[NNv] endloop elseif s__barrage_InOperation[WM]then set s__barrage_InOperation[WM]=false call TriggerEvaluate(Olv) endif return false endfunction function OYe takes nothing returns nothing call fov(yM) endfunction function s__HealingMissile_stop takes nothing returns nothing call frv(yM) endfunction function Oze takes nothing returns nothing set yM=fxv(function Oye) call fov(yM) endfunction function OZe takes integer NNv returns nothing call s__barrage_Filling((WM),(NNv)) if not s__barrage_InOperation[WM]then set s__barrage_InOperation[WM]=true call fov(yM) endif endfunction function O_e takes nothing returns nothing set WM=NewLauncher() set s__barrage_InOperation[WM]=true endfunction function O0e takes unit ckv returns nothing local integer NNv=CreateBarrageTypeC(GetUnitX(ckv),GetUnitY(ckv),GetUnitFlyHeight(ckv),OL) set s__barrage_speed[NNv]=.03125*250. set s__barrage_acceleration[NNv]=.03125*.03125*750. call LMv(s__barrage_model[NNv],"Abilities\\Weapons\\IllidanMissile\\IllidanMissile.mdl") call SetUnitScale(II[(s__barrage_model[NNv])],((5.)*1.),0,0) call OZe(NNv) endfunction function O1e takes unit u returns nothing if KillUnitBJ(u)then if IsUnitType(u,UNIT_TYPE_HERO)then call zKv((GetPlayerId((GetOwningPlayer(u)))),$FF,$9B,$FF,.5) endif call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",YM,"origin")) call sc___prototype200_evaluate(1,u,true) endif endfunction function O2e takes nothing returns nothing local integer fx=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:90") local real x=(GetUnitX(II[(fx)])) local real y=(GetUnitY(II[(fx)])) local real a local real c local real s local integer i local integer iI local unit u if zM<6 then set iI=$C-4*ModuloInteger(zM,2) set i=iI loop set i=i-1 set a=Lx*i/ iI set c=100*Cos(a) set s=100*Sin(a) if iI==8 then call Lqv(LFv(Lfv(LAv("Units\\Creeps\\ForgottenOne\\ForgottenOneTent.mdl",x+1.5*c,y+1.5*s,1.5),75,0,$9B,$FF),"Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl"),.375) call Lqv(LFv(Lfv(LAv("Units\\Creeps\\ForgottenOne\\ForgottenOneTent.mdl",x+3*c,y+3*s,1.5),75,0,$9B,$FF),"Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl"),.375) else call Lqv(LFv(Lfv(LAv("Units\\Creeps\\ForgottenOne\\ForgottenOneTent.mdl",x+5*c,y+5*s,1.5),75,0,$9B,$FF),"Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl"),.375) call Lqv(LFv(Lfv(LAv("Units\\Creeps\\ForgottenOne\\ForgottenOneTent.mdl",x+7*c,y+7*s,1.5),75,0,$9B,$FF),"Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl"),.375) endif exitwhen i==0 endloop if iI==8 then call GroupEnumUnitsInRange(G,x,y,400+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,400)then if IsUnitOfPlayerNotseckill(u)then call O1e(u) endif endif endloop else call GroupEnumUnitsInRange(G,x,y,800+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,800)then if not IsUnitInRangeXY(u,x,y,400)and IsUnitOfPlayerNotseckill(u)then call O1e(u) endif endif endloop endif else set zM=0 set i=$C loop set i=i-1 set a=Lx*i/ 12. set c=187.5*Cos(a) set s=187.5*Sin(a) call Lqv(LFv(Lfv(LAv("Units\\Creeps\\ForgottenOne\\ForgottenOneTent.mdl",x+c,y+s,1.5),75,0,$9B,$FF),"Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl"),.375) call Lqv(LFv(Lfv(LAv("Units\\Creeps\\ForgottenOne\\ForgottenOneTent.mdl",x+2*c,y+2*s,1.5),75,0,$9B,$FF),"Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl"),.375) call Lqv(LFv(Lfv(LAv("Units\\Creeps\\ForgottenOne\\ForgottenOneTent.mdl",x+3*c,y+3*s,1.5),75,0,$9B,$FF),"Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl"),.375) call Lqv(LFv(Lfv(LAv("Units\\Creeps\\ForgottenOne\\ForgottenOneTent.mdl",x+4*c,y+4*s,1.5),75,0,$9B,$FF),"Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl"),.375) exitwhen i==0 endloop call GroupEnumUnitsInRange(G,x,y,800+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,800)then if GetUnitAbilityLevel(u,'Avul')==0 and IsUnitAlive(u)then call O1e(u) endif endif endloop endif call PlaySoundAtPoint_BJ((Fn),(($C8)*1.),((x)*1.),((y)*1.),0) call Ltv(LAv("AquaSpike.mdl",x,y,2.5)) call Ltv(fx) endfunction function O3e takes nothing returns boolean local unit u local integer i local real x local real y local real d set YM=GetTriggerUnit() set zM=R2I(GetUnitState(YM,UNIT_STATE_MANA)+1) set x=GetUnitX(YM) set y=GetUnitY(YM) call GroupEnumUnitsInRange(G,x,y,800+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,800)then if IsUnitAliveAndEnemy(u,YM)then call UnitDamageTargetBY(((YM)),((u)),(((($7D0)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call UnitAppBuff((GetUnitUserData((u))),'A0GA',$D006B) endif endif endloop if zM==6 then call Ltv(LAv("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",x,y,7.5)) call Ltv(LAv("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",x,y,7.5)) call TimerStart(NewTimer(LAv("Whirlpool.mdl",x,y,.75)),2,false,function O2e) call SetUnitState(YM,UNIT_STATE_MANA,0) else set i=$C set d=600-300*ModuloInteger(zM,2) loop set i=i-1 call Ltv(LAv("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",x+d*Cos(Lx*i/ $C),y+d*Sin(Lx*i/ $C),1.25)) exitwhen i==0 endloop call TimerStart(NewTimer(LAv("Whirlpool.mdl",x,y,.5)),1.5,false,function O2e) call SetUnitState(YM,UNIT_STATE_MANA,zM) endif call Lqv(LAv("Abilities\\Spells\\Human\\CloudOfFog\\CloudOfFog.mdl",x,y,1.75),1.5) return false endfunction function O4e takes nothing returns nothing local integer fx=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:91") local real x=(GetUnitX(II[(fx)])) local real y=(GetUnitY(II[(fx)])) local unit u call GroupEnumUnitsInRange(G,x,y,$9C+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$9C)then if IsUnitAliveAndEnemy(u,YM)then call UnitDamageTargetBY(((YM)),((u)),(((($DAC)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v(u,1) endif endif endloop call LQv(LVv('e011',x,y,0),1) call Ltv(LAv("BloodySplat Missile.mdl",x,y,3.75)) call Ltv(Lfv(LAv("Abilities\\Spells\\Undead\\RaiseSkeletonWarrior\\RaiseSkeleton.mdl",x,y,3),$9B,0,$9B,$FF)) call Ltv(fx) endfunction function O5e takes nothing returns boolean set YM=GetTriggerUnit() call TimerStart(NewTimer(Lfv(LAv("Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl",GetSpellTargetX(),GetSpellTargetY(),2),$FF,0,$FF,$FF)),1.,false,function O4e) return false endfunction function O6e takes nothing returns nothing call RegisterSpellEffectEvent('A0G8',function O5e) call RegisterSpellEffectEvent('A0G9',function O3e) endfunction function O7e takes nothing returns integer return D9v(Xp) endfunction function O8e takes integer NNv returns nothing call fvv(NNv) endfunction function O9e takes nothing returns boolean local integer NNv=J[Xp] local unit u local real x local real y loop exitwhen 0==NNv call LKv(ZM[NNv],BezierCurveBYCube(ep[NNv],op[NNv],ip[NNv],ap[NNv],Ep[NNv])) call Llv(ZM[NNv],BezierCurveBYCube(xp[NNv],rp[NNv],np[NNv],Vp[NNv],Ep[NNv])) call SetUnitFlyHeight(II[(ZM[NNv])],((BezierCurveBYCube(400,$5DC,500,0,Ep[NNv]))*1.),0) set Ep[NNv]=Ep[NNv]+.008 if Ep[NNv]>=1 then set x=(GetUnitX(II[(ZM[NNv])])) set y=(GetUnitY(II[(ZM[NNv])])) call GroupEnumUnitsInRange(G,x,y,275+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,275)then if IsUnitAliveAndEnemyNotAvul(u,Yl)and GetUnitFlyHeight(u)<100 then call DestroyEffect(AddSpecialEffectTarget("WaterNovaTarget.mdl",u,"chest")) call UnitDamageTargetBY(((Yl)),((u)),((((5000)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop call Ltv(LAv("AquaSpike.mdl",x,y,2.25)) call DestroyEffectBY(vp[NNv]) call LTv(ZM[NNv]) call fvv((NNv)) endif set NNv=K[NNv] endloop return false endfunction function Rve takes nothing returns nothing set Xp=fxv(function O9e) endfunction function Ree takes unit u returns nothing local integer NNv=(D9v(Xp)) local integer m=R2I(GetUnitState(Yl,UNIT_STATE_MANA)) local real fA=bj_DEGTORAD*GetUnitFacing(Yl) local real x=GetUnitX(Yl)-$FA*Cos(fA) local real y=GetUnitY(Yl)-$FA*Sin(fA) local real d=GetRandomReal(25,$AF) local real a=GetRandomReal(0,Lx) local real tX=GetUnitX(u)+d*Cos(a) local real tY=GetUnitY(u)+d*Sin(a) local real dX=tX-x local real dY=tY-y set d=1.5*SquareRoot(dX*dX+dY*dY) set a=Atan2(dY,dX) set ep[NNv]=x set xp[NNv]=y set op[NNv]=x-$FA*Cos(fA) set rp[NNv]=y-$FA*Sin(fA) set ip[NNv]=x+d*Cos(a) set np[NNv]=y+d*Sin(a) set ap[NNv]=tX set Vp[NNv]=tY set Ep[NNv]=0 set ZM[NNv]=Lnv(x,y,0) call LMv(ZM[NNv],"Abilities\\Weapons\\SpiritOfVengeanceMissile\\SpiritOfVengeanceMissile.mdl") call SetUnitScale(II[(ZM[NNv])],((4)*1.),0,0) call SetUnitFlyHeight(II[(ZM[NNv])],((400)*1.),0) set vp[NNv]=(s__Effect_build(AddSpecialEffectTarget(("Abilities\\Weapons\\SpiritOfVengeanceMissile\\SpiritOfVengeanceMissile.mdl"),(II[ZM[NNv]]),("origin")))) call Ltv(LIv("FreezingRing.mdl",x,y,300,2.25,fA,120)) call PlaySoundAtPoint_BJ((vn),((100)*1.),((x)*1.),((y)*1.),0) endfunction function Rxe takes nothing returns nothing local integer s=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local real x=GetUnitX((Je[(s)])) local real y=GetUnitY((Je[(s)])) local unit u if not UnitAlive((Je[(s)]))then call GroupEnumUnitsInRange(G,x,y,500+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,500)then if IsUnitAliveAndEnemy(u,Yl)then call UnitDamageTargetBY(((Yl)),((u)),((((.4*GetUnitMaxLifeById((GetUnitUserData((u))))+5000)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call Gjv(u,$AF,Atan2(GetUnitY(u)-y,GetUnitX(u)-x),1.5,"KnockbackDust.mdx") call UnitAppBuff((GetUnitUserData((u))),'A0GA',$D006B) endif endif endloop call Lqv(LAv("AquaSpike.mdl",x,y,3.5),2.5) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:92") call Unit_Cancel_Counter($8A,s) elseif not UnitAlive(Yl)then call KillUnit((Je[(s)])) elseif IsUnitInRangeXY(Yl,x,y,$FA)then call TimerDestroyAddSpecialEffectTargetBY("Abilities\\Spells\\Items\\AIhe\\AIheTarget.mdl",Yl,"origin",1.75) call UnitCureTaret(null,Yl,$3567E0) call KillUnit((Je[(s)])) elseif IsUnitNotAfrz((Je[(s)]))then set Op=ModuloInteger(Op+1,$C) if Op==0 then call GroupEnumUnitsInRange(G,x,y,375+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,375)then if IsUnitAliveAndEnemyNotAvul(u,(Je[(s)]))then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",u,"chest")) call Gjv(u,75,Atan2(GetUnitY(u)-y,GetUnitX(u)-x),.375,"KnockbackDust.mdx") endif endif endloop call Ltv(LAv("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl",x,y,2.25)) endif call IssuePointOrderById((Je[(s)]),$D0012,GetUnitX(Yl),GetUnitY(Yl)) else set Op=0 endif endfunction function Wae_6 takes nothing returns nothing local integer t=s__MissileTypeA_Last_Missile local boolean b=false local real x=s__barrage_X[t] local real y=s__barrage_Y[t] local unit u call GroupEnumUnitsInRange(G,x,y,$C8,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,100)then if IsUnitAliveAndEnemyNotAvul(u,s__barrage_atkunit[t])then call DestroyEffect(AddSpecialEffectTarget("waternovatarget.mdl",u,"origin")) call UnitDamageTargetBY(((s__barrage_atkunit[t])),((u)),((((7000)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") set u=null set b=true exitwhen true endif endif endloop if(not b)and UnitAlive(Yl)and IsUnitInRangeXY(Yl,x,y,$96)then call DestroyEffect(AddSpecialEffectTarget("waternovatarget.mdl",Yl,"chest")) call UnitCureTaret(s__barrage_atkunit[t],Yl,$249F0) set b=true endif if(not(s__barrage_finish[(t)]))and((s__barrage_outside[(t)])or b)then call s__MissileTypeA_stop(t) endif endfunction function Wae_5 takes unit u,real x,real y,real z,real tx,real ty,real tz returns nothing local integer t=CreateBarrageTypeD(x,y,z,tx,ty,tz) set s__barrage_speed[t]=.03125*800 set s__barrage_atkunit[t]=u set s__MissileTypeA_f1[t]=Filter(function Wae_6) set s__MissileTypeA_f2[t]=s__MissileTypeA_f1[t] set s__MissileTypeA_f3[t]=s__MissileTypeA_f1[t] call LMv(s__barrage_model[t],"Abilities\\Weapons\\WaterElementalMissile\\WaterElementalMissile.mdl") call SetBarrageFlightRadianEZ(t,20*bj_DEGTORAD) call s__MissileTypeA_fired(t) endfunction function Wae_4 takes nothing returns nothing local integer data=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local real x=GetUnitX(Boss_Spell_unit2[data]) local real y=GetUnitY(Boss_Spell_unit2[data]) local real a=Boss_Spell_Z[data] local integer ord=GetUnitCurrentOrder(Boss_Spell_unit2[data]) if Boss_Spell_data1[data]==0 then set Boss_Spell_data1[data]=1 call m_v(Boss_Spell_unit2[data],false) call SetUnitTimeScale(Boss_Spell_unit2[data],5) call UnitApplyTimedLife(Boss_Spell_unit2[data],'BHwe',80) call TimerStart(GetExpiredTimer(),.15,true,function Wae_4) endif if UnitAlive(Boss_Spell_unit2[data])then if IsUnitPaused(Boss_Spell_unit2[data])==false and ord!=$D0005 then set Boss_Spell_Z[data]=a+360/ 8*.15 call SetUnitAnimation(Boss_Spell_unit2[data],"attack") call SetUnitFacing(Boss_Spell_unit2[data],Boss_Spell_Z[data]) set a=a*bj_DEGTORAD call Wae_5(Boss_Spell_unit2[data],x+Cos(a)*50,y+Cos(a)*50,$96,x+Cos(a)*$4B0,y+Sin(a)*$4B0,0) endif else call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:93") call Boss_Spell_deallocate(data) set Boss_Spell_unit2[data]=null endif endfunction function Wae_3 takes nothing returns nothing local integer data=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer b=Boss_Spell_data2[data] local real t=RMinBJ(1,Boss_Spell_X[data]+(.03125/ 2)) local real x=s__BezierCurve_getx(b,t) local real y=s__BezierCurve_gety(b,t) local real z=s__BezierCurve_getz(b,t) local unit u call LKv(Boss_Spell_data3[data],x) call Llv(Boss_Spell_data3[data],y) call SetUnitFlyHeight(II[(Boss_Spell_data3[data])],((z)*1.),0) set Boss_Spell_X[data]=t if t>=1 then call s__BezierCurve_deallocate(b) call Ltv(Boss_Spell_data3[data]) call LTv(LAv("aquaspike.mdl",x,y,2)) call GroupEnumUnitsInRange(G,x,y,450+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,450)then if IsUnitAliveAndEnemyNotAvul(u,Yl)then call DestroyEffect(AddSpecialEffectTarget("waternovatarget.mdl",u,"chest")) call Gjv(u,75,Atan2(GetUnitY(u)-y,GetUnitX(u)-x),.375,"KnockbackDust.mdx") call UnitDamageTargetBY(((Yl)),((u)),(((($2710)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop set Boss_Spell_Z[data]=GetRandomReal(1,360) set Boss_Spell_unit2[data]=CreateUnit(P[$B],'h01Z',x,y,Boss_Spell_Z[data]) call m_v(Boss_Spell_unit2[data],true) call SetUnitXBJ(Boss_Spell_unit2[data],x) call SetUnitYBJ(Boss_Spell_unit2[data],y) call ModifyUnitMdef((GetUnitUserData((Boss_Spell_unit2[data]))),40) call SetUnitAnimation(Boss_Spell_unit2[data],"birth") call TimerStart(GetExpiredTimer(),1,false,function Wae_4) endif endfunction function Wae_2 takes nothing returns nothing local integer data=Boss_Spell_allocate() local real a=bj_DEGTORAD*GetUnitFacing(Yl) local real x=GetUnitX(Yl)-Cos($FA) local real y=GetUnitY(Yl)-Sin($FA) local real z=GetUnitFlyHeight(Yl)+300 local integer i=0 local integer id=0 local unit target=null local unit u call GroupEnumUnitsInRange(G,x,y,$5DC+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$5DC)then if nC[(GetUnitUserData((u)))]then set i=i+1 if GetRandomInt(1,i)==1 then set target=u endif endif endif endloop if target==null then set Boss_x[4]=GetRandomReal(0,3.28) set Boss_y[4]=GetRandomReal($96,300) set Boss_x[3]=GetUnitX(Yl)-Cos(Boss_x[4])*Boss_y[4] set Boss_y[3]=GetUnitX(Yl)-Sin(Boss_x[4])*Boss_y[4] set Boss_z[3]=0 else set Boss_x[3]=GetUnitX(target) set Boss_y[3]=GetUnitY(target) set Boss_z[3]=0 set target=null endif set Boss_x[4]=(Boss_x[3]-x) set Boss_y[4]=(Boss_y[3]-y) set Boss_z[4]=SquareRoot(Boss_x[4]*Boss_x[4]+Boss_y[4]*Boss_y[4]) set Boss_x[2]=x+(Boss_x[4])*.75 set Boss_y[2]=y+(Boss_y[4])*.75 set Boss_z[2]=Boss_z[4]/ 3+GetRandomReal(500,800) set Boss_x[1]=x-(Boss_x[4]/(Boss_z[4]+1))*$FA set Boss_y[1]=y-(Boss_y[4]/(Boss_z[4]+1))*$FA set Boss_z[1]=$5DC set Boss_Spell_data1[data]=0 set Boss_Spell_data2[data]=s__BezierCurve_Power3(x,y,z,Boss_x[1],Boss_y[1],Boss_z[1],Boss_x[2],Boss_y[2],Boss_z[2],Boss_x[3],Boss_y[3],Boss_z[3]) set Boss_Spell_data3[data]=LNv("waterarmor.mdl",x,y,z,.8) set Boss_Spell_X[data]=0 call Ltv(LIv("FreezingRing.mdl",x,y,300,2.25,a,120)) call PlaySoundAtPoint_BJ((vn),((100)*1.),((x)*1.),((y)*1.),0) call TimerStart(NewTimer(data),.03125,true,function Wae_3) endfunction function s__HealingTurtle_activate takes nothing returns nothing local integer s if GetRandomInt(1,2)==1 then set s=(GetUnitUserData((CreateUnit(P[$B],'hpxe',-5350,-$3723,0)))) else set s=(GetUnitUserData((CreateUnit(P[$B],'hpxe',$785,-$3723,$B4)))) endif call StartSound(Za) call PingMinimapEx(GetUnitX((Je[(s)])),GetUnitY((Je[(s)])),2,$FF,0,0,false) call TimerStart(NewTimer(s),.25,true,function Rxe) call Unit_App_Counter($8B,s) endfunction function Roe takes integer NNv returns unit return(Je[(NNv)]) endfunction function Rre takes integer NNv returns nothing if Bp[NNv]then set cp[Cp[NNv]]=cp[NNv] set Cp[cp[NNv]]=Cp[NNv] set Bp[NNv]=false if Cp[(0)]==0 then call frv(dp) endif call Unit_Cancel_Counter($8C,(NNv)) endif endfunction function Rie takes nothing returns boolean local integer NNv=Cp[(0)] local boolean Rae=false local unit u local real x local real y local real z loop exitwhen NNv==0 if UnitAlive((Je[((NNv))]))then if Rp[NNv]then if Ip[NNv]>0 then set Ip[NNv]=Ip[NNv]-1 if Ip[NNv]==0 then call Ltv(LNv("Abilities\\Spells\\Orc\\FeralSpirit\\feralspirittarget.mdl",GetUnitX((Je[((NNv))])),GetUnitY((Je[((NNv))])),GetUnitFlyHeight((Je[((NNv))])),2.5)) endif else set Ap[NNv]=Ap[NNv]+2 set z=MaxR(0,GetUnitFlyHeight((Je[((NNv))]))-Ap[NNv]) if z==0 then set Rp[NNv]=false set x=GetUnitX((Je[((NNv))])) set y=GetUnitY((Je[((NNv))])) call GroupEnumUnitsInRange(G,x,y,325+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,325)then if IsUnitAliveAndEnemy(u,(Je[((NNv))]))then call UnitDamageTargetBY((((Je[((NNv))]))),((u)),((((5000)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m2v(u,1,'A500','B500',true) endif endif endloop call Lqv(LAv("GroundExplosion2.mdl",x,y,.75),.375) call Ltv(Lbv(LVv('e004',x,y,0),1.75,.5)) call zHv(35,.5,x,y,600) call m_v((Je[((NNv))]),false) call UnitApplyTimedLife((Je[((NNv))]),'BTLF',120) endif call SetUnitFacingTimed((Je[((NNv))]),GetUnitFacing((Je[((NNv))]))+.03125*360,0) call SetUnitFlyHeight((Je[((NNv))]),z,0) endif endif set Rae=true else call Rre(NNv) endif set NNv=Cp[NNv] endloop return false endfunction function Rne takes integer NNv returns integer if not Bp[NNv]then if Cp[(0)]==0 then if dp==0 then set dp=fxv(function Rie) endif call fov(dp) endif set Cp[NNv]=Cp[(0)] set cp[Cp[(0)]]=NNv set Cp[(0)]=NNv set cp[NNv]=0 set Bp[NNv]=true call Unit_App_Counter($8D,(NNv)) endif return NNv endfunction function RVe takes unit u returns integer return Rne((GetUnitUserData((u)))) endfunction function REe takes nothing returns boolean local unit u local real x local real y if GetRandomInt(1,2)==1 then set x=GetUnitX((MF)) set y=GetUnitY((MF)) call GroupEnumUnitsInRange(G,x,y,$FA+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$FA)then if IsUnitAliveAndEnemyNotAvul(u,(mF))then call UnitDamageTargetBY((((mF))),((u)),(((($9C4)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call pmv(u,1.5) endif endif endloop call DestroyEffect(AddSpecialEffectTarget("WaterNovaTarget.mdl",(MF),"chest")) call Ltv(Lfv(LAv("AncientExplode.mdl",x,y,.625),25,25,$FF,$9B)) endif return false endfunction function RXe takes nothing returns boolean if GetRandomReal(1,2)==1 then if nC[(pF_v)]then call zKv((GetPlayerId((GetOwningPlayer((mF))))),$FF,27,27,.27) call zhv((GetPlayerId((GetOwningPlayer((mF))))),25,.27) endif call DestroyEffect(AddSpecialEffectTarget("blood.mdl",(mF),"chest")) call UnitDamageTargetBY((((MF))),(((mF))),((((MinR(.5*(DAK_AMOUNT[HF]),.125*GetUnitMaxLifeById((pF_v))))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) endif return false endfunction function ROe takes real x,real y,integer dl,boolean RRe returns nothing local integer NNv=(Rne((GetUnitUserData(((CreateUnit(P[$B],'n02R',x,y,bj_RADTODEG*Atan2(GetUnitY(Yl)-y,GetUnitX(Yl)-x)))))))) set Rp[NNv]=true set Ip[NNv]=dl set Ap[NNv]=0 set Np=(GetUnitUserData((Yl))) if RRe then call UnitAddPAttackTrig((NNv),function REe) else call UnitAddBePAttackTrig((NNv),function RXe) call ModifyUnitHP((NNv),R2I(GetUnitMaxLifeById((NNv)))) call ModifyUnitArmor((NNv),500) call SetUnitVertexColor((Je[((NNv))]),45,45,35,$FF) call SetUnitScale((Je[((NNv))]),1.25,1.25,1.25) endif call m_v((Je[((NNv))]),true) call SetUnitPosition((Je[((NNv))]),x,y) call UnitAddAbility((Je[((NNv))]),'Amrf') call UnitRemoveAbility((Je[((NNv))]),'Amrf') call SetUnitFlyHeight((Je[((NNv))]),800,0) endfunction function RIe takes integer NNv,unit s,unit t returns nothing if Fp[NNv]!=0 then call Unit_Cancel_Counter($8E,Fp[NNv]) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Demon\\DemonBoltImpact\\DemonBoltImpact.mdl",t,"origin")) call Puv("AFOD",s,t,1,1,0) call UnitDamageTargetBY((((Je[(Dp[NNv])]))),((t)),((((jp[NNv])*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) endif set Fp[NNv]=(GetUnitUserData((t))) call GroupAddUnit(gp[NNv],t) call Unit_App_Counter($8F,Fp[NNv]) endfunction function RAe takes nothing returns integer return D9v(Jp) endfunction function RNe takes integer NNv returns nothing call fvv(NNv) endfunction function Rbe takes nothing returns boolean local integer NNv=J[Jp] local unit u loop exitwhen 0==NNv set Hp[NNv]=Hp[NNv]+1 if Hp[NNv]>5 then set Hp[NNv]=0 set u=GroupPickRandomHeroInRange((Je[(Dp[NNv])]),GetUnitX((Je[(Dp[NNv])])),GetUnitY((Je[(Dp[NNv])])),$3E8,gp[NNv]) if Gp[NNv]<1 or u==null then call RecycleGroup(gp[NNv]) call Unit_Cancel_Counter($90,Dp[NNv]) call Unit_Cancel_Counter($91,Fp[NNv]) call fvv((NNv)) set gp[NNv]=null set Fp[NNv]=0 else set Gp[NNv]=Gp[NNv]-1 call RIe(NNv,(Je[(Fp[NNv])]),u) endif endif set NNv=K[NNv] endloop set u=null return false endfunction function RBe takes nothing returns nothing set Jp=fxv(function Rbe) endfunction function Rce takes unit s,unit t,real Njv returns nothing local integer NNv=(D9v(Jp)) set Dp[NNv]=(GetUnitUserData((s))) set gp[NNv]=NewGroup() set Gp[NNv]=2 set Hp[NNv]=0 set jp[NNv]=Njv call RIe(NNv,s,t) call Unit_App_Counter($92,Dp[NNv]) endfunction function RMe takes nothing returns boolean call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\FrostBolt\\FrostBoltMissile.mdl",(MF),"chest")) call UnitAppBuff((pF),'AUfn',$D0102) return false endfunction function Rpe takes nothing returns nothing local integer fx=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:94") local real x=(GetUnitX(II[(fx)])) local real y=(GetUnitY(II[(fx)])) local unit u if aP[fx]then set u=CreateUnit(P[$C],'otau',x,y,bj_RADTODEG*Atan2(GetUnitY((Je[(oP)]))-y,GetUnitX((Je[(oP)]))-x)) call UnitAddPAttackTrig((GetUnitUserData((u))),function RMe) call SetUnitVertexColor(u,$FF,$FF,$FF,$CD) call UnitApplyTimedLife(u,'Bply',30) endif call GroupEnumUnitsInRange(G,x,y,$A4+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$A4)then if IsUnitAliveAndEnemy(u,(Je[(oP)]))then call UnitDamageTargetBY((((Je[(oP)]))),((u)),(((($5DC)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call UnitAppBuff((GetUnitUserData((u))),'ACfn',$D0102) endif endif endloop call Ltv(LAv("Abilities\\Weapons\\FrostWyrmMissile\\FrostWyrmMissile.mdl",x,y,1.25)) call Ltv(fx) endfunction function RPe takes nothing returns nothing call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:95") call SetUnitTimeScale((Je[(oP)]),1) call PauseUnit((Je[(oP)]),false) call Unit_Cancel_Counter($93,oP) endfunction function Rqe takes nothing returns nothing local integer fx local unit u local real x local real y if UnitAlive((Je[(oP)]))and iP>0 then set x=GetUnitX((Je[(oP)])) set y=GetUnitY((Je[(oP)])) set fx=LAv("SnowyBlizzardTarget.mdl",x+GetRandomReal(-900,900),y+GetRandomReal(-900,900),1.5) set aP[fx]=ModuloInteger(iP,8)==0 set iP=iP-1 if ModuloInteger(iP,4)==0 then if ModuloInteger(iP,16)==0 then call GroupEnumUnitsInRange(G,x,y,600+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,600)then if IsUnitAliveAndEnemy(u,(Je[(oP)]))then call UnitDamageTargetBY((((Je[(oP)]))),((u)),(((($4B0)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop call Lqv(LAv("Shiva'sWrath.mdl",x,y,7.5),1.75) endif call LQv(LAv("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl",x+GetRandomReal(-700,700),y+GetRandomReal(-700,700),1.75),1.25) endif call TimerStart(NewTimer(fx),1,false,function Rpe) elseif UnitAlive((Je[(oP)]))then call QueueUnitAnimation((Je[(oP)]),"Stand") call TimerStart(GetExpiredTimer(),.5,false,function RPe) else call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:96") call Unit_Cancel_Counter($94,oP) endif endfunction function RQe takes nothing returns nothing call PauseUnit((Je[(oP)]),true) call SetUnitTimeScale((Je[(oP)]),.2) call SetUnitAnimation((Je[(oP)]),"Spell") call TimerStart(GetExpiredTimer(),.0625,true,function Rqe) endfunction function Rse takes nothing returns boolean set oP=(GetUnitUserData((GetTriggerUnit()))) set iP=80 call TimerStart((NewTimer(0)),0,false,function RQe) call Unit_App_Counter($95,oP) return false endfunction function RSe takes nothing returns nothing call RegisterSpellEffectEvent('A0BD',function Rse) endfunction function Rte takes nothing returns nothing local real x local real y local unit u set XP=XP-1 if XP>0 then set x=(GetUnitX(II[(VP)]))+RP set y=(GetUnitY(II[(VP)]))+IP call LKv(VP,x) call Llv(VP,y) if ModuloInteger(XP,2)==0 then call Lqv(LAv("BlizzardEruption.mdl",x+GetRandomReal(-500,500),y+GetRandomReal(-500,500),1.25),1.5) call LQv(LAv("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl",x+GetRandomReal(-500,500),y+GetRandomReal(-500,500),1.5),1.25) call Lqv(LAv("KnockbackDust.mdl",x+AP,y+NP,2.4),.85) call Lqv(LAv("KnockbackDust.mdl",x-AP,y-NP,2.4),.85) if ModuloInteger(XP,8)==0 then call Ltv(LIv("IceNova.mdl",x+1.5*RP,y+1.5*IP,$FA,3,OP+bj_PI,0)) endif endif call GroupEnumUnitsInRange(G,x,y,325+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,325)then if not IsUnitInGroup(u,EP)and IsUnitAliveAndEnemy(u,(Je[(nP)]))then call GroupAddUnit(EP,u) call UnitDamageTargetBY((((Je[(nP)]))),((u)),(((($2710)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v(u,2) if(Cos(((Atan2(GetUnitY(u)-y,GetUnitX(u)-x))*1.)-((OP+.25*Lx)*1.))>=Cos(((.25*Lx)*1.)))then call Gjv(u,25,OP+.25*Lx,.75,"KnockbackDust.mdl") else call Gjv(u,25,OP-.25*Lx,.75,"KnockbackDust.mdl") endif endif endif endloop else call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:97") call RecycleGroup(EP) call SetUnitDecay(II[VP],105,105,$FF,125,.75) call LQv(VP,.75) call Unit_Cancel_Counter($96,nP) set EP=null endif endfunction function RTe takes nothing returns nothing call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:98") call SetUnitTimeScale((Je[(nP)]),1) call PauseUnit((Je[(nP)]),false) endfunction function Rue takes nothing returns nothing if UnitAlive((Je[(nP)]))then set VP=LVv('e002',GetUnitX((Je[(nP)])),GetUnitY((Je[(nP)])),bj_RADTODEG*OP) set EP=NewGroup() set XP=40 set RP=40*Cos(OP) set IP=40*Sin(OP) set AP=$80*Cos(OP+.25*Lx) set NP=$80*Sin(OP+.25*Lx) call Lfv(VP,105,105,$FF,125) call SetUnitAnimationByIndex(II[VP],3) call QueueUnitAnimation((Je[(nP)]),"Stand") call TimerStart(GetExpiredTimer(),.03125,true,function Rte) call TimerStart((NewTimer(0)),.6,false,function RTe) else call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:99") call Unit_Cancel_Counter($97,nP) endif endfunction function RUe takes nothing returns boolean set nP=(GetUnitUserData((GetTriggerUnit()))) set OP=Atan2(GetSpellTargetY()-GetUnitY((Je[(nP)])),GetSpellTargetX()-GetUnitX((Je[(nP)]))) call PauseUnit((Je[(nP)]),true) call SetUnitFacing((Je[(nP)]),bj_RADTODEG*OP) call SetUnitTimeScale((Je[(nP)]),.8) call SetUnitAnimation((Je[(nP)]),"Spell") call TimerStart((NewTimer(0)),1.1,false,function Rue) call Unit_App_Counter($98,nP) return false endfunction function Rwe takes nothing returns boolean call PlaySoundOnUnit_BJ((On),((125)*1.),(GetTriggerUnit())) return false endfunction function RWe takes nothing returns nothing call RegisterSpellChannelEvent('A0BE',function Rwe) call RegisterSpellEffectEvent('A0BE',function RUe) endfunction function Rye takes nothing returns nothing local integer fx=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:100") local integer i=8 local real x=(GetUnitX(II[(fx)])) local real y=(GetUnitY(II[(fx)])) local real tX local real tY local real a local real d local unit u call GroupEnumUnitsInRange(G,x,y,275+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,275)then if IsUnitAliveAndEnemy(u,(Je[(qE)]))then call UnitDamageTargetBY((((Je[(qE)]))),((u)),(((($FA0)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call UnitAppBuff((GetUnitUserData((u))),'A0H7',$D006B) endif endif endloop loop set i=i-1 set a=i*Lx/ 8.+GetRandomReal(-.15,.15) set d=GetRandomReal(75,$AF) set tX=x+d*Cos(a) set tY=y+d*Sin(a) if ModuloInteger(i,4)==0 then call UnitApplyTimedLife(CreateUnit(GetOwningPlayer((Je[(qE)])),'h017',tX,tY,GetRandomReal(0,359)),'BTLF',60) call Ltv(Lfv(LAv("Objects\\Spawnmodels\\Human\\HumanLargeDeathExplode\\HumanLargeDeathExplode.mdl",tX,tY,2.5),$FF,0,0,$FF)) call Ltv(LAv("ChaosExplosion.mdx",tX,tY,.75)) else call Ltv(LAv("Objects\\Spawnmodels\\Human\\HumanLargeDeathExplode\\HumanLargeDeathExplode.mdl",tX,tY,1.5)) endif exitwhen i==0 endloop call Unit_Cancel_Counter($99,qE) call Ltv(fx) endfunction function RYe takes nothing returns boolean set qE=(GetUnitUserData((GetTriggerUnit()))) call NewTextTagInTarget_A((Je[(qE)]),"The chance to have a good meal is here!!",$FF,0,0) call TimerStart(NewTimer(LAv("BloodSlam.mdl",GetSpellTargetX(),GetSpellTargetY(),.875)),1,false,function Rye) call Unit_App_Counter($9A,qE) return false endfunction function Rze takes nothing returns nothing local integer i=6 if UnitAlive((Je[(bP)]))then call PauseUnit((Je[(bP)]),false) call QueueUnitAnimation((Je[(bP)]),"stand") endif loop set i=i-1 call Ltv(BP[i]) exitwhen i==0 endloop endfunction function RZe takes nothing returns nothing local unit u local integer i local real x local real y local real a local real d if UnitAlive((Je[(bP)]))then set cP=cP-1 if CP==0 then if cP<=0 then set CP=1 set cP=32 endif elseif CP==1 or CP==3 then set i=6 if CP==1 then set d=30 else set d=-40 endif loop set i=i-1 set x=(GetUnitX(II[(BP[i])])) set y=(GetUnitY(II[(BP[i])])) set a=Atan2(y-DP,x-dP) set x=x+d*Cos(a) set y=y+d*Sin(a) call LKv(BP[i],x) call Llv(BP[i],y) call GroupEnumUnitsInRange(G,x,y,$9C+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$9C)then if IsUnitOfPlayerNotseckill(u)then if nC[(GetUnitUserData((u)))]and KillUnitBJ(u)then call UnitCureTaret((Je[(bP)]),(Je[(bP)]),$186A0) endif call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",u,"origin")) endif endif endloop exitwhen i==0 endloop if cP<=0 then if CP==1 then set CP=2 set cP=16 else call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:101") call Rze() endif endif elseif CP==2 then set i=6 loop set i=i-1 set a=fP+(i/ 6.+1./ 12.-cP/ 192.)*Lx set x=dP+960*Cos(a) set y=DP+960*Sin(a) call LKv(BP[i],x) call Llv(BP[i],y) call SetUnitFacing(II[(BP[i])],((a)*1.)*bj_RADTODEG) call GroupEnumUnitsInRange(G,x,y,$9C+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$9C)then if IsUnitOfPlayerNotseckill(u)then call KillUnitBJ(u) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",u,"origin")) endif endif endloop exitwhen i==0 endloop if cP<=0 then set CP=3 set cP=24 endif endif else call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:102") call Rze() endif endfunction function R_e takes nothing returns boolean local integer i=6 local real a set bP=(GetUnitUserData((GetTriggerUnit()))) set CP=0 set cP=40 set dP=GetUnitX((Je[(bP)])) set DP=GetUnitY((Je[(bP)])) set fP=GetRandomReal(0,Lx) loop set i=i-1 set a=fP+i*Lx/ 6. set BP[i]=Lnv(dP+96*Cos(a),DP+96*Sin(a),a) call LMv(BP[i],"BloodySplat Missile.mdx") call SetUnitScale(II[(BP[i])],((3)*1.),0,0) call SetUnitFlyHeight(II[(BP[i])],((37.5)*1.),0) call LFv(BP[i],"Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl") exitwhen i==0 endloop call PauseUnit((Je[(bP)]),true) call TimerStart((NewTimer(0)),.03125,true,function RZe) call Ltv(LAv("BloodWave.mdx",dP,DP,1.5)) call Unit_App_Counter($9B,bP) return false endfunction function R0e takes nothing returns boolean call NewTextTagInTarget_A(GetTriggerUnit(),"All over to enlarge(29008)! ",$FF,0,0) return false endfunction function R1e takes nothing returns nothing call RegisterSpellChannelEvent('A0H5',function R0e) call RegisterSpellEffectEvent('A0H5',function R_e) endfunction function R2e takes nothing returns boolean call NewTextTagInTarget_A(GetTriggerUnit(),"Stop running! ",$FF,0,0) call DestroyEffect(AddSpecialEffectTarget("ChaosExplosion.mdx",GetTriggerUnit(),"origin")) return false endfunction function R3e takes nothing returns boolean local unit u=GetTriggerUnit() local unit t local real x=GetUnitX(u) local real y=GetUnitY(u) call GroupEnumUnitsInRange(G,x,y,900+75,null) loop set t=FirstOfGroup(G) exitwhen t==null call GroupRemoveUnit(G,t) if IsUnitInRangeXY(t,x,y,900)then if IsUnitAliveAndEnemy(t,u)then call UnitDamageTargetBY(((u)),((t)),(((($3A98)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v(t,1.5) endif endif endloop call ModifyUnitHP((GetUnitUserData((u))),$3D090) call ModifyUnitHpRegen((GetUnitUserData((u))),$3E8) call ModifyUnitAttack((GetUnitUserData((u))),5000) call ModifyUnitArmor((GetUnitUserData((u))),50) call PlaySoundOnUnit_BJ((fa),((100)*1.),(u)) call Ltv(LAv("BigBloodEX-NoSplat-NoGutz.mdx",x,y,5)) call Ltv(LAv("dragonslayve.mdl",x,y,4)) call UnitCureTaret(u,u,$7A120) set u=null return false endfunction function R4e takes nothing returns boolean call NewTextTagInTarget_A(GetTriggerUnit(),"Do not disturb me!!I need to exercise my muscles!",$FF,0,0) return false endfunction function R5e takes nothing returns nothing local unit u call GroupEnumUnitsInRect(YK,yK,null) loop set u=FirstOfGroup(YK) exitwhen u==null call GroupRemoveUnit(YK,u) if IsUnitAliveAndEnemyNotAvul(u,TK)then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",u,"origin")) call UnitDamageTargetBY(((TK)),((u)),((((7500)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endloop endfunction function R6e takes nothing returns nothing set hP=hP-1 call SetWidgetLife(FP,(1-hP/ 640.)*GetUnitState(FP,UNIT_STATE_MAX_LIFE)) if hP<1 then if HP==2 then call SetUnitColor(FP,PLAYER_COLOR_RED) call TimerStart(GP,5,true,function R5e) else call SetUnitInvulnerable(FP,false) call PauseTimer(GP) endif endif endfunction function R7e takes nothing returns nothing local unit u set hP=hP-1 call GroupEnumUnitsInRect(YK,yK,null) loop set u=FirstOfGroup(YK) exitwhen u==null call GroupRemoveUnit(YK,u) if IsUnitAliveAndEnemy(u,FP)then call SetWidgetLife(u,GetWidgetLife(u)+$BB8) endif endloop if hP<1 then call SetUnitVertexColor(FP,$FF-100*HP,$FF-100*HP,$FF-100*HP,$FF-100*HP) call UnitRemoveAbility(FP,'ACac') call TimerStart(GP,.03125,true,function R6e) call Ltv(gP) set hP=640 set gP=0 endif endfunction function R8e takes nothing returns nothing call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:103") call SetWidgetLife(FP,1) endfunction function R9e takes nothing returns boolean if hP==0 and GetWidgetLife(FP)-GetDamage()<=.405 then set gP=LAv("Abilities\\Spells\\NightElf\\Tranquility\\Tranquility.mdl",GetUnitX(FP),GetUnitY(FP),3) set hP=36 set HP=HP+1 set KF[HF]=PF+1000000. call SetUnitInvulnerable(FP,true) call UnitAddAbility(FP,'ACac') call UnitRemoveAbility(FP,'A0BG') call SetUnitVertexColor(FP,$FF,$FF,$FF,$FF) call TimerStart((NewTimer(0)),0,false,function R8e) call TimerStart(GP,.5,true,function R7e) endif return false endfunction function s__LifeOrb_cleanUp takes nothing returns nothing if gP!=0 then call Ltv(gP) set gP=0 endif call Ltv(LAv("NatureExplosion.mdl",GetUnitX(FP),GetUnitY(FP),3)) call RemoveUnitBJ(FP,4) call ReleaseTimer(GP,"[TimerUtils]Error:104") set FP=null set GP=null endfunction function s__LifeOrb_initialize takes nothing returns nothing set GP=(NewTimer(0)) call UnitAddAbility(FP,'A0BG') call UnitAddAbility(FP,'Amrf') call UnitRemoveAbility(FP,'Amrf') call SetUnitFlyHeight(FP,$C8,0) call SetUnitInvulnerable(FP,false) call UnitAddBeDamagerTrig((GetUnitUserData((FP))),function R9e) endfunction function Ive takes nothing returns nothing set FP=gg_unit_hsor_0314 call SetUnitInvulnerable(FP,true) endfunction function Iee takes integer NNv returns nothing if jP[NNv]!=0 then call DestroyEffectBY(jP[NNv]) set jP[NNv]=0 endif endfunction function Ixe takes integer NNv returns boolean local unit u call GroupEnumUnitsInRange(G,s__barrage_X[NNv],s__barrage_Y[NNv],275+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,s__barrage_X[NNv],s__barrage_Y[NNv],275)then if IsUnitAliveAndEnemy(u,TK)then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",u,"origin")) call UnitDamageTargetBY(((TK)),((u)),((((6000)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v(u,2.5) endif endif endloop call Lqv(LAv("Abilities\\Spells\\Undead\\Darksummoning\\DarkSummonTarget.mdl",s__barrage_X[NNv],s__barrage_Y[NNv],2),1) call Ltv(Lfv(LAv("Abilities\\Spells\\Undead\\DarkRitual\\DarkRitualTarget.mdl",s__barrage_X[NNv],s__barrage_Y[NNv],2.25),55,$FF,55,$CD)) return true endfunction function Ioe takes integer NNv,unit u returns boolean return IsUnitAliveAndEnemy(u,TK)and GetUnitAbilityLevel(u,'Avul')==0 endfunction function Ire takes integer NNv returns boolean set JP[NNv]=JP[NNv]+1 if not UnitAlive(TK)then return true elseif JP[NNv]>32 then set s__barrage_speed[NNv]=40.-10.*JP[NNv]/ 32. if ModuloInteger(JP[NNv],4)==0 then call LFv(s__barrage_model[NNv],"Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl") endif else if JP[NNv]==32 then set jP[NNv]=(s__Effect_build(AddSpecialEffectTarget(("EvilMissileofShadowyDOOMV2.mdl"),(II[s__barrage_model[NNv]]),("origin")))) set s__barrage_speed[NNv]=30 set s__barrage_CollisionRange[NNv]=$80 endif call Lfv(s__barrage_model[NNv],$9B,$FF,$9B,55+R2I((2-JP[NNv]/ 32)*$CD)) endif return false endfunction function Iie takes integer NNv returns nothing call Iee(NNv) call RemoveBarrage(NNv) endfunction function Iae takes nothing returns boolean local integer NNv=s__barrage_FR[kP] local unit u if NNv!=kP then call UseBarrage(kP) loop exitwhen NNv==kP if(s__barrage_outside[(NNv)])then call Ixe(NNv) call Iie(NNv) elseif(s__barrage_finish[(NNv)])then if Ixe(NNv)then call Iie(NNv) else set s__barrage_finish[(NNv)]=false endif else if Ire(NNv)then call Iie(NNv) endif if s__barrage_CollisionRange[NNv]!=0 then call GroupEnumUnitsInRange(G,s__barrage_X[NNv],s__barrage_Y[NNv],s__barrage_CollisionRange[NNv]+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,s__barrage_X[NNv],s__barrage_Y[NNv],s__barrage_CollisionRange[NNv])then if not IsUnitInGroup(u,s__barrage_enum_g[NNv])then call GroupAddUnit(s__barrage_enum_g[NNv],u) if u!=s__barrage_target[NNv]and Ioe(NNv,u)then set u=null call Ixe(NNv) call Iie(NNv) exitwhen true endif endif endif endloop endif endif set NNv=s__barrage_FR[NNv] endloop elseif s__barrage_InOperation[kP]then set s__barrage_InOperation[kP]=false call TriggerEvaluate(OTv) endif return false endfunction function Ine takes nothing returns nothing call fov(KP) endfunction function s__DeathCoil___Coil_stop takes nothing returns nothing call frv(KP) endfunction function IVe takes nothing returns nothing set KP=fxv(function Iae) call fov(KP) endfunction function IEe takes integer NNv returns nothing call s__barrage_Filling((kP),(NNv)) if not s__barrage_InOperation[kP]then set s__barrage_InOperation[kP]=true call fov(KP) endif endfunction function IXe takes nothing returns nothing set kP=NewLauncher() set s__barrage_InOperation[kP]=true endfunction function IOe takes real x,real y,real a returns nothing local integer NNv=CreateBarrageTypeD(x,y,75,x+$500*Cos(a),y+$500*Sin(a),75) set s__barrage_speed[NNv]=0 call LMv(s__barrage_model[NNv],"Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilMissile.mdl") call SetUnitScale(II[(s__barrage_model[NNv])],((1.5)*1.),0,0) call SetUnitFlyHeight(II[(s__barrage_model[NNv])],((75)*1.),0) set JP[NNv]=0 call Lfv(s__barrage_model[NNv],$9B,$FF,$9B,55) call IEe(NNv) endfunction function IRe takes nothing returns nothing local unit u local integer i local real a call LKv(lP,BezierCurveBYCube(pP,sP,SP,qP,uP)) call Llv(lP,BezierCurveBYCube(PP,tP,TP,QP,uP)) call SetUnitFlyHeight(II[(lP)],((BezierCurveBYCube(750,550,$C8,0,uP))*1.),0) set uP=uP+.03125 if uP>=1 then set i=8 loop set i=i-1 set a=i*Lx/ 8 if wK>2 then call IOe(qP+$E1*Cos(a),QP+$E1*Sin(a),a) endif call Ltv(Lfv(LAv("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",qP+$E1*Cos(a),QP+$E1*Sin(a),1.5),$9B,$FF,0,$FF)) exitwhen i==0 endloop call GroupEnumUnitsInRange(G,qP,QP,325+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,qP,QP,325)then if IsUnitAliveAndEnemy(u,TK)then call UnitDamageTargetBY(((TK)),((u)),(((($2710+.2*GetUnitMaxLifeById((GetUnitUserData((u)))))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",u,"origin")) call Gjv(u,25,Atan2(GetUnitY(u)-QP,GetUnitX(u)-qP),.5,"KnockbackDust.mdl") call m1v(u,.625) endif endif endloop call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:105") call Ltv(LAv("Acid Ex.mdl",qP,QP,2.25)) call Ltv(lP) call Ltv(LP) endif endfunction function IIe takes nothing returns nothing set MP=MP+1 call Lfv(LP,0,$FF,0,R2I(255./ 16.*MP)) if MP>=16 then call TimerStart(GetExpiredTimer(),.03125,true,function IRe) endif endfunction function IAe takes nothing returns boolean local real rA=GetRandomReal(-.15,.15) local real a set pP=GetUnitX(TK) set PP=GetUnitY(TK) set qP=GetSpellTargetX() set QP=GetSpellTargetY() set a=Atan2(QP-PP,qP-pP) set lP=Lnv(pP,PP,a) call LMv(lP,"Abilities\\Weapons\\AvengerMissile\\AvengerMissile.mdl") call SetUnitScale(II[(lP)],((5)*1.),0,0) call SetUnitFlyHeight(II[(lP)],((750)*1.),0) set LP=Lfv(LAv("VoidDrown.mdl",qP,QP,1.75),0,$FF,0,0) set sP=pP+$FA*Cos(a+rA) set tP=PP+$FA*Sin(a+rA) set SP=qP+$C8*Cos(a+bj_PI-rA) set TP=QP+$C8*Sin(a+bj_PI-rA) set MP=0 set uP=0 call TimerStart((NewTimer(0)),.03125,true,function IIe) return false endfunction function INe takes nothing returns boolean call NewTextTagInTarget_A(TK,"Death Coil",55,$FF,55) call TimerDestroyEffectBY((s__Effect_build(AddSpecialEffectTarget(("Gravitone.mdl"),(TK),("origin")))),.75) return false endfunction function Ibe takes nothing returns nothing call RegisterSpellChannelEvent('A0BQ',function INe) call RegisterSpellEffectEvent('A0BQ',function IAe) endfunction function IBe takes nothing returns nothing local integer NNv=WP[(0)] local unit u local real x local real y loop exitwhen NNv==0 set yP[NNv]=yP[NNv]-1 if not UnitAlive(TK)or yP[NNv]<1 then set wP[WP[NNv]]=wP[NNv] set WP[wP[NNv]]=WP[NNv] if WP[(0)]==0 then set YP=false call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:106") endif call Ltv((NNv)) call LTv(UP[NNv]) elseif yP[NNv]<$A1 then set x=(GetUnitX(II[((NNv))])) set y=(GetUnitY(II[((NNv))])) call GroupEnumUnitsInRange(G,x,y,$C4+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$C4)then if not IsUnitInGroup(u,YK)and IsUnitAliveAndEnemy(u,TK)then call GroupAddUnit(YK,u) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\AcidBomb\\BottleMissile.mdl",u,"chest")) call UnitDamageTargetBY(((TK)),((u)),((((.0375*GetUnitMaxLifeById((GetUnitUserData((u))))+625)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop endif set NNv=WP[NNv] endloop call GroupClear(YK) endfunction function Ice takes real x,real y returns nothing local integer NNv=LAv("Poison_Pool.mdl",x,y,1.1) set WP[NNv]=WP[(0)] set wP[NNv]=0 set wP[WP[(0)]]=NNv set WP[(0)]=NNv set UP[NNv]=Lfv(LAv("Abilities\\Spells\\NightElf\\TrueshotAura\\TrueshotAura.mdl",x,y,1.75),0,$FF,0,$CD) set yP[NNv]=$A8 call Lfv((NNv),$FF,$FF,$FF,$CD) call Ltv(LAv("Abilities\\Spells\\Other\\AcidBomb\\BottleMissile.mdl",x,y,1.25)) call Ltv(LAv("CenarionFury.mdl",x,y,.75)) if not YP then set YP=true call TimerStart((NewTimer(0)),.25,true,function IBe) endif endfunction function ICe takes nothing returns nothing set ZP=ZP-1 if UnitAlive((Je[(zP)]))and UnitAlive(TK)and ZP>0 then call UnitDamageTargetBY(((TK)),(((Je[(zP)]))),(((($C8)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") if ModuloInteger(ZP,4)==0 then call Ice(GetUnitX((Je[(zP)])),GetUnitY((Je[(zP)]))) endif else call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:107") call UnitRemoveAbilityandBuffBY((Je[(zP)]),'A0BP','Broa') call SetUnitVertexColor((Je[(zP)]),$FF,$FF,$FF,$FF) call Unit_Cancel_Counter($9C,zP) endif endfunction function Ide takes nothing returns nothing local unit u=(Je[(ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:108"))]) call DestroyEffect(AddSpecialEffectTarget("WaterBlast.mdx",u,"head")) call NewTextTagInTarget_B(u,"The sun shines!",7.5,125,125,125) set u=null endfunction function IDe takes nothing returns boolean local unit u=GetTriggerUnit() local real x=GetUnitX(u) local real y=GetUnitY(u) if(IsUnitType((u),UNIT_TYPE_GIANT))then call GroupEnumUnitsInRange(G,x,y,750+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,750)then if IsUnitAliveAndEnemy(u,TK)then call Ltv(LAv("Abilities\\Spells\\Other\\AcidBomb\\BottleMissile.mdl",GetUnitX(u),GetUnitY(u),1.25)) call UnitDamageTargetBY(((TK)),((u)),((((5000+.25*GetUnitMaxLifeById((GetUnitUserData((u)))))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop set u=PickRandomVisibleHeroInRange(TK,x,y,750) if u!=null then set zP=(GetUnitUserData((u))) set ZP=60 call NewTextTagInTarget_B(u,"|c0095caff"+(Game_PlayerName[Kc[((GetUnitUserData((u))))]])+" |c002c8b10",$F,$FF,$FF,$FF) call StartSound(Za) call UnitAddAbilityBY(u,'A0BP') call Ltv(LAv("CenarionFury.mdl",GetUnitX(u),GetUnitY(u),.5)) call SetUnitVertexColor(u,125,$FF,125,$E1) call TimerStart((NewTimer(0)),.3,true,function ICe) call Unit_App_Counter($9D,zP) set u=null endif call Ltv(LAv("Acid Ex.mdl",x,y,5)) call Lqv(LAv("Abilities\\Spells\\Undead\\Darksummoning\\DarkSummonTarget.mdl",x,y,5),1) call Ltv(Lfv(LAv("Abilities\\Spells\\Undead\\DarkRitual\\DarkRitualTarget.mdl",x,y,6.5),55,$FF,55,$CD)) call zHv(50,.5,x,y,750) else call NewTextTagInTarget_B(u,"|c0095caff"+GetUnitName(u)+" |c002c8b10!",9,$FF,$FF,$FF) call Ltv(LAv("CenarionFury.mdl",GetUnitX(u),GetUnitY(u),.25)) call Ltv(LAv("Acid Ex.mdl",x,y,1.25)) call Lqv(LAv("Abilities\\Spells\\Undead\\Darksummoning\\DarkSummonTarget.mdl",x,y,1.25),1) call Ltv(Lfv(LAv("Abilities\\Spells\\Undead\\DarkRitual\\DarkRitualTarget.mdl",x,y,1.5),55,$FF,55,$CD)) call TimerStart(NewTimer((GetUnitUserData((u)))),1.5,true,function Ide) call zhv((GetPlayerId((GetOwningPlayer(u)))),30,.5) endif set u=null return false endfunction function Ife takes nothing returns boolean if(IsUnitType((GetTriggerUnit()),UNIT_TYPE_GIANT))then call NewTextTagInTarget_A(TK,"Struggling in the plague !",55,$FF,55) else call NewTextTagInTarget_A(TK,"Struggling in the plague !",55,$FF,55) endif return false endfunction function IFe takes nothing returns nothing call RegisterSpellChannelEvent('A0BO',function Ife) call RegisterSpellChannelEvent('A0KZ',function Ife) call RegisterSpellEffectEvent('A0BO',function IDe) call RegisterSpellEffectEvent('A0KZ',function IDe) endfunction function Ige takes nothing returns nothing if xq!=0 then call Ltv(xq) set xq=0 endif if oq!=0 then call Ltv(oq) set oq=0 endif call DestroyLightning(rq) call Unit_Cancel_Counter($9E,vq) call Unit_Cancel_Counter($9F,eq) set rq=null endfunction function IGe takes nothing returns nothing local unit u local real x local real y local real z local real fX local real fY local real tX local real tY local real tZ local real dX local real dY local real a local real r if UnitAlive((Je[(vq)]))and UnitAlive((Je[(eq)]))and UnitAlive(TK)then set x=GetUnitX((Je[(vq)])) set y=GetUnitY((Je[(vq)])) set tX=GetUnitX((Je[(eq)])) set tY=GetUnitY((Je[(eq)])) set dX=tX-x set dY=tY-y set r=SquareRoot(dX*dX+dY*dY) if r>$FA0 then call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:109") call Ige() else set iq=iq-1 set z=60+GetUnitFlyHeight((Je[(vq)])) set tZ=60+GetUnitFlyHeight((Je[(eq)])) call MoveLightningEx(rq,true,x,y,z+GetPointZ(x,y),tX,tY,tZ+GetPointZ(tX,tY)) if aq==0 then set a=I2R(iq)/ I2R(QE) call LKv(xq,x+dX*a) call Llv(xq,y+dY*a) call SetUnitFlyHeight(II[(xq)],((z+(tZ-z)*a)*1.),0) call LKv(oq,tX-dX*a) call Llv(oq,tY-dY*a) call SetUnitFlyHeight(II[(oq)],((tZ-(tZ-z)*a)*1.),0) if iq<1 then call SetUnitPosition((Je[(eq)]),x+.5*dX,y+.5*dY) call SetUnitPosition((Je[(vq)]),tX,tY) call SetUnitPosition((Je[(eq)]),x,y) call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",x,y)) call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",tX,tY)) call Ltv(LAv("DesecrateGreen.mdx",x,y,.625)) call Ltv(LAv("DesecrateGreen.mdx",tX,tY,.625)) call UnitDamageTargetBY(((TK)),(((Je[(vq)]))),((((7500)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call UnitDamageTargetBY(((TK)),(((Je[(eq)]))),((((7500)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v((Je[(vq)]),.5) call m1v((Je[(eq)]),.5) call zhv((GetPlayerId((GetOwningPlayer((Je[(vq)]))))),40,.5) call zhv((GetPlayerId((GetOwningPlayer((Je[(eq)]))))),40,.5) call Ltv(xq) call Ltv(oq) call GroupEnumUnitsInRange(G,x,y,350+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,350)then if u!=(Je[(eq)])and GetUnitAbilityLevel(u,'Avul')==0 and IsUnitAliveAndEnemy(u,TK)then call DestroyEffect(AddSpecialEffectTarget("EvilMissileofShadowyDOOMV2.mdl",u,"chest")) call KillUnit(u) endif endif endloop call GroupEnumUnitsInRange(G,tX,tY,350+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,tX,tY,350)then if u!=(Je[(vq)])and GetUnitAbilityLevel(u,'Avul')==0 and IsUnitAliveAndEnemy(u,TK)then call DestroyEffect(AddSpecialEffectTarget("EvilMissileofShadowyDOOMV2.mdl",u,"chest")) call KillUnit(u) endif endif endloop set aq=1 set iq=16 set xq=0 set oq=0 elseif ModuloInteger(iq,8)==0 then set a=Atan2(dY,dX)+.5*bj_PI set r=.5*r set dX=x+.5*dX set dY=y+.5*dY set x=x-32*Cos(a) set y=y-32*Sin(a) set fX=x+64*Cos(a) set fY=y+64*Sin(a) set tX=tX-32*Cos(a) set tY=tY-32*Sin(a) call GroupEnumUnitsInRange(G,dX,dY,r+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,dX,dY,r)then if u!=(Je[(vq)])and u!=(Je[(eq)])and IsUnitAliveAndEnemyNotAvul(u,TK)and MBv(GetUnitX(u),GetUnitY(u),x,y,tX,tY,fX,fY)then call UnitDamageTargetBY(((TK)),((u)),((((5000)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call DestroyEffect(AddSpecialEffectTarget("EvilMissileofShadowyDOOMV2.mdl",u,"chest")) endif endif endloop endif else call SetLightningColor(rq,1,1,1,iq/ 16) if iq<1 then call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:110") call Ige() endif endif endif else call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:111") call Ige() endif endfunction function Ihe takes nothing returns boolean local unit t=GetSpellTargetUnit() local unit u local real x local real y local real z local real tX local real tY local real tZ call GroupEnumUnitsInRect(YK,yK,null) call GroupRemoveUnit(YK,t) loop set u=FirstOfGroup(YK) exitwhen u==null call GroupRemoveUnit(YK,u) exitwhen nC[(GetUnitUserData((u)))]and IsUnitVisible(u,GetOwningPlayer(TK)) endloop if u==null then call UnitDamageTargetBY(((TK)),((t)),((((7500)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v(t,2.5) call Lqv(Lfv(LAv("Abilities\\Spells\\Undead\\RaiseSkeletonWarrior\\RaiseSkeleton.mdl",GetUnitX(t),GetUnitY(t),2.25),105,$FF,105,$FF),1.5) else set vq=(GetUnitUserData((t))) set eq=(GetUnitUserData((u))) set x=GetUnitX(t) set y=GetUnitY(t) set z=GetPointZ(x,y) set tX=GetUnitX(u) set tY=GetUnitY(u) set tZ=GetPointZ(tX,tY) set rq=AddLightningEx("DRAL",true,x,y,z+GetUnitFlyHeight(t),tX,tY,tZ+GetUnitFlyHeight(u)) set xq=LNv("Abilities\\Spells\\Undead\\DarkSummoning\\DarkSummonMissile.mdl",x,y,z,1.5) call SetUnitScale(II[(xq)],((.75)*1.),0,0) set oq=LNv("Abilities\\Spells\\Undead\\DarkSummoning\\DarkSummonMissile.mdl",tX,tY,tZ,1.5) call SetUnitScale(II[(oq)],((.75)*1.),0,0) set iq=QE set aq=0 call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl",u,"origin")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",u,"origin")) call TimerStart((NewTimer(0)),.03125,true,function IGe) call Unit_App_Counter($A0,vq) call Unit_App_Counter($A1,eq) set u=null endif call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl",t,"origin")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",t,"origin")) set t=null return false endfunction function IHe takes nothing returns boolean call NewTextTagInTarget_A(TK,"I wish you happiness!",55,$FF,55) return false endfunction function Ije takes nothing returns nothing call RegisterSpellChannelEvent('A0BH',function IHe) call RegisterSpellEffectEvent('A0BH',function Ihe) endfunction function IJe takes integer NNv returns boolean if UnitAlive(s__barrage_target[NNv])then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",s__barrage_target[NNv],"origin")) call UnitDamageTargetBY(((s__barrage_atkunit[NNv])),((s__barrage_target[NNv])),(((($9C4)*1.))*1.),false,(true),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m2v(s__barrage_target[NNv],2.5,'A500','B500',true) endif return true endfunction function Ike takes integer NNv returns nothing call RemoveBarrage(NNv) endfunction function IKe takes nothing returns boolean local integer NNv=s__barrage_FR[nq] local unit u if NNv!=nq then call UseBarrage(nq) loop exitwhen NNv==nq if(s__barrage_outside[(NNv)])then call IJe(NNv) call RemoveBarrage((NNv)) elseif(s__barrage_finish[(NNv)])then if IJe(NNv)then call RemoveBarrage((NNv)) else set s__barrage_finish[(NNv)]=false endif endif set NNv=s__barrage_FR[NNv] endloop elseif s__barrage_InOperation[nq]then set s__barrage_InOperation[nq]=false call TriggerEvaluate(Ouv) endif return false endfunction function Ile takes nothing returns nothing call fov(Vq) endfunction function s__DeathFinger_stop takes nothing returns nothing call frv(Vq) endfunction function ILe takes nothing returns nothing set Vq=fxv(function IKe) call fov(Vq) endfunction function Ime takes integer NNv returns nothing call s__barrage_Filling((nq),(NNv)) if not s__barrage_InOperation[nq]then set s__barrage_InOperation[nq]=true call fov(Vq) endif endfunction function IMe takes nothing returns nothing set nq=NewLauncher() set s__barrage_InOperation[nq]=true endfunction function Ipe takes nothing returns boolean local integer NNv=CreateBarrageTypeA(GetTriggerUnit(),GetSpellTargetUnit()) set s__barrage_speed[NNv]=.03125*900. set s__barrage_acceleration[NNv]=.03125*.03125*1800. call LMv(s__barrage_model[NNv],"Abilities\\Spells\\Undead\\DarkSummoning\\DarkSummonMissile.mdl") call SetUnitScale(II[(s__barrage_model[NNv])],((2.25)*1.),0,0) call NewTextTagInTarget_A(s__barrage_atkunit[NNv],"Sample run?",0,$FF,0) call Ime(NNv) return false endfunction function IPe takes nothing returns nothing call RegisterSpellChannelEvent('A0MM',function Ipe) endfunction function Iqe takes nothing returns boolean call NewTextTagInTarget_A(GetTriggerUnit(),"Hey!!Stop running!!",0,$FF,0) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl",GetTriggerUnit(),"origin")) return false endfunction function IQe takes nothing returns boolean call NewTextTagInTarget_A(GetTriggerUnit(),"Come out!Slaves!!",$FF,0,0) return false endfunction function Ise takes nothing returns boolean call NewTextTagInTarget_A(GetTriggerUnit(),"Kill will be funny!!!",$FF,0,0) return false endfunction function ISe takes nothing returns boolean local unit c=GetTriggerUnit() local unit u local boolean Ite=(IsUnitType((c),UNIT_TYPE_GIANT)) local integer i=8 local real x=GetUnitX(c) local real y=GetUnitY(c) local real a loop set i=i-1 set a=bj_PI*i/ 4 if Ite then call Ltv(Lbv(LVv('e00A',x+600*Cos(a),y+600*Sin(a),0),8,.5)) else call Ltv(Lbv(LVv('e00A',x+$C8*Cos(a),y+$C8*Sin(a),0),1.25,.5)) endif exitwhen i==0 endloop if Ite then call GroupEnumUnitsInRange(G,x,y,$3E8+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$3E8)then if IsUnitAliveAndEnemy(u,c)then call UnitDamageTargetBY(((c)),((u)),(((($3A98)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v(u,.5) endif endif endloop endif set c=null return false endfunction function ITe takes nothing returns boolean if(IsUnitType((GetTriggerUnit()),UNIT_TYPE_GIANT))then call NewTextTagInTarget_A(GetTriggerUnit(),"Hellfire!!!",$FF,0,0) else call NewTextTagInTarget_A(GetTriggerUnit(),"It's you again?!",$FF,0,0) endif return false endfunction function Iue takes nothing returns nothing local timer t=GetExpiredTimer() local integer NNv=(alloc__hpv(GetHandleId((t)))) local unit u local real x local real y if UnitAlive((Je[(NNv)]))then set x=GetUnitX((Je[(NNv)])) set y=GetUnitY((Je[(NNv)])) if Oq[NNv]>0 then set Oq[NNv]=Oq[NNv]-1 set x=x+Rq[NNv] set y=y+Iq[NNv] call SetUnitX((Je[(NNv)]),x) call SetUnitY((Je[(NNv)]),y) if Xq[NNv]then if ModuloInteger(Oq[NNv],2)==0 then call Ltv(LAv("Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl",x,y,3)) endif call GroupEnumUnitsInRange(G,x,y,275+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,275)then if IsUnitOfPlayerNotseckill(u)then call KillUnitBJ(u) endif endif endloop elseif ModuloInteger(Oq[NNv],3)==0 then call Ltv(LAv("Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl",x,y,.75)) endif else if Xq[NNv]then call GroupEnumUnitsInRange(G,x,y,650+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,650)then if IsUnitOfPlayerNotseckill(u)then call KillUnitBJ(u) endif endif endloop call Lqv(LAv("Abilities\\Spells\\Orc\\EarthQuake\\EarthQuakeTarget.mdl",x,y,3),3) call Ltv(LAv("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl",x,y,5)) call Ltv(LAv("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl",x,y,5)) call m1v((Je[(NNv)]),$A) else call Lqv(LAv("Abilities\\Spells\\Orc\\EarthQuake\\EarthQuakeTarget.mdl",x,y,.75),3) call Ltv(LAv("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl",x,y,.75)) call Ltv(LAv("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl",x,y,.75)) endif call ReleaseTimer(t,"[TimerUtils]Error:112") call PauseUnit((Je[(NNv)]),false) call SetUnitPathing((Je[(NNv)]),true) call SetUnitAnimationByIndex((Je[(NNv)]),3) call Unit_Cancel_Counter($A2,(NNv)) call LTv(Eq[NNv]) endif else call ReleaseTimer(t,"[TimerUtils]Error:113") call Unit_Cancel_Counter($A3,(NNv)) call LTv(Eq[NNv]) endif set t=null endfunction function IUe takes nothing returns nothing local timer t=GetExpiredTimer() local integer NNv=(alloc__hpv(GetHandleId((t)))) if UnitAlive((Je[(NNv)]))then call SetUnitAnimationByIndex((Je[(NNv)]),8) call TimerStart(t,.03125,true,function Iue) else call ReleaseTimer(t,"[TimerUtils]Error:114") call Unit_Cancel_Counter($A4,(NNv)) call LTv(Eq[NNv]) endif set t=null endfunction function Iwe takes nothing returns boolean local integer NNv=(GetUnitUserData((GetTriggerUnit()))) local real x=GetUnitX((Je[(NNv)])) local real y=GetUnitY((Je[(NNv)])) local real a=Atan2(GetSpellTargetY()-y,GetSpellTargetX()-x) set Xq[NNv]=(IsUnitType(((Je[(NNv)])),UNIT_TYPE_GIANT)) set Oq[NNv]=0 if Xq[NNv]then set Rq[NNv]=55*Cos(a) set Iq[NNv]=55*Sin(a) else set Rq[NNv]=30*Cos(a) set Iq[NNv]=30*Sin(a) endif loop set x=x+Rq[NNv] set y=y+Iq[NNv] exitwhen Oq[NNv]==18 or not IsTerrainWalkable(x,y) set Oq[NNv]=Oq[NNv]+1 endloop if Xq[NNv]then set Eq[NNv]=LAv("Abilities\\Spells\\NightElf\\TrueshotAura\\TrueshotAura.mdl",x,y,4.5) else set Eq[NNv]=LAv("Abilities\\Spells\\NightElf\\TrueshotAura\\TrueshotAura.mdl",x,y,.875) endif call PauseUnit((Je[(NNv)]),true) call SetUnitPathing((Je[(NNv)]),false) call SetUnitFacingTimed((Je[(NNv)]),bj_RADTODEG*a,0) call TimerStart(NewTimer(NNv),2.25,false,function IUe) call Unit_App_Counter($A5,(NNv)) return false endfunction function IWe takes nothing returns boolean if(IsUnitType((GetTriggerUnit()),UNIT_TYPE_GIANT))then call NewTextTagInTarget_A(GetTriggerUnit(),"Nothing can't stop me !",0,0,$FF) call PlaySoundAtPoint_BJ((Ua),((125)*1.),((GetUnitX(GetTriggerUnit()))*1.),((GetUnitY(GetTriggerUnit()))*1.),0) else call NewTextTagInTarget_A(GetTriggerUnit(),"This can not stop me !",0,0,$FF) call PlaySoundAtPoint_BJ((Ua),((75)*1.),((GetUnitX(GetTriggerUnit()))*1.),((GetUnitY(GetTriggerUnit()))*1.),0) endif return false endfunction function Iye takes nothing returns nothing call RegisterSpellEffectEvent('A008',function Iwe) call RegisterSpellEffectEvent('A0L1',function Iwe) call RegisterSpellChannelEvent('A008',function IWe) call RegisterSpellChannelEvent('A0L1',function IWe) endfunction function IYe takes nothing returns boolean local unit c=GetTriggerUnit() local unit u local integer i=8 local real x=GetUnitX(c) local real y=GetUnitY(c) local real a local real d call Lqv(LAv("Abilities\\Spells\\Orc\\EarthQuake\\EarthQuakeTarget.mdl",x,y,2.5),3) loop set i=i-1 set a=bj_PI*i/ 4 set d=GetRandomReal($C8,600) call Ltv(LAv("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl",x+d*Cos(a),y+d*Sin(a),2)) exitwhen i==0 endloop call GroupEnumUnitsInRange(G,x,y,500+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,500)then if IsUnitAliveAndEnemy(u,c)then call UnitDamageTargetBY(((c)),((u)),((((7500+GetWidgetLife(u)*.25)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v(u,5) endif endif endloop set c=null return false endfunction function Ize takes nothing returns boolean call NewTextTagInTarget_A(GetTriggerUnit(),"All over to enlarge! ",0,0,$FF) return false endfunction function IZe takes nothing returns boolean call NewTextTagInTarget_A(GetTriggerUnit(),"Trample crazy!!!",0,$FF,0) return false endfunction function I_e takes nothing returns boolean call NewTextTagInTarget_A(GetTriggerUnit(),"All over to enlarge! ",0,$FF,0) return false endfunction function I0e takes nothing returns boolean local unit u=GetTriggerUnit() local real a=GetUnitFacing(u)*bj_DEGTORAD call GJv(GetSpellTargetUnit(),GetUnitX(u)+100*Cos(a),GetUnitY(u)+100*Sin(a),.25) set u=null return false endfunction function I1e takes nothing returns nothing local real x=(GetUnitX(II[(SE)]))+uE local real y=(GetUnitY(II[(SE)]))+UE local unit u call LKv(SE,x) call Llv(SE,y) set TE=TE-1 call GroupEnumUnitsInRange(G,x,y,300+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,300)then if not IsUnitInGroup(u,tE)and IsUnitAliveAndEnemy(u,(Je[(sE)]))then call GroupAddUnit(tE,u) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",u,"origin")) call UnitDamageTargetBY((((Je[(sE)]))),((u)),((((7500)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop if TE<=0 then call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:115") call RecycleGroup(tE) call Ltv(SE) set tE=null endif endfunction function I2e takes nothing returns boolean local real x local real y local real a set sE=(GetUnitUserData((GetTriggerUnit()))) set tE=NewGroup() set x=GetUnitX((Je[(sE)])) set y=GetUnitY((Je[(sE)])) set a=Atan2(GetSpellTargetY()-y,GetSpellTargetX()-x) set SE=Lnv(x,y,a) call LMv(SE,"Abilities\\Spells\\Undead\\DarkSummoning\\DarkSummonMissile.mdl") call SetUnitScale(II[(SE)],((2.5)*1.),0,0) call SetUnitFlyHeight(II[(SE)],((50)*1.),0) set TE=30 set uE=50*Cos(a) set UE=50*Sin(a) call TimerStart((NewTimer(0)),.03125,true,function I1e) return false endfunction function I3e takes nothing returns boolean call NewTextTagInTarget_A(GetTriggerUnit(),"Jack impact",0,$FF,0) return false endfunction function I4e takes nothing returns boolean local unit c=GetTriggerUnit() local unit u local real x=GetUnitX(c) local real y=GetUnitY(c) call GroupEnumUnitsInRange(G,x,y,900+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,900)then if IsUnitAliveAndEnemy(u,c)then call UnitDamageTargetBY(((c)),((u)),(((($C350)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop call Ltv(LAv("AncientExplode.mdl",x,y,3.5)) set c=null return false endfunction function I5e takes nothing returns boolean call NewTextTagInTarget_A(GetTriggerUnit(),"Happy Halloween!",0,$FF,0) return false endfunction function I6e takes nothing returns boolean local unit c=GetTriggerUnit() local unit u local real x=GetUnitX(c) local real y=GetUnitY(c) if(IsUnitType((c),UNIT_TYPE_GIANT))then call GroupEnumUnitsInRange(G,x,y,$4B0+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$4B0)then if IsUnitAliveAndEnemy(u,c)then call TimerDestroyAddSpecialEffectTargetBY("Abilities\\Spells\\Undead\\DarkRitual\\DarkRitualTarget.mdl",u,"origin",1.5) call UnitDamageTargetBY(((c)),((u)),(((($C350)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v(u,.25) endif endif endloop else call Ltv(Lfv(LAv("DarkStar.mdl",x,y,.5),125,$FF,125,$FF)) call Ltv(Lfv(LAv("AncientExplode.mdl",x,y,.625),125,$FF,125,$FF)) endif set c=null return false endfunction function I7e takes nothing returns boolean call NewTextTagInTarget_A(GetTriggerUnit(),"Stars shine!",0,$FF,0) return false endfunction function I8e takes nothing returns boolean call NewTextTagInTarget_A(GetTriggerUnit(),"Blizzard!!",0,$FF,0) return false endfunction function I9e takes nothing returns boolean local unit u=GetTriggerUnit() local real a=GetUnitFacing(u)*bj_DEGTORAD call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",GetSpellTargetUnit(),"chest")) call GJv(GetSpellTargetUnit(),GetUnitX(u)+100*Cos(a),GetUnitY(u)+100*Sin(a),.25) set u=null return false endfunction function Ave takes nothing returns integer return D9v(dq) endfunction function Aee takes integer NNv returns nothing call fvv(NNv) endfunction function Axe takes nothing returns boolean local integer NNv=J[dq] local unit u local real x local real y loop exitwhen 0==NNv set Bq[NNv]=Bq[NNv]-1 set x=(GetUnitX(II[(Nq[NNv])]))+cq[NNv] set y=(GetUnitY(II[(Nq[NNv])]))+Cq[NNv] call LKv(Nq[NNv],x) call Llv(Nq[NNv],y) if bq[NNv]!=null then if ModuloInteger(Bq[NNv],2)==0 then call Ltv(LAv("BigBloodEX-NoSplat-NoGutz.mdx",x,y,.5)) endif call GroupEnumUnitsInRange(G,x,y,$C8+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$C8)then if not IsUnitInGroup(u,bq[NNv])and IsUnitAliveAndEnemy(u,(Je[(Aq[NNv])]))then call GroupAddUnit(bq[NNv],u) call UnitDamageTargetBY((((Je[(Aq[NNv])]))),((u)),((((6000)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop elseif ModuloInteger(Bq[NNv],3)==0 then call Ltv(LAv("BigBloodEX-NoSplat-NoGutz.mdx",x,y,.25)) endif if Bq[NNv]<1 then if bq[NNv]!=null then call RecycleGroup(bq[NNv]) set bq[NNv]=null endif call Unit_Cancel_Counter($A6,Aq[NNv]) call LSv(Nq[NNv],0,0,0,$FF,1) call fvv((NNv)) endif set NNv=K[NNv] endloop return false endfunction function Aoe takes nothing returns nothing set dq=fxv(function Axe) endfunction function Are takes nothing returns boolean local integer NNv=(D9v(dq)) local real x=GetUnitX(GetTriggerUnit()) local real y=GetUnitY(GetTriggerUnit()) local real a=Atan2(GetSpellTargetY()-y,GetSpellTargetX()-x) set Aq[NNv]=(GetUnitUserData((GetTriggerUnit()))) set Nq[NNv]=LVv('e00C',x,y,bj_RADTODEG*a) set Bq[NNv]=20 if(IsUnitType(((Je[(Aq[NNv])])),UNIT_TYPE_GIANT))then set bq[NNv]=NewGroup() set cq[NNv]=50*Cos(a) set Cq[NNv]=50*Sin(a) else call SetUnitScale(II[(Nq[NNv])],((1)*1.),0,0) set cq[NNv]=35*Cos(a) set Cq[NNv]=35*Sin(a) endif call SetUnitAnimation(II[Nq[NNv]],"Attack Slam") call Unit_App_Counter($A7,Aq[NNv]) return false endfunction function Aie takes nothing returns boolean call NewTextTagInTarget_A(GetTriggerUnit(),"Close the door!!Put the dog!!",$FF,0,0) return false endfunction function Aae takes nothing returns nothing call RegisterSpellEffectEvent('A03M',function Are) call RegisterSpellEffectEvent('A0KR',function Are) call RegisterSpellChannelEvent('A03M',function Aie) call RegisterSpellChannelEvent('A0KR',function Aie) endfunction function Ane takes nothing returns boolean local unit u=GetTriggerUnit() local unit t local real x=GetUnitX(u) local real y=GetUnitY(u) call GroupEnumUnitsInRange(G,x,y,$3E8+75,null) loop set t=FirstOfGroup(G) exitwhen t==null call GroupRemoveUnit(G,t) if IsUnitInRangeXY(t,x,y,$3E8)then if IsUnitAliveAndEnemy(t,u)then call UnitDamageTargetBY(((u)),((t)),(((($7530)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop call PlaySoundOnUnit_BJ((fa),((100)*1.),(u)) call Ltv(LAv("dragonslayve.mdl",GetUnitX(u),GetUnitY(u),4.5)) set u=null return false endfunction function AVe takes nothing returns boolean call NewTextTagInTarget_A(GetTriggerUnit(),"A town soul!",$FF,0,0) return false endfunction function AEe takes nothing returns boolean local unit u=GetTriggerUnit() local integer fx=LAv("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",GetUnitX(u),GetUnitY(u),3) call PlaySoundOnUnit_BJ((Da),((100)*1.),(u)) call LFv(fx,"Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl") call Ltv(fx) set u=null return false endfunction function AXe takes nothing returns boolean call NewTextTagInTarget_A(GetTriggerUnit(),"Spring comes!",$FF,0,0) return false endfunction function AOe takes nothing returns boolean local unit u=GetTriggerUnit() local unit t local boolean Ite=(IsUnitType((u),UNIT_TYPE_GIANT)) local integer i=8 local real x=GetUnitX(u) local real y=GetUnitY(u) local real a loop set i=i-1 set a=bj_PI*i/ 4 if Ite then call Ltv(Lbv(LVv('e00A',x+600*Cos(a),y+600*Sin(a),0),5,.5)) else call Ltv(Lbv(LVv('e00A',x+$AF*Cos(a),y+$AF*Sin(a),0),1,.5)) endif exitwhen i==0 endloop if Ite then call GroupEnumUnitsInRange(G,x,y,$3E8+75,null) loop set t=FirstOfGroup(G) exitwhen t==null call GroupRemoveUnit(G,t) if IsUnitInRangeXY(t,x,y,$3E8)then if IsUnitAliveAndEnemy(t,u)then call UnitDamageTargetBY(((u)),((t)),(((($4E20)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop endif set u=null return false endfunction function ARe takes nothing returns boolean call NewTextTagInTarget_A(GetTriggerUnit(),"Hellfire",$FF,0,0) return false endfunction function AIe takes nothing returns nothing local unit u set Fq=Fq-1 set gq=gq+hq set Gq=Gq+Hq call GroupEnumUnitsInRange(G,gq,Gq,500+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,gq,Gq,500)then if not IsUnitInGroup(u,fq)and IsUnitAliveAndEnemy(u,Dq)then call GroupAddUnit(fq,u) call UnitDamageTargetBY(((Dq)),((u)),(((($61A8)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop call Ltv(LAv("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",gq,Gq,4.5)) if Fq<1 then call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:116") call RecycleGroup(fq) set Dq=null set fq=null endif endfunction function AAe takes nothing returns boolean local real a set Dq=GetTriggerUnit() set fq=NewGroup() set Fq=6 set gq=GetUnitX(Dq) set Gq=GetUnitY(Dq) set a=Atan2(GetSpellTargetY()-Gq,GetSpellTargetX()-gq) set hq=$C8*Cos(a) set Hq=$C8*Sin(a) call Lqv(LIv("PinkRedLaser.mdl",gq+.25*hq,Gq+.25*Hq,0,1.5,a,90),1.5) call PlaySoundOnUnit_BJ((Fa),((100)*1.),(Dq)) call TimerStart((NewTimer(0)),.05,true,function AIe) return false endfunction function ANe takes nothing returns nothing call RegisterSpellEffectEvent('A03N',function AAe) endfunction function Abe takes nothing returns nothing set Jq=Jq-1 if Jq<=0 or not UnitAlive(jq)then call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:117") call SetUnitFlyHeight(jq,0,400) set jq=null elseif GetUnitAbilityLevel(jq,'Avul')==0 and GetUnitFlyHeight(jq)<700 then call SetUnitFlyHeight(jq,700,400) endif endfunction function ABe takes nothing returns boolean set jq=GetTriggerUnit() set Jq=600 if UnitAddAbility(jq,'Amrf')then call UnitRemoveAbility(jq,'Amrf') endif call SetUnitFlyHeight(jq,700,400) call PlaySoundOnUnit_BJ((dn),((100)*1.),(jq)) call TimerStart((NewTimer(0)),.05,true,function Abe) return false endfunction function Ace takes nothing returns nothing call RegisterSpellEffectEvent('A0AG',function ABe) endfunction function ACe takes nothing returns boolean local unit u=GetTriggerUnit() local unit t local boolean Ite=(IsUnitType((u),UNIT_TYPE_GIANT)) local real x=GetUnitX(u) local real y=GetUnitY(u) local real a local real d local integer i if Ite then set i=24 call GroupEnumUnitsInRange(G,x,y,$3E8+75,null) loop set t=FirstOfGroup(G) exitwhen t==null call GroupRemoveUnit(G,t) if IsUnitInRangeXY(t,x,y,$3E8)then if IsUnitAliveAndEnemy(t,u)then call UnitDamageTargetBY(((u)),((t)),(((($7530)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop else set i=$C endif loop set i=i-1 set a=GetRandomReal(0,Lx) if Ite then set d=GetRandomReal(0,800) else set d=GetRandomReal(0,400) endif call Ltv(Lbv(LVv('e003',x+d*Cos(a),y+d*Sin(a),0),1.25,.75)) exitwhen i==0 endloop set u=null return false endfunction function Ade takes nothing returns boolean call NewTextTagInTarget_A(GetTriggerUnit(),"Shine!My sword!",0,$FF,0) return false endfunction function ADe takes nothing returns boolean local unit c=GetTriggerUnit() local unit t=GetSpellTargetUnit() local real a call Ltv(LAv("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl",GetUnitX(t),GetUnitY(t),1.5)) call UnitDamageTargetBY(((c)),((t)),(((($2710)*1.))*1.),false,(true),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") if UnitAlive(t)then set a=GetUnitFacing(c)*bj_DEGTORAD call m2v(t,3,'A500','B500',true) call GJv(t,GetUnitX(c)+100*Cos(a),GetUnitY(c)+100*Sin(a),.25) endif set c=null set t=null return false endfunction function Afe takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:118") if UnitAlive((Je[(id)]))then call PauseUnit((Je[(id)]),false) endif call Unit_Cancel_Counter($A8,id) endfunction function AFe takes nothing returns nothing local timer t=GetExpiredTimer() local integer id=(alloc__hpv(GetHandleId((t)))) local boolean Ite=(IsUnitType(((Je[(id)])),UNIT_TYPE_GIANT)) local group g local unit c local unit u local integer i local real x local real y local real a if UnitAlive((Je[(id)]))then set c=(Je[(id)]) set x=GetUnitX(c) set y=GetUnitY(c) set a=bj_DEGTORAD*GetUnitFacing(c) if Ite then set g=NewGroup() set i=5 call Lqv(LIv("Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl",x+75*Cos(a),y+75*Sin(a),25,6.5,a,0),1.5) loop set i=i-1 set x=x+$AF*Cos(a) set y=y+$AF*Sin(a) call GroupEnumUnitsInRange(G,x,y,300+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,300)then if not IsUnitInGroup(u,g)and IsUnitAliveAndEnemy(u,c)then call GroupAddUnit(g,u) call UnitDamageTargetBY(((c)),((u)),(((($9C40)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop exitwhen i==0 endloop call RecycleGroup(g) else call Lqv(LIv("Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl",x+50*Cos(a),y+50*Sin(a),25,2.5,a,0),1.5) endif call SetUnitAnimation(c,"Spell") call QueueUnitAnimation(c,"Stand") call TimerStart(t,.75,false,function Afe) set c=null else call ReleaseTimer(t,"[TimerUtils]Error:119") call Unit_Cancel_Counter($A9,id) endif set t=null endfunction function Age takes nothing returns boolean local integer id=(GetUnitUserData((GetTriggerUnit()))) call NewTextTagInTarget_A((Je[(id)]),"The punishment of divine light(not judgement?)",$FF,0,0) call PauseUnit((Je[(id)]),true) call SetUnitAnimation((Je[(id)]),"Stand Channel") call TimerStart(NewTimer(id),2.6,false,function AFe) call Unit_App_Counter($AA,id) return false endfunction function AGe takes nothing returns boolean local unit u=GetTriggerUnit() local unit t local integer i=$C local real x=GetUnitX(u) local real y=GetUnitY(u) local real a call GroupEnumUnitsInRange(G,x,y,$4B0+75,null) loop set t=FirstOfGroup(G) exitwhen t==null call GroupRemoveUnit(G,t) if IsUnitInRangeXY(t,x,y,$4B0)then if IsUnitAliveAndEnemy(t,u)then call UnitDamageTargetBY(((u)),((t)),(((($186A0)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop loop set i=i-1 set a=bj_PI*i/ 6 call Ltv(LAv("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl",x+500*Cos(a),y+500*Sin(a),7)) call Ltv(LAv("Abilities\\Spells\\Human\\Resurrect\\ResurrectCaster.mdl",x+500*Cos(a),y+500*Sin(a),7)) call Ltv(LAv("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl",x+$3E8*Cos(a),y+$3E8*Sin(a),7)) call Ltv(LAv("Abilities\\Spells\\Human\\Resurrect\\ResurrectCaster.mdl",x+$3E8*Cos(a),y+$3E8*Sin(a),7)) exitwhen i==0 endloop set u=null return false endfunction function Ahe takes nothing returns boolean call NewTextTagInTarget_A(GetTriggerUnit(),"Light trial",$FF,0,0) return false endfunction function AHe takes nothing returns boolean call NewTextTagInTarget_A(GetTriggerUnit(),"Spring comes!!",$FF,0,0) return false endfunction function Aje takes nothing returns boolean local unit u=GetTriggerUnit() local real a=GetUnitFacing(u)*bj_DEGTORAD call GJv(GetSpellTargetUnit(),GetUnitX(u)+100*Cos(a),GetUnitY(u)+100*Sin(a),.25) set u=null return false endfunction function AJe takes nothing returns boolean local unit u=GetTriggerUnit() local unit t local integer i=$C local real x=GetUnitX(u) local real y=GetUnitY(u) local real a call GroupEnumUnitsInRange(G,x,y,$4B0+75,null) loop set t=FirstOfGroup(G) exitwhen t==null call GroupRemoveUnit(G,t) if IsUnitInRangeXY(t,x,y,$4B0)then if IsUnitAliveAndEnemy(t,u)then call UnitDamageTargetBY(((u)),((t)),(((($186A0)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop loop set i=i-1 set a=bj_PI*i/ 6 call Ltv(LAv("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",x+$4B0*Cos(a),y+$4B0*Sin(a),7)) call Ltv(LAv("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",x+900*Cos(a),y+900*Sin(a),7)) call Ltv(LAv("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",x+600*Cos(a),y+600*Sin(a),7)) call Ltv(LAv("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",x+300*Cos(a),y+300*Sin(a),7)) exitwhen i==0 endloop set u=null return false endfunction function Ake takes nothing returns boolean call NewTextTagInTarget_A(GetTriggerUnit(),"Dark trial",0,$FF,0) return false endfunction function AKe takes nothing returns boolean call NewTextTagInTarget_A(GetTriggerUnit(),"My Kirin arm has another attack!!",0,$FF,0) return false endfunction function Ale takes nothing returns boolean call NewTextTagInTarget_A(GetTriggerUnit(),"Come out my slave!",0,0,$FF) return false endfunction function ALe takes nothing returns boolean local unit c=GetTriggerUnit() local unit u local real x=GetUnitX(GetSpellTargetUnit()) local real y=GetUnitY(GetSpellTargetUnit()) call GroupEnumUnitsInRange(G,x,y,400+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,400)then if IsUnitAliveAndEnemy(u,c)then call UnitDamageTargetBY(((c)),((u)),(((($AFC8)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop set c=null return false endfunction function Ame takes nothing returns boolean call NewTextTagInTarget_A(GetTriggerUnit(),"Frost Nova!",0,0,$FF) return false endfunction function AMe takes nothing returns boolean local unit c=GetTriggerUnit() local unit u local boolean Ite=(IsUnitType((c),UNIT_TYPE_GIANT)) local integer i=8 local real x=GetUnitX(c) local real y=GetUnitY(c) local real a if Ite then call GroupEnumUnitsInRange(G,x,y,$4B0+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$4B0)then if IsUnitAliveAndEnemy(u,c)then call UnitDamageTargetBY(((c)),((u)),(((($186A0)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop call Ltv(LAv("Shiva'sWrath.mdl",x,y,4)) else call Ltv(LAv("Shiva'sWrath.mdl",x,y,1.5)) endif loop set i=i-1 set a=bj_PI*i/ 4 if Ite then call LQv(LAv("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl",x+600*Cos(a),y+600*Sin(a),5.5),1.5) call Lqv(LAv("Doodads\\Cinematic\\FrostTrapUp\\FrostTrapUp.mdl",x+800*Cos(a),y+800*Sin(a),4.5),1) else call LQv(LAv("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl",x+$96*Cos(a),y+$96*Sin(a),.75),1.5) call Lqv(LAv("Doodads\\Cinematic\\FrostTrapUp\\FrostTrapUp.mdl",x+$C8*Cos(a),y+$C8*Sin(a),1),1) endif exitwhen i==0 endloop set c=null return false endfunction function Ape takes nothing returns boolean call NewTextTagInTarget_A(GetTriggerUnit(),"Frozen you a king eight lambs!",0,0,$FF) return false endfunction function APe takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:120") call SetUnitVertexColor((Je[(id)]),75,25,25,$FF) call PauseUnit((Je[(id)]),false) call Unit_Cancel_Counter($AB,id) set wE=0 endfunction function Aqe takes nothing returns nothing local timer t=GetExpiredTimer() local unit c=(Je[((alloc__hpv(GetHandleId((t)))))]) local unit u local real x=GetUnitX(c) local real y=GetUnitY(c) local real fYv local real fzv local integer i if UnitAlive(c)then if wE<20 then set wE=wE+1 set i=$C8-$A*wE call Ltv(Lfv(LAv("Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl",x,y,2+.1*wE),$FF,i,i,$FF)) call SetUnitVertexColor(c,R2I(75.-75.*wE/ 20.),R2I(25.-25.*wE/ 20.),R2I(25.-25.*wE/ 20.),$FF) call TimerStart(t,.27-.01*wE,false,function Aqe) else set x=GetUnitX(c) set y=GetUnitY(c) set i=16 loop set i=i-1 set fYv=400*Cos(i*Lx/ 16) set fzv=400*Sin(i*Lx/ 16) call Ltv(LAv("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",x+fYv,y+fzv,2)) call Ltv(LAv("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",x+2*fYv,y+2*fzv,2)) call Ltv(LAv("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",x+3*fYv,y+3*fzv,2)) exitwhen i==0 endloop call GroupEnumUnitsInRange(G,x,y,$4B0+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$4B0)then if IsUnitAliveAndEnemy(u,c)then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",u,"chest")) call UnitDamageTargetBY(((c)),((u)),((((GetWidgetLife(u)-1)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) endif endif endloop call m1v(c,12.5) call zjv(100,1) call Ltv(LAv("Desecrate.mdl",x,y,3)) call Ltv(LAv("Desecrate.mdl",x,y,3)) call SetUnitAnimation(c,"Spell") call QueueUnitAnimation(c,"Stand") call TimerStart(t,1,false,function APe) call Unit_App_Counter($AC,((GetUnitUserData((c))))) endif else call ReleaseTimer(t,"[TimerUtils]Error:121") endif set t=null set c=null endfunction function AQe takes nothing returns boolean local unit c=GetTriggerUnit() local unit u local real s=1.05+.5*wE local real x local real y local integer r local integer i if(IsUnitType((c),UNIT_TYPE_GIANT))then set wE=wE+1 if wE<3 then set r=GetRandomInt(1,3) set i=8 set x=GetUnitX(c) set y=GetUnitY(c) call GroupEnumUnitsInRange(G,x,y,400*s+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,400*s)then if IsUnitAliveAndEnemy(u,c)then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",u,"chest")) call UnitDamageTargetBY(((c)),((u)),(((($9C4+(.25+.25*wE)*GetUnitState(u,UNIT_STATE_LIFE))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) endif endif endloop loop set i=i-1 call Ltv(Lfv(LAv("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",x+325*s*Cos(i*Lx/ 8),y+325*s*Sin(i*Lx/ 8),2*s),$FF,105,105,$FF)) exitwhen i==0 endloop call zjv(50,.75) call Ltv(LAv("Desecrate.mdl",x,y,1.5*s)) if r==1 then call NewTextTagInTarget_A(c,"Boring fight quickly over it !",$FF,0,0) elseif r==2 then call NewTextTagInTarget_A(c,"Hallelujah.Haha",$FF,0,0) elseif r==3 then call NewTextTagInTarget_A(c,"Waiting for you will be the power of destruction !",$FF,0,0) endif else call NewTextTagInTarget_A(c,"Fast!All come!!Get close to me!",$FF,0,0) call PauseUnit(c,true) call TimerStart(NewTimer((GetUnitUserData((c)))),.24,true,function Aqe) endif else set r=GetRandomInt(1,3) set i=8 set x=GetUnitX(c) set y=GetUnitY(c) loop set i=i-1 call Ltv(Lfv(LAv("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",x+$96*Cos(i*Lx/ 8),y+$96*Sin(i*Lx/ 8),.75),$FF,105,105,$FF)) exitwhen i==0 endloop if r==1 then call NewTextTagInTarget_A(c,"Boring battle is always the ending !",$FF,0,0) elseif r==2 then call NewTextTagInTarget_A(c,"Continue arrogant ah!",$FF,0,0) elseif r==3 then call NewTextTagInTarget_A(c,"Waiting for you will be the power of destruction !",$FF,0,0) endif call zhv((GetPlayerId((GetOwningPlayer(c)))),40,.5) call Ltv(LAv("Desecrate.mdl",x,y,.875)) endif set c=null return false endfunction function Ase takes nothing returns nothing local unit u call GroupEnumUnitsInRange(G,Kq,lq,325+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,Kq,lq,325)then if IsUnitAliveAndEnemy(u,(Je[(kq)]))then call UnitDamageTargetBY((((Je[(kq)]))),((u)),(((($61A8)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v(u,2.5) endif endif endloop call DestroyEffect(AddSpecialEffect("firegold.mdl",Kq,lq)) call Auxiliary_PointOrder(('A07S'),P[$B],1,$D0108,Kq,lq) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:122") endfunction function ASe takes nothing returns boolean local integer i=30 set kq=(GetUnitUserData((GetTriggerUnit()))) set Kq=GetSpellTargetX() set lq=GetSpellTargetY() loop set i=i-1 call Lqv(LAv("Environment\\SmallBuildingFire\\SmallBuildingFire2.mdl",Kq+350*Cos(i*Lx/ 30),lq+350*Sin(i*Lx/ 30),1.25),1.75) exitwhen i==0 endloop call Lqv(LAv("ChaosMeteorV3.mdl",Kq,lq,1.5),2.5) call TimerStart((NewTimer(0)),1.95,false,function Ase) return false endfunction function Ate takes nothing returns nothing local integer s=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local unit u local real x local real y if UnitAlive((Je[(s)]))then set x=GetUnitX((Je[(s)])) set y=GetUnitY((Je[(s)])) call GroupEnumUnitsInRange(G,x,y,350+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,350)then if IsUnitAliveAndEnemy(u,(Je[(s)]))then call TimerDestroyAddSpecialEffectTargetBY("Abilities\\Spells\\Other\\ImmolationRed\\ImmolationRedDamage.mdl",u,"chest",1) call UnitDamageTargetBY((((Je[(s)]))),((u)),(((($BB8)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop else call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:123") call Unit_Cancel_Counter($AD,s) endif endfunction function ATe takes nothing returns boolean local integer id=(GetUnitUserData((GetSummonedUnit()))) call SetUnitVertexColor((Je[(id)]),$FF,25,25,$CD) call TimerStart(NewTimer(id),1,true,function Ate) call Unit_App_Counter($AE,id) return false endfunction function Aue takes nothing returns nothing call RegisterSpellEffectEvent('A07T',function ASe) call RegisterSummonEvent('n026',function ATe) endfunction function AUe takes nothing returns nothing local integer Zhv local unit u local integer i local real x local real y local real a local real zA local real d local real l local real fYv local real fzv if UnitAlive((Je[(Lq)]))then set Mq=Mq+1 set x=GetUnitX((Je[(Lq)])) set y=GetUnitY((Je[(Lq)])) call LKv(mq,x) call Llv(mq,y) if Mq>64 then set a=Lx*(Mq+GetRandomInt(-1,1))/ 3+GetRandomReal(-1,1) set d=GetRandomReal(50,400) call Ltv(LAv("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",x+d*Cos(a),y+d*Sin(a),1.5)) if ModuloInteger(Mq,32)==0 then set i=5 set a=(Mq-64.)*Lx/ 256. set fYv=$C8*Cos(a) set fzv=$C8*Sin(a) loop set i=i-1 set x=x+fYv set y=y+fzv call GroupEnumUnitsInRange(G,x,y,256+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,256)then if IsUnitOfPlayerNotseckill(u)then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",u,"chest")) call KillUnitBJ(u) endif endif endloop call Ltv(Lfv(LAv("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",x,y,4),$FF,0,0,$FF)) call Ltv(LAv("firegold.mdl",x,y,1.25)) call Ltv(LAv("Desecrate.mdl",x,y,.75)) exitwhen i==0 endloop call zjv(40,1) if Mq>=320 then call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:124") call SetUnitDecay(II[mq],$FF,0,0,$FF,1.5) call LQv(mq,1.5) call Unit_Cancel_Counter($AF,Lq) endif endif else set a=GetRandomReal(0,Lx) set zA=GetRandomReal(0,Lx/ 2.) set Zhv=CreateBarrageTypeC(x+(450.+450.*Mq/ 64.)*Cos(a)*Sin(zA),y+(450.+450.*Mq/ 64.)*Sin(a)*Sin(zA),300+300*Cos(zA),(Je[(Lq)])) call SetBarrageFlightRadian(Zhv,.3) set s__barrage_speed[Zhv]=$A set s__barrage_acceleration[Zhv]=2.5+5.*Mq/ 64. set s__barrage_impact_z[Zhv]=300 call LMv(s__barrage_model[Zhv],"CurseBolt.mdl") call SetUnitScale(II[(s__barrage_model[Zhv])],((2.+Mq/ 32.)*1.),0,0) call Lfv(s__barrage_model[Zhv],$9B,$9B,$9B,$9B) call BOv(Zhv) if Mq==64 then call NewTextTagInTarget_A((Je[(Lq)]),"I will give you one of the most brutal ways of death !!",$FF,0,0) call PauseUnit((Je[(Lq)]),false) call LFv(mq,"ChaosExplosion.mdl") call Lfv(mq,$FF,0,0,$FF) endif endif else call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:125") call SetUnitDecay(II[mq],$FF,0,0,$FF,1.5) call LQv(mq,1.5) call Unit_Cancel_Counter($B0,Lq) endif endfunction function Awe takes nothing returns boolean set Lq=(GetUnitUserData((GetTriggerUnit()))) set mq=LAv("Abilities\\Spells\\Undead\\UnholyAura\\UnholyAura.mdl",GetUnitX((Je[(Lq)])),GetUnitY((Je[(Lq)])),5) set Mq=0 call NewTextTagInTarget_A(GetTriggerUnit(),"Your end is coming! See the king of Hades!!",$FF,0,0) call zjv(60,2) call zlv($FF,125,125,.75) call TimerStart(NewTimer((GetUnitUserData((((Je[(Lq)])))))),0,false,function m4v_func) call TimerStart((NewTimer(0)),.03125,true,function AUe) call Unit_App_Counter($B1,Lq) return false endfunction function AWe takes nothing returns nothing call RegisterSpellEffectEvent('A0A9',function Awe) endfunction function Aye takes nothing returns integer return D9v(Qq) endfunction function AYe takes integer NNv returns nothing call fvv(NNv) endfunction function Aze takes nothing returns boolean local integer NNv=J[Qq] local unit u local real x local real y loop exitwhen 0==NNv if UnitAlive((Je[(pq[NNv])]))then set x=GetUnitX((Je[(pq[NNv])])) set y=GetUnitY((Je[(pq[NNv])])) call GroupEnumUnitsInRange(G,x,y,$80+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$80)then exitwhen IsUnitAliveAndEnemyNotAvul(u,(Je[(pq[NNv])])) endif endloop if u==null then call SetWidgetLife((Je[(pq[NNv])]),MaxR(.5,GetWidgetLife((Je[(pq[NNv])]))-2500./ 32.)) else call GroupEnumUnitsInRange(G,x,y,275+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,275)then if IsUnitAliveAndEnemyNotAvul(u,(Je[(pq[NNv])]))then call UnitDamageTargetBY((((Je[(pq[NNv])]))),((u)),((((GetUnitMaxLifeById((GetUnitUserData((u))))/ 3)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop call Ltv(LAv("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",x,y,2.25)) call Ltv(LAv("Objects\\Spawnmodels\\Naga\\NagaBlood\\NagaBloodWindserpent.mdl",x,y,2.5)) call KillUnit((Je[(pq[NNv])])) call Unit_Cancel_Counter($B2,pq[NNv]) call fvv((NNv)) endif else call Unit_Cancel_Counter($B3,pq[NNv]) call fvv((NNv)) endif set NNv=K[NNv] endloop return false endfunction function AZe takes nothing returns nothing set Qq=fxv(function Aze) endfunction function A_e takes nothing returns nothing local integer NNv local integer i call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:126") if UnitAlive(oi)then set i=5 loop set i=i-1 set NNv=(D9v(Qq)) set pq[NNv]=(GetUnitUserData((CreateUnit(P[$C],'n021',ii[i],ai[i],0)))) call IssuePointOrderById((Je[(pq[NNv])]),$D0012,Pq,qq) call DestroyEffect(AddSpecialEffect("Doodads\\Dungeon\\Terrain\\EggSack\\EggSack0.mdl",ii[i],ai[i])) call Unit_App_Counter($B4,pq[NNv]) exitwhen i==0 endloop endif endfunction function A0e takes nothing returns boolean set Pq=GetUnitX(GetSpellTargetUnit()) set qq=GetUnitY(GetSpellTargetUnit()) call TimerStart((NewTimer(0)),.8,false,function A_e) return false endfunction function A1e takes nothing returns nothing call RegisterSpellEffectEvent('A04Z',function A0e) endfunction function A2e takes nothing returns nothing local integer cFv=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:127") local real x=(GetUnitX(II[(cFv)])) local real y=(GetUnitY(II[(cFv)])) local unit u if RI[cFv]==0 then call LQv(LAv("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl",x,y,.75),1.27) else call GroupEnumUnitsInRange(G,x,y,125+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,125)then if IsUnitAliveAndEnemy(u,oi)then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\FrostWyrmMissile\\FrostWyrmMissile.mdl",u,"origin")) call UnitDamageTargetBY(((oi)),((u)),(((($2EE0)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v(u,3.5) endif endif endloop call LQv(LAv("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl",x,y,1.25),1.27) endif call Lqv(cFv,1) endfunction function A3e takes nothing returns integer return D9v(Uq) endfunction function A4e takes integer NNv returns nothing call fvv(NNv) endfunction function A5e takes nothing returns boolean local integer NNv=J[Uq] local integer cFv local real x local real y loop exitwhen 0==NNv set tq[NNv]=tq[NNv]-1 set x=(GetUnitX(II[(sq[NNv])]))+Tq[NNv] set y=(GetUnitY(II[(sq[NNv])]))+uq[NNv] call LKv(sq[NNv],x) call Llv(sq[NNv],y) if Sq[NNv]then set cFv=LAv("FrostFang.mdl",x,y,1) set RI[cFv]=1 else set cFv=LAv("FrostFang.mdl",x,y,.625) set RI[cFv]=0 endif call TimerStart(NewTimer(cFv),1,false,function A2e) if tq[NNv]<1 then call Ltv(sq[NNv]) call fvv((NNv)) endif set NNv=K[NNv] endloop return false endfunction function A6e takes nothing returns nothing set Uq=fxv(function A5e) endfunction function A7e takes nothing returns boolean local integer i=3 local boolean wdv=GetUnitTypeId(GetTriggerUnit())=='h01F' local real pX=GetUnitX(GetTriggerUnit()) local real pY=GetUnitY(GetTriggerUnit()) local real a=Atan2(GetSpellTargetY()-pY,GetSpellTargetX()-pX)+bj_PI/ 3 local integer NNv loop set i=i-1 set a=a-bj_PI/ 6 set NNv=(D9v(Uq)) set sq[NNv]=Lnv(pX,pY,0) set Sq[NNv]=wdv if wdv then set tq[NNv]=8 set Tq[NNv]=$A0*Cos(a) set uq[NNv]=$A0*Sin(a) else set tq[NNv]=6 set Tq[NNv]=80*Cos(a) set uq[NNv]=80*Sin(a) endif exitwhen i==0 endloop return false endfunction function A8e takes nothing returns boolean call NewTextTagInTarget_A(GetTriggerUnit(),"When you see this tip, you do not need to avoid it, just move closer!",0,0,$FF) return false endfunction function A9e takes nothing returns nothing call RegisterSpellEffectEvent('A04B',function A7e) call RegisterSpellEffectEvent('A0FE',function A7e) call RegisterSpellChannelEvent('A04B',function A8e) call RegisterSpellChannelEvent('A0FE',function A8e) endfunction function Nve takes nothing returns boolean local integer i=5 local real x=GetUnitX(oi) local real y=GetUnitY(oi) loop set i=i-1 if GetRandomInt(1,2)==1 then call IssuePointOrderById(CreateUnit(P[$C],'n014',ii[i],ai[i],0),$D000F,x,y) else call IssuePointOrderById(CreateUnit(P[$C],'n028',ii[i],ai[i],0),$D000F,x,y) endif call DestroyEffect(AddSpecialEffect("Doodads\\Dungeon\\Terrain\\EggSack\\EggSack0.mdl",ii[i],ai[i])) exitwhen i==0 endloop return false endfunction function Nee takes nothing returns boolean call NewTextTagInTarget_A(oi,"Come out!!My slave!",0,0,$FF) return false endfunction function Nxe takes nothing returns nothing call RegisterSpellEffectEvent('A056',function Nve) call RegisterSpellChannelEvent('A056',function Nee) endfunction function Noe takes nothing returns nothing local integer i=$A local integer fx local unit u local real a if zq>75 then set zq=zq-6. set Zq=Zq-.15 loop set i=i-1 set a=Zq-i*bj_PI/ 4 set fx=LoadInteger(BYHT,Wq,i) call LKv(fx,yq+zq*Cos(a)) call Llv(fx,Yq+zq*Sin(a)) call SetUnitFacing(II[(fx)],((a+bj_PI/ 2)*1.)*bj_RADTODEG) exitwhen i==0 endloop else call DestroyEffect(AddSpecialEffect("AncientExplode.mdl",yq,Yq)) call GroupEnumUnitsInRange(G,yq,Yq,300+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,yq,Yq,300)then if GetUnitAbilityLevel(u,'Avul')==0 and IsUnitAliveAndEnemy(u,(Je[(wq)]))then call UnitDamageTargetBY((((Je[(wq)]))),((u)),(((($3E80)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call UnitAppBuff((GetUnitUserData((u))),'A07V',$D006B) endif endif endloop loop set i=i-1 call Ltv((LoadInteger(BYHT,Wq,i))) exitwhen i==0 endloop call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:128") call free(Wq) endif endfunction function Nre takes nothing returns boolean local integer i=$A local integer fx local real a set wq=(GetUnitUserData((GetTriggerUnit()))) set Wq=malloc() set yq=GetSpellTargetX() set Yq=GetSpellTargetY() set zq=375 set Zq=0 loop set i=i-1 set a=i*bj_PI/ 5 set fx=Lnv(yq+zq*Cos(a),Yq+zq*Sin(a),a+bj_PI/ 2) call LMv(fx,"Abilities\\Weapons\\GreenDragonMissile\\GreenDragonMissile.mdl") call SetUnitFlyHeight(II[(fx)],((25)*1.),0) call SetUnitScale(II[(fx)],((1.125)*1.),0,0) call SaveInteger(BYHT,Wq,i,fx) exitwhen i==0 endloop call TimerStart((NewTimer(0)),.03125,true,function Noe) return false endfunction function Nie takes nothing returns nothing call RegisterSpellEffectEvent('A07M',function Nre) endfunction function Nae takes nothing returns nothing local real exe=GetUnitState((Je[(vQ)]),UNIT_STATE_MANA)-.5 local real x=GetUnitX((Je[(vQ)])) local real y=GetUnitY((Je[(vQ)])) local real eoe local real dX local real dY local real tX local real tY local real a local real d local unit u call LKv(eQ,x) call Llv(eQ,y) call LKv(xQ,x) call Llv(xQ,y) if exe>0 and UnitAlive((Je[(vQ)]))then set eoe=.15+.005*(100.-exe) call GroupEnumUnitsInRange(G,x,y,600+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,600)then if IsUnitAliveAndEnemyNotAvul(u,(Je[(vQ)]))then set tX=GetUnitX(u) set tY=GetUnitY(u) set dX=x-tX set dY=y-tY set d=eoe*(40.-SquareRoot(dX*dX+dY*dY)/ 30.) set a=Atan2(dY,dX) call SetUnitX(u,tX+d*Cos(a)) call SetUnitY(u,tY+d*Sin(a)) endif endif endloop call SetUnitState((Je[(vQ)]),UNIT_STATE_MANA,exe) else if UnitAlive((Je[(vQ)]))then call LMv(xQ,"AncientExplode.mdl") call SetUnitScale(II[(xQ)],((2)*1.),0,0) call GroupEnumUnitsInRange(G,x,y,500+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,500)then if IsUnitAliveAndEnemyNotAvul(u,(Je[(vQ)]))then call UnitDamageTargetBY((((Je[(vQ)]))),((u)),(((($7A120)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) endif endif endloop call Lfv(xQ,55,55,$FF,$FF) endif call PauseUnit((Je[(vQ)]),false) call SetUnitAnimation((Je[(vQ)]),"Stand") call SetUnitVertexColor((Je[(vQ)]),125,$FF,125,$FF) call SetUnitTimeScale((Je[(vQ)]),1) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:129") call Ltv(eQ) call Ltv(xQ) endif endfunction function Nne takes nothing returns boolean set vQ=(GetUnitUserData((GetTriggerUnit()))) set eQ=LAv("Abilities\\Spells\\Human\\FlameStrike\\FlameStrikeTarget.mdl",GetUnitX((Je[(vQ)])),GetUnitY((Je[(vQ)])),1.5) set xQ=LAv("Abilities\\Spells\\Human\\CloudOfFog\\CloudOfFog.mdl",(GetUnitX(II[(eQ)])),(GetUnitY(II[(eQ)])),2.5) call PauseUnit((Je[(vQ)]),true) call SetUnitVertexColor((Je[(vQ)]),125,125,$FF,$FF) call NewTextTagInTarget_A((Je[(vQ)]),"All over to enlarge(31237)!",$9B,$FF,$9B) call SetUnitAnimation((Je[(vQ)]),"Spell Slam") call SetUnitTimeScale((Je[(vQ)]),.25) call TimerStart((NewTimer(0)),.03125,true,function Nae) return false endfunction function NVe takes nothing returns nothing call RegisterSpellEffectEvent('A07X',function Nne) endfunction function NEe takes nothing returns integer return D9v(iQ) endfunction function NXe takes integer NNv returns nothing call fvv(NNv) endfunction function NOe takes nothing returns boolean local integer NNv=J[iQ] local integer PVv local unit u local integer i local real x local real y local real a local real r loop exitwhen 0==NNv if UnitAlive(Sl)then set rQ[NNv]=rQ[NNv]-1 set x=(GetUnitX(II[(oQ[NNv])])) set y=(GetUnitY(II[(oQ[NNv])])) call GroupEnumUnitsInRange(G,x,y,325+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,325)then if IsUnitAliveAndEnemy(u,Sl)then call UnitAppBuffByLevel((GetUnitUserData((u))),'A0IY',$D006B,2) endif endif endloop if rQ[NNv]>8 then set r=(rQ[NNv]-8.)/ 54. set i=R2I(3.-2.*r) loop exitwhen i==0 set i=i-1 set a=GetRandomReal(0,Lx) set PVv=CreateBarrageTypeD(x+($FA+375*r)*Cos(a),y+($FA+375*r)*Sin(a),0,x,y,0) set s__barrage_speed[PVv]=2.5 set s__barrage_acceleration[PVv]=3.75+2.5*r call SetBarrageFlightRadian(PVv,.3+.15*r) call LMv(s__barrage_model[PVv],"Abilities\\Weapons\\FaerieDragonMissile\\FaerieDragonMissile.mdl") call SetUnitScale(II[(s__barrage_model[PVv])],((3-2*r)*1.),0,0) call Lfv(s__barrage_model[PVv],105,$FF,105,105) call BOv(PVv) endloop elseif rQ[NNv]<1 then set i=$C loop set i=i-1 set a=i*Lx/ 12. set PVv=CreateBarrageTypeD(x,y,0,x+$4B0*Cos(a),y+$4B0*Sin(a),0) call LMv(s__barrage_model[PVv],"ShockwaveMissile.mdl") call SetUnitScale(II[(s__barrage_model[PVv])],((1.5)*1.),0,0) set s__barrage_atkunit[PVv]=Sl set s__barrage_speed[PVv]=31.25 set s__barrage_acceleration[PVv]=.625 set s__barrage_CollisionRange[PVv]=$96 set aQ[(PVv)]=false call Lfv(s__barrage_model[PVv],0,$CD,55,$FF) call cNv(PVv) exitwhen i==0 endloop call Ltv(Lfv(LAv("AncientExplode.mdx",x,y,1),125,$9B,125,125)) call Ltv(LAv("NatureExplosion.mdl",x,y,1.5)) call Ltv(LAv("NatureWave.mdl",x,y,2)) call Ltv(oQ[NNv]) call fvv((NNv)) endif else call Ltv(oQ[NNv]) call fvv((NNv)) endif set NNv=K[NNv] endloop return false endfunction function NRe takes nothing returns nothing set iQ=fxv(function NOe) endfunction function NIe takes real x,real y returns nothing local integer NNv=(D9v(iQ)) set oQ[NNv]=LAv("AirImprisonment.mdl",x,y,3.5) set rQ[NNv]=64 call Ltv(LAv("EarthWave.mdl",x,y,1.5)) call Ltv(Lfv(LAv("AncientExplode.mdx",x,y,.75),125,$9B,125,125)) endfunction function NAe takes integer NNv,unit u returns boolean if aQ[NNv]then if IsUnitAliveAndEnemy(u,s__barrage_atkunit[NNv])then if IsUnitType(u,UNIT_TYPE_MECHANICAL)then call UnitDamageTargetBY(((s__barrage_atkunit[NNv])),((u)),(((($9C40)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") else call UnitDamageTargetBY(((s__barrage_atkunit[NNv])),((u)),(((($4E20)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif call UnitAppBuffByLevel((GetUnitUserData((u))),'A0IY',$D006B,2) endif elseif IsUnitAliveAndEnemy(u,s__barrage_atkunit[NNv])then call UnitDamageTargetBY(((s__barrage_atkunit[NNv])),((u)),((((8500)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") elseif u!=s__barrage_atkunit[NNv]and IsUnitAliveAndAlly(u,s__barrage_atkunit[NNv])then call UnitCureTaret(s__barrage_atkunit[NNv],u,$30D40) endif return false endfunction function NNe takes integer NNv returns boolean if aQ[NNv]then call NIe(s__locationez_X[s__barrage_p2[NNv]],s__locationez_Y[s__barrage_p2[NNv]]) endif return true endfunction function Nbe takes integer NNv returns nothing call RemoveBarrage(NNv) endfunction function NBe takes nothing returns boolean local integer NNv=s__barrage_FR[nQ] local unit u if NNv!=nQ then call UseBarrage(nQ) loop exitwhen NNv==nQ if(s__barrage_outside[(NNv)])then call NNe(NNv) call RemoveBarrage((NNv)) elseif(s__barrage_finish[(NNv)])then if NNe(NNv)then call RemoveBarrage((NNv)) else set s__barrage_finish[(NNv)]=false endif else if s__barrage_CollisionRange[NNv]!=0 then call GroupEnumUnitsInRange(G,s__barrage_X[NNv],s__barrage_Y[NNv],s__barrage_CollisionRange[NNv]+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,s__barrage_X[NNv],s__barrage_Y[NNv],s__barrage_CollisionRange[NNv])then if not IsUnitInGroup(u,s__barrage_enum_g[NNv])then call GroupAddUnit(s__barrage_enum_g[NNv],u) if u!=s__barrage_target[NNv]and NAe(NNv,u)then set u=null call NNe(NNv) call RemoveBarrage((NNv)) exitwhen true endif endif endif endloop endif endif set NNv=s__barrage_FR[NNv] endloop elseif s__barrage_InOperation[nQ]then set s__barrage_InOperation[nQ]=false call TriggerEvaluate(OUv) endif return false endfunction function Nce takes nothing returns nothing call fov(VQ) endfunction function s__EtherealStrike_stop takes nothing returns nothing call frv(VQ) endfunction function NCe takes nothing returns nothing set VQ=fxv(function NBe) call fov(VQ) endfunction function Nde takes integer NNv returns nothing call s__barrage_Filling((nQ),(NNv)) if not s__barrage_InOperation[nQ]then set s__barrage_InOperation[nQ]=true call fov(VQ) endif endfunction function NDe takes nothing returns nothing set nQ=NewLauncher() set s__barrage_InOperation[nQ]=true endfunction function Nfe takes nothing returns boolean local real x=GetUnitX(Sl) local real y=GetUnitY(Sl) local integer NNv=CreateBarrageTypeD(x,y,0,GetSpellTargetX(),GetSpellTargetY(),0) call LMv(s__barrage_model[NNv],"ShockwaveMissile.mdl") call SetUnitScale(II[(s__barrage_model[NNv])],((3.5)*1.),0,0) set s__barrage_atkunit[NNv]=Sl set s__barrage_speed[NNv]=0 set s__barrage_acceleration[NNv]=6.25 set s__barrage_CollisionRange[NNv]=325 set aQ[NNv]=true if wl<896 then call NewTextTagInTarget_B(Sl,"Get back !",18,$9B,$FF,$9B) endif call Ltv(Lfv(LAv("Abilities\\Spells\\NightElf\\BattleRoar\\RoarCaster.mdl",x,y,2),0,$CD,55,$FF)) call Lfv(s__barrage_model[NNv],0,$CD,55,$FF) call Nde(NNv) return false endfunction function NFe takes nothing returns nothing call RegisterSpellEffectEvent('A0J3',function Nfe) endfunction function Nge takes nothing returns nothing local integer NNv=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local real x=(GetUnitX(II[(EQ[NNv])])) local real y=(GetUnitY(II[(EQ[NNv])])) local real dX=RQ[NNv]-x local real dY=IQ[NNv]-y local real d=2.5+.005*SquareRoot(dX*dX+dY*dY) local real a=Atan2(dY,dX) local unit u local integer i call LKv(EQ[NNv],x+d*Cos(a)) call Llv(EQ[NNv],y+d*Sin(a)) if not UnitAlive((Je[(NNv)]))then set OQ[NNv]=0 else set OQ[NNv]=OQ[NNv]-1 if ModuloInteger(OQ[NNv],48)==0 then set a=GetRandomReal(0,Lx) set d=GetRandomReal(0,500) set RQ[NNv]=GetUnitX((Je[(NNv)]))+d*Cos(a) set IQ[NNv]=GetUnitY((Je[(NNv)]))+d*Sin(a) endif if ModuloInteger(OQ[NNv],32)==0 then set i=3 call GroupEnumUnitsInRange(G,x,y,500+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,500)then if IsUnitAliveAndEnemy(u,(Je[(NNv)]))then set i=i-1 call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\LightningBolt\\LightningBoltMissile.mdl",u,"origin")) call Ltv(Lfv(LAv("LightningWrath.mdl",GetUnitX(u),GetUnitY(u),.75),$9B,$FF,$9B,$CD)) call Lqv(Lfv(LAv("Abilities\\Weapons\\Bolt\\BoltImpact.mdl",GetUnitX(u),GetUnitY(u),2.25),$9B,$FF,$9B,$CD),1) call UnitDamageTargetBY((((Je[(NNv)]))),((u)),((((8000)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v(u,2) exitwhen i==0 endif endif endloop loop exitwhen i==0 set i=i-1 set a=GetRandomReal(0,Lx) set d=GetRandomReal(0,400) call Ltv(Lfv(LAv("LightningWrath.mdl",x+d*Cos(a),y+d*Sin(a),.75),$9B,$FF,$9B,$CD)) call Lqv(Lfv(LAv("Abilities\\Weapons\\Bolt\\BoltImpact.mdl",x+d*Cos(a),y+d*Sin(a),2.25),$9B,$FF,$9B,$CD),1) endloop call PlaySoundAtPoint_BJ((ln),(($7F)*1.),((x)*1.),((y)*1.),0) set u=null endif endif if OQ[NNv]>0 then call TimerStart(XQ[NNv],.03125,false,function Nge) else call ReleaseTimer(XQ[NNv],"[TimerUtils]Error:130") call Unit_Cancel_Counter($B5,(NNv)) call Ltv(EQ[NNv]) set XQ[NNv]=null endif endfunction function NGe takes unit c returns nothing local integer NNv=(GetUnitUserData((c))) local unit u set RQ[NNv]=GetUnitX(c) set IQ[NNv]=GetUnitY(c) if XQ[NNv]==null then set XQ[NNv]=NewTimer(NNv) set EQ[NNv]=Lfv(LAv("cumulonimbus.mdl",RQ[NNv],IQ[NNv],2.5),0,$CD,0,$FF) call Unit_App_Counter($B6,(NNv)) else call LKv(EQ[NNv],RQ[NNv]) call Llv(EQ[NNv],IQ[NNv]) endif set OQ[NNv]=320 call GroupEnumUnitsInRange(G,RQ[NNv],IQ[NNv],600+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,RQ[NNv],IQ[NNv],600)then if IsUnitAliveAndEnemy(u,c)then call UnitDamageTargetBY(((c)),((u)),(((($30D4)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v(u,2.5) endif endif endloop call zlv(125,$FF,125,1) call Ltv(Lfv(LAv("LightningWrath.mdl",RQ[NNv],IQ[NNv],3),$9B,$FF,$9B,$CD)) call Lqv(Lfv(LAv("Great Lightning.mdl",RQ[NNv],IQ[NNv],3),$9B,$FF,$9B,$CD),1) call TimerStart(XQ[NNv],1,false,function Nge) endfunction function Nhe takes nothing returns boolean call NewTextTagInTarget_B(Sl,"Oh my God!!Landslide crack!!",18,$9B,$FF,$9B) call NGe(Sl) return false endfunction function NHe takes nothing returns nothing call RegisterSpellEffectEvent('A0J5',function Nhe) endfunction function Nje takes nothing returns nothing local integer NNv=(alloc__hpv(GetHandleId((GetExpiredTimer())))) set AQ[NNv]=AQ[NNv]-1 call SetUnitVertexColor((Je[(NNv)]),125,$FF,105,R2I($FF-$C8*AQ[NNv]/ 160.)) if AQ[NNv]<1 then call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:131") call SetUnitPathing((Je[(NNv)]),true) call PauseUnit((Je[(NNv)]),false) call SetUnitInvulnerable((Je[(NNv)]),false) call UnitApplyTimedLife((Je[(NNv)]),'Btlf',60) call Ltv(Lfv(LAv("NatureExplosion.mdl",GetUnitX((Je[(NNv)])),GetUnitY((Je[(NNv)])),.5),$FF,$FF,$FF,125)) call Ltv(Lfv(LAv("Abilities\\Spells\\NightElf\\ReviveNightElf\\ReviveNightElf",GetUnitX((Je[(NNv)])),GetUnitY((Je[(NNv)])),.75),$FF,$FF,$FF,125)) call Unit_Cancel_Counter($B7,(NNv)) endif endfunction function NJe takes integer Cjv,real tX,real tY,real a returns nothing local integer NNv=(GetUnitUserData((CreateUnit(P[$C],Cjv,tX-$96*Cos(a),tY-$96*Sin(a),bj_RADTODEG*a)))) set AQ[NNv]=$A0 call SetUnitPathing((Je[(NNv)]),false) call PauseUnit((Je[(NNv)]),true) call SetUnitInvulnerable((Je[(NNv)]),true) call SetUnitVertexColor((Je[(NNv)]),125,$FF,105,55) call TimerStart(NewTimer(NNv),.03125,true,function Nje) call Unit_App_Counter($B8,(NNv)) endfunction function Nke takes nothing returns boolean local unit c=GetTriggerUnit() local unit u local integer i=2 local integer iJ=3 local integer j local real x=GetUnitX(c) local real y=GetUnitY(c) local real tX local real tY set RF=false call GroupEnumUnitsInRange(G,x,y,800+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,800)then if nC[(GetUnitUserData((u)))]then set i=i-1 set j=iJ set tX=GetUnitX(u) set tY=GetUnitY(u) set RF=false loop set j=j-1 if GetRandomInt(1,2)==1 then call NJe('n02T',tX,tY,j*Lx/ iJ) else call NJe('n02U',tX,tY,j*Lx/ iJ) endif exitwhen j==0 endloop call m1v(u,1) call Ltv(LAv("NatureExplosion.mdl",tX,tY,1.75)) call Lqv(LAv("Abilities\\Spells\\Human\\FlameStrike\\FlameStrikeTarget.mdl",tX,tY,1.5),1) exitwhen i==0 endif endif endloop call Ltv(LAv("NatureWave.mdl",x,y,2.5)) call PlaySoundAtPoint_BJ((Qa),((125)*1.),((x)*1.),((y)*1.),0) set RF=true set c=null set u=null return false endfunction function NKe takes nothing returns boolean call NewTextTagInTarget_B(Sl,"Wake up!",18,$9B,$FF,$9B) return false endfunction function Nle takes nothing returns nothing call RegisterSpellChannelEvent('A0J4',function NKe) call RegisterSpellEffectEvent('A0J4',function Nke) endfunction function NLe takes unit u returns nothing local integer NNv=(GetUnitUserData((u))) if GetUnitAbilityLevel(u,'B03C')==0 then set NQ[NNv]=0 else set NQ[NNv]=NQ[NNv]+1 endif call UnitDamageTargetBY(((LL)),((u)),((((.0125*(1.+.1*I2R(NQ[NNv]/ 8))*GetUnitMaxLifeById((NNv)))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call UnitAppBuff((NNv),'A0J9',$D006B) endfunction function Nme takes integer NNv returns nothing if GetUnitCurrentOrder(cOv(NNv))==$D022F then call IssueImmediateOrderById(cOv(NNv),$D0004) endif call UnitRemoveAbilityandBuffBY((Je[(bQ[NNv])]),'A0JH','B03G') call Unit_Cancel_Counter($B9,bQ[NNv]) endfunction function NMe takes integer NNv returns unit return(Je[(NNv)]) endfunction function Npe takes integer NNv returns nothing if BQ[NNv]then set cQ[CQ[NNv]]=cQ[NNv] set CQ[cQ[NNv]]=CQ[NNv] set BQ[NNv]=false if CQ[(0)]==0 then call frv(dQ) endif call Nme(NNv) call Unit_Cancel_Counter($BA,(NNv)) endif endfunction function NPe takes nothing returns boolean local integer NNv=CQ[(0)] local real x local real y local real dX local real dY local real d local real a loop exitwhen NNv==0 if not UnitAlive((Je[(bQ[NNv])]))or GetUnitCurrentOrder((Je[((NNv))]))!=$D022F then call Npe(NNv) elseif(PB[((bQ[NNv]))])then call DestroyEffect(AddSpecialEffectTarget("OrbOfCorruption.mdx",(Je[(bQ[NNv])]),"chest")) call Npe(NNv) else set x=GetUnitX((Je[(bQ[NNv])])) set y=GetUnitY((Je[(bQ[NNv])])) set dX=GetUnitX((Je[((NNv))]))-x set dY=GetUnitY((Je[((NNv))]))-y set d=SquareRoot(dX*dX+dY*dY) if d>$7D0 then call Npe(NNv) elseif d<$80 then call DestroyEffect(AddSpecialEffectTarget("OrbOfCorruption.mdx",(Je[(bQ[NNv])]),"chest")) call m1v((Je[(bQ[NNv])]),3) call Npe(NNv) else set a=Atan2(dY,dX) call SetUnitX((Je[(bQ[NNv])]),x+($F+.04*d)*Cos(a)) call SetUnitY((Je[(bQ[NNv])]),y+($F+.04*d)*Sin(a)) call m1v((Je[(bQ[NNv])]),.75) endif endif set NNv=CQ[NNv] endloop return false endfunction function Nqe takes integer NNv returns integer if BQ[NNv]then call Nme(NNv) else if CQ[(0)]==0 then if dQ==0 then set dQ=fxv(function NPe) endif call fov(dQ) endif set CQ[NNv]=CQ[(0)] set cQ[CQ[(0)]]=NNv set CQ[(0)]=NNv set cQ[NNv]=0 set BQ[NNv]=true call Unit_App_Counter($BB,(NNv)) endif return NNv endfunction function NQe takes unit u returns integer return Nqe((GetUnitUserData((u)))) endfunction function Nse takes nothing returns boolean local integer NNv=(GetUnitUserData((GetTriggerUnit()))) set bQ[NNv]=(GetUnitUserData((GetSpellTargetUnit()))) if(PB[((bQ[NNv]))])then call DestroyEffect(AddSpecialEffectTarget("OrbOfCorruption.mdx",(Je[(bQ[NNv])]),"chest")) else set NNv=(Nqe((GetUnitUserData(((GetTriggerUnit())))))) call UnitAddAbilityBY((Je[(bQ[NNv])]),'A0JH') call Unit_App_Counter($BC,bQ[NNv]) endif call SetUnitState((Je[((NNv))]),UNIT_STATE_MANA,0) return false endfunction function NSe takes nothing returns nothing call RegisterSpellEffectEvent('A0JG',function Nse) endfunction function Nte takes nothing returns boolean local unit u=GetFilterUnit() local boolean b=nC[(GetUnitUserData((u)))]and not IsUnitPaused(u)and GetUnitAbilityLevel(u,'Avul')==0 and GetUnitAbilityLevel(u,'A0JH')==0 set u=null return b endfunction function NTe takes nothing returns nothing local integer NNv=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local unit u local real x local real y local real dX local real dY local real d local real a local real m if not UnitAlive((Je[(NNv)]))then call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:132") call Unit_Cancel_Counter($BD,(NNv)) else set m=GetUnitState((Je[(NNv)]),UNIT_STATE_MANA) if IsUnitNotAfrz((Je[(NNv)]))then set fQ[NNv]=ModuloInteger(fQ[NNv]+1,32) if not(Control_use[((NNv))])then set m=m+.03125*6.25 endif if fQ[NNv]==0 then set x=GetUnitX((Je[(NNv)])) set y=GetUnitY((Je[(NNv)])) call GroupEnumUnitsInRange(G,x,y,325+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,325)then if IsUnitAliveAndEnemy(u,(Je[(NNv)]))then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\PoisonSting\\PoisonStingTarget.mdl",u,"chest")) call UnitDamageTargetBY((((Je[(NNv)]))),((u)),(((($7D0)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop endif else set fQ[NNv]=0 set m=m-.03125*4. if GetUnitAbilityLevel((Je[(NNv)]),'Bfrz')==1 then call UnitDamageTargetBY((((Je[(NNv)]))),(((Je[(NNv)]))),((((.05/ 32.*GetUnitMaxLifeById((NNv)))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) endif endif call SetUnitState((Je[(NNv)]),UNIT_STATE_MANA,m) if m>=100 and GetUnitCurrentOrder((Je[(NNv)]))!=$D022F then set DQ[NNv]=EnumUnitsMaxRangeFilter((Je[(NNv)]),$960,function Nte) if DQ[NNv]!=null then call IssueTargetOrderById((Je[(NNv)]),$D022F,DQ[NNv]) endif endif endif endfunction function Nue takes integer NNv returns boolean if UnitAlive(s__barrage_target[NNv])then call DestroyEffect(AddSpecialEffectTarget("OrbOfCorruption.mdx",s__barrage_target[NNv],"chest")) call UnitCureTaret(null,s__barrage_target[NNv],$493E0) endif return true endfunction function NUe takes integer NNv returns nothing call RemoveBarrage(NNv) endfunction function Nwe takes nothing returns boolean local integer NNv=s__barrage_FR[FQ] local unit u if NNv!=FQ then call UseBarrage(FQ) loop exitwhen NNv==FQ if(s__barrage_outside[(NNv)])then call Nue(NNv) call RemoveBarrage((NNv)) elseif(s__barrage_finish[(NNv)])then if Nue(NNv)then call RemoveBarrage((NNv)) else set s__barrage_finish[(NNv)]=false endif endif set NNv=s__barrage_FR[NNv] endloop elseif s__barrage_InOperation[FQ]then set s__barrage_InOperation[FQ]=false call TriggerEvaluate(OZv) endif return false endfunction function NWe takes nothing returns nothing call fov(gQ) endfunction function s__DrainSoul_stop takes nothing returns nothing call frv(gQ) endfunction function Nye takes nothing returns nothing set gQ=fxv(function Nwe) call fov(gQ) endfunction function NYe takes integer NNv returns nothing call s__barrage_Filling((FQ),(NNv)) if not s__barrage_InOperation[FQ]then set s__barrage_InOperation[FQ]=true call fov(gQ) endif endfunction function Nze takes nothing returns nothing set FQ=NewLauncher() set s__barrage_InOperation[FQ]=true endfunction function NZe takes nothing returns boolean local real x=GetUnitX(LL) local real y=GetUnitY(LL) local real tX local real tY local integer NNv local unit u local integer c call GroupEnumUnitsInRange(G,x,y,800+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,800)then if IsUnitAliveAndEnemyNotAvul(u,LL)then set tX=GetUnitX(u) set tY=GetUnitY(u) if(EQe(((GetUnitUserData(((u)))))))then set NNv=CreateBarrageTypeC(tX,tY,GetUnitFlyHeight(u)+60,LL) set s__barrage_atkunit[NNv]=u set s__barrage_speed[NNv]=$F set s__barrage_acceleration[NNv]=1.25 set s__barrage_impact_z[NNv]=$FA call LMv(s__barrage_model[NNv],"Abilities\\Spells\\Undead\\DarkSummoning\\DarkSummonMissile.mdl") call SetUnitScale(II[(s__barrage_model[NNv])],((1.5)*1.),0,0) if IsUnitType(u,UNIT_TYPE_MECHANICAL)then set c=5 else set c=1 endif call DestroyEffect(AddSpecialEffectTarget("OrbOfCorruption.mdx",u,"chest")) call DestroyEffect(AddSpecialEffectTarget("CurseBolt.mdx",u,"chest")) call Ewe(u,c) call NYe(NNv) endif call Gjv(u,$96,Atan2(tY-y,tX-x),2,"KnockbackDust.mdx") endif endif endloop call zHv(75,.5,x,y,$4B0) call Ltv(LAv("Desecrate.mdl",x,y,3)) return false endfunction function N_e takes nothing returns boolean call NewTextTagInTarget_B(LL,"If your soul is really yours?",18,$80,0,$CD) return false endfunction function N0e takes nothing returns nothing call RegisterSpellChannelEvent('A0JF',function N_e) call RegisterSpellEffectEvent('A0JF',function NZe) endfunction function N1e takes integer NNv returns boolean set GQ[NNv]=GQ[NNv]+1 set s__barrage_CollisionRange[NNv]=375.-1.25*GQ[NNv] call SetUnitScale(II[(s__barrage_model[NNv])],((6.-.01*GQ[NNv])*1.),0,0) if ModuloInteger(GQ[NNv],6)==0 then call Ltv(LAv("DoomBlack.mdl",(GetUnitX(II[(s__barrage_model[NNv])])),(GetUnitY(II[(s__barrage_model[NNv])])),2.5-.0125*GQ[NNv])) endif return false endfunction function N2e takes integer NNv,unit u returns boolean if IsUnitAliveAndEnemy(u,s__barrage_atkunit[NNv])then if IsUnitType(u,UNIT_TYPE_MECHANICAL)then call UnitDamageTargetBY(((s__barrage_atkunit[NNv])),((u)),(((($C350)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") else call UnitDamageTargetBY(((s__barrage_atkunit[NNv])),((u)),(((($4E20)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif call DestroyEffect(AddSpecialEffectTarget("DoomBlack.mdl",u,"origin")) call UnitAppBuff((GetUnitUserData((u))),'A0JK',$D006B) endif return false endfunction function N3e takes integer NNv returns nothing call RemoveBarrage(NNv) endfunction function N4e takes nothing returns boolean local integer NNv=s__barrage_FR[hQ] local unit u if NNv!=hQ then call UseBarrage(hQ) loop exitwhen NNv==hQ if(s__barrage_outside[(NNv)])then call RemoveBarrage((NNv)) elseif(s__barrage_finish[(NNv)])then call RemoveBarrage((NNv)) else if N1e(NNv)then call RemoveBarrage((NNv)) endif if s__barrage_CollisionRange[NNv]!=0 then call GroupEnumUnitsInRange(G,s__barrage_X[NNv],s__barrage_Y[NNv],s__barrage_CollisionRange[NNv]+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,s__barrage_X[NNv],s__barrage_Y[NNv],s__barrage_CollisionRange[NNv])then if not IsUnitInGroup(u,s__barrage_enum_g[NNv])then call GroupAddUnit(s__barrage_enum_g[NNv],u) if u!=s__barrage_target[NNv]and N2e(NNv,u)then set u=null call RemoveBarrage((NNv)) exitwhen true endif endif endif endloop endif endif set NNv=s__barrage_FR[NNv] endloop elseif s__barrage_InOperation[hQ]then set s__barrage_InOperation[hQ]=false call TriggerEvaluate(O_v) endif return false endfunction function N5e takes nothing returns nothing call fov(HQ) endfunction function s__WeaponOfNothingness_stop takes nothing returns nothing call frv(HQ) endfunction function N6e takes nothing returns nothing set HQ=fxv(function N4e) call fov(HQ) endfunction function N7e takes integer NNv returns nothing call s__barrage_Filling((hQ),(NNv)) if not s__barrage_InOperation[hQ]then set s__barrage_InOperation[hQ]=true call fov(HQ) endif endfunction function N8e takes nothing returns nothing set hQ=NewLauncher() set s__barrage_InOperation[hQ]=true endfunction function N9e takes nothing returns boolean local real x=GetUnitX(LL) local real y=GetUnitY(LL) local real a=Atan2(GetSpellTargetY()-y,GetSpellTargetX()-x) local integer NNv=CreateBarrageTypeD(x,y,0,x+$7D0*Cos(a),y+$7D0*Sin(a),0) set s__barrage_atkunit[NNv]=LL set s__barrage_speed[NNv]=25 set s__barrage_acceleration[NNv]=1.25 call LMv(s__barrage_model[NNv],"White Claw.mdl") call SetUnitScale(II[(s__barrage_model[NNv])],((6)*1.),0,0) set s__barrage_CollisionRange[NNv]=375 set GQ[NNv]=0 call Lfv(s__barrage_model[NNv],$F,$F,$F,$CD) call N7e(NNv) return false endfunction function bve takes nothing returns boolean call UnitAnimationAddEffect(UnitAnimationAddEffect(UnitAppAnimation(LL),"SkullBuff.mdl","origin"),"OrbOfCorruption.mdl","hand right") return false endfunction function bee takes nothing returns nothing call RegisterSpellChannelEvent('A0I0',function bve) call RegisterSpellEffectEvent('A0I0',function N9e) endfunction function bxe takes nothing returns nothing local integer NNv=(alloc__hpv(GetHandleId((GetExpiredTimer())))) if GetUnitAbilityLevel((Je[(NNv)]),'B03E')>0 then call UnitDamageTargetBY(((LL)),(((Je[(NNv)]))),((((.1*GetUnitMaxLifeById((NNv)))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") else call ReleaseTimer(jQ[NNv],"[TimerUtils]Error:133") call Unit_Cancel_Counter($BE,(NNv)) set jQ[NNv]=null endif endfunction function boe takes unit u returns nothing local integer NNv=(GetUnitUserData((u))) if not(PB[((NNv))])then if jQ[NNv]==null then set jQ[NNv]=NewTimer(NNv) call Unit_App_Counter($BF,(NNv)) endif call UnitAppBuffByLevel((GetUnitUserData((u))),'A0JB',$D02BC,1) call TimerStart(jQ[NNv],1,true,function bxe) endif endfunction function bre takes nothing returns boolean local real x=GetSpellTargetX() local real y=GetSpellTargetY() local unit u call GroupEnumUnitsInRange(G,x,y,400+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,400)then if IsUnitAliveAndEnemyNotAvul(u,LL)then call DestroyEffect(AddSpecialEffectTarget("CurseBolt.mdl",u,"chest")) call boe(u) endif endif endloop call NewTextTagInTarget_B(LL,"Rest in silence",18,$80,0,$CD) call zHv(50,1,x,y,600) call Ltv(LAv("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",x,y,3)) call Ltv(LAv("uberdarkwave.mdl",x,y,.5)) call PlaySoundAtPoint_BJ((pa),(($7F)*1.),((x)*1.),((y)*1.),0) return false endfunction function bie takes nothing returns nothing call RegisterSpellEffectEvent('A0JC',function bre) endfunction function bae takes integer NNv returns boolean local real x=s__locationez_X[s__barrage_p2[NNv]] local real y=s__locationez_Y[s__barrage_p2[NNv]] local unit u call GroupEnumUnitsInRange(G,x,y,325+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,325)then if IsUnitOfPlayerNotseckill(u)then call KillUnitBJ(u) endif endif endloop call Ltv(LAv("ShadowAssault.mdl",x,y,2.5)) return true endfunction function bne takes integer NNv returns nothing call RemoveBarrage(NNv) endfunction function bVe takes nothing returns boolean local integer NNv=s__barrage_FR[JQ] local unit u if NNv!=JQ then call UseBarrage(JQ) loop exitwhen NNv==JQ if(s__barrage_outside[(NNv)])then call bae(NNv) call RemoveBarrage((NNv)) elseif(s__barrage_finish[(NNv)])then if bae(NNv)then call RemoveBarrage((NNv)) else set s__barrage_finish[(NNv)]=false endif endif set NNv=s__barrage_FR[NNv] endloop elseif s__barrage_InOperation[JQ]then set s__barrage_InOperation[JQ]=false call TriggerEvaluate(O0v) endif return false endfunction function bEe takes nothing returns nothing call fov(kQ) endfunction function s__AbsoluteDevastation_stop takes nothing returns nothing call frv(kQ) endfunction function bXe takes nothing returns nothing set kQ=fxv(function bVe) call fov(kQ) endfunction function bOe takes integer NNv returns nothing call s__barrage_Filling((JQ),(NNv)) if not s__barrage_InOperation[JQ]then set s__barrage_InOperation[JQ]=true call fov(kQ) endif endfunction function bRe takes nothing returns nothing set JQ=NewLauncher() set s__barrage_InOperation[JQ]=true endfunction function bIe takes nothing returns nothing local real x=GetRectCenterX(gg_rct_WLZS2_______________001) local real y=GetRectCenterY(gg_rct_WLZS2_______________001) local real tx local real ty local real a=GetRandomReal(0,Lx) local real a2=0 local integer i local integer v if KQ==0 then set i=1 else set i=R2I(KQ/ 325*6) set a2=Lx/ i endif loop exitwhen i==0 set i=i-1 set a=a+a2 set tx=x+Cos(a)*KQ set ty=y+Sin(a)*KQ set v=CreateBarrageTypeD(tx,ty+400,900,tx,ty,0) set s__barrage_atkunit[v]=LL set s__barrage_speed[v]=1.25 set s__barrage_acceleration[v]=.375 call LMv(s__barrage_model[v],"OrbOfCorruption.mdl") call SetUnitScale(II[(s__barrage_model[v])],((3)*1.),0,0) call LFv(s__barrage_model[v],"Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl") call bOe(v) endloop set KQ=KQ+325 if KQ>$514 then call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:134") endif endfunction function bAe takes nothing returns boolean if(IsUnitType((GetTriggerUnit()),UNIT_TYPE_GIANT))then set KQ=0 call zlv($80,0,$FF,1) call TimerStart((NewTimer(0)),.1,true,function bIe) else call ZOv() endif return false endfunction function bNe takes nothing returns boolean if(IsUnitType((GetTriggerUnit()),UNIT_TYPE_GIANT))then call NewTextTagInTarget_B(GetTriggerUnit(),"Fools! Fall in darkness and despair!",18,$80,0,$CD) else call NewTextTagInTarget_B(GetTriggerUnit(),"Fools! Fall in darkness and despair!",9,$80,0,$CD) endif return false endfunction function bbe takes nothing returns nothing call RegisterSpellChannelEvent('A0KS',function bNe) call RegisterSpellChannelEvent('A0JE',function bNe) call RegisterSpellEffectEvent('A0KS',function bAe) call RegisterSpellEffectEvent('A0JE',function bAe) endfunction function bCe takes nothing returns boolean local integer i=8 set pQ=false call TriggerEvaluate(O2v) call TriggerEvaluate(O4v) call TriggerEvaluate(RVv) loop set i=i+1 if MV[i]!=null and Off_A098_id[(GetUnitUserData((MV[i])))]=='n033' then set Off_A098[(GetUnitUserData((MV[i])))]=false set Off_A098_id[(GetUnitUserData((MV[i])))]=0 endif exitwhen i==0 endloop return false endfunction function bde takes real bDe returns nothing local real x=GetUnitX(LQ) local real y=GetUnitY(LQ) local unit u call GroupEnumUnitsInRange(G,x,y,bDe+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,bDe)then if IsUnitAliveAndEnemyNotAvul(u,LQ)then call Gjv(u,$AF,Atan2(GetUnitY(u)-y,GetUnitX(u)-x),1.75,"KnockbackDust.mdl") endif endif endloop call Ltv(LAv("BlackChakraExplosion.mdx",x,y,3)) call zHv(50,.5,x,y,$5DC) endfunction function bfe takes nothing returns nothing set pQ=true call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:135") call SetUnitTimeScale(LQ,1) call PauseUnit(LQ,false) call bde(750) call NewTextTagInTarget_B(LQ,"Here, death will be your only ending! ..",18,75,125,25) call DeUnitAdef((GetUnitUserData((LQ))),MQ) call AddUnitDeathTrig((GetUnitUserData((LQ))),function bCe) call B9v(LQ) call B5v(LQ) call B0v(LQ) call TriggerEvaluate(REv) endfunction function bFe takes nothing returns boolean call s__Trig_remove((s__Trig_Index)) call cev(lQ) call SetUnitTimeScale(LQ,2.33/ lQ) call SetUnitAnimation(LQ,"birth") call QueueUnitAnimation(LQ,"stand") call TimerStart((NewTimer(0)),lQ,false,function bfe) return false endfunction function bge takes nothing returns nothing set mQ=gg_rct_BXSW______________002 set LQ=gg_unit_n033_0007 set MQ=ModifyUnitAdef((GetUnitUserData((LQ))),90) set pQ=false call SetUnitX(LQ,GetRectCenterX(mQ)) call SetUnitY(LQ,GetRectCenterY(mQ)) call PauseUnit(LQ,true) call SetUnitAnimation(LQ,"death") call TriggerEvaluate(O6v) call UnitAddShieldTrigB((GetUnitUserData((LQ))),function bFe) endfunction function bGe takes integer NNv returns nothing set SQ=SQ-1 call SetUnitVertexColor(civ(NNv),85,85,0,$FF) call SetUnitScale(civ(NNv),qQ,0,0) call KillUnit(civ(NNv)) endfunction function bhe takes integer NNv returns unit return(Je[(NNv)]) endfunction function bHe takes integer NNv returns nothing if TQ[NNv]then set uQ[UQ[NNv]]=uQ[NNv] set UQ[uQ[NNv]]=UQ[NNv] set TQ[NNv]=false if UQ[(0)]==0 then call frv(wQ) endif call bGe(NNv) call Unit_Cancel_Counter($C0,(NNv)) endif endfunction function bje takes nothing returns boolean local integer NNv=UQ[(0)] if tQ>0 then set tQ=tQ-1 endif loop exitwhen NNv==0 if UnitAlive((Je[((NNv))]))then if sQ[NNv]>0 then set sQ[NNv]=sQ[NNv]-1 if sQ[NNv]==0 then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",(Je[((NNv))]),"origin")) call SetUnitTimeScale((Je[((NNv))]),1) call m_v((Je[((NNv))]),false) endif endif else call bHe(NNv) endif set NNv=UQ[NNv] endloop return false endfunction function bJe takes integer NNv returns integer if TQ[NNv]then call bGe(NNv) else if UQ[(0)]==0 then if wQ==0 then set wQ=fxv(function bje) endif call fov(wQ) endif set UQ[NNv]=UQ[(0)] set uQ[UQ[(0)]]=NNv set UQ[(0)]=NNv set uQ[NNv]=0 set TQ[NNv]=true call Unit_App_Counter($C1,(NNv)) endif return NNv endfunction function bke takes unit u returns integer return bJe((GetUnitUserData((u)))) endfunction function bKe takes nothing returns nothing local integer NNv=UQ[(0)] loop exitwhen NNv==0 call bHe(NNv) set NNv=UQ[NNv] endloop endfunction function ble takes nothing returns boolean call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\VampiricAura\\VampiricAuraTarget.mdl",(mF),"origin")) call B6v((mF),(MF),0) call UnitCureTaret(null,(mF),(DAK_AMOUNT[HF])) return false endfunction function bLe takes real x,real y,real a returns nothing local integer NNv if not IsUnitPaused(LQ)then set NNv=(bJe((GetUnitUserData(((CreateUnit(P[$B],'n03A',x,y,a))))))) set SQ=SQ+1 set sQ[NNv]=R2I(32*PQ) call m_v((Je[((NNv))]),true) call SetUnitTimeScale((Je[((NNv))]),2.33/ PQ) call SetUnitAnimation((Je[((NNv))]),"birth") call QueueUnitAnimation((Je[((NNv))]),"stand") call UnitAddPAttackTrig((NNv),function ble) call B0v((Je[((NNv))])) if SQ==48 then call TriggerEvaluate(ROv) elseif SQ==48/ 2 and tQ==0 then set tQ=R2I(32*QQ) call StartSound(Za) call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,5,"|c0055864dNote: Too many zombies..|r") endif endif endfunction function bme takes integer NNv returns boolean call UnitCureTaret(null,s__barrage_target[NNv],.01*yQ*GetUnitMaxLifeById((GetUnitUserData((s__barrage_target[NNv]))))) call SetUnitState(s__barrage_target[NNv],UNIT_STATE_MANA,GetUnitState(s__barrage_target[NNv],UNIT_STATE_MANA)+.01*YQ*GetUnitState(s__barrage_target[NNv],UNIT_STATE_MAX_MANA)) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",s__barrage_target[NNv],"origin")) return true endfunction function bMe takes integer NNv,unit u returns boolean if IsUnitAliveAndEnemy(u,s__barrage_atkunit[NNv])then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl",u,"origin")) call UnitDamageTargetBY(((s__barrage_atkunit[NNv])),((u)),((((WQ)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) endif return false endfunction function bpe takes integer NNv returns nothing call RemoveBarrage(NNv) endfunction function bPe takes nothing returns boolean local integer NNv=s__barrage_FR[zQ] local unit u if NNv!=zQ then call UseBarrage(zQ) loop exitwhen NNv==zQ if(s__barrage_outside[(NNv)])then call bme(NNv) call RemoveBarrage((NNv)) elseif(s__barrage_finish[(NNv)])then if bme(NNv)then call RemoveBarrage((NNv)) else set s__barrage_finish[(NNv)]=false endif else if s__barrage_CollisionRange[NNv]!=0 then call GroupEnumUnitsInRange(G,s__barrage_X[NNv],s__barrage_Y[NNv],s__barrage_CollisionRange[NNv]+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,s__barrage_X[NNv],s__barrage_Y[NNv],s__barrage_CollisionRange[NNv])then if not IsUnitInGroup(u,s__barrage_enum_g[NNv])then call GroupAddUnit(s__barrage_enum_g[NNv],u) if u!=s__barrage_target[NNv]and bMe(NNv,u)then set u=null call bme(NNv) call RemoveBarrage((NNv)) exitwhen true endif endif endif endloop endif endif set NNv=s__barrage_FR[NNv] endloop elseif s__barrage_InOperation[zQ]then set s__barrage_InOperation[zQ]=false call TriggerEvaluate(O3v) endif return false endfunction function bqe takes nothing returns nothing call fov(ZQ) endfunction function s__WorshipMissile_stop takes nothing returns nothing call frv(ZQ) endfunction function bQe takes nothing returns nothing set ZQ=fxv(function bPe) call fov(ZQ) endfunction function bse takes integer NNv returns nothing call s__barrage_Filling((zQ),(NNv)) if not s__barrage_InOperation[zQ]then set s__barrage_InOperation[zQ]=true call fov(ZQ) endif endfunction function bSe takes nothing returns nothing set zQ=NewLauncher() set s__barrage_InOperation[zQ]=true endfunction function bte takes unit NZv,unit N7v returns nothing local integer NNv=CreateBarrageTypeA(NZv,N7v) call LMv(s__barrage_model[NNv],"Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilMissile.mdl") call SetUnitScale(II[(s__barrage_model[NNv])],((2.5)*1.),0,0) set s__barrage_CollisionRange[NNv]=275. set s__barrage_speed[NNv]=.03125*750. call SetBarrageFlightRadianEZ(NNv,.15) call Lfv(s__barrage_model[NNv],125,$FF,125,$FF) call bse(NNv) endfunction function bTe takes nothing returns real return GetRandomReal(30.,60.) endfunction function bue takes integer NNv returns nothing set xs[NNv]=R2I(32*(GetRandomReal(30.,60.))) set os[NNv]=xs[NNv] endfunction function bUe takes integer NNv returns unit return(Je[(NNv)]) endfunction function bwe takes integer NNv returns nothing if as[NNv]then set Vs[Es[NNv]]=Vs[NNv] set Es[Vs[NNv]]=Es[NNv] set as[NNv]=false if Es[(0)]==0 then call frv(Xs) endif call Unit_Cancel_Counter($C2,(NNv)) endif endfunction function bWe takes nothing returns boolean local integer NNv=Es[(0)] loop exitwhen NNv==0 if UnitAlive((Je[(NNv)]))then if rs[NNv]>0 then if(Control_use[((NNv))])then set rs[NNv]=0 call SetUnitAnimation((Je[(NNv)]),"death") else set rs[NNv]=rs[NNv]-1 if rs[NNv]<1 then call bte((Je[(NNv)]),LQ) call SetUnitAnimation((Je[(NNv)]),"attack") endif endif if rs[NNv]<1 then call bue(NNv) call QueueUnitAnimation((Je[(NNv)]),"stand") endif elseif not IsUnitPaused(LQ)then set os[NNv]=os[NNv]-1 call SetUnitState((Je[(NNv)]),UNIT_STATE_MANA,(1.-os[NNv]/ I2R(xs[NNv]))*GetUnitState((Je[(NNv)]),UNIT_STATE_MAX_MANA)) if os[NNv]<1 then set rs[NNv]=R2I(32*4.) call StartSound(Za) call NewTextTagInTarget_A((Je[(NNv)]),"Oh God! Give me strength!!!",$F,$9B,$F) call SetUnitTimeScale((Je[(NNv)]),2.267/ 4.) call SetUnitAnimation((Je[(NNv)]),"stand work gold") call QueueUnitAnimation((Je[(NNv)]),"stand") endif endif else call bwe(NNv) endif set NNv=Es[NNv] endloop return false endfunction function bye takes integer NNv returns boolean if not as[NNv]then if Es[(0)]==0 then if Xs==0 then set Xs=fxv(function bWe) endif call fov(Xs) endif set Es[NNv]=Es[(0)] set Vs[Es[(0)]]=NNv set Es[(0)]=NNv set Vs[NNv]=0 set as[NNv]=true call Unit_App_Counter($C3,(NNv)) return true endif return false endfunction function bYe takes integer NNv returns nothing if es[NNv]!=0 then call UnitRemoveAbilityandBuffBY((Je[(NNv)]),'A0QC','B063') call DeUnitAdef((NNv),es[NNv]) call SetUnitNocontrol((NNv),false) set es[NNv]=0 endif endfunction function bze takes nothing returns nothing local integer i=4 if not Os then set Os=true loop exitwhen i==0 set i=i-1 if UnitAlive((Je[(vs[i])]))then if GetRandomInt(1,2)==1 then call NewTextTagInTarget_A((Je[(vs[i])]),"Oh ~ ~ selling cake Germany!!!",$F,$9B,$F) else call NewTextTagInTarget_A((Je[(vs[i])]),"Wake the sleeping king!! ..",$F,$9B,$F) endif call SetUnitAnimation((Je[(vs[i])]),"attack") call QueueUnitAnimation((Je[(vs[i])]),"stand") call bte((Je[(vs[i])]),LQ) endif endloop call B1v(LQ) endif endfunction function bZe takes nothing returns nothing local integer i=4 loop exitwhen i==0 set i=i-1 call bYe(vs[i]) call RemoveUnitBJ((Je[(vs[i])]),5) endloop endfunction function b_e takes nothing returns nothing local integer i=4 call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:136") loop exitwhen i==0 set i=i-1 call bye(vs[i]) call bue(vs[i]) call SetUnitTimeScale((Je[(vs[i])]),1) call m_v((Je[(vs[i])]),false) endloop endfunction function s__Acolyte_prepare takes nothing returns nothing local integer i=4 local real x=GetRectCenterX(mQ) local real y=GetRectCenterY(mQ) local real dX=.66*(GetRectMaxX(mQ)-x) local real dY=.66*(GetRectMaxY(mQ)-y) local real a set vs[0]=(GetUnitUserData((gg_unit_n039_0548))) set vs[1]=(GetUnitUserData((gg_unit_n039_0549))) set vs[2]=(GetUnitUserData((gg_unit_n039_0040))) set vs[3]=(GetUnitUserData((gg_unit_n039_0547))) loop exitwhen i==0 set i=i-1 set es[vs[i]]=ModifyUnitAdef((vs[i]),100) call SetUnitNocontrol((vs[i]),true) call UnitAddAbilityBY((Je[(vs[i])]),'A0QC') call SetUnitVertexColor((Je[(vs[i])]),55,55,55,$9B) call SetUnitTimeScale((Je[(vs[i])]),0) call m_v((Je[(vs[i])]),true) endloop endfunction function b0e takes nothing returns real return GetRandomReal(2,6) endfunction function b1e takes nothing returns nothing local integer NNv=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:137") call Unit_Cancel_Counter($C4,(NNv)) set Is[NNv]=false endfunction function b2e takes nothing returns nothing local integer NNv=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:138") call SetUnitNocontrol((NNv),false) call UnitRemoveAbilityandBuffBY((Je[(NNv)]),'A0QD','B064') endfunction function b3e takes nothing returns nothing local integer NNv=(alloc__hpv(GetHandleId((GetExpiredTimer())))) if UnitAlive((Je[(NNv)]))and not IsUnitPaused((Je[(NNv)]))then call SetUnitNocontrol((NNv),true) call UnitAddAbilityBY((Je[(NNv)]),'A0QD') call NewTextTagInTarget_B((Je[(NNv)]),"Kill you! ..",18,25,$FF,25) call Ltv(LAv("Abilities\\Spells\\Other\\HowlOfTerror\\HowlCaster.mdl",GetUnitX((Je[(NNv)])),GetUnitY((Je[(NNv)])),3)) call TimerStart(NewTimer(NNv),4.,false,function b2e) call TimerStart(GetExpiredTimer(),20,false,function b1e) else call TimerStart(GetExpiredTimer(),0,false,function b1e) endif endfunction function b4e takes nothing returns nothing local integer NNv=(alloc__hpv(GetHandleId((GetExpiredTimer())))) if UnitAlive((Je[(NNv)]))and not IsUnitPaused((Je[(NNv)]))then call NewTextTagInTarget_B((Je[(NNv)]),"Speed death! ",18,25,$FF,25) call Lqv(LAv("Abilities\\Spells\\Human\\FlameStrike\\FlameStrikeTarget.mdl",GetUnitX((Je[(NNv)])),GetUnitY((Je[(NNv)])),2.5),Rs) call TimerStart(GetExpiredTimer(),Rs,false,function b3e) else call TimerStart(GetExpiredTimer(),0,false,function b1e) endif endfunction function b5e takes nothing returns boolean local integer NNv if GetWidgetLife((MF))/ GetUnitMaxLifeById((pF))<.01*85 then set NNv=(pF) if not Is[NNv]then set Is[NNv]=true call TimerStart(NewTimer(NNv),(GetRandomReal(2,6)),false,function b4e) call Unit_App_Counter($C5,(NNv)) endif endif return false endfunction function b6e takes unit u returns nothing call UnitAddShieldTrig((GetUnitUserData((u))),function b5e) endfunction function b7e takes integer mkv returns real return 2500. endfunction function b8e takes integer mkv returns integer return 4*mkv endfunction function b9e takes integer NNv returns nothing if Ns[NNv]!=null then call ReleaseTimer(Ns[NNv],"[TimerUtils]Error:139") call UnitRemoveAbilityandBuffBY((Je[(NNv)]),'A0QF','B065') call DeUnitBeCureRatio((NNv),Bs[NNv]) call Unit_Cancel_Counter($C6,bs[NNv]) call Unit_Cancel_Counter($C7,(NNv)) set Ns[NNv]=null set Cs[NNv]=0 endif endfunction function Bve takes nothing returns nothing local integer NNv=(alloc__hpv(GetHandleId((GetExpiredTimer())))) if UnitAlive((Je[(NNv)]))then set ds[NNv]=ds[NNv]-1 call UnitDamageTargetBY((((Je[(bs[NNv])]))),(((Je[(NNv)]))),((((.5*b7e(Cs[NNv]))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") else set ds[NNv]=0 endif if ds[NNv]<1 then call b9e(NNv) endif endfunction function Bee takes unit NZv,unit N7v,integer B7v returns nothing local integer NNv=(GetUnitUserData((N7v))) local integer Bxe=Cs[NNv]+B7v local integer Boe if Bxe>25 then set Bxe=25 endif if Bxe>0 then set Boe=(4*(Bxe)) if Bxe!=Cs[NNv]and ModuloInteger(Bxe,5)==0 then call NewTextTagInTarget_B((Je[(NNv)]),I2S(Bxe)+" STACK (-"+I2S(Boe)+"% HEAL RECEIVED)",8+(Bxe/ I2R(5)),$D7,65,$F) endif if Ns[NNv]==null then set Ns[NNv]=NewTimer(NNv) set Bs[NNv]=ModifyUnitBeCureRatio((NNv),-(4*(Bxe))) call UnitAddAbilityBY((Je[(NNv)]),'A0QF') call Unit_App_Counter($C8,(NNv)) else call UnitBeCureRatioChange((NNv),Bs[NNv],-(4*(Bxe))) call Unit_Cancel_Counter($C9,bs[NNv]) endif set bs[NNv]=(GetUnitUserData((NZv))) set ds[NNv]=R2I(As/ .5) set Cs[NNv]=Bxe call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Demon\\DemonLargeDeathExplode\\DemonLargeDeathExplode.mdl",(Je[(NNv)]),"origin")) call TimerStart(Ns[NNv],.5,true,function Bve) call Unit_App_Counter($CA,bs[NNv]) endif endfunction function Bre takes unit u returns nothing if GetUnitAbilityLevel(u,'A0QF')==1 then call b9e(((GetUnitUserData((u))))) endif endfunction function Bie takes nothing returns boolean local boolean Bae=GetUnitAbilityLevel((mF),'A0QD')==1 local real x=GetUnitX((mF)) local real y=GetUnitY((mF)) local real a=Atan2(GetUnitY((MF))-y,GetUnitX((MF))-x) local unit u call GroupEnumUnitsInRange(G,x,y,Ds+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,Ds)then if UnitAlive(u)and GetUnitAbilityLevel(u,'Avul')==0 and(Cos(((a)*1.)-((Atan2(GetUnitY(u)-y,GetUnitX(u)-x))*1.))>=Cos(((bj_DEGTORAD*fs)*1.)))then if IsUnitEnemy(u,GetOwningPlayer((mF)))then if u!=(MF)then call UnitDamageTargetBY((((mF))),((u)),((((GetDamage())*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) endif if Bae then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl",u,"origin")) call UnitCureTaret(null,(mF),2.5*GetDamage()) call m1v(u,.5) else call UnitCureTaret(null,(mF),GetDamage()) endif call Bee((mF),u,1) elseif Bae and TQ[((GetUnitUserData((u))))]then call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanLargeDeathExplode\\HumanLargeDeathExplode.mdl",u,"origin")) call SetUnitState((mF),UNIT_STATE_MANA,GetUnitState((mF),UNIT_STATE_MANA)+10.) call bHe(((GetUnitUserData((u))))) endif endif endif endloop call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\VampiricAura\\VampiricAuraTarget.mdl",(mF),"origin")) call Ltv(Lfv(Lbv(LVv('e037',x,y,bj_RADTODEG*a),5,2),0,125,0,$FF)) return false endfunction function Bne takes unit u returns nothing call UnitAddPAttackTrig((GetUnitUserData((u))),function Bie) endfunction function BVe takes unit NZv,unit N7v returns real return $2710+.5*GetUnitMaxLifeById((GetUnitUserData((N7v)))) endfunction function BEe takes integer NNv returns nothing call zJv((GetPlayerId((GetOwningPlayer(B3v(NNv)))))) call UnitRemoveAbilityandBuffBY((Je[(NNv)]),'A0QE','B066') call Unit_Cancel_Counter($CB,hs[NNv]) call Ltv(Hs[NNv]) endfunction function BXe takes integer NNv returns unit return(Je[(NNv)]) endfunction function BOe takes integer NNv returns nothing if Js[NNv]then set Ks[Ls[NNv]]=Ks[NNv] set Ls[Ks[NNv]]=Ls[NNv] set Js[NNv]=false if Ls[(0)]==0 then call frv(ms) endif call BEe(NNv) call Unit_Cancel_Counter($CC,(NNv)) endif endfunction function BRe takes nothing returns boolean local integer NNv=Ls[(0)] local unit u local real x local real y local real r loop exitwhen NNv==0 set x=GetUnitX((Je[((NNv))])) set y=GetUnitY((Je[((NNv))])) if UnitAlive((Je[((NNv))]))and not Zs[(NNv)]then set js[NNv]=js[NNv]-1 set r=1-js[NNv]/(32*Fs) call LKv(Hs[NNv],x) call Llv(Hs[NNv],y) call SetUnitFlyHeight(II[(Hs[NNv])],((Gs+GetUnitFlyHeight((Je[((NNv))])))*1.),0) call SetUnitScale(II[(Hs[NNv])],((2.+(6.-2.)*r)*1.),0,0) if TQ[(NNv)]then call SetUnitVertexColor((Je[((NNv))]),R2I((1-r)*85),85,R2I((1-r)*0),$FF) call SetUnitScale((Je[((NNv))]),qQ+(4.-qQ)*r,0,0) endif else set js[NNv]=0 endif if js[NNv]<1 then call GroupEnumUnitsInRange(G,x,y,gs+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,gs)then if IsUnitAliveAndEnemy(u,(Je[(hs[NNv])]))then call UnitDamageTargetBY((((Je[(hs[NNv])]))),((u)),((((BVe((Je[(hs[NNv])]),u))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop if TQ[(NNv)]then call B_v((Je[((NNv))])) endif call zhv((GetPlayerId((GetOwningPlayer((Je[((NNv))]))))),40,.5) call Ltv(LAv("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",x,y,gs/ $B4)) call Ltv(LAv("Acid Ex.mdl",x,y,gs/ 120)) call BOe(NNv) endif set NNv=Ls[NNv] endloop return false endfunction function BIe takes integer NNv returns boolean if not Js[NNv]then if Ls[(0)]==0 then if ms==0 then set ms=fxv(function BRe) endif call fov(ms) endif set Ls[NNv]=Ls[(0)] set Ks[Ls[(0)]]=NNv set Ls[(0)]=NNv set Ks[NNv]=0 set Js[NNv]=true call Unit_App_Counter($CD,(NNv)) return true endif return false endfunction function BAe takes unit NZv,unit N7v returns nothing local integer NNv=(GetUnitUserData((N7v))) if BIe(NNv)then set hs[NNv]=(GetUnitUserData((NZv))) set Hs[NNv]=Lnv(GetUnitX(N7v),GetUnitY(N7v),0) call LMv(Hs[NNv],"Abilities\\Spells\\Other\\Parasite\\ParasiteMissile.mdl") call SetUnitScale(II[(Hs[NNv])],((2.)*1.),0,0) call SetUnitFlyHeight(II[(Hs[NNv])],((Gs+GetUnitFlyHeight(N7v))*1.),0) set js[NNv]=R2I(32*Fs) if GetLocalPlayer()==GetOwningPlayer((Je[((NNv))]))then call StartSound(Za) endif call zKv((GetPlayerId((GetOwningPlayer((Je[((NNv))]))))),$CD,$FF,$CD,Fs) call Lfv(Hs[NNv],0,$FF,0,$FF) call UnitAddAbilityBY((Je[((NNv))]),'A0QE') call Unit_App_Counter($CE,hs[NNv]) endif endfunction function BNe takes unit u returns nothing if GetUnitAbilityLevel(u,'A0QE')==1 then call BOe(((GetUnitUserData((u))))) endif endfunction function Bbe takes unit NZv returns integer if GetWidgetLife(NZv)<.5*GetUnitMaxLifeById((GetUnitUserData((NZv))))then return 4 else return 3 endif endfunction function BBe takes unit NZv returns integer if GetWidgetLife(NZv)<.5*GetUnitMaxLifeById((GetUnitUserData((NZv))))then return 3 else return 2 endif endfunction function Bce takes integer NNv returns boolean if UnitAlive(s__barrage_target[NNv])then if IsUnitAliveAndAlly(s__barrage_target[NNv],s__barrage_atkunit[NNv])then call UnitCureTaret(null,s__barrage_target[NNv],GetUnitMaxLifeById((GetUnitUserData((s__barrage_target[NNv]))))) endif call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",s__barrage_target[NNv],"origin")) call BAe(s__barrage_atkunit[NNv],s__barrage_target[NNv]) endif return true endfunction function BCe takes integer NNv returns nothing call RemoveBarrage(NNv) endfunction function Bde takes nothing returns boolean local integer NNv=s__barrage_FR[Ms] local unit u if NNv!=Ms then call UseBarrage(Ms) loop exitwhen NNv==Ms if(s__barrage_outside[(NNv)])then call Bce(NNv) call RemoveBarrage((NNv)) elseif(s__barrage_finish[(NNv)])then if Bce(NNv)then call RemoveBarrage((NNv)) else set s__barrage_finish[(NNv)]=false endif endif set NNv=s__barrage_FR[NNv] endloop elseif s__barrage_InOperation[Ms]then set s__barrage_InOperation[Ms]=false call TriggerEvaluate(Rov) endif return false endfunction function BDe takes nothing returns nothing call fov(ps) endfunction function s__Infest_stop takes nothing returns nothing call frv(ps) endfunction function Bfe takes nothing returns nothing set ps=fxv(function Bde) call fov(ps) endfunction function BFe takes integer NNv returns nothing call s__barrage_Filling((Ms),(NNv)) if not s__barrage_InOperation[Ms]then set s__barrage_InOperation[Ms]=true call fov(ps) endif endfunction function Bge takes nothing returns nothing set Ms=NewLauncher() set s__barrage_InOperation[Ms]=true endfunction function BGe takes nothing returns boolean return UnitAlive(GetFilterUnit())and nC[(GetUnitUserData((GetFilterUnit())))] endfunction function Bhe takes nothing returns boolean return UnitAlive(GetFilterUnit())and GetUnitTypeId(GetFilterUnit())=='n03A' and not IsUnitPaused(GetFilterUnit()) endfunction function BHe takes nothing returns boolean local unit c=GetTriggerUnit() local real x=GetUnitX(c) local real y=GetUnitY(c) local integer Bje=2 local integer NNv local group g local unit u loop set Bje=Bje-1 if Bje==1 then set g=GroupRandomEnumUnitsInRangeCounted(x,y,1500.,Bbe(c),function BGe) elseif Bje==0 then set g=GroupRandomEnumUnitsInRangeCounted(x,y,1500.,BBe(c),function Bhe) endif loop set u=FirstOfGroup(g) exitwhen u==null call GroupRemoveUnit(g,u) set NNv=CreateBarrageTypeA(c,u) call LMv(s__barrage_model[NNv],"Abilities\\Spells\\Other\\Parasite\\ParasiteMissile.mdl") call SetUnitScale(II[(s__barrage_model[NNv])],((4)*1.),0,0) set s__barrage_speed[NNv]=.03125*1500. call SetBarrageFlightRadianEZ(NNv,.3) call Lfv(s__barrage_model[NNv],0,$FF,0,$FF) call BFe(NNv) endloop call RecycleGroup(g) exitwhen Bje==0 endloop call NewTextTagInTarget_B(c,"You're going to hell!",18,25,125,25) call Ltv(Lfv(LAv("Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl",x,y,3),25,$FF,25,$FF)) return false endfunction function BJe takes nothing returns nothing call RegisterSpellEffectEvent('A0QG',function BHe) endfunction function Bke takes integer NNv,real sA,boolean Ite returns nothing local integer i=6 local real x=GetUnitX((Je[(NNv)])) local real y=GetUnitY((Je[(NNv)])) local real a local real pX local real pY local integer j local unit u loop exitwhen i==0 set j=R2I(1250./ 250.) set a=sA+i*Lx/ 6 set pX=x set pY=y loop set j=j-1 set pX=pX+250.*Cos(a) set pY=pY+250.*Sin(a) if Ite then call GroupEnumUnitsInRange(G,pX,pY,250.+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,pX,pY,250.)then if IsUnitOfPlayerNotseckill(u)then call KillUnitBJ(u) endif endif endloop call Ltv(LAv("Acid Ex.mdx",pX,pY,250./ 175.)) else call Ltv(LAv("Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl",pX,pY,250./ 125.)) endif exitwhen j==0 or pX>GetRectMaxX(mQ)or pXGetRectMaxY(mQ)or pY0 then set Ts[NNv]=Ts[NNv]+Lx/(2*6) call Bke(NNv,Ts[NNv],false) endif else set Ss[NNv]=0 endif if Ss[NNv]<1 then call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:140") call SetUnitPropWindow((Je[(NNv)]),bj_DEGTORAD*GetUnitDefaultPropWindow((Je[(NNv)]))) call Unit_Cancel_Counter($CF,(NNv)) endif endfunction function Ble takes nothing returns boolean local integer NNv=(GetUnitUserData((GetTriggerUnit()))) local real x=GetUnitX((Je[(NNv)])) local real y=GetUnitY((Je[(NNv)])) set Ss[NNv]=2 set Ts[NNv]=0 call Bke(NNv,Ts[NNv],false) call NewTextTagInTarget_B((Je[(NNv)]),"You have chosen a suicide challenge. Go to hell!!",18,25,$9B,25) call Ltv(Lfv(LAv("Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl",x,y,7.5),25,$FF,25,$FF)) call SetUnitPropWindow((Je[(NNv)]),0) call TimerStart(NewTimer(NNv),Ps,true,function BKe) call Unit_App_Counter($D0,(NNv)) return false endfunction function BLe takes unit u returns nothing call UnitAddAbilityBY(u,'A0QH') endfunction function Bme takes nothing returns nothing call RegisterSpellEffectEvent('A0QH',function Ble) endfunction function BMe takes integer NNv returns nothing if ys[NNv]!=0 then call DestroyEffectBY(ys[NNv]) set ys[NNv]=0 endif endfunction function Bpe takes integer NNv returns unit return(Je[(NNv)]) endfunction function BPe takes integer NNv returns nothing if Zs[NNv]then set vS[eS[NNv]]=vS[NNv] set eS[vS[NNv]]=eS[NNv] set Zs[NNv]=false if eS[(0)]==0 then call frv(xS) endif call BMe(NNv) call Unit_Cancel_Counter($D1,(NNv)) endif endfunction function Bqe takes nothing returns boolean local integer NNv=eS[(0)] local integer startTick local unit u local real x local real y loop exitwhen NNv==0 if UnitAlive((Je[((NNv))]))then set Ys[NNv]=Ys[NNv]-1 if Ys[NNv]==zs then set ys[NNv]=(s__Effect_build(AddSpecialEffectTarget(("Abilities\\Spells\\Undead\\Darksummoning\\DarkSummonTarget.mdl"),((Je[((NNv))])),("origin")))) elseif Ys[NNv]AS then set cae=AS-CS endif set CS=CS+cae if CS==AS then call cre() endif set eoe=CS/ I2R(AS) set cne=R2I(75+($FF-75)*eoe) call SetUnitTimeScale(bS,eoe) call SetUnitVertexColor(bS,cne,cne,cne,$FF) call PlaySoundOnUnit_BJ((Hn),(($7F)*1.),(bS)) call TimerDestroyEffectBY((s__Effect_build(AddSpecialEffectTarget(("Abilities\\Spells\\Undead\\FrostArmor\\FrostArmorDamage.mdl"),(bS),("chest")))),1) call Ltv(LAv("Enchantment.mdl",GetWidgetX(dS),GetWidgetY(dS),.5)) call RemoveItemByCharges(dS,cae) endif endfunction function cVe takes nothing returns boolean if not av and CS1 call Ltv(LAv("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",x+r*t,y,2)) set t=t+.1 endloop set dt=null if i==3 then call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:146") else call alloc__hPv(GetHandleId((GetExpiredTimer())),(i)) endif endfunction function cRe takes nothing returns boolean if FS!=0 then call NewTextTagInTarget_B(DS,"Nobody can stop me!!",18,55,55,125) call SetUnitAnimation(DS,"spell slam") call QueueUnitAnimation(DS,"stand") call TimerStart((NewTimer(0)),1.5,false,function cXe) call PlaySoundOnUnit_BJ((Yn),(($7F)*1.),(DS)) call DestroyEffectBY(FS) call TimerStart((NewTimer(0)),1.5,true,function Irbert_Disable) set FS=0 endif if gS!=null then call DestroyTrigger(gS) set gS=null endif if GS!=0 then call s__Trig_remove((GS)) set GS=0 endif return false endfunction function s__Irbert_prepare takes nothing returns nothing set fS=true set gS=CreateTrigger() set GS=UnitAddShieldTrigB((GetUnitUserData((DS))),function cRe) call UnitAddShieldTrigB((GetUnitUserData((DS))),function cOe) call SetUnitInvulnerable(DS,false) call TriggerRegisterUnitInRange(gS,DS,750,null) call TriggerAddCondition(gS,Filter(function cRe)) endfunction function cIe takes nothing returns nothing set DS=gg_unit_n02Y_0270 set FS=(s__Effect_build(AddSpecialEffectTarget(("Abilities\\Spells\\Undead\\Sleep\\SleepTarget.mdl"),(DS),("overhead")))) set hS=$6180 set HS=-$4C00 call m_v(DS,true) endfunction function cAe takes integer NNv returns nothing set JS=JS-1 if kS[NNv]!=0 then call DeUnitAdef((NNv),kS[NNv]) set kS[NNv]=0 endif if JS==0 then call TriggerEvaluate(Rcv) endif endfunction function cNe takes integer NNv returns unit return(Je[(NNv)]) endfunction function cbe takes integer NNv returns nothing if KS[NNv]then set LS[MS[NNv]]=LS[NNv] set MS[LS[NNv]]=MS[NNv] set KS[NNv]=false if MS[(0)]==0 then call frv(pS) endif call cAe(NNv) call Unit_Cancel_Counter($D3,(NNv)) endif endfunction function cBe takes nothing returns boolean local integer NNv=MS[(0)] local integer cce local integer cCe local real x local real y loop exitwhen NNv==0 if UnitAlive((Je[((NNv))]))then set x=GetUnitX((Je[((NNv))])) set y=GetUnitY((Je[((NNv))])) set cce=MS[(0)] set cCe=1 loop exitwhen cce==0 if cce!=NNv and IsUnitInRange((Je[((cce))]),(Je[((NNv))]),jS)then set cCe=cCe+1 exitwhen cCe>=4 endif set cce=MS[cce] endloop if cce!=0 and kS[NNv]==0 then set kS[NNv]=ModifyUnitAdef((NNv),90) call SetUnitNocontrol((NNv),true) call UnitAddAbilityBY((Je[((NNv))]),'A0R5') elseif cce==0 and kS[NNv]!=0 then call SetUnitNocontrol((NNv),false) call DeUnitAdef((NNv),kS[NNv]) call ModifyUnitHpRegen((NNv),-.1*GetUnitMaxLifeById((NNv))) call UnitRemoveAbilityandBuffBY((Je[((NNv))]),'A0R5','B06G') set kS[NNv]=0 endif else call cbe(NNv) endif set NNv=MS[NNv] endloop return false endfunction function cde takes integer NNv returns integer if KS[NNv]then call cAe(NNv) else if MS[(0)]==0 then if pS==0 then set pS=fxv(function cBe) endif call fov(pS) endif set MS[NNv]=MS[(0)] set LS[MS[(0)]]=NNv set MS[(0)]=NNv set LS[NNv]=0 set KS[NNv]=true call Unit_App_Counter($D4,(NNv)) endif return NNv endfunction function cDe takes unit u returns integer return cde((GetUnitUserData((u)))) endfunction function cfe takes real x,real y returns nothing local integer NNv=(cde((GetUnitUserData(((CreateUnit(P[$B],'n01Q',x,y,270))))))) set JS=JS+1 call SetUnitFlyHeight((Je[((NNv))]),300.,0) call SetUnitVertexColor((Je[((NNv))]),25,55,55,125) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl",(Je[((NNv))]),"origin")) endfunction function cFe takes nothing returns real return GetRandomReal(2,6) endfunction function cge takes integer NNv returns boolean if PS[NNv]!=null then call ReleaseTimer(PS[NNv],"[TimerUtils]Error:147") call UnitRemoveAbilityandBuffBY((Je[(NNv)]),'A0R7','B06H') call SetUnitVertexColor((Je[(NNv)]),25,55,55,$FF) call Unit_Cancel_Counter($D5,(NNv)) set PS[NNv]=null return true endif return false endfunction function cGe takes nothing returns nothing set qS[(ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:148"))]=false endfunction function che takes nothing returns nothing call cge(((alloc__hpv(GetHandleId((GetExpiredTimer())))))) endfunction function cHe takes nothing returns nothing local integer NNv=(alloc__hpv(GetHandleId((GetExpiredTimer())))) if UnitAlive((Je[(NNv)]))and not IsUnitPaused((Je[(NNv)]))then set PS[NNv]=NewTimer(NNv) call UnitAddAbilityBY((Je[(NNv)]),'A0R7') call NewTextTagInTarget_B((Je[(NNv)]),"Hit me hurt hurt back to the blood!!",18,55,55,125) call SetUnitVertexColor((Je[(NNv)]),25,25,55,$CD) call TimerStart(PS[NNv],4.,false,function che) call TimerStart(GetExpiredTimer(),16.,false,function cGe) call Unit_App_Counter($D6,(NNv)) else call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:149") endif endfunction function cje takes nothing returns boolean call UnitAppBuff((pF),'A0R9',$D006B) return false endfunction function cJe takes nothing returns boolean local integer NNv=(pF) if GetUnitAbilityLevel((MF),'A0R7')==1 then call UnitCureTaret(null,(MF),GetDamage()) set KF[HF]=PF+1000000. elseif not qS[NNv]and GetRandomInt(1,5)<=100 then set qS[NNv]=true call TimerStart(NewTimer(NNv),(GetRandomReal(2,6)),false,function cHe) endif return false endfunction function cke takes unit u returns nothing call UnitAddPAttackTrig((GetUnitUserData((u))),function cje) call UnitAddShieldTrig((GetUnitUserData((u))),function cJe) endfunction function cKe takes integer NNv returns nothing if QS[NNv]!=null then call ReleaseTimer(QS[NNv],"[TimerUtils]Error:150") call UnitRemoveAbilityandBuffBY((Je[(NNv)]),'A0R6','B044') call DeUnitBeCureRatio((NNv),sS[NNv]) call Unit_Cancel_Counter($D7,(NNv)) set QS[NNv]=null endif endfunction function cle takes nothing returns nothing call cKe(((alloc__hpv(GetHandleId((GetExpiredTimer())))))) endfunction function cLe takes unit u returns nothing local integer NNv=(GetUnitUserData((u))) if QS[NNv]==null then set QS[NNv]=NewTimer(NNv) set sS[NNv]=ModifyUnitBeCureRatio((NNv),-100) call UnitAddAbilityBY(u,'A0R6') call Unit_App_Counter($D8,(NNv)) endif call TimerStart(QS[NNv],6.,false,function cle) endfunction function cme takes integer NNv returns nothing call SetUnitAnimation(II[s__barrage_model[NNv]],"death") endfunction function cMe takes integer NNv returns boolean set SS[NNv]=SS[NNv]+1 set s__barrage_CollisionRange[NNv]=tS[NNv]*(200.+5.*SS[NNv]) call SetUnitScale(II[(s__barrage_model[NNv])],((tS[NNv]*(.5+.025*SS[NNv]))*1.),0,0) if ModuloInteger(SS[NNv],8)==0 then call Ltv(LAv("WallOfTerrorExplosion.mdx",(GetUnitX(II[(s__barrage_model[NNv])])),(GetUnitY(II[(s__barrage_model[NNv])])),tS[NNv]*(1.5+.075*SS[NNv]))) endif return false endfunction function cpe takes integer NNv,unit u returns boolean if IsUnitAliveAndEnemyNotAvul(u,s__barrage_atkunit[NNv])then call DestroyEffect(AddSpecialEffectTarget("DoomBlack.mdl",u,"origin")) call UnitDamageTargetBY(((s__barrage_atkunit[NNv])),((u)),((((tS[NNv]*(.4*GetUnitMaxLifeById((GetUnitUserData((u))))+8000))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call cLe(u) endif return false endfunction function cPe takes integer NNv returns nothing call SetUnitAnimation(II[s__barrage_model[(NNv)]],"death") call RemoveBarrage(NNv) endfunction function cqe takes nothing returns boolean local integer NNv=s__barrage_FR[TS] local unit u if NNv!=TS then call UseBarrage(TS) loop exitwhen NNv==TS if(s__barrage_outside[(NNv)])then call cPe(NNv) elseif(s__barrage_finish[(NNv)])then call cPe(NNv) else if cMe(NNv)then call cPe(NNv) endif if s__barrage_CollisionRange[NNv]!=0 then call GroupEnumUnitsInRange(G,s__barrage_X[NNv],s__barrage_Y[NNv],s__barrage_CollisionRange[NNv]+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,s__barrage_X[NNv],s__barrage_Y[NNv],s__barrage_CollisionRange[NNv])then if not IsUnitInGroup(u,s__barrage_enum_g[NNv])then call GroupAddUnit(s__barrage_enum_g[NNv],u) if u!=s__barrage_target[NNv]and cpe(NNv,u)then set u=null call cPe(NNv) exitwhen true endif endif endif endloop endif endif set NNv=s__barrage_FR[NNv] endloop elseif s__barrage_InOperation[TS]then set s__barrage_InOperation[TS]=false call TriggerEvaluate(Rbv) endif return false endfunction function cQe takes nothing returns nothing call fov(uS) endfunction function s__ShadowBreath_stop takes nothing returns nothing call frv(uS) endfunction function cse takes nothing returns nothing set uS=fxv(function cqe) call fov(uS) endfunction function cSe takes integer NNv returns nothing call s__barrage_Filling((TS),(NNv)) if not s__barrage_InOperation[TS]then set s__barrage_InOperation[TS]=true call fov(uS) endif endfunction function cte takes nothing returns nothing set TS=NewLauncher() set s__barrage_InOperation[TS]=true endfunction function cTe takes nothing returns boolean local unit cue=GetTriggerUnit() local real x=GetUnitX(cue) local real y=GetUnitY(cue) local real a=Atan2(GetSpellTargetY()-y,GetSpellTargetX()-x) local integer o=LocationEZ(x,y,0) local integer i=ConnectLocationEZ(o,LocationEZ(x+$5DC*Cos(a),y+$5DC*Sin(a),0)) local integer NNv=CreateOrbital(LVv('e038',s__locationez_X[o],s__locationez_Y[o],bj_RADTODEG*s__locationez_ang[o]),o,i) if cue==DS then set tS[NNv]=1. else set tS[NNv]=.5 endif set s__barrage_atkunit[NNv]=cue call LDv(s__barrage_model[NNv],.45) set s__barrage_speed[NNv]=.03125*250. set s__barrage_acceleration[NNv]=.03125*.03125*500. set s__barrage_CollisionRange[NNv]=tS[NNv]*200. set SS[NNv]=0 call Lfv(s__barrage_model[NNv],$F,$F,$F,$CD) call cSe(NNv) set cue=null return false endfunction function cUe takes nothing returns boolean call UnitAnimationAddEffect(UnitAppAnimation(GetTriggerUnit()),"Soulfire Missile.mdx","head") return false endfunction function cwe takes nothing returns nothing call RegisterSpellChannelEvent('A0L6',function cUe) call RegisterSpellEffectEvent('A0L6',function cTe) endfunction function cWe takes nothing returns nothing local integer NNv=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local unit u local real x local real y if UnitAlive((Je[(NNv)]))and GetUnitAbilityLevel((Je[(NNv)]),'A0L8')==1 then set yS[NNv]=yS[NNv]-1 set u=(Je[(NNv)]) set x=GetUnitX(u) set y=GetUnitY(u) call GroupEnumUnitsInRange(G,x,y,375.+75,null) call GroupRemoveUnit(G,u) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,375.)then if IsUnitAliveAndEnemy(u,DS)then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayDamage.mdl",u,"chest")) call UnitDamageTargetBY(((DS)),((u)),((((.2*.01*WS*GetUnitMaxLifeById((GetUnitUserData((u)))))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop else set yS[NNv]=0 endif if yS[NNv]<1 then call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:151") call UnitRemoveAbilityandBuffBY((Je[(NNv)]),'A0L8','B045') call Unit_Cancel_Counter($D9,(NNv)) endif endfunction function cye takes nothing returns boolean local integer i=$C local real x=GetUnitX(DS) local real y=GetUnitY(DS) local real a local real d local integer NNv local unit u loop set i=i-1 set a=i*Lx/ 12.+GetRandomReal(-.25,.25) set d=GetRandomReal($C8,600) call Lqv(LAv("DarkLightning.mdx",x+d*Cos(a),y+d*Sin(a),3),1.5) exitwhen i==0 endloop call GroupEnumUnitsInRange(G,x,y,900+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,900)then if IsUnitAliveAndEnemy(u,DS)then call zhv((GetPlayerId((GetOwningPlayer(u)))),50,.75) call UnitDamageTargetBY(((DS)),((u)),((((.3*GetUnitMaxLifeById((GetUnitUserData((u))))+6000)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop set u=PickRandomVisibleHeroInRange(DS,x,y,US) if u!=null then set NNv=(GetUnitUserData((u))) set yS[NNv]=R2I(wS/ .2) call StartSound(Za) call NewTextTagInTarget_B(u,"|c0095caff"+(Game_PlayerName[Kc[((GetUnitUserData((u))))]])+" |c008080c0Bruise!",$F,$FF,$FF,$FF) call Ltv(LAv("DeathBladeRegeneration.mdx",GetUnitX(u),GetUnitY(u),3)) call UnitAddAbilityBY(u,'A0L8') call TimerStart(NewTimer(NNv),.2,true,function cWe) call Unit_App_Counter($DA,(NNv)) set u=null endif call Ltv(Lfv(LAv("AncientExplode.mdx",x,y,4),$FF,0,$FF,$FF)) call Ltv(LAv("DarkWave.mdx",x,y,4)) return false endfunction function cYe takes nothing returns boolean call NewTextTagInTarget_B(GetTriggerUnit(),"Struggling in the fallen !",18,$80,0,$CD) return false endfunction function cze takes nothing returns nothing call RegisterSpellEffectEvent('A0L7',function cye) call RegisterSpellChannelEvent('A0L7',function cYe) endfunction function cZe takes integer NNv returns nothing call cfe((GetUnitX(II[(s__barrage_model[NNv])])),(GetUnitY(II[(s__barrage_model[NNv])]))) endfunction function c_e takes integer NNv returns nothing call cZe(NNv) call RemoveBarrage(NNv) endfunction function c0e takes nothing returns boolean local integer NNv=s__barrage_FR[vt] local unit u if NNv!=vt then call UseBarrage(vt) loop exitwhen NNv==vt if(s__barrage_outside[(NNv)])then call c_e(NNv) elseif(s__barrage_finish[(NNv)])then call c_e(NNv) endif set NNv=s__barrage_FR[NNv] endloop elseif s__barrage_InOperation[vt]then set s__barrage_InOperation[vt]=false call TriggerEvaluate(RBv) endif return false endfunction function c1e takes nothing returns nothing call fov(et) endfunction function s__IllusionOfIrbert_stop takes nothing returns nothing call frv(et) endfunction function c2e takes nothing returns nothing set et=fxv(function c0e) call fov(et) endfunction function c3e takes integer NNv returns nothing call s__barrage_Filling((vt),(NNv)) if not s__barrage_InOperation[vt]then set s__barrage_InOperation[vt]=true call fov(et) endif endfunction function c4e takes nothing returns nothing set vt=NewLauncher() set s__barrage_InOperation[vt]=true endfunction function s__IllusionOfIrbert_end takes nothing returns nothing call NewTextTagInTarget_B(DS,"All your resistance is in vain. You are like a candle in the wind.",18,55,55,125) call m_v(DS,false) call TriggerEvaluate(Rdv) call UnitAddAbilityBY(DS,'A0R4') call UnitAddAbilityBY(DS,'A0R3') endfunction function s__IllusionOfIrbert_activate takes nothing returns nothing local integer i=2 local integer j local real x=hS local real y=HS local real z=GetUnitFlyHeight(DS) local real pX local real pY local real d local real a local integer NNv loop set i=i-1 set j=4 set pX=x+(YS*(1-2*i)) set pY=y loop set j=j-1 set a=j*Lx/ 3 set NNv=CreateBarrageTypeD(x,y,z,pX+ZS*Cos(a),pY+ZS*Sin(a),300.) call LMv(s__barrage_model[NNv],"Abilities\\Weapons\\AvengerMissile\\AvengerMissile.mdl") call SetUnitScale(II[(s__barrage_model[NNv])],((4)*1.),0,0) set s__barrage_speed[NNv]=.03125*s__locationez_range[s__barrage_p1[NNv]]/ 1.5 call SetBarrageFlightRadianEZ(NNv,.25) call c3e(NNv) exitwhen j==0 endloop exitwhen i==0 endloop call UnitCureTaret(null,DS,GetUnitMaxLifeById((GetUnitUserData((DS))))) call m_v(DS,true) call TriggerEvaluate(RDv) call SetUnitFacingTimed(DS,270,0) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl",DS,"origin")) call SetUnitPosition(DS,hS,HS) call SetUnitAnimation(DS,"spell slam") call QueueUnitAnimation(DS,"stand") call NewTextTagInTarget_B(DS,"Come out my avatar!",18,55,55,125) call zlv($9B,25,$9B,1.5) endfunction function c5e takes nothing returns nothing local unit u local real x local real y if UnitAlive(DS)then set rt=ModuloInteger(rt+1,R2I(32*.5)) set x=GetUnitX(DS) set y=GetUnitY(DS) call LKv(ot,x) call Llv(ot,y) if rt==0 then call GroupEnumUnitsInRange(G,x,y,1500.+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,1500.)then if IsUnitAliveAndEnemy(u,DS)then call UnitDamageTargetBY(((DS)),((u)),((((.01*xt*GetUnitMaxLifeById((GetUnitUserData((u)))))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop endif else call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:152") call Ltv(ot) endif endfunction function s__BlackFog_activate takes nothing returns nothing set ot=LAv("BlackCloudOfFog.mdl",GetUnitX(DS),GetUnitY(DS),7) call TimerStart((NewTimer(0)),.03125,true,function c5e) endfunction function c6e takes nothing returns integer return D9v(Et) endfunction function c7e takes integer NNv returns nothing call fvv(NNv) endfunction function c8e takes nothing returns boolean local integer NNv=J[Et] local unit u local real x local real y loop exitwhen 0==NNv set Vt[NNv]=Vt[NNv]-1 set x=(GetUnitX(II[(at[NNv])])) set y=(GetUnitY(II[(at[NNv])])) if nt[NNv]then call GroupEnumUnitsInRange(G,x,y,250.+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,250.)then exitwhen IsUnitAliveAndEnemyNotAvul(u,DS) endif endloop if u!=null then set Vt[NNv]=0 call GroupEnumUnitsInRange(G,x,y,375.+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,375.)then if IsUnitAliveAndEnemy(u,DS)then if nC[(GetUnitUserData((u)))]then call zhv((GetPlayerId((GetOwningPlayer(u)))),40,.5) call zKv((GetPlayerId((GetOwningPlayer(u)))),$FF,125,$FF,.27) endif call UnitDamageTargetBY(((DS)),((u)),((((.15*GetUnitMaxLifeById((GetUnitUserData((u))))+$9C4)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call UnitAppBuff((GetUnitUserData((u))),'A0R8',$D02BC) endif endif endloop call Ltv(Lfv(LAv("AncientExplode.mdl",x,y,1),$FF,0,$FF,$FF)) endif endif if Vt[NNv]<1 then if not nt[NNv]then set nt[NNv]=true set Vt[NNv]=R2I(32*45.) call Ltv(Lfv(LAv("Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl",x,y,2),$FF,0,$FF,$FF)) else call LTv(at[NNv]) call fvv((NNv)) endif endif set NNv=K[NNv] endloop return false endfunction function c9e takes nothing returns nothing set Et=fxv(function c8e) endfunction function Cve_3 takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer NNv if UnitAlive(Boss_Spell_unit1[i])and Boss_Spell_data1[i]<$A then set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 set NNv=(D9v(Et)) set at[NNv]=LAv("Abilities\\Spells\\NightElf\\TrueshotAura\\TrueshotAura.mdl",GetUnitX(Boss_Spell_unit2[i]),GetUnitY(Boss_Spell_unit2[i]),3.25) set nt[NNv]=false set Vt[NNv]=R2I(32*1.75) if GetLocalPlayer()==GetOwningPlayer(Boss_Spell_unit2[i])then call StartSound(Za) endif call Lfv(at[NNv],$FF,0,$FF,$FF) call Lqv(LAv("DarkLightning.mdx",(GetUnitX(II[(at[NNv])])),(GetUnitY(II[(at[NNv])])),5),2) call Lqv(LAv("ShadowTrap.mdl",(GetUnitX(II[(at[NNv])])),(GetUnitY(II[(at[NNv])])),2.5),2) if Boss_Spell_data1[i]<$A then call TimerStart(GetExpiredTimer(),1.5,true,function Cve_3) else call TimerStart(GetExpiredTimer(),2,true,function Cve_3) endif else call UnitRemoveAbilityandBuffBY(Boss_Spell_unit2[i],'A0UQ','B07M') call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:153") endif endfunction function Cve_2 takes nothing returns nothing local integer EvelId=GetHandleId(GetTriggerEventId()) local integer i if GetTriggerUnit()==DS then if EvelId==274 then set i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=GetTriggerUnit() set Boss_Spell_unit2[i]=GetSpellTargetUnit() set Boss_Spell_data1[i]=0 call TimerStart(NewTimer(i),3,true,function Cve_3) call UnitAddAbilityBY(Boss_Spell_unit2[i],'A0UQ') call NewTextTagInTarget_B(DS,"|c008000FF"+GetPlayerName(GetOwningPlayer(GetSpellTargetUnit()))+"|r|c00FFFF00",18,$FF,$FF,$FF) elseif EvelId==272 then call NewTextTagInTarget_B(DS,"|c008080FFStruggle, you can never escape here|r",18,$FF,$FF,$FF) endif endif endfunction function Cve takes nothing returns nothing local integer NNv local unit u if UnitAlive(DS)then set u=PickRandomVisibleHeroInRange(DS,GetUnitX(DS),GetUnitY(DS),1500.) if u!=null then if IssueTargetOrderById(DS,$D0097,u)then set it=8 endif call TimerStart(GetExpiredTimer(),it,true,function Cve) set u=null else if it>1 then set it=it-1 endif call TimerStart(GetExpiredTimer(),it,true,function Cve) endif else call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:154") endif endfunction function s__DarkBinding_activate takes nothing returns nothing call TimerStart((NewTimer(0)),it,true,function Cve) endfunction function Cee takes unit u returns nothing if IsUnitOfPlayerNotseckill(u)then call KillUnitBJ(u) call Ltv(LAv("ShadowAssault.mdl",GetUnitX(u),GetUnitY(u),2.5)) call zhv((Kc[((GetUnitUserData((u))))]),40,.5) call NewTextTagInTarget_B(DS,"I'll put a second after second skill!!..",18,55,55,125) endif endfunction function Cxe takes nothing returns nothing local boolean Coe=UnitAlive((Je[(Rt)])) local boolean Cre=UnitAlive((Je[(Ot)])) local boolean Cie=false local integer i if UnitAlive(DS)then if Coe and Cre then if IsUnitInRange((Je[(Rt)]),(Je[(Ot)]),1500.)then set i=3 loop set i=i-1 call Bgv(At[i]) exitwhen i==0 endloop call UnitDamageTargetBY(((DS)),(((Je[(Rt)]))),((((.03125*.01*Xt*GetUnitMaxLifeById((Rt)))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) call UnitDamageTargetBY(((DS)),(((Je[(Ot)]))),((((.03125*.01*Xt*GetUnitMaxLifeById((Ot)))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) call UnitCureTaret(null,DS,.03125*.01*.5*GetUnitMaxLifeById((GetUnitUserData((DS))))) else set Cie=true call TimerDestroyEffectBY((s__Effect_build(AddSpecialEffectTarget(("Abilities\\Spells\\Orc\\Disenchant\\DisenchantSpecialArt.mdl"),((Je[(Rt)])),("chest")))),.5) call TimerDestroyEffectBY((s__Effect_build(AddSpecialEffectTarget(("Abilities\\Spells\\Orc\\Disenchant\\DisenchantSpecialArt.mdl"),((Je[(Ot)])),("chest")))),.5) endif else set Cie=true if Coe then call Cee((Je[(Rt)])) elseif Cre then call Cee((Je[(Ot)])) endif endif else set Cie=true endif if Cie then set i=3 loop set i=i-1 call BFv(At[i]) exitwhen i==0 endloop call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:155") call Unit_Cancel_Counter($DB,Rt) call Unit_Cancel_Counter($DC,Ot) set It=false endif endfunction function Cae takes nothing returns boolean local unit t=GetSpellTargetUnit() local integer i=0 local real x=GetUnitX(t) local real y=GetUnitY(t) local integer NNv local unit u=t call GroupClear(G2) call GroupEnumUnitsInRange(G,x,y,900.+75,null) call GroupRemoveUnit(G,u) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,900.)then if UnitAlive(u)and nC[(GetUnitUserData((u)))]then set i=i+1 call GroupAddUnit(G2,u) endif endif endloop loop set u=FirstOfGroup(G2) exitwhen u==null call GroupRemoveUnit(G2,u) exitwhen GetRandomInt(1,i)==1 set i=i-1 endloop if u==null or It then call Cee(t) else set It=true set Rt=(GetUnitUserData((t))) set Ot=(GetUnitUserData((u))) set At[0]=BGv("SPLK",DS,t) set At[1]=BGv("SPLK",t,u) set At[2]=BGv("SPLK",u,DS) call TimerStart((NewTimer(0)),.03125,true,function Cxe) call Unit_App_Counter($DD,Rt) call Unit_App_Counter($DE,Ot) endif set u=null return false endfunction function Cne takes nothing returns nothing call RegisterSpellEffectEvent('A0R4',function Cae) endfunction function CVe takes integer NNv returns nothing local real x=(GetUnitX(II[(s__barrage_model[NNv])])) local real y=(GetUnitY(II[(s__barrage_model[NNv])])) local unit u call GroupEnumUnitsInRange(G,x,y,Nt+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,Nt)then if IsUnitAliveAndEnemy(u,s__barrage_atkunit[NNv])then call UnitDamageTargetBY(((s__barrage_atkunit[NNv])),((u)),((((.9*GetUnitMaxLifeById((GetUnitUserData((u)))))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v(u,8) endif endif endloop call Ltv(LAv("uberdarkwave.mdl",x,y,1)) endfunction function CEe takes integer NNv returns nothing call CVe(NNv) call RemoveBarrage(NNv) endfunction function CXe takes nothing returns boolean local integer NNv=s__barrage_FR[bt] local unit u if NNv!=bt then call UseBarrage(bt) loop exitwhen NNv==bt if(s__barrage_outside[(NNv)])then call CEe(NNv) elseif(s__barrage_finish[(NNv)])then call CEe(NNv) endif set NNv=s__barrage_FR[NNv] endloop elseif s__barrage_InOperation[bt]then set s__barrage_InOperation[bt]=false call TriggerEvaluate(Rfv) endif return false endfunction function COe takes nothing returns nothing call fov(Bt) endfunction function s__DarkDragonBlast_stop takes nothing returns nothing call frv(Bt) endfunction function CRe takes nothing returns nothing set Bt=fxv(function CXe) call fov(Bt) endfunction function CIe takes integer NNv returns nothing call s__barrage_Filling((bt),(NNv)) if not s__barrage_InOperation[bt]then set s__barrage_InOperation[bt]=true call fov(Bt) endif endfunction function CAe takes nothing returns nothing set bt=NewLauncher() set s__barrage_InOperation[bt]=true endfunction function CNe takes nothing returns boolean local unit cue=GetTriggerUnit() local real x=GetUnitX(cue) local real y=GetUnitY(cue) local real z=GetUnitFlyHeight(cue) local integer NNv=CreateBarrageTypeD(x,y,z,GetSpellTargetX(),GetSpellTargetY(),0) set s__barrage_atkunit[NNv]=cue call LMv(s__barrage_model[NNv],"OrbOfCorruption.mdl") call SetUnitScale(II[(s__barrage_model[NNv])],((7.5)*1.),0,0) set s__barrage_speed[NNv]=.03125*500. set s__barrage_acceleration[NNv]=.03125*.03125*2000. call PlaySoundAtPoint_BJ((ga),(($7F)*1.),((x)*1.),((y)*1.),0) call Lfv(s__barrage_model[NNv],0,0,0,$FF) call CIe(NNv) set cue=null return false endfunction function Cbe takes nothing returns boolean call NewTextTagInTarget_B(GetTriggerUnit(),"Go back! How can you run wild here?! !",18,55,55,125) call UnitAnimationSetLoopEffect(UnitAppAnimation(GetTriggerUnit()),"OrbOfCorruption.mdx","head",.25) call LQv(LAv("Abilities\\Spells\\Undead\\VampiricAura\\VampiricAura.mdl",GetSpellTargetX(),GetSpellTargetY(),Nt/ 100),1.8) return false endfunction function CBe takes nothing returns nothing call RegisterSpellChannelEvent('A0R3',function Cbe) call RegisterSpellEffectEvent('A0R3',function CNe) endfunction function CGe takes nothing returns integer local integer NNv if(lt[(0)]==0)then set Kt=Kt+1 set NNv=Kt else set NNv=lt[(0)] set lt[(0)]=lt[lt[(0)]] endif return NNv endfunction function Che takes integer NNv returns nothing set lt[NNv]=lt[(0)] set lt[(0)]=NNv endfunction function CHe takes string Bhv,unit s,unit t returns integer local integer NNv=CGe() set mt[NNv]=(GetUnitUserData((s))) set Mt[NNv]=(GetUnitUserData((t))) set pt[NNv]=AddLightningEx(Bhv,false,GetUnitX(s),GetUnitY(s),Lt+GetUnitFlyHeight(s),GetUnitX(t),GetUnitY(t),Lt+GetUnitFlyHeight(t)) call Unit_App_Counter($DF,mt[NNv]) call Unit_App_Counter($E0,Mt[NNv]) return NNv endfunction function Cje takes unit u returns integer return(GetUnitUserData((u))) endfunction function CJe takes integer NNv returns nothing set qt[NNv]=0 set Qt[NNv]=0 endfunction function Cke takes integer NNv returns unit return(Je[(NNv)]) endfunction function CKe takes integer NNv returns nothing if St[NNv]then set tt[Tt[NNv]]=tt[NNv] set Tt[tt[NNv]]=Tt[NNv] set St[NNv]=false if Tt[(0)]==0 then call frv(ut) endif call Unit_Cancel_Counter($E1,(NNv)) endif endfunction function Cle takes nothing returns boolean local integer NNv=Tt[(0)] local real BDv loop exitwhen NNv==0 if not UnitAlive((Je[((NNv))]))then call CJe(NNv) endif if qt[NNv]==0 then set Qt[NNv]=Qt[NNv]+.03125*.03125*Pt set BDv=MaxR(0,GetUnitFlyHeight((Je[((NNv))]))+Qt[NNv]) else set BDv=MinR(GetUnitFlyHeight((Je[((NNv))]))+Qt[NNv],qt[NNv]) endif if BDv>0 then call SetUnitFlyHeight((Je[((NNv))]),BDv,0) else call SetUnitFlyHeight((Je[((NNv))]),0,0) call CKe(NNv) endif set NNv=Tt[NNv] endloop return false endfunction function CLe takes integer NNv returns boolean if not St[NNv]then if Tt[(0)]==0 then if ut==0 then set ut=fxv(function Cle) endif call fov(ut) endif set Tt[NNv]=Tt[(0)] set tt[Tt[(0)]]=NNv set Tt[(0)]=NNv set tt[NNv]=0 set St[NNv]=true call Unit_App_Counter($E2,(NNv)) return true endif return false endfunction function Cme takes integer NNv,real BDv,real Bfv returns nothing if CLe(NNv)then if UnitAddAbility((Je[((NNv))]),'Amrf')then call UnitRemoveAbility((Je[((NNv))]),'Amrf') endif endif set qt[NNv]=BDv set Qt[NNv]=.03125*(qt[NNv]-GetUnitFlyHeight((Je[((NNv))])))/ Bfv endfunction function Cye takes integer NNv returns nothing if ET[NNv]then set XT[OT[NNv]]=XT[NNv] set OT[XT[NNv]]=OT[NNv] set ET[NNv]=false if OT[(0)]==0 then call frv(RT) endif call Unit_Cancel_Counter($E3,(NNv)) endif endfunction function CYe takes nothing returns boolean local integer NNv=OT[(0)] local integer iSe loop exitwhen NNv==0 if UnitAlive((Je[(NNv)]))then set iSe=R2I(1.5*GetUnitDefaultAttackSpeed((iT[NNv]))) if VT[NNv]!=iSe then call ModifyUnitAttackSpeed((NNv),iSe-VT[NNv]) set VT[NNv]=iSe endif else call Unit_Cancel_Counter($E4,iT[NNv]) call Cye(NNv) endif set NNv=OT[NNv] endloop return false endfunction function Cze takes integer NNv returns boolean if not ET[NNv]then if OT[(0)]==0 then if RT==0 then set RT=fxv(function CYe) endif call fov(RT) endif set OT[NNv]=OT[(0)] set XT[OT[(0)]]=NNv set OT[(0)]=NNv set XT[NNv]=0 set ET[NNv]=true call Unit_App_Counter($E5,(NNv)) return true endif return false endfunction function CZe takes unit u returns boolean return IsUnitType(u,UNIT_TYPE_MECHANICAL) endfunction function C_e takes integer NNv returns nothing set iT[NNv]=(GetUnitUserData(MV[GetPlayerId(GetOwningPlayer(Je[((NNv))]))])) set VT[NNv]=0 if iT[NNv]!=null and Cze(NNv)then call Unit_App_Counter($E6,iT[NNv]) endif endfunction function C0e takes nothing returns boolean if((IsUnitType((Je[le]),UNIT_TYPE_MECHANICAL)))then call C_e((le)) endif return false endfunction function C1e takes nothing returns nothing call h4v(Condition(function C0e),bR) endfunction function C2e takes nothing returns nothing local integer fx=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:156") local real x=(GetUnitX(II[(fx)])) local real y=(GetUnitY(II[(fx)])) local unit u call GroupEnumUnitsInRange(G,x,y,125*IT[fx]+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,125*IT[fx])then if UnitAlive(u)and GetUnitAbilityLevel(u,'Avul')==0 and pV[GetPlayerId(GetOwningPlayer(u))]then if nC[(GetUnitUserData((u)))]then call zKv((GetPlayerId((GetOwningPlayer(u)))),125,125,$FF,.27) endif call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\FrostBolt\\FrostBoltMissile.mdl",u,"chest")) endif endif endloop call LQv(LAv("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl",x,y,IT[fx]),1.27) call Ltv(LAv("FreezingRing.mdx",x,y,.5*IT[fx])) call Ltv(fx) endfunction function C3e takes real x,real y,real sc returns nothing local integer fx=LVv('e02V',x,y,0) set IT[fx]=sc call SetUnitScale(II[(fx)],((sc)*1.),0,0) call LDv(fx,1.5) call TimerStart(NewTimer(fx),.75,false,function C2e) endfunction function C4e takes nothing returns integer return D9v(BT) endfunction function C5e takes integer NNv returns nothing call fvv(NNv) endfunction function C6e takes nothing returns boolean local integer NNv=J[BT] local integer t local real sc local real x local real y local real a local real d loop exitwhen 0==NNv set NT[NNv]=NT[NNv]-1 if bT[NNv]>750 then set t=2 set sc=1.5 else set t=3 set sc=2.5 endif if ModuloInteger(NT[NNv],t)==0 then set a=GetRandomReal(0,Lx) set d=GetRandomReal(0,bT[NNv]) set x=(GetUnitX(II[(AT[NNv])]))+d*Cos(a) set y=(GetUnitY(II[(AT[NNv])]))+d*Sin(a) call C3e(x,y,sc) endif if NT[NNv]<1 then call Ltv(AT[NNv]) call fvv((NNv)) endif set NNv=K[NNv] endloop return false endfunction function C7e takes nothing returns nothing set BT=fxv(function C6e) endfunction function C8e takes real x,real y,real rd returns nothing local integer NNv=(D9v(BT)) set AT[NNv]=LAv("FreezingPrison.mdl",x,y,rd/ 60.) set NT[NNv]=320 set bT[NNv]=rd call SetTerrainType(x,y,'Nsnw',0,R2I(rd/ 128.),0) endfunction function C9e takes nothing returns boolean call C8e(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),600) return false endfunction function dve takes nothing returns nothing call RegisterSpellEffectEvent('A0PM',function C9e) endfunction function dee takes nothing returns nothing local integer i=8 local integer j loop set i=i-1 if pV[i]then set j=8 loop set j=j-1 if pV[j]then call SetPlayerAllianceStateBJ(P[i],P[j],3) call SetPlayerAllianceStateBJ(P[j],P[i],3) endif exitwhen j==0 endloop endif exitwhen i==0 endloop endfunction function dXe takes integer NNv returns nothing call RemoveBarrage(NNv) endfunction function dOe takes nothing returns boolean local integer NNv=s__barrage_FR[kT] local unit u if NNv!=kT then call UseBarrage(kT) loop exitwhen NNv==kT if(s__barrage_outside[(NNv)])then call RemoveBarrage((NNv)) elseif(s__barrage_finish[(NNv)])then call RemoveBarrage((NNv)) endif set NNv=s__barrage_FR[NNv] endloop elseif s__barrage_InOperation[kT]then set s__barrage_InOperation[kT]=false call TriggerEvaluate(Rqv) endif return false endfunction function dRe takes nothing returns nothing call fov(KT) endfunction function s__FXMissile_stop takes nothing returns nothing call frv(KT) endfunction function dIe takes nothing returns nothing set KT=fxv(function dOe) call fov(KT) endfunction function dAe takes integer NNv returns nothing call s__barrage_Filling((kT),(NNv)) if not s__barrage_InOperation[kT]then set s__barrage_InOperation[kT]=true call fov(KT) endif endfunction function dNe takes nothing returns nothing set kT=NewLauncher() set s__barrage_InOperation[kT]=true endfunction function dbe takes unit u,real di,real BIv,real ar,real cv,real zR,real zA returns integer local real a=GetRandomReal(0,Lx) local integer NNv=CreateBarrageTypeC(GetUnitX(u)+di*Cos(a)*Sin(zA),GetUnitY(u)+di*Sin(a)*Sin(zA),zR*Cos(zA),u) set s__barrage_impact_z[NNv]=60. call SetBarrageFlightRadianEZ(NNv,ar) call SetBarrageFlightRadian(NNv,cv) set s__barrage_speed[NNv]=0 set s__barrage_acceleration[NNv]=.03125*.03125*BIv call dAe(NNv) return s__barrage_model[NNv] endfunction function dBe takes integer NNv returns boolean if s__barrage_target[NNv]!=null then call UnitDamageTargetBY(((s__barrage_atkunit[NNv])),((s__barrage_target[NNv])),((((lT[NNv])*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) endif return true endfunction function dce takes integer NNv returns nothing call RemoveBarrage(NNv) endfunction function dCe takes nothing returns boolean local integer NNv=s__barrage_FR[LT] local unit u if NNv!=LT then call UseBarrage(LT) loop exitwhen NNv==LT if(s__barrage_outside[(NNv)])then call dBe(NNv) call RemoveBarrage((NNv)) elseif(s__barrage_finish[(NNv)])then if dBe(NNv)then call RemoveBarrage((NNv)) else set s__barrage_finish[(NNv)]=false endif endif set NNv=s__barrage_FR[NNv] endloop elseif s__barrage_InOperation[LT]then set s__barrage_InOperation[LT]=false call TriggerEvaluate(RSv) endif return false endfunction function dde takes nothing returns nothing call fov(mT) endfunction function s__NormalMissile_stop takes nothing returns nothing call frv(mT) endfunction function dDe takes nothing returns nothing set mT=fxv(function dCe) call fov(mT) endfunction function dfe takes integer NNv returns nothing call s__barrage_Filling((LT),(NNv)) if not s__barrage_InOperation[LT]then set s__barrage_InOperation[LT]=true call fov(mT) endif endfunction function dFe takes nothing returns nothing set LT=NewLauncher() set s__barrage_InOperation[LT]=true endfunction function dge takes unit u,real x,real y,real z,unit t,real d,string fx,real sc,real sp,real ac returns nothing local integer NNv=CreateBarrageTypeC(x,y,z,t) set s__barrage_atkunit[NNv]=u set s__barrage_speed[NNv]=sp set s__barrage_acceleration[NNv]=ac call LMv(s__barrage_model[NNv],fx) call SetUnitScale(II[(s__barrage_model[NNv])],((sc)*1.),0,0) set lT[NNv]=d call dfe(NNv) endfunction function dGe takes integer NNv returns unit return(Je[(NNv)]) endfunction function dhe takes integer NNv returns nothing if QT[NNv]then set sT[ST[NNv]]=sT[NNv] set ST[sT[NNv]]=ST[NNv] set QT[NNv]=false if ST[(0)]==0 then call frv(tT) endif call Unit_Cancel_Counter($E7,(NNv)) endif endfunction function dHe takes nothing returns boolean local integer NNv=ST[(0)] local real h loop exitwhen NNv==0 if GetUnitTypeId((Je[((NNv))]))==0 or GetUnitMoveSpeed((Je[((NNv))]))==0 then call SetUnitFlyHeight((Je[((NNv))]),qT[NNv],0) call dhe(NNv) else set h=GetUnitFlyHeight((Je[((NNv))]))+MT[NNv] set MT[NNv]=MT[NNv]+PT[NNv] if h>qT[NNv]then call SetUnitFlyHeight((Je[((NNv))]),h,0) else call SetUnitFlyHeight((Je[((NNv))]),qT[NNv],0) call dhe(NNv) endif endif set NNv=ST[NNv] endloop return false endfunction function dje takes integer NNv returns boolean if not QT[NNv]then if ST[(0)]==0 then if tT==0 then set tT=fxv(function dHe) endif call fov(tT) endif set ST[NNv]=ST[(0)] set sT[ST[(0)]]=NNv set ST[(0)]=NNv set sT[NNv]=0 set QT[NNv]=true call Unit_App_Counter($E8,(NNv)) return true endif return false endfunction function FloatedTargetBY takes unit u,real sp,real ac returns nothing local integer NNv if GetUnitMoveSpeed(u)>0 then set NNv=(GetUnitUserData((u))) if dje(NNv)then if UnitAddAbility(u,'Amrf')then call UnitRemoveAbility(u,'Amrf') endif set qT[NNv]=GetUnitFlyHeight(u) endif set MT[NNv]=sp set PT[NNv]=ac endif endfunction function FloatedTargetBYStun takes unit u,boolean Bnv returns nothing local integer NNv if not MB[(GetUnitUserData((u)))]then if Bnv then call FloatedTargetBY(u,45,-1.6) call m2v(u,2.5,'A500','B500',true) else call FloatedTargetBY(u,30,-1.6) endif endif endfunction function FloatedTargetBYStun2 takes unit u,real v,boolean Bnv returns nothing local integer NNv if not MB[(GetUnitUserData((u)))]then set v=v/ 1024. if Bnv then call FloatedTargetBY(u,45,-v) call m2v(u,1+45/(16*v),'A500','B500',true) else call FloatedTargetBY(u,30,-v) endif endif endfunction function SummonSkills_A00F_Actions takes nothing returns nothing local unit u=(MV[GetPlayerId(GetOwningPlayer(Je[((GetUnitUserData((GetTriggerUnit()))))]))]) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl",GetTriggerUnit(),"origin")) call SetUnitX(GetTriggerUnit(),GetUnitX(u)+GetRandomReal(-$80,$80)) call SetUnitY(GetTriggerUnit(),GetUnitY(u)+GetRandomReal(-$80,$80)) set u=null endfunction function SummonSkills_A00F_Init takes nothing returns nothing call RegisterSpellEffectEvent('A00F',function SummonSkills_A00F_Actions) endfunction function pNe takes unit NZv,unit u,real d returns nothing local real x=GetUnitX(u) local real y=GetUnitY(u) call GroupEnumUnitsInRange(G,x,y,425+75,null) call GroupRemoveUnit(G,u) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,425)then if IsUnitAliveAndEnemy(u,NZv)then call DestroyEffect(AddSpecialEffectTarget("ZLightArrowImpact.mdl",u,"origin")) call UnitDamageTargetBY(((NZv)),((u)),((((d)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) elseif IsUnitAliveAndAlly(u,NZv)then call DestroyEffect(AddSpecialEffectTarget("HolyLight.mdl",u,"origin")) call UnitCureTaret(NZv,u,.15*d) endif endif endloop call Ltv(LAv("LightNova.mdl",x,y,.75)) call Ltv(LAv("TheHolyBomb.mdl",x,y,1.5)) endfunction function uOe takes nothing returns integer local integer NNv=Evv[(0)] if NNv==0 then set Exv=Exv+1 set NNv=Exv else set Evv[(0)]=Evv[NNv] endif return NNv endfunction function s__DoT_createHead takes nothing returns integer local integer NNv=uOe() set Evv[NNv]=NNv set Eev[NNv]=NNv return NNv endfunction function Remove_Destructable takes nothing returns nothing if GetDestructableTypeId(GetEnumDestructable())=='B001' or GetDestructableTypeId(GetEnumDestructable())=='B00C' then call RemoveDestructable(GetEnumDestructable()) endif endfunction function Init_Destructable takes nothing returns nothing endfunction function sj_jass_main takes nothing returns nothing local weathereffect we local destructable d local trigger t local real life local integer itemID local trigger gzv local integer i local trigger zqv local integer NOv local integer NRv local version v local integer Nxv set Ca=CreateSound_BJ("Sound\\Interface\\Hint.wav",false,false,false,$A,$A,"DefaultEAXON") call SetSoundParamsFromLabel_BJ(Ca,"Hint") call SetSoundDuration_BJ(Ca,$7D6) set Da=CreateSound_BJ("Abilities\\Spells\\NightElf\\Starfall\\StarfallCaster1.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(Da,"StarfallArea") call SetSoundDuration_BJ(Da,$8A1) set fa=CreateSound_BJ("Sound\\Buildings\\Death\\NightElfBuildingDeathLarge1.wav",false,true,true,$A,$A,"DefaultEAXON") call SetSoundParamsFromLabel_BJ(fa,"DeathNightElfLargeBuilding") call SetSoundDuration_BJ(fa,$DD8) set Fa=CreateSound_BJ("Sound\\Buildings\\Death\\BuildingDeathLargeHuman.wav",false,true,true,$A,$A,"DefaultEAXON") call SetSoundParamsFromLabel_BJ(Fa,"DeathHumanLargeBuilding") call SetSoundDuration_BJ(Fa,$D84) set ga=CreateSound_BJ("Units\\Creeps\\AzureDragon\\DragonYesAttack3.wav",false,false,true,$A,$A,"DefaultEAXON") call SetSoundParamsFromLabel_BJ(ga,"AzureDragonYesAttack") call SetSoundDuration_BJ(ga,$6B9) set Ga=CreateSound_BJ("Units\\Creeps\\AzureDragon\\DragonYes1.wav",false,false,true,$A,$A,"DefaultEAXON") call SetSoundParamsFromLabel_BJ(Ga,"AzureDragonYes") call SetSoundDuration_BJ(Ga,$6F6) set ha=CreateSound_BJ("Abilities\\Spells\\Items\\AIco\\CharmTarget1.wav",false,false,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(ha,"Charm") call SetSoundDuration_BJ(ha,$A7A) set Ha=CreateSound_BJ("Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.wav",false,false,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(Ha,"ThunderClap") call SetSoundDuration_BJ(Ha,$D7B) set ja=CreateSound_BJ("Units\\Human\\KnightNoRider\\KnightNoRiderWarcry1.wav",false,true,true,$A,$A,"DefaultEAXON") call SetSoundParamsFromLabel_BJ(ja,"KnightNoRiderWarcry") call SetSoundDuration_BJ(ja,$8A9) set Ja=CreateSound_BJ("Units\\Creeps\\Hydra\\HydraDeath1.wav",false,false,true,$A,$A,"DefaultEAXON") call SetSoundParamsFromLabel_BJ(Ja,"HydraDeath") call SetSoundDuration_BJ(Ja,$BBB) set ka=CreateSound_BJ("Units\\Undead\\HeroLich\\HeroLichWhat2.wav",false,false,true,$A,$A,"HeroAcksEAX") call SetSoundParamsFromLabel_BJ(ka,"HeroLichWhat") call SetSoundDuration_BJ(ka,$720) set Ka=CreateSound_BJ("Units\\Undead\\HeroLich\\HeroLichWhat3.wav",false,false,true,$A,$A,"HeroAcksEAX") call SetSoundParamsFromLabel_BJ(Ka,"HeroLichWhat") call SetSoundDuration_BJ(Ka,$68B) set la=CreateSound_BJ("Units\\Undead\\HeroLich\\HeroLichReady1.wav",false,false,true,$A,$A,"HeroAcksEAX") call SetSoundParamsFromLabel_BJ(la,"HeroLichReady") call SetSoundDuration_BJ(la,$CA1) set La=CreateSound_BJ("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget1.wav",false,false,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(La,"FrostNova") call SetSoundDuration_BJ(La,$B58) set ma=CreateSound_BJ("Log off.mp3",false,false,false,$A,$A,"DefaultEAXON") call SetSoundDuration_BJ(ma,$E808) call SetSoundChannel_BJ(ma,0) call SetSoundVolume_BJ(ma,$7F) call SetSoundPitch_BJ(ma,1.) set Ma=CreateSound_BJ("Buildings\\Undead\\SacrificialPit\\SacrificialPitWhat1.wav",false,true,true,$A,$A,"DefaultEAXON") call SetSoundParamsFromLabel_BJ(Ma,"SacrificialPitWhat") call SetSoundDuration_BJ(Ma,$D33) set pa=CreateSound_BJ("Sound\\Buildings\\Death\\UndeadBuildingDeathLarge1.wav",false,true,true,$A,$A,"DefaultEAXON") call SetSoundParamsFromLabel_BJ(pa,"DeathUndeadLargeBuilding") call SetSoundDuration_BJ(pa,$BB9) set Pa=CreateSound_BJ("Abilities\\Spells\\Undead\\DarkRitual\\DarkRitualTarget1.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(Pa,"DarkRitual") call SetSoundDuration_BJ(Pa,$BBF) set qa=CreateSound_BJ("Units\\Undead\\EvilSylvanas\\EvilSylvanasWarcry1.wav",false,true,true,$A,$A,"HeroAcksEAX") call SetSoundParamsFromLabel_BJ(qa,"EvilSylvanasWarcry") call SetSoundDuration_BJ(qa,$78D) set Qa=CreateSound_BJ("Abilities\\Spells\\NightElf\\ReviveNightElf\\ReviveNightElf.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(Qa,"ReviveNightElf") call SetSoundDuration_BJ(Qa,$CC4) set sa=CreateSound_BJ("Abilities\\Spells\\Other\\CrushingWave\\CrushingWaveTarget1.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(sa,"CrushingWaveDamage") call SetSoundDuration_BJ(sa,$841) set Sa=CreateSound_BJ("Abilities\\Spells\\Other\\Monsoon\\MonsoonLightningHit.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(Sa,"MonsoonBolt") call SetSoundDuration_BJ(Sa,$96F) set Ta=CreateSound_BJ("Units\\NightElf\\Ent\\ForceOfNatureBirth1.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(Ta,"ForceOfNatureBirth") call SetSoundDuration_BJ(Ta,$72B) set ua=CreateSound_BJ("Abilities\\Spells\\Orc\\LightningBolt\\LightningBolt.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(ua,"LightningBolt") call SetSoundDuration_BJ(ua,$858) set Ua=CreateSound_BJ("Abilities\\Spells\\Other\\HowlOfTerror\\HowlOfTerror.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(Ua,"HowlOfTerror") call SetSoundDuration_BJ(Ua,$BF9) set wa=CreateSound_BJ("Sound\\Buildings\\Death\\NightElfBuildingDeathSmall1.wav",false,true,true,$A,$A,"DefaultEAXON") call SetSoundParamsFromLabel_BJ(wa,"DeathNightElfBuildingCancel") call SetSoundDuration_BJ(wa,$E5B) set Wa=CreateSound_BJ("Units\\Human\\Footman\\FootmanYesAttack3.wav",false,true,true,$A,$A,"DefaultEAXON") call SetSoundParamsFromLabel_BJ(Wa,"FootmanYesAttack") call SetSoundDuration_BJ(Wa,$480) set ya=CreateSound_BJ("Units\\Human\\Arthas\\ArthasYesAttack6.wav",false,true,true,$A,$A,"HeroAcksEAX") call SetSoundParamsFromLabel_BJ(ya,"ArthasYesAttack") call SetSoundDuration_BJ(ya,$455) set Ya=CreateSound_BJ("Abilities\\Spells\\NightElf\\FaerieDragonInvis\\PhaseShift1.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(Ya,"PhaseShift") call SetSoundDuration_BJ(Ya,$4E3) set Za=CreateSound_BJ("Sound\\Interface\\Warning.wav",false,false,false,$A,$A,"") call SetSoundParamsFromLabel_BJ(Za,"Warning") call SetSoundDuration_BJ(Za,$770) set vn=CreateSound_BJ("Sound\\Buildings\\Naga\\NagaBuildingCancel.wav",false,true,true,$A,$A,"DefaultEAXON") call SetSoundParamsFromLabel_BJ(vn,"NagaBuildingDeath") call SetSoundDuration_BJ(vn,$818) set en=CreateSound_BJ("Abilities\\Spells\\Undead\\Cripple\\CrippleTarget1.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(en,"Cripple") call SetSoundDuration_BJ(en,$90C) set xn=CreateSound_BJ("Abilities\\Spells\\Undead\\Possession\\PossessionMissileHit1.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(xn,"PossessionMissileHit") call SetSoundDuration_BJ(xn,$492) set on=CreateSound_BJ("Abilities\\Spells\\Undead\\DarkRitual\\DarkRitualTarget1.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(on,"DarkRitual") call SetSoundDuration_BJ(on,$BBF) set rn=CreateSound_BJ("Sound\\Buildings\\Death\\UndeadBuildingDeathLarge1.wav",false,true,true,$A,$A,"DefaultEAXON") call SetSoundParamsFromLabel_BJ(rn,"DeathUndeadLargeBuilding") call SetSoundDuration_BJ(rn,$BB9) set in=CreateSound_BJ("Abilities\\Spells\\Other\\HowlOfTerror\\HowlOfTerror.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(in,"HowlOfTerror") call SetSoundDuration_BJ(in,$BF9) set nn=CreateSound_BJ("Sound\\Units\\Combat\\MetalHeavyChopMetal3.wav",false,true,true,$A,$A,"CombatSoundsEAX") call SetSoundParamsFromLabel_BJ(nn,"MetalHeavyChopMetal") call SetSoundDuration_BJ(nn,971) set Vn=CreateSound_BJ("Sound\\Interface\\ClanInvitation.wav",false,false,false,$A,$A,"DefaultEAXON") call SetSoundParamsFromLabel_BJ(Vn,"ClanInvitation") call SetSoundDuration_BJ(Vn,4296) set En=CreateSound_BJ("Abilities\\Spells\\NightElf\\EatTree\\EatTreeTarget1.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(En,"EatTreeMunch") call SetSoundDuration_BJ(En,$44D) set Xn=CreateSound_BJ("Units\\Creeps\\Lobstrokkblue\\LobstrokkWhat2.wav",false,true,true,$A,$A,"DefaultEAXON") call SetSoundParamsFromLabel_BJ(Xn,"LobstrokkWhat") call SetSoundDuration_BJ(Xn,990) set On=CreateSound_BJ("Units\\Creeps\\Mammoth\\MammothYes1.wav",false,true,true,$A,$A,"DefaultEAXON") call SetSoundParamsFromLabel_BJ(On,"MammothWhat") call SetSoundDuration_BJ(On,$95D) set Rn=CreateSound_BJ("Sound\\Dialogue\\UndeadCampaign\\Undead02\\U02KelThuzad27.mp3",false,false,false,$A,$A,"DefaultEAXON") call SetSoundParamsFromLabel_BJ(Rn,"U02KelThuzad27") call SetSoundDuration_BJ(Rn,4780) set In=CreateSound_BJ("Abilities\\Spells\\NightElf\\ReviveNightElf\\ReviveNightElf.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(In,"ReviveNightElf") call SetSoundDuration_BJ(In,$CC4) set An=CreateSound_BJ("Abilities\\Spells\\Orc\\LightningBolt\\LightningBolt.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(An,"LightningBolt") call SetSoundDuration_BJ(An,$858) set Nn=CreateSound_BJ("Sound\\Ambient\\DoodadEffects\\TheHornOfCenarius.wav",false,false,false,$A,$A,"DefaultEAXON") call SetSoundParamsFromLabel_BJ(Nn,"HornOfCenariusSound") call SetSoundDuration_BJ(Nn,$2F59) set Bn=CreateSound_BJ("Sound\\Ambient\\DoodadEffects\\SargerasLaugh.wav",false,true,true,$A,$A,"DefaultEAXON") call SetSoundParamsFromLabel_BJ(Bn,"SargerasLaugh") call SetSoundDuration_BJ(Bn,$CFE) set cn=CreateSound_BJ("Sound\\Buildings\\Death\\UndeadBuildingDeathLarge1.wav",false,true,true,$A,$A,"DefaultEAXON") call SetSoundParamsFromLabel_BJ(cn,"DeathUndeadLargeBuilding") call SetSoundDuration_BJ(cn,$BB9) set Cn=CreateSound_BJ("Sound\\Buildings\\Death\\UndeadBuildingDeathSmall.wav",false,true,true,$A,$A,"DefaultEAXON") call SetSoundParamsFromLabel_BJ(Cn,"DeathUndeadBuildingCancel") call SetSoundDuration_BJ(Cn,$8BB) set dn=CreateSound_BJ("Abilities\\Spells\\Undead\\Burrow\\Burrow.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(dn,"Burrow") call SetSoundDuration_BJ(dn,$79E) set Dn=CreateSound_BJ("Doodads\\Cinematic\\Lightningbolt\\LightningBolt1.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(Dn,"CinematicLightningBolt") call SetSoundDuration_BJ(Dn,$BB9) set fn=CreateSound_BJ("Units\\Undead\\EvilSylvanas\\EvilSylvanasYesAttack3.wav",false,true,true,$A,$A,"HeroAcksEAX") call SetSoundParamsFromLabel_BJ(fn,"EvilSylvanasYesAttack") call SetSoundDuration_BJ(fn,$682) set Fn=CreateSound_BJ("Abilities\\Spells\\Other\\Submerge\\Submerge1.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(Fn,"SubmergeSound") call SetSoundDuration_BJ(Fn,$5F4) set gn=CreateSound_BJ("Units\\Undead\\Banshee\\BansheeDeath.wav",false,true,true,$A,$A,"DefaultEAXON") call SetSoundParamsFromLabel_BJ(gn,"BansheeDeath") call SetSoundDuration_BJ(gn,$94C) set Gn=CreateSound_BJ("Abilities\\Spells\\Demon\\RainOfFire\\RainOfFireTarget2.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(Gn,"StarfallTarget") call SetSoundDuration_BJ(Gn,$BB8) set hn=CreateSound_BJ("Abilities\\Spells\\Undead\\AbsorbMana\\AbsorbMana.wav",false,true,true,$A,$A,"MissilesEAX") call SetSoundParamsFromLabel_BJ(hn,"AbsorbManaLaunch") call SetSoundDuration_BJ(hn,996) set Hn=CreateSound_BJ("Abilities\\Spells\\Orc\\Disenchant\\Disenchant.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(Hn,"Disenchant") call SetSoundDuration_BJ(Hn,$7FB) set jn=CreateSound_BJ("Abilities\\Spells\\Other\\Submerge\\Submerge1.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(jn,"SubmergeSound") call SetSoundDuration_BJ(jn,$5F4) set Jn=CreateSound_BJ("Units\\Naga\\NagaMyrmidon\\MyrmidonDeath1.wav",false,true,true,$A,$A,"DefaultEAXON") call SetSoundParamsFromLabel_BJ(Jn,"NagaMyrmidonDeath") call SetSoundDuration_BJ(Jn,$93B) set kn=CreateSound_BJ("Abilities\\Spells\\Orc\\LightningShield\\LightningShieldTarget.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(kn,"LightningShield") call SetSoundDuration_BJ(kn,$F26) set Kn=CreateSound_BJ("Abilities\\Spells\\NightElf\\BattleRoar\\BattleRoar.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(Kn,"BattleRoar") call SetSoundDuration_BJ(Kn,$7C7) set ln=CreateSound_BJ("Abilities\\Spells\\Orc\\LightningBolt\\LightningBolt.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(ln,"LightningBolt") call SetSoundDuration_BJ(ln,$858) set Ln=CreateSound_BJ("Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(Ln,"ThunderClap") call SetSoundDuration_BJ(Ln,$D7B) set mn=CreateSound_BJ("Abilities\\Spells\\Other\\BreathOfFire\\BreathOfFire1.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(mn,"BreathOfFire") call SetSoundDuration_BJ(mn,$65C) set Mn=CreateSound_BJ("candy.mp3",false,false,false,$A,$A,"") call SetSoundDuration_BJ(Mn,$CA7) call SetSoundChannel_BJ(Mn,0) call SetSoundVolume_BJ(Mn,$7F) call SetSoundPitch_BJ(Mn,1.) set pn=CreateSound_BJ("Units\\Undead\\Ghoul\\GhoulWhat1.wav",false,true,true,$A,$A,"DefaultEAXON") call SetSoundParamsFromLabel_BJ(pn,"GhoulWhat") call SetSoundDuration_BJ(pn,982) set Pn=CreateSound_BJ("Sound\\Ambient\\DoodadEffects\\SargerasLaugh.wav",false,true,true,$A,$A,"DefaultEAXON") call SetSoundParamsFromLabel_BJ(Pn,"SargerasLaugh") call SetSoundDuration_BJ(Pn,$CFE) set qn=CreateSound_BJ("Units\\Undead\\Shade\\ShadeYesAttack2.wav",false,true,true,$A,$A,"HeroAcksEAX") call SetSoundParamsFromLabel_BJ(qn,"ShadeYesAttack") call SetSoundDuration_BJ(qn,$632) set Qn=CreateSound_BJ("Sound\\Ambient\\DoodadEffects\\SargerasLaugh.wav",false,true,true,$A,$A,"DefaultEAXON") call SetSoundParamsFromLabel_BJ(Qn,"SargerasLaugh") call SetSoundDuration_BJ(Qn,$CFE) set sn=CreateSound_BJ("dingSound.mp3",false,false,false,$A,$A,"DefaultEAXON") call SetSoundDuration_BJ(sn,$6B9) call SetSoundChannel_BJ(sn,0) call SetSoundVolume_BJ(sn,$7F) call SetSoundPitch_BJ(sn,1.) set Sn=CreateSound_BJ("Buildings\\NightElf\\AncientOfWind\\AncientOfTheWildWhat3.wav",false,true,true,$A,$A,"DefaultEAXON") call SetSoundParamsFromLabel_BJ(Sn,"AncientOfWindWhat") call SetSoundDuration_BJ(Sn,$6ED) call SetSoundVolume_BJ(Sn,$7F) set tn=CreateSound_BJ("Abilities\\Spells\\Other\\Monsoon\\MonsoonLightningHit.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(tn,"MonsoonBolt") call SetSoundDuration_BJ(tn,$96F) set Tn=CreateSound_BJ("Units\\Human\\Rifleman\\RiflemanAttack1.wav",false,true,true,$A,$A,"MissilesEAX") call SetSoundParamsFromLabel_BJ(Tn,"RiflemanAttack1") call SetSoundDuration_BJ(Tn,702) set un=CreateSound_BJ("Units\\Human\\Rifleman\\RiflemanAttack2.wav",false,true,true,$A,$A,"MissilesEAX") call SetSoundParamsFromLabel_BJ(un,"RiflemanAttack1") call SetSoundDuration_BJ(un,702) set Un=CreateSound_BJ("Abilities\\Spells\\Undead\\Impale\\ImpaleHit.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(Un,"ImpaleHit") call SetSoundDuration_BJ(Un,$682) set wn=CreateSound_BJ("Abilities\\Spells\\NightElf\\FaerieFire\\FaerieFireLaunch1.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(wn,"FaerieFire") call SetSoundDuration_BJ(wn,$813) set Wn=CreateSound_BJ("Abilities\\Spells\\NightElf\\BattleRoar\\BattleRoar.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(Wn,"BattleRoar") call SetSoundDuration_BJ(Wn,$7C7) set yn=CreateSound_BJ("Units\\Undead\\Ghoul\\GhoulWarcry1.wav",false,true,true,$A,$A,"DefaultEAXON") call SetSoundParamsFromLabel_BJ(yn,"GhoulWarcry") call SetSoundDuration_BJ(yn,$5CB) set Yn=CreateSound_BJ("Units\\Undead\\FrostWyrm\\FrostwyrmWarcry1.wav",false,true,true,$A,$A,"DefaultEAXON") call SetSoundParamsFromLabel_BJ(Yn,"FrostWyrmWarcry") call SetSoundDuration_BJ(Yn,$96F) call ConfigureNeutralVictim() set A7v=Filter(function NEv) set filterIssueHauntOrderAtLocBJ=Filter(function IssueHauntOrderAtLocBJFilter) set filterEnumDestructablesInCircleBJ=Filter(function A9v) set filterGetUnitsInRectOfPlayer=Filter(function GetUnitsInRectOfPlayerFilter) set filterGetUnitsOfTypeIdAll=Filter(function GetUnitsOfTypeIdAllFilter) set filterGetUnitsOfPlayerAndTypeId=Filter(function GetUnitsOfPlayerAndTypeIdFilter) set filterMeleeTrainedUnitIsHeroBJ=Filter(function MeleeTrainedUnitIsHeroBJFilter) set filterLivingPlayerUnitsOfTypeId=Filter(function LivingPlayerUnitsOfTypeIdFilter) set NOv=0 loop exitwhen NOv==16 set bj_FORCE_PLAYER[NOv]=CreateForce() call ForceAddPlayer(bj_FORCE_PLAYER[NOv],Player(NOv)) set NOv=NOv+1 endloop set bj_FORCE_ALL_PLAYERS=CreateForce() call ForceEnumPlayers(bj_FORCE_ALL_PLAYERS,null) set bj_cineModePriorSpeed=GetGameSpeed() set bj_cineModePriorFogSetting=IsFogEnabled() set bj_cineModePriorMaskSetting=IsFogMaskEnabled() set NOv=0 loop exitwhen NOv>=bj_MAX_QUEUED_TRIGGERS set bj_queuedExecTriggers[NOv]=null set bj_queuedExecUseConds[NOv]=false set NOv=NOv+1 endloop set bj_isSinglePlayer=false set NRv=0 set NOv=0 loop exitwhen NOv>=$C if(GetPlayerController(Player(NOv))==MAP_CONTROL_USER and GetPlayerSlotState(Player(NOv))==PLAYER_SLOT_STATE_PLAYING)then if NOv>=8 then if GetLocalPlayer()==Player(NOv)then call EndGame(false) endif else set NRv=NRv+1 endif endif set NOv=NOv+1 endloop set bj_isSinglePlayer=(NRv==1) set bj_rescueSound=CreateSoundFromLabel("Rescue",false,false,false,$2710,$2710) set bj_questDiscoveredSound=CreateSoundFromLabel("QuestNew",false,false,false,$2710,$2710) set bj_questUpdatedSound=CreateSoundFromLabel("QuestUpdate",false,false,false,$2710,$2710) set bj_questCompletedSound=CreateSoundFromLabel("QuestCompleted",false,false,false,$2710,$2710) set bj_questFailedSound=CreateSoundFromLabel("QuestFailed",false,false,false,$2710,$2710) set bj_questHintSound=CreateSoundFromLabel("Hint",false,false,false,$2710,$2710) set bj_questSecretSound=CreateSoundFromLabel("SecretFound",false,false,false,$2710,$2710) set bj_questItemAcquiredSound=CreateSoundFromLabel("ItemReward",false,false,false,$2710,$2710) set bj_questWarningSound=CreateSoundFromLabel("Warning",false,false,false,$2710,$2710) set bj_victoryDialogSound=CreateSoundFromLabel("QuestCompleted",false,false,false,$2710,$2710) set bj_defeatDialogSound=CreateSoundFromLabel("QuestFailed",false,false,false,$2710,$2710) call DelayedSuspendDecayCreate() set v=VersionGet() if(v==VERSION_REIGN_OF_CHAOS)then set bj_MELEE_MAX_TWINKED_HEROES=bj_MELEE_MAX_TWINKED_HEROES_V0 else set bj_MELEE_MAX_TWINKED_HEROES=bj_MELEE_MAX_TWINKED_HEROES_V1 endif set Nxv=0 loop set bj_stockAllowedPermanent[Nxv]=false set bj_stockAllowedCharged[Nxv]=false set bj_stockAllowedArtifact[Nxv]=false set Nxv=Nxv+1 exitwhen Nxv>$A endloop call SetAllItemTypeSlots($B) call SetAllUnitTypeSlots($B) call DetectGameStarted() call ExecuteFunc("uRe") call ExecuteFunc("Tlv") call ExecuteFunc("Ygv") call RegisterEvent(EVENT_PLAYER_UNIT_ATTACKED,function ziv) call RegisterEvent(EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER,function zav) set i=8 loop set i=i-1 call SetPlayerStateG(P[i],PLAYER_STATE_RESOURCE_GOLD,0) call SetPlayerStateG(P[i],PLAYER_STATE_RESOURCE_LUMBER,0) exitwhen i==0 endloop set gzv=CreateTrigger() set i=8 loop set i=i-1 if pV[i]then call TriggerRegisterPlayerChatEvent(gzv,P[i],"-wntkdnl",true) call TriggerRegisterPlayerChatEvent(gzv,P[i],"-dice",true) call TriggerRegisterPlayerChatEvent(gzv,P[i],"-roll",true) endif exitwhen i==0 endloop call TriggerAddCondition(gzv,Filter(function zsv)) set gzv=null set gzv=CreateTrigger() set i=8 loop set i=i-1 if pV[i]then call TriggerRegisterPlayerChatEvent(gzv,P[i],"-自杀",true) call TriggerRegisterPlayerChatEvent(gzv,P[i],"-wktkf",true) call TriggerRegisterPlayerChatEvent(gzv,P[i],"-rnlghks",true) call TriggerRegisterPlayerChatEvent(gzv,P[i],"-suicide",true) call TriggerRegisterPlayerChatEvent(gzv,P[i],"-recall",true) endif exitwhen i==0 endloop call TriggerAddCondition(gzv,Filter(function zSv)) set gzv=null set gzv=CreateTrigger() set i=8 loop set i=i-1 if pV[i]then call TriggerRegisterPlayerChatEvent(gzv,P[i],"-clean screen",true) call TriggerRegisterPlayerChatEvent(gzv,P[i],"-ghkauscjdth",true) call TriggerRegisterPlayerChatEvent(gzv,P[i],"-refresh",true) endif exitwhen i==0 endloop call TriggerAddCondition(gzv,Filter(function ztv)) set gzv=null set gzv=CreateTrigger() set zqv=CreateTrigger() set i=8 loop set i=i-1 if pV[i]then call TriggerRegisterPlayerChatEvent(gzv,P[i],"-清理地图",true) call TriggerRegisterPlayerChatEvent(gzv,P[i],"-clean",true) call TriggerRegisterPlayerChatEvent(gzv,P[i],"-clean map",true) call TriggerRegisterPlayerChatEvent(zqv,P[i],"-取消清理",true) call TriggerRegisterPlayerChatEvent(zqv,P[i],"-unitr",true) endif exitwhen i==0 endloop call TriggerAddCondition(gzv,Condition(function zWv)) call TriggerAddCondition(zqv,Condition(function zyv)) set gzv=null set zqv=null call RegisterSpellEffectEvent('A0KW',function ZIv) call RegisterSpellEffectEvent('A0E8',function xoe) call RegisterSpellEffectEvent('A067',function xre) call RegisterSpellEffectEvent('A02C',function iTe) call RegisterSpellEffectEvent('A02B',function iTe) call RegisterSpellEffectEvent('A02D',function iTe) call RegisterSpellEffectEvent('A02E',function iue) call RegisterSpellEffectEvent('A02A',function iUe) call RegisterSpellEffectEvent('A0G1',function iwe) call TriggerAddCondition(alloc__GX[(TRIGGER_PICKUP)],(Condition((function aae)))) set gzv=CreateTrigger() set UV=gg_unit_h00V_0527 call PauseUnit(UV,true) call SetUnitInvulnerable(UV,true) call SetDestructableInvulnerable(gg_dest_B00C_1557,true) call AddUnitSellItemById('I051',function ale) call RegisterEnterRect_A(gg_rct_TSRK_003,function aLe) call TriggerRegisterUnitEvent(gzv,UV,EVENT_UNIT_DEATH) call TriggerAddCondition(gzv,Condition(function aKe)) set gzv=null call RegisterEnterRect_A(gg_rct_SHTZZ_____________________________002,function aSe) call RegisterEnterRect_A(gg_rct_FQJT_________________002,function aye) call RegisterEnterRect_A(gg_rct_HSK_______________________002,function a4e) call RegisterEnterRect_A(gg_rct_JKZHD_________________002,function a9e) call RegisterEnterRect_A(gg_rct_YS01_______________________002,function nne) call RegisterEnterRect_A(gg_rct_BSLZ_______________________002,function nbe) set gzv=CreateTrigger() set i=3 set AE[0]=gg_unit_h01G_0069 set AE[1]=gg_unit_h01G_0067 set AE[2]=gg_unit_h01G_0068 set NE=CreateDestructable('B001',$4E80,-$5A00,0,1,1) loop set i=i-1 call TriggerRegisterUnitEvent(gzv,AE[i],EVENT_UNIT_DEATH) call PauseUnit(AE[i],true) call SetUnitInvulnerable(AE[i],true) exitwhen i==0 endloop call RegisterEnterRect_A(gg_rct_ZHIZHUZHD_________________002,function nle) call TriggerAddCondition(gzv,Condition(function nge)) set i=3 set DE[0]=gg_unit_n01N_0531 set DE[1]=gg_unit_n01N_0533 set DE[2]=gg_unit_n01N_0532 loop set i=i-1 set fE[i]=AddSpecialEffectTarget("Abilities\\Spells\\Orc\\ReinforcedTrollBurrow\\ReinforcedTrollBurrowTarget.mdl",DE[i],"origin") call PauseUnit(DE[i],true) call SetUnitInvulnerable(DE[i],true) call SetUnitAnimation(DE[i],"cinematic") call TriggerRegisterUnitEvent(hE,DE[i],EVENT_UNIT_DEATH) exitwhen i==0 endloop call RegisterEnterRect_A(gg_rct_TSZHD_________________002,function n2e) call TriggerAddCondition(hE,Condition(function nTe)) call SetUnitInvulnerable(gg_unit_H00Q_0724,true) call RegisterEnterRect_A(gg_rct_EM01_________________002,function VDe) call RegisterSpellEffectEvent('A0OR',function X7e) call RegisterSpellEffectEvent('A0H6',function RYe) call RegisterSpellEffectEvent('A0H4',function R2e) call RegisterSpellEffectEvent('A0H8',function R3e) call RegisterSpellChannelEvent('A0H8',function R4e) call RegisterSpellChannelEvent('A0AC',function Iqe) call RegisterSpellChannelEvent('A0AE',function IQe) call RegisterSpellChannelEvent('A0AF',function Ise) call RegisterSpellEffectEvent('A04J',function ISe) call RegisterSpellEffectEvent('A0KY',function ISe) call RegisterSpellChannelEvent('A04J',function ITe) call RegisterSpellChannelEvent('A0KY',function ITe) call RegisterSpellEffectEvent('A06U',function IYe) call RegisterSpellChannelEvent('A06U',function Ize) call RegisterSpellChannelEvent('A0AK',function IZe) call RegisterSpellChannelEvent('A0AL',function I_e) call RegisterSpellEffectEvent('A0AJ',function I0e) call RegisterSpellEffectEvent('A07E',function I2e) call RegisterSpellChannelEvent('A07E',function I3e) call RegisterSpellEffectEvent('A04N',function I4e) call RegisterSpellChannelEvent('A04N',function I5e) call RegisterSpellEffectEvent('A07K',function I6e) call RegisterSpellEffectEvent('A0JI',function I6e) call RegisterSpellChannelEvent('A07K',function I7e) call RegisterSpellChannelEvent('A0JI',function I7e) call RegisterSpellChannelEvent('A0AN',function I8e) call RegisterSpellEffectEvent('A04G',function I9e) call RegisterSpellEffectEvent('A04C',function Ane) call RegisterSpellChannelEvent('A04C',function AVe) call RegisterSpellEffectEvent('A04H',function AEe) call RegisterSpellChannelEvent('A04H',function AXe) call RegisterSpellEffectEvent('A06P',function AOe) call RegisterSpellEffectEvent('A0I8',function AOe) call RegisterSpellChannelEvent('A06P',function ARe) call RegisterSpellChannelEvent('A0I8',function ARe) call RegisterSpellEffectEvent('A04Y',function ACe) call RegisterSpellEffectEvent('A0KQ',function ACe) call RegisterSpellChannelEvent('A04Y',function Ade) call RegisterSpellChannelEvent('A0KQ',function Ade) call RegisterSpellEffectEvent('A08K',function ADe) call RegisterSpellEffectEvent('A04L',function Age) call RegisterSpellEffectEvent('A0IQ',function Age) call RegisterSpellEffectEvent('A04M',function AGe) call RegisterSpellChannelEvent('A04M',function Ahe) call RegisterSpellChannelEvent('A0AV',function AHe) call RegisterSpellEffectEvent('A0AY',function Aje) call RegisterSpellEffectEvent('A06O',function AJe) call RegisterSpellChannelEvent('A06O',function Ake) call RegisterSpellChannelEvent('A0AX',function AKe) call RegisterSpellChannelEvent('A0KV',function AKe) call RegisterSpellChannelEvent('A0AT',function Ale) call RegisterSpellEffectEvent('A0AP',function ALe) call RegisterSpellChannelEvent('A0AP',function Ame) call RegisterSpellEffectEvent('A04F',function AMe) call RegisterSpellEffectEvent('A0KU',function AMe) call RegisterSpellChannelEvent('A04F',function Ape) call RegisterSpellChannelEvent('A0KU',function Ape) call RegisterSpellEffectEvent('A0A1',function AQe) call RegisterSpellEffectEvent('A0KT',function AQe) set WE=NewGroup() call TimerStart((NewTimer(0)),.25,true,function cxe) set gzv=CreateTrigger() set i=8 loop set i=i-1 if pV[i]then endif exitwhen i==0 endloop set gzv=null call RegisterSpellEffectEvent('A00F',function SummonSkills_A00F_Actions) endfunction function uIe takes nothing returns boolean local integer NNv=Evv[(0)] if NNv==0 then set Exv=Exv+1 set NNv=Exv else set Evv[(0)]=Evv[NNv] endif set Ayv=NNv return true endfunction function uAe takes nothing returns boolean local integer NNv=AWv local integer Nbv=Ahv set Eev[Evv[NNv]]=Nbv set Evv[Nbv]=Evv[NNv] set Evv[NNv]=Nbv set Eev[Nbv]=NNv return true endfunction function uNe takes nothing returns boolean local integer NNv=uOe() set Evv[NNv]=NNv set Eev[NNv]=NNv set Ayv=NNv return true endfunction function ube takes nothing returns boolean local integer NNv=AWv set Eev[Evv[NNv]]=Eev[NNv] set Evv[Eev[NNv]]=Evv[NNv] set Evv[NNv]=Evv[(0)] set Evv[(0)]=NNv return true endfunction function uBe takes nothing returns boolean local integer NNv=AWv set Evv[Eev[NNv]]=Evv[(0)] set Evv[(0)]=NNv return true endfunction function U9e takes nothing returns boolean call frv(mT) return true endfunction function wve takes nothing returns boolean call dge(Asv,Akv,AKv,Alv,ASv,ALv,AQv,Amv,AMv,Apv) return true endfunction function wee takes nothing returns boolean call frv(KT) return true endfunction function wxe takes nothing returns boolean local integer NNv=Ahv call s__barrage_Filling((kT),(NNv)) if not s__barrage_InOperation[kT]then set s__barrage_InOperation[kT]=true call fov(KT) endif return true endfunction function woe takes nothing returns boolean local real sX=Akv local real sY=AKv local real sZ=Alv local real tZ=ALv local real di=Amv local real a=AMv local real BIv=Apv local real ar=APv local real cv=Aqv local integer NNv=CreateBarrageTypeD(sX,sY,sZ,sX+di*Cos(a),sY+di*Sin(a),tZ) call SetBarrageFlightRadianEZ(NNv,ar) call SetBarrageFlightRadian(NNv,cv) set s__barrage_speed[NNv]=0 set s__barrage_acceleration[NNv]=.03125*.03125*BIv call dAe(NNv) set Ayv=s__barrage_model[NNv] return true endfunction function wre takes nothing returns boolean local integer NNv=AWv set AYv=Je[NNv] return true endfunction function wie takes nothing returns boolean local integer NNv=AWv set AZv=(IsUnitType((Je[NNv]),UNIT_TYPE_MECHANICAL)) return true endfunction function wVe takes nothing returns boolean local integer NNv=AWv set qt[NNv]=0 set Qt[NNv]=0 return true endfunction function wEe takes nothing returns boolean local integer NNv=AWv local real BDv=Akv local real Bfv=AKv if CLe(NNv)then if UnitAddAbility((Je[((NNv))]),'Amrf')then call UnitRemoveAbility((Je[((NNv))]),'Amrf') endif endif set qt[NNv]=BDv set Qt[NNv]=.03125*(qt[NNv]-GetUnitFlyHeight((Je[((NNv))])))/ Bfv return true endfunction function wXe takes nothing returns boolean local integer NNv=AWv call DestroyLightning(pt[NNv]) call Unit_Cancel_Counter($E9,mt[NNv]) call Unit_Cancel_Counter($EA,Mt[NNv]) call Che(NNv) set pt[NNv]=null return true endfunction function wOe takes nothing returns boolean local integer NNv=AWv call MoveLightningEx(pt[NNv],false,GetUnitX((Je[(mt[NNv])])),GetUnitY((Je[(mt[NNv])])),Lt+GetUnitFlyHeight((Je[(mt[NNv])])),GetUnitX((Je[(Mt[NNv])])),GetUnitY((Je[(Mt[NNv])])),Lt+GetUnitFlyHeight((Je[(Mt[NNv])]))) return true endfunction function wRe takes nothing returns boolean set Ayv=CHe(AQv,Asv,ASv) return true endfunction function wCe takes nothing returns boolean call frv(Bt) return true endfunction function wde takes nothing returns boolean call UnitAddAbility(DS,'A0UP') call UnitMakeAbilityPermanent(DS,true,'A0UP') call RegisterSpellChannelEvent('A0UP',function Cve_2) call RegisterSpellEffectEvent('A0UP',function Cve_2) call TimerStart((NewTimer(0)),it,true,function Cve) return true endfunction function wDe takes nothing returns boolean set ot=LAv("BlackCloudOfFog.mdl",GetUnitX(DS),GetUnitY(DS),7) call TimerStart((NewTimer(0)),.03125,true,function c5e) return true endfunction function wfe takes nothing returns boolean call frv(et) return true endfunction function wFe takes nothing returns boolean call NewTextTagInTarget_B(DS,"All your resistance is in vain. You are like a candle in the wind.",18,55,55,125) call m_v(DS,false) call TriggerEvaluate(Rdv) call UnitAddAbilityBY(DS,'A0R4') call UnitAddAbilityBY(DS,'A0R3') return true endfunction function wge takes nothing returns boolean local integer i=2 local integer j local real x=hS local real y=HS local real z=GetUnitFlyHeight(DS) local real pX local real pY local real d local real a local real c=0 local real r local integer NNv loop set i=i-1 set j=4 set pX=x set pY=y if i==1 then set r=$610 else set r=$800/ SquareRoot(2) endif loop set j=j-1 set a=c+j*Lx/ 4 set NNv=CreateBarrageTypeD(x,y,z,pX+r*Cos(a),pY+r*Sin(a),300.) call LMv(s__barrage_model[NNv],"Abilities\\Weapons\\AvengerMissile\\AvengerMissile.mdl") call SetUnitScale(II[(s__barrage_model[NNv])],((4)*1.),0,0) set s__barrage_speed[NNv]=.03125*s__locationez_range[s__barrage_p1[NNv]]/ 1.5 call SetBarrageFlightRadianEZ(NNv,.25) call c3e(NNv) exitwhen j==0 endloop exitwhen i==0 set c=c+bj_PI*.5 endloop call UnitCureTaret(null,DS,GetUnitMaxLifeById((GetUnitUserData((DS))))) call m_v(DS,true) call TriggerEvaluate(RDv) call SetUnitFacingTimed(DS,270,0) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl",DS,"origin")) call SetUnitPosition(DS,hS,HS) call SetUnitAnimation(DS,"spell slam") call QueueUnitAnimation(DS,"stand") call NewTextTagInTarget_B(DS,"Minions, the darkness is coming!! ..",18,55,55,125) call zlv($9B,25,$9B,1.5) return true endfunction function wGe takes nothing returns boolean call frv(uS) return true endfunction function whe takes nothing returns boolean local integer NNv=AWv if PS[NNv]!=null then call ReleaseTimer(PS[NNv],"[TimerUtils]Error:157") call UnitRemoveAbilityandBuffBY((Je[(NNv)]),'A0R7','B06H') call SetUnitVertexColor((Je[(NNv)]),25,55,55,$FF) call Unit_Cancel_Counter($EB,(NNv)) set PS[NNv]=null set AZv=true return true endif set AZv=false return true endfunction function wHe takes nothing returns boolean call cke(Asv) return true endfunction function wje takes nothing returns boolean set AZv=FS==0 return true endfunction function wJe takes nothing returns boolean set fS=true set gS=CreateTrigger() set GS=UnitAddShieldTrigB((GetUnitUserData((DS))),function cRe) call UnitAddShieldTrigB((GetUnitUserData((DS))),function cOe) call SetUnitInvulnerable(DS,false) call TriggerRegisterUnitInRange(gS,DS,750,null) call TriggerAddCondition(gS,Filter(function cRe)) return true endfunction function wke takes nothing returns boolean local real x=GetRectCenterX(mQ) local real y=GetRectCenterY(mQ) local unit u call GroupEnumUnitsInRange(G,x,y,$6D6+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$6D6)then if IsUnitAliveAndEnemy(u,LQ)then call Ltv(LAv("Objects\\Spawnmodels\\Orc\\OrcLargeDeathExplode\\OrcLargeDeathExplode.mdl",GetUnitX(u),GetUnitY(u),2.5)) call UnitDamageTargetBY(((LQ)),((u)),(((($F4240)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) endif endif endloop call Bye() call fiv(true) call Lettheactorsplaylines(LQ,"Completely a piece of cake! Dare to challenge me! ..") call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl",LQ,"origin")) call SetUnitPosition(LQ,x,y) call SetUnitFacing(LQ,270) call SetUnitInvulnerable(LQ,true) call PauseUnit(LQ,true) call TimerStart((NewTimer(0)),3,false,function B9e) return true endfunction function wKe takes nothing returns boolean call frv(ES) return true endfunction function wle takes nothing returns boolean local integer Byv=Ahv local integer BYv=AHv local integer i=Byv local integer j local real x=GetRectCenterX(mQ) local real y=GetRectCenterY(mQ) local real dX=GetRectMaxX(mQ)-x local real dY=GetRectMaxY(mQ)-y local real a=GetRandomReal(0,Lx) local real sX local real sY local real sA local real BUe local real Bwe loop exitwhen i==0 set i=i-1 set j=BYv set sA=a+i*Lx/ Byv set sX=x+dX*Cos(sA) set sY=y+dY*Sin(sA) loop exitwhen j==0 set j=j-1 set BUe=GetRandomReal(-50.,50.) if BYv==1 then set Bwe=0 else set Bwe=(-1+2*(j/(BYv-1)))*300. endif call bLe(sX+BUe*Cos(sA)+Bwe*Sin(sA+bj_PI/ 2),sY+BUe*Sin(sA)+Bwe*Cos(sA+bj_PI/ 2),bj_RADTODEG*sA+$B4) endloop endloop return true endfunction function wLe takes nothing returns boolean if rS!=null then call ReleaseTimer(rS,"[TimerUtils]Error:158") set rS=null endif return true endfunction function wme takes nothing returns boolean if rS==null then set rS=(NewTimer(0)) endif set aS=0 call TimerStart(rS,oS,true,function BWe) return true endfunction function wMe takes nothing returns boolean call BSe(Asv) return true endfunction function wpe takes nothing returns boolean call UnitAddShieldTrig((GetUnitUserData(((Asv)))),function Bte) return true endfunction function wPe takes nothing returns boolean call UnitAddAbilityBY((Asv),'A0QH') return true endfunction function wqe takes nothing returns boolean call frv(ps) return true endfunction function wQe takes nothing returns boolean local integer NNv=AWv set AYv=(Je[(NNv)]) return true endfunction function wSe takes nothing returns boolean call UnitAddPAttackTrig((GetUnitUserData(((Asv)))),function Bie) return true endfunction function wte takes nothing returns boolean call Bee(Asv,ASv,Ahv) return true endfunction function wue takes nothing returns boolean call UnitAddShieldTrig((GetUnitUserData(((Asv)))),function b5e) return true endfunction function wUe takes nothing returns boolean local integer i=4 loop exitwhen i==0 set i=i-1 call bYe(vs[i]) call RemoveUnitBJ((Je[(vs[i])]),7) endloop return true endfunction function wwe takes nothing returns boolean local real cxv=Akv local integer i=4 set cxv=cxv-1. loop exitwhen i==0 set i=i-1 if i==0 then elseif i==1 then elseif i==2 then elseif i==3 then endif call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Avatar\\AvatarCaster.mdl",(Je[(vs[i])]),"origin")) call SetUnitVertexColor((Je[(vs[i])]),$CD,$87,0,$FF) call SetUnitTimeScale((Je[(vs[i])]),2.267/ cxv) call SetUnitAnimation((Je[(vs[i])]),"stand work gold") call QueueUnitAnimation((Je[(vs[i])]),"stand") endloop call TimerStart((NewTimer(0)),cxv,false,function b_e) return true endfunction function wWe takes nothing returns boolean local integer i=4 local real x=GetRectCenterX(mQ) local real y=GetRectCenterY(mQ) local real dX=.66*(GetRectMaxX(mQ)-x) local real dY=.66*(GetRectMaxY(mQ)-y) local real a set vs[0]=(GetUnitUserData((gg_unit_n039_0548))) set vs[1]=(GetUnitUserData((gg_unit_n039_0549))) set vs[2]=(GetUnitUserData((gg_unit_n039_0040))) set vs[3]=(GetUnitUserData((gg_unit_n039_0547))) loop exitwhen i==0 set i=i-1 set es[vs[i]]=ModifyUnitAdef((vs[i]),100) call SetUnitNocontrol((vs[i]),true) call UnitAddAbilityBY((Je[(vs[i])]),'A0QC') call SetUnitVertexColor((Je[(vs[i])]),55,55,55,$9B) call SetUnitTimeScale((Je[(vs[i])]),0) call m_v((Je[(vs[i])]),true) endloop return true endfunction function wye takes nothing returns boolean call frv(ZQ) return true endfunction function wYe takes nothing returns boolean local integer NNv=AWv set AYv=(Je[(NNv)]) return true endfunction function wze takes nothing returns boolean local integer NNv=UQ[(0)] loop exitwhen NNv==0 call bHe(NNv) set NNv=UQ[NNv] endloop return true endfunction function wZe takes nothing returns boolean call frv(kQ) return true endfunction function w_e takes nothing returns boolean call frv(HQ) return true endfunction function w0e takes nothing returns boolean call frv(gQ) return true endfunction function w1e takes nothing returns boolean local real x=Akv local real y=AKv local integer NNv=(GetUnitUserData((CreateUnit(P[$B],'h00W',x,y,GetRandomInt(0,359))))) set fQ[NNv]=0 call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",(Je[(NNv)]),"origin")) call TimerStart(NewTimer(NNv),.03125,true,function NTe) call Unit_App_Counter($EC,(NNv)) return true endfunction function w2e takes nothing returns boolean local integer NNv=AWv set AYv=(Je[(NNv)]) return true endfunction function w3e takes nothing returns boolean call NLe(Asv) return true endfunction function w4e takes nothing returns boolean call NGe(Asv) return true endfunction function w5e takes nothing returns boolean call frv(VQ) return true endfunction function w6e takes nothing returns boolean local integer NNv=Ahv call s__barrage_Filling((nQ),(NNv)) if not s__barrage_InOperation[nQ]then set s__barrage_InOperation[nQ]=true call fov(VQ) endif return true endfunction function w7e takes nothing returns boolean call frv(Vq) return true endfunction function w8e takes nothing returns boolean call frv(KP) return true endfunction function w9e takes nothing returns boolean if gP!=0 then call Ltv(gP) set gP=0 endif call Ltv(LAv("NatureExplosion.mdl",GetUnitX(FP),GetUnitY(FP),3)) call RemoveUnitBJ(FP,8) call ReleaseTimer(GP,"[TimerUtils]Error:159") set FP=null set GP=null return true endfunction function Wve takes nothing returns boolean set GP=(NewTimer(0)) call UnitAddAbility(FP,'A0BG') call UnitAddAbility(FP,'Amrf') call UnitRemoveAbility(FP,'Amrf') call SetUnitFlyHeight(FP,$C8,0) call SetUnitInvulnerable(FP,false) call UnitAddBeDamagerTrig((GetUnitUserData((FP))),function R9e) return true endfunction function Wre takes nothing returns boolean call Rce(Asv,ASv,Akv) return true endfunction function Wie takes nothing returns boolean local real x=Akv local real y=AKv local integer i=8 local group g=NewGroup() local unit u call GroupEnumUnitsInRange(G,x,y,$5DC+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$5DC)then if UnitAlive(u)and nC[(GetUnitUserData((u)))]then call GroupAddUnit(g,u) endif endif endloop loop set i=i-1 loop set u=FirstOfGroup(g) exitwhen u==null call GroupRemoveUnit(g,u) exitwhen true endloop if u==null then call ROe(x+GetRandomReal(-750,750),y+GetRandomReal(-750,750),16*i,ModuloInteger(i,4)==0) else call ROe(GetUnitX(u),GetUnitY(u),16*i,ModuloInteger(i,4)==0) endif exitwhen i==0 endloop call RecycleGroup(g) set g=null set u=null return true endfunction function Wae takes nothing returns boolean local integer s if GetRandomInt(1,100)<=5 then set s=(GetUnitUserData((CreateUnit(P[$B],'hpxe',$491C,$683D,0)))) call StartSound(Za) call PingMinimapEx(GetUnitX((Je[(s)])),GetUnitY((Je[(s)])),2,$FF,0,0,false) call TimerStart(NewTimer(s),.25,true,function Rxe) call Unit_App_Counter($ED,s) else call Wae_2() endif return true endfunction function Wne takes nothing returns boolean call Ree(Asv) return true endfunction function WVe takes nothing returns boolean call frv(yM) return true endfunction function WEe takes nothing returns boolean call O0e(Asv) return true endfunction function WXe takes nothing returns boolean local real x=Akv local real y=AKv call Auxiliary_PointOrder(('A0M6'),P[$B],1,$D0108,x,y) call Ltv(LAv("NatureExplosion.mdl",x,y,1.25)) return true endfunction function WOe takes nothing returns boolean local real x=Akv local real y=AKv local integer NNv=(D9v(sM)) set pM[NNv]=Lnv(x,y,.75*Lx) call LMv(pM[NNv],"Doodads\\Cinematic\\ShimmeringPortal\\ShimmeringPortal.mdl") set PM[NNv]=(s__Effect_build(AddSpecialEffectTarget(("Abilities\\Spells\\NightElf\\ThornsAura\\ThornsAura.mdl"),(II[pM[NNv]]),("origin")))) set QM[NNv]=$500 if GetWidgetLife(OL)<2./ 3.*GetUnitState(OL,UNIT_STATE_MAX_LIFE)then set qM[NNv]=256 else set qM[NNv]=320 endif call Lfv(pM[NNv],55,$FF,0,$FF) call PlaySoundAtPoint_BJ((Za),(($7F)*1.),((x)*1.),((y)*1.),0) call Ltv(Lfv(LAv("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl",x,y,4),55,$FF,125,$FF)) return true endfunction function WRe takes nothing returns boolean local integer NNv=AWv if mM[NNv]!=null then call ReleaseTimer(mM[NNv],"[TimerUtils]Error:160") call UnitRemoveAbilityandBuffBY((Je[(NNv)]),'A0M2','B04J') call DeUnitMdef((NNv),MM[NNv]) call ModifyUnitArmor((NNv),-500) call Unit_Cancel_Counter($EE,(NNv)) set mM[NNv]=null set AZv=true return true endif set AZv=false return true endfunction function WIe takes nothing returns boolean call frv(gM) return true endfunction function WAe takes nothing returns boolean local real x=Akv local real y=AKv local integer i=3 local boolean WNe=GetUnitAbilityLevel(JK,'B04A')==1 local integer NNv local unit u local real d local real a if GetRandomInt(1,2)==1 then set u=null elseif WNe then set u=PickRandomUnitInUnitRange(JK,$5DC) else set u=PickRandomUnitInUnitRange(JK,$3E8) endif loop set i=i-1 if u==null then if WNe then set d=GetRandomReal(125,$4B0) else set d=GetRandomReal(125,600) endif set a=GetRandomReal(0,Lx) set NNv=CreateBarrageTypeD(x,y,350,x+d*Cos(a),y+d*Sin(a),0) else set NNv=CreateBarrageTypeD(x,y,350,GetUnitX(u),GetUnitY(u),0) set u=null endif set s__barrage_radian_z[NNv]=700. set s__barrage_speed[NNv]=.0 set s__barrage_acceleration[NNv]=.03125*.03125*.5*s__locationez_range[s__barrage_p1[NNv]] call LMv(s__barrage_model[NNv],"Abilities\\Weapons\\RedDragonBreath\\RedDragonMissile.mdl") call SetUnitScale(II[(s__barrage_model[NNv])],((2.25)*1.),0,0) set fM[NNv]=LAv("Abilities\\Spells\\NightElf\\TrueshotAura\\TrueshotAura.mdl",s__locationez_X[s__barrage_p2[NNv]],s__locationez_Y[s__barrage_p2[NNv]],1.75) call Lfv(s__barrage_model[NNv],$FF,55,55,$FF) call Obe(NNv) exitwhen i==0 endloop return true endfunction function Wbe takes nothing returns boolean call frv(wm) return true endfunction function WBe takes nothing returns boolean call Xpe(Asv) return true endfunction function Wce takes nothing returns boolean call frv(Jm) return true endfunction function Wde takes nothing returns boolean local integer NNv=AWv set AYv=(Je[(NNv)]) return true endfunction function WDe takes nothing returns boolean call E8e(Asv) return true endfunction function WFe takes nothing returns boolean local integer i=1 loop set i=i-1 call RemoveDestructable(tL[i]) set tL[i]=null exitwhen i==0 endloop set lL=(GetUnitUserData((LL))) set mL=NewGroup() set SL=GetUnitState(LL,UNIT_STATE_MAX_LIFE) call KillUnit(gg_unit_h00N_0558) call SetUnitInvulnerable(LL,false) call PauseUnit(LL,false) call IssuePointOrderById(LL,$D000F,-$C80,-$3C00) call TimerStart(GetExpiredTimer(),.03125,true,function EWe) call Lqv(LAv("LightStrikeArray.mdx",-$C80,-$3C00,4),1.27) call Ltv(LAv("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",-$C80,-$3C00,5)) call UnitAddBeDamagerTrig((lL),function Eye) call Unit_App_Counter($EF,lL) return true endfunction function Wge takes nothing returns boolean call Efe(Asv) return true endfunction function WGe takes nothing returns boolean call EFe(Asv) return true endfunction function Wje takes nothing returns boolean call frv(sK) return true endfunction function Wme takes nothing returns boolean local integer NNv=AWv set AYv=(Je[(NNv)]) return true endfunction function yee takes nothing returns boolean local integer NNv=AWv set AYv=(Je[(NNv)]) return true endfunction function yne takes nothing returns boolean call ZKv(Asv) return true endfunction function yVe takes nothing returns boolean call frv(Wg) return true endfunction function yOe takes nothing returns boolean local integer NNv=AWv local integer v=Ahv local real a if UnitAlive((Je[(NNv)]))then if mg[NNv]<100 then set mg[NNv]=mg[NNv]+v if mg[NNv]>=100 then if z7v(NNv)then set lg[NNv]=GetRandomInt(1,$A) set Lg[NNv]=GetRandomInt(1,$A) set a=bj_DEGTORAD*GetUnitFacing((Je[(NNv)])) set kg[NNv]=Lnv(GetUnitX((Je[(NNv)]))-100*Cos(a),GetUnitY((Je[(NNv)]))-100*Sin(a),a) call LMv(kg[NNv],"GrimReaper.mdl") call SetUnitScale(II[(kg[NNv])],((1.5)*1.),0,0) call SetUnitFlyHeight(II[(kg[NNv])],((25)*1.),0) set mg[NNv]=100 set Mg[NNv]=$4B00 call z3v(NNv) call LFv(kg[NNv],"s_ShadowEruption_Rain.mdl") endif endif call MultiboardSetItemValueBY(TV,Kc[(NNv)]+1,4,I2S(mg[NNv])) endif endif return true endfunction function yRe takes integer data returns boolean local boolean yIe=(Is_pvp[(GetPlayerId(GetOwningPlayer(((Je[(data)])))))]) local real cyv if Jg and not yIe then if SummonedUnitSkills_A048_Timer[(data)]!=null or Item_I0E9_timer[data]!=null then call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\Resurrect\\ResurrectCaster.mdl",GetUnitX((Je[(data)])),GetUnitY((Je[(data)])))) call SleepReviveHero(data,100,100,2.5) endif if not IsSleepRevive[data]and GetHeroEquipSlot(data,5)=='I0FN' and Item_I0FN_cd[data]<(100000.-TimerGetRemaining(GameTimer))then set Ahv=data call GameExecuteFunc(Condition(Item_I0FN_Func)) endif if not IsSleepRevive[data]and zZv((data))then call SleepReviveHero(data,80,100,2) call z1v((data)) endif if not IsSleepRevive[data]and Item_cd_ryjz[data]<(100000.-TimerGetRemaining(GameTimer))then if UnitHasItemOfType((Je[(data)]),'I0DS')then set Item_cd_ryjz[data]=(100000.-TimerGetRemaining(GameTimer))+$B4 call SleepReviveHero(data,100,100,2) call SetItemDroppableTimedById(data,'I0DS',$B5) elseif UnitHasItemOfType((Je[(data)]),'I0EA')then set Item_cd_ryjz[data]=(100000.-TimerGetRemaining(GameTimer))+$B4 call SleepReviveHero(data,100,100,2) call SetItemDroppableTimedById(data,'I0EA',$B5) endif endif endif call RemoveHeroReviveBuff((data),0) if not IsSleepRevive[data]then if yIe then set cyv=$F else set cyv=5+GetHeroLevel((Je[(data)]))/ 5 if UnitHasItemOfType((Je[(data)]),'gcel')or UnitHasItemOfType((Je[(data)]),'crys')then set cyv=.6*cyv endif endif if cyv>40 then set cyv=40 endif call DisplayTextToPlayer((P[Kc[(data)]]),0,0,"|c00ffff00"+(Game_PlayerName[Kc[(data)]])+"Will be there "+I2S(R2I(cyv))+" Seconds before the resurrection..") call StartHeroReveveTimer(data,jV,JV,100,100,cyv) if Off_A098[data]then set Off_A098[data]=FALSE set Off_A098_id[data]=0 endif endif return true endfunction function yNe takes nothing returns boolean local player p=Awv set Ayv=GetPlayerId(p) return true endfunction function ybe takes nothing returns boolean call zhv(AWv,Akv,AKv) return true endfunction function yBe takes nothing returns boolean local real Cuv=Akv local real cyv=AKv local real x=Alv local real y=ALv local real r=Amv local unit u call GroupEnumUnitsInRange(G,x,y,r+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,r)then if IsUnitType(u,UNIT_TYPE_HERO)then call zhv((GetPlayerId((GetOwningPlayer(u)))),Cuv,cyv) endif endif endloop return true endfunction function yce takes nothing returns boolean local integer NNv=AWv local integer r=Ahv local integer g=AHv local integer b=Ajv local real cyv=Akv if Dg[NNv]==null then set Fg[NNv]=true set Dg[NNv]=NewTimer(NNv) endif if GetLocalPlayer()==P[NNv]then call SetTerrainFogEx(0,100,5000,$A,r/ 255.,g/ 255.,b/ 255.) endif call TimerStart(Dg[NNv],cyv,false,function zkv) return true endfunction function yme takes nothing returns boolean set AZv=Ymv(Asv,Ahv,AHv,Akv) return true endfunction function yMe takes nothing returns boolean call Passive_Skill_SpiriBreath_Addbuff(Asv,ATv) return true endfunction function yPe takes nothing returns boolean local integer NNv=AWv set AYv=Je[NNv] return true endfunction function yWe takes nothing returns boolean local integer NNv=AWv set AYv=Je[NNv] return true endfunction function y1e takes nothing returns boolean local integer NNv=AWv set A_v=P[Kc[NNv]] return true endfunction function y3e takes nothing returns boolean local integer NNv=AWv set Ayv=(NNv) return true endfunction function y4e takes nothing returns boolean set Ayv=(GetUnitUserData((Asv))) return true endfunction function y5e takes nothing returns boolean local integer NNv=AWv set AYv=Je[NNv] return true endfunction function y6e takes nothing returns boolean local integer NNv=AWv set Ayv=(GetUnitUserData((MV[GetPlayerId(GetOwningPlayer((Je[(NNv)])))]))) return true endfunction function y7e takes nothing returns boolean local integer NNv=AWv local real v=Akv set Unit_MATK[NNv]=Unit_MATK[NNv]+.01*v return true endfunction function Yhe takes nothing returns boolean local integer NNv=AWv set AYv=Je[NNv] return true endfunction function uRe takes nothing returns nothing set ADv=CreateTrigger() call TriggerAddCondition(ADv,Condition(function uIe)) set Afv=CreateTrigger() call TriggerAddCondition(Afv,Condition(function uAe)) set AFv=CreateTrigger() call TriggerAddCondition(AFv,Condition(function uNe)) set Agv=CreateTrigger() call TriggerAddCondition(Agv,Condition(function ube)) set AGv=CreateTrigger() call TriggerAddCondition(AGv,Condition(function uBe)) set RSv=CreateTrigger() call TriggerAddCondition(RSv,Condition(function U9e)) set Rtv=CreateTrigger() call TriggerAddCondition(Rtv,Condition(function wve)) set Rqv=CreateTrigger() call TriggerAddCondition(Rqv,Condition(function wee)) set RQv=CreateTrigger() call TriggerAddCondition(RQv,Condition(function wxe)) set Rsv=CreateTrigger() call TriggerAddCondition(Rsv,Condition(function woe)) set Rpv=CreateTrigger() call TriggerAddCondition(Rpv,Condition(function wre)) set RPv=CreateTrigger() call TriggerAddCondition(RPv,Condition(function wie)) set Rlv=CreateTrigger() call TriggerAddCondition(Rlv,Condition(function wVe)) set RLv=CreateTrigger() call TriggerAddCondition(RLv,Condition(function wEe)) set RJv=CreateTrigger() call TriggerAddCondition(RJv,Condition(function wXe)) set Rkv=CreateTrigger() call TriggerAddCondition(Rkv,Condition(function wOe)) set RKv=CreateTrigger() call TriggerAddCondition(RKv,Condition(function wRe)) set Rfv=CreateTrigger() call TriggerAddCondition(Rfv,Condition(function wCe)) set RDv=CreateTrigger() call TriggerAddCondition(RDv,Condition(function wde)) set Rdv=CreateTrigger() call TriggerAddCondition(Rdv,Condition(function wDe)) set RBv=CreateTrigger() call TriggerAddCondition(RBv,Condition(function wfe)) set Rcv=CreateTrigger() call TriggerAddCondition(Rcv,Condition(function wFe)) set RCv=CreateTrigger() call TriggerAddCondition(RCv,Condition(function wge)) set Rbv=CreateTrigger() call TriggerAddCondition(Rbv,Condition(function wGe)) set RAv=CreateTrigger() call TriggerAddCondition(RAv,Condition(function whe)) set RNv=CreateTrigger() call TriggerAddCondition(RNv,Condition(function wHe)) set RRv=CreateTrigger() call TriggerAddCondition(RRv,Condition(function wje)) set RIv=CreateTrigger() call TriggerAddCondition(RIv,Condition(function wJe)) set ROv=CreateTrigger() call TriggerAddCondition(ROv,Condition(function wke)) set RXv=CreateTrigger() call TriggerAddCondition(RXv,Condition(function wKe)) set Rnv=CreateTrigger() call TriggerAddCondition(Rnv,Condition(function wle)) set RVv=CreateTrigger() call TriggerAddCondition(RVv,Condition(function wLe)) set REv=CreateTrigger() call TriggerAddCondition(REv,Condition(function wme)) set Riv=CreateTrigger() call TriggerAddCondition(Riv,Condition(function wMe)) set Rav=CreateTrigger() call TriggerAddCondition(Rav,Condition(function wpe)) set Rrv=CreateTrigger() call TriggerAddCondition(Rrv,Condition(function wPe)) set Rov=CreateTrigger() call TriggerAddCondition(Rov,Condition(function wqe)) set Rev=CreateTrigger() call TriggerAddCondition(Rev,Condition(function wQe)) set Rvv=CreateTrigger() call TriggerAddCondition(Rvv,Condition(function wSe)) set O8v=CreateTrigger() call TriggerAddCondition(O8v,Condition(function wte)) set O7v=CreateTrigger() call TriggerAddCondition(O7v,Condition(function wue)) set O4v=CreateTrigger() call TriggerAddCondition(O4v,Condition(function wUe)) set O5v=CreateTrigger() call TriggerAddCondition(O5v,Condition(function wwe)) set O6v=CreateTrigger() call TriggerAddCondition(O6v,Condition(function wWe)) set O3v=CreateTrigger() call TriggerAddCondition(O3v,Condition(function wye)) set O1v=CreateTrigger() call TriggerAddCondition(O1v,Condition(function wYe)) set O2v=CreateTrigger() call TriggerAddCondition(O2v,Condition(function wze)) set O0v=CreateTrigger() call TriggerAddCondition(O0v,Condition(function wZe)) set O_v=CreateTrigger() call TriggerAddCondition(O_v,Condition(function w_e)) set OZv=CreateTrigger() call TriggerAddCondition(OZv,Condition(function w0e)) set Ozv=CreateTrigger() call TriggerAddCondition(Ozv,Condition(function w1e)) set OYv=CreateTrigger() call TriggerAddCondition(OYv,Condition(function w2e)) set Oyv=CreateTrigger() call TriggerAddCondition(Oyv,Condition(function w3e)) set OWv=CreateTrigger() call TriggerAddCondition(OWv,Condition(function w4e)) set OUv=CreateTrigger() call TriggerAddCondition(OUv,Condition(function w5e)) set Owv=CreateTrigger() call TriggerAddCondition(Owv,Condition(function w6e)) set Ouv=CreateTrigger() call TriggerAddCondition(Ouv,Condition(function w7e)) set OTv=CreateTrigger() call TriggerAddCondition(OTv,Condition(function w8e)) set OSv=CreateTrigger() call TriggerAddCondition(OSv,Condition(function w9e)) set Otv=CreateTrigger() call TriggerAddCondition(Otv,Condition(function Wve)) set OPv=CreateTrigger() call TriggerAddCondition(OPv,Condition(function Wre)) set Opv=CreateTrigger() call TriggerAddCondition(Opv,Condition(function Wie)) set OMv=CreateTrigger() call TriggerAddCondition(OMv,Condition(function Wae)) set Omv=CreateTrigger() call TriggerAddCondition(Omv,Condition(function Wne)) set Olv=CreateTrigger() call TriggerAddCondition(Olv,Condition(function WVe)) set OLv=CreateTrigger() call TriggerAddCondition(OLv,Condition(function WEe)) set OKv=CreateTrigger() call TriggerAddCondition(OKv,Condition(function WXe)) set Okv=CreateTrigger() call TriggerAddCondition(Okv,Condition(function WOe)) set OJv=CreateTrigger() call TriggerAddCondition(OJv,Condition(function WRe)) set OHv=CreateTrigger() call TriggerAddCondition(OHv,Condition(function WIe)) set Ojv=CreateTrigger() call TriggerAddCondition(Ojv,Condition(function WAe)) set Ohv=CreateTrigger() call TriggerAddCondition(Ohv,Condition(function Wbe)) set OGv=CreateTrigger() call TriggerAddCondition(OGv,Condition(function WBe)) set Ogv=CreateTrigger() call TriggerAddCondition(Ogv,Condition(function Wce)) set ODv=CreateTrigger() call TriggerAddCondition(ODv,Condition(function Wde)) set Ofv=CreateTrigger() call TriggerAddCondition(Ofv,Condition(function WDe)) set Odv=CreateTrigger() call TriggerAddCondition(Odv,Condition(function WFe)) set OBv=CreateTrigger() call TriggerAddCondition(OBv,Condition(function Wge)) set Ocv=CreateTrigger() call TriggerAddCondition(Ocv,Condition(function WGe)) set OAv=CreateTrigger() call TriggerAddCondition(OAv,Condition(function Wje)) set Onv=CreateTrigger() call TriggerAddCondition(Onv,Condition(function Wme)) set XQv=CreateTrigger() call TriggerAddCondition(XQv,Condition(function yee)) set XMv=CreateTrigger() call TriggerAddCondition(XMv,Condition(function yne)) set Xmv=CreateTrigger() call TriggerAddCondition(Xmv,Condition(function yVe)) set XKv=CreateTrigger() call TriggerAddCondition(XKv,Condition(function yOe)) set XGv=CreateTrigger() call TriggerAddCondition(XGv,Condition(function yNe)) set Xhv=CreateTrigger() call TriggerAddCondition(Xhv,Condition(function ybe)) set XHv=CreateTrigger() call TriggerAddCondition(XHv,Condition(function yBe)) set Xjv=CreateTrigger() call TriggerAddCondition(Xjv,Condition(function yce)) set XEv=CreateTrigger() call TriggerAddCondition(XEv,Condition(function yme)) set XVv=CreateTrigger() call TriggerAddCondition(XVv,Condition(function yMe)) set Xav=CreateTrigger() call TriggerAddCondition(Xav,Condition(function yPe)) set E6v=CreateTrigger() call TriggerAddCondition(E6v,Condition(function yWe)) set Eyv=CreateTrigger() call TriggerAddCondition(Eyv,Condition(function y1e)) set Ezv=CreateTrigger() call TriggerAddCondition(Ezv,Condition(function y3e)) set EZv=CreateTrigger() call TriggerAddCondition(EZv,Condition(function y4e)) set E_v=CreateTrigger() call TriggerAddCondition(E_v,Condition(function y5e)) set Edv=CreateTrigger() call TriggerAddCondition(Edv,Condition(function y6e)) set EDv=CreateTrigger() call TriggerAddCondition(EDv,Condition(function y7e)) set EBv=CreateTrigger() call TriggerAddCondition(EBv,Condition(function Yhe)) call ExecuteFunc("YEv") call ExecuteFunc("Ggv") call ExecuteFunc("mOv") call ExecuteFunc("mcv") call ExecuteFunc("mHv") call ExecuteFunc("PQv") call ExecuteFunc("Zcv") call ExecuteFunc("Zdv") call ExecuteFunc("ZYv") call ExecuteFunc("vee") call ExecuteFunc("ipe") call ExecuteFunc("Vpe") call ExecuteFunc("Vqe") call ExecuteFunc("Xie") call ExecuteFunc("XIe") call ExecuteFunc("XDe") call ExecuteFunc("XFe") call ExecuteFunc("XJe") call ExecuteFunc("Xte") call ExecuteFunc("Xue") call ExecuteFunc("XYe") call ExecuteFunc("X2e") call ExecuteFunc("ONe") call ExecuteFunc("OBe") call ExecuteFunc("OHe") call ExecuteFunc("OPe") call ExecuteFunc("Oze") call ExecuteFunc("O_e") call ExecuteFunc("Rve") call ExecuteFunc("RBe") call ExecuteFunc("IVe") call ExecuteFunc("IXe") call ExecuteFunc("ILe") call ExecuteFunc("IMe") call ExecuteFunc("Aoe") call ExecuteFunc("AZe") call ExecuteFunc("A6e") call ExecuteFunc("NRe") call ExecuteFunc("NCe") call ExecuteFunc("NDe") call ExecuteFunc("Nye") call ExecuteFunc("Nze") call ExecuteFunc("N6e") call ExecuteFunc("N8e") call ExecuteFunc("bXe") call ExecuteFunc("bRe") call ExecuteFunc("bQe") call ExecuteFunc("bSe") call ExecuteFunc("Bfe") call ExecuteFunc("Bge") call ExecuteFunc("B0e") call ExecuteFunc("B2e") call ExecuteFunc("cse") call ExecuteFunc("cte") call ExecuteFunc("c2e") call ExecuteFunc("c4e") call ExecuteFunc("c9e") call ExecuteFunc("CRe") call ExecuteFunc("CAe") call ExecuteFunc("C1e") call ExecuteFunc("C7e") call ExecuteFunc("dIe") call ExecuteFunc("dNe") call ExecuteFunc("dDe") call ExecuteFunc("dFe") call ExecuteFunc("Giv") call ExecuteFunc("Lrv") call ExecuteFunc("zPv") call ExecuteFunc("zYv") call ExecuteFunc("z9v") call ExecuteFunc("Zfv") call ExecuteFunc("ZLv") call ExecuteFunc("Zpv") call ExecuteFunc("ZUv") call ExecuteFunc("ZZv") call ExecuteFunc("Z7v") call ExecuteFunc("voe") call ExecuteFunc("vie") call ExecuteFunc("vwe") call ExecuteFunc("vWe") call ExecuteFunc("iqe") call ExecuteFunc("iZe") call ExecuteFunc("are") call ExecuteFunc("Vge") call ExecuteFunc("VHe") call ExecuteFunc("Vke") call ExecuteFunc("VWe") call ExecuteFunc("V9e") call ExecuteFunc("Ebe") call ExecuteFunc("EKe") call ExecuteFunc("Eqe") call ExecuteFunc("EYe") call ExecuteFunc("Xee") call ExecuteFunc("XEe") call ExecuteFunc("Xbe") call ExecuteFunc("XKe") call ExecuteFunc("XZe") call ExecuteFunc("X6e") call ExecuteFunc("Oee") call ExecuteFunc("Oie") call ExecuteFunc("OEe") call ExecuteFunc("OFe") call ExecuteFunc("OJe") call ExecuteFunc("OLe") call ExecuteFunc("OUe") call ExecuteFunc("O6e") call ExecuteFunc("RSe") call ExecuteFunc("RWe") call ExecuteFunc("R1e") call ExecuteFunc("Ive") call ExecuteFunc("Ibe") call ExecuteFunc("IFe") call ExecuteFunc("Ije") call ExecuteFunc("IPe") call ExecuteFunc("Iye") call ExecuteFunc("Aae") call ExecuteFunc("ANe") call ExecuteFunc("Ace") call ExecuteFunc("Aue") call ExecuteFunc("AWe") call ExecuteFunc("A1e") call ExecuteFunc("A9e") call ExecuteFunc("Nxe") call ExecuteFunc("Nie") call ExecuteFunc("NVe") call ExecuteFunc("NFe") call ExecuteFunc("NHe") call ExecuteFunc("Nle") call ExecuteFunc("NSe") call ExecuteFunc("N0e") call ExecuteFunc("bee") call ExecuteFunc("bie") call ExecuteFunc("bbe") call ExecuteFunc("bge") call ExecuteFunc("BJe") call ExecuteFunc("Bme") call ExecuteFunc("B5e") call ExecuteFunc("cEe") call ExecuteFunc("cIe") call ExecuteFunc("cwe") call ExecuteFunc("cze") call ExecuteFunc("Cne") call ExecuteFunc("CBe") call ExecuteFunc("dve") call ExecuteFunc("Boss_Init_Hpal") call ExecuteFunc("Boss_Init_RHZX") call ExecuteFunc("Boss_Init_HM") call ExecuteFunc("Boss_Init_n03G") call ExecuteFunc("Boss_Init_h01K") call ExecuteFunc("Boss_Init_ywzd") call ExecuteFunc("Init_ItemAbility") endfunction function Boss_End_Func01_Hpal takes nothing returns nothing call UnitRemoveAbility(GetEnumUnit(),'A0S6') endfunction function Boss_End_Hpal takes nothing returns nothing local integer i=8 call TriggerRemoveCondition(alloc__Kv[GetHandleId((EVENT_PLAYER_UNIT_DEATH))],(Boss_DEATH_TC_Hpal)) set Boss_DEATH_TC_Hpal=null call DestroyTimer(GetExpiredTimer()) call ForGroup(Boss_Buff_2_Group_Hpal,function Boss_End_Func01_Hpal) call GroupClear(Boss_Buff_2_Group_Hpal) call SetUnitTimeScale(Boss_Unit_Hpal,.5) call NewTextTagInTarget_A(Boss_Unit_Hpal,"|c00808080You did not mean to win, and today it is the first such|r",0,0,0) loop set i=i-1 if MV[i]!=null and Off_A098_id[(GetUnitUserData((MV[i])))]==1 then set Off_A098[(GetUnitUserData((MV[i])))]=FALSE set Off_A098_id[(GetUnitUserData((MV[i])))]=0 endif exitwhen i==0 endloop endfunction function Boss_UNIT_DEATH_Hpal takes nothing returns nothing local unit u=GetTriggerUnit() local integer unituserdata=(GetUnitUserData((u))) if IsUnitInGroup(u,Boss_Buff_1_Group_Hpal)then call UnitRemoveAbility(u,'A0S5') call GroupRemoveUnit(Boss_Buff_1_Group_Hpal,u) call ReleaseTimer(Boss_Buff_1_Timer_Hpal[unituserdata],"[TimerUtils]Error:161") set Boss_Buff_1_Timer_Hpal[unituserdata]=null call Unit_Cancel_Counter($F0,unituserdata) endif if IsUnitInGroup(u,Boss_Buff_2_Group_Hpal)then call UnitRemoveAbility(u,'A0S6') call GroupRemoveUnit(Boss_Buff_2_Group_Hpal,u) endif if u==Boss_Unit_Hpal then call TimerStart(Boss_Buff_1_Timer_Hpal[0],0,FALSE,function Boss_End_Hpal) endif set u=null endfunction function Boss_addbuff_2_Hpal takes unit u returns nothing if not IsUnitInGroup(u,Boss_Buff_2_Group_Hpal)then call GroupAddUnit(Boss_Buff_2_Group_Hpal,u) call UnitAddAbility(u,'A0S6') call UnitMakeAbilityPermanent(u,true,'A0S6') call NewTextTagInTarget_A(u,"MDEF: -10%",50,50,50) else if GetUnitAbilityLevel(u,'A0S6')<$A then call SetUnitAbilityLevel(u,'A0S6',GetUnitAbilityLevel(u,'A0S6')+1) call NewTextTagInTarget_A(u,"MDEF: -"+I2S(GetUnitAbilityLevel(u,'A0S6'))+"0%",50,50,50) endif endif endfunction function Boss_uloc_bufftm_Hpal takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:162") local unit u=(Je[(id)]) call UnitRemoveAbility(u,'A0S5') call GroupRemoveUnit(Boss_Buff_1_Group_Hpal,u) set Boss_Buff_1_Timer_Hpal[id]=null call Unit_Cancel_Counter($F1,id) if GetWidgetLife(u)>0 then call Ltv(LAv("uberdarkwave.mdl",GetUnitX(u),GetUnitY(u),.5)) call zhv(GetPlayerId(GetOwningPlayer(u)),100,1) if not IsUnitType(u,UNIT_TYPE_MAGIC_IMMUNE)then call UnitDamageTargetBY((Boss_Unit_Hpal),(u),((GetUnitState(u,UNIT_STATE_MAX_LIFE)*.5)*1.),false,(false),false,false,(ConvertAttackType(0)),(ConvertDamageType($E)),((0)*1.),("")) endif endif set u=null endfunction function Boss_uloc_atk_Hpal takes nothing returns nothing local integer data=(pF_v) if not IsUnitInGroup((MF),Boss_Buff_1_Group_Hpal)then call NewTextTagInTarget_A((MF),"You're done(36813)!",$96,50,$CC) call GroupAddUnit(Boss_Buff_1_Group_Hpal,(MF)) call UnitAddAbility((MF),'A0S5') call UnitMakeAbilityPermanent((MF),true,'A0S5') if Boss_Buff_1_Timer_Hpal[(pF)]==null then set Boss_Buff_1_Timer_Hpal[(pF)]=NewTimer((pF)) call TimerStart(Boss_Buff_1_Timer_Hpal[(pF)],$A,FALSE,function Boss_uloc_bufftm_Hpal) call Unit_App_Counter($F2,(pF)) endif endif set Boss_Spell_X[data]=GetUnitX((mF)) set Boss_Spell_Y[data]=GetUnitY((mF)) set Boss_Spell_data1[data]=2 set Boss_Spell_Z[data]=1. endfunction function Boss_uloc_loop2_Hpal takes nothing returns nothing local unit u=GetEnumUnit() local integer data=(GetUnitUserData((u))) local unit u2 local integer random if Boss_Spell_data1[data]==0 then if IsUnitInRangeXY(u,Boss_Spell_X[data],Boss_Spell_Y[data],50)then call GroupEnumUnitsInRange(G,GetUnitX(u),GetUnitY(u),800,null) set random=0 loop set u2=FirstOfGroup(G) exitwhen u2==null call GroupRemoveUnit(G,u2) if GetUnitAbilityLevel(u2,'Avul')==0 and IsUnitInGroup(u,Boss_Buff_1_Group_Hpal)==false then if IsUnitAliveAndEnemy(u2,Boss_Unit_Hpal)then if IsUnitType(u2,UNIT_TYPE_HERO)then set random=random+2 if GetRandomInt(1,random)<=2 then set Boss_Spell_unit1[data]=u2 endif else set random=random+1 if GetRandomInt(1,random)<=1 then set Boss_Spell_unit1[data]=u2 endif endif endif endif endloop if Boss_Spell_unit1[data]!=null then set Boss_Spell_data1[data]=1 call IssueTargetOrderById(u,$D000F,Boss_Spell_unit1[data]) else set Boss_Spell_data2[data]=0 if GetRandomInt(1,5)==1 then set Boss_Spell_X[data]=GetUnitX(Boss_Unit_Hpal) set Boss_Spell_Y[data]=GetUnitY(Boss_Unit_Hpal) else set Boss_Spell_X[data]=GetUnitX(Boss_Unit_Hpal)+GetRandomReal(-800,800) set Boss_Spell_Y[data]=GetUnitY(Boss_Unit_Hpal)+GetRandomReal(-800,800) endif endif else set Boss_Spell_data2[data]=Boss_Spell_data2[data]-1 if Boss_Spell_data2[data]<1 then if IsUnitInRangeXY(Boss_Unit_Hpal,Boss_Spell_X[data],Boss_Spell_Y[data],$BB8)==false or IsPointInWorldBounds(Boss_Spell_X[data],Boss_Spell_Y[data])==false then if GetRandomInt(1,5)==1 then set Boss_Spell_X[data]=GetUnitX(Boss_Unit_Hpal) set Boss_Spell_Y[data]=GetUnitY(Boss_Unit_Hpal) else set Boss_Spell_X[data]=GetUnitX(Boss_Unit_Hpal)+GetRandomReal(-800,800) set Boss_Spell_Y[data]=GetUnitY(Boss_Unit_Hpal)+GetRandomReal(-800,800) endif endif if IsUnitInRange(Boss_Unit_Hpal,u,5000)==false then call SetUnitX(u,GetUnitX(Boss_Unit_Hpal)) call SetUnitY(u,GetUnitY(Boss_Unit_Hpal)) endif if IssuePointOrderById(u,$D0012,Boss_Spell_X[data],Boss_Spell_Y[data])then set Boss_Spell_data2[data]=$A endif endif endif elseif Boss_Spell_data1[data]==1 then if UnitAlive(Boss_Spell_unit1[data])and IsUnitInRange(u,Boss_Spell_unit1[data],$BB8)and GetUnitAbilityLevel(Boss_Spell_unit1[data],'Avul')==0 and IsUnitInGroup(u,Boss_Buff_1_Group_Hpal)==false and IssueTargetOrderById(u,$D000F,Boss_Spell_unit1[data])then else set Boss_Spell_unit1[data]=null if IsUnitInRange(u,Boss_Unit_Hpal,$3E8)==false then set Boss_Spell_X[data]=GetUnitX(Boss_Unit_Hpal)+GetRandomReal(-800,800) set Boss_Spell_Y[data]=GetUnitY(Boss_Unit_Hpal)+GetRandomReal(-800,800) set Boss_Spell_data1[data]=0 set Boss_Spell_data2[data]=0 else set Boss_Spell_X[data]=GetUnitX(Boss_Unit_Hpal) set Boss_Spell_Y[data]=GetUnitY(Boss_Unit_Hpal) set Boss_Spell_data1[data]=2 set Boss_Spell_data2[data]=0 endif endif elseif Boss_Spell_data1[data]==2 then set Boss_Spell_Z[data]=Boss_Spell_Z[data]-.05 if Boss_Spell_Z[data]<=0 then set Boss_Spell_data1[data]=0 set Boss_Spell_data2[data]=0 else if IsUnitInRangeXY(u,Boss_Spell_X[data],Boss_Spell_Y[data],50)then if GetRandomInt(1,3)==1 then set Boss_Spell_X[data]=GetUnitX(Boss_Unit_Hpal) set Boss_Spell_Y[data]=GetUnitY(Boss_Unit_Hpal) else set Boss_Spell_X[data]=GetUnitX(Boss_Unit_Hpal)+GetRandomReal(-800,800) set Boss_Spell_Y[data]=GetUnitY(Boss_Unit_Hpal)+GetRandomReal(-800,800) endif if IssuePointOrderById(u,$D0012,Boss_Spell_X[data],Boss_Spell_Y[data])then set Boss_Spell_data2[data]=$A endif else set Boss_Spell_data2[data]=Boss_Spell_data2[data]-1 if Boss_Spell_data2[data]<1 then if IsUnitInRangeXY(Boss_Unit_Hpal,Boss_Spell_X[data],Boss_Spell_Y[data],$BB8)==false and IsPointInWorldBounds(Boss_Spell_X[data],Boss_Spell_Y[data])==false then if IsUnitInRange(Boss_Unit_Hpal,u,5000)==false then call SetUnitX(u,GetUnitX(Boss_Unit_Hpal)) call SetUnitY(u,GetUnitY(Boss_Unit_Hpal)) endif if GetRandomInt(1,5)==1 then set Boss_Spell_X[data]=GetUnitX(Boss_Unit_Hpal) set Boss_Spell_Y[data]=GetUnitY(Boss_Unit_Hpal) else set Boss_Spell_X[data]=GetUnitX(Boss_Unit_Hpal)+GetRandomReal(-800,800) set Boss_Spell_Y[data]=GetUnitY(Boss_Unit_Hpal)+GetRandomReal(-800,800) endif endif if IssuePointOrderById(u,$D0012,Boss_Spell_X[data],Boss_Spell_Y[data])then set Boss_Spell_data2[data]=$A endif endif endif endif endif set u=null endfunction function Boss_uloc_loop_Hpal takes nothing returns nothing local unit u if UnitAlive(Boss_Unit_Hpal)then call ForGroup(Boss_Buff_3_Group_Hpal,function Boss_uloc_loop2_Hpal) else loop set u=FirstOfGroup(Boss_Buff_3_Group_Hpal) exitwhen u==null call GroupRemoveUnit(Boss_Buff_3_Group_Hpal,u) call Boss_Spell_deallocate((GetUnitUserData((u)))) call KillUnit(u) endloop call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:163") endif endfunction function Boss_uloc_create_Hpal takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer()))))+1 local real x=GetUnitX(Boss_Unit_Hpal) local real y=GetUnitY(Boss_Unit_Hpal) local real f=GetRandomReal(0,6.28) local real r local unit u local integer data if UnitAlive(Boss_Unit_Hpal)then if i==1 then set Boss_DEATH_trig_Hpal=CreateTrigger() call TriggerAddCondition(Boss_DEATH_trig_Hpal,Condition(function Boss_uloc_atk_Hpal)) set Boss_Buff_3_Group_Hpal=CreateGroup() call TimerStart(NewTimer(0),.05,true,function Boss_uloc_loop_Hpal) endif set data=Boss_Spell_allocate() set CR=FALSE set u=CreateUnit(Player($F),'uloc',x,y,f*bj_RADTODEG) call SetUnitX(u,x) call SetUnitY(u,y) call SetUnitUserData(u,data) call GroupAddUnit(Boss_Buff_3_Group_Hpal,u) set CR=true set Boss_Spell_data1[data]=2 set Boss_Spell_data2[data]=0 set Boss_Spell_unit1[data]=null set Boss_Spell_unit2[data]=null set Boss_x[0]=Cos(f)*$3E8 set Boss_y[0]=Sin(f)*$3E8 set Boss_z[0]=0 set Boss_x[1]=1 set Boss_y[1]=0 set r=1 loop set r=(Boss_x[1]+Boss_y[1])*.5 set Boss_Spell_X[data]=x+Boss_x[0]*r set Boss_Spell_Y[data]=y+Boss_y[0]*r if IsPointInWorldBounds(Boss_Spell_X[data],Boss_Spell_Y[data])then set Boss_y[1]=r else set Boss_x[1]=r endif set Boss_z[0]=Boss_z[0]+1 exitwhen Boss_z[0]>$A endloop set Boss_Spell_X[data]=Boss_Spell_X[data]-Boss_x[0]/ $3E8 set Boss_Spell_Y[data]=Boss_Spell_Y[data]-Boss_y[0]/ $3E8 set Boss_Spell_Z[data]=r/ 400. if i>=30 then call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:164") else call alloc__hPv(GetHandleId((GetExpiredTimer())),(i)) endif call IssuePointOrderById(u,$D0012,Boss_Spell_X[data],Boss_Spell_Y[data]) set u=null else call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:165") endif endfunction function Boss_Ability_005_Func002_Hpal takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer uid local integer index=Boss_Spell_data2[i]-1 local group g local unit u local unit u2 local string s if index>=0 then set Boss_Spell_X[i]=GetUnitX(Boss_Spell_unit1[i]) set Boss_Spell_Y[i]=GetUnitY(Boss_Spell_unit1[i]) if index==0 then set Boss_z[0]=50 else set Boss_Spell_Z[i]=Boss_Spell_Z[i]+.12 set Boss_z[0]=index*25 endif endif set Boss_Spell_data2[i]=index set g=Boss_Spell_group1[i] set Boss_Spell_group1[i]=Boss_Spell_group2[i] set Boss_Spell_group2[i]=g loop set u=FirstOfGroup(g) exitwhen u==null call GroupRemoveUnit(g,u) call GroupAddUnit(Boss_Spell_group1[i],u) set uid=(GetUnitUserData((u))) if index>=0 then set Boss_z[1]=Boss_Spell_Z[uid]+Boss_Spell_Z[i] set Boss_x[1]=Boss_Spell_X[i]+Cos(Boss_z[1])*Boss_z[0] set Boss_y[1]=Boss_Spell_Y[i]+Sin(Boss_z[1])*Boss_z[0] call SetUnitPosition(u,Boss_x[1],Boss_y[1]) else set Boss_x[1]=GetUnitX(u)+Boss_Spell_X[uid] set Boss_y[1]=GetUnitY(u)+Boss_Spell_Y[uid] set Boss_Spell_Z[uid]=Boss_Spell_Z[uid]-1 if Boss_Spell_Z[uid]>0 and IsPointInWorldBounds(Boss_x[1],Boss_y[1])then call SetUnitX(u,Boss_x[1]) call SetUnitY(u,Boss_y[1]) if Boss_Spell_data1[i]==5 then if(index-index/ 4*4)==-2 then call DestroyEffect(AddSpecialEffect("doomblack.mdx",Boss_x[1],Boss_y[1])) call GroupEnumUnitsInRange(G,Boss_x[1],Boss_y[1],325,null) loop set u2=FirstOfGroup(G) exitwhen u2==null call GroupRemoveUnit(G,u2) if IsUnitInRangeXY(u2,Boss_x[1],Boss_y[1],$FA)and GetUnitAbilityLevel(u2,'Avul')==0 then if IsUnitAliveAndEnemy(u2,Boss_Spell_unit1[i])and not pB[(GetUnitUserData((u2)))]then call DestroyEffect(AddSpecialEffectTarget("desecrategreen.mdl",u2,"origin")) call KillUnitBJ(u2) endif endif endloop endif else call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\IllidanMissile\\IllidanMissile.mdl",Boss_x[1],Boss_y[1])) call GroupEnumUnitsInRange(G,Boss_x[1],Boss_y[1],$C8,null) loop set u2=FirstOfGroup(G) exitwhen u2==null call GroupRemoveUnit(G,u2) if IsUnitInRangeXY(u2,Boss_x[1],Boss_y[1],125)and GetUnitAbilityLevel(u2,'Avul')==0 then if IsUnitAliveAndEnemy(u2,Boss_Spell_unit1[i])then call GroupRemoveUnit(Boss_Spell_group1[i],u) call DestroyEffect(Boss_Spell_eff[uid]) call DestroyEffect(AddSpecialEffect("desecrategreen.mdl",Boss_x[1],Boss_y[1])) call KillUnit(u) call GroupClear(G) if not IsUnitType(u2,UNIT_TYPE_MAGIC_IMMUNE)then call UnitDamageTargetBY((Boss_Spell_unit1[i]),(u2),(($2710)*1.),false,(false),false,false,(ConvertAttackType(0)),(ConvertDamageType($E)),((0)*1.),("")) endif set u2=null exitwhen true endif endif endloop endif else if Boss_Spell_data1[i]==5 then call Ltv(LAv("desecrate.mdl",Boss_x[1],Boss_x[1],1.5)) call GroupEnumUnitsInRange(G,Boss_x[1],Boss_y[1],325,null) loop set u2=FirstOfGroup(G) exitwhen u2==null call GroupRemoveUnit(G,u2) if IsUnitInRangeXY(u2,Boss_x[1],Boss_y[1],$FA)and GetUnitAbilityLevel(u2,'Avul')==0 then if IsUnitAliveAndEnemy(u2,Boss_Spell_unit1[i])and not pB[(GetUnitUserData((u2)))]then call DestroyEffect(AddSpecialEffectTarget("desecrategreen.mdl",u2,"origin")) call KillUnitBJ(u2) endif endif endloop endif call GroupRemoveUnit(Boss_Spell_group1[i],u) call DestroyEffect(Boss_Spell_eff[uid]) call KillUnit(u) endif endif endloop if index==0 then set g=Boss_Spell_group1[i] loop set u=FirstOfGroup(g) exitwhen u==null call GroupRemoveUnit(g,u) set uid=(GetUnitUserData((u))) call SetUnitUserData(u,0) call DestroyEffect(Boss_Spell_eff[uid]) call Boss_Spell_deallocate(uid) call RemoveUnitBJ(u,9) endloop if UnitAlive(Boss_Spell_unit1[i])then set Boss_z[0]=0 loop set Boss_x[0]=Cos(Boss_z[0]*bj_DEGTORAD)*50 set Boss_y[0]=Sin(Boss_z[0]*bj_DEGTORAD)*50 set Boss_x[1]=Boss_Spell_X[i]+Boss_x[0] set Boss_y[1]=Boss_Spell_Y[i]+Boss_y[0] set uid=Boss_Spell_allocate() set CR=FALSE set u=CreateUnit(Player($F),'e001',Boss_x[1],Boss_y[1],Boss_z[0]) call UnitAddAbility(u,'Amrf') call UnitRemoveAbility(u,'Amrf') if Boss_Spell_data1[i]==5 then set Boss_Spell_X[uid]=Boss_x[0] set Boss_Spell_Y[uid]=Boss_y[0] set Boss_Spell_Z[uid]=1000./ 50. set Boss_Spell_eff[uid]=AddSpecialEffectTarget("white claw.mdx",u,"origin") call SetUnitScale(u,1.5,0,0) else set Boss_Spell_X[uid]=Boss_x[0]*.6 set Boss_Spell_Y[uid]=Boss_y[0]*.6 set Boss_Spell_Z[uid]=1000./ 30. set Boss_Spell_eff[uid]=AddSpecialEffectTarget("Abilities\\Weapons\\GreenDragonMissile\\GreenDragonMissile.mdl",u,"origin") call SetUnitScale(u,1.2,0,0) call SetUnitFlyHeight(u,120,0) endif call SetUnitUserData(u,uid) call GroupAddUnit(Boss_Spell_group1[i],u) set u=null set CR=true set Boss_z[0]=Boss_z[0]+36 exitwhen Boss_z[0]>=360 endloop call NewTextTagInTarget_A(Boss_Spell_unit1[i],"|c00808080"+I2S(Boss_Spell_data1[i]*20)+"%|r",0,0,0) if Boss_Spell_data1[i]==5 then call SetUnitAnimation(Boss_Spell_unit1[i],"attack alternate") call QueueUnitAnimation(Boss_Spell_unit1[i],"stand alternate") call NewTextTagInTarget_B(Boss_Unit_Hpal,"|c00008000I will destroy your soul! And you will always fall into hell!!|r",18,0,0,0) call Ltv(LAv("desecrate.mdl",Boss_Spell_X[i],Boss_Spell_Y[i],1.5)) set index=0 loop call zhv(index,$96,1) set index=index+1 exitwhen index>7 endloop else call Ltv(LAv("desecrategreen.mdl",Boss_Spell_X[i],Boss_Spell_Y[i],1.5)) endif else call DestroyGroup(Boss_Spell_group1[i]) call DestroyGroup(Boss_Spell_group2[i]) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:166") endif elseif FirstOfGroup(Boss_Spell_group1[i])==null then call DestroyGroup(Boss_Spell_group1[i]) call DestroyGroup(Boss_Spell_group2[i]) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:167") endif endfunction function Boss_Ability_005_Func_Hpal takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer index local integer uid local unit u local real x local real y local real z if UnitAlive(Boss_Spell_unit1[i])then set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 if Boss_Spell_data1[i]<=5 then set index=Boss_Spell_allocate() set Boss_Spell_data1[index]=Boss_Spell_data1[i] set Boss_Spell_unit1[index]=Boss_Spell_unit1[i] set Boss_Spell_group1[index]=CreateGroup() set Boss_Spell_group2[index]=CreateGroup() set Boss_Spell_data2[index]=40 set Boss_x[0]=GetUnitX(Boss_Spell_unit1[i]) set Boss_y[0]=GetUnitY(Boss_Spell_unit1[i]) set z=0 loop set x=Boss_x[0]+$3E8*Cos(z*.62832) set y=Boss_y[0]+$3E8*Sin(z*.62832) set uid=Boss_Spell_allocate() set Boss_Spell_Z[uid]=z*.62832 set CR=FALSE set u=CreateUnit(Player($F),'e001',x,y,z*36) call SetUnitFlyHeight(u,$C8,0) set Boss_Spell_eff[uid]=AddSpecialEffectTarget("Abilities\\Weapons\\IllidanMissile\\IllidanMissile.mdl",u,"origin") call SetUnitScale(u,1.5,0,0) call SetUnitUserData(u,uid) call GroupAddUnit(Boss_Spell_group1[index],u) set u=null set CR=true set z=z+1 exitwhen z>=$A endloop call TimerStart(NewTimer(index),.03,true,function Boss_Ability_005_Func002_Hpal) call SetUnitAnimation(Boss_Spell_unit1[i],"stand ready alternate") call TimerStart(GetExpiredTimer(),.75,false,function Boss_Ability_005_Func_Hpal) else call SetUnitTimeScale(Boss_Spell_unit1[i],1) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:168") endif else call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:169") endif endfunction function Boss_Ability_005_Hpal takes nothing returns nothing local integer EVENTID=GetHandleId(GetTriggerEventId()) local integer i if EVENTID==272 then call NewTextTagInTarget_B(Boss_Unit_Hpal,"|c00008000Abandon it stupid guy! You will die here!|r",18,0,0,0) else set i=Boss_Spell_allocate() set Boss_Spell_data1[i]=0 set Boss_Spell_unit1[i]=GetTriggerUnit() call TimerStart(NewTimer(i),.0,false,function Boss_Ability_005_Func_Hpal) call SetUnitTimeScale(Boss_Spell_unit1[i],1.5) endif endfunction function Boss_Ability_002_func03_Hpal takes nothing returns nothing local unit u=GetEnumUnit() local integer i=Boss_Spell_data1[0] local integer index=(GetUnitUserData((u))) set Boss_Spell_Z[index]=Boss_Spell_Z[index]+.03 set Boss_z[3]=Boss_Spell_Z[index]/ Boss_Spell_Y[index] if Boss_z[3]>1 then set Boss_z[3]=1 endif set Boss_z[4]=Sin(Boss_z[3]*bj_PI)*Boss_z[2]*.25 set Boss_x[5]=Boss_Spell_X[i]+Boss_x[1]*Boss_z[3] set Boss_y[5]=Boss_Spell_Y[i]+Boss_y[1]*Boss_z[3] set Boss_z[5]=Boss_Spell_Z[i]+Boss_z[1]*Boss_z[3] set Boss_x[6]=Boss_z[4]*Cos(Boss_Spell_X[index]) set Boss_y[6]=Boss_z[4]*Sin(Boss_Spell_X[index]) set Boss_x[7]=Boss_x[6]*Boss_x[4] set Boss_y[7]=Boss_y[6] set Boss_z[7]=Boss_x[6]*Boss_y[4] set Boss_x[6]=Boss_x[7]*Boss_x[3]-Boss_y[7]*Boss_y[3] set Boss_y[6]=Boss_x[7]*Boss_y[3]+Boss_y[7]*Boss_x[3] set Boss_z[6]=Boss_z[7] set Boss_x[7]=Boss_x[5]+Boss_x[6] set Boss_y[7]=Boss_y[5]+Boss_y[6] call MoveLocation(Boss_Point,Boss_x[7],Boss_y[7]) set Boss_z[7]=Boss_z[5]+Boss_z[6]-GetLocationZ(Boss_Point) call SetUnitX(u,Boss_x[7]) call SetUnitY(u,Boss_y[7]) call SetUnitFlyHeight(u,Boss_z[7],.0) if(Boss_z[7]<20.)then call SetUnitVertexColor(u,$FF,$FF,$FF,0) else call SetUnitVertexColor(u,$FF,$FF,$FF,$FF) endif if(Boss_z[3]>=1.)then call Boss_Spell_deallocate(index) call GroupRemoveUnit(Boss_Spell_group1[i],u) call KillUnit(u) endif set u=null endfunction function Boss_Ability_002_func02_Hpal takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer index local unit u set Boss_x[0]=GetUnitX(Boss_Spell_unit2[i]) set Boss_y[0]=GetUnitY(Boss_Spell_unit2[i]) call MoveLocation(Boss_Point,Boss_x[0],Boss_y[0]) set Boss_z[0]=GetLocationZ(Boss_Point)+50 set Boss_x[1]=Boss_x[0]-Boss_Spell_X[i] set Boss_y[1]=Boss_y[0]-Boss_Spell_Y[i] set Boss_z[1]=Boss_z[0]-Boss_Spell_Z[i] set Boss_x[2]=Atan2(Boss_y[1],Boss_x[1]) set Boss_y[2]=Atan2(Boss_z[1],SquareRoot(Boss_x[1]*Boss_x[1]+Boss_y[1]*Boss_y[1]))-bj_PI/ 2. set Boss_z[2]=SquareRoot(Boss_x[1]*Boss_x[1]+Boss_y[1]*Boss_y[1]+Boss_z[1]*Boss_z[1]) if Boss_z[2]<$BB8 then set index=Boss_Spell_data1[0] set Boss_Spell_data1[0]=i set Boss_x[3]=Cos(Boss_x[2]) set Boss_y[3]=Sin(Boss_x[2]) set Boss_x[4]=Cos(Boss_y[2]) set Boss_y[4]=Sin(Boss_y[2]) if Boss_z[2]<750 then set Boss_z[2]=$5DC endif call ForGroup(Boss_Spell_group1[i],function Boss_Ability_002_func03_Hpal) set Boss_Spell_data1[0]=index if FirstOfGroup(Boss_Spell_group1[i])==null then set Boss_Spell_data1[i]=1 call Ltv(LAv("desecrategreen.mdl",Boss_x[0],Boss_y[0],1.5)) call GroupEnumUnitsInRange(G,Boss_x[0],Boss_y[0],375,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,Boss_x[0],Boss_y[0],300)and GetUnitAbilityLevel(u,'Avul')==0 and IsUnitType(u,UNIT_TYPE_MAGIC_IMMUNE)==false then if IsUnitAliveAndEnemy(u,Boss_Unit_Hpal)then call UnitDamageTargetBY((Boss_Spell_unit1[i]),(u),((100000.)*1.),false,(true),false,false,(ConvertAttackType(0)),(ConvertDamageType($E)),(($F)*1.),("|c00000000")) endif endif endloop endif else loop set u=FirstOfGroup(Boss_Spell_group1[i]) exitwhen u==null call GroupRemoveUnit(Boss_Spell_group1[i],u) set index=(GetUnitUserData((u))) call Boss_Spell_deallocate(index) call RemoveUnitBJ(u,$A) endloop set Boss_Spell_data1[i]=1 endif if Boss_Spell_data1[i]==1 then call DestroyGroup(Boss_Spell_group1[i]) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:170") endif endfunction function Boss_Ability_002_func01_Hpal takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer index local unit u if Boss_Index_Hpal<2 or Boss_Index_Hpal>6 then call SetUnitFacingTimed(Boss_Spell_unit1[i],bj_RADTODEG*Atan2(GetUnitY(Boss_Spell_unit2[i])-GetUnitY(Boss_Spell_unit1[i]),GetUnitX(Boss_Spell_unit2[i])-GetUnitX(Boss_Spell_unit1[i])),0) if Boss_Spell_data1[i]==-2 then if GetUnitTypeId(Boss_Spell_unit1[i])=='hpa3' then call SetUnitAnimation(Boss_Spell_unit1[i],"death alternate") call SetUnitTimeScale(Boss_Spell_unit1[i],.7) else call SetUnitAnimation(Boss_Spell_unit1[i],"morph") call SetUnitTimeScale(Boss_Spell_unit1[i],2) endif call PauseUnit(Boss_Spell_unit1[i],true) call SetUnitFlyHeight(Boss_Spell_unit1[i],600.,2000.) call TimerStart(GetExpiredTimer(),.075,true,function Boss_Ability_002_func01_Hpal) set Boss_Spell_data1[i]=-1 set Boss_Spell_data2[i]=0 elseif Boss_Spell_data1[i]==-1 then set Boss_Spell_data2[i]=Boss_Spell_data2[i]+1 if Boss_Spell_data2[i]>=$A then call SetUnitTimeScale(Boss_Spell_unit1[i],1) call SetUnitAnimation(Boss_Spell_unit1[i],"Attack alternate") if GetUnitTypeId(Boss_Spell_unit1[i])=='hpa3' then call QueueUnitAnimation(Boss_Spell_unit1[i],"stand alternate") else call QueueUnitAnimation(Boss_Spell_unit1[i],"stand") endif set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=0 call TimerStart(GetExpiredTimer(),.05,true,function Boss_Ability_002_func01_Hpal) endif elseif Boss_Spell_data1[i]==0 then set Boss_Spell_data2[i]=Boss_Spell_data2[i]+1 if Boss_Spell_data2[i]>=$A then set Boss_Spell_group1[i]=CreateGroup() set Boss_Spell_X[i]=GetUnitX(Boss_Spell_unit1[i]) set Boss_Spell_Y[i]=GetUnitY(Boss_Spell_unit1[i]) call MoveLocation(Boss_Point,Boss_Spell_X[i],Boss_Spell_Y[i]) set Boss_Spell_Z[i]=GetUnitFlyHeight(Boss_Spell_unit1[i])+GetLocationZ(Boss_Point)+$C8 set Boss_x[0]=GetUnitX(Boss_Spell_unit2[i])-Boss_Spell_X[i] set Boss_y[0]=GetUnitY(Boss_Spell_unit2[i])-Boss_Spell_Y[i] set Boss_z[1]=57.29578*Atan2(Boss_y[0],Boss_x[0]) set CR=false set u=CreateUnit(Player($F),'e001',GetUnitX(Boss_Spell_unit2[i]),GetUnitY(Boss_Spell_unit2[i]),Boss_z[1]) set Boss_Spell_unit2[i]=u set CR=true set index=0 set bj_forLoopAIndex=1 set bj_forLoopAIndexEnd=$C loop exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd set index=Boss_Spell_allocate() set Boss_Spell_X[index]=3.14159/ 6.*I2R(bj_forLoopAIndex) set Boss_Spell_Z[index]=0 set CR=false set u=CreateUnit(Player($F),'epal',Boss_Spell_X[i],Boss_Spell_Y[i],Boss_z[1]) set CR=true if ModuloInteger(bj_forLoopAIndex,2)==1 then set Boss_Spell_Y[index]=GetRandomReal(.55,.7) else set Boss_Spell_Y[index]=GetRandomReal(.85,1.) endif call GroupAddUnit(Boss_Spell_group1[i],u) call SetUnitUserData(u,index) set bj_forLoopAIndex=bj_forLoopAIndex+1 endloop call TimerStart(GetExpiredTimer(),.03,true,function Boss_Ability_002_func02_Hpal) call SetUnitFlyHeight(Boss_Spell_unit1[i],.0,1000.) call PauseUnit(Boss_Spell_unit1[i],false) set u=null endif else call SetUnitFlyHeight(Boss_Spell_unit1[i],.0,1000.) call PauseUnit(Boss_Spell_unit1[i],false) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:171") endif else call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:172") endif endfunction function Boss_Ability_002_Hpal takes nothing returns nothing local integer i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=GetTriggerUnit() set Boss_Spell_unit2[i]=GetSpellTargetUnit() set Boss_Spell_data1[i]=-2 set Boss_Spell_data2[i]=0 call TimerStart(NewTimer(i),.0,false,function Boss_Ability_002_func01_Hpal) call UnitAddAbility(GetTriggerUnit(),'Amrf') call UnitRemoveAbility(GetTriggerUnit(),'Amrf') call NewTextTagInTarget_A(GetTriggerUnit(),"|c00808080Do not move honestly stay!|r",0,0,0) endfunction function Boss_Ability_001_func01_Hpal takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer index=Boss_Spell_data2[i]+1 local unit u local real x local real y local real z local real r if index>100 then call DestroyGroup(Boss_Spell_group1[i]) call RemoveUnitBJ(Boss_Spell_unit2[i],$B) call Boss_Spell_deallocate(i) call Ltv(Boss_Spell_data1[i]) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:173") else set u=II[Boss_Spell_data1[i]] set x=GetUnitX(Boss_Spell_unit2[i])-Boss_Spell_X[i] set y=GetUnitY(Boss_Spell_unit2[i])-Boss_Spell_Y[i] set z=Boss_Spell_Z[i] set r=SquareRoot(x*x+y*y+z*z) if r<50. then set x=GetUnitX(Boss_Spell_unit2[i]) set y=GetUnitY(Boss_Spell_unit2[i]) set z=0 set index=100 else set r=50/ r set x=GetUnitX(u)+x*r set y=GetUnitY(u)+y*r set z=z*r endif call SetUnitX(u,x) call SetUnitY(u,y) set Boss_Spell_X[i]=x set Boss_Spell_Y[i]=y set Boss_Spell_Z[i]=z if index>=50 then if index==100 then call DestroyEffect(AI[Boss_Spell_data1[i]]) call DEv(Boss_Spell_data1[i],"desecrategreen.mdl") call SetUnitScale(II[(Boss_Spell_data1[i])],((1.5)*1.),0,0) call GroupEnumUnitsInRange(G,x,y,375,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,300)and GetUnitAbilityLevel(u,'Avul')==0 and IsUnitType(u,UNIT_TYPE_MAGIC_IMMUNE)==false then if IsUnitAliveAndEnemy(u,Boss_Unit_Hpal)then call UnitDamageTargetBY((Boss_Spell_unit1[i]),(u),((20000.)*1.),false,(true),false,false,(ConvertAttackType(0)),(ConvertDamageType($E)),(($F)*1.),("|c005700AE")) if IsUnitType(u,UNIT_TYPE_DEAD)==FALSE then call Boss_addbuff_2_Hpal(u) endif endif endif endloop endif set Boss_Spell_data2[i]=100 call TimerStart(GetExpiredTimer(),1,false,function Boss_Ability_001_func01_Hpal) else call GroupEnumUnitsInRange(G,x,y,$AF,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInGroup(u,Boss_Spell_group1[i])and IsUnitInRangeXY(u,x,y,100)and GetUnitAbilityLevel(u,'Avul')==0 then call GroupAddUnit(Boss_Spell_group1[i],u) if IsUnitAliveAndEnemy(u,Boss_Unit_Hpal)then call UnitDamageTargetBY((Boss_Spell_unit1[i]),(u),((10000.)*1.),false,(false),false,false,(ConvertAttackType(0)),(ConvertDamageType($E)),((0)*1.),("")) if IsUnitType(u,UNIT_TYPE_DEAD)==FALSE then call Boss_addbuff_2_Hpal(u) endif endif endif endloop set Boss_Spell_data2[i]=index endif endif set u=null endfunction function Boss_Ability_001_3_AFunc_Hpal takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local unit u if Boss_Spell_data1[i]==0 then loop set u=FirstOfGroup(Boss_Spell_group1[i]) exitwhen u==null call GroupRemoveUnit(Boss_Spell_group1[i],u) call Ltv((GetUnitUserData((u)))) endloop call DestroyGroup(Boss_Spell_group1[i]) else call DestroyEffect(Boss_Spell_eff[i]) endif call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:174") set u=null endfunction function Boss_Ability_001_B_Hpal takes real x,real y returns nothing local integer i=Boss_Spell_allocate() local integer uid=0 local real z=0 set Boss_Spell_data1[i]=0 set Boss_Spell_group1[i]=CreateGroup() loop set uid=LAv("Doodads\\Cinematic\\GlowingRunes\\GlowingRunes"+I2S(R2I(z))+".mdl",x+300*Cos(z*.69813),y+300*Sin(z*.69813),.5) call SetUnitUserData(II[uid],uid) call GroupAddUnit(Boss_Spell_group1[i],II[uid]) set z=z+1 exitwhen z>9 endloop set z=3 call TimerStart(NewTimer(i),z,false,function Boss_Ability_001_3_AFunc_Hpal) endfunction function Boss_Ability_0010_Hpal takes unit u,real x1,real y1 returns nothing local integer i=Boss_Spell_allocate() local integer uid local real x local real y local real z set CR=false set Boss_Spell_unit2[i]=CreateUnit(Player($F),'e001',x1,y1,0) set CR=true call SetUnitX(Boss_Spell_unit2[i],x1) call SetUnitY(Boss_Spell_unit2[i],y1) set Boss_Spell_unit1[i]=u set Boss_Spell_group1[i]=CreateGroup() set Boss_Spell_X[i]=GetUnitX(Boss_Spell_unit1[i]) set Boss_Spell_Y[i]=GetUnitY(Boss_Spell_unit1[i]) set Boss_Spell_Z[i]=GetUnitFlyHeight(Boss_Spell_unit1[i])+$AF set x=GetUnitX(Boss_Spell_unit2[i])-GetUnitX(Boss_Spell_unit1[i]) set y=GetUnitY(Boss_Spell_unit2[i])-GetUnitY(Boss_Spell_unit1[i]) set z=Atan2(y,x) set Boss_Spell_data1[i]=LIv("Abilities\\Weapons\\DemonHunterMissile\\DemonHunterMissile.mdl",GetUnitX(Boss_Spell_unit1[i])+Cos(z)*50.,GetUnitY(Boss_Spell_unit1[i])+Sin(z)*50.,Boss_Spell_Z[i],2,z,90) set Boss_Spell_data2[i]=0 call TimerStart(NewTimer(i),.03,true,function Boss_Ability_001_func01_Hpal) endfunction function Boss_Ability_004_Hpal takes nothing returns nothing local real x=GetUnitX(GetTriggerUnit()) local real y=GetUnitY(GetTriggerUnit()) local unit u call Ltv(LAv("desecrate.mdl",x,y,3.)) call Ltv(LAv("darknova.mdl",x,y,1)) call GroupEnumUnitsInRange(G,x,y,700,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,600)then if IsUnitAliveAndEnemy(u,GetTriggerUnit())then call UnitDamageTargetBY((GetTriggerUnit()),(u),((GetUnitState(u,UNIT_STATE_LIFE)*.8)*1.),false,(false),false,false,(ConvertAttackType(5)),(ConvertDamageType(26)),((0)*1.),("")) if IsUnitType(u,UNIT_TYPE_HERO)then call zhv((GetPlayerId((GetOwningPlayer(u)))),$96,1) endif endif endif endloop call AddUnitAnimationProperties(GetTriggerUnit(),"alternate",true) endfunction function Boss_Ability_003_func02_Hpal takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer index=Boss_Spell_data1[i]+1 if Boss_Index_Hpal<2 or Boss_Index_Hpal>6 then if UnitAlive(Boss_Spell_unit1[i])then call Boss_Ability_0010_Hpal(Boss_Spell_unit1[i],Boss_Spell_X[i],Boss_Spell_Y[i]) if IsUnitInRange(Boss_Spell_unit1[i],Boss_Spell_unit2[i],$7D0)then set Boss_Spell_X[i]=GetUnitX(Boss_Spell_unit2[i]) set Boss_Spell_Y[i]=GetUnitY(Boss_Spell_unit2[i]) call Boss_Ability_001_B_Hpal(Boss_Spell_X[i],Boss_Spell_Y[i]) endif else set index=6 endif if index>=5 then if GetUnitTypeId(Boss_Spell_unit1[i])=='hpa3' then call QueueUnitAnimation(Boss_Spell_unit1[i],"stand alternate") else call QueueUnitAnimation(Boss_Spell_unit1[i],"stand") endif call SetUnitTimeScale(Boss_Spell_unit1[i],1) call PauseUnit(Boss_Spell_unit1[i],FALSE) set index=7 else set Boss_Spell_data1[i]=index if GetUnitTypeId(Boss_Spell_unit1[i])=='hpa3' then call SetUnitAnimation(Boss_Spell_unit1[i],"attack alternate") else call SetUnitAnimation(Boss_Spell_unit1[i],"attack") endif endif else set index=7 endif if index>=7 then call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:175") endif endfunction function Boss_Ability_003_func01_Hpal takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) set Boss_Spell_X[i]=GetUnitX(Boss_Spell_unit2[i]) set Boss_Spell_Y[i]=GetUnitY(Boss_Spell_unit2[i]) call Boss_Ability_001_B_Hpal(Boss_Spell_X[i],Boss_Spell_Y[i]) call TimerStart(GetExpiredTimer(),.3,true,function Boss_Ability_003_func02_Hpal) call PauseUnit(Boss_Spell_unit1[i],true) if GetUnitTypeId(Boss_Spell_unit1[i])=='hpa3' then call SetUnitAnimation(Boss_Spell_unit1[i],"attack alternate") else call SetUnitAnimation(Boss_Spell_unit1[i],"attack") endif endfunction function Boss_Ability_003_Hpal takes nothing returns nothing local integer i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=GetTriggerUnit() set Boss_Spell_unit2[i]=GetSpellTargetUnit() set Boss_Spell_data1[i]=0 call TimerStart(NewTimer(i),0,false,function Boss_Ability_003_func01_Hpal) call SetUnitTimeScale(Boss_Spell_unit1[i],3) endfunction function Boss_Ability_001_Hpal takes nothing returns nothing call Boss_Ability_0010_Hpal(GetTriggerUnit(),GetSpellTargetX(),GetSpellTargetY()) endfunction function Boss_Ability_001_A_Hpal takes nothing returns nothing local integer i local real z=0 if GetSpellAbilityId()=='A0S7' then call Boss_Ability_001_B_Hpal(GetSpellTargetX(),GetSpellTargetY()) call NewTextTagInTarget_B(GetTriggerUnit(),"|c00808080Go to hell!|r",18,0,0,0) else set i=Boss_Spell_allocate() call NewTextTagInTarget_B(GetTriggerUnit(),"|c00808080Stop running!|r",18,0,0,0) set z=1.5 set Boss_Spell_data1[i]=1 set Boss_Spell_eff[i]=AddSpecialEffectTarget("magnetic field.mdl",GetSpellTargetUnit(),"origin") call TimerStart(NewTimer(i),z,false,function Boss_Ability_001_3_AFunc_Hpal) call thv("|c00FF0000"+GetPlayerName(GetOwningPlayer(GetSpellTargetUnit()))+", catch!|r",GetUnitX(GetSpellTargetUnit()),GetUnitY(GetSpellTargetUnit()),GetUnitFlyHeight(GetSpellTargetUnit())+35,18,$F,.25*Lx,1.,1.5) endif endfunction function Boss_Ability_AEme01_Hpal takes nothing returns nothing local integer EVENTID=GetHandleId(GetTriggerEventId()) if EVENTID==272 then if Boss_Index_Hpal==3 or Boss_Index_Hpal==4 then set Boss_Index_Hpal=5 else call IssueImmediateOrderById(GetTriggerUnit(),$D0004) endif elseif EVENTID==274 then if Boss_Index_Hpal==5 then set Boss_Index_Hpal=6 call SetWidgetLife(Boss_Unit_Hpal,$3B9ACA00) endif elseif EVENTID==276 then if Boss_Index_Hpal==6 then set Boss_Index_Hpal=7 call UnitRemoveAbility(Boss_Unit_Hpal,'A0S8') call UnitRemoveAbility(Boss_Unit_Hpal,'A0S9') call UnitAddAbility(Boss_Unit_Hpal,'A0S8') call UnitAddAbility(Boss_Unit_Hpal,'A0S9') call UnitAddAbility(Boss_Unit_Hpal,'A0SA') call UnitMakeAbilityPermanent(Boss_Unit_Hpal,true,'A0S8') call UnitMakeAbilityPermanent(Boss_Unit_Hpal,true,'A0S9') call UnitMakeAbilityPermanent(Boss_Unit_Hpal,true,'A0SA') call SetUnitInvulnerable(Boss_Unit_Hpal,false) elseif Boss_Index_Hpal==5 then set Boss_Index_Hpal=4 endif endif endfunction function Boss_AEme_func_Hpal takes nothing returns nothing set Boss_Index_Hpal=3 call PauseUnit(Boss_Unit_Hpal,false) call UnitRemoveBuffsEx(Boss_Unit_Hpal,false,true,false,false,false,false,false) call UnitAddAbility(Boss_Unit_Hpal,'AEme') call IssueImmediateOrderById(Boss_Unit_Hpal,$D00D4) endfunction function Boss_Atker_Hpal takes nothing returns nothing local real life=GetWidgetLife(Boss_Unit_Hpal) local real x=GetUnitX((mF)) local real y=GetUnitY((mF)) if x<-$4CE0 or x>-$41E0 or y<384 or y>$C00 then set KF[HF]=KF[HF]+999999999. endif if Boss_Index_Hpal<=1 then if life+KF[HF]-PF<=1 then set Boss_Index_Hpal=2 call SetUnitInvulnerable(Boss_Unit_Hpal,true) call SetUnitFlyHeight(Boss_Unit_Hpal,.0,0) call SetUnitTimeScale(Boss_Unit_Hpal,1) call PauseUnit(Boss_Unit_Hpal,true) call SetWidgetLife(Boss_Unit_Hpal,1) call UnitRemoveBuffsEx(Boss_Unit_Hpal,false,true,false,false,false,false,false) call NewTextTagInTarget_B(Boss_Unit_Hpal,"|c00808080You angered me and I wanted to repay you!|r",18,0,0,0) call TimerStart(NewTimer(0),1,false,function Boss_AEme_func_Hpal) endif endif endfunction function Boss_Ability_004_A_Hpal takes nothing returns nothing call NewTextTagInTarget_B(GetTriggerUnit(),"|c00808080Come close!!|r",18,0,0,0) endfunction function Boss_Statr_tm2_Hpal takes nothing returns nothing local integer unituserdata=(GetUnitUserData((Boss_Unit_Hpal))) local unit u=null local real x=GetUnitX(Boss_Unit_Hpal) local real y=GetUnitY(Boss_Unit_Hpal) local real life=GetWidgetLife(Boss_Unit_Hpal) local real maxlife=GetUnitState(Boss_Unit_Hpal,UNIT_STATE_MAX_LIFE) local real v=life/ maxlife local integer index if Boss_Index_Hpal==0 then if v<=.8 then set Boss_Index_Hpal=1 call UnitAddAbility(Boss_Unit_Hpal,'A0S8') call UnitAddAbility(Boss_Unit_Hpal,'A0S9') endif elseif Boss_Index_Hpal==4 or Boss_Index_Hpal==3 then call IssueImmediateOrderById(Boss_Unit_Hpal,$D00D4) elseif Boss_Index_Hpal==7 or Boss_Index_Hpal==8 then if Boss_Index_Hpal==7 and v<=.65 then set Boss_Index_Hpal=8 call UnitAddAbility(Boss_Unit_Hpal,'A0SC') endif if Boss_Index_Hpal==8 and life<=10000000. then set Boss_Index_Hpal=9 call SetUnitNocontrol(unituserdata,true) call NewTextTagInTarget_B(Boss_Unit_Hpal,"|c00808080Look down on you ah.|r",18,0,0,0) call UnitAddAbility(Boss_Unit_Hpal,'A0SB') call TimerStart(NewTimer(0),.2,true,function Boss_uloc_create_Hpal) endif endif if Boss_Index_Hpal<2 or Boss_Index_Hpal>6 then set Boss_Index2_Hpal=Boss_Index2_Hpal-1 if Boss_Index2_Hpal<=0 then if Boss_Index_Hpal>7 then set index=0 call GroupEnumUnitsInRange(G,x,y,$3E8,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitAliveAndEnemy(u,Boss_Unit_Hpal)and GetUnitAbilityLevel(u,'Avul')==0 then if IsUnitType(u,UNIT_TYPE_HERO)then set index=index+2 else set index=index+1 endif endif endloop if index>1 and IssueImmediateOrderById(Boss_Unit_Hpal,$D009F)then set Boss_Index2_Hpal=33 return endif endif if Boss_Index_Hpal>6 then set index=0 call GroupEnumUnitsInRange(G,x,y,600,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitAliveAndEnemy(u,Boss_Unit_Hpal)and GetUnitAbilityLevel(u,'Avul')==0 then if IsUnitType(u,UNIT_TYPE_HERO)then set index=index+2 else set index=index+1 endif endif endloop if index>1 and IssueImmediateOrderById(Boss_Unit_Hpal,$D00A0)then set Boss_Index2_Hpal=33 return endif endif if Boss_Index_Hpal>0 then set index=0 call GroupEnumUnitsInRange(G,x,y,800,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitAliveAndEnemy(u,Boss_Unit_Hpal)and GetUnitAbilityLevel(u,'Avul')==0 then if IsUnitType(u,UNIT_TYPE_HERO)then set index=index+1 if GetRandomInt(1,index)<=1 then set Boss_Spell_unit2[0]=u endif endif endif endloop if index>0 then if IssueTargetOrderById(Boss_Unit_Hpal,$D024B,Boss_Spell_unit2[0])then set Boss_Index2_Hpal=33 return endif endif endif set x=GetUnitX(Boss_Unit_Hpal) set y=GetUnitY(Boss_Unit_Hpal) set index=0 call GroupEnumUnitsInRange(G,x,y,800,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitAliveAndEnemy(u,Boss_Unit_Hpal)and GetUnitAbilityLevel(u,'Avul')==0 then if IsUnitType(u,UNIT_TYPE_HERO)then set index=index+2 if GetRandomInt(1,index)<=2 then set x=GetUnitX(u) set y=GetUnitY(u) endif else set index=index+1 if GetRandomInt(1,index)<=1 then set x=GetUnitX(u) set y=GetUnitY(u) endif endif endif endloop if index>1 then if IssuePointOrderById(Boss_Unit_Hpal,$D009D,x,y)then set Boss_Index2_Hpal=33 endif endif endif endif endfunction function Boss_Statr_tm_Hpal takes nothing returns nothing local integer unituserdata=(GetUnitUserData((Boss_Unit_Hpal))) local unit u=null local real x=GetUnitX(Boss_Unit_Hpal) local real y=GetUnitY(Boss_Unit_Hpal) if Boss_Index2_Hpal==0 then set Boss_Index2_Hpal=1 call SetUnitTimeScale(Boss_Unit_Hpal,0) call Ltv(LAv("desecrategreen.mdl",x,y,3.5)) call TimerStart(Boss_Buff_1_Timer_Hpal[0],.3,FALSE,function Boss_Statr_tm_Hpal) elseif Boss_Index2_Hpal==1 then set Boss_Index2_Hpal=2 call SetUnitAnimation(Boss_Unit_Hpal,"spell channel") call SetUnitTimeScale(Boss_Unit_Hpal,2) call Ltv(LAv("desecrate.mdl",x,y,3.5)) call TimerStart(Boss_Buff_1_Timer_Hpal[0],.1,FALSE,function Boss_Statr_tm_Hpal) else call GroupEnumUnitsInRange(G,x,y,900,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,800)then if IsUnitAliveAndEnemy(u,Boss_Unit_Hpal)then call m2v(u,1.,'A500','B500',true) if IsUnitType(u,UNIT_TYPE_HERO)then call zhv((GetPlayerId((GetOwningPlayer(u)))),$96,1) endif endif endif endloop call SetUnitInvulnerable(Boss_Unit_Hpal,false) call PauseUnit(Boss_Unit_Hpal,false) call SetUnitAnimation(Boss_Unit_Hpal,"Stand") call SetUnitTimeScale(Boss_Unit_Hpal,1) set Boss_Index2_Hpal=0 call TimerStart(Boss_Buff_1_Timer_Hpal[0],.03,true,function Boss_Statr_tm2_Hpal) endif endfunction function Boss_Statr_Hpal takes nothing returns nothing local integer unituserdata=(GetUnitUserData((Boss_Unit_Hpal))) local integer i call s__Trig_remove((Boss_Damage_Hpal)) set Boss_Damage_Hpal=UnitAddBeDamagerTrigB(unituserdata,function Boss_Atker_Hpal) set Boss_Buff_1_Group_Hpal=CreateGroup() set Boss_Buff_2_Group_Hpal=CreateGroup() set i=0 loop call SetPlayerAbilityAvailable(Player(i),'A0S6',false) set i=i+1 exitwhen i>$F endloop call UnitAddAbility(Boss_Unit_Hpal,'Abrf') call UnitRemoveAbility(Boss_Unit_Hpal,'Abrf') call UnitAddAbility(Boss_Unit_Hpal,'A0IC') call UnitAddAbility(Boss_Unit_Hpal,'ANdb') call UnitAddAbility(Boss_Unit_Hpal,'A0S7') call UnitMakeAbilityPermanent(Boss_Unit_Hpal,true,'A0S7') call UnitMakeAbilityPermanent(Boss_Unit_Hpal,true,'A0S8') call UnitMakeAbilityPermanent(Boss_Unit_Hpal,true,'A0S9') call UnitMakeAbilityPermanent(Boss_Unit_Hpal,true,'A0SA') call UnitMakeAbilityPermanent(Boss_Unit_Hpal,true,'A0SB') call UnitMakeAbilityPermanent(Boss_Unit_Hpal,true,'A0SC') call UnitMakeAbilityPermanent(Boss_Unit_Hpal,true,'A0IC') call UnitMakeAbilityPermanent(Boss_Unit_Hpal,true,'ANdb') call UnitMakeAbilityPermanent(Boss_Unit_Hpal,true,'AEme') call UnitMakeAbilityPermanent(Boss_Unit_Hpal,true,'AUls') call RegisterSpellEffectEvent('A0S7',function Boss_Ability_001_Hpal) call RegisterSpellChannelEvent('A0S7',function Boss_Ability_001_A_Hpal) call RegisterSpellEffectEvent('A0S8',function Boss_Ability_002_Hpal) call RegisterSpellEffectEvent('A0S9',function Boss_Ability_003_Hpal) call RegisterSpellChannelEvent('A0S9',function Boss_Ability_001_A_Hpal) call RegisterSpellEffectEvent('A0SA',function Boss_Ability_004_Hpal) call RegisterSpellChannelEvent('A0SA',function Boss_Ability_004_A_Hpal) call RegisterSpellEffectEvent('A0SC',function Boss_Ability_005_Hpal) call RegisterSpellChannelEvent('A0SC',function Boss_Ability_005_Hpal) call RegisterSpellEffectEvent('AEme',function Boss_Ability_AEme01_Hpal) call RegisterSpellChannelEvent('AEme',function Boss_Ability_AEme01_Hpal) call RegisterSpellEndCastEvent('AEme',function Boss_Ability_AEme01_Hpal) set Boss_DEATH_TC_Hpal=RegisterEvent(EVENT_PLAYER_UNIT_DEATH,function Boss_UNIT_DEATH_Hpal) call NewTextTagInTarget_B(Boss_Unit_Hpal,"Kid I have not seen people come for many years just come to me solution!",18,$80,$80,$80) call SetUnitAnimation(Boss_Unit_Hpal,"Spell") call SetUnitTimeScale(Boss_Unit_Hpal,.25) set Boss_Buff_1_Timer_Hpal[0]=CreateTimer() set Boss_Index_Hpal=0 set Boss_Index2_Hpal=0 call TimerStart(Boss_Buff_1_Timer_Hpal[0],1.5,FALSE,function Boss_Statr_tm_Hpal) set KF[HF]=PF+1000000. call SetUnitInvulnerable(Boss_Unit_Hpal,true) set i=0 loop exitwhen i>7 call DestroyLightning(FE[i]) set FE[i]=null set i=i+1 endloop endfunction function Boss_Enter_Hpal takes nothing returns nothing if IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)and(Boss_Index_Hpal==-1)and tEv(GetTriggerUnit(),-$4786,770,370)then set Off_A098[(GetUnitUserData((GetTriggerUnit())))]=true set Off_A098_id[(GetUnitUserData((GetTriggerUnit())))]=1 endif endfunction function Boss_Init_Hpal takes nothing returns nothing local real x=-$4780 local real y=$600 local real r=$440 local real t=r/ 2. local integer id set Boss_Unit_Hpal=gg_unit_hpa1_0272 set id=(GetUnitUserData((Boss_Unit_Hpal))) call PauseUnit(Boss_Unit_Hpal,true) set Boss_Damage_Hpal=UnitAddBeDamagerTrigB(id,function Boss_Statr_Hpal) call RegisterEnterRect(-$5200,-9280,-$50C0,-8576,function Boss_Enter_Hpal) set FE[0]=AddLightningEx("LEAS",false,x+r,y,320,x-t,y+t,5) set FE[1]=AddLightningEx("LEAS",false,x+r,y,320,x-t,y-t,5) set FE[2]=AddLightningEx("LEAS",false,x,y+r,320,x-t,y-t,5) set FE[3]=AddLightningEx("LEAS",false,x,y+r,320,x+t,y-t,5) set FE[4]=AddLightningEx("LEAS",false,x-r,y,320,x+t,y-t,5) set FE[5]=AddLightningEx("LEAS",false,x-r,y,320,x+t,y+t,5) set FE[6]=AddLightningEx("LEAS",false,x,y-r,320,x+t,y+t,5) set FE[7]=AddLightningEx("LEAS",false,x,y-r,320,x-t,y+t,5) endfunction function Boss_END_RHZX takes nothing returns nothing local integer i=8 loop set i=i-1 if MV[i]!=null and GetHeroLevel(MV[i])>=380 then call DisplayTimedTextToPlayer(P[i],0,0,5,"|c00FF8080Lava debris has been given to 380+ lvl players|r|r") call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",MV[i],"origin")) call SetItemUserData(CreateItemG('gold',iA[i],VA[i]),i+1) endif exitwhen i==0 endloop call TriggerRemoveCondition(alloc__Kv[GetHandleId((EVENT_PLAYER_UNIT_DEATH))],(Boss_DEATH_TC_RHZX)) set Boss_DEATH_TC_RHZX=null endfunction function Boss_UNIT_DEATH_RHZX takes nothing returns nothing local real x local real y if GetTriggerUnit()==Boss_Unit_RHZX then call Boss_END_RHZX() elseif GetTriggerUnit()==Boss_Unit_2_RHZX then call SetUnitX(Boss_Unit_RHZX,GetUnitX(Boss_Unit_2_RHZX)) call SetUnitY(Boss_Unit_RHZX,GetUnitY(Boss_Unit_2_RHZX)) call KillUnit(Boss_Unit_RHZX) set Boss_Index_RHZX=8 endif if IsUnitInGroup(GetTriggerUnit(),Boss_Ability02_group_RHZX)then call GroupRemoveUnit(Boss_Ability02_group_RHZX,GetTriggerUnit()) set x=Boss_x[0] set y=Boss_y[0] set Boss_x[0]=GetUnitX(GetTriggerUnit()) set Boss_y[0]=GetUnitY(GetTriggerUnit()) call ExecuteFunc("Boss_Ability003_func04_RHZX") set Boss_x[0]=x set Boss_y[0]=y endif endfunction function Boss_buff_shaoshang_loop_RHZX takes nothing returns nothing local integer data local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) if IsUnitInGroup(Boss_Spell_unit1[i],h_v_Group)then set data=(GetUnitUserData((Boss_Spell_unit1[i]))) set Boss_Spell_X[i]=Boss_Spell_X[i]+1 call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",Boss_Spell_unit1[i],"origin")) call UnitDamageTargetBY((Boss_Spell_unit2[i]),(Boss_Spell_unit1[i]),((2000.)*1.),false,(true),false,false,(ConvertAttackType(0)),(ConvertDamageType($E)),(($C)*1.),("|c00FF8080")) if Boss_Spell_Z[i]>0 then call UnitDamageTargetBY((Boss_Spell_unit2[i]),(Boss_Spell_unit1[i]),((Boss_Spell_Z[i])*1.),false,(true),false,false,(ConvertAttackType(0)),(ConvertDamageType($E)),(($C)*1.),("|c00FF8080")) else call UnitDamageTargetBY((Boss_Spell_unit2[i]),(Boss_Spell_unit1[i]),((2000.)*1.),false,(true),false,false,(ConvertAttackType(0)),(ConvertDamageType($E)),(($C)*1.),("|c00FF8080")) if Boss_Spell_data1[i]<$A then set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 call ModifyUnitArmor(data,-50) endif endif if Boss_Spell_X[i]>=$A or UnitAlive(Boss_Spell_unit1[i])==false then call UnitRemoveAbilityandBuffBY(Boss_Spell_unit1[i],'A0SW','B070') call DeUnitMdef(data,Boss_Spell_data2[i]) call ModifyUnitArmor(data,50*Boss_Spell_data1[i]) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:176") set Boss_buff_shaoshang_RHZX[data]=null endif else set Boss_Spell_unit1[i]=null call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:177") set Boss_buff_shaoshang_RHZX[R2I(Boss_Spell_Y[i])]=null endif endfunction function Boss_buff_shaoshang_add_RHZX takes unit u,unit u2,real damage returns nothing local integer data=(GetUnitUserData((u))) local integer i if IsUnitInGroup(u,h_v_Group)==false then return endif if Boss_buff_shaoshang_RHZX[data]==null then set i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=u set Boss_Spell_unit2[i]=u2 set Boss_Spell_X[i]=0 set Boss_Spell_Y[i]=data set Boss_Spell_Z[i]=damage set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=ModifyUnitMdef(data,-20) set Boss_buff_shaoshang_RHZX[data]=NewTimer(i) call UnitAddAbilityBY(u,'A0SW') else set i=(alloc__hpv(GetHandleId((Boss_buff_shaoshang_RHZX[data])))) set Boss_Spell_X[i]=0 set Boss_Spell_Z[i]=damage set Boss_Spell_unit2[i]=u2 endif call TimerStart(Boss_buff_shaoshang_RHZX[data],1,true,function Boss_buff_shaoshang_loop_RHZX) endfunction function Boss_buff_shaoshang2_loop_RHZX takes nothing returns nothing local integer data local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) set data=(Boss_Spell_data2[i]) if Boss_Spell_X[i]>(100000.-TimerGetRemaining(GameTimer))and UnitAlive(Boss_Spell_unit1[i])then call DestroyEffect(AddSpecialEffectTarget("Environment\\LargeBuildingFire\\LargeBuildingFire2.mdl",Boss_Spell_unit1[i],"chest")) else call DestroyEffect(Boss_Spell_eff[i]) call UnitRemoveAbilityandBuffBY(Boss_Spell_unit1[i],'Arll',0) call UnitRemoveAbilityandBuffBY(Boss_Spell_unit1[i],'A0SY','B071') set Boss_Spell_unit1[i]=null call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:178") set Boss_buff_shaoshang_RHZX[data]=null call Unit_Cancel_Counter($F3,data) endif endfunction function Boss_buff_shaoshang2_add_RHZX takes unit u returns nothing local integer data=(GetUnitUserData((u))) local integer i if IsUnitInGroup(u,h_v_Group)==false then return endif if Boss_buff_shaoshang_RHZX[data]==null then set i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=u set Boss_Spell_X[i]=(100000.-TimerGetRemaining(GameTimer))+5 set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=data set Boss_buff_shaoshang2_RHZX[data]=NewTimer(i) set Boss_Spell_eff[i]=AddSpecialEffectTarget("Environment\\LargeBuildingFire\\LargeBuildingFire2.mdl",u,"origin") call TimerStart(Boss_buff_shaoshang2_RHZX[data],.2,true,function Boss_buff_shaoshang2_loop_RHZX) call UnitAddAbilityBY(u,'Arll') call UnitAddAbilityBY(u,'A0SY') call Unit_App_Counter($F4,data) else set i=(alloc__hpv(GetHandleId((Boss_buff_shaoshang2_RHZX[data])))) set Boss_Spell_X[i]=(100000.-TimerGetRemaining(GameTimer))+5 endif endfunction function Boss_Ability005_func06_RHZX takes nothing returns nothing call Boss_Spell_deallocate(ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:179")) if Boss_Index_RHZX==6 then set Boss_Index_RHZX=0 endif endfunction function Boss_Ability005_func03_RHZX takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer index local unit u local real x local real y local real r local boolean b=false set Boss_x[0]=GetUnitX(Boss_Spell_unit2[i]) set Boss_y[0]=GetUnitY(Boss_Spell_unit2[i]) set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 if GetUnitAbilityLevel(Boss_Spell_unit2[i],'Bfrz')==0 then set Boss_x[1]=Boss_x[0]+Boss_Spell_X[i] set Boss_y[1]=Boss_y[0]+Boss_Spell_Y[i] if IsTerrainPathable(Boss_x[1],Boss_y[1],PATHING_TYPE_FLYABILITY)then set index=0 set x=0 set y=1 loop set r=(x+y)/ 2 set Boss_x[1]=Boss_x[0]+Boss_Spell_X[i]*r set Boss_y[1]=Boss_y[0]+Boss_Spell_Y[i]*r set index=index+1 exitwhen index>9 if IsTerrainPathable(Boss_x[1],Boss_y[1],PATHING_TYPE_FLYABILITY)then set y=r else set x=r endif endloop set index=0 set x=0 set y=3.14 loop set r=(x+y)/ 2 set Boss_x[2]=Boss_Spell_X[i]*Cos(r)-Boss_Spell_Y[i]*Sin(r) set Boss_y[2]=Boss_Spell_Y[i]*Cos(r)+Boss_Spell_X[i]*Sin(r) set index=index+1 exitwhen index>9 if IsTerrainPathable(Boss_x[1]+Boss_x[2],Boss_y[1]+Boss_y[2],PATHING_TYPE_FLYABILITY)then set x=r else set y=r endif endloop set Boss_z[0]=r set index=0 set x=0 set y=3.14 loop set r=(x+y)/ 2 set Boss_x[2]=Boss_Spell_X[i]*Cos(r)+Boss_Spell_Y[i]*Sin(r) set Boss_y[2]=Boss_Spell_Y[i]*Cos(r)-Boss_Spell_X[i]*Sin(r) set index=index+1 exitwhen index>9 if IsTerrainPathable(Boss_x[1]+Boss_x[2],Boss_y[1]+Boss_y[2],PATHING_TYPE_FLYABILITY)then set x=r else set y=r endif endloop set Boss_z[1]=Boss_z[0]-r if Boss_z[1]>0 then if Boss_z[1]<2.28 then set r=(Boss_z[1])+GetRandomReal(3.14159,4) else set r=(Boss_z[1])+3.14159 endif else if Boss_z[1]>-2.28 then set r=(Boss_z[1])-GetRandomReal(3.14159,4) else set r=(Boss_z[1])-3.14159 endif endif set Boss_x[2]=Boss_Spell_X[i] set Boss_y[2]=Boss_Spell_Y[i] set Boss_Spell_X[i]=Boss_x[2]*Cos(r)-Boss_y[2]*Sin(r) set Boss_Spell_Y[i]=Boss_y[2]*Cos(r)+Boss_x[2]*Sin(r) set Boss_x[1]=Boss_x[1]+Boss_Spell_X[i] set Boss_y[1]=Boss_y[1]+Boss_Spell_Y[i] set Boss_z[0]=Atan2(Boss_Spell_Y[i],Boss_Spell_X[i])*bj_RADTODEG call RemoveUnitBJ(Boss_Spell_unit2[i],$C) set Boss_Spell_unit2[i]=CreateUnit(GetOwningPlayer(Boss_Unit_RHZX),'ushd',Boss_x[1],Boss_y[1],Boss_z[0]) call SetUnitX(Boss_Spell_unit2[i],Boss_x[1]) call SetUnitY(Boss_Spell_unit2[i],Boss_y[1]) call SetUnitFlyHeight(Boss_Spell_unit2[i],$FA,0) call SetUnitTimeScale(Boss_Spell_unit2[i],2) call SetUnitScale(Boss_Spell_unit2[i],3,3,3) set Boss_Spell_data2[i]=Boss_Spell_data2[i]+1 else call SetUnitX(Boss_Spell_unit2[i],Boss_x[1]) call SetUnitY(Boss_Spell_unit2[i],Boss_y[1]) endif if ModuloInteger(Boss_Spell_data1[i],16)==0 then call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl",Boss_x[1],Boss_y[1])) call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Volcano\\VolcanoDeath.mdl",Boss_x[1],Boss_y[1])) endif if ModuloInteger(Boss_Spell_data1[i],$A7)==0 then call PingMinimapEx(Boss_x[1],Boss_y[1],2.,$C8,$FF,$C8,false) endif call GroupEnumUnitsInRange(G,Boss_x[1],Boss_y[1],$FA,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,Boss_x[1],Boss_y[1],125)then if IsUnitAliveAndEnemy(u,Boss_Spell_unit1[i])and GetUnitAbilityLevel(u,'Avul')==0 then call KillUnit(u) endif if b==FALSE then set b=u==Boss_Unit_RHZX endif endif endloop else set Boss_x[1]=Boss_x[0] set Boss_y[1]=Boss_y[0] if Boss_Spell_data2[i]>0 and Boss_Spell_Z[i]<(100000.-TimerGetRemaining(GameTimer))then call GroupEnumUnitsInRange(G,Boss_x[1],Boss_y[1],$FA,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,Boss_x[1],Boss_y[1],125)then if b==FALSE then set b=u==Boss_Unit_RHZX endif endif endloop endif endif if b then if Boss_Spell_data2[i]>0 and Boss_Spell_Z[i]<(100000.-TimerGetRemaining(GameTimer))then call UnitApplyTimedLife(Boss_Spell_unit2[i],0,.01) call KillUnit(Boss_Spell_unit2[i]) set Boss_Index_RHZX=6 set Boss_Ability05_cd_RHZX=$F0*32 call UnitRemoveAbilityandBuffBY(Boss_Unit_RHZX,'A0SX',0) call SetUnitNocontrol((GetUnitUserData((Boss_Unit_RHZX))),false) call m2v(Boss_Unit_RHZX,$A,'A500','B500',true) call DestroyEffect(AddSpecialEffect("firegold.mdl",GetUnitX(Boss_Unit_RHZX),GetUnitY(Boss_Unit_RHZX))) call TimerStart(GetExpiredTimer(),$A,FALSE,function Boss_Ability005_func06_RHZX) return endif endif endfunction function Boss_Ability005_func02_RHZX takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) if Boss_Index_RHZX==5 then set Boss_z[0]=GetUnitFacing(Boss_Unit_RHZX) set Boss_x[0]=GetUnitX(Boss_Unit_RHZX) set Boss_y[0]=GetUnitY(Boss_Unit_RHZX) set Boss_x[1]=Cos(Boss_z[0]*bj_DEGTORAD) set Boss_y[1]=Sin(Boss_z[0]*bj_DEGTORAD) set Boss_x[2]=Boss_x[0]+Boss_x[1]*$96 set Boss_y[2]=Boss_y[0]+Boss_y[1]*$96 set Boss_Spell_X[i]=Boss_x[1]*30 set Boss_Spell_Y[i]=Boss_y[1]*30 set Boss_Spell_unit2[i]=CreateUnit(GetOwningPlayer(Boss_Unit_RHZX),'ushd',Boss_x[2],Boss_y[2],Boss_z[0]) call SetUnitFlyHeight(Boss_Spell_unit2[i],$FA,0) call SetUnitTimeScale(Boss_Spell_unit2[i],2) call SetUnitScale(Boss_Spell_unit2[i],3,3,3) set Boss_Index_RHZX=0 set Boss_Ability05_cd_RHZX=$5F5E0FF call PauseUnit(Boss_Unit_RHZX,false) call SetUnitInvulnerable(Boss_Unit_RHZX,false) call UnitAddAbilityBY(Boss_Unit_RHZX,'A0SX') call TimerStart(GetExpiredTimer(),.03,true,function Boss_Ability005_func03_RHZX) call NewTextTagInTarget_B(Boss_Spell_unit2[i],"Fast! Let go!",18,$FF,$80,$80) endif endfunction function Boss_Ability005_func_RHZX takes nothing returns nothing local integer i set i=Boss_Spell_allocate() set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=0 set Boss_Spell_Z[i]=(100000.-TimerGetRemaining(GameTimer))+$A set Boss_Spell_unit1[i]=Boss_Unit_RHZX call SetUnitAnimation(Boss_Unit_RHZX,"attack") call PauseUnit(Boss_Unit_RHZX,true) call SetUnitInvulnerable(Boss_Unit_RHZX,true) call TimerStart(NewTimer(i),.5,false,function Boss_Ability005_func02_RHZX) set Boss_Index_RHZX=5 endfunction function Boss_Ability004_func04_RHZX takes nothing returns nothing local integer i=Boss_Spell_data1[0] local integer index=(GetUnitUserData((GetEnumUnit()))) local real x local real y local unit u local group g set Boss_Spell_data1[index]=Boss_Spell_data1[index]+1 set x=GetUnitX(GetEnumUnit())+Boss_Spell_X[index] set y=GetUnitY(GetEnumUnit())+Boss_Spell_Y[index] if IsTerrainWalkable(x,y)then call SetUnitX(GetEnumUnit(),x) call SetUnitY(GetEnumUnit(),y) call GroupEnumUnitsInRange(G,x,y,$C8,null) call GroupRemoveUnit(G,Boss_Unit_RHZX) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,125)and not IsUnitInGroup(u,Boss_Spell_group2[i])then if UnitAlive(u)and GetUnitAbilityLevel(u,'Avul')==0 then call GroupAddUnit(Boss_Spell_group2[i],u) call GroupAddUnit(Boss_Spell_group1[index],u) endif endif endloop set g=Boss_Spell_group1[index] set Boss_Spell_group1[index]=Boss_Spell_group2[index] set Boss_Spell_group2[index]=g loop set u=FirstOfGroup(g) exitwhen u==null call GroupAddUnit(Boss_Spell_group1[index],u) call GroupRemoveUnit(g,u) set Boss_x[0]=GetUnitX(u) set Boss_y[0]=GetUnitY(u) if IsUnitInRange(u,GetEnumUnit(),$C8)then set Boss_x[1]=x+(Boss_x[0]+Boss_Spell_X[index]-x)*.8 set Boss_y[1]=y+(Boss_y[0]+Boss_Spell_Y[index]-y)*.8 call SetUnitPosition(u,Boss_x[1],Boss_y[1]) elseif IsUnitInRange(u,GetEnumUnit(),$FA)then set Boss_x[1]=x+(Boss_x[0]+Boss_Spell_X[index]-x)*.9 set Boss_y[1]=y+(Boss_y[0]+Boss_Spell_Y[index]-y)*.9 call SetUnitPosition(u,Boss_x[1],Boss_y[1]) else call GroupRemoveUnit(Boss_Spell_group2[i],u) call GroupRemoveUnit(Boss_Spell_group1[index],u) endif endloop set g=null else set Boss_Spell_data1[index]=100 endif if Boss_Spell_data1[index]>=20 then call DestroyEffect(AddSpecialEffect("firegold.mdl",x,y)) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",GetEnumUnit(),"origin")) call GroupEnumUnitsInRange(G,x,y,425,null) call GroupRemoveUnit(G,Boss_Unit_RHZX) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,350)then if IsUnitAliveAndEnemy(u,Boss_Spell_unit1[i])and GetUnitAbilityLevel(u,'Avul')==0 then call UnitDamageTargetBY((Boss_Unit_RHZX),(u),(($3D090)*1.),false,(false),false,false,(ConvertAttackType(0)),(ConvertDamageType($E)),((0)*1.),("")) if IsUnitType(u,UNIT_TYPE_HERO)and GetPlayerId(GetOwningPlayer(u))<8 then call zhv(GetPlayerId(GetOwningPlayer(u)),$96,1) endif endif endif endloop call GroupRemoveUnit(Boss_Spell_group1[i],GetEnumUnit()) call SetUnitUserData(GetEnumUnit(),0) call RemoveUnitBJ(GetEnumUnit(),$D) call DestroyEffect(Boss_Spell_eff[index]) call DestroyGroup(Boss_Spell_group1[index]) call DestroyGroup(Boss_Spell_group2[index]) call Boss_Spell_deallocate(index) endif endfunction function Boss_Ability004_func03_RHZX takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer t set t=Boss_Spell_data1[0] set Boss_Spell_data1[0]=i call ForGroup(Boss_Spell_group1[i],function Boss_Ability004_func04_RHZX) set Boss_Spell_data1[0]=t set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 if FirstOfGroup(Boss_Spell_group1[i])==null then call DestroyGroup(Boss_Spell_group1[i]) call DestroyGroup(Boss_Spell_group2[i]) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:180") endif endfunction function Boss_Ability004_func02_RHZX takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer index local integer ba local group g local unit u local real x local real y if UnitAlive(Boss_Spell_unit1[i])and Boss_Index_RHZX!=7 and Boss_Index_RHZX==4 and Boss_Spell_data2[i]<2 then set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 if Boss_Spell_data1[i]==0 then call TimerStart(GetExpiredTimer(),.03,true,function Boss_Ability004_func02_RHZX) call SetUnitAnimation(Boss_Spell_unit1[i],"attack") call SetUnitTimeScale(Boss_Spell_unit1[i],2) else if ModuloInteger(Boss_Spell_data1[i],5)==0 then call SetUnitAnimation(Boss_Spell_unit1[i],"attack") endif set Boss_Spell_X[i]=GetUnitX(Boss_Unit_RHZX) set Boss_Spell_Y[i]=GetUnitY(Boss_Unit_RHZX) if Boss_Spell_data1[i]<50 and ModuloInteger(Boss_Spell_data1[i],2)==1 then set x=Boss_Spell_X[i] set y=Boss_Spell_Y[i] set Boss_x[1]=GetRandomReal(0,6.28) set Boss_y[1]=GetRandomReal(-.25*bj_PI,.25*bj_PI) set Boss_z[1]=GetRandomReal(800,$44C) set ba=CreateBarrageTypeD(x+Boss_z[1]*Cos(Boss_x[1])*Cos(Boss_y[1]),y+Boss_z[1]*Sin(Boss_x[1])*Cos(Boss_y[1]),$96+Boss_z[1]*Sin(Boss_y[1]),x,y,$C8) call SetBarrageFlightRadian(ba,GetRandomReal(.25,.5)) set s__barrage_speed[ba]=0 set s__barrage_acceleration[ba]=.03125*.03125*$3E8 call LMv(s__barrage_model[ba],"Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile.mdl") call SetUnitScale(II[(s__barrage_model[ba])],((.75)*1.),0,0) call dAe(ba) endif if Boss_Spell_data1[i]>=100 then set Boss_x[2]=Boss_Spell_X[i] set Boss_y[2]=Boss_Spell_Y[i] set Boss_Spell_data1[i]=-1 set Boss_Spell_data2[i]=Boss_Spell_data2[i]+1 if Boss_Spell_data2[i]==2 then call NewTextTagInTarget_B(Boss_Unit_RHZX,"Again!!",18,$FF,$80,$80) else call NewTextTagInTarget_B(Boss_Unit_RHZX,"You think I will",18,$FF,$80,$80) endif call TimerStart(GetExpiredTimer(),.5,false,function Boss_Ability004_func02_RHZX) call SetUnitAnimation(Boss_Spell_unit1[i],"attack") call SetUnitTimeScale(Boss_Spell_unit1[i],1.5) set index=Boss_Spell_allocate() set Boss_Spell_unit1[index]=Boss_Spell_unit1[i] set Boss_Spell_X[index]=Boss_Spell_X[i] set Boss_Spell_Y[index]=Boss_Spell_Y[i] set Boss_Spell_group1[index]=CreateGroup() set Boss_Spell_group2[index]=CreateGroup() set Boss_x[0]=GetRandomReal(0,3.14) set Boss_y[0]=(bj_PI*2)/ 11. set Boss_z[0]=Boss_x[0]+(bj_PI*2) set i=index loop set CR=FALSE set index=Boss_Spell_allocate() set Boss_Spell_data1[index]=0 set Boss_Spell_X[index]=Cos(Boss_x[0])*50 set Boss_Spell_Y[index]=Sin(Boss_x[0])*50 set x=Boss_Spell_X[i]+Boss_Spell_X[index] set y=Boss_Spell_Y[i]+Boss_Spell_Y[index] set Boss_Spell_group1[index]=CreateGroup() set Boss_Spell_group2[index]=CreateGroup() set u=CreateUnit(Player($F),'e001',x,y,Boss_x[0]*bj_RADTODEG) call SetUnitX(u,x) call SetUnitY(u,y) call UnitAddAbility(u,'Amrf') call UnitRemoveAbility(u,'Amrf') call SetUnitFlyHeight(u,$96,0) call SetUnitScale(u,2,2,2) call SetUnitUserData(u,index) call GroupAddUnit(Boss_Spell_group1[i],u) set Boss_Spell_eff[index]=AddSpecialEffectTarget("Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile.mdl",u,"origin") set u=null set CR=true set Boss_x[0]=Boss_x[0]+Boss_y[0] exitwhen Boss_x[0]>=Boss_z[0] endloop call SetUnitAnimation(Boss_Spell_unit1[i],"attack") call TimerStart(NewTimer(i),.03,true,function Boss_Ability004_func03_RHZX) set index=0 loop exitwhen index>7 call zhv(index,100,.5) set index=index+1 endloop endif endif else if Boss_Index_RHZX==4 then set Boss_Index_RHZX=0 call PauseUnit(Boss_Spell_unit1[i],false) call SetUnitTimeScale(Boss_Spell_unit1[i],1) endif if Boss_Ability01_bufftimed_RHZX==null then call SetUnitNocontrol((GetUnitUserData((Boss_Unit_RHZX))),false) endif call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:181") endif endfunction function Boss_Ability004_func_RHZX takes nothing returns nothing local integer i local unit u local real x=GetUnitX(Boss_Unit_RHZX) local real y=GetUnitY(Boss_Unit_RHZX) call GroupEnumUnitsInRange(G,x,y,$44C,null) call GroupRemoveUnit(G,Boss_Unit_RHZX) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$3E8)then if IsUnitAliveAndEnemy(u,Boss_Unit_RHZX)and GetUnitAbilityLevel(u,'Avul')==0 then exitwhen true endif endif endloop if u!=null then set u=null set Boss_Index_RHZX=4 call SetUnitState(Boss_Unit_RHZX,UNIT_STATE_MANA,0) call zlv($FF,105,105,.27) call PauseUnit(Boss_Unit_RHZX,true) set i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=Boss_Unit_RHZX set Boss_Spell_data1[i]=-1 set Boss_Spell_data2[i]=0 if GetRandomInt(0,1)==0 then set Boss_Spell_Z[i]=1 else set Boss_Spell_Z[i]=-1 endif call TimerStart(NewTimer(i),.0,true,function Boss_Ability004_func02_RHZX) call SetUnitNocontrol((GetUnitUserData((Boss_Unit_RHZX))),true) call NewTextTagInTarget_B(Boss_Unit_RHZX,"All over to enlarge",18,$FF,$80,$80) set Boss_Ability02_lv2_RHZX[5]=GetRandomInt(50,60)*32 endif endfunction function Boss_Ability003_func05_RHZX takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local unit u if UnitAlive(Boss_Spell_unit1[i])then set Boss_Spell_X[i]=GetUnitX(Boss_Spell_unit1[i]) set Boss_Spell_Y[i]=GetUnitY(Boss_Spell_unit1[i]) endif set Boss_x[0]=Boss_Spell_X[i]-GetUnitX(Boss_Spell_unit2[i]) set Boss_y[0]=Boss_Spell_Y[i]-GetUnitY(Boss_Spell_unit2[i]) set Boss_z[0]=SquareRoot(Boss_x[0]*Boss_x[0]+Boss_y[0]*Boss_y[0]) if Boss_z[0]<50 then call SetUnitX(Boss_Spell_unit2[i],Boss_Spell_X[i]) call SetUnitY(Boss_Spell_unit2[i],Boss_Spell_Y[i]) if UnitAlive(Boss_Spell_unit1[i])and Boss_Index_RHZX!=7 then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",Boss_Spell_unit1[i],"origin")) call SetWidgetLife(Boss_Spell_unit1[i],GetWidgetLife(Boss_Spell_unit1[i])+GetUnitState(Boss_Spell_unit1[i],UNIT_STATE_MAX_LIFE)*.1) call SetUnitState(Boss_Spell_unit1[i],UNIT_STATE_MANA,GetUnitState(Boss_Spell_unit1[i],UNIT_STATE_MANA)+20) call GroupEnumUnitsInRange(G,Boss_Spell_X[i],Boss_Spell_Y[i],375,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,Boss_Spell_X[i],Boss_Spell_Y[i],300)then if IsUnitAliveAndEnemy(u,Boss_Spell_unit1[i])then call UnitDamageTargetBY((Boss_Spell_unit1[i]),(Boss_Spell_unit2[i]),((50000.)*1.),false,(false),false,false,(ConvertAttackType(0)),(ConvertDamageType($E)),(($C)*1.),("")) call Boss_buff_shaoshang2_add_RHZX(u) endif endif endloop endif call DestroyEffect(Boss_Spell_eff[i]) call KillUnit(Boss_Spell_unit2[i]) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:182") else set Boss_z[1]=50./ Boss_z[0] set Boss_x[1]=GetUnitX(Boss_Spell_unit2[i])+Boss_x[0]*Boss_z[1] set Boss_y[1]=GetUnitY(Boss_Spell_unit2[i])+Boss_y[0]*Boss_z[1] call SetUnitX(Boss_Spell_unit2[i],Boss_x[1]) call SetUnitY(Boss_Spell_unit2[i],Boss_y[1]) endif endfunction function Boss_Ability003_func04_RHZX takes nothing returns nothing local real x=Boss_x[0] local real y=Boss_y[0] local unit u local integer i if UnitAlive(Boss_Unit_RHZX)and Boss_Index_RHZX!=7 then set i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=Boss_Unit_RHZX set Boss_Spell_data1[i]=0 set Boss_Spell_X[i]=GetUnitX(Boss_Unit_RHZX) set Boss_Spell_Y[i]=GetUnitY(Boss_Unit_RHZX) set CR=FALSE set u=CreateUnit(Player($F),'e001',x,y,Atan2(Boss_Spell_Y[i]-y,Boss_Spell_X[i]-x)*bj_RADTODEG) call SetUnitX(u,x) call SetUnitY(u,y) call UnitAddAbility(u,'Amrf') call UnitRemoveAbility(u,'Amrf') call SetUnitFlyHeight(u,$96,0) set Boss_Spell_unit2[i]=u set Boss_Spell_eff[i]=AddSpecialEffectTarget("Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile.mdl",u,"origin") set u=null set CR=true call TimerStart(NewTimer(i),.03,true,function Boss_Ability003_func05_RHZX) endif endfunction function Boss_Ability003_func03_RHZX takes nothing returns nothing local integer i=Boss_Spell_data1[0] local unit u local real x=GetUnitX(GetEnumUnit()) local real y=GetUnitY(GetEnumUnit()) if UnitAlive(GetEnumUnit())then call GroupEnumUnitsInRange(G,x,y,$E1+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$E1)then if GetUnitAbilityLevel(u,'A0IP')==0 and IsUnitAliveAndEnemy(u,Boss_Unit_RHZX)then call UnitDamageTargetBY(((GetEnumUnit())),((u)),(((($9C4)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call Ymv(u,'A0IP','B025',.45) endif endif endloop if UnitAlive(Boss_Unit_RHZX)==FALSE or Boss_Index_RHZX==7 then call GroupRemoveUnit(Boss_Ability02_group_RHZX,GetEnumUnit()) call GroupRemoveUnit(Boss_Spell_group1[i],GetEnumUnit()) call KillUnit(GetEnumUnit()) endif else call GroupRemoveUnit(Boss_Ability02_group_RHZX,GetEnumUnit()) call GroupRemoveUnit(Boss_Spell_group1[i],GetEnumUnit()) endif endfunction function Boss_Ability003_func02_RHZX takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer t local unit u local real x local real y set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 if Boss_Spell_data1[i]==0 then call SetUnitInvulnerable(Boss_Unit_RHZX,true) call TimerStart(GetExpiredTimer(),.5,true,function Boss_Ability003_func02_RHZX) set x=GetUnitX(Boss_Unit_RHZX) set y=GetUnitY(Boss_Unit_RHZX) call GroupEnumUnitsInRange(G,x,y,450+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,450)then if IsUnitAliveAndEnemyNotAvul(u,Boss_Unit_RHZX)then call zKv((GetPlayerId((GetOwningPlayer(u)))),$FF,105,105,.5) call zhv((GetPlayerId((GetOwningPlayer(u)))),50,.5) call Gjv(u,75,Atan2(GetUnitY(u)-y,GetUnitX(u)-x),1,"KnockbackDust.mdl") endif endif endloop else if Boss_Spell_data1[i]<=8 then set Boss_z[0]=0 loop set Boss_x[0]=GetRandomReal(0,6.28) set Boss_y[0]=GetRandomReal(300,$3E8) set x=GetUnitX(Boss_Unit_RHZX)+Cos(Boss_x[0])*Boss_y[0] set y=GetUnitY(Boss_Unit_RHZX)+Sin(Boss_x[0])*Boss_y[0] set u=CreateUnit(Player($B),'n02X',x,y,(Boss_x[0]*bj_RADTODEG)+$B4) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",u,"origin")) call GroupAddUnit(Boss_Ability02_group_RHZX,u) call GroupAddUnit(Boss_Spell_group1[i],u) call GroupEnumUnitsInRange(G,x,y,$E1+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$E1)then if IsUnitAliveAndEnemy(u,Boss_Unit_RHZX)then call m2v(u,1,'A500','B500',true) endif endif endloop set Boss_z[0]=Boss_z[0]+1 exitwhen Boss_z[0]>1 endloop if Boss_Spell_data1[i]==8 then if Boss_Index_RHZX==3 then set Boss_Index_RHZX=0 call PauseUnit(Boss_Unit_RHZX,false) call SetUnitInvulnerable(Boss_Unit_RHZX,false) endif endif endif if Boss_Spell_data1[i]<$80 then set t=Boss_Spell_data1[0] set Boss_Spell_data1[0]=i call ForGroup(Boss_Spell_group1[i],function Boss_Ability003_func03_RHZX) set Boss_Spell_data1[0]=t else loop set u=FirstOfGroup(Boss_Spell_group1[i]) exitwhen u==null call GroupRemoveUnit(Boss_Ability02_group_RHZX,u) call GroupRemoveUnit(Boss_Spell_group1[i],u) call KillUnit(u) endloop call DestroyGroup(Boss_Spell_group1[i]) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:183") endif endif endfunction function Boss_Ability003_func_RHZX takes real life returns nothing local integer i set Boss_Index_RHZX=3 call PauseUnit(Boss_Unit_RHZX,true) if life<1 then set life=1 endif call SetWidgetLife(Boss_Unit_RHZX,life) set i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=Boss_Unit_RHZX set Boss_Spell_group1[i]=CreateGroup() set Boss_Spell_data1[i]=-1 if life<1 then set life=1 endif set Boss_Spell_X[i]=life call SetUnitAnimation(Boss_Spell_unit1[i],"stand") call SetUnitInvulnerable(Boss_Unit_RHZX,true) call SetUnitTimeScale(Boss_Spell_unit1[i],1) call TimerStart(NewTimer(i),.0,false,function Boss_Ability003_func02_RHZX) if Boss_Ability02_group_RHZX==null then set Boss_Ability02_group_RHZX=CreateGroup() endif endfunction function Boss_Ability002_func02_RHZX takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local real x local real y set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 if Boss_Spell_data1[i]<=7 then if Boss_Index_RHZX==2 then set Boss_x[0]=GetUnitX(Boss_Spell_unit1[i]) set Boss_y[0]=GetUnitY(Boss_Spell_unit1[i]) set Boss_z[0]=Deg2Rad(GetUnitFacing(Boss_Spell_unit1[i])) set Boss_x[1]=Boss_x[0]+Cos(Boss_z[0])*$96 set Boss_y[1]=Boss_y[0]+Sin(Boss_z[0])*$96 if Boss_Spell_data1[i]<=4 then if Boss_Spell_data1[i]==0 then call SetUnitX(Boss_Spell_unit2[i],Boss_x[1]) call SetUnitY(Boss_Spell_unit2[i],Boss_y[1]) call TimerStart(GetExpiredTimer(),.2,true,function Boss_Ability002_func02_RHZX) else if IsUnitInRangeXY(Boss_Spell_unit2[i],Boss_x[1],Boss_y[1],$96)then call SetUnitX(Boss_Spell_unit2[i],Boss_x[1]) call SetUnitY(Boss_Spell_unit2[i],Boss_y[1]) call m2v(Boss_Spell_unit2[i],1,'A500','B500',true) call UnitDamageTargetBY((Boss_Spell_unit1[i]),(Boss_Spell_unit2[i]),((10000.)*1.),false,(true),false,false,(ConvertAttackType(0)),(ConvertDamageType($E)),(($C)*1.),("|c00FF8080")) endif call SetUnitAnimation(Boss_Spell_unit1[i],"attack") if Boss_Spell_data1[i]==4 then call SetUnitTimeScale(Boss_Spell_unit1[i],1./ 3.) call TimerStart(GetExpiredTimer(),.5,true,function Boss_Ability002_func02_RHZX) endif endif else if Boss_Spell_data1[i]==5 then call DestroyEffect(AddSpecialEffectTarget("supershinythingy.mdl",Boss_Spell_unit1[i],"right hand")) elseif Boss_Spell_data1[i]==6 then call TimerStart(GetExpiredTimer(),.1,true,function Boss_Ability002_func02_RHZX) call SetUnitTimeScale(Boss_Spell_unit1[i],1) elseif Boss_Spell_data1[i]==7 then if IsUnitInRangeXY(Boss_Spell_unit2[i],Boss_x[1],Boss_y[1],$96)then call SetUnitX(Boss_Spell_unit2[i],Boss_x[1]) call SetUnitY(Boss_Spell_unit2[i],Boss_y[1]) call m2v(Boss_Spell_unit2[i],1,'A500','B500',true) call UnitDamageTargetBY((Boss_Spell_unit1[i]),(Boss_Spell_unit2[i]),((50000.)*1.),false,(true),false,false,(ConvertAttackType(0)),(ConvertDamageType($E)),((17)*1.),("|c00FF8080")) endif call TimerStart(GetExpiredTimer(),.02,true,function Boss_Ability002_func02_RHZX) set Boss_Spell_data2[i]=0 set Boss_Spell_X[i]=Cos(GetUnitFacing(Boss_Spell_unit1[i])*bj_DEGTORAD)*20 set Boss_Spell_Y[i]=Sin(GetUnitFacing(Boss_Spell_unit1[i])*bj_DEGTORAD)*20 set Boss_Spell_Z[i]=1.5 call QueueUnitAnimation(Boss_Spell_unit1[i],"stand") endif endif else call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:184") endif else set Boss_Spell_data2[i]=Boss_Spell_data2[i]+1 set x=GetUnitX(Boss_Spell_unit2[i])+Boss_Spell_X[i]*Boss_Spell_Z[i] set y=GetUnitY(Boss_Spell_unit2[i])+Boss_Spell_Y[i]*Boss_Spell_Z[i] set Boss_Spell_Z[i]=Boss_Spell_Z[i]-.04 if IsTerrainWalkable(x,y)then call SetUnitX(Boss_Spell_unit2[i],x) call SetUnitY(Boss_Spell_unit2[i],y) endif if ModuloInteger(Boss_Spell_data2[i],5)==0 then call UnitDamageTargetBY((Boss_Spell_unit1[i]),(Boss_Spell_unit2[i]),((500.)*1.),false,(false),false,false,(ConvertAttackType(0)),(ConvertDamageType($E)),(($A)*1.),("|c00FF8080")) endif if Boss_Spell_data2[i]>=25 then call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:185") endif endif endfunction function Boss_Ability002_func_RHZX takes nothing returns nothing local integer EvelId=GetHandleId(GetTriggerEventId()) local integer i if GetTriggerUnit()==Boss_Unit_RHZX and Boss_Index_RHZX<7 then if EvelId==274 then set i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=GetTriggerUnit() set Boss_Spell_unit2[i]=GetSpellTargetUnit() set Boss_Spell_data1[i]=-1 call TimerStart(NewTimer(i),.0,true,function Boss_Ability002_func02_RHZX) call SetUnitAnimation(Boss_Spell_unit1[i],"attack") call SetUnitTimeScale(Boss_Spell_unit1[i],3.5) call NewTextTagInTarget_B(GetTriggerUnit(),"I see you running!",18,$FF,$80,$80) elseif EvelId==272 then set Boss_Index_RHZX=2 else if Boss_Index_RHZX==2 then set Boss_Index_RHZX=0 call SetUnitTimeScale(GetTriggerUnit(),1) endif endif endif endfunction function Boss_Ability001_func_enumunit_RHZX takes nothing returns nothing local integer data=(GetUnitUserData((GetEnumUnit()))) local unit u local group g=CreateGroup() local integer l=3 local integer t=0 call GroupAddGroup(G,g) loop set u=FirstOfGroup(g) exitwhen u==null call GroupRemoveUnit(g,u) if IsUnitType(u,UNIT_TYPE_HERO)and UnitAlive(u)then if Boss_Ability01_bufflv_RHZX[(GetUnitUserData((u)))]<=l then if Boss_Ability01_bufflv_RHZX[(GetUnitUserData((u)))]==l then set t=t+1 if GetRandomInt(1,t)==1 then set Boss_Ability01_bufflv_RHZX[(GetUnitUserData((u)))]=Boss_Ability01_bufflv_RHZX[(GetUnitUserData((u)))]+1 set Boss_Spell_unit1[data]=u endif else set t=1 set l=Boss_Ability01_bufflv_RHZX[(GetUnitUserData((u)))] set Boss_Ability01_bufflv_RHZX[(GetUnitUserData((u)))]=Boss_Ability01_bufflv_RHZX[(GetUnitUserData((u)))]+1 set Boss_Spell_unit1[data]=u endif endif else call GroupRemoveUnit(G,u) endif endloop call DestroyGroup(g) if Boss_Spell_unit1[data]!=null then set CR=FALSE set u=CreateUnit(Player($F),'e001',GetUnitX(Boss_Spell_unit1[data]),GetUnitY(Boss_Spell_unit1[data]),0) set Boss_Spell_unit2[data]=u set CR=true if Boss_Ability01_bufflv_RHZX[(GetUnitUserData((Boss_Spell_unit1[data])))]==1 then call thv("|c00FF8080"+GetPlayerName(GetOwningPlayer(Boss_Spell_unit1[data]))+"|r|c00808080, catch!|r",GetUnitX(Boss_Spell_unit1[data]),GetUnitY(Boss_Spell_unit1[data]),$FA,.075,.05,bj_PI/ 2,2,2.5) endif set Boss_Spell_data1[data]=(GetUnitUserData((Boss_Spell_unit1[data]))) else set Boss_x[0]=GetRandomReal(0,6.28) set Boss_y[0]=GetRandomReal(300,$BB8) set Boss_x[1]=GetUnitX(Boss_Unit_RHZX)+Cos(Boss_x[0])*Boss_y[0] set Boss_y[1]=GetUnitY(Boss_Unit_RHZX)+Sin(Boss_x[0])*Boss_y[0] set CR=FALSE set u=CreateUnit(Player($F),'e001',Boss_x[1],Boss_y[1],0) set Boss_Spell_unit2[data]=u set CR=true endif set u=null set g=null endfunction function Boss_Ability001_func002_RHZX takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer data local unit u local group g local boolean b=true if Boss_Spell_data2[i]<$A then if Boss_Index_RHZX<6 then set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 if Boss_Spell_data1[i]>=$80 then if Boss_Spell_data2[i]>0 then set g=Boss_Spell_group1[i] set Boss_Spell_group1[i]=Boss_Spell_group2[i] set Boss_Spell_group2[i]=g loop set u=FirstOfGroup(g) exitwhen u==null call GroupRemoveUnit(g,u) set data=(GetUnitUserData((u))) if Boss_Spell_data2[data]==Boss_Spell_data2[i]then call DestroyEffect(Boss_Spell_eff[data]) call Boss_Spell_deallocate(data) call RemoveUnitBJ(u,$E) else call GroupAddUnit(Boss_Spell_group1[i],u) endif endloop set g=null set Boss_Spell_data2[i]=Boss_Spell_data2[i]-1 set Boss_Spell_data1[i]=0 call thv("|c00FF8080"+I2S(Boss_Spell_data2[i])+"0%",GetUnitX(Boss_Unit_RHZX),GetUnitY(Boss_Unit_RHZX),$FA,.075,.05,bj_PI/ 2,2,2.5) else set b=false endif endif if b then set Boss_Spell_Z[i]=Boss_Spell_Z[i]+.08726 set Boss_x[0]=GetUnitX(Boss_Unit_RHZX) set Boss_y[0]=GetUnitY(Boss_Unit_RHZX) set Boss_x[1]=Cos(Boss_Spell_Z[i]) set Boss_y[1]=Sin(Boss_Spell_Z[i]) set g=Boss_Spell_group1[i] set Boss_Spell_group1[i]=Boss_Spell_group2[i] set Boss_Spell_group2[i]=g loop set u=FirstOfGroup(g) exitwhen u==null call GroupAddUnit(Boss_Spell_group1[i],u) call GroupRemoveUnit(g,u) set data=(GetUnitUserData((u))) if Boss_Spell_Z[data]<$FA then set Boss_Spell_Z[data]=Boss_Spell_Z[data]+25 endif set Boss_x[2]=Boss_x[0]+(Boss_Spell_X[data]*Boss_x[1]+Boss_Spell_Y[data]*Boss_y[1])*Boss_Spell_Z[data] set Boss_y[2]=Boss_y[0]+(Boss_Spell_Y[data]*Boss_x[1]-Boss_Spell_X[data]*Boss_y[1])*Boss_Spell_Z[data] call SetUnitFacing(u,Atan2(Boss_y[2]-GetUnitY(u),Boss_x[2]-GetUnitX(u))*bj_RADTODEG) call SetUnitX(u,Boss_x[2]) call SetUnitY(u,Boss_y[2]) endloop set g=null else call DestroyGroup(Boss_Spell_group1[i]) call DestroyGroup(Boss_Spell_group2[i]) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:186") set Boss_Ability01_id_RHZX=null endif else set g=Boss_Spell_group1[i] loop set u=FirstOfGroup(g) exitwhen u==null call GroupRemoveUnit(g,u) set data=(GetUnitUserData((u))) call DestroyEffect(Boss_Spell_eff[data]) call Boss_Spell_deallocate(data) call RemoveUnitBJ(u,$F) endloop set g=null call DestroyGroup(Boss_Spell_group1[i]) call DestroyGroup(Boss_Spell_group2[i]) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:187") set Boss_Ability01_id_RHZX=null endif else set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 if Boss_Spell_data1[i]==320 then set Boss_Ability01_bufftimed_RHZX=null call SetUnitNocontrol((GetUnitUserData((Boss_Unit_RHZX))),false) endif if Boss_Spell_data1[i]<=32 then if Boss_Index_RHZX<6 then set Boss_Spell_Z[i]=Boss_Spell_Z[i]+.18726 set Boss_x[0]=GetUnitX(Boss_Unit_RHZX) set Boss_y[0]=GetUnitY(Boss_Unit_RHZX) set Boss_x[1]=Cos(Boss_Spell_Z[i]) set Boss_y[1]=Sin(Boss_Spell_Z[i]) set g=Boss_Spell_group1[i] set Boss_Spell_group1[i]=Boss_Spell_group2[i] set Boss_Spell_group2[i]=g loop set u=FirstOfGroup(g) exitwhen u==null call GroupAddUnit(Boss_Spell_group1[i],u) call GroupRemoveUnit(g,u) set data=(GetUnitUserData((u))) if Boss_Spell_Z[data]<$FA then set Boss_Spell_Z[data]=Boss_Spell_Z[data]+25 endif set Boss_x[2]=Boss_x[0]+(Boss_Spell_X[data]*Boss_x[1]+Boss_Spell_Y[data]*Boss_y[1])*Boss_Spell_Z[data] set Boss_y[2]=Boss_y[0]+(Boss_Spell_Y[data]*Boss_x[1]-Boss_Spell_X[data]*Boss_y[1])*Boss_Spell_Z[data] set Boss_x[3]=Boss_x[2]-GetUnitX(u) set Boss_y[3]=Boss_y[2]-GetUnitY(u) if Boss_Spell_data1[i]==32 then set Boss_z[3]=40/ SquareRoot(Boss_x[3]*Boss_x[3]+Boss_y[3]*Boss_y[3]) set Boss_Spell_X[data]=Boss_x[3]*Boss_z[3] set Boss_Spell_Y[data]=Boss_y[3]*Boss_z[3] set Boss_Spell_Z[data]=Sin(.3)*40 endif call SetUnitFacing(u,Atan2(Boss_y[3],Boss_x[3])*bj_RADTODEG) call SetUnitX(u,Boss_x[2]) call SetUnitY(u,Boss_y[2]) endloop set g=null if Boss_Spell_data1[i]==32 then if Boss_Index_RHZX==1 then set Boss_Index_RHZX=0 call PauseUnit(Boss_Unit_RHZX,false) call QueueUnitAnimation(Boss_Unit_RHZX,"stand") call GroupEnumUnitsInRange(G,GetUnitX(Boss_Unit_RHZX),GetUnitY(Boss_Unit_RHZX),$7D0+75,null) call ForGroup(Boss_Spell_group1[i],function Boss_Ability001_func_enumunit_RHZX) set Boss_Ability01_id_RHZX=null else set g=Boss_Spell_group1[i] loop set u=FirstOfGroup(g) exitwhen u==null call GroupRemoveUnit(g,u) set data=(GetUnitUserData((u))) call DestroyEffect(Boss_Spell_eff[data]) call Boss_Spell_deallocate(data) call RemoveUnitBJ(u,16) endloop set g=null call DestroyGroup(Boss_Spell_group1[i]) call DestroyGroup(Boss_Spell_group2[i]) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:188") set Boss_Ability01_id_RHZX=null set Boss_Ability01_bufftimed_RHZX=null endif endif else call PauseUnit(Boss_Unit_RHZX,false) call QueueUnitAnimation(Boss_Unit_RHZX,"stand") set g=Boss_Spell_group1[i] loop set u=FirstOfGroup(g) exitwhen u==null call GroupRemoveUnit(g,u) set data=(GetUnitUserData((u))) call DestroyEffect(Boss_Spell_eff[data]) call Boss_Spell_deallocate(data) call RemoveUnitBJ(u,17) endloop set g=null call DestroyGroup(Boss_Spell_group1[i]) call DestroyGroup(Boss_Spell_group2[i]) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:189") set Boss_Ability01_id_RHZX=null set Boss_Ability01_bufftimed_RHZX=null endif else set g=Boss_Spell_group1[i] set Boss_Spell_group1[i]=Boss_Spell_group2[i] set Boss_Spell_group2[i]=g loop set u=FirstOfGroup(g) exitwhen u==null call GroupAddUnit(Boss_Spell_group1[i],u) call GroupRemoveUnit(g,u) set data=(GetUnitUserData((u))) set Boss_x[0]=GetUnitX(u) set Boss_y[0]=GetUnitY(u) call MoveLocation(Boss_Point,Boss_x[0],Boss_y[0]) set Boss_z[0]=GetLocationZ(Boss_Point)+GetUnitFlyHeight(u) set Boss_x[1]=Boss_x[0]+Boss_Spell_X[data] set Boss_y[1]=Boss_y[0]+Boss_Spell_Y[data] set Boss_z[1]=Boss_z[0]+Boss_Spell_Z[data] call SetUnitX(u,Boss_x[1]) call SetUnitY(u,Boss_y[1]) call MoveLocation(Boss_Point,Boss_x[1],Boss_y[1]) call SetUnitFlyHeight(u,Boss_z[1]-GetLocationZ(Boss_Point),0) set Boss_x[2]=GetUnitX(Boss_Spell_unit2[data]) set Boss_y[2]=GetUnitY(Boss_Spell_unit2[data]) call MoveLocation(Boss_Point,Boss_x[2],Boss_y[2]) set Boss_x[2]=Boss_x[2]-Boss_x[1] set Boss_y[2]=Boss_y[2]-Boss_y[1] set Boss_z[2]=GetLocationZ(Boss_Point)-Boss_z[1] set Boss_x[3]=SquareRoot(Boss_x[2]*Boss_x[2]+Boss_y[2]*Boss_y[2]+Boss_z[2]*Boss_z[2]) if Boss_x[3]>40. then set Boss_y[3]=Pow(40./ Boss_x[3],1.5) set Boss_x[2]=(Boss_x[1]+Boss_x[2]*Boss_y[3])-Boss_x[0] set Boss_y[2]=(Boss_y[1]+Boss_y[2]*Boss_y[3])-Boss_y[0] set Boss_z[2]=(Boss_z[1]+Boss_z[2]*Boss_y[3])-Boss_z[0] set Boss_z[3]=40./ SquareRoot(Boss_x[2]*Boss_x[2]+Boss_y[2]*Boss_y[2]+Boss_z[2]*Boss_z[2]) set Boss_Spell_X[data]=Boss_x[2]*Boss_z[3] set Boss_Spell_Y[data]=Boss_y[2]*Boss_z[3] set Boss_Spell_Z[data]=Boss_z[2]*Boss_z[3] call SetUnitFacing(u,Atan2(Boss_y[2],Boss_x[2])*bj_RADTODEG) else call GroupRemoveUnit(Boss_Spell_group1[i],u) call KillUnit(u) call RemoveUnitBJ(Boss_Spell_unit2[data],18) call DestroyEffect(Boss_Spell_eff[data]) set Boss_Ability01_bufflv_RHZX[Boss_Spell_data1[data]]=Boss_Ability01_bufflv_RHZX[Boss_Spell_data1[data]]-1 call Boss_Spell_deallocate(data) call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl",Boss_x[1],Boss_y[1])) call GroupEnumUnitsInRange(G,Boss_x[1],Boss_y[1],325,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,Boss_x[1],Boss_y[1],$FA)and GetUnitAbilityLevel(u,'Avul')==0 then if IsUnitAliveAndEnemy(u,Boss_Unit_RHZX)then call UnitDamageTargetBY((Boss_Unit_RHZX),(u),((100000.)*1.),false,(true),false,false,(ConvertAttackType(0)),(ConvertDamageType($E)),(($F)*1.),("|c00FF8080")) if UnitAlive(u)then call Boss_buff_shaoshang_add_RHZX(u,Boss_Unit_RHZX,0) endif endif endif endloop endif endloop if FirstOfGroup(Boss_Spell_group1[i])==null and Boss_Spell_data1[i]>=320 then call DestroyGroup(Boss_Spell_group1[i]) call DestroyGroup(Boss_Spell_group2[i]) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:190") endif set g=null endif endif endfunction function Boss_Ability001_func_RHZX takes real t returns nothing local integer i local integer data local unit u local real x local real y local real z if Boss_Ability01_id_RHZX==null then set i=Boss_Spell_allocate() set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=0 set Boss_Spell_X[i]=t set Boss_Spell_group1[i]=CreateGroup() set Boss_Spell_group2[i]=CreateGroup() set Boss_Ability01_id_RHZX=NewTimer(i) call TimerStart(Boss_Ability01_id_RHZX,.03125,true,function Boss_Ability001_func002_RHZX) call thv("|c00FF80800%",GetUnitX(Boss_Unit_RHZX),GetUnitY(Boss_Unit_RHZX),$FA,.075,.05,bj_PI/ 2,2,2.5) else set i=(alloc__hpv(GetHandleId((Boss_Ability01_id_RHZX)))) set Boss_Spell_data1[i]=0 set Boss_Spell_X[i]=Boss_Spell_X[i]+t if Boss_Spell_X[i]>32 then set Boss_Spell_X[i]=Boss_Spell_X[i]-32 set Boss_Spell_data2[i]=Boss_Spell_data2[i]+1 call thv("|c00FF8080"+I2S(Boss_Spell_data2[i])+"0%",GetUnitX(Boss_Unit_RHZX),GetUnitY(Boss_Unit_RHZX),$FA,.075,.05,bj_PI/ 2,2,2.5) if Boss_Spell_data2[i]<$A then set x=GetUnitX(Boss_Unit_RHZX) set y=GetUnitY(Boss_Unit_RHZX) set z=Boss_Spell_data2[i]*.69813 set CR=FALSE set data=Boss_Spell_allocate() set Boss_Spell_unit1[data]=null set Boss_Spell_data1[data]=0 set Boss_Spell_data2[data]=Boss_Spell_data2[i] set Boss_Spell_X[data]=Cos(z) set Boss_Spell_Y[data]=Sin(z) set Boss_Spell_Z[data]=0 set u=CreateUnit(Player($F),'e001',x,y,z/ bj_DEGTORAD) call SetUnitX(u,x) call SetUnitY(u,y) call SetUnitScale(u,1.5,0,0) call UnitAddAbility(u,'Amrf') call UnitRemoveAbility(u,'Amrf') call SetUnitFlyHeight(u,$C8,0) set Boss_Spell_eff[data]=AddSpecialEffectTarget("s_lavabomb.mdl",u,"origin") call SetUnitUserData(u,data) call GroupAddUnit(Boss_Spell_group1[i],u) set u=null set CR=true else call SetUnitNocontrol((GetUnitUserData((Boss_Unit_RHZX))),true) call NewTextTagInTarget_B(Boss_Unit_RHZX,"You are so annoying!",18,$FF,0,0) set Boss_Ability01_bufftimed_RHZX=Boss_Ability01_id_RHZX call SetUnitAnimation(Boss_Unit_RHZX,"attack") call SetUnitTimeScale(Boss_Unit_RHZX,1) call PauseUnit(Boss_Unit_RHZX,true) set Boss_Index_RHZX=1 endif endif endif endfunction function Boss_Revive_004_RHZX takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local unit u local real x local real y set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 if Boss_Spell_data1[i]==1 then call ShowUnit(Boss_Unit_RHZX,true) call SetWidgetLife(Boss_Unit_RHZX,$2710*$2710) call SetUnitAnimation(Boss_Unit_RHZX,"birth") call NewTextTagInTarget_B(Boss_Unit_RHZX,"You can not stop me! Regret for your actions to pay a painful price!",18,$FF,$80,$80) call DestroyEffect(Boss_Spell_eff[i]) call RemoveUnitBJ(Boss_Spell_unit1[i],19) call TimerStart(GetExpiredTimer(),.3,true,function Boss_Revive_004_RHZX) else set x=GetUnitX(Boss_Unit_RHZX) set y=GetUnitY(Boss_Unit_RHZX) call GroupEnumUnitsInRange(G,x,y,450+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,450)then if IsUnitAliveAndEnemyNotAvul(u,Boss_Unit_RHZX)then call zhv((GetPlayerId((GetOwningPlayer(u)))),50,.5) call Gjv(u,75,Atan2(GetUnitY(u)-y,GetUnitX(u)-x),1,"KnockbackDust.mdl") endif endif endloop if Boss_Spell_data1[i]>=4 then call SetUnitInvulnerable(Boss_Unit_RHZX,false) call PauseUnit(Boss_Unit_RHZX,false) call SetUnitState(Boss_Unit_RHZX,UNIT_STATE_MANA,0) set Boss_Index_RHZX=0 set Boss_Ability05_cd_RHZX=0 set Boss_Ability02_lv_RHZX=0 call SetUnitTimeScale(Boss_Unit_RHZX,1) call RemoveUnitBJ(Boss_Unit_2_RHZX,20) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:191") endif endif endfunction function Boss_Revive_003_RHZX takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local real x=$5EBA local real y=-$2DB4 if UnitAlive(Boss_Unit_2_RHZX)then if IsUnitInRangeXY(Boss_Unit_2_RHZX,x,y,100)then call SetUnitX(Boss_Unit_RHZX,x) call SetUnitY(Boss_Unit_RHZX,y) call TimerStart(GetExpiredTimer(),1,true,function Boss_Revive_004_RHZX) call ShowUnit(Boss_Unit_2_RHZX,false) set Boss_Spell_data1[i]=0 set CR=FALSE set Boss_Spell_unit1[i]=CreateUnit(Player($F),'e001',x,y,0) call SetUnitX(Boss_Spell_unit1[i],x) call SetUnitY(Boss_Spell_unit1[i],y) call SetUnitScale(Boss_Spell_unit1[i],6,0,0) set Boss_Spell_eff[i]=AddSpecialEffectTarget("Abilities\\Spells\\Undead\\Darksummoning\\DarkSummonTarget.mdl",Boss_Spell_unit1[i],"origin") set CR=true else call IssuePointOrderById(Boss_Unit_2_RHZX,$D0012,$5E42,-9800) endif else call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:192") endif endfunction function Boss_Revive_002_RHZX takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local real x=GetUnitX(Boss_Spell_unit1[i]) local real y=GetUnitY(Boss_Spell_unit1[i]) if Boss_Spell_data1[i]==0 then set Boss_Spell_data1[i]=1 call TimerStart(GetExpiredTimer(),.3,true,function Boss_Revive_002_RHZX) else set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 endif set Boss_x[0]=0 set Boss_y[0]=(6-Boss_Spell_data1[i])*100 set Boss_z[0]=Boss_Spell_data1[i]*.08 loop set Boss_x[1]=x+Cos(Boss_z[0]+Boss_x[0]*1.0472)*Boss_y[0] set Boss_y[1]=y+Sin(Boss_z[0]+Boss_x[0]*1.0472)*Boss_y[0] call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Demon\\DemonLargeDeathExplode\\DemonLargeDeathExplode.mdl",Boss_x[1],Boss_y[1])) set Boss_x[0]=Boss_x[0]+1 exitwhen Boss_x[0]>6 endloop if Boss_Spell_data1[i]==6 then call RemoveUnitBJ(Boss_Spell_unit1[i],21) set Boss_Unit_2_RHZX=CreateUnit(Player($B),'nzom',x,y,270) call IssuePointOrderById(Boss_Unit_2_RHZX,$D0012,$5EBA,-$2DB4) call TimerStart(GetExpiredTimer(),.1,true,function Boss_Revive_003_RHZX) endif endfunction function Boss_Revive_RHZX takes nothing returns nothing local integer i=Boss_Spell_allocate() local unit u local real x=GetUnitX(Boss_Unit_RHZX) local real y=GetUnitY(Boss_Unit_RHZX) call SetWidgetLife(Boss_Unit_RHZX,$5F5E100) call SetUnitInvulnerable(Boss_Unit_RHZX,true) call PauseUnit(Boss_Unit_RHZX,true) call ShowUnit(Boss_Unit_RHZX,false) set Boss_Index_RHZX=7 set CR=FALSE set u=CreateUnit(Player($B),GetUnitTypeId(Boss_Unit_RHZX),x,y,GetUnitFacing(Boss_Unit_RHZX)) call SetUnitX(u,x) call SetUnitY(u,y) call SetUnitScale(u,6,6,6) call UnitAddAbility(u,'Aloc') call PauseUnit(u,true) call SetUnitAnimation(u,"death") call SetUnitAnimation(Boss_Unit_RHZX,"death") set Boss_Spell_unit1[i]=u set u=null set CR=true set Boss_Spell_data1[i]=0 call TimerStart(NewTimer(i),1.5,FALSE,function Boss_Revive_002_RHZX) call NewTextTagInTarget_B(Boss_Unit_RHZX,"I can not die yet!",18,$FF,$80,$80) endfunction function Boss_Damager_RHZX takes nothing returns nothing local real life=GetWidgetLife(Boss_Unit_RHZX) local real r local real v=0 if Boss_Index_RHZX<7 then if Boss_Index_RHZX==3 or GetUnitAbilityLevel(Boss_Unit_RHZX,'A0SX')>0 then call DamageMinus(GetDamage()) endif if Boss_Index_RHZX!=3 and Boss_Index_RHZX!=6 and Boss_Ability01_bufftimed_RHZX==null and((Control_use[(GetUnitUserData(((Boss_Unit_RHZX))))])or GetUnitAbilityLevel(Boss_Unit_RHZX,'BUdd')>0 or GetUnitAbilityLevel(Boss_Unit_RHZX,'B01N')>0 or GetUnitAbilityLevel(Boss_Unit_RHZX,'B06P')>0)then call Boss_Ability001_func_RHZX(1.5) endif if Boss_Ability02_lv_RHZX<3 and Boss_Index_RHZX!=1 and Boss_Index_RHZX!=3 and Boss_Index_RHZX!=5 and Boss_Index_RHZX!=6 then set r=life-GetDamage() if r<=Boss_Ability02_lv2_RHZX[Boss_Ability02_lv_RHZX]then set Boss_Ability02_lv_RHZX=Boss_Ability02_lv_RHZX+1 call Boss_Ability003_func_RHZX(r) endif endif if Boss_Index_RHZX!=3 then set r=GetWidgetLife(Boss_Unit_RHZX)-GetDamage() if r<1 or PF>=GetUnitState(Boss_Unit_RHZX,UNIT_STATE_MAX_LIFE)+$1E8480 then call Boss_Revive_RHZX() endif endif endif endfunction function Boss_Atk_RHZX takes nothing returns nothing local real life=GetWidgetLife(Boss_Unit_RHZX) local real maxlife=GetUnitState(Boss_Unit_RHZX,UNIT_STATE_MAX_LIFE) local real v=life/ maxlife if Boss_Index_RHZX==0 and v<=.85 then call IssueTargetOrderById(Boss_Unit_RHZX,$D022F,(MF)) endif endfunction function Boss_Start_RHZX takes nothing returns nothing local real life=GetWidgetLife(Boss_Unit_RHZX) local real maxlife=GetUnitState(Boss_Unit_RHZX,UNIT_STATE_MAX_LIFE) local real v if Boss_Index_RHZX!=7 then if Boss_Index_RHZX==8 then call PauseTimer(GetExpiredTimer()) call DestroyTimer(GetExpiredTimer()) return endif if Boss_Ability05_cd_RHZX>0 then set Boss_Ability05_cd_RHZX=Boss_Ability05_cd_RHZX-1 endif if Boss_Ability02_lv2_RHZX[5]>0 then set Boss_Ability02_lv2_RHZX[5]=Boss_Ability02_lv2_RHZX[5]-1 endif if life>0 and maxlife>0 then set v=life/ maxlife if Boss_Ability01_bufftimed_RHZX==null then if Boss_Index_RHZX!=3 and Boss_Index_RHZX!=6 and((Control_use[(GetUnitUserData(((Boss_Unit_RHZX))))])or GetUnitAbilityLevel(Boss_Unit_RHZX,'BUdd')>0 or GetUnitAbilityLevel(Boss_Unit_RHZX,'B01N')>0 or GetUnitAbilityLevel(Boss_Unit_RHZX,'B06P')>0)then call Boss_Ability001_func_RHZX(1) endif endif if Boss_Index_RHZX==0 and GetUnitCurrentOrder(Boss_Unit_RHZX)!=$D0005 then if Boss_Ability05_cd_RHZX==0 then call Boss_Ability005_func_RHZX() else if Boss_Ability02_lv2_RHZX[5]<=0 then call Boss_Ability004_func_RHZX() endif endif endif if Boss_Ability02_lv_RHZX>0 then if life>Boss_Ability02_lv2_RHZX[Boss_Ability02_lv_RHZX-1]+$2DC6C0 then set Boss_Ability02_lv_RHZX=Boss_Ability02_lv_RHZX-1 endif endif endif endif endfunction function Boss_Create_005_RHZX takes nothing returns nothing local integer i=Boss_Spell_data1[0] local integer index=(GetUnitUserData((GetEnumUnit()))) local real x local real y local unit u local group g set Boss_Spell_data1[index]=Boss_Spell_data1[index]-1 set x=GetUnitX(GetEnumUnit())+Boss_Spell_X[index] set y=GetUnitY(GetEnumUnit())+Boss_Spell_Y[index] if IsTerrainWalkable(x,y)then call SetUnitX(GetEnumUnit(),x) call SetUnitY(GetEnumUnit(),y) call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\SteamTank\\SteamTankImpact.mdl",x,y)) call GroupEnumUnitsInRange(G,x,y,$FA,null) call GroupRemoveUnit(G,Boss_Unit_RHZX) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$AF)and not IsUnitInGroup(u,Boss_Spell_group2[i])then if UnitAlive(u)and GetUnitAbilityLevel(u,'Avul')==0 then call GroupAddUnit(Boss_Spell_group2[i],u) call GroupAddUnit(Boss_Spell_group1[index],u) endif endif endloop set g=Boss_Spell_group1[index] set Boss_Spell_group1[index]=Boss_Spell_group2[index] set Boss_Spell_group2[index]=g loop set u=FirstOfGroup(g) exitwhen u==null call GroupAddUnit(Boss_Spell_group1[index],u) call GroupRemoveUnit(g,u) set Boss_x[0]=GetUnitX(u) set Boss_y[0]=GetUnitY(u) if IsUnitInRange(u,GetEnumUnit(),$FA)then set Boss_x[1]=x+(Boss_x[0]+Boss_Spell_X[index]-x)*.8 set Boss_y[1]=y+(Boss_y[0]+Boss_Spell_Y[index]-y)*.8 call SetUnitPosition(u,Boss_x[1],Boss_y[1]) elseif IsUnitInRange(u,GetEnumUnit(),300)then set Boss_x[1]=x+(Boss_x[0]+Boss_Spell_X[index]-x)*.9 set Boss_y[1]=y+(Boss_y[0]+Boss_Spell_Y[index]-y)*.9 call SetUnitPosition(u,Boss_x[1],Boss_y[1]) else call GroupRemoveUnit(Boss_Spell_group2[i],u) call GroupRemoveUnit(Boss_Spell_group1[index],u) endif endloop set g=null else set Boss_Spell_data1[index]=-100 endif if Boss_Spell_data1[index]<=-20 then call DestroyEffect(AddSpecialEffect("magmaburst.mal",x,y)) call GroupEnumUnitsInRange(G,x,y,425,null) call GroupRemoveUnit(G,Boss_Unit_RHZX) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,350)then if UnitAlive(u)and GetUnitAbilityLevel(u,'Avul')==0 then call UnitDamageTargetBY((Boss_Unit_RHZX),(u),(($F4240)*1.),false,(false),false,false,(ConvertAttackType(5)),(ConvertDamageType(26)),((0)*1.),("")) if IsUnitType(u,UNIT_TYPE_HERO)and GetPlayerId(GetOwningPlayer(u))<8 then call zhv(GetPlayerId(GetOwningPlayer(u)),$96,1) endif endif endif endloop call GroupRemoveUnit(Boss_Spell_group1[i],GetEnumUnit()) call SetUnitUserData(GetEnumUnit(),0) call RemoveUnitBJ(GetEnumUnit(),22) call DestroyEffect(Boss_Spell_eff[index]) call DestroyGroup(Boss_Spell_group1[index]) call DestroyGroup(Boss_Spell_group2[index]) call Boss_Spell_deallocate(index) endif endfunction function Boss_Create_004_RHZX takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer t if Boss_Spell_data1[i]==0 then set Boss_Spell_data1[i]=1 call TimerStart(GetExpiredTimer(),.03,true,function Boss_Create_004_RHZX) set i=0 loop call zhv(i,$96,1) set i=i+1 exitwhen i>7 endloop else set t=Boss_Spell_data1[0] set Boss_Spell_data1[0]=i call ForGroup(Boss_Spell_group1[i],function Boss_Create_005_RHZX) set Boss_Spell_data1[0]=t set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 if Boss_Spell_data1[i]==5 then call PauseUnit(Boss_Unit_RHZX,false) call SetUnitInvulnerable(Boss_Unit_RHZX,false) call SetUnitAnimation(Boss_Unit_RHZX,"stand") call SetUnitTimeScale(Boss_Unit_RHZX,1) call SetUnitState(Boss_Unit_RHZX,UNIT_STATE_MANA,0) set Boss_Ability02_lv2_RHZX[5]=100*32 call TimerStart(CreateTimer(),.03125,true,function Boss_Start_RHZX) endif if FirstOfGroup(Boss_Spell_group1[i])==null and Boss_Spell_data1[i]>=5 then call DestroyGroup(Boss_Spell_group1[i]) call DestroyGroup(Boss_Spell_group2[i]) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:193") endif endif endfunction function Boss_Create_003_RHZX takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local real x=$5EBA local real y=-$2DB4 local unit u set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 call SetUnitScale(Boss_Unit_RHZX,3+Boss_Spell_data1[i]*.06,0,0) call GroupEnumUnitsInRange(G,x,y,450,null) call GroupRemoveUnit(G,Boss_Unit_RHZX) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,400)then if UnitAlive(u)and GetUnitAbilityLevel(u,'Avul')==0 then call UnitDamageTargetBY((Boss_Unit_RHZX),(u),((GetUnitState(u,UNIT_STATE_MAX_LIFE)*.05)*1.),false,(false),false,false,(ConvertAttackType(5)),(ConvertDamageType(26)),((0)*1.),("")) endif endif endloop if Boss_Spell_data1[i]==50 then set Boss_Spell_data1[i]=0 call NewTextTagInTarget_B(Boss_Unit_RHZX,"After the baptism of lava, my strength made me stronger, but you can only descend under my power!!",18,$FF,$80,$80) call DestroyEffect(Boss_Spell_eff[i]) call RemoveUnitBJ(Boss_Spell_unit1[i],23) call SetUnitAnimation(Boss_Unit_RHZX,"attack") call TimerStart(GetExpiredTimer(),.7,true,function Boss_Create_004_RHZX) set Boss_Spell_eff[i]=null endif endfunction function Boss_Create_002_RHZX takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 call thv("|c00cb1d1d"+I2S($A*Boss_Spell_data1[i])+"%..",$5EBA,-$2DB4,50,.06,.04,bj_PI/ 2,1,1.5) if Boss_Spell_data1[i]==1 then set Boss_Unit_RHZX=CreateUnit(Player($B),'nfgl',$5EBA,-$2DB4,270) call SetUnitX(Boss_Unit_RHZX,$5EBA) call SetUnitY(Boss_Unit_RHZX,-$2DB4) call PauseUnit(Boss_Unit_RHZX,true) call SetUnitInvulnerable(Boss_Unit_RHZX,true) call SetUnitAnimation(Boss_Unit_RHZX,"birth") call ShowUnit(Boss_Unit_RHZX,false) elseif Boss_Spell_data1[i]==2 then call SetUnitTimeScale(Boss_Unit_RHZX,-1) elseif Boss_Spell_data1[i]==5 then call ShowUnit(Boss_Unit_RHZX,true) call UnitAddPAttackTrigB((GetUnitUserData((Boss_Unit_RHZX))),function Boss_Atk_RHZX) set Boss_Damage_RHZX=UnitAddBeDamagerTrigB((GetUnitUserData((Boss_Unit_RHZX))),function Boss_Damager_RHZX) call UnitAddAbilityBY(Boss_Unit_RHZX,'A0SV') elseif Boss_Spell_data1[i]==$A then set Boss_Spell_data1[i]=0 call SetUnitTimeScale(Boss_Unit_RHZX,1) call TimerStart(GetExpiredTimer(),.05,true,function Boss_Create_003_RHZX) endif endfunction function Boss_Create_001_RHZX takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer index local group g local real x local real y local real z local unit u set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 if Boss_Spell_data1[i]>=30 then set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=Boss_Spell_data2[i]+1 if Boss_Spell_data2[i]<=8 then set z=((Boss_Spell_data2[i]-1)*45.)*bj_DEGTORAD set x=$5EBA+Cos(z)*400 set y=-$2DB4+Sin(z)*400 set CR=FALSE set index=Boss_Spell_allocate() set Boss_Spell_data1[index]=0 set Boss_Spell_X[index]=Cos(z)*50 set Boss_Spell_Y[index]=Sin(z)*50 set Boss_Spell_group1[index]=CreateGroup() set Boss_Spell_group2[index]=CreateGroup() set u=CreateUnit(Player($F),'e001',x,y,z/ bj_DEGTORAD+$B4) call SetUnitX(u,x) call SetUnitY(u,y) call SetUnitScale(u,0,0,0) call SetUnitVertexColor(u,$FF,$FF,$FF,0) set Boss_Spell_eff[index]=AddSpecialEffectTarget("Doodads\\Ashenvale\\Props\\Obelisk\\Obelisk2.mdl",u,"origin") call SetUnitUserData(u,index) call GroupAddUnit(Boss_Spell_group1[i],u) set u=null set CR=true call Ltv(LAv("Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl",x,y,1)) endif endif set z=0 set g=Boss_Spell_group1[i] set Boss_Spell_group1[i]=Boss_Spell_group2[i] set Boss_Spell_group2[i]=g loop set u=FirstOfGroup(g) exitwhen u==null call GroupAddUnit(Boss_Spell_group1[i],u) call GroupRemoveUnit(g,u) set index=(GetUnitUserData((u))) if Boss_Spell_data1[index]<20 then set Boss_Spell_data1[index]=Boss_Spell_data1[index]+1 if(Boss_Spell_data1[index]>=$A and Boss_Spell_data1[index]<=$F)then call SetUnitScale(u,.5+.2*(Boss_Spell_data1[index]-$A),0,0) endif call SetUnitVertexColor(u,$FF,$FF,$FF,R2I(Boss_Spell_data1[index]*12.8)) if Boss_Spell_data1[index]==20 then set z=z+1 endif else set z=z+1 endif endloop set g=null if Boss_Spell_data2[i]>8 and z>=8 then set CR=FALSE set Boss_Spell_unit1[i]=CreateUnit(Player($F),'e001',$5EBA,-$2DB4,0) call SetUnitX(Boss_Spell_unit1[i],$5EBA) call SetUnitY(Boss_Spell_unit1[i],-$2DB4) call SetUnitScale(Boss_Spell_unit1[i],6,0,0) set Boss_Spell_eff[i]=AddSpecialEffectTarget("Abilities\\Spells\\Undead\\Darksummoning\\DarkSummonTarget.mdl",Boss_Spell_unit1[i],"origin") set CR=true set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=0 call TimerStart(GetExpiredTimer(),1,true,function Boss_Create_002_RHZX) endif endfunction function Boss_Create_RHZX takes nothing returns nothing local integer i local unit u=GetTriggerUnit() local real x local real y local real z if Boss_Index_RHZX==-1 then set z=GetUnitFacing(u)*bj_DEGTORAD set x=GetUnitX(u)+Cos(z)*$96 set y=GetUnitY(u)+Sin(z)*$96 set z=SquareRoot(Pow($5EBA-x,2)+Pow(-$2DB4-y,2)) if z<=$96 and IsUnitInRangeXY(u,$5EBA,-$2DB4,$FA)then if IsItemCharges(GetItemOfTypeFromUnit(u,'I04X'),21)then set Boss_Index_RHZX=0 call DisplayTimedText("|cFF8000FFFlame devourer is summoned!",5) call RemoveItemByCharges(GetItemOfTypeFromUnit(u,'I04X'),21) set i=Boss_Spell_allocate() call TimerStart(NewTimer(i),.03,true,function Boss_Create_001_RHZX) set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=0 set Boss_Spell_group1[i]=CreateGroup() set Boss_Spell_group2[i]=CreateGroup() set Boss_DEATH_TC_RHZX=RegisterEvent(EVENT_PLAYER_UNIT_DEATH,function Boss_UNIT_DEATH_RHZX) call RegisterSpellChannelEvent('A0SV',function Boss_Ability002_func_RHZX) call RegisterSpellEffectEvent('A0SV',function Boss_Ability002_func_RHZX) call RegisterSpellEndCastEvent('A0SV',function Boss_Ability002_func_RHZX) else call IssueImmediateOrderById(u,$D0004) call NewTextTagInTarget_B(u,"Not enough powder!",8,$CD,$FF,$9B) endif else call NewTextTagInTarget_B(u,"Obviously to use in the crater!",8,$CD,$FF,$9B) call IssueImmediateOrderById(u,$D0004) endif endif set u=null endfunction function Boss_Init_RHZX takes nothing returns nothing set Boss_Ability02_lv2_RHZX[0]=$1C9C380 set Boss_Ability02_lv2_RHZX[1]=$E4E1C0 set Boss_Ability02_lv2_RHZX[2]=$4C4B40 set Boss_Ability02_lv2_RHZX[3]=-1 call RegisterSpellEffectEvent('A0SM',function Boss_Create_RHZX) endfunction function Boss_Leave_HM takes nothing returns nothing if IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)and tEv(GetTriggerUnit(),5565,$3D33,1)then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl",GetTriggerUnit(),"origin")) endif endfunction function Boss_End_KillDestruct_HM takes nothing returns nothing if(GetDestructableTypeId(GetEnumDestructable())=='YTab')or(GetDestructableTypeId(GetEnumDestructable())=='YTpb')or(GetDestructableTypeId(GetEnumDestructable())=='YTpc')then call KillDestructable(GetEnumDestructable()) endif endfunction function Boss_UnitRemove_0_Buff_HM takes integer id returns nothing local integer lv=Boss_Ability_0_buff_HM[id] if lv>0 then call GroupRemoveUnit(Boss_Ability_0_group_HM,(Je[(id)])) call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0T5','B072') call ModifyUnitArmor(id,100*Boss_Spell_data1[lv]) call DeUnitMdef(id,Boss_Spell_data2[lv]) set Boss_Ability_0_buff_HM[id]=0 call Boss_Spell_deallocate(lv) endif endfunction function Boss_End_HM takes nothing returns nothing local unit u local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local real x local real y local integer p if i==0 then call alloc__hPv(GetHandleId((GetExpiredTimer())),(i+1)) call SetUnitTimeScale(Boss_Unit_2_HM,.09) call ShowUnit(Boss_Unit_HM,false) loop set u=FirstOfGroup(Boss_Ability_0_group_HM) exitwhen u==null call GroupRemoveUnit(Boss_Ability_0_group_HM,u) call Boss_UnitRemove_0_Buff_HM((GetUnitUserData((u)))) endloop call DestroyGroup(Boss_Ability_0_group_HM) set Boss_Ability_0_group_HM=null set i=8 loop set i=i-1 if MV[i]!=null and Off_A098_id[(GetUnitUserData((MV[i])))]==2 then set Off_A098[(GetUnitUserData((MV[i])))]=FALSE set Off_A098_id[(GetUnitUserData((MV[i])))]=0 endif exitwhen i==0 endloop else call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:194") call TriggerRemoveCondition(alloc__Kv[GetHandleId((EVENT_PLAYER_UNIT_DEATH))],(Boss_DEATH_TC_HM)) set Boss_DEATH_TC_HM=null set CR=FALSE set Boss_Unit_HM=CreateUnit(Player($F),'n03B',GetUnitX(Boss_Unit_2_HM),GetUnitY(Boss_Unit_2_HM),270) call SetUnitX(Boss_Unit_HM,GetUnitX(Boss_Unit_2_HM)) call SetUnitY(Boss_Unit_HM,GetUnitY(Boss_Unit_2_HM)) call UnitAddAbility(Boss_Unit_HM,'Aloc') call PauseUnit(Boss_Unit_HM,true) call SetUnitVertexColor(Boss_Unit_HM,100,35,35,50) call AddSpecialEffectTarget("magmaburst.mdl",Boss_Unit_HM,"origin") set CR=true call RemoveDestructable(gg_dest_Dofv_1632) call SetRect(bj_lastMoveRect,-9248,-$4F20,-8672,-$4D00) call EnumDestructablesInRect(bj_lastMoveRect,null,function Boss_End_KillDestruct_HM) set p=(s__polygon_create()) call s__polygon_polygonaddpoint((p),((-9216)*1.),((-$4D20)*1.)) call s__polygon_polygonaddpoint((p),((-8960)*1.),((-$4D20)*1.)) call s__polygon_polygonaddpoint((p),((-8704)*1.),((-$4DE0)*1.)) call s__polygon_polygonaddpoint((p),((-9024)*1.),((-$4F00)*1.)) call s__polygon_polygonaddpoint((p),((-9248)*1.),((-$4E20)*1.)) call sc___prototype62_evaluate(1,p,function Boss_Leave_HM) call s__polygon_destroy((p)) set x=-9248+16 loop exitwhen x>-8672 set y=-$4F20+16 loop exitwhen y>-$4D00 if IsPointInRegion(bj_lastCreatedRegion,x,y)then call SetTerrainPathable(x,y,PATHING_TYPE_WALKABILITY,true) call SetTerrainPathable(x,y,PATHING_TYPE_FLYABILITY,true) endif set y=y+32 endloop set x=x+32 endloop set bj_lastCreatedRegion=null endif endfunction function Boss_UNIT_DEATH_HM takes nothing returns nothing local unit u=GetTriggerUnit() local integer data=(GetUnitUserData((u))) local integer lv local integer i if u==Je[data]then if Boss_Ability_0_buff_HM[data]>0 then call Boss_UnitRemove_0_Buff_HM(data) endif if IsUnitInGroup(u,Boss_Ability_5_group_HM)then set i=ReleaseTimer(Boss_Ability_5_timer_HM[data],"[TimerUtils]Error:195") set Boss_Ability_5_timer_HM[(GetUnitUserData((Boss_Spell_unit1[i])))]=null set Boss_Ability_5_timer_HM[(GetUnitUserData((Boss_Spell_unit2[i])))]=null call GroupRemoveUnit(Boss_Ability_5_group_HM,Boss_Spell_unit1[i]) call GroupRemoveUnit(Boss_Ability_5_group_HM,Boss_Spell_unit2[i]) call PauseUnit(Boss_Spell_unit1[i],false) if u==Boss_Spell_unit1[i]then call KillUnit(Boss_Spell_unit2[i]) endif call Boss_Spell_deallocate(i) endif if u==Boss_Unit_HM then if Boss_Ability_5_index_HM>0 then call Boss_Spell_deallocate(Boss_Ability_5_index_HM) set Boss_Ability_5_index_HM=0 endif call SetUnitTimeScale(Boss_Unit_2_HM,.18) call SetUnitAnimation(Boss_Unit_2_HM,"birth") call ShowUnit(Boss_Unit_2_HM,true) call UnitRemoveAbility(Boss_Unit_2_HM,'Aloc') call UnitAddAbility(Boss_Unit_2_HM,'Aloc') call TimerStart(NewTimer(0),3,true,function Boss_End_HM) loop set u=FirstOfGroup(Boss_Ability_5_group_HM) exitwhen u==null call GroupRemoveUnit(Boss_Ability_5_group_HM,u) set data=(GetUnitUserData((u))) set i=ReleaseTimer(Boss_Ability_5_timer_HM[data],"[TimerUtils]Error:196") set Boss_Ability_5_timer_HM[(GetUnitUserData((Boss_Spell_unit1[i])))]=null set Boss_Ability_5_timer_HM[(GetUnitUserData((Boss_Spell_unit2[i])))]=null call GroupRemoveUnit(Boss_Ability_5_group_HM,Boss_Spell_unit1[i]) call GroupRemoveUnit(Boss_Ability_5_group_HM,Boss_Spell_unit2[i]) call PauseUnit(Boss_Spell_unit1[i],false) call KillUnit(Boss_Spell_unit2[i]) call Boss_Spell_deallocate(i) endloop call DestroyGroup(Boss_Ability_5_group_HM) set Boss_Ability_5_group_HM=null endif endif set u=null endfunction function Boss_Buff_00_add_HM takes unit u returns nothing local integer data=(GetUnitUserData((u))) local integer lv if u==Je[data]then if Boss_Ability_0_buff_HM[data]==null then set lv=Boss_Spell_allocate() set Boss_Ability_0_buff_HM[data]=lv set Boss_Spell_data1[lv]=0 set Boss_Spell_data2[lv]=0 else set lv=Boss_Ability_0_buff_HM[data] endif if Boss_Spell_data1[lv]<$A then set Boss_Spell_data1[lv]=Boss_Spell_data1[lv]+1 call ModifyUnitArmor(data,-100) endif if Boss_Spell_data2[lv]==0 then set Boss_Spell_data2[lv]=ModifyUnitMdef(data,-$A) elseif(100*s__unitseate_table_v[(Boss_Spell_data2[lv])])>-60 then call UnitMdefChange(data,Boss_Spell_data2[lv],(100*s__unitseate_table_v[(Boss_Spell_data2[lv])])-$A) endif call UnitRemoveAbilityandBuffBY(u,'A0T5','B072') call UnitAddAbilityBY(u,'A0T5') if Boss_Ability_0_group_HM==null then set Boss_Ability_0_group_HM=CreateGroup() endif call GroupAddUnit(Boss_Ability_0_group_HM,u) call SetUnitAbilityLevel(u,'A0T4',Boss_Spell_data1[lv]) endif endfunction function Boss_Buff_05_loop_HM takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer data set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 if Boss_Spell_data1[i]<$C8 then if IsUnitPaused(Boss_Spell_unit1[i])==false then call PauseUnit(Boss_Spell_unit1[i],true) endif call SetUnitX(Boss_Spell_unit1[i],GetUnitX(Boss_Spell_unit2[i])) call SetUnitY(Boss_Spell_unit1[i],GetUnitY(Boss_Spell_unit2[i])) else call PauseUnit(Boss_Spell_unit1[i],false) call DestroyEffect(AddSpecialEffectTarget("desecrate.mdl",Boss_Spell_unit1[i],"origin")) call GroupRemoveUnit(Boss_Ability_5_group_HM,Boss_Spell_unit1[i]) call GroupRemoveUnit(Boss_Ability_5_group_HM,Boss_Spell_unit2[i]) call KillUnit(Boss_Spell_unit1[i]) call KillUnit(Boss_Spell_unit2[i]) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:197") call Boss_Spell_deallocate(i) endif endfunction function Boss_Buff_05_ex_HM takes nothing returns nothing if GetWidgetLife((MF))>1.5 then set KF[HF]=PF+1000000. call SetWidgetLife((MF),GetWidgetLife((MF))-1) else call KillUnit((MF)) endif endfunction function Boss_Buff_05_add_HM takes unit u returns nothing local integer data=(GetUnitUserData((u))) local integer i local real x=GetUnitX(u) local real y=GetUnitY(u) local unit u2 if u==Je[data]then if IsUnitInGroup(u,Boss_Ability_5_group_HM)==FALSE then set u2=CreateUnit(Player($B),'n03C',x,y,270) call SetUnitX(u2,x) call SetUnitY(u2,y) set i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=u set Boss_Spell_unit2[i]=u2 set Boss_Spell_data1[i]=0 set Boss_Ability_5_timer_HM[data]=NewTimer(i) set Boss_Ability_5_timer_HM[(GetUnitUserData((u2)))]=Boss_Ability_5_timer_HM[data] call TimerStart(Boss_Ability_5_timer_HM[data],.05,true,function Boss_Buff_05_loop_HM) call GroupAddUnit(Boss_Ability_5_group_HM,u) call GroupAddUnit(Boss_Ability_5_group_HM,u2) call SetUnitAnimation(u2,"birth") call UnitAddShieldTrig((GetUnitUserData((u2))),function Boss_Buff_05_ex_HM) endif endif endfunction function Boss_Ability007_func05_HM takes nothing returns nothing local integer i=Boss_Spell_data1[0] local integer index=(GetUnitUserData((GetEnumUnit()))) local real x=GetUnitX(GetEnumUnit()) local real y=GetUnitY(GetEnumUnit()) local real r=850 local unit u local group g=CreateGroup() if GetUnitTypeId(GetEnumUnit())=='e03C' then call SetUnitAnimation(GetEnumUnit(),"Death") if IsUnitInRange(GetEnumUnit(),Boss_Unit_2_HM,100)then set r=$708 call Ltv(Lfv(LAv("firegold.mdl",x,y,4),$FF,$FF,$FF,$FF)) else call Ltv(Lfv(LAv("firegold.mdl",x,y,2.5),$FF,$FF,$FF,$FF)) endif endif call GroupEnumUnitsInRange(g,x,y,r+75,null) loop set u=FirstOfGroup(g) exitwhen u==null call GroupRemoveUnit(g,u) if IsUnitInRangeXY(u,x,y,r)and not IsUnitInGroup(u,G3)then if IsUnitAliveAndEnemy(u,Boss_Unit_HM)and GetUnitAbilityLevel(u,'A04P')==0 then if GetUnitTypeId(GetEnumUnit())=='e03B' then if IsUnitInRangeXY(u,x,y,300)then call GroupAddUnit(G3,u) if IsUnitInGroup(u,G2)then call GroupRemoveUnit(G2,u) endif endif else call GroupAddUnit(G2,u) endif endif endif endloop call DestroyGroup(g) set g=null endfunction function Boss_Ability007_func04_HM takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:198") call SetUnitTimeScale((Je[(id)]),0) endfunction function Boss_Ability007_func03_HM takes nothing returns nothing if GetDamage()>GetWidgetLife((MF))+.5 then call KillUnit((MF)) call SetUnitTimeScale((MF),2) call TimerStart(NewTimer((pF)),.75,false,function Boss_Ability007_func04_HM) endif endfunction function Boss_Ability007_func02_HM takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer index local unit u local real x local real y if Boss_Spell_data1[i]==0 then set Boss_Spell_data1[i]=1 set Boss_Spell_data2[i]=20 call PauseUnit(Boss_Spell_unit1[i],true) call TimerStart(GetExpiredTimer(),1,true,function Boss_Ability007_func02_HM) call SetUnitAnimation(Boss_Spell_unit1[i],"spell") call thv("|c00FF0000"+I2S(Boss_Spell_data2[i])+"|r",GetUnitX(Boss_Unit_2_HM),GetUnitY(Boss_Unit_2_HM),$FA,.075,.05,bj_PI/ 2,.5,1.2) set x=GetUnitX(Boss_Unit_2_HM) set y=GetUnitY(Boss_Unit_2_HM) set u=CreateUnit(Player($B),'e03C',x,y,270) call SetUnitX(u,x) call SetUnitY(u,y) call SetUnitColor(u,PLAYER_COLOR_RED) call GroupAddUnit(Boss_Spell_group1[i],u) call UnitAddShieldTrig((GetUnitUserData((u))),function Boss_Ability007_func03_HM) set index=0 loop set x=GetUnitX(Boss_Unit_2_HM)+$500*Cos(index*bj_PI/ 2.) set y=GetUnitY(Boss_Unit_2_HM)+$500*Sin(index*bj_PI/ 2.) set u=CreateUnit(Player($B),'e03C',x,y,270) call SetUnitX(u,x) call SetUnitY(u,y) call SetUnitColor(u,PLAYER_COLOR_RED) call GroupAddUnit(Boss_Spell_group1[i],u) call UnitAddShieldTrig((GetUnitUserData((u))),function Boss_Ability007_func03_HM) set index=index+1 exitwhen index>3 endloop set index=0 loop set x=GetUnitX(Boss_Unit_2_HM)+$5A8*Cos(.785398+index*bj_PI/ 2.) set y=GetUnitY(Boss_Unit_2_HM)+$5A8*Sin(.785398+index*bj_PI/ 2.) set u=CreateUnit(Player($B),'e03C',x,y,270) call SetUnitX(u,x) call SetUnitY(u,y) call SetUnitColor(u,PLAYER_COLOR_RED) call GroupAddUnit(Boss_Spell_group1[i],u) call UnitAddShieldTrig((GetUnitUserData((u))),function Boss_Ability007_func03_HM) set index=index+1 exitwhen index>3 endloop elseif Boss_Spell_data1[i]==1 then set Boss_Spell_data2[i]=Boss_Spell_data2[i]-1 if Boss_Spell_data2[i]>0 then call SetUnitAnimation(Boss_Spell_unit1[i],"spell") call thv("|c00FF0000"+I2S(Boss_Spell_data2[i])+"|r",GetUnitX(Boss_Unit_2_HM),GetUnitY(Boss_Unit_2_HM),$FA,.075,.05,bj_PI/ 2,.5,1.2) else set Boss_Spell_data1[i]=2 set Boss_Spell_data2[i]=0 set index=Boss_Spell_data1[0] set Boss_Spell_data1[0]=i call GroupClear(G2) call GroupClear(G3) call ForGroup(Boss_Spell_group1[i],function Boss_Ability007_func05_HM) set Boss_Spell_data1[0]=index loop set u=FirstOfGroup(G2) exitwhen u==null call GroupRemoveUnit(G2,u) call KillUnit(u) endloop call SetUnitAnimation(Boss_Spell_unit1[i],"attack slam") call SetUnitTimeScale(Boss_Spell_unit1[i],2) call TimerStart(GetExpiredTimer(),.5,false,function Boss_Ability007_func02_HM) endif elseif Boss_Spell_data1[i]==2 then loop set u=FirstOfGroup(Boss_Spell_group1[i]) exitwhen u==null call GroupRemoveUnit(Boss_Spell_group1[i],u) call RemoveUnitBJ(u,24) endloop set Boss_Spell_data1[i]=3 call SetUnitTimeScale(Boss_Spell_unit1[i],1) call QueueUnitAnimation(Boss_Spell_unit1[i],"stand") call SetWidgetLife(Boss_Spell_unit1[i],Boss_Spell_Z[i]) call UnitRemoveAbility(Boss_Spell_unit1[i],'A0UK') call TimerStart(GetExpiredTimer(),.5,false,function Boss_Ability007_func02_HM) else if Boss_Index_HM==8 then set Boss_Index_HM=0 call PauseUnit(Boss_Spell_unit1[i],false) call SetUnitInvulnerable(Boss_Spell_unit1[i],false) endif call DestroyGroup(Boss_Spell_group1[i]) set Boss_Spell_group1[i]=null call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:199") endif endfunction function Boss_Ability007_func_HM takes nothing returns nothing local integer EvelId=GetHandleId(GetTriggerEventId()) local integer i if GetTriggerUnit()==Boss_Unit_HM then if EvelId==274 then set i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=GetTriggerUnit() set Boss_Spell_unit2[i]=null set Boss_Spell_group1[i]=CreateGroup() set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=0 set Boss_Spell_Z[i]=GetWidgetLife(Boss_Spell_unit1[i]) call TimerStart(NewTimer(i),.0,false,function Boss_Ability007_func02_HM) call SetUnitInvulnerable(GetTriggerUnit(),true) call UnitAddAbility(GetTriggerUnit(),'A0UK') set Boss_Index_HM=8 elseif EvelId==272 then set Boss_Index_HM=7 call NewTextTagInTarget_B(Boss_Unit_HM,"|c00FF8080Ancient spirits ah! Eliminate those stupid people!!|r ",18,$FF,$FF,$FF) else if Boss_Index_HM==7 then set Boss_Index_HM=0 endif endif endif endfunction function Boss_Ability006_func02_HM takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local real x=GetUnitX(Boss_Spell_unit2[i])+Boss_Spell_X[i]*50 local real y=GetUnitY(Boss_Spell_unit2[i])+Boss_Spell_Y[i]*50 local unit u set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 if Boss_Spell_Z[i]<350 then set Boss_Spell_Z[i]=Boss_Spell_Z[i]+$A call SetUnitScale(Boss_Spell_unit2[i],2+(Boss_Spell_Z[i]-$C8)/ 150.*3,0,0) endif if IsTerrainWalkable(x,y)then call SetUnitX(Boss_Spell_unit2[i],x) call SetUnitY(Boss_Spell_unit2[i],y) else set Boss_Spell_data2[i]=1 endif if ModuloInteger(Boss_Spell_data1[i],4)==0 then call Ltv(Lfv(LAv("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",x,y,2),$FF,$FF,$FF,$FF)) call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl",x,y)) endif set x=x-Boss_Spell_X[i]*Boss_Spell_Z[i] set y=y-Boss_Spell_Y[i]*Boss_Spell_Z[i] if Boss_Spell_data1[i]<50 and Boss_Spell_data2[i]==0 then call GroupEnumUnitsInRange(G,x,y,Boss_Spell_Z[i]+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,Boss_Spell_Z[i])and not IsUnitInGroup(u,Boss_Spell_group1[i])then if IsUnitAliveAndEnemy(u,Boss_Unit_HM)and GetUnitAbilityLevel(u,'Avul')==0 then call GroupAddUnit(Boss_Spell_group1[i],u) call Auxiliary_TargetOrder('A0T6',null,2,$D006B,u) call UnitDamageTargetBY(((Boss_Unit_HM)),((u)),(((($88B8)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) endif endif endloop else set Boss_Spell_Z[i]=$2710*((50-Boss_Spell_data1[i])/ 50.) call GroupEnumUnitsInRange(G,x,y,450+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,450)then if IsUnitAliveAndEnemy(u,Boss_Unit_HM)and GetUnitAbilityLevel(u,'Avul')==0 then call Auxiliary_TargetOrder('A0T6',null,2,$D006B,u) if IsUnitInGroup(u,Boss_Spell_group1[i])==FALSE then call UnitDamageTargetBY(((Boss_Unit_HM)),((u)),(((($88B8+Boss_Spell_Z[i])*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) else call UnitDamageTargetBY(((Boss_Unit_HM)),((u)),((((Boss_Spell_Z[i])*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) endif endif endif endloop call DestroyGroup(Boss_Spell_group1[i]) call DestroyEffect(Boss_Spell_eff[i]) call KillUnit(Boss_Spell_unit2[i]) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:200") call Boss_Spell_deallocate(i) set Boss_Spell_group1[i]=null endif endfunction function Boss_Ability006_func_HM takes nothing returns nothing local integer EvelId=GetHandleId(GetTriggerEventId()) local integer i local unit u if GetTriggerUnit()==Boss_Unit_HM then if EvelId==274 then set Boss_x[0]=GetUnitX(GetTriggerUnit()) set Boss_y[0]=GetUnitY(GetTriggerUnit()) set Boss_x[1]=GetSpellTargetX()-Boss_x[0] set Boss_y[1]=GetSpellTargetY()-Boss_y[0] set Boss_z[0]=Atan2(Boss_y[1],Boss_x[1]) set i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=GetTriggerUnit() set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=0 set Boss_Spell_group1[i]=CreateGroup() set Boss_Spell_X[i]=Cos(Boss_z[0]) set Boss_Spell_Y[i]=Sin(Boss_z[0]) set Boss_Spell_Z[i]=$C8 call TimerStart(NewTimer(i),.03,true,function Boss_Ability006_func02_HM) set CR=FALSE set Boss_x[1]=Boss_x[0]+Boss_Spell_X[i]*$C8 set Boss_y[1]=Boss_y[0]+Boss_Spell_Y[i]*$C8 set u=CreateUnit(Player($F),'e001',Boss_x[1],Boss_y[1],Rad2Deg(Boss_z[0])) call SetUnitX(u,Boss_x[1]) call SetUnitY(u,Boss_y[1]) set Boss_Spell_eff[i]=AddSpecialEffectTarget("Abilities\\Spells\\Orc\\Shockwave\\ShockwaveMissile.mdl",u,"origin") call SetUnitScale(u,2,0,0) set Boss_Spell_unit2[i]=u set u=null set CR=true elseif EvelId==272 then set Boss_Index_HM=6 else if Boss_Index_HM==6 then set Boss_Index_HM=0 endif endif endif endfunction function Boss_Ability005_func_HM takes real t returns nothing local integer i local unit u local real x=GetUnitX(Boss_Unit_HM) local real y=GetUnitY(Boss_Unit_HM) if t<=0 and Boss_Ability_5_index_HM==0 then return endif if Boss_Ability_5_index_HM==0 then set Boss_Ability_5_index_HM=Boss_Spell_allocate() set i=Boss_Ability_5_index_HM set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=0 set Boss_Spell_X[i]=t set Boss_Spell_Y[i]=0 else set i=Boss_Ability_5_index_HM if Boss_Spell_Y[i]<32 or t<0 then set Boss_Spell_X[i]=Boss_Spell_X[i]+t set Boss_Spell_Y[i]=Boss_Spell_Y[i]+t endif if Boss_Spell_X[i]>=32 then set Boss_Spell_X[i]=Boss_Spell_X[i]-32 set Boss_Spell_data2[i]=Boss_Spell_data2[i]+1 call thv("|c00400080"+I2S(Boss_Spell_data2[i])+"0%",x,y,$FA,.075,.05,bj_PI/ 2,2,2.5) if Boss_Spell_data2[i]==$A then if Boss_Ability_5_group_HM==null then set Boss_Ability_5_group_HM=CreateGroup() endif call GroupEnumUnitsInRange(G,x,y,$3E8+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$3E8)then if IsUnitAliveAndEnemy(u,Boss_Unit_HM)and GetUnitAbilityLevel(u,'Avul')==0 then if IsUnitType(u,UNIT_TYPE_HERO)then call Boss_Buff_05_add_HM(u) else call KillUnit(u) endif endif endif endloop call Boss_Spell_deallocate(i) set Boss_Ability_5_index_HM=-32 call NewTextTagInTarget_B(Boss_Unit_HM,"|c00FF8080You can never break free of my bonds!!!|r",18,$FF,$FF,$FF) endif elseif Boss_Spell_X[i]<0 then if Boss_Spell_data2[i]<=0 then call Boss_Spell_deallocate(i) set Boss_Ability_5_index_HM=0 call thv("|c00400080 0%",x,y,$FA,.075,.05,bj_PI/ 2,2,2.5) else set Boss_Spell_X[i]=Boss_Spell_X[i]+32 set Boss_Spell_data2[i]=Boss_Spell_data2[i]-1 call thv("|c00400080"+I2S(Boss_Spell_data2[i])+"0%",x,y,$FA,.075,.05,bj_PI/ 2,2,2.5) endif endif endif endfunction function Boss_Ability004_func02_HM takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local unit u set Boss_Spell_data1[i]=Boss_Spell_data1[i]-1 if Boss_Spell_data1[i]>0 then call thv("|c00ff0000"+I2S(Boss_Spell_data1[i])+"|r",GetUnitX(Boss_Unit_HM),GetUnitY(Boss_Unit_HM),25,.075,.05,bj_PI/ 2,.75,1) else loop set u=FirstOfGroup(Boss_Spell_group1[i]) exitwhen u==null call GroupRemoveUnit(Boss_Spell_group1[i],u) call UnitRemoveAbilityandBuffBY(u,'A0T8',0) if IsUnitAliveAndEnemy(u,Boss_Unit_HM)then call UnitDamageTargetBY((Boss_Unit_HM),(u),(($F4240)*1.),false,(false),false,false,(ConvertAttackType(5)),(ConvertDamageType(26)),((0)*1.),("")) call zhv(GetPlayerId(GetOwningPlayer(u)),100,1) call DestroyEffect(AddSpecialEffectTarget("desecrate.mdl",u,"origin")) endif endloop call DestroyGroup(Boss_Spell_group1[i]) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:201") endif endfunction function Boss_Ability004_func_HM takes nothing returns nothing local integer i=Boss_Ability_4_timed_HM local unit u call DestroyTextTag(Boss_Ability_4_texttag_HM) set Boss_Ability_4_timed_HM=0 set Boss_Spell_data1[i]=5 set Boss_Spell_group1[i]=CreateGroup() call GroupEnumUnitsInRect(G,gg_rct_HM______________001,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitAliveAndEnemy(u,Boss_Unit_HM)and IsUnitType(u,UNIT_TYPE_HERO)then call GroupAddUnit(Boss_Spell_group1[i],u) call UnitAddAbilityBY(u,'A0T8') endif endloop call TimerStart(NewTimer(i),1,true,function Boss_Ability004_func02_HM) call thv("|c00ff0000"+I2S(Boss_Spell_data1[i])+"|r",GetUnitX(Boss_Unit_HM),GetUnitY(Boss_Unit_HM),25,.075,.05,bj_PI/ 2,.75,1) endfunction function Boss_Ability003_func04_HM takes nothing returns nothing local integer i=Boss_Spell_data1[0] local integer index=(GetUnitUserData((GetEnumUnit()))) local real x local real y local unit u local group g set x=GetUnitX(GetEnumUnit())+Boss_Spell_X[index] set y=GetUnitY(GetEnumUnit())+Boss_Spell_Y[index] if IsTerrainWalkable(x,y)then call SetUnitX(GetEnumUnit(),x) call SetUnitY(GetEnumUnit(),y) call GroupEnumUnitsInRange(G,x,y,$FA,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$AF)then if IsUnitAliveAndEnemy(u,Boss_Spell_unit1[i])and GetUnitAbilityLevel(u,'A04P')==0 then call KillUnitBJ(u) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Volcano\\VolcanoDeath.mdl",u,"origin")) endif endif endloop else set Boss_Spell_data1[index]=1 endif if Boss_Spell_data1[i]>=100 or Boss_Spell_data1[index]==1 then call Ltv(LAv("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl",x,y,2)) call Ltv(Lfv(LAv("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",x,y,2),$FF,$C8,$96,$FF)) call GroupEnumUnitsInRange(G,x,y,375,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,300)then if IsUnitAliveAndEnemy(u,Boss_Spell_unit1[i])and GetUnitAbilityLevel(u,'A04P')==0 then call KillUnitBJ(u) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Volcano\\VolcanoDeath.mdl",u,"origin")) endif endif endloop call GroupRemoveUnit(Boss_Spell_group1[i],GetEnumUnit()) call SetUnitUserData(GetEnumUnit(),0) call RemoveUnitBJ(GetEnumUnit(),25) call DestroyEffect(Boss_Spell_eff[index]) call Boss_Spell_deallocate(index) endif endfunction function Boss_Ability003_func03_HM takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer index=Boss_Spell_data1[0] set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 set Boss_Spell_data1[0]=i call ForGroup(Boss_Spell_group1[i],function Boss_Ability003_func04_HM) set Boss_Spell_data1[0]=index if FirstOfGroup(Boss_Spell_group1[i])==null then call DestroyGroup(Boss_Spell_group1[i]) call DestroyGroup(Boss_Spell_group2[i]) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:202") set Boss_Spell_group1[i]=null set Boss_Spell_group2[i]=null endif endfunction function Boss_Ability003_func02_HM takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer index local unit u local real x local real y if Boss_Spell_data1[i]==0 then set Boss_Spell_data1[i]=1 call SetUnitX(Boss_Spell_unit1[i],GetUnitX(Boss_Unit_2_HM)) call SetUnitY(Boss_Spell_unit1[i],GetUnitY(Boss_Unit_2_HM)) call SetUnitFacing(Boss_Spell_unit1[i],270) call PauseUnit(Boss_Spell_unit1[i],true) call SetUnitAnimation(Boss_Spell_unit1[i],"stand victory") call TimerStart(GetExpiredTimer(),.24,false,function Boss_Ability003_func02_HM) set CR=false set u=CreateUnit(Player($B),'e001',GetUnitX(Boss_Spell_unit1[i]),GetUnitY(Boss_Spell_unit1[i]),0) call UnitAddAbility(u,'AOeq') call IssueNeutralPointOrderById(Player($B),GetTriggerUnit(),$D0099,GetUnitX(Boss_Spell_unit1[i]),GetUnitY(Boss_Spell_unit1[i])) set Boss_Spell_unit2[i]=u set CR=true elseif Boss_Spell_data1[i]==1 then if Boss_Spell_data2[i]<20 then set Boss_Spell_data2[i]=Boss_Spell_data2[i]+1 set x=GetUnitX(Boss_Spell_unit1[i]) set y=GetUnitY(Boss_Spell_unit1[i]) set index=$C8-$A*Boss_Spell_data2[i] call Ltv(Lfv(LAv("Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl",x,y,3+.15*Boss_Spell_data2[i]),$FF,index,index,$FF)) call TimerStart(GetExpiredTimer(),.27-.01*Boss_Spell_data2[i],false,function Boss_Ability003_func02_HM) else set Boss_Spell_data1[i]=2 set Boss_Spell_data2[i]=0 call SetUnitAnimation(Boss_Spell_unit1[i],"attack slam") call SetUnitTimeScale(Boss_Spell_unit1[i],2) call TimerStart(GetExpiredTimer(),.5,true,function Boss_Ability003_func02_HM) endif elseif Boss_Spell_data1[i]==2 then if Boss_Spell_data2[i]<6 then set Boss_Spell_data2[i]=Boss_Spell_data2[i]+1 if Boss_Spell_data2[i]<6 then call SetUnitAnimation(Boss_Spell_unit1[i],"attack slam") else call SetUnitTimeScale(Boss_Spell_unit1[i],1) call QueueUnitAnimation(Boss_Spell_unit1[i],"stand") call TimerStart(GetExpiredTimer(),3,false,function Boss_Ability003_func02_HM) set Boss_Spell_data1[i]=3 endif set index=i set i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=Boss_Spell_unit1[index] set Boss_Spell_data1[i]=0 set Boss_Spell_group1[i]=CreateGroup() set Boss_Spell_group2[i]=CreateGroup() set Boss_Spell_X[i]=GetUnitX(Boss_Spell_unit1[i]) set Boss_Spell_Y[i]=GetUnitY(Boss_Spell_unit1[i]) set Boss_x[0]=(Boss_Spell_data2[index]-1.)*bj_PI/ 20. set Boss_y[0]=bj_PI/ 5 set Boss_z[0]=Boss_y[0]*$A set CR=FALSE loop set index=Boss_Spell_allocate() set Boss_Spell_group1[index]=CreateGroup() set Boss_Spell_group2[index]=CreateGroup() set Boss_Spell_X[index]=25*Cos(Boss_x[0]) set Boss_Spell_Y[index]=25*Sin(Boss_x[0]) set Boss_Spell_data1[index]=0 set x=Boss_Spell_X[i]+Boss_Spell_X[index]*2 set y=Boss_Spell_Y[i]+Boss_Spell_Y[index]*2 set u=CreateUnit(Player($F),'e001',x,y,Boss_x[0]*bj_RADTODEG) call SetUnitX(u,x) call SetUnitY(u,y) call SetUnitScale(u,1.5,0,0) call SetUnitUserData(u,index) call GroupAddUnit(Boss_Spell_group1[i],u) set Boss_Spell_eff[index]=AddSpecialEffectTarget("Abilities\\Spells\\Orc\\Shockwave\\ShockwaveMissile.mdl",u,"origin") call SetUnitVertexColor(u,$FF,100,100,$FF) exitwhen Boss_x[0]>=Boss_z[0] set Boss_x[0]=Boss_x[0]+Boss_y[0] endloop set CR=true set u=null call TimerStart(NewTimer(i),.03,true,function Boss_Ability003_func03_HM) call Ltv(LAv("epicenter.mdl",Boss_Spell_X[i],Boss_Spell_Y[i],2)) set x=Boss_Spell_X[i] set y=Boss_Spell_Y[i] call GroupEnumUnitsInRect(G,gg_rct_HM______________001,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitAliveAndEnemy(u,Boss_Spell_unit1[i])and GetUnitAbilityLevel(u,'Avul')==0 then call Auxiliary_TargetOrder('A0T6',null,2,$D006B,u) endif endloop else call TimerStart(GetExpiredTimer(),3,true,function Boss_Ability003_func02_HM) set Boss_Spell_data1[i]=3 endif elseif Boss_Spell_data1[i]==3 then set Boss_Spell_data1[i]=4 call TimerStart(GetExpiredTimer(),.5,false,function Boss_Ability003_func02_HM) call PauseUnit(Boss_Spell_unit1[i],false) call SetUnitInvulnerable(Boss_Spell_unit1[i],false) else if Boss_Index_HM==4 then set Boss_Index_HM=0 endif call KillUnit(Boss_Spell_unit2[i]) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:203") endif endfunction function Boss_Ability003_func_HM takes nothing returns nothing local integer EvelId=GetHandleId(GetTriggerEventId()) local integer i if GetTriggerUnit()==Boss_Unit_HM then if EvelId==274 then set i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=GetTriggerUnit() set Boss_Spell_unit2[i]=null set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=0 call TimerStart(NewTimer(i),.0,false,function Boss_Ability003_func02_HM) call SetUnitInvulnerable(GetTriggerUnit(),true) set Boss_Index_HM=4 call NewTextTagInTarget_B(Boss_Unit_HM,"|c00FF8080This is the power of destruction that you are waiting for !!|r",18,$FF,$FF,$FF) elseif EvelId==272 then set Boss_Index_HM=3 else if Boss_Index_HM==3 then set Boss_Index_HM=0 endif endif endif endfunction function Boss_Ability002_func03_HM takes nothing returns nothing local integer i=Boss_Spell_data1[0] local integer index=(GetUnitUserData((GetEnumUnit()))) local real x local real y local unit u local group g set x=GetUnitX(GetEnumUnit())+Boss_Spell_X[index] set y=GetUnitY(GetEnumUnit())+Boss_Spell_Y[index] if IsTerrainWalkable(x,y)then if ModuloInteger(Boss_Spell_data1[i],5)==0 then call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",x,y)) endif call SetUnitX(GetEnumUnit(),x) call SetUnitY(GetEnumUnit(),y) call GroupEnumUnitsInRange(G,x,y,$FA,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$AF)and not IsUnitInGroup(u,Boss_Spell_group2[i])then if IsUnitAliveAndEnemy(u,Boss_Spell_unit1[i])and GetUnitAbilityLevel(u,'Avul')==0 then call GroupAddUnit(Boss_Spell_group2[i],u) call GroupAddUnit(Boss_Spell_group1[index],u) endif endif endloop set g=Boss_Spell_group1[index] set Boss_Spell_group1[index]=Boss_Spell_group2[index] set Boss_Spell_group2[index]=g loop set u=FirstOfGroup(g) exitwhen u==null call GroupAddUnit(Boss_Spell_group1[index],u) call GroupRemoveUnit(g,u) set Boss_x[0]=GetUnitX(u)+Boss_Spell_X[index] set Boss_y[0]=GetUnitY(u)+Boss_Spell_Y[index] if IsUnitInRangeXY(GetEnumUnit(),Boss_x[0],Boss_y[0],$C8)then set Boss_x[1]=x+(Boss_x[0]-x)*.85 set Boss_y[1]=y+(Boss_y[0]-y)*.85 call SetUnitX(u,Boss_x[1]) call SetUnitY(u,Boss_y[1]) elseif IsUnitInRangeXY(GetEnumUnit(),Boss_x[0],Boss_y[0],$C8)then set Boss_x[1]=x+(Boss_x[0]-x)*.92 set Boss_y[1]=y+(Boss_y[0]-y)*.92 call SetUnitX(u,Boss_x[1]) call SetUnitY(u,Boss_y[1]) else call GroupRemoveUnit(Boss_Spell_group2[i],u) call GroupRemoveUnit(Boss_Spell_group1[index],u) endif endloop set g=null else set Boss_Spell_data1[index]=1 endif if Boss_Spell_data1[i]>=50 or Boss_Spell_data1[index]==1 then call Ltv(LAv("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",x,y,2)) call GroupEnumUnitsInRange(G,x,y,425,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,350)then if IsUnitAliveAndEnemy(u,Boss_Spell_unit1[i])and GetUnitAbilityLevel(u,'Avul')==0 then call UnitDamageTargetBY((Boss_Spell_unit1[i]),(u),(($7530)*1.),false,(false),false,false,(ConvertAttackType(0)),(ConvertDamageType(17)),((0)*1.),("")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Volcano\\VolcanoDeath.mdl",u,"origin")) endif endif endloop call GroupRemoveUnit(Boss_Spell_group1[i],GetEnumUnit()) call SetUnitUserData(GetEnumUnit(),0) call RemoveUnitBJ(GetEnumUnit(),26) call DestroyEffect(Boss_Spell_eff[index]) call DestroyGroup(Boss_Spell_group1[index]) call DestroyGroup(Boss_Spell_group2[index]) call Boss_Spell_deallocate(index) endif endfunction function Boss_Ability002_func02_HM takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer index local unit u local real x local real y set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 if Boss_Spell_data1[i]==1 then call Lqv(Lfv(LAv("Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl",Boss_Spell_X[i],Boss_Spell_Y[i],5),$FF,0,0,$FF),.5) call TimerStart(GetExpiredTimer(),.3,false,function Boss_Ability002_func02_HM) call Auxiliary_PointOrder(('ACsi'),GetOwningPlayer(Boss_Spell_unit1[i]),1,$D0270,Boss_Spell_X[i],Boss_Spell_Y[i]) elseif Boss_Spell_data1[i]==2 then set Boss_x[0]=0 set Boss_y[0]=.785398 set Boss_z[0]=Boss_y[0]*8 loop set index=Boss_Spell_allocate() set Boss_Spell_group1[index]=CreateGroup() set Boss_Spell_group2[index]=CreateGroup() set Boss_Spell_X[index]=30*Cos(Boss_x[0]) set Boss_Spell_Y[index]=30*Sin(Boss_x[0]) set Boss_Spell_data1[index]=0 set CR=FALSE set x=Boss_Spell_X[i]+Boss_Spell_X[index]*2 set y=Boss_Spell_Y[i]+Boss_Spell_Y[index]*2 set u=CreateUnit(Player($F),'e001',x,y,Boss_x[0]*bj_RADTODEG) call SetUnitX(u,x) call SetUnitY(u,y) call SetUnitScale(u,1.5,0,0) call SetUnitUserData(u,index) call GroupAddUnit(Boss_Spell_group1[i],u) set Boss_Spell_eff[index]=AddSpecialEffectTarget("Abilities\\Spells\\Orc\\Shockwave\\ShockwaveMissile.mdl",u,"origin") call SetUnitVertexColor(u,$FF,$FF,$FF,$FF) set CR=true exitwhen Boss_x[0]>=Boss_z[0] set Boss_x[0]=Boss_x[0]+Boss_y[0] endloop set u=null call TimerStart(GetExpiredTimer(),.03,true,function Boss_Ability002_func02_HM) else set index=Boss_Spell_data1[0] set Boss_Spell_data1[0]=i call ForGroup(Boss_Spell_group1[i],function Boss_Ability002_func03_HM) set Boss_Spell_data1[0]=index if FirstOfGroup(Boss_Spell_group1[i])==null then call DestroyGroup(Boss_Spell_group1[i]) call DestroyGroup(Boss_Spell_group2[i]) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:204") endif endif endfunction function Boss_Ability002_func_HM takes nothing returns nothing local integer EvelId=GetHandleId(GetTriggerEventId()) local integer i if GetTriggerUnit()==Boss_Unit_HM then if EvelId==274 then set i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=GetTriggerUnit() set Boss_Spell_data1[i]=0 set Boss_Spell_group1[i]=CreateGroup() set Boss_Spell_group2[i]=CreateGroup() set Boss_Spell_X[i]=GetSpellTargetX() set Boss_Spell_Y[i]=GetSpellTargetY() call Ltv(Lfv(LAv("Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl",Boss_Spell_X[i],Boss_Spell_Y[i],3),$FF,$FA,$FA,$FF)) call TimerStart(NewTimer(i),.5,false,function Boss_Ability002_func02_HM) call SetUnitAnimation(Boss_Spell_unit1[i],"attack slam") call SetUnitTimeScale(Boss_Spell_unit1[i],2.8) elseif EvelId==272 then set Boss_Index_HM=2 call NewTextTagInTarget_B(Boss_Unit_HM,"|c00FF8080See God now!!!|r",18,$FF,$FF,$FF) else if Boss_Index_HM==2 then set Boss_Index_HM=0 call SetUnitTimeScale(GetTriggerUnit(),1) endif endif endif endfunction function Boss_Ability001_func02_HM takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local real x=GetUnitX(Boss_Spell_unit1[i]) local real y=GetUnitY(Boss_Spell_unit1[i]) local unit u if Boss_Index_HM==1 then set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 if Boss_Spell_data1[i]==0 then call SetUnitAnimation(Boss_Spell_unit1[i],"attack slam") call TimerStart(GetExpiredTimer(),.25,true,function Boss_Ability001_func02_HM) else if Boss_Spell_data1[i]<=$A then call Ltv(LAv("epicenter.mdl",x,y,3)) call Ltv(LAv("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl",x,y,4)) call GroupEnumUnitsInRange(G,x,y,800+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,800)then if IsUnitAliveAndEnemy(u,Boss_Unit_HM)and GetUnitAbilityLevel(u,'Avul')==0 then call Auxiliary_TargetOrder('A0T6',null,1,$D006B,u) call UnitDamageTargetBY(((Boss_Unit_HM)),((u)),((((6000)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) endif endif endloop call SetUnitAnimation(Boss_Unit_HM,"attack slam") if Boss_Spell_data1[i]==$A then call SetUnitTimeScale(Boss_Unit_HM,.5) endif else if Boss_Spell_data1[i]==$E then call SetUnitTimeScale(Boss_Unit_HM,1) elseif Boss_Spell_data1[i]==$F then call TimerStart(GetExpiredTimer(),.05,true,function Boss_Ability001_func02_HM) elseif Boss_Spell_data1[i]==16 then call Ltv(LAv("epicenter.mdl",x,y,3.5)) call Ltv(LAv("explosion.mdl",x,y,3)) call GroupEnumUnitsInRange(G,x,y,900+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,900)then if IsUnitAliveAndEnemy(u,Boss_Unit_HM)and GetUnitAbilityLevel(u,'Avul')==0 then call m2v(u,3,'A500','B500',true) call UnitDamageTargetBY(((Boss_Unit_HM)),((u)),(((($C350)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) call zhv((GetPlayerId((GetOwningPlayer(u)))),100,1) endif endif endloop call QueueUnitAnimation(Boss_Unit_HM,"stand") call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:205") endif endif endif else call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:206") endif endfunction function Boss_Ability001_func_HM takes nothing returns nothing local integer EvelId=GetHandleId(GetTriggerEventId()) local integer i if GetTriggerUnit()==Boss_Unit_HM then if EvelId==274 then set i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=GetTriggerUnit() set Boss_Spell_data1[i]=-1 call TimerStart(NewTimer(i),.0,false,function Boss_Ability001_func02_HM) call SetUnitTimeScale(Boss_Spell_unit1[i],2.8) call SetUnitNocontrol((GetUnitUserData((Boss_Unit_HM))),true) elseif EvelId==272 then set Boss_Index_HM=1 call NewTextTagInTarget_B(Boss_Unit_HM,"|c00FF8080Look I do not step on you!|r",18,$FF,$FF,$FF) else if Boss_Index_HM==1 then set Boss_Index_HM=0 call SetUnitNocontrol((GetUnitUserData((Boss_Unit_HM))),false) call SetUnitTimeScale(GetTriggerUnit(),1) endif endif endif endfunction function Boss_Damage_HM takes nothing returns nothing local real x local real y local real r local integer fx if Boss_Ability_4_timed_HM>0 then set r=GetDamage() if Boss_Spell_Z[Boss_Ability_4_timed_HM]<=0 then set x=GetUnitX((MF)) set y=GetUnitY((MF)) set fx=Lnv(x,y,Atan2(GetUnitY((mF))-y,GetUnitX((mF))-x)) call LMv(fx,"Royal Guard.mdl") call SetUnitScale(II[(fx)],((5)*1.),0,0) call Ltv(Lfv(fx,$FF,$FF,125,$CD)) set Boss_Spell_Z[Boss_Ability_4_timed_HM]=$A endif call DamageMinus(r*.9) set Boss_Spell_X[Boss_Ability_4_timed_HM]=(.0023)*20 set Boss_Spell_Y[Boss_Ability_4_timed_HM]=Boss_Spell_Y[Boss_Ability_4_timed_HM]+r*.1 call SetTextTagPos(Boss_Ability_4_texttag_HM,x,y,$96) call SetTextTagText(Boss_Ability_4_texttag_HM,I2S(R2I(Boss_Spell_Y[Boss_Ability_4_timed_HM])),Boss_Spell_X[Boss_Ability_4_timed_HM]) if Boss_Spell_Y[Boss_Ability_4_timed_HM]>=$F4240 then call SetUnitNocontrol((pF),false) call Boss_Ability004_func_HM() endif else if Boss_Ability_4_index_HM>0 then set r=GetWidgetLife(Boss_Unit_HM)-GetDamage()-Boss_Ability_4_index_HM*$989680 if r<=0 then call DamageMinus(-r) call SetUnitNocontrol((pF),true) set Boss_Ability_4_index_HM=Boss_Ability_4_index_HM-1 set Boss_Ability_4_timed_HM=Boss_Spell_allocate() set Boss_Spell_data1[Boss_Ability_4_timed_HM]=320 set Boss_Spell_X[Boss_Ability_4_timed_HM]=(.0023)*$F set Boss_Spell_Y[Boss_Ability_4_timed_HM]=-r set Boss_Spell_Z[Boss_Ability_4_timed_HM]=0 set Boss_Ability_4_texttag_HM=CreateTextTag() call SetTextTagColor(Boss_Ability_4_texttag_HM,$80,$80,64,$FF) call NewTextTagInTarget_B(Boss_Unit_HM,"|c00FF8080our attack is just tickling for me!|r",18,$FF,$FF,$FF) endif endif if(Boss_Ability_5_index_HM>=0)and((Control_use[(GetUnitUserData(((Boss_Unit_HM))))])or GetUnitAbilityLevel(Boss_Unit_HM,'BUdd')>0 or GetUnitAbilityLevel(Boss_Unit_HM,'B01N')>0 or GetUnitAbilityLevel(Boss_Unit_HM,'B06P')>0)then call Boss_Ability005_func_HM(GetRandomInt(2,3)) endif endif endfunction function Boss_Death02_HM takes nothing returns nothing local integer i=s__Trig_P2[s__Trig_Index] set Boss_Spell_data1[i]=Boss_Spell_data1[i]-1 call GroupRemoveUnit(Boss_Spell_group1[i],Je[s__Trig_P]) set s__Trig_P2[s__Trig_Index]=0 call s__Trig_remove(s__Trig_Index) endfunction function Boss_Birth_n03S_HM takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:207") if UnitAlive((Je[(id)]))then call PauseUnit((Je[(id)]),false) call SetUnitInvulnerable((Je[(id)]),false) call QueueUnitAnimation((Je[(id)]),"stand") endif endfunction function Boss_Start02_HM takes nothing returns nothing local real life=GetWidgetLife(Boss_Unit_HM) local real maxlife=GetUnitState(Boss_Unit_HM,UNIT_STATE_MAX_LIFE) local real v=life/ maxlife local unit u local real x=GetUnitX(Boss_Unit_HM) local real y=GetUnitY(Boss_Unit_HM) local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer index if life>0 then if Boss_Ability_5_index_HM<0 then set Boss_Ability_5_index_HM=Boss_Ability_5_index_HM+1 else if(Boss_Ability_5_index_HM>0)then if not((Control_use[(GetUnitUserData(((Boss_Unit_HM))))])or GetUnitAbilityLevel(Boss_Unit_HM,'BUdd')>0 or GetUnitAbilityLevel(Boss_Unit_HM,'B01N')>0 or GetUnitAbilityLevel(Boss_Unit_HM,'B06P')>0)then call Boss_Ability005_func_HM(-.3) endif set Boss_Spell_data1[Boss_Ability_5_index_HM]=Boss_Spell_data1[Boss_Ability_5_index_HM]+1 if Boss_Spell_data1[Boss_Ability_5_index_HM]>=32 then set Boss_Spell_data1[Boss_Ability_5_index_HM]=0 set Boss_Spell_Y[Boss_Ability_5_index_HM]=0 endif elseif((Control_use[(GetUnitUserData(((Boss_Unit_HM))))])or GetUnitAbilityLevel(Boss_Unit_HM,'BUdd')>0 or GetUnitAbilityLevel(Boss_Unit_HM,'B01N')>0 or GetUnitAbilityLevel(Boss_Unit_HM,'B06P')>0)then call Boss_Ability005_func_HM(1) endif endif if(100000.-TimerGetRemaining(GameTimer))>Boss_Spell_X[i]then set Boss_Spell_X[i]=(100000.-TimerGetRemaining(GameTimer))+30 if Boss_Spell_data1[i]<$C then if Boss_Spell_data1[i]>9 then set index=$C-Boss_Spell_data1[i] else set index=3 endif set Boss_Spell_data1[i]=Boss_Spell_data1[i]+index loop exitwhen index==0 set index=index-1 set u=CreateUnit(GetOwningPlayer(Boss_Unit_HM),'n03S',GetRandomReal(-8896,-5536),GetRandomReal(-$5AA0,-$4E40),GetRandomReal(0,360)) call SetUnitAnimation(u,"Birth") set s__Trig_P2[AddUnitDeathTrigB((GetUnitUserData((u))),function Boss_Death02_HM)]=i call GroupAddUnit(Boss_Spell_group1[i],u) call PauseUnit(u,true) call SetUnitInvulnerable(u,true) call TimerStart(NewTimer((GetUnitUserData((u)))),2,false,function Boss_Birth_n03S_HM) endloop endif endif if(100000.-TimerGetRemaining(GameTimer))>Boss_Ability_0_HM then set Boss_Ability_0_HM=(100000.-TimerGetRemaining(GameTimer))+$A call Ltv(LNv("darknova.mdl",x,y,GetUnitFlyHeight(Boss_Unit_HM)+30,1.75)) call GroupEnumUnitsInRange(G,x,y,$3E8+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$3E8)then if IsUnitAliveAndEnemy(u,Boss_Unit_HM)and GetUnitAbilityLevel(u,'Avul')==0 then call DestroyEffect(AddSpecialEffectTarget("ghostmissile.mdl",u,"origin")) call Boss_Buff_00_add_HM(u) endif endif endloop endif else loop set u=FirstOfGroup(Boss_Spell_group1[i]) exitwhen u==null call GroupRemoveUnit(Boss_Spell_group1[i],u) call KillUnit(u) endloop call DestroyGroup(Boss_Spell_group1[i]) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:208") return endif if Boss_Ability_4_timed_HM>0 then set Boss_Spell_data1[Boss_Ability_4_timed_HM]=Boss_Spell_data1[Boss_Ability_4_timed_HM]-1 if Boss_Spell_data1[Boss_Ability_4_timed_HM]<=0 then call Boss_Spell_deallocate(Boss_Ability_4_timed_HM) call DestroyTextTag(Boss_Ability_4_texttag_HM) set Boss_Ability_4_timed_HM=0 else if Boss_Spell_Z[Boss_Ability_4_timed_HM]>0 then set Boss_Spell_Z[Boss_Ability_4_timed_HM]=Boss_Spell_Z[Boss_Ability_4_timed_HM]-1 endif if Boss_Spell_X[Boss_Ability_4_timed_HM]>(.0023)*$F then set Boss_Spell_X[Boss_Ability_4_timed_HM]=Boss_Spell_X[Boss_Ability_4_timed_HM]-(.0023) endif call SetTextTagPos(Boss_Ability_4_texttag_HM,x,y,$96) call SetTextTagText(Boss_Ability_4_texttag_HM,I2S(R2I(Boss_Spell_Y[Boss_Ability_4_timed_HM])),Boss_Spell_X[Boss_Ability_4_timed_HM]) endif endif set Boss_Index2_HM=Boss_Index2_HM-1 if Boss_Index_HM==0 then if Boss_Index2_HM<=0 then if v<=.6 then set index=0 call GroupEnumUnitsInRange(G,x,y,$3E8,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitAliveAndEnemy(u,Boss_Unit_HM)and GetUnitAbilityLevel(u,'Avul')==0 then if IsUnitType(u,UNIT_TYPE_HERO)then set index=index+2 else set index=index+1 endif endif endloop if index>1 and IssueImmediateOrderById(Boss_Unit_HM,$D009F)then set Boss_Index2_HM=33 return endif endif if v<=.7 then set index=0 call GroupEnumUnitsInRange(G,x,y,900,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitAliveAndEnemy(u,Boss_Unit_HM)and GetUnitAbilityLevel(u,'Avul')==0 then if IsUnitType(u,UNIT_TYPE_HERO)then set index=index+2 if GetRandomInt(1,index)<=2 then set x=GetUnitX(u) set y=GetUnitY(u) endif else set index=index+1 if GetRandomInt(1,index)<=1 then set x=GetUnitX(u) set y=GetUnitY(u) endif endif endif endloop if index>1 and IssuePointOrderById(Boss_Unit_HM,$D009D,x,y)then set Boss_Index2_HM=33 return endif set index=0 call GroupEnumUnitsInRect(G,gg_rct_HM______________001,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitAliveAndEnemy(u,Boss_Unit_HM)and GetUnitAbilityLevel(u,'Avul')==0 then if IsUnitType(u,UNIT_TYPE_HERO)then set index=index+2 else set index=index+1 endif endif endloop if index>1 and IssueImmediateOrderById(Boss_Unit_HM,$D0048)then set Boss_Index2_HM=33 return endif endif if v<=.8 then set x=GetUnitX(Boss_Unit_HM) set y=GetUnitY(Boss_Unit_HM) set index=0 call GroupEnumUnitsInRange(G,x,y,800,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitAliveAndEnemy(u,Boss_Unit_HM)and GetUnitAbilityLevel(u,'Avul')==0 then if IsUnitType(u,UNIT_TYPE_HERO)then set index=index+2 else set index=index+1 endif endif endloop if index>1 then if IssueImmediateOrderById(Boss_Unit_HM,$D00A0)then set Boss_Index2_HM=33 return endif endif endif set x=GetUnitX(Boss_Unit_HM) set y=GetUnitY(Boss_Unit_HM) set index=0 call GroupEnumUnitsInRange(G,x,y,$5DC,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitAliveAndEnemy(u,Boss_Unit_HM)and GetUnitAbilityLevel(u,'Avul')==0 then if IsUnitType(u,UNIT_TYPE_HERO)then set index=index+2 if GetRandomInt(1,index)<=2 then set x=GetUnitX(u) set y=GetUnitY(u) endif else set index=index+1 if GetRandomInt(1,index)<=1 then set x=GetUnitX(u) set y=GetUnitY(u) endif endif endif endloop if index>1 then if IssuePointOrderById(Boss_Unit_HM,$D024B,x,y)then set Boss_Index2_HM=33 endif endif endif endif endfunction function Boss_Start01_HM takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 if Boss_Spell_data1[i]==1 then set Boss_Index_HM=0 call TimerDialogDisplay(bj_lastCreatedTimerDialog,false) call DestroyTimerDialog(bj_lastCreatedTimerDialog) call SetUnitAnimation(Boss_Unit_2_HM,"death") call SetUnitTimeScale(Boss_Unit_2_HM,.25) call TimerStart(GetExpiredTimer(),2,false,function Boss_Start01_HM) else set Boss_Spell_data1[i]=0 set Boss_Spell_X[i]=(100000.-TimerGetRemaining(GameTimer))+30 set Boss_Spell_group1[i]=CreateGroup() call SetUnitOwner(Boss_Unit_HM,Player($B),false) call PauseUnit(Boss_Unit_HM,false) call SetUnitInvulnerable(Boss_Unit_HM,false) call ShowUnit(Boss_Unit_2_HM,false) call TimerStart(GetExpiredTimer(),.03125,true,function Boss_Start02_HM) set Boss_DEATH_TC_HM=RegisterEvent(EVENT_PLAYER_UNIT_DEATH,function Boss_UNIT_DEATH_HM) call UnitAddBeDamagerTrig((GetUnitUserData((Boss_Unit_HM))),function Boss_Damage_HM) call RegisterSpellChannelEvent('A0T7',function Boss_Ability001_func_HM) call RegisterSpellEffectEvent('A0T7',function Boss_Ability001_func_HM) call RegisterSpellEndCastEvent('A0T7',function Boss_Ability001_func_HM) call RegisterSpellChannelEvent('A0T9',function Boss_Ability002_func_HM) call RegisterSpellEffectEvent('A0T9',function Boss_Ability002_func_HM) call RegisterSpellEndCastEvent('A0T9',function Boss_Ability002_func_HM) call RegisterSpellChannelEvent('A0TA',function Boss_Ability003_func_HM) call RegisterSpellEffectEvent('A0TA',function Boss_Ability003_func_HM) call RegisterSpellEndCastEvent('A0TA',function Boss_Ability003_func_HM) call RegisterSpellChannelEvent('A0TB',function Boss_Ability006_func_HM) call RegisterSpellEffectEvent('A0TB',function Boss_Ability006_func_HM) call RegisterSpellEndCastEvent('A0TB',function Boss_Ability006_func_HM) call RegisterSpellChannelEvent('A0UF',function Boss_Ability007_func_HM) call RegisterSpellEffectEvent('A0UF',function Boss_Ability007_func_HM) call RegisterSpellEndCastEvent('A0UF',function Boss_Ability007_func_HM) set i=0 loop call SetPlayerAbilityAvailable(Player(i),'A0T5',false) set i=i+1 exitwhen i>$F endloop endif endfunction function Boss_Enter_HM takes nothing returns nothing local integer i if IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)and Boss_Index_HM<=-1 and tEv(GetTriggerUnit(),-8668,-$4F28,380)then if Boss_Index_HM==-2 then set Boss_Index_HM=-1 set i=Boss_Spell_allocate() set Boss_Spell_data1[i]=0 call TimerStart(NewTimer(i),60,false,function Boss_Start01_HM) set bj_lastCreatedTimerDialog=CreateTimerDialog((alloc__bj_LastAllocTimer)) call TimerDialogSetTitle(bj_lastCreatedTimerDialog,"|c00FF8080Seal released|r") call TimerDialogDisplay(bj_lastCreatedTimerDialog,true) call DestructableRestoreLife(gg_dest_Dofv_1632,GetDestructableMaxLife(gg_dest_Dofv_1632),false) call SetDestructableAnimation(gg_dest_Dofv_1632,"stand") endif set Off_A098[(GetUnitUserData((GetTriggerUnit())))]=true set Off_A098_id[(GetUnitUserData((GetTriggerUnit())))]=2 endif endfunction function Boss_Init_HM takes nothing returns nothing set Boss_Unit_HM=gg_unit_n03B_0550 set Boss_Unit_2_HM=CreateUnit(Player($F),'e039',GetUnitX(Boss_Unit_HM),GetUnitY(Boss_Unit_HM),300) call SetUnitX(Boss_Unit_2_HM,GetUnitX(Boss_Unit_HM)) call SetUnitY(Boss_Unit_2_HM,GetUnitY(Boss_Unit_HM)) call PauseUnit(Boss_Unit_HM,true) call SetUnitInvulnerable(Boss_Unit_HM,true) call RegisterEnterRect(-$F80,-$5200,-$EA0,-$5060,function Boss_Enter_HM) call Luv('A0T5') endfunction function Boss_Enter_n03F takes nothing returns boolean local unit u=GetFilterUnit() if CR and UnitAlive(u)then if IsUnitOwnedByPlayer(u,P[$C])then call GroupAddUnit(Boss_EnterGroup_n03F,u) call ShowUnit(u,false) call PauseUnit(u,true) call SetUnitInvulnerable(u,true) elseif IsUnitOwnedByPlayer(u,P[$F])then if GetUnitTypeId(u)==('n016')then call GroupAddUnit(Boss_EnterGroup_n03F,u) call ShowUnit(u,false) call PauseUnit(u,true) endif else if IsUnitType(u,UNIT_TYPE_HERO)then if Boss_Index_n03F==-1 and nC[(GetUnitUserData((u)))]then call GroupAddUnit(Boss_GameFor_n03F,u) set Off_A098[(GetUnitUserData((u)))]=true set Off_A098_id[(GetUnitUserData((u)))]=3 endif if not IsUnitInGroup(u,Boss_GameFor_n03F)then set Jg=false call KillUnit(GetFilterUnit()) set Jg=true endif endif endif endif set u=null return false endfunction function Boss_Leave_n03F takes nothing returns boolean local unit u=GetFilterUnit() if IsUnitInGroup(u,Boss_GameFor_n03F)then call GroupRemoveUnit(Boss_GameFor_n03F,u) if u==Boss_Spell_unit1[Boss_Index2_n03F]then call UnitRemoveAbilityandBuffBY(Boss_Spell_unit1[Boss_Index2_n03F],'A0UU','B07N') set Boss_Spell_unit1[Boss_Index2_n03F]=null endif if Off_A098_id[(GetUnitUserData((u)))]==3 then set Off_A098[(GetUnitUserData((u)))]=false set Off_A098_id[(GetUnitUserData((u)))]=0 endif endif set u=null return false endfunction function Boss_End_n03F takes nothing returns nothing local unit u local integer i=Boss_Index_n03F set Boss_Index_n03F=-3 call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:209") call RemoveDestructable(Boss_destruct_n03F[0]) call RemoveDestructable(Boss_destruct_n03F[1]) call RemoveDestructable(Boss_destruct_n03F[2]) loop set u=FirstOfGroup(Boss_EnterGroup_n03F) exitwhen u==null call GroupRemoveUnit(Boss_EnterGroup_n03F,u) if GetUnitTypeId(u)==('n016')then call ShowUnit(u,true) call PauseUnit(u,false) else call ShowUnit(u,true) call PauseUnit(u,false) call SetUnitInvulnerable(u,false) endif endloop loop set u=FirstOfGroup(Boss_GameFor_n03F) exitwhen u==null call GroupRemoveUnit(Boss_GameFor_n03F,u) if Off_A098_id[(GetUnitUserData((u)))]==3 then set Off_A098[(GetUnitUserData((u)))]=false set Off_A098_id[(GetUnitUserData((u)))]=0 endif endloop call Boss_Spell_deallocate(Boss_Index2_n03F) call DestroyGroup(Boss_EnterGroup_n03F) call DestroyGroup(Boss_GameFor_n03F) call DestroyTrigger(Boss_EnterTrig_n03F) set Boss_EnterGroup_n03F=null set Boss_GameFor_n03F=null set Boss_EnterTrig_n03F=null endfunction function Boss_Death_n03F takes nothing returns nothing set Boss_Index_n03F=999 call TimerStart(NewTimer(0),3,false,function Boss_End_n03F) endfunction function Boss_Ability002_func03_n03F takes nothing returns nothing local integer i=Boss_Spell_data1[0] local integer index=(GetUnitUserData((GetEnumUnit()))) local real x local real y local unit u set x=GetUnitX(GetEnumUnit())+Boss_Spell_X[index] set y=GetUnitY(GetEnumUnit())+Boss_Spell_Y[index] call SetUnitX(GetEnumUnit(),x) call SetUnitY(GetEnumUnit(),y) set Boss_x[0]=GetRandomReal(0,6.28) set Boss_y[0]=GetRandomReal(0,100) call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",x+Cos(Boss_x[0])*Boss_y[0],y+Sin(Boss_x[0])*Boss_y[0])) call GroupEnumUnitsInRange(G,x,y,$FA,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$AF)and IsUnitInGroup(u,Boss_Spell_group1[index])then if IsUnitAliveAndEnemy(u,Boss_Unit_n03F)and GetUnitAbilityLevel(u,'Avul')==0 then call GroupAddUnit(Boss_Spell_group1[index],u) call UnitDamageTargetBY(((Boss_Unit_n03F)),((u)),((((Boss_Spell_Z[index])*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) elseif u==Boss_Unit_n03F then call DestroyEffect(AddSpecialEffectTarget("aquaspike.mdl",u,"origin")) set Boss_x[0]=GetWidgetLife(u) set Boss_y[0]=GetUnitState(u,UNIT_STATE_MAX_LIFE) set Boss_z[0]=Boss_x[0]+Boss_y[0]*.03 call SetWidgetLife(u,Boss_z[0]) if Boss_z[0]>Boss_y[0]then set Boss_z[0]=Boss_y[0]-Boss_x[0] else set Boss_z[0]=Boss_z[0]-Boss_x[0] endif if R2I(Boss_z[0])>0 then call thv("|c0069ff2d+"+I2S(R2I(Boss_z[0])),GetUnitX(u)+GetRandomReal(-100,100),GetUnitY(u)+GetRandomReal(-100,100),GetUnitFlyHeight(u)+GetRandomReal(50,$96),.03,.02,bj_PI/ 2,.5,.75) endif endif endif endloop if IsPointInRectB(x,y,-9024,-$2B60,-$DC0,-4160)==false or Boss_Index_n03F==-3 then call GroupRemoveUnit(Boss_Spell_group1[i],GetEnumUnit()) call SetUnitUserData(GetEnumUnit(),0) call RemoveUnitBJ(GetEnumUnit(),27) call DestroyEffect(Boss_Spell_eff[index]) call DestroyGroup(Boss_Spell_group1[index]) call Boss_Spell_deallocate(index) set Boss_Spell_group1[index]=null else set Boss_Spell_Z[index]=Boss_Spell_Z[index]+$3E8 endif endfunction function Boss_Ability002_func02_n03F takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer index local real x local real y local unit u if Boss_Spell_data1[i]<$F then set Boss_Spell_data2[i]=Boss_Spell_data2[i]-1 if Boss_Spell_data2[i]<=0 then set Boss_Spell_data2[i]=5 set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 if Boss_Spell_data1[i]==1 then set Boss_x[0]=(bj_PI/ 2) else set Boss_x[0]=(bj_PI/ 2)+(bj_PI/ 50)*(Boss_Spell_data1[i]/ 2)*Pow(-1,Boss_Spell_data1[i]) endif set Boss_y[0]=40+(.75)*(Boss_Spell_data1[i]/ 2) set index=Boss_Spell_allocate() set Boss_Spell_group1[index]=CreateGroup() set Boss_Spell_X[index]=Boss_y[0]*Cos(Boss_x[0]) set Boss_Spell_Y[index]=Boss_y[0]*Sin(Boss_x[0]) set Boss_Spell_Z[index]=$C350 set Boss_Spell_data1[index]=0 set CR=FALSE set x=Boss_Spell_X[i]-300*(Boss_Spell_data1[i]/ 2)*Pow(-1,Boss_Spell_data1[i]) set y=Boss_Spell_Y[i] set u=CreateUnit(Player($F),'e001',x,y,Boss_x[0]*bj_RADTODEG) call SetUnitX(u,x) call SetUnitY(u,y) call SetUnitScale(u,2,0,0) call SetUnitUserData(u,index) call GroupAddUnit(Boss_Spell_group1[i],u) set Boss_Spell_eff[index]=AddSpecialEffectTarget("ShockwaveMissile.mdl",u,"origin") set CR=true endif endif set index=Boss_Spell_data1[0] set Boss_Spell_data1[0]=i call ForGroup(Boss_Spell_group1[i],function Boss_Ability002_func03_n03F) set Boss_Spell_data1[0]=index if FirstOfGroup(Boss_Spell_group1[i])==null then call DestroyGroup(Boss_Spell_group1[i]) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:210") endif endfunction function Boss_Ability002_func_n03F takes nothing returns nothing local integer i=Boss_Spell_allocate() local integer index=0 set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=0 set Boss_Spell_X[i]=-6178 set Boss_Spell_Y[i]=-$2A94 set Boss_Spell_group1[i]=CreateGroup() call TimerStart(NewTimer(i),.03125,true,function Boss_Ability002_func02_n03F) endfunction function Boss_attack_n03F takes nothing returns nothing if GetRandomInt(1,100)<=8 then call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",GetUnitX((MF)),GetUnitY((MF)))) call FloatedTargetBY((MF),45,-1.6) call m2v((MF),.15,'A500','B500',true) else if QT[(pF)]then call DamageAmplifyDis(GetDamage()*5+5000,$F,"|c00400080") call m2v((MF),1,'A500','B500',true) call Gjv((MF),100,Atan2(GetUnitY((MF))-GetUnitY((mF)),GetUnitX((MF))-GetUnitX((mF))),1,"KnockbackDust.mdl") call DestroyEffect(AddSpecialEffectTarget("bluefirebolt.mdl",(mF),"origin")) endif endif endfunction function Boss_Damage_n03F takes nothing returns nothing local unit u=(MF) if u==Boss_Unit_n03F then if Boss_Index_n03F==2 then if Boss_Spell_data1[Boss_Index2_n03F]==0 and((Control_use[(GetUnitUserData(((Boss_Unit_n03F))))])or GetUnitAbilityLevel(Boss_Unit_n03F,'BUdd')>0 or GetUnitAbilityLevel(Boss_Unit_n03F,'B01N')>0 or GetUnitAbilityLevel(Boss_Unit_n03F,'B06P')>0)then set Boss_Spell_data1[Boss_Index2_n03F]=2 endif endif else if GetWidgetLife(u)-GetDamage()<.5 then if Boss_Spell_data1[Boss_Index2_n03F]==1 then set Boss_Spell_data1[Boss_Index2_n03F]=2 call PauseUnit(u,true) endif call DamageMinus(GetDamage()-GetWidgetLife(u)+1) endif endif set u=null endfunction function Boss_Start_n03F takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer index local unit u local real x local real y if Boss_Index_n03F==-3 then call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:211") return endif if Boss_Index_n03F==999 then call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:212") return endif if Boss_Index_n03F==99 then set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 if Boss_Spell_data1[i]>$FF then set lastspeaker=Boss_Unit_n03F call Playlines("Torino Oos"," I do not trust you anymore.") call TimerStart(GetExpiredTimer(),1,false,function Boss_End_n03F) call RemoveUnitBJ(Boss_Unit_n03F,28) elseif Boss_Spell_data1[i]==32 then call SetUnitAnimation(Boss_Unit_n03F,"attack") set lastspeaker=Boss_Unit_n03F call Playlines("Torino Oosse","Call me out and I'll send it back !") elseif Boss_Spell_data1[i]==64 then call SetUnitAnimation(Boss_Unit_n03F,"attack") set lastspeaker=Boss_Unit_n03F call Playlines("Torino Oosse","Take responsibility, ah, asshole!") elseif Boss_Spell_data1[i]==96 then call SetUnitAnimation(Boss_Unit_n03F,"death") call UnitAddAbility(Boss_Unit_n03F,'Aloc') set lastspeaker=Boss_Unit_n03F call Playlines("Torino Oosse","I do not play.") elseif Boss_Spell_data1[i]==$C0 then set lastspeaker=Boss_Unit_n03F call Playlines("Torino Oosse","Goodbye.") endif return endif if Boss_Ability_cd_01_n03F>0 then set Boss_Ability_cd_01_n03F=Boss_Ability_cd_01_n03F-1 endif if Boss_Ability_cd_02_n03F>0 then set Boss_Ability_cd_02_n03F=Boss_Ability_cd_02_n03F-1 endif if Boss_Index_n03F==0 then if FirstOfGroup(Boss_GameFor_n03F)==null then set Boss_Index_n03F=99 set Boss_Spell_data1[i]=0 set x=-5692 set y=-9167 call SetUnitX(Boss_Unit_n03F,x) call SetUnitY(Boss_Unit_n03F,y) call PauseUnit(Boss_Unit_n03F,true) call SetUnitInvulnerable(Boss_Unit_n03F,true) call SetUnitAnimation(Boss_Unit_n03F,"spell") set lastspeaker=Boss_Unit_n03F call Playlines("Torino Oos "," I have not yet force it, you fall!") return endif if Boss_Ability_cd_01_n03F==0 then set index=0 call SetRect(bj_lastMoveRect,-9024,-$2B60,-$DC0,-4160) call GroupEnumUnitsInRect(G,bj_lastMoveRect,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitAliveAndEnemy(u,Boss_Unit_n03F)and IsUnitInGroup(u,Boss_GameFor_n03F)then set index=index+1 if GetRandomInt(1,index)==1 then set Boss_Spell_unit1[i]=u endif endif endloop if index>0 then set Boss_Index_n03F=1 set index=Boss_Spell_allocate() set Boss_Spell_data1[index]=32 set Boss_Spell_data2[index]=0 set Boss_Spell_group1[index]=CreateGroup() set Boss_Spell_data1[i]=1 set Boss_Spell_data2[i]=index set Boss_Ability_cd_01_n03F=-1 set Boss_Spell_unit2[i]=null set x=GetUnitX(Boss_Unit_n03F) set y=GetUnitY(Boss_Unit_n03F) call Lqv(LAv("greatergeiser.mdl",x,y,3),3) call PauseUnit(Boss_Unit_n03F,true) call SetUnitInvulnerable(Boss_Unit_n03F,true) call SetUnitAnimation(Boss_Unit_n03F,"spell") call UnitAddAbilityBY(Boss_Spell_unit1[i],'A0UU') call NewTextTagInTarget_B(Boss_Unit_n03F,"|c008080FFWave form!|r",18,$FF,$FF,$FF) endif endif if Boss_Index_n03F==0 then if Boss_Ability_cd_02_n03F==0 then set index=0 call SetRect(bj_lastMoveRect,-9024,-$2B60,-$DC0,-4160) call GroupEnumUnitsInRect(G,bj_lastMoveRect,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitAliveAndEnemy(u,Boss_Unit_n03F)and IsUnitInGroup(u,Boss_GameFor_n03F)then set index=index+1 if GetRandomInt(1,index)==1 then set Boss_Spell_unit1[i]=u endif endif endloop if index>0 then set Boss_Index_n03F=2 set Boss_Ability_cd_02_n03F=-1 set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=0 call PauseUnit(Boss_Unit_n03F,true) call SetUnitAnimation(Boss_Unit_n03F,"attack slam") call NewTextTagInTarget_B(Boss_Unit_n03F,"|c008080FFTide attracted!|r",18,$FF,$FF,$FF) endif endif endif elseif Boss_Index_n03F==1 then if Boss_Spell_data1[i]>0 then set index=Boss_Spell_data2[i] if Boss_Spell_data1[index]>0 then set Boss_Spell_data1[index]=Boss_Spell_data1[index]-1 if Boss_Spell_data1[index]<=0 then call ShowUnit(Boss_Unit_n03F,false) set x=GetUnitX(Boss_Unit_n03F) set y=GetUnitY(Boss_Unit_n03F) set Boss_Spell_X[i]=GetUnitX(Boss_Spell_unit1[i])-x set Boss_Spell_Y[i]=GetUnitY(Boss_Spell_unit1[i])-y set Boss_x[0]=SquareRoot(Boss_Spell_X[i]*Boss_Spell_X[i]+Boss_Spell_Y[i]*Boss_Spell_Y[i]) if Boss_x[0]>0 then set Boss_y[0]=Atan2(Boss_Spell_Y[i],Boss_Spell_X[i]) set Boss_Spell_X[i]=Boss_Spell_X[i]/ Boss_x[0] set Boss_Spell_Y[i]=Boss_Spell_Y[i]/ Boss_x[0] else set Boss_y[0]=GetUnitFacing(Boss_Unit_n03F)/ bj_RADTODEG set Boss_Spell_X[i]=Cos(Boss_y[0]) set Boss_Spell_Y[i]=Sin(Boss_y[0]) endif set CR=FALSE set u=CreateUnit(Player($F),'e001',x,y,Boss_y[0]*bj_RADTODEG) call SetUnitX(u,x) call SetUnitY(u,y) call SetUnitScale(u,3,0,0) set Boss_Spell_unit1[index]=u set Boss_Spell_eff[index]=AddSpecialEffectTarget("ShockwaveMissile.mdl",u,"origin") set CR=true endif else set x=GetUnitX(Boss_Spell_unit1[index])+Boss_Spell_X[i]*60 set y=GetUnitY(Boss_Spell_unit1[index])+Boss_Spell_Y[i]*60 if Boss_Spell_data1[index]==0 then if IsPointInRectB(x,y,-9024,-$2B60,-$DC0,-4160)then call SetUnitX(Boss_Spell_unit1[index],x) call SetUnitY(Boss_Spell_unit1[index],y) set Boss_x[0]=GetRandomReal(0,6.28) set Boss_y[0]=GetRandomReal(0,$FA) call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",x+Cos(Boss_x[0])*Boss_y[0],y+Sin(Boss_x[0])*Boss_y[0])) call GroupEnumUnitsInRange(G,x,y,325,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$FA)and UnitAlive(u)and GetUnitAbilityLevel(u,'Avul')==0 then if IsUnitAliveAndEnemy(u,Boss_Unit_n03F)then if not IsUnitInGroup(u,Boss_Spell_group1[index])then call GroupAddUnit(Boss_Spell_group1[index],u) call DestroyEffect(AddSpecialEffect("aquaspike.mdl",GetUnitX(u),GetUnitY(u))) call m2v(u,3,'A500','B500',true) call UnitDamageTargetBY(((Boss_Unit_n03F)),((u)),((((Pow(Pow(5,3),2))*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) endif else if Boss_Spell_data1[i]==2 and u==Boss_Spell_unit2[i]then call DestroyEffect(AddSpecialEffect("aquaspike.mdl",GetUnitX(u),GetUnitY(u))) call UnitApplyTimedLife(u,0,0) call KillUnit(u) set Boss_Spell_data1[i]=-1 endif endif endif endloop else if x>-$DC0 then set x=-$DC0 endif if x<-9024 then set x=-9024 endif if y>-4160 then set y=-4160 endif if y<-$2B60 then set y=-$2B60 endif if Boss_Spell_data2[index]==0 then set Boss_Spell_data2[index]=1 set Boss_Spell_unit2[i]=CreateUnit(Player($B),'n03E',-6125,-$28DC,90) set PB[(GetUnitUserData((Boss_Spell_unit2[i])))]=true call UnitAddBeDamagerTrig((GetUnitUserData((Boss_Spell_unit2[i]))),function Boss_Damage_n03F) call IssuePointOrderById(Boss_Spell_unit2[i],$D0012,-6500,-8500) endif if Boss_Spell_unit1[i]==null or not UnitAlive(Boss_Spell_unit1[i])then set index=0 call SetRect(bj_lastMoveRect,-9024,-$2B60,-$DC0,-4160) call GroupEnumUnitsInRect(G,bj_lastMoveRect,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitAliveAndEnemy(u,Boss_Unit_n03F)and IsUnitInGroup(u,Boss_GameFor_n03F)then set index=index+1 if GetRandomInt(1,index)==1 then set Boss_Spell_unit1[i]=u endif endif endloop endif if Boss_Spell_unit1[i]!=null then set index=Boss_Spell_data2[i] set Boss_Spell_X[index]=GetUnitX(Boss_Spell_unit1[i]) set Boss_Spell_Y[index]=GetUnitY(Boss_Spell_unit1[i]) else set index=Boss_Spell_data2[i] set Boss_Spell_X[index]=-6666 set Boss_Spell_Y[index]=-8000 set Boss_Spell_data1[index]=-1 endif set Boss_Spell_X[i]=Boss_Spell_X[index]-x set Boss_Spell_Y[i]=Boss_Spell_Y[index]-y set Boss_x[0]=SquareRoot(Boss_Spell_X[i]*Boss_Spell_X[i]+Boss_Spell_Y[i]*Boss_Spell_Y[i]) set Boss_y[0]=Atan2(Boss_Spell_Y[i],Boss_Spell_X[i]) set Boss_Spell_X[i]=Boss_Spell_X[i]/ Boss_x[0] set Boss_Spell_Y[i]=Boss_Spell_Y[i]/ Boss_x[0] call SetUnitX(Boss_Unit_n03F,Boss_Spell_X[index]) call SetUnitY(Boss_Unit_n03F,Boss_Spell_Y[index]) call SetUnitFacing(Boss_Unit_n03F,Boss_y[0]*bj_RADTODEG) call DestroyEffect(Boss_Spell_eff[index]) call KillUnit(Boss_Spell_unit1[index]) set CR=FALSE set u=CreateUnit(Player($F),'e001',x,y,Boss_y[0]*bj_RADTODEG) call SetUnitX(u,x) call SetUnitY(u,y) call SetUnitScale(u,3,0,0) set Boss_Spell_unit1[index]=u set Boss_Spell_eff[index]=AddSpecialEffectTarget("ShockwaveMissile.mdl",u,"origin") set CR=true call GroupClear(Boss_Spell_group1[index]) endif else if SquareRoot(Pow(Boss_Spell_X[index]-x,2)+Pow(Boss_Spell_Y[index]-y,2))>60 then call SetUnitX(Boss_Spell_unit1[index],x) call SetUnitY(Boss_Spell_unit1[index],y) call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",x,y)) else call SetUnitX(Boss_Spell_unit1[index],Boss_Spell_X[index]) call SetUnitY(Boss_Spell_unit1[index],Boss_Spell_Y[index]) set Boss_Spell_data1[i]=-1 endif endif if Boss_Spell_data2[index]>1 then set Boss_Spell_data2[index]=Boss_Spell_data2[index]-1 endif if Boss_Spell_data1[i]==1 and Boss_Spell_data2[index]==1 and Boss_Spell_unit2[i]!=null and UnitAlive(Boss_Spell_unit2[i])and IsUnitInRangeXY(Boss_Spell_unit2[i],-6500,-8500,100)==false then set Boss_Spell_data2[index]=33 call IssuePointOrderById(Boss_Spell_unit2[i],$D0012,-6500,-8500) endif endif else if Boss_Spell_data1[i]==-1 then set index=Boss_Spell_data2[i] set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=0 set x=GetUnitX(Boss_Spell_unit1[index]) set y=GetUnitY(Boss_Spell_unit1[index]) call SetUnitX(Boss_Unit_n03F,x) call SetUnitY(Boss_Unit_n03F,y) call SetUnitAnimation(Boss_Unit_n03F,"spell") call Lqv(LAv("greatergeiser.mdl",x,y,3),3) call UnitRemoveAbilityandBuffBY(Boss_Spell_unit1[i],'A0UU','B07N') if UnitAlive(Boss_Spell_unit2[i])then call UnitApplyTimedLife(Boss_Spell_unit2[i],0,0) call KillUnit(Boss_Spell_unit2[i]) endif call KillUnit(Boss_Spell_unit1[index]) call DestroyEffect(Boss_Spell_eff[index]) call DestroyGroup(Boss_Spell_group1[index]) set Boss_Spell_unit1[i]=null set Boss_Spell_unit2[i]=null call Boss_Spell_deallocate(index) else set Boss_Spell_data2[i]=Boss_Spell_data2[i]+1 if ModuloInteger(Boss_Spell_data2[i],6)==3 then call Ltv(LAv("aquaspike.mdl",x,y,3)) endif if Boss_Spell_data2[i]>=32 then set Boss_Ability_cd_01_n03F=32*60*5 call PauseUnit(Boss_Unit_n03F,false) call SetUnitInvulnerable(Boss_Unit_n03F,false) set Boss_Index_n03F=0 elseif Boss_Spell_data2[i]==16 then call ShowUnit(Boss_Unit_n03F,true) endif endif endif elseif Boss_Index_n03F==2 then if Boss_Spell_data1[i]==0 then if((Control_use[(GetUnitUserData(((Boss_Unit_n03F))))])or GetUnitAbilityLevel(Boss_Unit_n03F,'BUdd')>0 or GetUnitAbilityLevel(Boss_Unit_n03F,'B01N')>0 or GetUnitAbilityLevel(Boss_Unit_n03F,'B06P')>0)then set Boss_Spell_data1[i]=2 else set Boss_Spell_data2[i]=Boss_Spell_data2[i]+1 if Boss_Spell_data2[i]>=32 then set Boss_Ability_cd_02_n03F=32*80 set Boss_Spell_data1[i]=1 call Boss_Ability002_func_n03F() call NewTextTagInTarget_B(Boss_Unit_n03F,"|c008080FFcharge!|r",18,$FF,$FF,$FF) endif endif elseif Boss_Spell_data1[i]==1 then set Boss_Spell_data2[i]=Boss_Spell_data2[i]+1 if Boss_Spell_data2[i]>=43 then call PauseUnit(Boss_Unit_n03F,false) call SetUnitAnimation(Boss_Unit_n03F,"stand") set Boss_Index_n03F=0 set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=0 endif elseif Boss_Spell_data1[i]==2 then set Boss_Ability_cd_02_n03F=0 call PauseUnit(Boss_Unit_n03F,false) call SetUnitAnimation(Boss_Unit_n03F,"stand") set Boss_Index_n03F=0 set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=0 endif endif endfunction function Boss_Create_n03F takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local unit u local real x=-5692 local real y=-9167 if Boss_Spell_data2[i]==0 then set Boss_Spell_X[i]=Boss_Spell_X[i]-Boss_Spell_Y[i] set Boss_Spell_Y[i]=Boss_Spell_Y[i]+.03 set Boss_Spell_Z[i]=Boss_Spell_Z[i]+(GetRandomReal(3,5)*bj_DEGTORAD) set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 if ModuloInteger(Boss_Spell_data1[i],2)==1 then call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",x+Cos(Boss_Spell_Z[i])*Boss_Spell_X[i],y+Sin(Boss_Spell_Z[i])*Boss_Spell_X[i])) else call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",x+Cos(Boss_Spell_Z[i]+3.14159)*Boss_Spell_X[i],y+Sin(Boss_Spell_Z[i]+3.14159)*Boss_Spell_X[i])) endif if Boss_Spell_X[i]<=0 then set Boss_Spell_data2[i]=1 set Boss_Spell_data1[i]=0 call Lqv(LAv("greatergeiser.mdl",x,y,8),3) call ShowUnit(Boss_Spell_unit1[i],true) call UnitAddAbility(Boss_Spell_unit1[i],'Aloc') call SetUnitAnimation(Boss_Spell_unit1[i],"attack slam") call SetUnitVertexColor(Boss_Spell_unit1[i],$FF,$FF,$FF,$80) set Boss_destruct_n03F[0]=CreateDestructable('Dofw',-4992,-4224,270.,1,0) set Boss_destruct_n03F[1]=CreateDestructable('Dofw',-4544,-4224,270.,1,0) set Boss_destruct_n03F[2]=CreateDestructable('Dofw',-4160,-9856,180.,1,0) call SetRect(bj_lastMoveRect,-9024,-$2B60,-$DC0,-4160) set Boss_EnterTrig_n03F=CreateTrigger() set bj_lastCreatedRegion=CreateRegion() set Boss_EnterGroup_n03F=CreateGroup() set Boss_GameFor_n03F=CreateGroup() call RegionAddRect(bj_lastCreatedRegion,bj_lastMoveRect) call TriggerRegisterEnterRegion(Boss_EnterTrig_n03F,bj_lastCreatedRegion,Filter(function Boss_Enter_n03F)) call TriggerRegisterLeaveRegion(Boss_EnterTrig_n03F,bj_lastCreatedRegion,Filter(function Boss_Leave_n03F)) call GroupEnumUnitsInRect(G,bj_lastMoveRect,Filter(function Boss_Enter_n03F)) set Boss_Index_n03F=0 endif elseif Boss_Spell_data2[i]==1 then set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 call SetUnitVertexColor(Boss_Spell_unit1[i],$FF,$FF,$FF,$80+Boss_Spell_data1[i]*3) if Boss_Spell_data1[i]==43 then call RemoveUnitBJ(Boss_Spell_unit1[i],29) set Boss_Unit_n03F=CreateUnit(P[$B],'n03F',x,y,270) call SetUnitX(Boss_Unit_n03F,x) call SetUnitY(Boss_Unit_n03F,y) call TimerStart(GetExpiredTimer(),.03125,true,function Boss_Start_n03F) call AddUnitDeathTrigB((GetUnitUserData((Boss_Unit_n03F))),function Boss_Death_n03F) call UnitAddPAttackTrigB((GetUnitUserData((Boss_Unit_n03F))),function Boss_attack_n03F) call UnitAddBeDamagerTrig((GetUnitUserData((Boss_Unit_n03F))),function Boss_Damage_n03F) set Boss_Spell_unit1[i]=null set Boss_Spell_unit2[i]=null set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=0 set Boss_Spell_X[i]=0 set Boss_Spell_Y[i]=0 set Boss_Spell_Z[i]=0 set Boss_Index2_n03F=i endif endif endfunction function Boss_Init_n03F takes nothing returns nothing local unit u=GetTriggerUnit() local real x=GetUnitX(u) local real y=GetUnitY(u) local integer i if false and Boss_Index_n03F==-2 and IsPointInRectB(x,y,-8544,-9856,-8352,-9664)and IsItemCharges(GetItemOfTypeFromUnit(u,'I04U'),18)then set Boss_Index_n03F=-1 call RemoveItemByCharges(GetItemOfTypeFromUnit(u,'I04U'),18) set i=Boss_Spell_allocate() set CR=false set Boss_Spell_unit1[i]=CreateUnit(P[$F],'n03F',-5692,-9167,270) call SetUnitX(Boss_Spell_unit1[i],-5692) call SetUnitY(Boss_Spell_unit1[i],-9167) call UnitAddAbility(Boss_Spell_unit1[i],'Aeth') call SetUnitVertexColor(Boss_Spell_unit1[i],$FF,$FF,$FF,0) call ShowUnit(Boss_Spell_unit1[i],false) set CR=true set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=0 set Boss_Spell_X[i]=$7D0 set Boss_Spell_Y[i]=3 set Boss_Spell_Z[i]=0 call TimerStart(NewTimer(i),.03125,true,function Boss_Create_n03F) else call VFe() endif set u=null endfunction function Vge takes nothing returns nothing call RegisterSpellEffectEvent('A0BX',function Boss_Init_n03F) endfunction function Boss_Ability_1_4_n03G takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local real x=GetUnitX(Boss_Spell_unit2[i])+Boss_Spell_X[i] local real y=GetUnitY(Boss_Spell_unit2[i])+Boss_Spell_Y[i] local real z=I2R(Boss_Spell_data1[i])+Boss_Spell_Z[i] local unit u set Boss_Spell_data1[i]=R2I(z) set Boss_Spell_Z[i]=Boss_Spell_Z[i]-1.35 call MoveLocation(Boss_Point,x,y) call SetUnitFlyHeight(Boss_Spell_unit2[i],z-GetLocationZ(Boss_Point),0) if IsPointInWorldBounds(x,y)then call SetUnitX(Boss_Spell_unit2[i],x) call SetUnitY(Boss_Spell_unit2[i],y) endif if z-GetLocationZ(Boss_Point)<=1 then call DestroyEffect(Boss_Spell_eff[i]) call SetUnitScale(Boss_Spell_unit2[i],2.,0,0) call KillUnit(Boss_Spell_unit2[i]) call Ltv(LAv("pumpkinnightmare_projectile.mdl",x,y,1.8)) if UnitAlive(Boss_Spell_unit1[i])then call GroupEnumUnitsInRange(G,x,y,305,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$FF)and UnitAlive(u)and GetUnitAbilityLevel(u,'Avul')==0 then if IsUnitAliveAndEnemy(u,Boss_Spell_unit1[i])then call UnitDamageTargetBY(((Boss_Spell_unit1[i])),((u)),(((($4E20)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) endif endif endloop endif call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:213") call Boss_Spell_deallocate(i) endif endfunction function Boss_Ability_1_3_n03G takes unit unit1,real x,real y,real a,real b,real c returns nothing local integer i=Boss_Spell_allocate() local unit u call MoveLocation(Boss_Point,x,y) set Boss_Spell_unit1[i]=unit1 set Boss_Spell_data1[i]=R2I(GetLocationZ(Boss_Point)+GetUnitFlyHeight(unit1)+300) set Boss_Spell_X[i]=Cos(a)*Cos(b)*c set Boss_Spell_Y[i]=Sin(a)*Cos(b)*c set Boss_Spell_Z[i]=Sin(b)*c set CR=FALSE set u=CreateUnit(Player($F),'e001',x,y,a*bj_RADTODEG) call SetUnitX(u,x) call SetUnitY(u,y) call UnitAddAbility(u,'Amrf') call UnitRemoveAbility(u,'Amrf') call SetUnitFlyHeight(u,I2R(Boss_Spell_data1[i])-GetLocationZ(Boss_Point),0) call SetUnitScale(u,1.,0,0) set Boss_Spell_eff[i]=AddSpecialEffectTarget("s_lavabomb.mdl",u,"origin") set Boss_Spell_unit2[i]=u set CR=true call TimerStart(NewTimer(i),.03125,true,function Boss_Ability_1_4_n03G) endfunction function Boss_Ability_1_2_n03G takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer index set Boss_Spell_data1[i]=Boss_Spell_data1[i]-2 if Boss_Spell_data1[i]>=0 then set Boss_Spell_X[i]=Boss_Spell_X[i]+GetRandomReal(.3,1.28) set Boss_Spell_Y[i]=Boss_Spell_Y[i]-GetRandomReal(.01,.02) set Boss_Spell_Z[i]=35+GetRandomReal(-$A,8) call Boss_Ability_1_3_n03G(Boss_Spell_unit1[i],GetUnitX(Boss_Spell_unit1[i]),GetUnitY(Boss_Spell_unit1[i]),Boss_Spell_X[i],Boss_Spell_Y[i],Boss_Spell_Z[i]) call SetTextTagText(Boss_texttag_n03G,I2S(Boss_Spell_data1[i])+".00%",(.0023)*20) if Boss_Spell_data1[i]<=0 then set Boss_Index_n03G=0 call PauseUnit(Boss_Spell_unit1[i],false) call SetUnitAnimation(Boss_Spell_unit1[i],"Sand") call SetUnitNocontrol((GetUnitUserData((Boss_Spell_unit1[i]))),false) endif elseif Boss_Spell_data1[i]<=20 then if Boss_Index_n03G==0 then call SetTextTagText(Boss_texttag_n03G,"",0) endif call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:214") call Boss_Spell_deallocate(i) endif endfunction function Boss_Ability_1_1_n03G takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) if Boss_Index_n03G!=1 then call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:215") call Boss_Spell_deallocate(i) return endif set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 if Boss_Spell_data1[i]==30 then call SetUnitAnimation(Boss_Spell_unit1[i],"birth") elseif Boss_Spell_data1[i]==80 then call SetUnitAnimation(Boss_Spell_unit1[i],"Sand alternate") elseif Boss_Spell_data1[i]==100 then call SetUnitTimeScale(Boss_Spell_unit1[i],1) call Lqv(LAv("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",GetUnitX(Boss_Spell_unit1[i]),GetUnitY(Boss_Spell_unit1[i]),2.5),2) call TimerStart(GetExpiredTimer(),.1,true,function Boss_Ability_1_2_n03G) set Boss_Spell_X[i]=GetRandomReal(0,6.28) set Boss_Spell_Y[i]=1.36 set Boss_Spell_Z[i]=35 endif call SetTextTagPos(Boss_texttag_n03G,GetUnitX(Boss_Spell_unit1[i]),GetUnitY(Boss_Spell_unit1[i]),$96) call SetTextTagText(Boss_texttag_n03G,I2S(Boss_Spell_data1[i])+".00%",(.0023)*20) endfunction function Boss_Ability_1_n03G takes nothing returns nothing local integer i=Boss_Spell_allocate() set Boss_Index_n03G=1 set Boss_Spell_data1[i]=0 set Boss_Spell_unit1[i]=Boss_Unit_n03G call TimerStart(NewTimer(i),.03,true,function Boss_Ability_1_1_n03G) call SetTextTagColor(Boss_texttag_n03G,$FF,0,0,$FF) call SetTextTagPos(Boss_texttag_n03G,GetUnitX(Boss_Spell_unit1[i]),GetUnitY(Boss_Spell_unit1[i]),$96) call SetTextTagText(Boss_texttag_n03G,I2S(Boss_Spell_data1[i])+".00%",(.0023)*20) call SetUnitNocontrol((GetUnitUserData((Boss_Spell_unit1[i]))),true) set Boss_Ability_CD1_n03G=(100000.-TimerGetRemaining(GameTimer))+45 call PauseUnit(Boss_Spell_unit1[i],true) call SetUnitAnimation(Boss_Spell_unit1[i],"death") call SetUnitTimeScale(Boss_Spell_unit1[i],.5) endfunction function Boss_Damage_n03G takes nothing returns nothing local unit u=(MF) if u==Boss_Unit_n03G then if Boss_Index_n03G==0 then call DamageMinus(GetDamage()*.99) elseif Boss_Index_n03G==1 then call DamageMinus(GetDamage()*.9) endif endif set u=null endfunction function Boss_Start5_n03G takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local real life=GetWidgetLife(Boss_Spell_unit1[i]) local real maxlife=GetUnitState(Boss_Spell_unit1[i],UNIT_STATE_MAX_LIFE) local real v=life/ maxlife local unit u local real x=GetUnitX(Boss_Spell_unit1[i]) local real y=GetUnitY(Boss_Spell_unit1[i]) local integer index if Boss_Index_n03G==999 then call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:216") call Boss_Spell_deallocate(i) call free(Boss_root_n03G) call DestroyTextTag(Boss_texttag_n03G) set i=8 loop set i=i+1 if MV[i]!=null and Off_A098_id[(GetUnitUserData((MV[i])))]=='n03G' then set Off_A098[(GetUnitUserData((MV[i])))]=FALSE set Off_A098_id[(GetUnitUserData((MV[i])))]=0 endif exitwhen i==0 endloop return endif set index=0 call SetRect(bj_lastMoveRect,$35E0,-$5C60,$41E0,-$50C0) call GroupEnumUnitsInRect(G,bj_lastMoveRect,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitAliveAndEnemy(u,Boss_Spell_unit1[i])and IsUnitType(u,UNIT_TYPE_HERO)then set index=index+1 endif endloop if index==0 then if Boss_Spell_Z[i]<60 then set Boss_Spell_Z[i]=Boss_Spell_Z[i]+.03125 else call SetWidgetLife(Boss_Spell_unit1[i],life+maxlife*.01/ 32.) endif elseif Boss_Spell_Z[i]>0 then set Boss_Spell_Z[i]=Boss_Spell_Z[i]-.03125 endif if life>0 then if Boss_Index_n03G==0 and Boss_Ability_CD1_n03G<(100000.-TimerGetRemaining(GameTimer))then if v<1.1 or not((Control_use[(GetUnitUserData(((Boss_Spell_unit1[i]))))])or GetUnitAbilityLevel(Boss_Spell_unit1[i],'BUdd')>0 or GetUnitAbilityLevel(Boss_Spell_unit1[i],'B01N')>0 or GetUnitAbilityLevel(Boss_Spell_unit1[i],'B06P')>0)then if index>=1 then call Boss_Ability_1_n03G() endif endif endif else set Boss_Index_n03G=999 endif endfunction function Boss_Start4_n03G takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local real x=Boss_Spell_X[i]-(Boss_Spell_data1[i]+.5)*360 local real y=Boss_Spell_Y[i] local unit u call Lqv(LAv("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",x,y,1.3),2) call GroupEnumUnitsInRange(G,x,y,325,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$FA)and UnitAlive(u)and GetUnitAbilityLevel(u,'Avul')==0 then if IsUnitAliveAndEnemy(u,Boss_Spell_unit1[i])then if not IsUnitInGroup(u,Boss_Spell_group1[i])then call GroupAddUnit(Boss_Spell_group1[i],u) call m2v(u,3,'A500','B500',true) call UnitDamageTargetBY(((Boss_Spell_unit1[i])),((u)),((((GetWidgetLife(u)*.5)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) endif endif endif endloop set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 if Boss_Spell_data1[i]>=5 then call SetTextTagText(Boss_texttag_n03G,"",.0) call SetUnitTimeScale(Boss_Spell_unit1[i],1) call PauseUnit(Boss_Unit_n03G,false) call SetUnitInvulnerable(Boss_Unit_n03G,false) call UnitAddBeDamagerTrig((GetUnitUserData((Boss_Unit_n03G))),function Boss_Damage_n03G) call DestroyGroup(Boss_Spell_group1[i]) call DestroyGroup(Boss_Spell_group2[i]) set Boss_Spell_group1[i]=null call TimerStart(GetExpiredTimer(),.03125,true,function Boss_Start5_n03G) set Boss_Ability_CD1_n03G=(100000.-TimerGetRemaining(GameTimer))+45 set Boss_Spell_Z[i]=0 endif endfunction function Boss_Start3_n03G takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 if Boss_Spell_data1[i]<100 then call SetTextTagText(Boss_texttag_n03G,I2S(Boss_Spell_data1[i])+".00%",(.0023)*20) else set Boss_Spell_data1[i]=0 call SetTextTagText(Boss_texttag_n03G,"100%(41993)",(.0023)*30) call SetUnitAnimation(Boss_Spell_unit1[i],"attack") call SetUnitTimeScale(Boss_Spell_unit1[i],.5) call TimerStart(GetExpiredTimer(),.2,true,function Boss_Start4_n03G) endif endfunction function Boss_Start2_n03G takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer index local group g local unit u local real x local real y if Boss_Spell_data1[i]==0 then set Boss_Spell_data1[i]=1 set index=LoadInteger(BYHT,Boss_root_n03G,0) loop exitwhen index==0 set u=ConvertVersion(LoadInteger(BYHT2,Boss_root_n03G,index)) call SetUnitScale(u,3.,0,0) set index=index-1 endloop call TimerStart(GetExpiredTimer(),1,false,function Boss_Start2_n03G) set g=Boss_Spell_group1[i] set Boss_Spell_group1[i]=Boss_Spell_group2[i] set Boss_Spell_group2[i]=g loop set u=FirstOfGroup(g) exitwhen u==null call GroupAddUnit(Boss_Spell_group1[i],u) call GroupRemoveUnit(g,u) set index=(GetUnitUserData((u))) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile.mdl",u,"origin")) set Boss_Spell_eff[index]=AddSpecialEffectTarget("Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile.mdl",u,"origin") endloop set g=null elseif Boss_Spell_data1[i]==1 then set Boss_Spell_data1[i]=2 set Boss_Spell_data2[i]=0 call TimerStart(GetExpiredTimer(),.03125,true,function Boss_Start2_n03G) set g=Boss_Spell_group1[i] set Boss_Spell_group1[i]=Boss_Spell_group2[i] set Boss_Spell_group2[i]=g loop set u=FirstOfGroup(g) exitwhen u==null call GroupAddUnit(Boss_Spell_group1[i],u) call GroupRemoveUnit(g,u) call SetUnitScale(u,1.,0,0) endloop set g=null elseif Boss_Spell_data1[i]==2 then set Boss_Spell_data2[i]=Boss_Spell_data2[i]+1 if Boss_Spell_data2[i]>64 then set Boss_Spell_data1[i]=3 set x=(GetUnitX(Boss_Unit_n03G)) set y=(GetUnitY(Boss_Unit_n03G)) call TimerStart(GetExpiredTimer(),1.5,false,function Boss_Start2_n03G) call SetUnitAnimation(Boss_Spell_unit1[i],"birth") call ShowUnit(Boss_Spell_unit1[i],true) call SetUnitTimeScale(Boss_Spell_unit1[i],.667/ 1.5) call DestroyEffect(AddSpecialEffect("firegold.mdx",x,y)) call DestroyEffect(AddSpecialEffect("firenova2.mdx",x,y)) set g=Boss_Spell_group1[i] set Boss_Spell_group1[i]=Boss_Spell_group2[i] set Boss_Spell_group2[i]=g loop set u=FirstOfGroup(g) exitwhen u==null call GroupAddUnit(Boss_Spell_group1[i],u) call GroupRemoveUnit(g,u) set index=(GetUnitUserData((u))) call DestroyEffect(Boss_Spell_eff[index]) set Boss_Spell_eff[index]=null call Boss_Spell_deallocate(index) call RemoveUnitBJ(u,30) endloop set g=null else set g=Boss_Spell_group1[i] set Boss_Spell_group1[i]=Boss_Spell_group2[i] set Boss_Spell_group2[i]=g loop set u=FirstOfGroup(g) exitwhen u==null call GroupAddUnit(Boss_Spell_group1[i],u) call GroupRemoveUnit(g,u) set index=(GetUnitUserData((u))) set Boss_x[0]=GetUnitX(u)-Boss_Spell_X[i] set Boss_y[0]=GetUnitY(u)-Boss_Spell_Y[i] set x=Boss_Spell_X[i]+(Cos(.06)*Boss_x[0]-Sin(.06)*Boss_y[0])*.96 set y=Boss_Spell_Y[i]+(Cos(.06)*Boss_y[0]+Sin(.06)*Boss_x[0])*.96 call SetUnitX(u,x) call SetUnitY(u,y) call SetUnitFacing(u,Atan2(Boss_Spell_Y[i]-y,Boss_Spell_X[i]-x)*bj_RADTODEG) call SetUnitFlyHeight(u,$96*(1.-I2R(Boss_Spell_data2[i])/ 64.)+533.*Sin((I2R(Boss_Spell_data2[i])/ 64.)*3.14),0) endloop set g=null endif else set Boss_Spell_data1[i]=0 call TimerStart(GetExpiredTimer(),.1,true,function Boss_Start3_n03G) set Boss_texttag_n03G=CreateTextTag() call SetTextTagColor(Boss_texttag_n03G,$FF,0,0,$FF) call SetTextTagPos(Boss_texttag_n03G,GetUnitX(Boss_Unit_n03G),GetUnitY(Boss_Unit_n03G),$96) call SetTextTagText(Boss_texttag_n03G,I2S(Boss_Spell_data1[i])+".00%",(.0023)*20) call SetUnitAnimation(Boss_Spell_unit1[i],"Sand alternate") call SetUnitTimeScale(Boss_Spell_unit1[i],1) set index=LoadInteger(BYHT,Boss_root_n03G,0) loop exitwhen index==0 set u=ConvertVersion(LoadInteger(BYHT2,Boss_root_n03G,index)) call DestroyEffect(Boss_Spell_eff[(GetUnitUserData((u)))]) set Boss_Spell_eff[(GetUnitUserData((u)))]=null call Boss_Spell_deallocate((GetUnitUserData((u)))) call SetUnitUserData(u,0) set u=null set index=index-1 endloop endif endfunction function Boss_Start1_n03G takes nothing returns nothing local integer i local integer index local real x local real y local real z local unit u if Boss_Index_n03G<=-1 then set Boss_Index_n03G=0 set i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=Boss_Unit_n03G set Boss_Spell_data1[i]=0 set Boss_Spell_X[i]=GetUnitX(Boss_Unit_n03G) set Boss_Spell_Y[i]=GetUnitY(Boss_Unit_n03G) set Boss_Spell_group1[i]=CreateGroup() set Boss_Spell_group2[i]=CreateGroup() call TimerStart(NewTimer(i),2,false,function Boss_Start2_n03G) set index=LoadInteger(BYHT,Boss_root_n03G,0) loop exitwhen index==0 set u=ConvertVersion(LoadInteger(BYHT2,Boss_root_n03G,index)) set CR=false set x=GetUnitX(u) set y=GetUnitY(u) set z=GetUnitFacing(u) set u=CreateUnit(Player($F),'e001',x,y,z) call SetUnitX(u,x) call SetUnitY(u,y) call UnitAddAbility(u,'Amrf') call UnitRemoveAbility(u,'Amrf') call SetUnitFlyHeight(u,$96,0) call SetUnitUserData(u,Boss_Spell_allocate()) call SetUnitScale(u,2.,0,0) call GroupAddUnit(Boss_Spell_group1[i],u) set u=null set CR=true set index=index-1 endloop endif endfunction function Boss_Start_n03G takes nothing returns nothing local integer i=GetHandleId(GetTriggeringRegion()) local real x local real y local real z local unit u if IsItemCharges(GetItemOfTypeFromUnit(GetTriggerUnit(),'I04X'),2)and LoadInteger(BYHT,Boss_root_n03G,i)==0 then call DisplayTimedText("|c00FF0000Red powder|r disappeared leaving burning red light.",5) call RemoveItemByCharges(GetItemOfTypeFromUnit(GetTriggerUnit(),'I04X'),2) call SaveInteger(BYHT,Boss_root_n03G,i,1) set CR=false set x=LoadReal(BYHT,Boss_root_n03G,i) set y=LoadReal(BYHT,Boss_root_n03G,-i) set z=Atan2(GetUnitY(Boss_Unit_n03G)-y,GetUnitX(Boss_Unit_n03G)-x)*bj_RADTODEG set u=CreateUnit(Player($F),'e001',x,y,z) call SetUnitX(u,x) call SetUnitY(u,y) call SetUnitUserData(u,Boss_Spell_allocate()) call SetUnitScale(u,2.,0,0) set Boss_Spell_eff[(GetUnitUserData((u)))]=AddSpecialEffectTarget("Abilities\\Spells\\Other\\Doom\\DoomTarget.mdl",u,"origin") call SaveInteger(BYHT2,Boss_root_n03G,LoadInteger(BYHT,Boss_root_n03G,0),GetHandleId(u)) call SaveInteger(BYHT,Boss_root_n03G,0,LoadInteger(BYHT,Boss_root_n03G,0)-1) if LoadInteger(BYHT,Boss_root_n03G,0)==0 then set i=LoadInteger(BYHT,Boss_root_n03G,GetHandleId(GetTriggeringTrigger())) call SaveInteger(BYHT,Boss_root_n03G,0,i) loop exitwhen i==0 call RemoveSavedInteger(BYHT,Boss_root_n03G,GetHandleId(ConvertVersion(LoadInteger(BYHT2,Boss_root_n03G,-i)))) call RemoveRegion(ConvertVersion(LoadInteger(BYHT2,Boss_root_n03G,-i))) call RemoveSavedInteger(BYHT2,Boss_root_n03G,-i) set i=i-1 endloop call DestroyTrigger(GetTriggeringTrigger()) call Boss_Start1_n03G() endif set u=null set CR=true endif endfunction function Boss_Enter_n03G takes nothing returns nothing if IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)and Boss_Index_n03G<=-1 and tEv(GetTriggerUnit(),$2F58,-$549C,380)then if Boss_Index_n03G==-2 then set Boss_Index_n03G=-1 endif set Off_A098[(GetUnitUserData((GetTriggerUnit())))]=true set Off_A098_id[(GetUnitUserData((GetTriggerUnit())))]='n03G' endif endfunction function Boss_I064_2_n03G takes nothing returns nothing call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:217") call TriggerRemoveCondition(alloc__GX[(TRIGGER_PICKUP)],((Boss_PICKUP_TC_n03G))) set Boss_PICKUP_TC_n03G=null endfunction function Boss_I064_n03G takes nothing returns nothing if GetItemTypeIdG(GetManipulatedItem())=='I064' then if Quest_I064_On and IsItemCharges(GetItemOfTypeFromUnit(GetTriggerUnit(),'I0DP'),6)then set Quest_I064_On=false call TimerStart(NewTimer(0),0,false,function Boss_I064_2_n03G) call RemoveItemByCharges(GetItemOfTypeFromUnit(GetTriggerUnit(),'I0DP'),6) call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,30,"|c00FF0000Note: | The flame to the bridge of energy inside the lava volcano has been extinguished. Now you can cross the bridge.") endif endif endfunction function Boss_EnumDestructable_n03G takes nothing returns nothing local real x=GetDestructableX(GetEnumDestructable()) local real y=GetDestructableY(GetEnumDestructable()) local rect r if GetDestructableTypeId(GetEnumDestructable())=='Volc' then set bj_lastCreatedRegion=CreateRegion() set r=Rect(x-$80,y-$80,x+$80,y+$80) call RegionAddRect(bj_lastCreatedRegion,r) call TriggerRegisterEnterRegion(ConvertVersion(LoadInteger(BYHT2,Boss_root_n03G,0)),bj_lastCreatedRegion,null) call SaveInteger(BYHT,Boss_root_n03G,0,LoadInteger(BYHT,Boss_root_n03G,0)+1) call SaveInteger(BYHT2,Boss_root_n03G,-LoadInteger(BYHT,Boss_root_n03G,0),GetHandleId(bj_lastCreatedRegion)) call SaveReal(BYHT,Boss_root_n03G,GetHandleId(bj_lastCreatedRegion),x) call SaveReal(BYHT,Boss_root_n03G,-GetHandleId(bj_lastCreatedRegion),y) set bj_lastCreatedRegion=null call RemoveRect(r) set r=null endif endfunction function Boss_Init_n03G takes nothing returns nothing local rect r=Rect($4C00,-$C60,$57A0,-$E0) set bj_lastCreatedRegion=CreateRegion() set Boss_root_n03G=malloc() set Boss_Unit_n03G=gg_unit_n03G_0815 call ShowUnit(Boss_Unit_n03G,false) call PauseUnit(Boss_Unit_n03G,true) call SetUnitInvulnerable(Boss_Unit_n03G,true) set Boss_PICKUP_TC_n03G=(TriggerAddCondition(alloc__GX[(TRIGGER_PICKUP)],(Condition((function Boss_I064_n03G))))) call SaveInteger(BYHT2,Boss_root_n03G,0,GetHandleId(CreateTrigger())) call SaveInteger(BYHT,Boss_root_n03G,GetHandleId(ConvertVersion(LoadInteger(BYHT2,Boss_root_n03G,0))),LoadInteger(BYHT,Boss_root_n03G,0)) call TriggerAddCondition(ConvertVersion(LoadInteger(BYHT2,Boss_root_n03G,0)),Filter(function Boss_Start_n03G)) call RemoveRect(r) set r=null endfunction function Boss_SetUnitUseMove_func_h01K takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) call SetUnitPropWindow((Je[(id)]),bj_DEGTORAD*GetUnitDefaultPropWindow((Je[(id)]))) call s__Trig_remove((Boss_SetUnitUseMove_V_h01K[id])) set Boss_SetUnitUseMove_V_h01K[id]=0 endfunction function Boss_SetUnitUseMove_h01K takes unit u,boolean b returns nothing if UnitAlive(u)then if not b then call SetUnitPropWindow(u,0) if Boss_SetUnitUseMove_V_h01K[(GetUnitUserData((u)))]==null then set Boss_SetUnitUseMove_V_h01K[(GetUnitUserData((u)))]=AddUnitDeathTrigB((GetUnitUserData((u))),function Boss_SetUnitUseMove_func_h01K) endif else call SetUnitPropWindow(u,bj_DEGTORAD*GetUnitDefaultPropWindow(u)) if Boss_SetUnitUseMove_V_h01K[(GetUnitUserData((u)))]!=null then call s__Trig_remove((Boss_SetUnitUseMove_V_h01K[(GetUnitUserData((u)))])) set Boss_SetUnitUseMove_V_h01K[(GetUnitUserData((u)))]=0 endif endif endif endfunction function Boss_RemoveBuff7_h01K takes unit u returns nothing local integer id=(GetUnitUserData((u))) local integer i if Boss_Buff7_timer_h01K[id]!=null and u==(Je[(id)])then set i=ReleaseTimer(Boss_Buff7_timer_h01K[id],"[TimerUtils]Error:218") call ModifyUnitArmor(id,750) call RemoveUnitBJ(Boss_Spell_unit2[i],31) call GroupRemoveUnit(Boss_Buff7_group_h01K,u) call s__Trig_remove((Boss_Buff7_death_h01K[id])) call Boss_Spell_deallocate(i) set Boss_Buff7_death_h01K[id]=0 set Boss_Buff7_timer_h01K[id]=null call Unit_Cancel_Counter($F5,id) endif endfunction function Boss_AddBuff7_4_h01K takes nothing returns nothing local integer i=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:219") local real x=Boss_Spell_X[i] local real y=Boss_Spell_Y[i] local unit u local group g=CreateGroup() call GroupEnumUnitsInRange(g,x,y,325.+75,null) loop set u=FirstOfGroup(g) exitwhen u==null call GroupRemoveUnit(g,u) if IsUnitInRangeXY(u,x,y,325.)then if IsUnitAliveAndEnemyNotAvul(u,Boss_Spell_unit1[i])then call UnitDamageTargetBY(((Boss_Spell_unit1[i])),((u)),(((($EA60)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) endif endif endloop call DestroyGroup(g) set g=null call Boss_Spell_deallocate(i) endfunction function Boss_AddBuff7_3_h01K takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer id set Boss_Spell_X[i]=Boss_Spell_X[i]-.1 if Boss_Spell_X[i]<=0 or UnitAlive(Boss_Spell_unit1[i])==false then call Boss_RemoveBuff7_h01K(Boss_Spell_unit1[i]) else if GetUnitAbilityLevel(Boss_Spell_unit1[i],'B07P')==0 then call IssueTargetOrderById(Boss_Spell_unit2[i],$D0200,Boss_Spell_unit1[i]) endif endif endfunction function Boss_AddBuff7_2_h01K takes nothing returns nothing call Boss_RemoveBuff7_h01K(GetTriggerUnit()) endfunction function Boss_AddBuff7_h01K takes unit whichUnit,unit u,real r returns nothing local integer id=(GetUnitUserData((u))) local integer i if UnitAlive(u)and u==(Je[(id)])then if Boss_Buff7_timer_h01K[id]==null then set i=Boss_Spell_allocate() set Boss_Buff7_timer_h01K[id]=NewTimer(i) set Boss_Buff7_death_h01K[id]=AddUnitDeathTrigB(id,function Boss_AddBuff7_2_h01K) call TimerStart(Boss_Buff7_timer_h01K[id],.1,true,function Boss_AddBuff7_3_h01K) call Unit_App_Counter($F6,id) set Boss_Spell_unit1[i]=u set CR=false set Boss_Spell_unit2[i]=CreateUnit(Player($F),'e001',GetUnitX(u),GetUnitY(u),0) call UnitAddAbility(Boss_Spell_unit2[i],'Amls') set CR=true call IssueTargetOrderById(Boss_Spell_unit2[i],$D0200,Boss_Spell_unit1[i]) call ModifyUnitArmor(id,-750) set Boss_Spell_X[i]=r else set i=(alloc__hpv(GetHandleId((Boss_Buff7_timer_h01K[id])))) if IsUnitInGroup(u,Boss_Buff7_group_h01K)==false then call GroupAddUnit(Boss_Buff7_group_h01K,u) set Boss_Spell_X[i]=r else call Boss_RemoveBuff7_h01K(u) set i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=whichUnit set Boss_Spell_unit2[i]=u set Boss_Spell_X[i]=GetUnitX(u) set Boss_Spell_Y[i]=GetUnitY(u) call Ltv(LAv("bigbloodex-nosplat-nogutz.mdl",Boss_Spell_X[i],Boss_Spell_Y[i],1.5)) call TimerStart(NewTimer(i),.2,false,function Boss_AddBuff7_4_h01K) endif endif endif endfunction function Boss_AddBuff_4_2_2_h01K takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:220") call ModifyUnitMpRegen(id,500) call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0V1','B07Q') call Unit_Cancel_Counter($F7,id) set Boss_Buff_4_2_h01K[id]=null endfunction function Boss_AddBuff_4_2_1_h01K takes unit u returns nothing local integer id=(GetUnitUserData((u))) if UnitAlive(u)and u==(Je[(id)])then if Boss_Buff_4_2_h01K[id]==null then set Boss_Buff_4_2_h01K[id]=NewTimer(id) call ModifyUnitMpRegen(id,-500) call UnitAddAbilityBY(u,'A0V1') call Unit_App_Counter($F8,id) endif call TimerStart(Boss_Buff_4_2_h01K[id],.5,false,function Boss_AddBuff_4_2_2_h01K) endif endfunction function Boss_AddBuff_4_2_h01K takes nothing returns nothing local integer id=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local unit Unit=(Je[(id)]) local unit u local real x local real y if UnitAlive(Unit)then set x=GetUnitX(Unit) set y=GetUnitY(Unit) call GroupEnumUnitsInRange(G,x,y,600.+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,600.)then if IsUnitAliveAndEnemyNotAvul(u,Unit)then call Boss_AddBuff_4_2_1_h01K(u) endif endif endloop else call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:221") endif set Unit=null set u=null endfunction function Boss_AddBuff_4_1_2_h01K takes nothing returns nothing local integer id=s__Trig_P call s__Trig_remove(s__Trig_Index) if Boss_Buff_4_h01K[id]>0 then call DeUnitBeCureRatio(id,Boss_Buff_4_h01K[id]) set Boss_Buff_4_h01K[id]=0 endif endfunction function Boss_AddBuff_4_1_h01K takes unit u returns nothing local integer id=(GetUnitUserData((u))) if UnitAlive(u)and u==(Je[(id)])then if Boss_Buff_4_h01K[id]==0 then set Boss_Buff_4_h01K[id]=ModifyUnitBeCureRatio(id,-20) call AddUnitDeathTrigB(id,function Boss_AddBuff_4_1_2_h01K) else if(100*s__unitseate_table_v[(Boss_Buff_4_h01K[id])])>-100 then call UnitBeCureRatioChange(id,Boss_Buff_4_h01K[id],(100*s__unitseate_table_v[(Boss_Buff_4_h01K[id])])-20) endif endif endif endfunction function Boss_Unit_3_Ability_2_func002_h01K takes nothing returns nothing local integer i=Boss_Spell_data1[0] local integer index=(GetUnitUserData((GetEnumUnit()))) local real x local real y local unit u local group g set x=GetUnitX(GetEnumUnit())+Boss_Spell_X[index] set y=GetUnitY(GetEnumUnit())+Boss_Spell_Y[index] call SetUnitX(GetEnumUnit(),x) call SetUnitY(GetEnumUnit(),y) call GroupEnumUnitsInRange(G,x,y,Boss_Spell_Z[i]+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,Boss_Spell_Z[i])and not IsUnitInGroup(u,Boss_Spell_group2[i])then if IsUnitAliveAndEnemy(u,Boss_Spell_unit1[i])and GetUnitAbilityLevel(u,'Avul')==0 then call GroupAddUnit(Boss_Spell_group2[i],u) call UnitDamageTargetBY((Boss_Spell_unit1[i]),(u),(($C350)*1.),false,(false),false,false,(ConvertAttackType(0)),(ConvertDamageType(17)),((0)*1.),("")) endif endif endloop if Boss_Spell_data1[i]>=16 then call GroupRemoveUnit(Boss_Spell_group1[i],GetEnumUnit()) call SetUnitUserData(GetEnumUnit(),0) call KillUnit(GetEnumUnit()) call DestroyEffect(Boss_Spell_eff[index]) call Boss_Spell_deallocate(index) endif endfunction function Boss_Unit_3_Ability_2_func_h01K takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer index local real x local real y set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 if Boss_Spell_data1[i]==1 then set Boss_Spell_Z[i]=75 set x=0 loop exitwhen x>=360 set index=Boss_Spell_allocate() set Boss_Spell_group1[index]=CreateGroup() set Boss_Spell_X[index]=32*Cos(x*bj_DEGTORAD) set Boss_Spell_Y[index]=32*Sin(x*bj_DEGTORAD) set CR=FALSE set Boss_Spell_unit1[index]=CreateUnit(Player($F),'e001',Boss_Spell_X[i],Boss_Spell_Y[i],x) call SetUnitX(Boss_Spell_unit1[index],Boss_Spell_X[i]) call SetUnitY(Boss_Spell_unit1[index],Boss_Spell_Y[i]) call SetUnitScale(Boss_Spell_unit1[index],.5,0,0) call SetUnitUserData(Boss_Spell_unit1[index],index) call GroupAddUnit(Boss_Spell_group1[i],Boss_Spell_unit1[index]) set Boss_Spell_eff[index]=AddSpecialEffectTarget("Abilities\\Spells\\Undead\\CarrionSwarm\\CarrionSwarmMissile.mdl",Boss_Spell_unit1[index],"origin") set CR=true set x=x+45 endloop call TimerStart(NewTimer(i),.03,true,function Boss_Unit_3_Ability_2_func_h01K) else set index=Boss_Spell_data1[0] set Boss_Spell_data1[0]=i call ForGroup(Boss_Spell_group1[i],function Boss_Unit_3_Ability_2_func002_h01K) set Boss_Spell_data1[0]=index set Boss_Spell_Z[i]=Boss_Spell_Z[i]+7.5 if Boss_Spell_data1[i]==16 then call DestroyGroup(Boss_Spell_group1[i]) call DestroyGroup(Boss_Spell_group2[i]) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:222") endif endif endfunction function Boss_Unit_3_Ability_2_h01K takes nothing returns nothing local integer i if GetTriggerUnit()==Boss_Unit_3_h01K then set i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=GetTriggerUnit() set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=0 set Boss_Spell_group1[i]=CreateGroup() set Boss_Spell_group2[i]=CreateGroup() set Boss_Spell_X[i]=GetUnitX(Boss_Spell_unit1[i]) set Boss_Spell_Y[i]=GetUnitY(Boss_Spell_unit1[i]) call TimerStart(NewTimer(i),.3,false,function Boss_Unit_3_Ability_2_func_h01K) call Ltv(LAv("acid ex.mdl",Boss_Spell_X[i],Boss_Spell_Y[i],1.2)) endif endfunction function Boss_Unit_3_Ability_1_func_h01K takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer index local real x local real y if Boss_Spell_data1[i]==0 then set Boss_Spell_data1[i]=1 set Boss_Spell_data2[i]=5 call PauseUnit(Boss_Spell_unit1[i],true) call TimerStart(GetExpiredTimer(),.33,true,function Boss_Unit_3_Ability_1_func_h01K) call SetUnitAnimationByIndex(Boss_Spell_unit1[i],6) set x=GetUnitX(Boss_Spell_unit1[i])+$C8*CosBJ(GetUnitFacing(Boss_Spell_unit1[i])) set y=GetUnitY(Boss_Spell_unit1[i])+$C8*SinBJ(GetUnitFacing(Boss_Spell_unit1[i])) call SetUnitPosition(Boss_Spell_unit2[i],x,y) call m2v(Boss_Spell_unit2[i],3,'A500','B500',true) set index=LVv('e03F',GetUnitX(Boss_Spell_unit1[i]),GetUnitY(Boss_Spell_unit1[i]),GetUnitFacing(Boss_Spell_unit1[i])) call Lqv(LDv(index,3),2) elseif Boss_Spell_data1[i]==1 then if UnitAlive(Boss_Spell_unit1[i])then set Boss_Spell_data2[i]=Boss_Spell_data2[i]-1 call UnitDamageTargetBY(((Boss_Spell_unit1[i])),((Boss_Spell_unit2[i])),(((($4E20)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((20)*1.))*1.),(("|c0080FF80"))) call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",Boss_Spell_unit2[i],"origin")) else set Boss_Spell_data2[i]=0 endif if Boss_Spell_data2[i]>0 then call m2v(Boss_Spell_unit2[i],3,'A500','B500',true) call SetUnitAnimationByIndex(Boss_Spell_unit1[i],6) set index=LVv('e03F',GetUnitX(Boss_Spell_unit1[i]),GetUnitY(Boss_Spell_unit1[i]),GetUnitFacing(Boss_Spell_unit1[i])) call Lqv(LDv(index,3),2) else set Boss_Spell_data1[i]=2 if UnitAlive(Boss_Spell_unit1[i])then call SetUnitAnimation(Boss_Spell_unit1[i],"stand") endif call SetUnitTimeScale(Boss_Spell_unit1[i],1) call TimerStart(GetExpiredTimer(),.1,false,function Boss_Unit_3_Ability_1_func_h01K) endif else call PauseUnit(Boss_Spell_unit1[i],false) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:223") endif endfunction function Boss_Unit_3_Ability_1_h01K takes nothing returns nothing local integer EvelId=GetHandleId(GetTriggerEventId()) local integer id=(GetUnitUserData((GetTriggerUnit()))) local integer i if GetTriggerUnit()==Boss_Unit_3_h01K then if EvelId==274 then set i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=GetTriggerUnit() set Boss_Spell_unit2[i]=GetSpellTargetUnit() set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=0 call TimerStart(NewTimer(i),.0,false,function Boss_Unit_3_Ability_1_func_h01K) elseif EvelId==272 then call NewTextTagInTarget_B(Boss_Unit_HM,"!",18,$FF,$FF,$FF) endif endif endfunction function Boss_Unit_2_Ability_2_func_h01K takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local real x local real y local unit u if Boss_Spell_data1[i]>0 then set Boss_Spell_data1[i]=Boss_Spell_data1[i]-1 set x=(GetUnitX(II[(Boss_Spell_data2[i])]))+Boss_Spell_X[i] set y=(GetUnitY(II[(Boss_Spell_data2[i])]))+Boss_Spell_Y[i] if IsTerrainPathable(x,y,PATHING_TYPE_FLYABILITY)==FALSE then call LKv(Boss_Spell_data2[i],x) call Llv(Boss_Spell_data2[i],y) else set Boss_Spell_data1[i]=0 set x=(GetUnitX(II[(Boss_Spell_data2[i])])) set y=(GetUnitY(II[(Boss_Spell_data2[i])])) endif if Boss_Spell_data1[i]<20 then set x=(GetUnitX(II[(Boss_Spell_data2[i])])) set y=(GetUnitY(II[(Boss_Spell_data2[i])])) call GroupEnumUnitsInRange(G,x,y,100,null) loop set u=FirstOfGroup(G) exitwhen u==null or IsUnitAliveAndEnemyNotAvul(u,Boss_Spell_unit1[i]) call GroupRemoveUnit(G,u) endloop if u!=null then set Boss_Spell_data1[i]=0 endif endif if Boss_Spell_data1[i]==0 then call LMv(Boss_Spell_data2[i],"darkportalcast.mdl") call Ltv(Boss_Spell_data2[i]) call Ltv(LAv("warpdarktarget.mdl",x,y,.85)) set Boss_Spell_data2[i]=LAv("",x,y,1.) call TimerStart(GetExpiredTimer(),.5,false,function Boss_Unit_2_Ability_2_func_h01K) endif elseif Boss_Spell_data1[i]==0 then set Boss_Spell_data1[i]=-1 call LMv(Boss_Spell_data2[i],"VoidDrown.mdl") call TimerStart(GetExpiredTimer(),.03125,true,function Boss_Unit_2_Ability_2_func_h01K) else set Boss_Spell_data1[i]=Boss_Spell_data1[i]-1 if Boss_Spell_data1[i]<-$76C then call Ltv(Boss_Spell_data2[i]) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:224") else set x=(GetUnitX(II[(Boss_Spell_data2[i])])) set y=(GetUnitY(II[(Boss_Spell_data2[i])])) call GroupEnumUnitsInRange(G,x,y,325,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$FA)and IsUnitAliveAndEnemyNotAvul(u,Boss_Spell_unit1[i])then set Boss_x[0]=GetUnitX(u) set Boss_y[0]=GetUnitY(u) set Boss_x[1]=Boss_x[0]-x set Boss_y[1]=Boss_y[0]-y set Boss_z[0]=SquareRoot(Boss_x[1]*Boss_x[1]+Boss_y[1]*Boss_y[1]) if Boss_z[0]>0 then set Boss_z[1]=6.25/ Boss_z[0] if Boss_z[1]>1 then set Boss_z[1]=1 endif call SetUnitX(u,Boss_x[0]-Boss_x[1]*Boss_z[1]) call SetUnitY(u,Boss_y[0]-Boss_y[1]*Boss_z[1]) endif endif endloop endif endif endfunction function Boss_Unit_2_Ability_2_h01K takes nothing returns nothing local integer i if GetTriggerUnit()==Boss_Unit_2_h01K then set i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=GetTriggerUnit() set Boss_Spell_X[i]=CosBJ(GetUnitFacing(Boss_Spell_unit1[i]))*20 set Boss_Spell_Y[i]=SinBJ(GetUnitFacing(Boss_Spell_unit1[i]))*20 set Boss_Spell_Z[i]=0 set Boss_Spell_data1[i]=50 set Boss_Spell_data2[i]=LNv("darktrail.mdx",GetUnitX(Boss_Spell_unit1[i])+Boss_Spell_X[i]*4,GetUnitY(Boss_Spell_unit1[i])+Boss_Spell_Y[i]*4,$96,1.5) call TimerStart(NewTimer(i),.03125,true,function Boss_Unit_2_Ability_2_func_h01K) endif endfunction function Boss_AddBuff_2_2_h01K takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer index local integer id local unit u local unit u2 local group g=Boss_Spell_group1[i] local real x local real y local real z local real m local real r local real array x2 local real array y2 local boolean array ex call GroupAddGroup(Boss_Buff_2_1_group_h01K,g) loop set u2=FirstOfGroup(g) exitwhen u2==null call GroupRemoveUnit(g,u2) set index=(GetUnitUserData((u2))) set x=GetUnitX(u2) set y=GetUnitY(u2) set z=125+Boss_Spell_Z[index]*5 set m=(100+Boss_Spell_Z[index]*$F)*.03125 call GroupEnumUnitsInRange(G,x,y,z+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,z)then if IsUnitAliveAndEnemy(u,Boss_Spell_unit1[i])and GetUnitAbilityLevel(u,'Avul')==0 then set id=(GetUnitUserData((u))) if ex[id]!=true then set ex[id]=true call GroupAddUnit(Boss_Spell_group2[i],u) set x2[id]=GetUnitX(u) set y2[id]=GetUnitY(u) endif set x2[0]=x2[id]-x set y2[0]=y2[id]-y set r=SquareRoot(x2[0]*x2[0]+y2[0]*y2[0]) if r>0 then set r=(m/ r) if r>1. then set r=1. endif set x2[id]=x2[id]-x2[0]*r set y2[id]=y2[id]-y2[0]*r endif endif endif endloop endloop set g=Boss_Spell_group2[i] loop set u=FirstOfGroup(g) exitwhen u==null call GroupRemoveUnit(g,u) set id=(GetUnitUserData((u))) call SetUnitX(u,x2[id]) call SetUnitY(u,y2[id]) endloop set g=Boss_Spell_group1[i] call GroupAddGroup(Boss_Buff_2_1_group_h01K,g) set ex[0]=true set r=(100000.-TimerGetRemaining(GameTimer)) loop set u2=FirstOfGroup(g) exitwhen u2==null call GroupRemoveUnit(g,u2) set index=(GetUnitUserData((u2))) if Boss_Spell_Z[index]>$A then set Boss_Spell_X[index]=Boss_Spell_X[index]+1 if Boss_Spell_X[index]>$A0 then set x=GetUnitX(u2) set y=GetUnitY(u2) call GroupRemoveUnit(Boss_Buff_2_1_group_h01K,u2) call SetUnitUserData(u2,0) call KillUnit(u2) call DestroyEffect(Boss_Spell_eff[index]) call Boss_Spell_deallocate(index) call Ltv(LAv("NewGroundEX.mdx",x,y,2.5)) call GroupEnumUnitsInRange(G,x,y,$96+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$96)then if IsUnitAliveAndEnemy(u,Boss_Spell_unit1[i])and GetUnitAbilityLevel(u,'Avul')==0 then call UnitDamageTargetBY(((Boss_Spell_unit1[i])),((u)),(((($186A0)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),(("|c0080FF80"))) endif endif endloop else set ex[0]=false endif else if Boss_Spell_Y[index]Boss_Unit_4_ability1_cd_h01K then set Boss_Unit_4_ability1_cd_h01K=(100000.-TimerGetRemaining(GameTimer))+3 call Boss_AddBuff_4_1_h01K(target) endif endif set attack=null set target=null endfunction function Boss_Ability6_02_h01K takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer v local real a local real b local real x local real y local unit u if Boss_Spell_data2[i]==0 then set Boss_Spell_data2[i]=1 set Boss_Spell_data3[i]=0 set a=GetUnitFacing(Boss_Spell_unit1[i])+GetRandomReal(-90,90) set b=$96 set x=GetUnitX(Boss_Spell_unit1[i])+CosBJ(a)*b set y=GetUnitY(Boss_Spell_unit1[i])+SinBJ(a)*b set Boss_Spell_X[i]=x set Boss_Spell_Y[i]=y call SetUnitTimeScale(Boss_Spell_unit1[i],0) call NewTextTagInTarget_B(Boss_Unit_h01K,"|c008000FFCome out, my men!|r",18,$FF,$FF,$FF) call Lqv(LAv("ArcaneSeal.mdl",x,y,.5),3) call GroupEnumUnitsInRange(G,x,y,256.+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,256.)then if IsUnitAliveAndEnemyNotAvul(u,Boss_Spell_unit1[i])then call GroupAddUnit(Boss_Spell_group1[i],u) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",u,"origin")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayTarget.mdl",u,"origin")) endif endif endloop if Boss_Spell_data1[i]==1 then set Boss_Spell_unit2[i]=CreateUnit(GetOwningPlayer(Boss_Spell_unit1[i]),'h01S',x,y,GetUnitFacing(Boss_Spell_unit1[i])) elseif Boss_Spell_data1[i]==2 then set Boss_Spell_unit2[i]=CreateUnit(GetOwningPlayer(Boss_Spell_unit1[i]),'h01P',x,y,GetUnitFacing(Boss_Spell_unit1[i])) elseif Boss_Spell_data1[i]==3 then set Boss_Spell_unit2[i]=CreateUnit(GetOwningPlayer(Boss_Spell_unit1[i]),'h01R',x,y,GetUnitFacing(Boss_Spell_unit1[i])) endif call ShowUnit(Boss_Spell_unit2[i],false) call PauseUnit(Boss_Spell_unit2[i],true) call SetUnitInvulnerable(Boss_Spell_unit2[i],true) call TimerStart(GetExpiredTimer(),.1,true,function Boss_Ability6_02_h01K) elseif Boss_Spell_data2[i]==1 then set Boss_Spell_data3[i]=Boss_Spell_data3[i]+1 set v=GetRandomInt(5,8) loop exitwhen v==0 set a=GetRandomReal(0,6.28) set b=GetRandomReal(0,$FA) set x=Boss_Spell_X[i]+Cos(a)*b set y=Boss_Spell_Y[i]+Sin(a)*b call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UndeadDissipate\\UndeadDissipate.mdl",x,y)) call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",x+GetRandomReal(-50,50),y+GetRandomReal(-50,50))) set v=v-1 endloop set x=Boss_Spell_X[i] set y=Boss_Spell_Y[i] call GroupEnumUnitsInRange(G,x,y,256.+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,256.)then if IsUnitAliveAndEnemyNotAvul(u,Boss_Spell_unit1[i])then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayTarget.mdl",u,"origin")) if IsUnitInGroup(u,Boss_Spell_group1[i])then call UnitDamageTargetBY(((Boss_Spell_unit1[i])),((u)),((((GetUnitState(u,UNIT_STATE_MAX_LIFE)*.2)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) else call UnitDamageTargetBY(((Boss_Spell_unit1[i])),((u)),((((GetUnitState(u,UNIT_STATE_MAX_LIFE)*.1)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) endif endif endif endloop if Boss_Spell_data3[i]>=$A then call SetUnitTimeScale(Boss_Spell_unit1[i],1) call SetUnitAnimation(Boss_Spell_unit1[i],"Attack - 2") set Boss_Spell_data2[i]=2 set Boss_Spell_data3[i]=0 endif call TimerStart(GetExpiredTimer(),1,false,function Boss_Ability6_02_h01K) elseif Boss_Spell_data2[i]==2 then set Boss_Spell_data2[i]=3 if Boss_Spell_data1[i]==1 then set Boss_Unit_2_h01K=Boss_Spell_unit2[i] call UnitAddPAttackTrig((GetUnitUserData((Boss_Unit_2_h01K))),function Boss_attack_2_h01K) call RegisterSpellEffectEvent('A0V4',function Boss_Unit_2_Ability_2_h01K) elseif Boss_Spell_data1[i]==2 then set Boss_Unit_3_h01K=Boss_Spell_unit2[i] call UnitAddPAttackTrig((GetUnitUserData((Boss_Unit_3_h01K))),function Boss_attack_2_h01K) call RegisterSpellChannelEvent('A0V2',function Boss_Unit_3_Ability_1_h01K) call RegisterSpellEffectEvent('A0V2',function Boss_Unit_3_Ability_1_h01K) call RegisterSpellEndCastEvent('A0V2',function Boss_Unit_3_Ability_1_h01K) call RegisterSpellEffectEvent('A0V3',function Boss_Unit_3_Ability_2_h01K) elseif Boss_Spell_data1[i]==3 then set Boss_Unit_4_h01K=Boss_Spell_unit2[i] call UnitAddPAttackTrig((GetUnitUserData((Boss_Unit_4_h01K))),function Boss_attack_2_h01K) call TimerStart(NewTimer((GetUnitUserData((Boss_Unit_4_h01K)))),.33,true,function Boss_AddBuff_4_2_h01K) endif call ShowUnit(Boss_Spell_unit2[i],true) call SetUnitAnimation(Boss_Spell_unit2[i],"Attack") call TimerStart(GetExpiredTimer(),1,false,function Boss_Ability6_02_h01K) else set v=GetRandomInt($A,$D) loop exitwhen v==0 set a=GetRandomReal(0,6.28) set b=GetRandomReal(0,300) set x=Boss_Spell_X[i]+Cos(a)*b set y=Boss_Spell_Y[i]+Sin(a)*b call Ltv(Lfv(LIv("DarkRing.mdl",x,y,GetRandomReal(0,5),5,GetRandomReal(0,6.28),GetRandomReal($F,85)),0,0,0,$FF)) set v=v-1 endloop set x=Boss_Spell_X[i] set y=Boss_Spell_Y[i] call GroupEnumUnitsInRange(G,x,y,350.+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,350.)then if IsUnitAliveAndEnemyNotAvul(u,Boss_Spell_unit1[i])then if IsUnitInGroup(u,Boss_Spell_group1[i])then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",u,"origin")) call UnitDamageTargetBY(((Boss_Spell_unit1[i])),((u)),((((GetUnitState(u,UNIT_STATE_MAX_LIFE))*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) else call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayTarget.mdl",u,"origin")) call UnitDamageTargetBY(((Boss_Spell_unit1[i])),((u)),((((GetUnitState(u,UNIT_STATE_MAX_LIFE)*.8)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) endif endif endif endloop call DestroyGroup(Boss_Spell_group1[i]) call PauseUnit(Boss_Spell_unit1[i],false) call PauseUnit(Boss_Spell_unit2[i],false) call SetUnitInvulnerable(Boss_Spell_unit2[i],false) call SetUnitNocontrol((GetUnitUserData((Boss_Spell_unit1[i]))),false) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:226") call Boss_Spell_deallocate(i) set Boss_Index_h01K=0 endif endfunction function Boss_Ability6_01_h01K takes nothing returns nothing local integer i=Boss_Spell_allocate() local integer v=0 set Boss_exp_h01K=Boss_exp_h01K+1 set Boss_Index_h01K=6 set Boss_Spell_unit1[i]=Boss_Unit_h01K if Boss_Unit_2_h01K==null then set v=v+1 if GetRandomInt(1,v)==1 then set Boss_Spell_data1[i]=1 endif endif if Boss_Unit_3_h01K==null then set v=v+1 if GetRandomInt(1,v)==1 then set Boss_Spell_data1[i]=2 endif endif if Boss_Unit_4_h01K==null then set v=v+1 if GetRandomInt(1,v)==1 then set Boss_Spell_data1[i]=3 endif endif set Boss_Spell_data2[i]=0 set Boss_Spell_group1[i]=CreateGroup() call TimerStart(NewTimer(i),.75,false,function Boss_Ability6_02_h01K) call SetUnitNocontrol((GetUnitUserData((Boss_Spell_unit1[i]))),true) call SetUnitAnimation(Boss_Spell_unit1[i],"spell") call PauseUnit(Boss_Spell_unit1[i],true) endfunction function Boss_Ability5_03_h01K takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer eff local unit u local integer v=2 local real l local real t local real x local real y local real a set Boss_Spell_data1[i]=Boss_Spell_data1[i]-1 set t=Boss_Spell_data1[i]/(32*6.) set Boss_Spell_Z[i]=Boss_Spell_Z[i]+(270./(32*6.))*bj_DEGTORAD set l=t*750. set eff=0 loop exitwhen v==0 set v=v-1 if HaveSavedInteger(BYHT,Boss_Spell_data2[i],v)then set a=Boss_Spell_Z[i]+bj_PI*v set x=Boss_Spell_X[i]+l*Cos(a) set y=Boss_Spell_Y[i]+l*Sin(a) set eff=LoadInteger(BYHT,Boss_Spell_data2[i],v) call SetUnitFacing(II[(eff)],((Atan2(y-(GetUnitY(II[(eff)])),x-(GetUnitX(II[(eff)]))))*1.)*bj_RADTODEG) call LKv(eff,x) call Llv(eff,y) call GroupEnumUnitsInRange(G,x,y,150.+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,150.)then exitwhen IsUnitAliveAndEnemyNotAvul(u,Boss_Spell_unit1[i]) endif endloop if u!=null or Boss_Spell_data1[i]<=0 then call GroupEnumUnitsInRange(G,x,y,325.+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,325.)then if IsUnitAliveAndEnemyNotAvul(u,Boss_Spell_unit1[i])then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",u,"origin")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayTarget.mdl",u,"origin")) call UnitDamageTargetBY(((Boss_Spell_unit1[i])),((u)),((((GetUnitState(u,UNIT_STATE_MAX_LIFE)*.5)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) endif endif endloop call Ltv(LAv("ShadowAssault.mdx",x,y,4)) call Ltv(eff) call RemoveSavedInteger(BYHT,Boss_Spell_data2[i],v) elseif ModuloInteger(Boss_Spell_data1[i],8)==0 then call Ltv(LAv("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",x,y,1.5)) endif endif endloop if eff==0 then if Boss_Spell_data3[i]==0 then call Boss_SetUnitUseMove_h01K(Boss_Spell_unit2[i],true) endif call free(Boss_Spell_data2[i]) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:227") call Boss_Spell_deallocate(i) elseif not UnitAlive(Boss_Spell_unit1[i])and Boss_Spell_data3[i]==0 then set Boss_Spell_data3[i]=1 call Boss_SetUnitUseMove_h01K(Boss_Spell_unit2[i],true) endif endfunction function Boss_Ability5_02_h01K takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer eff local integer v=2 local real t if not UnitAlive(Boss_Spell_unit1[i])then set v=2 loop exitwhen v==0 set v=v-1 set eff=LoadInteger(BYHT,Boss_Spell_data2[i],v) call Ltv(eff) call RemoveSavedInteger(BYHT,Boss_Spell_data2[i],v) endloop call Boss_SetUnitUseMove_h01K(Boss_Spell_unit2[i],true) call free(Boss_Spell_data2[i]) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:228") call Boss_Spell_deallocate(i) else set Boss_Spell_data1[i]=Boss_Spell_data1[i]-1 set t=1.-Boss_Spell_data1[i]/ 32.*3 loop exitwhen v==0 set v=v-1 set eff=LoadInteger(BYHT,Boss_Spell_data2[i],v) call SetUnitFlyHeight(II[(eff)],((200.*t)*1.),0) call Lfv(eff,bI[eff],BI[eff],cI[eff],R2I($FF*t)) endloop if Boss_Spell_data1[i]==32 then call SetUnitTimeScale(Boss_Spell_unit1[i],1) endif if Boss_Spell_data1[i]<=0 then if Boss_Index_h01K==5 then set Boss_Index_h01K=0 call PauseUnit(Boss_Spell_unit1[i],false) call SetUnitNocontrol((GetUnitUserData((Boss_Spell_unit1[i]))),false) endif set Boss_Spell_data1[i]=32*6 call TimerStart(GetExpiredTimer(),.03125,true,function Boss_Ability5_03_h01K) endif endif endfunction function Boss_Ability5_01_h01K takes unit u returns nothing local integer i=Boss_Spell_allocate() local integer eff local integer v local real x local real y local real a set Boss_Index_h01K=5 set Boss_Ability_cd_5_h01K=32*60 set Boss_Spell_unit1[i]=Boss_Unit_h01K set Boss_Spell_unit2[i]=u set Boss_Spell_data1[i]=32*3 set Boss_Spell_data2[i]=malloc() set Boss_Spell_data3[i]=0 set Boss_Spell_X[i]=GetUnitX(Boss_Spell_unit2[i]) set Boss_Spell_Y[i]=GetUnitY(Boss_Spell_unit2[i]) set Boss_Spell_Z[i]=GetRandomReal(0,3.14) set v=2 loop exitwhen v==0 set v=v-1 set a=Boss_Spell_Z[i]+v*$B4 set eff=Lnv(Boss_Spell_X[i]+750.*Cos(a),Boss_Spell_Y[i]+750.*Sin(a),a+.5*bj_PI) call LMv(eff,"Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilMissile.mdl") call SetUnitScale(II[(eff)],((2.75)*1.),0,0) call SaveInteger(BYHT,Boss_Spell_data2[i],v,eff) call Lfv(eff,55,55,55,0) endloop call Ltv(LAv("Abilities\\Spells\\Items\\AIso\\AIsoTarget.mdl",Boss_Spell_X[i],Boss_Spell_Y[i],2)) call Ltv(LAv("Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl",Boss_Spell_X[i],Boss_Spell_Y[i],3)) call TimerStart(NewTimer(i),.03125,true,function Boss_Ability5_02_h01K) call Boss_SetUnitUseMove_h01K(Boss_Spell_unit2[i],false) call SetUnitNocontrol((GetUnitUserData((Boss_Spell_unit1[i]))),true) call SetUnitAnimation(Boss_Spell_unit1[i],"spell") call SetUnitTimeScale(Boss_Spell_unit1[i],.75) call PauseUnit(Boss_Spell_unit1[i],true) endfunction function Boss_Ability4_end_h01K takes nothing returns nothing local integer i if Boss_Ability_tm_4_h01K!=null then set Boss_Ability_tm_4_h01K=null if Boss_Index_h01K==4 then set Boss_Index_h01K=0 endif set i=ReleaseTimer(Boss_Ability_tm_4_h01K,"[TimerUtils]Error:229") if Boss_Spell_data1[i]==0 then set Boss_Ability_cd_4_h01K=2 endif call Boss_Spell_deallocate(i) call PauseUnit(Boss_Unit_h01K,false) endif endfunction function Boss_Ability4_03_h01K takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local real x local real y local unit u set Boss_Spell_data1[i]=Boss_Spell_data1[i]-1 if Boss_Spell_data1[i]==0 or UnitAlive(u)==false then set x=GetUnitX(Boss_Spell_unit2[i]) set y=GetUnitY(Boss_Spell_unit2[i]) call Ltv(LAv("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",x,y,1.25)) call GroupEnumUnitsInRange(G,x,y,325,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$FA)and UnitAlive(u)and GetUnitAbilityLevel(u,'Avul')==0 and IsUnitAliveAndEnemy(u,Boss_Spell_unit1[i])then call UnitDamageTargetBY(((Boss_Spell_unit1[i])),((u)),((((GetUnitState(Boss_Spell_unit2[i],UNIT_STATE_MAX_LIFE)*2.)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) endif endloop call DestroyEffect(Boss_Spell_eff[i]) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:230") call Boss_Spell_deallocate(i) endif endfunction function Boss_Ability4_02_h01K takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer v local integer index local integer ba local real x=GetUnitX(Boss_Unit_h01K) local real y=GetUnitY(Boss_Unit_h01K) local real z local real a local real b local unit u if Boss_Spell_data1[i]==0 then set v=GetRandomInt(2,3) set z=$F0+GetUnitFlyHeight(Boss_Unit_h01K) loop exitwhen v==0 set v=v-1 set a=GetRandomReal(0,6.28) set b=GetRandomReal(.05*bj_PI,.95*bj_PI) set ba=CreateBarrageTypeC(x+750*Cos(a)*Sin(b),y+750*Sin(a)*Sin(b),z+750*Cos(b),Boss_Unit_h01K) call LMv(s__barrage_model[ba],"Abilities\\Weapons\\AvengerMissile\\AvengerMissile.mdl") call SetUnitScale(II[(s__barrage_model[ba])],((3.)*1.),0,0) set s__barrage_impact_z[ba]=$F0 call SetBarrageFlightRadian(ba,GetRandomReal(.4,.6)) set s__barrage_speed[ba]=.03125*$3E8 set s__barrage_acceleration[ba]=.03125*.03125*$BB8 call dAe(ba) endloop set Boss_Spell_data2[i]=Boss_Spell_data2[i]+1 if Boss_Spell_data2[i]>=64 then set Boss_Spell_data1[i]=1 call Ltv(LAv("Abilities\\Spells\\Other\\HowlOfTerror\\HowlCaster.mdl",x,y,4)) call SetUnitAnimation(Boss_Unit_h01K,"spell") call TimerStart(GetExpiredTimer(),.5,false,function Boss_Ability4_02_h01K) endif elseif Boss_Spell_data1[i]==1 then set Boss_Index_h01K=0 call PauseUnit(Boss_Unit_h01K,false) set Boss_Spell_data1[i]=2 set v=7 loop exitwhen v==0 set v=v-1 set index=$C set a=(bj_PI/ 3.5)*v loop exitwhen index==0 set index=index-1 set b=index*50. call Ltv(LAv("Objects\\Spawnmodels\\Undead\\UndeadDissipate\\UndeadDissipate.mdl",x+b*Cos(a),y+b*Sin(a),3)) endloop endloop call GroupEnumUnitsInRange(G,x,y,$4FB,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$4B0)and UnitAlive(u)and GetUnitAbilityLevel(u,'Avul')==0 and IsUnitAliveAndEnemy(u,Boss_Unit_h01K)then set index=Boss_Spell_allocate() set Boss_Spell_unit1[index]=Boss_Unit_h01K set Boss_Spell_unit2[index]=u set Boss_Spell_data1[index]=R2I(3/ .1) set Boss_Spell_eff[index]=AddSpecialEffectTarget("Abilities\\Spells\\Other\\Doom\\DoomTarget.mdl",u,"origin") call TimerStart(NewTimer(index),.1,true,function Boss_Ability4_03_h01K) endif endloop endif endfunction function Boss_Ability4_01_h01K takes nothing returns nothing local integer i=Boss_Spell_allocate() set Boss_Index_h01K=4 set Boss_Ability_tm_4_h01K=NewTimer(i) set Boss_Ability_cd_4_h01K=32*60 call PauseUnit(Boss_Unit_h01K,true) call SetUnitNocontrol((GetUnitUserData((Boss_Unit_h01K))),true) call SetUnitAnimation(Boss_Unit_h01K,"stand ready") set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=0 set Boss_Spell_unit1[i]=Boss_Unit_h01K call TimerStart(Boss_Ability_tm_4_h01K,.03125,true,function Boss_Ability4_02_h01K) call NewTextTagInTarget_B(Boss_Unit_h01K,"|c008000FFWant you??|r",18,$FF,$FF,$FF) endfunction function Boss_Ability3_02_h01K takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) if Boss_Index_h01K==999 then call SetUnitNocontrol((GetUnitUserData((Boss_Unit_h01K))),false) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:231") call Boss_Spell_deallocate(i) else if Boss_Spell_data1[i]==0 then set Boss_Spell_data1[i]=1 call SetUnitTimeScale(Boss_Unit_h01K,2) call QueueUnitAnimation(Boss_Unit_h01K,"stand") call TimerStart(GetExpiredTimer(),.3,false,function Boss_Ability3_02_h01K) call NewTextTagInTarget_B(Boss_Unit_h01K,"|c008000FFSo vulnerable!|r",18,$FF,$FF,$FF) elseif Boss_Spell_data1[i]==1 then set Boss_Spell_data1[i]=2 call Ltv(LAv("bigbloodex-nosplat-nogutz.mdl",Boss_Spell_X[i],Boss_Spell_Y[i],.75)) call KillUnit(Boss_Spell_unit2[i]) call TimerStart(GetExpiredTimer(),.3,false,function Boss_Ability3_02_h01K) call SetUnitTimeScale(Boss_Unit_h01K,1) else call PauseUnit(Boss_Unit_h01K,false) call IssueImmediateOrderById(Boss_Unit_h01K,$D0004) set Boss_Index_h01K=0 call SetUnitNocontrol((GetUnitUserData((Boss_Unit_h01K))),false) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:232") call Boss_Spell_deallocate(i) endif endif endfunction function Boss_Ability3_01_h01K takes unit u returns nothing local integer i=Boss_Spell_allocate() local real x=GetUnitX(u)-GetUnitX(Boss_Unit_h01K) local real y=GetUnitY(u)-GetUnitY(Boss_Unit_h01K) local real z=Atan2BJ(y,x) set Boss_Index_h01K=3 call PauseUnit(Boss_Unit_h01K,true) call SetUnitNocontrol((GetUnitUserData((Boss_Unit_h01K))),true) call SetUnitAnimation(Boss_Unit_h01K,"attack - 2") call SetUnitTimeScale(Boss_Unit_h01K,.2) set Boss_Spell_data1[i]=0 set Boss_Spell_unit2[i]=u set Boss_Spell_X[i]=GetUnitX(u) set Boss_Spell_Y[i]=GetUnitY(u) call TimerStart(NewTimer(i),1.5,false,function Boss_Ability3_02_h01K) call SetUnitFacing(Boss_Unit_h01K,z) set z=400./ SquareRoot(x*x+y*y) set x=GetUnitX(u)-x*z set y=GetUnitY(u)-y*z call SetUnitX(Boss_Unit_h01K,x) call SetUnitY(Boss_Unit_h01K,y) call m2v(u,5,'A500','B500',true) call NewTextTagInTarget_B(Boss_Unit_h01K,"|c008000FFGot you|r",18,$FF,$FF,$FF) endfunction function Boss_Ability2_02_h01K takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer index local unit u local group g if Boss_Spell_data1[i]==0 then set Boss_Spell_data1[i]=1 call TimerStart(GetExpiredTimer(),1,false,function Boss_Ability2_02_h01K) set Boss_Spell_X[i]=GetUnitX(Boss_Unit_h01K) set Boss_Spell_Y[i]=GetUnitY(Boss_Unit_h01K) set Boss_Spell_Z[i]=GetUnitFacing(Boss_Unit_h01K)*bj_DEGTORAD set Boss_x[0]=Cos(Boss_Spell_Z[i]) set Boss_y[0]=Sin(Boss_Spell_Z[i]) set index=0 loop set Boss_z[0]=300+index*600. set Boss_x[1]=Boss_Spell_X[i]+Boss_x[0]*Boss_z[0] set Boss_y[1]=Boss_Spell_Y[i]+Boss_y[0]*Boss_z[0] set CR=false set u=CreateUnit(Player($B),'e001',Boss_x[1],Boss_y[1],Boss_z[1]*bj_RADTODEG+90) call SetUnitX(u,Boss_x[1]) call SetUnitY(u,Boss_y[1]) call SetUnitScale(u,3.75,0,0) call UnitApplyTimedLife(u,0,30.) call UnitAddAbility(u,'A0V0') set CR=true call Ltv(LAv("IceNova.mdl",Boss_x[1],Boss_y[1],3)) call Lqv(LAv("BlizzardEruption.mdx",Boss_x[1],Boss_y[1],3),2) call Ltv(LAv("FreezingRing.mdl",Boss_x[1],Boss_y[1],2.75)) call Ltv(LAv("Abilities\\Weapons\\FrostWyrmMissile\\FrostWyrmMissile.mdl",Boss_x[1],Boss_y[1],5)) call GroupEnumUnitsInRange(G,Boss_x[1],Boss_y[1],375,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,Boss_x[1],Boss_y[1],275)and UnitAlive(u)and GetUnitAbilityLevel(u,'Avul')==0 and IsUnitAliveAndEnemy(u,Boss_Unit_h01K)then call UnitDamageTargetBY(((Boss_Unit_h01K)),((u)),(((($186A0)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) call Lqv(LAv("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl",GetUnitX(u),GetUnitY(u),1.5),2) if IsUnitType(u,UNIT_TYPE_HERO)then call zhv((GetPlayerId((GetOwningPlayer(u)))),25,1) endif endif endloop set index=index+1 exitwhen index==5 endloop else call PauseUnit(Boss_Unit_h01K,false) set Boss_Index_h01K=0 call SetUnitNocontrol((GetUnitUserData((Boss_Unit_h01K))),false) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:233") call Boss_Spell_deallocate(i) endif endfunction function Boss_Ability2_01_h01K takes nothing returns nothing local integer i=Boss_Spell_allocate() set Boss_Index_h01K=2 set Boss_Ability_cd_2_h01K=40*32 call PauseUnit(Boss_Unit_h01K,true) call SetUnitNocontrol((GetUnitUserData((Boss_Unit_h01K))),true) call SetUnitAnimation(Boss_Unit_h01K,"attack - 2") set Boss_Spell_data1[i]=0 call TimerStart(NewTimer(i),1,false,function Boss_Ability2_02_h01K) call NewTextTagInTarget_B(Boss_Unit_h01K,"|c008000FFCalm down!|r",18,$FF,$FF,$FF) call UnitAnimationSetLoopEffect(UnitAnimationAddEffect(UnitAppAnimation(Boss_Unit_h01K),"Abilities\\Weapons\\FrostWyrmMissile\\FrostWyrmMissile.mdl","hand right"),"Abilities\\Weapons\\FrostWyrmMissile\\FrostWyrmMissile.mdl","hand right",.25) endfunction function Boss_Ability1_03_h01K takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer index local integer index2 local unit u local group g if Boss_Spell_data1[i]==0 then set index=Boss_Spell_data2[Boss_Ability_data_1_h01K] loop set index2=Boss_Spell_data2[index] call DestroyEffect(Boss_Spell_eff[index]) call KillUnit(Boss_Spell_unit1[index]) call Boss_Spell_deallocate(index) exitwhen index2==Boss_Spell_data2[Boss_Ability_data_1_h01K] set index=index2 endloop call Boss_Spell_deallocate(Boss_Ability_data_1_h01K) set Boss_Ability_data_1_h01K=0 call SetUnitAnimationByIndex(Boss_Unit_h01K,5) call SetUnitTimeScale(Boss_Unit_h01K,.3) set Boss_Spell_data1[i]=1 set Boss_Spell_data2[i]=0 set Boss_Spell_X[i]=GetUnitX(Boss_Unit_h01K) set Boss_Spell_Y[i]=GetUnitY(Boss_Unit_h01K) set Boss_Spell_Z[i]=GetUnitFacing(Boss_Unit_h01K)*bj_DEGTORAD call TimerStart(GetExpiredTimer(),1,false,function Boss_Ability1_03_h01K) elseif Boss_Spell_data1[i]==1 then set Boss_Spell_data1[i]=2 call SetUnitTimeScale(Boss_Spell_unit1[i],1.) call TimerStart(GetExpiredTimer(),.05,true,function Boss_Ability1_03_h01K) elseif Boss_Spell_data1[i]==2 then set Boss_Spell_data2[i]=Boss_Spell_data2[i]+1 set Boss_x[0]=Boss_Spell_data2[i]*65. set Boss_z[0]=(12.5*bj_DEGTORAD) set Boss_z[1]=Boss_Spell_Z[i]-(Boss_z[0]*4) set index=0 set g=Boss_Spell_group1[i] call GroupClear(G) loop set Boss_x[1]=Boss_Spell_X[i]+Boss_x[0]*Cos(Boss_z[1]) set Boss_y[1]=Boss_Spell_Y[i]+Boss_x[0]*Sin(Boss_z[1]) call DestroyEffect(AddSpecialEffect("darkpillar.mdx",Boss_x[1],Boss_y[1])) call GroupEnumUnitsInRange(g,Boss_x[1],Boss_y[1],$AF,null) loop set u=FirstOfGroup(g) exitwhen u==null call GroupRemoveUnit(g,u) if IsUnitInRangeXY(u,Boss_x[1],Boss_y[1],125)and IsUnitInGroup(u,Boss_Spell_group2[i])==false and UnitAlive(u)and GetUnitAbilityLevel(u,'Avul')==0 and IsUnitAliveAndEnemy(u,Boss_Unit_h01K)then call GroupAddUnit(G,u) call GroupAddUnit(Boss_Spell_group2[i],u) endif endloop set index=index+1 exitwhen index==9 set Boss_z[1]=Boss_z[1]+Boss_z[0] endloop loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) call UnitDamageTargetBY(((Boss_Unit_h01K)),((u)),(((($C350)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) endloop set g=null if Boss_Spell_data2[i]==8 then call QueueUnitAnimation(Boss_Unit_h01K,"stand") endif if Boss_Spell_data2[i]>=20 then set Boss_Spell_data1[i]=3 call TimerStart(GetExpiredTimer(),1,false,function Boss_Ability1_03_h01K) endif else call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:234") set Boss_Index_h01K=0 set Boss_Ability_data_1_h01K=-30*1 call PauseUnit(Boss_Unit_h01K,false) call SetUnitNocontrol((GetUnitUserData((Boss_Unit_h01K))),false) call SetUnitTimeScale(Boss_Unit_h01K,1) endif endfunction function Boss_Ability1_02_h01K takes nothing returns nothing local integer i=Boss_Spell_allocate() set Boss_Spell_X[Boss_Ability_data_1_h01K]=30. set Boss_Index_h01K=1 set Boss_Spell_group1[i]=CreateGroup() set Boss_Spell_group2[i]=CreateGroup() call PauseUnit(Boss_Unit_h01K,true) call DestroyEffect(AddSpecialEffectTarget("blackchakraexplosion.mdl",Boss_Unit_h01K,"origin")) call SetUnitAnimation(Boss_Unit_h01K,"Spell") set Boss_Spell_data1[i]=0 call TimerStart(NewTimer(i),1,false,function Boss_Ability1_03_h01K) call SetUnitNocontrol((GetUnitUserData((Boss_Unit_h01K))),true) endfunction function Boss_Ability1_01_h01K takes integer add returns nothing local integer index local integer index2 if add>0 then if Boss_Ability_data_1_h01K==0 then set Boss_Ability_data_1_h01K=Boss_Spell_allocate() set Boss_Spell_data1[Boss_Ability_data_1_h01K]=0 set Boss_Spell_data2[Boss_Ability_data_1_h01K]=0 set Boss_Spell_X[Boss_Ability_data_1_h01K]=3. set Boss_Spell_Y[Boss_Ability_data_1_h01K]=0 endif if Boss_Spell_data1[Boss_Ability_data_1_h01K]+add>$A then set add=$A-Boss_Spell_data1[Boss_Ability_data_1_h01K] endif set index=Boss_Spell_data2[Boss_Ability_data_1_h01K] set Boss_x[0]=GetUnitX(Boss_Unit_h01K) set Boss_y[0]=GetUnitY(Boss_Unit_h01K) set Boss_z[0]=6.283/ I2R(Boss_Spell_data1[Boss_Ability_data_1_h01K]+add) loop exitwhen add==0 set index2=index set index=Boss_Spell_allocate() if index2==0 then set Boss_Spell_data1[index]=index set Boss_Spell_data2[index]=index set Boss_Spell_data2[Boss_Ability_data_1_h01K]=index else set Boss_Spell_data1[index]=index2 set Boss_Spell_data2[index]=Boss_Spell_data2[index2] set Boss_Spell_data1[Boss_Spell_data1[index2]]=index set Boss_Spell_data2[index2]=index endif set Boss_Spell_X[index]=Boss_z[0]*Boss_Spell_data1[Boss_Ability_data_1_h01K] set Boss_z[1]=Boss_Spell_Y[Boss_Ability_data_1_h01K]+Boss_Spell_X[index] set Boss_x[1]=Boss_x[0]+500.*Cos(Boss_z[1]) set Boss_y[1]=Boss_y[0]+500.*Sin(Boss_z[1]) set CR=false set Boss_Spell_unit1[index]=CreateUnit(Player($F),'e001',Boss_x[1],Boss_y[1],Boss_z[1]*bj_RADTODEG+90) call SetUnitX(Boss_Spell_unit1[index],Boss_x[1]) call SetUnitY(Boss_Spell_unit1[index],Boss_y[1]) call UnitAddAbility(Boss_Spell_unit1[index],'Amrf') call UnitRemoveAbility(Boss_Spell_unit1[index],'Amrf') call SetUnitFlyHeight(Boss_Spell_unit1[index],270,0) call SetUnitScale(Boss_Spell_unit1[index],2.,0,0) set CR=true set Boss_Spell_eff[index]=AddSpecialEffectTarget("orbofcorruption.mdl",Boss_Spell_unit1[index],"origin") set Boss_Spell_data1[Boss_Ability_data_1_h01K]=Boss_Spell_data1[Boss_Ability_data_1_h01K]+1 set add=add-1 endloop if Boss_Spell_data1[Boss_Ability_data_1_h01K]==$A then call Boss_Ability1_02_h01K() endif else if Boss_Spell_data1[Boss_Ability_data_1_h01K]+add<0 then set add=0-Boss_Spell_data1[Boss_Ability_data_1_h01K] endif set index=Boss_Spell_data2[Boss_Ability_data_1_h01K] loop exitwhen add==0 set index2=Boss_Spell_data2[index] if index2!=index then set Boss_Spell_data1[index2]=Boss_Spell_data1[index] set Boss_Spell_data2[Boss_Spell_data1[index]]=index2 set Boss_Spell_data2[Boss_Ability_data_1_h01K]=index2 else set index2=0 call Boss_Spell_deallocate(Boss_Ability_data_1_h01K) set Boss_Ability_data_1_h01K=0 endif call DestroyEffect(Boss_Spell_eff[index]) call KillUnit(Boss_Spell_unit1[index]) call Boss_Spell_deallocate(index) exitwhen index2==0 set index=index2 set Boss_Spell_data1[Boss_Ability_data_1_h01K]=Boss_Spell_data1[Boss_Ability_data_1_h01K]-1 set add=add+1 endloop endif endfunction function Boss_Death_h01K takes nothing returns nothing if Boss_Index_h01K==3 or Boss_Index_h01K==5 then call SetUnitTimeScale(Boss_Unit_h01K,1) endif set Boss_Index_h01K=999 endfunction function Boss_Ability999_h01K takes unit u returns nothing if IsUnitInRange(u,Boss_Unit_h01K,$7D0)then call SetWidgetLife(Boss_Unit_h01K,GetWidgetLife(Boss_Unit_h01K)+GetUnitState(Boss_Unit_h01K,UNIT_STATE_MAX_LIFE)*.2) call Ltv(LAv("bloodex-special.mdx",GetUnitX(u),GetUnitY(u),1.5)) if Boss_Ability999_cd_h01K==0 then set Boss_Ability999_cd_h01K=16 call Ltv(LAv("bloodslam.max",GetUnitX(Boss_Unit_h01K),GetUnitY(Boss_Unit_h01K),1.5)) call NewTextTagInTarget_B(Boss_Unit_h01K,"|c008000FFNo one today, you do not want to leave out!!!|r",18,$FF,$FF,$FF) endif endif endfunction function Boss_attack_h01K takes nothing returns nothing local unit attack=(mF) local unit target=(MF) if Boss_Ability_data_1_h01K>=0 then call Boss_Ability1_01_h01K(1) endif if Boss_Index_h01K==0 then call Boss_AddBuff7_h01K(attack,target,5) endif set attack=null set target=null endfunction function Boss_damager_h01K takes nothing returns nothing local unit attack=(mF) local unit target=(MF) if Boss_Index_h01K==1 or Boss_Index_h01K==6 then call DamageMinus(GetDamage()*.99) if GetDamage()>=GetWidgetLife(target)then call SetWidgetLife(target,1) call DamageMinus(GetDamage()) endif else if Boss_Ability_data_1_h01K>0 then set Boss_Spell_X[Boss_Ability_data_1_h01K]=3. endif endif set attack=null set target=null endfunction function Boss_Start_2_h01K takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local real life=GetWidgetLife(Boss_Unit_h01K) local real maxlife=GetUnitState(Boss_Unit_h01K,UNIT_STATE_MAX_LIFE) local real v=life/ maxlife local boolean is_stop=(Control_use[(GetUnitUserData(((Boss_Unit_h01K))))])or GetUnitAbilityLevel(Boss_Unit_h01K,'BUdd')>0 or GetUnitAbilityLevel(Boss_Unit_h01K,'B01N')>0 or GetUnitAbilityLevel(Boss_Unit_h01K,'B06P')>0 local integer index local integer index2 local unit u local group g if Boss_Index_h01K==999 then if Boss_Ability_data_1_h01K>0 then call Boss_Ability1_01_h01K(-$A) endif call DestroyGroup(Boss_Spell_group1[i]) call DestroyGroup(Boss_Spell_group2[i]) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:235") call free(Boss_root_h01K) endif if Boss_Ability999_cd_h01K>0 then set Boss_Ability999_cd_h01K=Boss_Ability999_cd_h01K-1 endif if Boss_Index_h01K==0 and Boss_exp_h01K<3 then if Boss_exp_h01K==0 then if v<.7 then call Boss_Ability6_01_h01K() endif elseif Boss_exp_h01K==1 then if v<.6 then call Boss_Ability6_01_h01K() endif elseif Boss_exp_h01K==2 then if v<.4 then call Boss_Ability6_01_h01K() endif endif endif if Boss_Ability_no_8_h01K==0 then if v<=.5 and Boss_Index_h01K==0 then set Boss_Index_h01K=8 set Boss_Ability_no_8_h01K=1 call PauseUnit(Boss_Unit_h01K,false) call SetUnitInvulnerable(Boss_Unit_h01K,true) call DestroyEffect(AddSpecialEffectTarget("grin curse.mdl",Boss_Unit_h01K,"overhead")) call SetUnitAnimation(Boss_Unit_h01K,"Spell") call NewTextTagInTarget_B(Boss_Unit_h01K,"|c008000FFNo one today, you do not want to leave out!!|r",18,$FF,$FF,$FF) endif elseif Boss_Ability_no_8_h01K>0 then set Boss_Ability_no_8_h01K=Boss_Ability_no_8_h01K+1 if Boss_Ability_no_8_h01K>=32 then set Boss_Index_h01K=0 set Boss_Ability_no_8_h01K=-1 call DestroyEffect(AddSpecialEffectTarget("firenova2.mdl",Boss_Unit_h01K,"origin")) call DestroyEffect(AddSpecialEffectTarget("firegold.mdl",Boss_Unit_h01K,"origin")) call PauseUnit(Boss_Unit_h01K,false) call SetUnitInvulnerable(Boss_Unit_h01K,false) call SetWidgetLife(Boss_Unit_h01K,maxlife*.9) call GroupEnumUnitsInRange(G,GetUnitX(Boss_Unit_h01K),GetUnitY(Boss_Unit_h01K),$7D0,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitAliveAndEnemy(u,Boss_Unit_h01K)and GetUnitAbilityLevel(u,'Avul')==0 then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",u,"origin")) call KillUnitBJ(u) endif endloop endif endif if Boss_Ability_data_1_h01K>0 then set index=Boss_Spell_data2[Boss_Ability_data_1_h01K] set Boss_x[0]=GetUnitX(Boss_Unit_h01K) set Boss_y[0]=GetUnitY(Boss_Unit_h01K) set Boss_z[0]=6.283/ I2R(Boss_Spell_data1[Boss_Ability_data_1_h01K]) set Boss_z[1]=Boss_Spell_Y[Boss_Ability_data_1_h01K]+.03 set Boss_Spell_Y[Boss_Ability_data_1_h01K]=Boss_z[1] set bj_forLoopAIndex=Boss_Spell_data1[Boss_Ability_data_1_h01K] loop set bj_forLoopAIndex=bj_forLoopAIndex-1 set Boss_z[1]=Boss_z[1]+Boss_z[0] set index2=Boss_Spell_data2[index] set Boss_x[1]=Boss_x[0]+500.*Cos(Boss_z[1]) set Boss_y[1]=Boss_y[0]+500.*Sin(Boss_z[1]) call SetUnitX(Boss_Spell_unit1[index],Boss_x[1]) call SetUnitY(Boss_Spell_unit1[index],Boss_y[1]) call SetUnitFacing(Boss_Spell_unit1[index],Boss_z[1]*bj_RADTODEG+90) exitwhen index2==Boss_Spell_data2[Boss_Ability_data_1_h01K] set index=index2 endloop if bj_forLoopAIndex!=0 then call BJDebugMsg(I2S(bj_forLoopAIndex)) endif if Boss_Index_h01K==0 and Boss_Spell_data1[Boss_Ability_data_1_h01K]>=$A then call Boss_Ability1_02_h01K() endif if Boss_Spell_X[Boss_Ability_data_1_h01K]>0 then set Boss_Spell_X[Boss_Ability_data_1_h01K]=Boss_Spell_X[Boss_Ability_data_1_h01K]-.03125 else set Boss_Spell_X[Boss_Ability_data_1_h01K]=3. call Boss_Ability1_01_h01K(-1) endif elseif Boss_Ability_data_1_h01K<0 then set Boss_Ability_data_1_h01K=Boss_Ability_data_1_h01K+1 endif call SetRect(bj_lastMoveRect,6400,-$3BC0,$2A00,-6624) call GroupEnumUnitsInRect(G,bj_lastMoveRect,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitAliveAndEnemy(u,Boss_Unit_h01K)and IsUnitType(u,UNIT_TYPE_HERO)and IsUnitInRegion(Boss_Region_h01K,u)then if IsUnitInGroup(u,Boss_Spell_group1[i])==false then call GroupAddUnit(Boss_Spell_group1[i],u) endif endif endloop set index=0 set index2=0 set Boss_Spell_unit2[i]=null set g=Boss_Spell_group1[i] set Boss_Spell_group1[i]=Boss_Spell_group2[i] set Boss_Spell_group2[i]=g loop set u=FirstOfGroup(g) exitwhen u==null call GroupRemoveUnit(g,u) if IsUnitInRegion(Boss_Region_h01K,u)then call GroupAddUnit(Boss_Spell_group1[i],u) if UnitAlive(u)then if IsUnitInRange(u,Boss_Unit_h01K,$708)then set index=index+1 else set index2=index2+1 if GetRandomInt(1,index2)==1 then set Boss_Spell_unit2[i]=u endif endif endif endif endloop set g=null if Boss_Index_h01K==0 then if index==0 and index2>0 then call Boss_Ability3_01_h01K(Boss_Spell_unit2[i]) endif endif if Boss_Ability_cd_5_h01K>0 then set Boss_Ability_cd_5_h01K=Boss_Ability_cd_5_h01K-1 else if v<=.5 and Boss_Index_h01K==0 and is_stop==false then set index=0 set Boss_Spell_unit2[i]=null call GroupEnumUnitsInRange(G,GetUnitX(Boss_Unit_h01K),GetUnitY(Boss_Unit_h01K),$3E8,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitAliveAndEnemy(u,Boss_Unit_h01K)and GetUnitAbilityLevel(u,'Avul')==0 then set index=index+1 if GetRandomInt(1,index)==1 then set Boss_Spell_unit2[i]=u endif endif endloop if index>0 then call SetUnitFacing(Boss_Unit_h01K,Atan2BJ(GetUnitY(Boss_Spell_unit2[i])-GetUnitY(Boss_Unit_h01K),GetUnitX(Boss_Spell_unit2[i])-GetUnitX(Boss_Unit_h01K))) call Boss_Ability5_01_h01K(Boss_Spell_unit2[i]) endif endif endif if Boss_Ability_cd_4_h01K>0 then set Boss_Ability_cd_4_h01K=Boss_Ability_cd_4_h01K-1 else if v<=.6 and Boss_Index_h01K==0 and is_stop==false then set index=0 set Boss_Spell_unit2[i]=null call GroupEnumUnitsInRange(G,GetUnitX(Boss_Unit_h01K),GetUnitY(Boss_Unit_h01K),$4B0,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitAliveAndEnemy(u,Boss_Unit_h01K)and GetUnitAbilityLevel(u,'Avul')==0 then set index=index+1 if GetRandomInt(1,index)==1 then set Boss_Spell_unit2[i]=u endif endif endloop if index>0 then call Boss_Ability4_01_h01K() endif endif endif if Boss_Ability_cd_2_h01K>0 then set Boss_Ability_cd_2_h01K=Boss_Ability_cd_2_h01K-1 else if v<=.8 and Boss_Index_h01K==0 then set index=0 set Boss_Spell_unit2[i]=null call GroupEnumUnitsInRange(G,GetUnitX(Boss_Unit_h01K),GetUnitY(Boss_Unit_h01K),$7D0,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitAliveAndEnemy(u,Boss_Unit_h01K)and IsUnitType(u,UNIT_TYPE_HERO)then set index=index+1 if GetRandomInt(1,index)==1 then set Boss_Spell_unit2[i]=u endif endif endloop if index>0 then call SetUnitFacing(Boss_Unit_h01K,Atan2BJ(GetUnitY(Boss_Spell_unit2[i])-GetUnitY(Boss_Unit_h01K),GetUnitX(Boss_Spell_unit2[i])-GetUnitX(Boss_Unit_h01K))) call Boss_Ability2_01_h01K() endif endif endif if Boss_Index_h01K==4 then if is_stop then call Boss_Ability4_end_h01K() endif endif if life<=0 then set Boss_Index_h01K=999 endif endfunction function Boss_Start_1_h01K takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer index local real x local real y if Boss_Spell_data1[i]==0 then set Boss_Spell_data2[i]=Boss_Spell_data2[i]+1 call SetUnitScale(II[(LoadInteger(BYHT,Boss_root_h01K,3))],((3.+Boss_Spell_data2[i]*.0625)*1.),0,0) if Boss_Spell_data2[i]>=32 then set Boss_Spell_data1[i]=1 set Boss_Spell_data2[i]=0 set index=0 loop call Ltv(LoadInteger(BYHT,Boss_root_h01K,index)) call RemoveSavedInteger(BYHT,Boss_root_h01K,index) set index=index+1 exitwhen index==3 endloop endif elseif Boss_Spell_data1[i]==1 then set Boss_Spell_data2[i]=Boss_Spell_data2[i]+1 call SetUnitScale(II[(LoadInteger(BYHT,Boss_root_h01K,3))],((5.-Boss_Spell_data2[i]*.03125*4)*1.),0,0) if Boss_Spell_data2[i]>=32 then set Boss_Spell_data1[i]=2 set Boss_Spell_data2[i]=0 endif elseif Boss_Spell_data1[i]==2 then set Boss_Spell_data2[i]=Boss_Spell_data2[i]+1 call SetUnitScale(II[(LoadInteger(BYHT,Boss_root_h01K,3))],((1.+Boss_Spell_data2[i]*.2)*1.),0,0) set index=0 loop set x=Boss_Spell_data2[i]*50. set y=index*30.*bj_DEGTORAD set Boss_x[0]=Boss_Spell_X[i]+x*Cos(y) set Boss_y[0]=Boss_Spell_Y[i]+x*Sin(y) call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UndeadDissipate\\UndeadDissipate.mdl",Boss_x[0],Boss_y[0])) set index=index+1 exitwhen index>$C endloop if Boss_Spell_data2[i]>=18 then set Boss_Spell_data1[i]=3 set Boss_Spell_data2[i]=0 call ShowUnit(Boss_Unit_h01K,true) set lastspeaker=Boss_Unit_h01K call Playlines(GetUnitName(Boss_Unit_h01K),"You guys actually released me, you're done!!") call SetUnitAnimation(Boss_Unit_h01K,"attack") call QueueUnitAnimation(Boss_Unit_h01K,"stand") call TimerStart(Boss_tm_h01K,2,false,function Boss_Start_1_h01K) endif elseif Boss_Spell_data1[i]==3 then call Ltv(LoadInteger(BYHT,Boss_root_h01K,3)) call RemoveSavedInteger(BYHT,Boss_root_h01K,3) call free(Boss_root_h01K) call UnitAddPAttackTrig((GetUnitUserData((Boss_Unit_h01K))),function Boss_attack_h01K) call UnitAddBeDamagerTrig((GetUnitUserData((Boss_Unit_h01K))),function Boss_damager_h01K) call AddUnitDeathTrigB((GetUnitUserData((Boss_Unit_h01K))),function Boss_Death_h01K) call TimerStart(Boss_tm_h01K,.03125,true,function Boss_Start_2_h01K) call PauseUnit(Boss_Unit_h01K,false) call SetUnitInvulnerable(Boss_Unit_h01K,false) set Boss_Spell_group1[i]=CreateGroup() set Boss_Spell_group2[i]=CreateGroup() set Boss_Buff7_group_h01K=CreateGroup() endif endfunction function Boss_Start_h01K takes nothing returns nothing local integer c=-3 local integer id local real x local real y loop if HaveSavedInteger(BYHT,Boss_root_h01K,c)then set id=LoadInteger(BYHT,Boss_root_h01K,c) call RemoveItemByCharges(GetItemOfTypeFromUnit((Je[(id)]),'I04X'),7) call s__Trig_remove((LoadInteger(BYHT,Boss_root_h01K,id+3))) call RemoveSavedInteger(BYHT,Boss_root_h01K,id+3) call RemoveSavedInteger(BYHT,Boss_root_h01K,c) endif set c=c+1 exitwhen c==0 endloop set x=GetUnitX(Boss_Unit_h01K) set y=GetUnitY(Boss_Unit_h01K) call SaveInteger(BYHT,Boss_root_h01K,3,LAv("Abilities\\Spells\\Undead\\Darksummoning\\DarkSummonTarget.mdl",x,y,3.)) call TimerStart(Boss_tm_h01K,.03125,true,function Boss_Start_1_h01K) set c=Boss_Spell_allocate() set Boss_Spell_data1[c]=0 set Boss_Spell_data2[c]=0 set Boss_Spell_X[c]=x set Boss_Spell_Y[c]=y call alloc__hPv(GetHandleId((Boss_tm_h01K)),(c)) endfunction function Boss_Expired_h01K takes nothing returns nothing local integer c=-3 local integer id loop if HaveSavedInteger(BYHT,Boss_root_h01K,c)then set id=LoadInteger(BYHT,Boss_root_h01K,c) call s__Trig_remove((LoadInteger(BYHT,Boss_root_h01K,id+3))) call Ltv(LoadInteger(BYHT,Boss_root_h01K,c+3)) call RemoveSavedInteger(BYHT,Boss_root_h01K,id+3) call RemoveSavedInteger(BYHT,Boss_root_h01K,c) call RemoveSavedInteger(BYHT,Boss_root_h01K,c+3) endif set c=c+1 exitwhen c==0 endloop set Boss_Index_h01K=-3 set Boss_tm_h01K=null call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:236") endfunction function Boss_Heorrevive_h01K takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) local integer c=LoadInteger(BYHT,Boss_root_h01K,id+3) call RemoveSavedInteger(BYHT,Boss_root_h01K,id+3) call s__Trig_remove((c)) set Boss_Index_h01K=Boss_Index_h01K-1 set c=Boss_Index_h01K loop if LoadInteger(BYHT,Boss_root_h01K,c)==id then call Ltv(LoadInteger(BYHT,Boss_root_h01K,c+3)) if c=0 then call Boss_Ability999_h01K(GetTriggerUnit()) endif endfunction function Boss_Init_h01K takes nothing returns nothing local real x=10166. local real y=-14895. set Boss_Unit_h01K=CreateUnit(Player($B),'h01K',x,y,173.375) call ShowUnit(Boss_Unit_h01K,false) call PauseUnit(Boss_Unit_h01K,true) call SetUnitInvulnerable(Boss_Unit_h01K,true) set Boss_root_h01K=malloc() set Boss_func_h01K=function Boss_Heordeath_h01K set Boss_Region_h01K=CreateRegion() call RegionAddRect(Boss_Region_h01K,gg_rct_BYQMD____________________000) endfunction function Boss_Ability_1_3_n03N takes nothing returns nothing local integer i=s__Trig_P2[s__Trig_Index] call UnitRemoveAbilityandBuffBY(Je[Boss_Spell_data2[i]],'A0WL','B08F') set Boss_Spell_X[i]=$B set s__Trig_P2[s__Trig_Index]=0 call s__Trig_remove(s__Trig_Index) endfunction function Boss_Ability_1_2_2_n03N takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer id=Boss_Spell_data1[i] local real x=GetUnitX(Boss_Spell_unit1[i]) local real y=GetUnitY(Boss_Spell_unit1[i]) local unit u call GroupEnumUnitsInRange(G,x,y,$FA+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$FA)then if IsUnitAliveAndEnemy(u,(Je[(id)]))and GetUnitAbilityLevel(u,'Avul')==0 then call UnitDamageTargetBY(((Je[(id)])),(u),(($2710)*1.),false,(false),false,false,(ConvertAttackType(0)),(ConvertDamageType(17)),((0)*1.),("")) endif endif endloop if Boss_Spell_X[i]<=1 then call KillUnit(Boss_Spell_unit1[i]) call DestroyEffect(Boss_Spell_eff[i]) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:237") call Unit_Cancel_Counter($F9,id) else set Boss_Spell_X[i]=Boss_Spell_X[i]-1 endif endfunction function Boss_Ability_1_2_n03N takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer id=Boss_Spell_data1[i] local integer targetid=Boss_Spell_data2[i] set Boss_Spell_X[i]=Boss_Spell_X[i]+1 if Boss_Spell_X[i]==$A then set Boss_x[0]=GetUnitX(Je[targetid]) set Boss_y[0]=GetUnitY(Je[targetid]) call Lqv(LAv("Abilities\\Spells\\Undead\\Impale\\ImpaleHitTarget.mdl",Boss_x[0],Boss_y[0],3),2) call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Volcano\\VolcanoDeath.mdl",Boss_x[0],Boss_y[0])) call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UDeathSmall\\UDeathSmall.mdl",Boss_x[0],Boss_y[0])) set CR=FALSE set Boss_Spell_unit1[i]=CreateUnit(Player($F),'e001',Boss_x[0],Boss_y[0],Boss_z[1]) call SetUnitX(Boss_Spell_unit1[i],Boss_x[0]) call SetUnitY(Boss_Spell_unit1[i],Boss_y[0]) call SetUnitFlyHeight(Boss_Spell_unit1[i],85,0) call SetUnitScale(Boss_Spell_unit1[i],3,0,0) set Boss_Spell_eff[i]=AddSpecialEffectTarget("Abilities\\Spells\\Other\\Doom\\DoomTarget.mdl",Boss_Spell_unit1[i],"origin") call SetUnitVertexColor(Boss_Spell_unit1[i],$FF,0,0,$FF) set CR=true call TimerStart(GetExpiredTimer(),.1,true,function Boss_Ability_1_2_n03N) elseif Boss_Spell_X[i]==$B then call UnitRemoveAbilityandBuffBY(Je[targetid],'A0WM','B08F') set s__Trig_P2[Boss_Spell_data3[i]]=0 call s__Trig_remove((Boss_Spell_data3[i])) call KillUnit(Je[targetid]) elseif Boss_Spell_X[i]<$A then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",Je[targetid],"origin")) call UnitDamageTargetBY((((Je[(id)]))),((Je[targetid])),(((($3E8)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) else if Boss_Spell_unit1[i]==null then call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:238") call Unit_Cancel_Counter($FA,id) else set Boss_Spell_X[i]=30*2 call TimerStart(GetExpiredTimer(),.5,true,function Boss_Ability_1_2_2_n03N) endif call Unit_Cancel_Counter($FB,targetid) endif endfunction function Boss_Ability_1_n03N takes nothing returns nothing local integer EvelId=GetHandleId(GetTriggerEventId()) local integer i local integer id local integer targetid if EvelId==274 then set i=Boss_Spell_allocate() set id=(GetUnitUserData((GetTriggerUnit()))) set targetid=(GetUnitUserData((GetSpellTargetUnit()))) set Boss_Spell_data1[i]=id set Boss_Spell_data2[i]=targetid set Boss_Spell_data3[i]=AddUnitDeathTrigB(targetid,function Boss_Ability_1_3_n03N) set Boss_Spell_X[i]=0 set Boss_Spell_unit1[i]=null call TimerStart(NewTimer(i),.5,true,function Boss_Ability_1_2_n03N) call UnitAddAbilityBY(Je[targetid],'A0WM') set s__Trig_P2[Boss_Spell_data3[i]]=i call Unit_App_Counter($FC,id) call Unit_App_Counter($FD,targetid) elseif EvelId==272 then call NewTextTagInTarget_B(GetSpellTargetUnit(),"|c00FF8080Send you hello!|r ",18,$FF,$FF,$FF) endif endfunction function Boss_Ability_2_2_n03N takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer id=Boss_Spell_data1[i] local real x local real y local unit u set x=GetUnitX(Boss_Spell_unit1[i])+Boss_Spell_X[i] set y=GetUnitY(Boss_Spell_unit1[i])+Boss_Spell_Y[i] if IsTerrainPathable(x,y,PATHING_TYPE_FLYABILITY)then set Boss_Spell_data2[i]=0 else set Boss_Spell_data2[i]=Boss_Spell_data2[i]-1 call SetUnitX(Boss_Spell_unit1[i],x) call SetUnitY(Boss_Spell_unit1[i],y) call GroupEnumUnitsInRange(G,x,y,$96+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$96)and not IsUnitInGroup(u,Boss_Spell_group1[i])then if IsUnitAliveAndEnemy(u,(Je[(id)]))and GetUnitAbilityLevel(u,'Avul')==0 then call GroupAddUnit(Boss_Spell_group1[i],u) call UnitDamageTargetBY(((Je[(id)])),(u),(($C350)*1.),false,(false),false,false,(ConvertAttackType(0)),(ConvertDamageType(17)),((0)*1.),("")) endif endif endloop endif if Boss_Spell_data2[i]<=0 then call KillUnit(Boss_Spell_unit1[i]) call DestroyEffect(Boss_Spell_eff[i]) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:239") endif endfunction function Boss_Ability_2_n03N takes nothing returns nothing local integer EvelId=GetHandleId(GetTriggerEventId()) local integer i local integer id local integer v if EvelId==274 then set id=(GetUnitUserData((GetTriggerUnit()))) set Boss_x[0]=GetUnitX((Je[(id)])) set Boss_y[0]=GetUnitY((Je[(id)])) set Boss_x[1]=GetSpellTargetX()-Boss_x[0] set Boss_y[1]=GetSpellTargetY()-Boss_y[0] if Boss_x[1]==0 and Boss_y[1]==0 then set Boss_z[1]=GetUnitFacing((Je[(id)]))*bj_DEGTORAD else set Boss_z[1]=Atan2(Boss_y[1],Boss_x[1]) endif set Boss_z[0]=(175./ 6)*bj_DEGTORAD set Boss_z[1]=Boss_z[1]-Boss_z[0]*3 set v=0 loop set i=Boss_Spell_allocate() set Boss_Spell_data1[i]=id set Boss_Spell_data2[i]=46 set Boss_Spell_group1[i]=CreateGroup() set Boss_Spell_X[i]=32*Cos(Boss_z[1]) set Boss_Spell_Y[i]=32*Sin(Boss_z[1]) set CR=FALSE set Boss_Spell_unit1[i]=CreateUnit(Player($F),'e001',Boss_x[0],Boss_y[0],Boss_z[1]*bj_DEGTORAD) call SetUnitX(Boss_Spell_unit1[i],Boss_x[0]+Boss_Spell_X[i]) call SetUnitY(Boss_Spell_unit1[i],Boss_y[0]+Boss_Spell_Y[i]) call SetUnitFlyHeight(Boss_Spell_unit1[i],85,0) call SetUnitScale(Boss_Spell_unit1[i],1.75,0,0) set Boss_Spell_eff[i]=AddSpecialEffectTarget("Abilities\\Weapons\\RedDragonBreath\\RedDragonMissile.mdl",Boss_Spell_unit1[i],"origin") set CR=true call TimerStart(NewTimer(i),.03125,true,function Boss_Ability_2_2_n03N) set v=v+1 exitwhen v>=7 set Boss_z[1]=Boss_z[1]+Boss_z[0] endloop elseif EvelId==272 then call NewTextTagInTarget_B(GetTriggerUnit(),"|c00FF8080Big wave of flame|r ",18,$FF,$FF,$FF) endif endfunction function Boss_Ability_3_2_n03N takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer id=Boss_Spell_data1[i] local real x local real y local unit u if Boss_Spell_data3[i]==0 then set Boss_Spell_data3[i]=1 call PauseUnit((Je[(id)]),true) call TimerStart(GetExpiredTimer(),2.5,false,function Boss_Ability_3_2_n03N) elseif Boss_Spell_data3[i]==1 then set Boss_Spell_data3[i]=2 call SetUnitAnimation((Je[(id)]),"death") call TimerStart(GetExpiredTimer(),.8,false,function Boss_Ability_3_2_n03N) elseif Boss_Spell_data3[i]==2 then set Boss_Spell_data3[i]=3 call ShowUnit((Je[(id)]),false) call TimerStart(GetExpiredTimer(),.5,false,function Boss_Ability_3_2_n03N) elseif Boss_Spell_data3[i]==3 then set Boss_Spell_data3[i]=4 set u=PickRandomHeroInRange((Je[(id)]),GetUnitX((Je[(id)])),GetUnitY((Je[(id)])),$7D0) if u!=null then call SetWidgetLife((Je[(id)]),GetWidgetLife((Je[(id)]))+GetUnitState((Je[(id)]),UNIT_STATE_MAX_LIFE)*(GetWidgetLife(u)/ GetUnitState(u,UNIT_STATE_MAX_LIFE))) set Boss_Spell_data2[i]=(GetUnitUserData((u))) set x=GetUnitX(u) set y=GetUnitY(u) call SetUnitX((Je[(id)]),x) call SetUnitY((Je[(id)]),y) call DestroyEffect(AddSpecialEffectTarget("bloodex-special.mdx",u,"origin")) call zKv(GetPlayerId(GetOwningPlayer(u)),$FF,105,105,.5) call KillUnit(u) call FloatedTargetBY(u,45,-1.6) else call SetWidgetLife((Je[(id)]),GetWidgetLife((Je[(id)]))+GetUnitState((Je[(id)]),UNIT_STATE_MAX_LIFE)*.1) set Boss_Spell_data2[i]=0 endif call ShowUnit((Je[(id)]),true) call SetUnitAnimation((Je[(id)]),"birth") call TimerStart(GetExpiredTimer(),1,false,function Boss_Ability_3_2_n03N) set u=null else call SetUnitInvulnerable((Je[(id)]),false) call PauseUnit((Je[(id)]),false) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:240") call Unit_Cancel_Counter($FE,id) endif endfunction function Boss_Ability_3_n03N takes nothing returns nothing local integer EvelId=GetHandleId(GetTriggerEventId()) local integer i local integer id if EvelId==274 then set id=(GetUnitUserData((GetTriggerUnit()))) set i=Boss_Spell_allocate() set Boss_Spell_data1[i]=id set Boss_Spell_data3[i]=0 call SetUnitInvulnerable((Je[(id)]),true) call TimerStart(NewTimer(i),0,false,function Boss_Ability_3_2_n03N) call Unit_App_Counter($FF,id) elseif EvelId==272 then call NewTextTagInTarget_B(GetTriggerUnit(),"|c00FF8080Small Aoiro Furisato Opening!|r ",18,$FF,$FF,$FF) endif endfunction function Boss_attack_n03N takes nothing returns nothing local unit attack=(mF) local unit target=(MF) local real life=GetWidgetLife(attack) local real maxlife=GetUnitState(attack,UNIT_STATE_MAX_LIFE) local real v=life/ maxlife local integer i=GetRandomInt(1,$A) if v<.9 and i<=2 then set Xm=PickRandomUnitInUnitRange(attack,$3E8) if Xm!=null then call IssueTargetOrderById(attack,$D0097,Xm) endif elseif v<.8 and i<=5 then set Xm=PickRandomUnitInUnitRange(attack,$5DC) if Xm!=null then call IssuePointOrderById(attack,$D009F,GetUnitX(Xm),GetUnitY(Xm)) endif elseif v<.8 then set Xm=PickRandomUnitInUnitRange(attack,$5DC) if Xm!=null then call IssueImmediateOrderById(attack,$D0048) endif endif set attack=null set target=null endfunction function Boss_damager_2_n03N takes nothing returns nothing if GetRandomInt(1,$A)==1 then call Gjv((MF),60,Atan2(GetUnitY((MF))-GetUnitY((mF)),GetUnitX((MF))-GetUnitX((mF))),1,"Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl") call UnitDamageTargetBY(((mF)),((MF)),(($7530)*1.),false,(false),false,false,(ConvertAttackType(0)),(ConvertDamageType(17)),((0)*1.),("")) endif endfunction function Boss_zhaohuan_1_n03N takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:241") call SetUnitAnimation((Je[(id)]),"stand") call PauseUnit((Je[(id)]),false) endfunction function Boss_damager_n03N takes nothing returns nothing local unit attack=(mF) local unit target=(MF) local real life=GetWidgetLife(target) local real maxlife=GetUnitState(target,UNIT_STATE_MAX_LIFE) local real v=life/ maxlife local real a local real r local integer id if Boss_ability4_cd_n03N[(pF)]<(100000.-TimerGetRemaining(GameTimer))then set Boss_ability4_cd_n03N[(pF)]=(100000.-TimerGetRemaining(GameTimer))+8 set a=GetRandomReal(0,6.28) set r=GetRandomReal($96,350) set id=(GetUnitUserData((CreateUnit(GetOwningPlayer(target),'n03R',GetUnitX(target)+Cos(a)*r,GetUnitY(target)+Sin(a)*r,GetRandomReal(0,360))))) call UnitAddPAttackTrig(id,function Boss_damager_2_n03N) call UnitApplyTimedLife((Je[(id)]),'BEfn',30) call SetUnitAnimation((Je[(id)]),"birth") call PauseUnit((Je[(id)]),true) call TimerStart(NewTimer(id),.66,false,function Boss_zhaohuan_1_n03N) endif set attack=null set target=null endfunction function Boss_Death_n03N takes nothing returns nothing endfunction function Boss_Init_n03N takes nothing returns nothing local integer id=le call UnitAddPAttackTrig(id,function Boss_attack_n03N) call UnitAddBeDamagerTrig(id,function Boss_damager_n03N) call AddUnitDeathTrigB(id,function Boss_Death_n03N) call UnitAddAbilityBY((Je[(id)]),'A0WJ') call UnitAddAbilityBY((Je[(id)]),'A0WK') call UnitAddAbilityBY((Je[(id)]),'A0WL') set PB[id]=true endfunction function Boss_Init_ywzd takes nothing returns nothing call RegisterSpellChannelEvent('A0WJ',function Boss_Ability_1_n03N) call RegisterSpellEffectEvent('A0WJ',function Boss_Ability_1_n03N) call RegisterSpellChannelEvent('A0WK',function Boss_Ability_2_n03N) call RegisterSpellEffectEvent('A0WK',function Boss_Ability_2_n03N) call RegisterSpellChannelEvent('A0WL',function Boss_Ability_3_n03N) call RegisterSpellEffectEvent('A0WL',function Boss_Ability_3_n03N) endfunction function Init_Unit_Enter takes nothing returns nothing call RegisterEnterworldEvent('n03N',function Boss_Init_n03N) endfunction function ItemAbility_001_func takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local unit u local real x local real y if Boss_Spell_data2[i]==0 then call TimerStart(GetExpiredTimer(),$A,false,function ItemAbility_001_func) set Boss_Spell_data2[i]=1 set u=II[Boss_Spell_data1[i]] set x=GetUnitX(u) set y=GetUnitY(u) call SetUnitScale(u,2,0,0) call DestroyEffect(AddSpecialEffectTarget("flame piercing.mdl",u,"origin")) call Ltv(Boss_Spell_data1[i]) call GroupEnumUnitsInRange(G,x,y,400+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,400)then if IsUnitAliveAndEnemy(u,Boss_Spell_unit1[i])and GetUnitAbilityLevel(u,'Avul')==0 then call DestroyEffect(AddSpecialEffectTarget("fireball.mdl",u,"origin")) call UnitDamageTargetBY(((Boss_Spell_unit1[i])),((u)),((((Boss_Spell_Z[i])*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($F)*1.))*1.),(("|c00C85917"))) endif endif endloop else call HeroAddExtraInt((GetUnitUserData((Boss_Spell_unit1[i]))),-$3E8) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:242") endif endfunction function ItemAbility_001_Actions takes nothing returns nothing local unit u=GetTriggerUnit() local real x=GetSpellTargetX() local real y=GetSpellTargetY() local integer i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=u set Boss_Spell_data1[i]=LAv("flame cyclone.mdl",x,y,1.5) set Boss_Spell_data2[i]=0 set Boss_Spell_Z[i]=GetHeroState3(u,true)*100 call UnitAddAbility(II[Boss_Spell_data1[i]],'A0SK') call HeroAddExtraInt((GetUnitUserData((u))),$3E8) call TimerStart(NewTimer(i),2,false,function ItemAbility_001_func) call SetItemDroppableTimedById((GetUnitUserData((u))),'I009',75) set u=null endfunction function ItemAbility_002_func takes nothing returns nothing local integer i=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:243") set Item_intup_I00C[Boss_Spell_data1[i]]=null call HeroAddExtraStr(Boss_Spell_data1[i],-Boss_Spell_data2[i]) call Boss_Spell_deallocate(i) endfunction function ItemAbility_002_Actions takes nothing returns nothing local integer data=(GetUnitUserData((GetTriggerUnit()))) local integer intup=R2I(GetHeroStrNotExtra(data)*.15) local integer i if Item_intup_I00C[data]==null then set i=Boss_Spell_allocate() set Item_intup_I00C[data]=NewTimer(i) set Boss_Spell_data1[i]=data set Boss_Spell_data2[i]=intup call HeroAddExtraStr(data,intup) else set i=(alloc__hpv(GetHandleId((Item_intup_I00C[data])))) if Boss_Spell_data2[i]!=intup then call HeroAddExtraStr(data,intup-Boss_Spell_data2[i]) set Boss_Spell_data2[i]=intup endif endif call TimerStart(Item_intup_I00C[data],$F,false,function ItemAbility_002_func) call SetItemDroppableTimedById(data,'I00C',60) endfunction function ItemAbility_003_debuff2 takes nothing returns nothing local integer data local integer i=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:244") if IsUnitInGroup(Boss_Spell_unit1[i],h_v_Group)then set data=(GetUnitUserData((Boss_Spell_unit1[i]))) call UnitRemoveAbilityandBuffBY(Boss_Spell_unit1[i],'A0SL','B06Z') call DeUnitMdef(data,Boss_Spell_data2[i]) set Item_buff_I00E[data]=null endif set Boss_Spell_unit1[i]=null call Boss_Spell_deallocate(i) endfunction function ItemAbility_003_debuff takes unit u returns nothing local integer data=(GetUnitUserData((u))) local integer i if IsUnitInGroup(u,h_v_Group)==false then return endif if Item_buff_I00E[data]==null then set i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=u set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=ModifyUnitMdef(data,-$A) set Item_buff_I00E[data]=NewTimer(i) call UnitAddAbilityBY(u,'A0SL') else set i=(alloc__hpv(GetHandleId((Item_buff_I00E[data])))) if Boss_Spell_unit1[i]==u then if Boss_Spell_data1[i]<4 then set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 call UnitMdefChange(data,Boss_Spell_data2[i],-($A+5*Boss_Spell_data1[i])) endif else set Boss_Spell_unit1[i]=u set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=ModifyUnitMdef(data,-$A) call UnitAddAbilityBY(u,'A0SL') endif endif call TimerStart(Item_buff_I00E[data],$A,false,function ItemAbility_003_debuff2) endfunction function ItemAbility_003_Actions takes nothing returns nothing local unit u=GetTriggerUnit() local unit target=GetSpellTargetUnit() call ItemAbility_003_debuff(target) call Ltv(LAv("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",GetUnitX(target),GetUnitY(target),1)) call Ltv(LAv("desecrategreen.mdl",GetUnitX(target),GetUnitY(target),2)) call UnitDamageTargetBY((((mF))),(((MF))),((((GetHeroPropertiesByAll((GetUnitUserData((u))))*$96)*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($F)*1.))*1.),(("|c00FF8080"))) call SetItemDroppableTimedById((GetUnitUserData((u))),'I00E',80) set u=null set target=null endfunction function Item_I0E1_Damager2_action takes nothing returns nothing local real r if Item_I0E1_hd2_life[(pF)]>0 then set r=GetDamage() if Item_I0E1_hd2_life[(pF)]=32 then call UnitApplyTimedLife(Boss_Spell_unit2[i],0,.01) call KillUnit(Boss_Spell_unit2[i]) call DestroyGroup(Boss_Spell_group1[i]) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:247") call Boss_Spell_deallocate(i) set Boss_Spell_group1[i]=null set Boss_Spell_unit2[i]=null endif endfunction function ItemAbility_005_Actions takes nothing returns nothing local integer i set Boss_x[0]=GetUnitX(GetTriggerUnit()) set Boss_y[0]=GetUnitY(GetTriggerUnit()) set Boss_x[1]=GetSpellTargetX()-Boss_x[0] set Boss_y[1]=GetSpellTargetY()-Boss_y[0] set Boss_z[0]=Atan2(Boss_y[1],Boss_x[1]) set Boss_x[1]=Cos(Boss_z[0]) set Boss_y[1]=Sin(Boss_z[0]) set i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=GetTriggerUnit() set Boss_Spell_group1[i]=CreateGroup() set Boss_Spell_data1[i]=0 set Boss_Spell_X[i]=Boss_x[1]*30 set Boss_Spell_Y[i]=Boss_y[1]*30 set Boss_Spell_Z[i]=GetHeroState3(Boss_Spell_unit1[i],true)*60 call TimerStart(NewTimer(i),.03,true,function ItemAbility_005_Actions_func01) set Boss_x[2]=Boss_x[0]+Boss_x[1]*50 set Boss_y[2]=Boss_y[0]+Boss_y[1]*50 set CR=FALSE set Boss_Spell_unit2[i]=CreateUnit(Player($F),'ushd',Boss_x[2],Boss_y[2],Boss_z[0]*bj_RADTODEG) call SetUnitX(Boss_Spell_unit2[i],Boss_x[2]) call SetUnitY(Boss_Spell_unit2[i],Boss_y[2]) call UnitAddAbility(Boss_Spell_unit2[i],'Aloc') call SetUnitFlyHeight(Boss_Spell_unit2[i],30,0) call SetUnitTimeScale(Boss_Spell_unit2[i],1.5) call SetUnitScale(Boss_Spell_unit2[i],3,3,3) set CR=true call SetItemDroppableTimedById((GetUnitUserData((GetTriggerUnit()))),'I0DR',80) endfunction function ItemAbility_006_Actions_func03 takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) set Boss_Spell_Z[i]=Boss_Spell_Z[i]+.5 if Boss_Spell_data2[i]>0 then if not(UnitAlive(Boss_Spell_unit2[i])and IsUnitInRangeXY(Boss_Spell_unit2[i],Boss_Spell_X[i],Boss_Spell_Y[i],$3E8))then call UnitRemoveAbilityandBuffBY(Boss_Spell_unit2[i],'A0TJ','B078') call DeUnitMdef(Boss_Spell_data2[i],Boss_Spell_data1[i]) set Item_I0E7_bool[Boss_Spell_data2[i]]=FALSE set Boss_Spell_data2[i]=0 endif endif if Boss_Spell_Z[i]>$A then if Boss_Spell_data2[i]>0 then call UnitRemoveAbilityandBuffBY(Boss_Spell_unit2[i],'A0TJ','B078') call DeUnitMdef(Boss_Spell_data2[i],Boss_Spell_data1[i]) set Item_I0E7_bool[Boss_Spell_data2[i]]=FALSE endif call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:248") call Boss_Spell_deallocate(i) endif endfunction function ItemAbility_006_Actions_func02 takes nothing returns nothing local integer i=Boss_Spell_data1[0] local unit u=GetEnumUnit() local integer index=(GetUnitUserData((u))) set Boss_x[1]=Boss_Spell_X[i]+(Boss_Spell_X[index]*Boss_x[0]-Boss_Spell_Y[index]*Boss_y[0])*Boss_z[0] set Boss_y[1]=Boss_Spell_Y[i]+(Boss_Spell_Y[index]*Boss_x[0]+Boss_Spell_X[index]*Boss_y[0])*Boss_z[0] set Boss_Spell_Z[index]=Boss_Spell_Z[index]+(Boss_z[1]-Boss_Spell_Z[index])*.1 if IsPointInWorldBounds(Boss_x[1],Boss_y[1])then call SetUnitX(u,Boss_x[1]) call SetUnitY(u,Boss_y[1]) call SetUnitFlyHeight(u,Boss_Spell_Z[index]-GetPointZ(Boss_x[1],Boss_y[1]),0) endif if Boss_Spell_data1[i]>=60 then call GroupRemoveUnit(Boss_Spell_group1[i],u) call DestroyEffect(Boss_Spell_eff[index]) call KillUnit(u) call Boss_Spell_deallocate(index) set Boss_Spell_eff[index]=null endif set u=null endfunction function ItemAbility_006_Actions_func01 takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer index local real t set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 set t=I2R(Boss_Spell_data1[i])/ 60. if Boss_Spell_data2[i]>0 then if UnitAlive(Boss_Spell_unit2[i])and IsUnitInRangeXY(Boss_Spell_unit2[i],Boss_Spell_X[i],Boss_Spell_Y[i],300)then set Boss_Spell_X[i]=GetUnitX(Boss_Spell_unit2[i]) set Boss_Spell_Y[i]=GetUnitY(Boss_Spell_unit2[i]) set Boss_z[1]=GetPointZ(Boss_Spell_X[i],Boss_Spell_Y[i])+GetUnitFlyHeight(Boss_Spell_unit2[i])+75 else call UnitRemoveAbilityandBuffBY(Boss_Spell_unit2[i],'A0TJ','B078') set Item_I0E7_bool[Boss_Spell_data2[i]]=FALSE set Boss_z[1]=GetPointZ(Boss_Spell_X[i],Boss_Spell_Y[i]) set Boss_Spell_data2[i]=0 endif else set Boss_z[1]=GetPointZ(Boss_Spell_X[i],Boss_Spell_Y[i]) endif set Boss_x[0]=Cos(t*6.28*1.) set Boss_y[0]=Sin(t*6.28*1.) set Boss_z[0]=(1.-t*t)*650 set index=Boss_Spell_data1[0] set Boss_Spell_data1[0]=i call ForGroup(Boss_Spell_group1[i],function ItemAbility_006_Actions_func02) set Boss_Spell_data1[0]=index if Boss_Spell_data1[i]>=60 then if Boss_Spell_data2[i]>0 then call UnitDamageTargetBY((Boss_Spell_unit1[i]),(Boss_Spell_unit2[i]),((Boss_Spell_Z[i])*1.),false,(true),false,false,(ConvertAttackType(0)),(ConvertDamageType($E)),(($F)*1.),("|c00FF8000")) set Boss_Spell_data1[i]=ModifyUnitMdef(Boss_Spell_data2[i],-$F) endif call TimerStart(GetExpiredTimer(),.5,true,function ItemAbility_006_Actions_func03) set Boss_Spell_Z[i]=0 call Lqv(LAv("judgement.mdl",Boss_Spell_X[i],Boss_Spell_Y[i],5),$A) else if Boss_Spell_data1[i]==52 then call Ltv(LAv("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl",Boss_Spell_X[i],Boss_Spell_Y[i],5)) endif endif endfunction function ItemAbility_006_Actions takes nothing returns nothing local unit spellunit=GetTriggerUnit() local unit target=GetSpellTargetUnit() local unit u local integer i local integer id=(GetUnitUserData((target))) local integer index if target!=(Je[(id)])then set spellunit=null set target=null return endif if Item_I0E7_bool[id]then call NewTextTagInTarget_B(spellunit,"Eye Target Inside Target!",8,$CD,$FF,$9B) call IssueImmediateOrderById(spellunit,$D0004) else call SetItemDroppableTimedById((GetUnitUserData((GetTriggerUnit()))),'I0E7',120) set Item_I0E7_bool[id]=true set i=Boss_Spell_allocate() set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=id set Boss_Spell_X[i]=GetUnitX(target) set Boss_Spell_Y[i]=GetUnitY(target) set Boss_Spell_Z[i]=GetHeroPropertiesByAll((GetUnitUserData((spellunit))))*$C8 set Boss_Spell_unit1[i]=spellunit set Boss_Spell_unit2[i]=target set Boss_Spell_group1[i]=CreateGroup() call TimerStart(NewTimer(i),.03,true,function ItemAbility_006_Actions_func01) call UnitAddAbilityBY(target,'A0TJ') set Boss_x[0]=0 set Boss_y[0]=bj_PI/ 5 set Boss_z[0]=Boss_x[0]+Boss_y[0]*$A set Boss_z[1]=GetPointZ(Boss_Spell_X[i],Boss_Spell_Y[i])+GetUnitFlyHeight(target)+75 loop set CR=FALSE set index=Boss_Spell_allocate() set Boss_Spell_X[index]=Cos(Boss_x[0]) set Boss_Spell_Y[index]=Sin(Boss_x[0]) set Boss_Spell_Z[index]=Boss_z[1] set Boss_x[1]=Boss_Spell_X[i]+Boss_Spell_X[index]*650 set Boss_y[1]=Boss_Spell_Y[i]+Boss_Spell_Y[index]*650 set u=CreateUnit(Player($F),'e001',Boss_x[1],Boss_y[1],Boss_x[0]*bj_RADTODEG) if IsPointInWorldBounds(Boss_x[1],Boss_y[1])then call SetUnitX(u,Boss_x[1]) call SetUnitY(u,Boss_y[1]) endif call SetUnitFlyHeight(u,Boss_z[1]-GetPointZ(Boss_x[1],Boss_y[1]),0) call SetUnitScale(u,3,3,3) call SetUnitUserData(u,index) call GroupAddUnit(Boss_Spell_group1[i],u) set Boss_Spell_eff[index]=AddSpecialEffectTarget("Abilities\\Weapons\\FaerieDragonMissile\\FaerieDragonMissile.mdl",u,"origin") set CR=true set Boss_x[0]=Boss_x[0]+Boss_y[0] exitwhen Boss_x[0]>=Boss_z[0] endloop set u=null endif set spellunit=null set target=null endfunction function ItemAbility_007_Actions_func01 takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:249") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0TL','B079') call ModifyUnitArmor(id,$C8) call DeUnitMdef(id,Item_I0DX_mdef[id]) call Unit_Cancel_Counter(259,id) set Item_I0DX_Timer[id]=null endfunction function ItemAbility_007_Actions_func00 takes nothing returns nothing local integer id=(pF) if Item_I0DX_Timer[id]==null then set Item_I0DX_Timer[id]=NewTimer(id) call UnitAddAbilityBY((MF),'A0TL') set Item_I0DX_mdef[id]=ModifyUnitMdef(id,-$A) call ModifyUnitArmor(id,-$C8) call Unit_App_Counter(260,id) endif call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Doom\\DoomTarget.mdl",(MF),"origin")) call DestroyEffect(AddSpecialEffectTarget("firenova.mdl",(MF),"origin")) call TimerStart(Item_I0DX_Timer[id],$A,false,function ItemAbility_007_Actions_func01) call NewTextTagInTarget_B((mF),"Ha ha ha ha ha !",$F,$FF,0,0) call zhv((GetPlayerId((GetOwningPlayer((mF))))),100,1) call zhv((GetPlayerId((GetOwningPlayer((MF))))),100,1) call KillUnit((mF)) endfunction function ItemAbility_007_Actions takes nothing returns nothing local unit spellunit=GetTriggerUnit() local unit target=GetSpellTargetUnit() local unit u local integer id=(GetUnitUserData((target))) local real x=GetUnitX(target)-GetUnitX(spellunit) local real y=GetUnitY(target)-GetUnitY(spellunit) local real r=Atan2(y,x) if target!=(Je[(id)])then set spellunit=null set target=null return endif call SetItemDroppableTimedById((GetUnitUserData((GetTriggerUnit()))),'I0DX',120) set x=GetUnitX(spellunit)-Cos(r)*$C8 set y=GetUnitY(spellunit)-Sin(r)*$C8 set u=CreateUnit(GetTriggerPlayer(),'e03A',x,y,r*bj_RADTODEG) call IssueTargetOrderById(u,$D022F,target) call UnitAddDamagerTrig((GetUnitUserData((u))),function ItemAbility_007_Actions_func00) call UnitApplyTimedLife(u,0,5) set u=null set spellunit=null set target=null endfunction function ItemAbility_008_Actions_func02 takes nothing returns nothing if GetDamage()>=GetWidgetLife((MF))+.5 then call SetWidgetLife((MF),1) set KF[HF]=PF+1000000. endif endfunction function ItemAbility_008_Actions_func01 takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) if GetUnitAbilityLevel(Boss_Spell_unit2[i],'B07A')>0 then set Boss_Spell_X[i]=Boss_Spell_X[i]-.01 if Boss_Spell_X[i]<=0 then set Boss_Spell_X[i]=Boss_Spell_Y[i] call UnitDamageTargetBY(((Boss_Spell_unit1[i])),((Boss_Spell_unit2[i])),((((Boss_Spell_Z[i])*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($F)*1.))*1.),(("|c00FF0080"))) call DestroyEffect(AddSpecialEffectTarget("ghostmissile.mdl",Boss_Spell_unit2[i],"origin")) endif else if(Control_use[(Boss_Spell_data2[i])])and(Control_abid[(Boss_Spell_data2[i])])=='ACfb' then call UnitCloseControl(Boss_Spell_data2[i]) endif call s__Trig_remove((Boss_Spell_data1[i])) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:250") call Boss_Spell_deallocate(i) endif endfunction function ItemAbility_008_Actions takes nothing returns nothing local unit spellunit=GetTriggerUnit() local unit target=GetSpellTargetUnit() local integer i local integer id=(GetUnitUserData((target))) if target!=(Je[(id)])then call IssueImmediateOrderById(spellunit,$D0004) set spellunit=null set target=null return endif if IsUnitType(target,UNIT_TYPE_MAGIC_IMMUNE)then call IssueUnitStop_DisplayText(spellunit,"Magic resistance!") else if(Control_abid[(id)])!='ACfb' and m3v(target,5,'ACfb','B07A')then set i=Boss_Spell_allocate() set Boss_Spell_data1[i]=UnitAddShieldTrigB(id,function ItemAbility_008_Actions_func02) set Boss_Spell_data2[i]=id set Boss_Spell_X[i]=1 set Boss_Spell_Y[i]=1 set Boss_Spell_Z[i]=GetHeroPropertiesByAll((GetUnitUserData((spellunit))))*30 set Boss_Spell_unit1[i]=spellunit set Boss_Spell_unit2[i]=target call TimerStart(NewTimer(i),.01,true,function ItemAbility_008_Actions_func01) call SetItemDroppableTimedById((GetUnitUserData((GetTriggerUnit()))),'I0DY',80) else call NewTextTagInTarget_B(spellunit,"Please use toys correctly!",8,0,0,0) call IssueImmediateOrderById(spellunit,$D0004) endif endif set spellunit=null set target=null endfunction function ItemAbility_009_Actions_func takes nothing returns nothing local integer data=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer id=GetHandleId(Boss_Spell_unit1[data]) local integer fx local unit u local integer i local real x local real y local real a local real r set Boss_Spell_data3[data]=Boss_Spell_data3[data]-1 set i=4 set x=(GetUnitX(II[(Boss_Spell_data2[data])])) set y=(GetUnitY(II[(Boss_Spell_data2[data])])) loop set i=i-1 set a=(i/ 4.+Boss_Spell_data3[data]/ 20.)*Lx set fx=LoadInteger(BYHT,Boss_Spell_data1[data],i) call LKv(fx,x+275*Cos(a)) call Llv(fx,y+275*Sin(a)) exitwhen i==0 endloop if Boss_Spell_data3[data]<$80 then set i=GetRandomInt(3,5) loop set a=GetRandomReal(0,6.28) set r=GetRandomReal(0,325) call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\FlameStrike\\FlameStrikeEmbers.mdl",x+Cos(a)*r,y+Sin(a)*r)) set i=i-1 exitwhen i==0 endloop if ModuloInteger(Boss_Spell_data3[data],8)==0 then call GroupEnumUnitsInRange(G,x,y,325+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,325)then if IsUnitAliveAndEnemy(u,(Je[(id)]))then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl",u,"origin")) call Lqv((LAv("Objects\\Spawnmodels\\Human\\SmallFlameSpawn\\SmallFlameSpawn.mdl",GetUnitX(u),GetUnitY(u),1)),1) call UnitDamageTargetBY((((Je[(id)]))),((u)),((((Boss_Spell_X[data])*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($C)*1.))*1.),(("|c00FF8080"))) call m2v(u,1,'A500','B500',true) endif endif endloop endif if Boss_Spell_data3[data]<1 then set i=4 loop set i=i-1 call LQv((LoadInteger(BYHT,Boss_Spell_data1[data],i)),1) exitwhen i==0 endloop call Unit_Cancel_Counter(261,id) call free(Boss_Spell_data1[data]) call Ltv(Boss_Spell_data2[data]) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:251") call Boss_Spell_deallocate(data) endif endif endfunction function ItemAbility_009_Actions takes nothing returns nothing local integer data=Boss_Spell_allocate() local integer id=(GetUnitUserData((GetTriggerUnit()))) local integer i=4 local integer fx local real x=GetUnitX((Je[(id)])) local real y=GetUnitY((Je[(id)])) local real a set Boss_Spell_unit1[data]=ConvertVersion((GetUnitUserData((GetTriggerUnit())))) set Boss_Spell_data1[data]=malloc() set Boss_Spell_data2[data]=Lnv(x,y,0) set Boss_Spell_data3[data]=20+32*4 set Boss_Spell_X[data]=$F*GetHeroPropertiesByAll((id)) loop set i=i-1 set a=i*Lx/ 4. set fx=Lnv(x+275*Cos(a),y+275*Sin(a),0) call LMv(fx,"simoon.mdx") call SetUnitScale(II[(fx)],((.75)*1.),0,0) call SaveInteger(BYHT,Boss_Spell_data1[data],i,fx) exitwhen i==0 endloop call SetItemDroppableTimedById((id),'I0EB',120) call Unit_App_Counter(262,id) call TimerStart(NewTimer(data),.03125,true,function ItemAbility_009_Actions_func) endfunction function ItemAbility_010_Actions_func03 takes nothing returns nothing call RemoveHeroReviveBuff(((alloc__hpv(GetHandleId((GetExpiredTimer()))))),2) endfunction function ItemAbility_010_Actions_func02 takes unit u returns nothing local integer id=(GetUnitUserData((u))) if u==(Je[(id)])and nC[id]then if Item_I0E9_timer[id]==null then set Item_I0E9_timer[id]=NewTimer(id) set Item_I0E9_mdef[id]=ModifyUnitMdef(id,50) call UnitAddAbilityBY(u,'A0TQ') call Unit_App_Counter(263,id) if SummonedUnitSkills_A048_Timer[id]!=null then call RemoveHeroReviveBuff((id),1) endif endif call TimerStart(Item_I0E9_timer[id],20,false,function ItemAbility_010_Actions_func03) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Resurrect\\ResurrectCaster.mdl",u,"origin")) endif endfunction function ItemAbility_010_Actions_func01 takes nothing returns nothing local integer b=s__SoulMissile_Last_Missile call ItemAbility_010_Actions_func02(s__barrage_target[b]) endfunction function ItemAbility_010_Actions takes nothing returns nothing local integer b=CreateBarrageTypeA(GetTriggerUnit(),GetSpellTargetUnit()) call s__SoulMissile_BarrageFiringByA(b,function ItemAbility_010_Actions_func01,GetUnitFacing(GetTriggerUnit())*bj_DEGTORAD,0,500*.03125,0,1.75) call LMv(s__barrage_model[b],"floatingeye.mdx") call SetUnitScale(II[(s__barrage_model[b])],((.35)*1.),0,0) call Lfv(s__barrage_model[b],$FF,$FF,$FF,100) call SetItemDroppableTimedById((GetUnitUserData((GetTriggerUnit()))),'I0E9',75) endfunction function ItemAbility_011_Actions_func003 takes integer id returns nothing call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0TV','B07F') call ReleaseTimer(Item_A_A0TT_timer[id],"[TimerUtils]Error:252") call s__Trig_remove((Item_A_A0TT_hd[id])) set Item_A_A0TT_timer[id]=null set Item_A_A0TT_hd[id]=0 set Item_A_A0TT_hd_life[id]=0 call Unit_Cancel_Counter(264,id) endfunction function ItemAbility_011_Actions_func002 takes nothing returns nothing call ItemAbility_011_Actions_func003((alloc__hpv(GetHandleId((GetExpiredTimer()))))) endfunction function Item_A0TT_Damager_action takes nothing returns nothing local real r if Item_A_A0TT_hd_life[(pF)]>0 then set r=GetDamage() if Item_A_A0TT_hd_life[(pF)]0 then set Boss_Spell_X[i]=Boss_Spell_X[i]-.03125 else set z=GetUnitFacing((Je[(id)])) set x=GetUnitX((Je[(id)]))-100*CosBJ(z) set y=GetUnitY((Je[(id)]))-100*SinBJ(z) call SetUnitX(Boss_Spell_unit1[i],x+(GetUnitX(Boss_Spell_unit1[i])-x)*.85) call SetUnitY(Boss_Spell_unit1[i],y+(GetUnitY(Boss_Spell_unit1[i])-y)*.85) call SetUnitFacing(Boss_Spell_unit1[i],z) endif if Boss_Spell_Y[i]>0 then set Boss_Spell_Y[i]=Boss_Spell_Y[i]-.03125 endif endif endfunction function Item_A0UX_Damager_action takes nothing returns nothing local real r if Item_A0UX_life[(pF)]>0 then set r=GetDamage() if Item_A0UX_life[(pF)]=20 then call UnitApplyTimedLife(Boss_Spell_unit2[i],0,.01) call DestroyEffect(Boss_Spell_eff[i]) call KillUnit(Boss_Spell_unit2[i]) call DestroyGroup(Boss_Spell_group1[i]) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:255") call Boss_Spell_deallocate(i) set Boss_Spell_group1[i]=null set Boss_Spell_unit2[i]=null set Boss_Spell_eff[i]=null endif endfunction function Item_A0UX_Attack_action takes nothing returns nothing local integer i=Boss_Spell_allocate() local real x=GetUnitX((mF)) local real y=GetUnitY((mF)) local real z=GetUnitFacing((mF)) set Boss_x[1]=Cos(z) set Boss_y[1]=Sin(z) set Boss_Spell_data1[i]=0 set Boss_Spell_X[i]=Boss_x[1]*30 set Boss_Spell_Y[i]=Boss_y[1]*30 set Boss_Spell_Z[i]=GetHeroPropertiesByAll((pF_v))*5. set Boss_Spell_unit1[i]=(mF) set Boss_Spell_group1[i]=CreateGroup() call TimerStart(NewTimer(i),.03,true,function Item_A0UX_Attack_action_func01) set Boss_x[2]=x+Boss_x[1]*50 set Boss_y[2]=x+Boss_y[1]*50 set CR=FALSE set Boss_Spell_unit2[i]=CreateUnit(Player($F),'e001',Boss_x[2],Boss_y[2],Boss_z[0]*bj_RADTODEG) call SetUnitX(Boss_Spell_unit2[i],Boss_x[2]) call SetUnitY(Boss_Spell_unit2[i],Boss_y[2]) call SetUnitScale(Boss_Spell_unit2[i],.5,0,0) set Boss_Spell_eff[i]=AddSpecialEffectTarget("deathwave.mdl",Boss_Spell_unit2[i],"origin") set CR=true endfunction function ItemAbility_014_Actions_func takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer id=Boss_Spell_data1[i] local real x local real y local real z if UnitAlive((Je[(id)]))and Boss_Spell_Z[i]>.5 then set Boss_Spell_Z[i]=Boss_Spell_Z[i]-.5 if Boss_Spell_data2[i]==0 then set Boss_Spell_data2[i]=1 call DestroyEffect(AddSpecialEffectTarget("darkwave.mdl",(Je[(id)]),"origin")) else set Boss_Spell_data2[i]=0 call DestroyEffect(AddSpecialEffectTarget("grin curse.mdl",(Je[(id)]),"origin")) endif else call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0VK','B07W') call s__Trig_remove((Item_A0VJ_atkaction[id])) set Item_A0VJ_timer[id]=null set Item_A0VJ_atkaction[id]=0 call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:256") call Boss_Spell_deallocate(i) call Unit_Cancel_Counter(270,id) endif endfunction function ItemAbility_014_Actions takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) local integer i local real x=GetUnitX(GetTriggerUnit()) local real y=GetUnitY(GetTriggerUnit()) if Item_A0VJ_timer[id]==null then set i=Boss_Spell_allocate() set Item_A0VJ_timer[id]=NewTimer(i) set Item_A0VJ_atkaction[id]=UnitAddPAttackTrigB(id,function Item_A0UX_Attack_action) set Boss_Spell_data1[i]=id set Boss_Spell_data2[i]=0 call UnitAddAbilityBY((Je[(id)]),'A0VK') call Unit_App_Counter(271,id) else set i=(alloc__hpv(GetHandleId((Item_A0VJ_timer[id])))) endif call SetItemDroppableTimedById((GetUnitUserData((GetTriggerUnit()))),'I0EW',90) set Boss_Spell_Z[i]=$F call TimerStart(Item_A0VJ_timer[id],.5,true,function ItemAbility_014_Actions_func) call DestroyEffect(AddSpecialEffect("shadowslam.mdl",x,y)) call DestroyEffect(AddSpecialEffect("darknova.mdl",x,y)) call DestroyEffect(AddSpecialEffect("darkpillar.mdl",x,y)) endfunction function ItemAbility_015_Actions_func takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:257") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0VM','B07X') call s__Trig_remove((Item_A0VL_hd[id])) set Item_A0VL_timer[id]=null set Item_A0VL_hd[id]=0 call Unit_Cancel_Counter(272,id) endfunction function Item_A0UX_Damaged_action takes nothing returns nothing local real r call DamageAmplify(GetDamage()*.1) set r=GetWidgetLife((MF))-GetDamage() if r<1 then call DestroyEffect(AddSpecialEffectTarget("ghostmissile.mdl",(MF),"origin")) call DamageMinus(1-r) endif endfunction function ItemAbility_015_Actions takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) if Item_A0VL_timer[id]==null then set Item_A0VL_timer[id]=NewTimer(id) set Item_A0VL_hd[id]=UnitAddBeDamagerTrigB(id,function Item_A0UX_Damaged_action) call UnitAddAbilityBY((Je[(id)]),'A0VM') call Unit_App_Counter(273,id) endif call SetItemDroppableTimedById((GetUnitUserData((GetTriggerUnit()))),'I0F4',85) call TimerStart(Item_A0VL_timer[id],6,false,function ItemAbility_015_Actions_func) endfunction function ItemAbility_016_Actions_func takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer index local real x=Boss_Spell_X[i] local real y=Boss_Spell_Y[i] local real t=(100000.-TimerGetRemaining(GameTimer)) local unit u local group g set Boss_Spell_data2[i]=Boss_Spell_data2[i]-1 set g=Boss_Spell_group1[i] set Boss_Spell_group1[i]=Boss_Spell_group2[i] set Boss_Spell_group2[i]=g loop set u=FirstOfGroup(g) exitwhen u==null call GroupRemoveUnit(g,u) set index=(GetUnitUserData((u))) if IsUnitInRangeXY(u,x,y,350)and Boss_Spell_data2[i]>0 then call GroupAddUnit(Boss_Spell_group1[i],u) if UnitAlive(u)then if t>Item_I0E3_A0VO_timed[index]then set Item_I0E3_A0VO_timed[index]=t+.5 call UnitCureTaret(Boss_Spell_unit1[i],u,GetUnitMaxLifeById(index)*.5) call DestroyEffect(AddSpecialEffectTarget("natureheal.mdl",u,"origin")) endif endif else set Item_I0E3_A0VO_timed[index]=0 endif endloop if Boss_Spell_data2[i]>0 then set g=Boss_Spell_group1[i] call GroupEnumUnitsInRange(G,x,y,375,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) set index=(GetUnitUserData((u))) if IsUnitInRangeXY(u,x,y,300)and Item_I0E3_A0VO_timed[index]==0 and IsUnitInGroup(u,g)==false then if IsUnitAllyNotbag(u,Boss_Spell_unit1[i])then set Item_I0E3_A0VO_timed[index]=t+.5 call GroupAddUnit(g,u) endif endif endloop else call Ltv(Boss_Spell_data1[i]) call DestroyGroup(Boss_Spell_group1[i]) call DestroyGroup(Boss_Spell_group2[i]) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:258") call Boss_Spell_deallocate(i) endif set g=null endfunction function ItemAbility_016_Actions takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) local integer i=Boss_Spell_allocate() local real x=GetUnitX(GetTriggerUnit()) local real y=GetUnitY(GetTriggerUnit()) set Boss_Spell_X[i]=x set Boss_Spell_Y[i]=y set Boss_Spell_unit1[i]=GetTriggerUnit() set Boss_Spell_group1[i]=CreateGroup() set Boss_Spell_group2[i]=CreateGroup() set Boss_Spell_data1[i]=Lfv(LAv("chaosrunicaura.mdl",x,y,3),0,$FF,0,$FF) set Boss_Spell_data2[i]=$A*32 call TimerStart(NewTimer(i),.03125,true,function ItemAbility_016_Actions_func) call SetItemDroppableTimedById((GetUnitUserData((GetTriggerUnit()))),'I0F6',75) endfunction function ItemAbility_017_Actions takes nothing returns nothing local unit c=GetTriggerUnit() local integer i=$A local real x=GetUnitX(c) local real y=GetUnitY(c) local real d=300*GetHeroState3(c,true) local unit u local real x2 local real y2 local real a call GroupEnumUnitsInRange(G,x,y,900+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,900)then if IsUnitAliveAndEnemyNotAvul(u,c)then call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Undead\\UndeadDissipate\\UndeadDissipate.mdl",u,"origin")) call UnitDamageTargetBY(((c)),((u)),((((d)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) call m2v(u,3.25,'A500','B500',true) endif endif endloop loop set i=i-1 set a=bj_PI*i/ 5 set x2=$B4*Cos(a) set y2=$B4*Sin(a) call Lqv(LAv("DarkLightning.mdl",x+4*x2,y+4*y2,6),1.25) call Lqv(LAv("DarkLightning.mdl",x+2*x2,y+2*y2,4),1.25) exitwhen i==0 endloop call PlaySoundAtPoint_BJ((cn),(($7F)*1.),((x)*1.),((y)*1.),0) call Lqv(Lfv(LAv("ShadowAssault.mdl",x,y,$A),125,0,125,$FF),1.25) call Lqv(Lfv(LAv("ShadowSlam.mdl",x,y,4),0,0,0,$FF),1.25) call zhv(GetPlayerId(GetOwningPlayer(c)),40,.5) call SetItemDroppableTimedById((GetUnitUserData((GetTriggerUnit()))),'I0F8',75) set c=null endfunction function ItemAbility_018_Stop takes integer data returns nothing if Item_Data_Int_1[data]!=null then set Item_Data_Id[Item_Data_Int_1[data]]=0 set Item_Data_Id[Item_Data_Int_2[data]]=0 call SetUnitVertexColor((Je[(Item_Data_Int_2[data])]),$FF,$FF,$FF,$FF) call ModifyUnitMagicDamage((Item_Data_Int_1[data]),33.) call ModifyUnitMagicDamage((Item_Data_Int_2[data]),-33.) call DeUnitAdef((Item_Data_Int_1[data]),Item_Data_Int_3[data]) call DeUnitAdef((Item_Data_Int_2[data]),Item_Data_Int_4[data]) call Unit_Cancel_Counter(274,Item_Data_Int_1[data]) call Unit_Cancel_Counter(275,Item_Data_Int_2[data]) call BFv(Item_Data_Int_5[data]) call fvv(data) set Item_Data_Int_1[data]=0 endif endfunction function ItemAbility_018_Actions_func takes nothing returns nothing local integer data=J[Item_I0F3_Id] loop exitwhen 0==data if UnitAlive((Je[(Item_Data_Int_1[data])]))and UnitAlive((Je[(Item_Data_Int_2[data])]))and IsUnitInRange((Je[(Item_Data_Int_2[data])]),(Je[(Item_Data_Int_1[data])]),1750.)then set Item_Data_Int_6[data]=Item_Data_Int_6[data]-1 if ModuloInteger(Item_Data_Int_6[data],32)==0 then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",(Je[(Item_Data_Int_2[data])]),"origin")) call UnitCureTaret(null,(Je[(Item_Data_Int_2[data])]),.1*GetUnitMaxLifeById(Item_Data_Int_2[data])) endif call SetUnitVertexColor((Je[(Item_Data_Int_2[data])]),GetRandomInt(0,$FF),GetRandomInt(0,$FF),GetRandomInt(0,$FF),$FF) call Bgv(Item_Data_Int_5[data]) else set Item_Data_Int_6[data]=0 endif if Item_Data_Int_6[data]<1 then call ItemAbility_018_Stop(data) endif set data=K[data] endloop endfunction function ItemAbility_018_Actions takes nothing returns nothing local integer data local integer c=(GetUnitUserData(((GetTriggerUnit())))) local integer t=(GetUnitUserData(((GetSpellTargetUnit())))) if Item_Data_Id[t]!=null then call ItemAbility_018_Stop(Item_Data_Id[t]) endif if Item_I0F3_Id==0 then set Item_I0F3_Id=fxv(function ItemAbility_018_Actions_func) endif set data=D9v(Item_I0F3_Id) set Item_Data_Id[c]=data set Item_Data_Id[t]=data set Item_Data_Int_1[data]=c set Item_Data_Int_2[data]=t set Item_Data_Int_3[data]=ModifyUnitAdef(c,66) set Item_Data_Int_4[data]=ModifyUnitAdef(t,66) set Item_Data_Int_5[data]=CHe("AFOD",GetTriggerUnit(),GetSpellTargetUnit()) set Item_Data_Int_6[data]=32*$A if IsUnitAliveAndEnemy((Je[(t)]),(Je[(c)]))then call NewTextTagInTarget_B((Je[(t)]),"The appalling power of rising ah !!",$F,$FF,0,0) endif call DestroyEffect(AddSpecialEffectTarget("ChaosExplosion.mdl",(Je[(c)]),"origin")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",(Je[(t)]),"origin")) call ModifyUnitMagicDamage(c,-33.) call ModifyUnitMagicDamage(t,33.) call SetItemDroppableTimedById(Item_Data_Int_1[data],'I0F3',50) call Unit_App_Counter(276,c) call Unit_App_Counter(277,t) endfunction function ItemAbility_019_Actions_func takes nothing returns nothing local integer data=J[Item_I0F9_Id] local integer i local integer i2 local unit u local integer v local real cX local real cY local real dX local real dY local real a loop exitwhen 0==data set i=Item_Data_Int_2[data] set i2=Item_Data_Int_3[data] if UnitAlive(Boss_Spell_unit1[i])then set Item_Data_Int_6[data]=Item_Data_Int_6[data]-1 set Boss_Spell_X[i2]=Boss_Spell_X[i2]+Boss_Spell_X[i] set Boss_Spell_Y[i2]=Boss_Spell_Y[i2]+Boss_Spell_Y[i] set cX=GetUnitX(Boss_Spell_unit1[i]) set cY=GetUnitY(Boss_Spell_unit1[i]) set dX=Boss_Spell_X[i2]-cX set dY=Boss_Spell_Y[i2]-cY if dX*dX+dY*dY>$5F5E10 then set Item_Data_Int_6[data]=0 else if ModuloInteger(Item_Data_Int_6[data],4)==0 then set v=8 loop set v=v-1 set a=v*hx/ 8. call Ltv(LAv("DeathBladeRegeneration.mdl",Boss_Spell_X[i2]+187.5*Cos(a),Boss_Spell_Y[i2]+187.5*Sin(a),1.5)) exitwhen v==0 endloop call GroupEnumUnitsInRange(G,Boss_Spell_X[i2],Boss_Spell_Y[i2],325+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,Boss_Spell_X[i2],Boss_Spell_Y[i2],325)then if not IsUnitInGroup(u,Boss_Spell_group1[i])and IsUnitAliveAndEnemyNotAvul(u,Boss_Spell_unit1[i])then call GroupAddUnit(Boss_Spell_group1[i],u) call DestroyEffect(AddSpecialEffectTarget("CurseBoltPurple.mdl",u,"chest")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",u,"origin")) call UnitDamageTargetBY((Boss_Spell_unit1[i]),(u),((Boss_Spell_Z[i])*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((.0)*1.),("")) call m1v(u,1) call addUnitdefbuff(u,'A0VV','B083',.12,$C) endif endif endloop call Ltv(Lfv(LAv("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",Boss_Spell_X[i2],Boss_Spell_Y[i2],2),$FF,0,$FF,$FF)) endif call MoveLightningEx(Boss_Spell_lig[i],true,cX,cY,GetPointZ(cX,cY)+120,Boss_Spell_X[i2],Boss_Spell_Y[i2],GetPointZ(Boss_Spell_X[i2],Boss_Spell_Y[i2])) endif else set Item_Data_Int_6[data]=0 endif if Item_Data_Int_6[data]<1 then if Boss_Spell_lig[i]!=null then call DestroyLightning(Boss_Spell_lig[i]) set Boss_Spell_lig[i]=null endif call DestroyGroup(Boss_Spell_group1[i]) set Boss_Spell_group1[i]=null call Boss_Spell_deallocate(i) call Boss_Spell_deallocate(i2) call Unit_Cancel_Counter(278,Item_Data_Int_1[data]) call fvv(data) endif set data=K[data] endloop endfunction function ItemAbility_019_Actions takes nothing returns nothing local integer data local integer i local integer i2 local real cX local real cY local real a if Item_I0F9_Id==0 then set Item_I0F9_Id=fxv(function ItemAbility_019_Actions_func) endif set data=D9v(Item_I0F9_Id) set i=Boss_Spell_allocate() set i2=Boss_Spell_allocate() set Item_Data_Int_2[data]=i set Item_Data_Int_3[data]=i2 set Boss_Spell_unit1[i]=GetTriggerUnit() set Boss_Spell_group1[i]=CreateGroup() set Boss_Spell_Z[i]=GetHeroState2(Boss_Spell_unit1[i],true)*20 set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=0 set Item_Data_Int_1[data]=(GetUnitUserData((GetTriggerUnit()))) set Item_Data_Int_6[data]=23 set cX=GetUnitX(Boss_Spell_unit1[i]) set cY=GetUnitY(Boss_Spell_unit1[i]) set a=Atan2(GetSpellTargetY()-cY,GetSpellTargetX()-cX) set Boss_Spell_X[i]=50*Cos(a) set Boss_Spell_Y[i]=50*Sin(a) set Boss_Spell_X[i2]=cX+Boss_Spell_X[i] set Boss_Spell_Y[i2]=cY+Boss_Spell_Y[i] set Boss_Spell_Z[i]=$C8*GetHeroStateByMax(Je[Item_Data_Int_1[data]]) set Boss_Spell_lig[i]=AddLightningEx("AFOP",true,cX,cY,GetPointZ(cX,cY)+120,Boss_Spell_X[i2],Boss_Spell_Y[i2],GetPointZ(Boss_Spell_X[i2],Boss_Spell_Y[i2])) call DestroyEffect(AddSpecialEffectTarget("DarknessExplosion.mdl",Boss_Spell_unit1[i],"origin")) call Unit_App_Counter(279,Item_Data_Int_1[data]) call SetItemDroppableTimedById(Item_Data_Int_1[data],'I0F9',120) endfunction function ItemAbility_020_Actions_func takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local real x=Boss_Spell_X[i] local real y=Boss_Spell_Y[i] local unit u if Je[Boss_Spell_data3[i]]!=null then call GroupEnumUnitsInRange(G,x,y,425+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,425)then if IsUnitAliveAndEnemyNotAvul(u,Boss_Spell_unit1[i])then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\AcidBomb\\BottleMissile.mdl",u,"chest")) call UnitDamageTargetBY((Boss_Spell_unit1[i]),(u),((Boss_Spell_Z[i])*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((.0)*1.),("")) call UnitAppBuff((GetUnitUserData((u))),'A0W1',$D006B) endif endif endloop else set Boss_Spell_data2[i]=0 endif if Boss_Spell_data2[i]<=1 then call Unit_Cancel_Counter(280,Boss_Spell_data3[i]) call Ltv(Boss_Spell_data1[i]) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:259") call Boss_Spell_deallocate(i) else set Boss_Spell_data2[i]=Boss_Spell_data2[i]-1 endif endfunction function ItemAbility_020_Actions takes nothing returns nothing local integer i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=GetTriggerUnit() set Boss_Spell_X[i]=GetSpellTargetX() set Boss_Spell_Y[i]=GetSpellTargetY() set Boss_Spell_Z[i]=GetHeroState3(Boss_Spell_unit1[i],true)*20 set Boss_Spell_data1[i]=LAv("Radioactivecloud.mdl",Boss_Spell_X[i],Boss_Spell_Y[i],1.75) set Boss_Spell_data2[i]=R2I(8./ .5) set Boss_Spell_data3[i]=(GetUnitUserData((Boss_Spell_unit1[i]))) call Ltv(LAv("DesecrateGreen.mdx",Boss_Spell_X[i],Boss_Spell_Y[i],2)) call Lqv(LAv("Abilities\\Spells\\Undead\\Darksummoning\\DarkSummonTarget.mdl",Boss_Spell_X[i],Boss_Spell_Y[i],5),2.5) call Ltv(Lfv(LAv("Abilities\\Spells\\Undead\\DarkRitual\\DarkRitualTarget.mdl",Boss_Spell_X[i],Boss_Spell_Y[i],5),55,$FF,55,$CD)) call TimerStart(NewTimer(i),.5,true,function ItemAbility_020_Actions_func) call zhv(GetPlayerId(GetOwningPlayer(Boss_Spell_unit1[i])),50,.4) call SetItemDroppableTimedById(Boss_Spell_data3[i],'I0FA',75) call Unit_App_Counter(281,Boss_Spell_data3[i]) endfunction function ItemAbility_021_Actions_func takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:260") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0W6','B08A') call DeUnitMdef(id,Item_I0F2_mdef[id]) set Item_I0F2_mdef[id]=0 call Unit_Cancel_Counter(282,id) endfunction function ItemAbility_021_Actions takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) local real x=GetUnitX((Je[(id)])) local real y=GetUnitY((Je[(id)])) local unit u call GroupEnumUnitsInRange(G,x,y,300+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,300)then if IsUnitAliveAndEnemyNotAvul(u,(Je[(id)]))then call m1v(u,1) endif endif endloop call Lqv(LAv("lightstrikearray.mdx",x,y,1.2),2.5) if Item_I0F2_mdef[id]==null then call UnitAddAbilityBY((Je[(id)]),'A0W6') set Item_I0F2_mdef[id]=ModifyUnitMdef(id,30.) call TimerStart(NewTimer(id),5,false,function ItemAbility_021_Actions_func) endif call SetItemDroppableTimedById(id,'I0F2',60) call Unit_App_Counter(283,id) endfunction function ItemAbility_022_Actions takes nothing returns nothing local unit u=GetTriggerUnit() local real x=GetRandomReal(0,100) local integer array id local real array v set id[1]='I0FJ' set id[2]='I0FI' set id[3]='I0FG' set id[4]='I0FF' set id[5]='I0FH' set id[6]='rej2' set v[0]=33 set v[1]=2 set v[2]=5 set v[3]=$F set v[4]=$F set v[5]=$F set v[6]=$F set id[7]=0 loop set id[100+id[7]]=id[7] set id[7]=id[7]+1 exitwhen id[7]==7 endloop set id[7]=0 loop loop set id[8]=GetRandomInt(0,6) set id[9]=GetRandomInt(0,6) exitwhen id[8]!=id[9] endloop set id[$A]=id[100+id[8]] set id[100+id[8]]=id[100+id[9]] set id[100+id[9]]=id[$A] set id[7]=id[7]+1 exitwhen id[7]==$F endloop set id[7]=0 loop set id[8]=id[100+id[7]] if x<=v[id[8]]then if id[id[8]]!=null then call SetItemUserData(CreateItemG(id[id[8]],GetUnitX(u),GetUnitY(u)),GetPlayerId(GetOwningPlayer(u))+1) call Ltv(LAv("ChaosExplosion.mdx",GetUnitX(u),GetUnitY(u),1.5)) call thv(GetObjectName(id[id[8]])+" |c00ffff80Gocha!!|r",GetUnitX(u),GetUnitY(u),25,.075,.035,bj_PI/ 2.5,5,6) else call thv("|c00000000I am a big chief in Africa!!!|r",GetUnitX(u),GetUnitY(u),25,.075,.035,bj_PI/ 2.5,5,6) endif set id[7]=7 else set x=x-v[id[8]] endif set id[7]=id[7]+1 exitwhen id[7]>=7 endloop if id[7]==7 then call thv("|c00000000I am a big chief in Africa!!!|r",GetUnitX(u),GetUnitY(u),25,.075,.035,bj_PI/ 2.5,5,6) endif set u=null endfunction function ItemAbility_023_Actions_func takes nothing returns nothing set Lucky=0 call RemoveUnitBJ(Item_I0FJ_unit,32) call DestroyTimer(Item_I0FJ_timer) set Item_I0FJ_unit=null set Item_I0FJ_timer=null endfunction function ItemAbility_023_Actions takes nothing returns nothing if Item_I0FJ_unit==null then set Item_I0FJ_timer=CreateTimer() set Item_I0FJ_unit=CreateUnit(GetTriggerPlayer(),'e001',0,0,0) call UnitAddAbility(Item_I0FJ_unit,'A0WC') set Lucky=1 endif call TimerStart(Item_I0FJ_timer,30*60,FALSE,function ItemAbility_023_Actions_func) endfunction function ItemAbility_024_Actions_func takes nothing returns nothing local integer data=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer i=Boss_Spell_data1[data] local integer i2=Boss_Spell_data2[data] local real a if Boss_Spell_data1[i2]==0 then if UnitAlive(Boss_Spell_unit1[data])then set Boss_Spell_X[i]=GetUnitX(Boss_Spell_unit1[data]) set Boss_Spell_Y[i]=GetUnitY(Boss_Spell_unit1[data]) set Boss_Spell_Z[i]=GetPointZ(Boss_Spell_X[i],Boss_Spell_Y[i])+GetUnitFlyHeight(Boss_Spell_unit1[data])+60 else set Boss_Spell_data1[i2]=1 endif endif if Boss_Spell_data2[i2]==0 then if UnitAlive(Boss_Spell_unit2[data])and IsUnitInRangeXY(Boss_Spell_unit2[data],Boss_Spell_X[i],Boss_Spell_Y[i],$8AE)then set Boss_Spell_X[i2]=GetUnitX(Boss_Spell_unit2[data]) set Boss_Spell_Y[i2]=GetUnitY(Boss_Spell_unit2[data]) set Boss_Spell_Z[i2]=GetPointZ(Boss_Spell_X[i2],Boss_Spell_Y[i2])+GetUnitFlyHeight(Boss_Spell_unit2[data])+60 else set Boss_Spell_data2[i2]=1 endif endif if Boss_Spell_Y[data]>0 then set Boss_Spell_Y[data]=Boss_Spell_Y[data]-.02 if Boss_Spell_Y[data]<=0 then if Boss_Spell_data2[i2]==0 then call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",Boss_Spell_unit2[i],"origin")) call UnitDamageTargetBY((Boss_Spell_unit1[i]),(Boss_Spell_unit2[i]),((Boss_Spell_data3[data])*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((.0)*1.),("")) else call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",Boss_Spell_X[i2],Boss_Spell_Y[i2])) endif set a=1 set Boss_Spell_data1[i2]=1 set Boss_Spell_data2[i2]=1 call zhv(GetPlayerId(GetOwningPlayer(Boss_Spell_unit1[data])),100,.5) else set a=Boss_Spell_X[data]/(Boss_Spell_X[data]-Boss_Spell_Y[data]) endif else set Boss_Spell_Z[data]=Boss_Spell_Z[data]-.02 if Boss_Spell_Z[data]>Boss_Spell_X[data]then set a=1 else set a=Boss_Spell_Z[data]/ Boss_Spell_Y[data] endif endif if Boss_Spell_Z[data]>0 then call SetLightningColor(Boss_Spell_lig[data],1,1,1,a) call MoveLightningEx(Boss_Spell_lig[i],true,Boss_Spell_X[i],Boss_Spell_Y[i],Boss_Spell_Z[i],Boss_Spell_X[i2],Boss_Spell_Y[i2],Boss_Spell_Z[i2]) else call Unit_Cancel_Counter(284,Boss_Spell_data1[i]) call Unit_Cancel_Counter(285,Boss_Spell_data2[i]) call DestroyLightning(Boss_Spell_lig[data]) call Boss_Spell_deallocate(data) call Boss_Spell_deallocate(i) call Boss_Spell_deallocate(i2) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:261") endif endfunction function ItemAbility_024_Actions takes nothing returns nothing local integer data local integer i local integer i2 local real cX local real cY local real a set data=Boss_Spell_allocate() set i=Boss_Spell_allocate() set i2=Boss_Spell_allocate() set Boss_Spell_data1[data]=i set Boss_Spell_data2[data]=i2 set Boss_Spell_data3[data]=GetHeroState3(GetTriggerUnit(),true)*$3E8 set Boss_Spell_unit1[data]=GetTriggerUnit() set Boss_Spell_unit2[data]=GetSpellTargetUnit() set Boss_Spell_X[data]=.25 set Boss_Spell_Y[data]=.25 set Boss_Spell_Z[data]=1 set Boss_Spell_data1[i]=(GetUnitUserData((Boss_Spell_unit1[data]))) set Boss_Spell_data2[i]=(GetUnitUserData((Boss_Spell_unit2[data]))) set Boss_Spell_data1[i2]=0 set Boss_Spell_data2[i2]=0 set Boss_Spell_X[i]=GetUnitX(Boss_Spell_unit1[data]) set Boss_Spell_Y[i]=GetUnitY(Boss_Spell_unit1[data]) set Boss_Spell_Z[i]=GetPointZ(Boss_Spell_X[i],Boss_Spell_Y[i])+GetUnitFlyHeight(Boss_Spell_unit1[data])+60 set Boss_Spell_X[i2]=GetUnitX(Boss_Spell_unit2[data]) set Boss_Spell_Y[i2]=GetUnitY(Boss_Spell_unit2[data]) set Boss_Spell_Z[i2]=GetPointZ(Boss_Spell_X[i2],Boss_Spell_Y[i2])+GetUnitFlyHeight(Boss_Spell_unit2[data])+60 set Boss_Spell_lig[data]=AddLightningEx("AFOD",true,Boss_Spell_X[i],Boss_Spell_Y[i],Boss_Spell_Z[i],Boss_Spell_X[i2],Boss_Spell_Y[i2],Boss_Spell_Z[i2]) call SetLightningColor(Boss_Spell_lig[data],1,1,1,0) call Unit_App_Counter(286,Boss_Spell_data1[i]) call Unit_App_Counter(287,Boss_Spell_data2[i]) call SetItemDroppableTimedById(Boss_Spell_data1[i],'I0FL',120) call TimerStart(NewTimer(data),.02,true,function ItemAbility_024_Actions_func) endfunction function ItemAbility_025_Actions_func takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer id=Boss_Spell_data1[i] local unit u if Boss_Spell_data2[i]==0 then set Boss_Spell_data2[i]=1 call TimerStart(GetExpiredTimer(),.1,false,function ItemAbility_025_Actions_func) set Boss_Spell_data3[i]=LAv("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl",Boss_Spell_X[i],Boss_Spell_Y[i],3) call GroupEnumUnitsInRange(G,Boss_Spell_X[i],Boss_Spell_Y[i],500+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,Boss_Spell_X[i],Boss_Spell_Y[i],500)then if IsUnitAliveAndEnemyNotAvul(u,(Je[(id)]))then call UnitDamageTargetBY(((Je[(id)])),(u),((Boss_Spell_Z[i])*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((.0)*1.),("")) endif endif endloop elseif Boss_Spell_data2[i]==1 then set Boss_Spell_data2[i]=2 call TimerStart(GetExpiredTimer(),$A,false,function ItemAbility_025_Actions_func) call DEv(Boss_Spell_data3[i],"Abilities\\Spells\\Human\\Banish\\BanishTarget.mdl") set CR=FALSE set Boss_Spell_unit2[i]=CreateUnit(GetOwningPlayer((Je[(id)])),'e03G',Boss_Spell_X[i],Boss_Spell_Y[i],0) call SetUnitX(Boss_Spell_unit2[i],Boss_Spell_X[i]) call SetUnitY(Boss_Spell_unit2[i],Boss_Spell_Y[i]) set CR=true else call Ltv(Boss_Spell_data3[i]) call KillUnit(Boss_Spell_unit1[i]) call KillUnit(Boss_Spell_unit2[i]) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:262") endif endfunction function ItemAbility_025_Actions takes nothing returns nothing local integer i=Boss_Spell_allocate() set Boss_Spell_data1[i]=(GetUnitUserData((GetTriggerUnit()))) set Boss_Spell_data2[i]=0 set Boss_Spell_X[i]=GetUnitX(GetTriggerUnit()) set Boss_Spell_Y[i]=GetUnitY(GetTriggerUnit()) set Boss_Spell_Z[i]=GetHeroState2(GetTriggerUnit(),true)*$96 set CR=FALSE set Boss_Spell_unit1[i]=CreateUnit(Player($F),'e03H',Boss_Spell_X[i],Boss_Spell_Y[i],0) call SetUnitX(Boss_Spell_unit1[i],Boss_Spell_X[i]) call SetUnitY(Boss_Spell_unit1[i],Boss_Spell_Y[i]) call SetUnitFlyHeight(Boss_Spell_unit1[i],$5DC,0) call SetUnitFlyHeight(Boss_Spell_unit1[i],100,$AF0) set CR=true call TimerStart(NewTimer(i),.5,false,function ItemAbility_025_Actions_func) call SetItemDroppableTimedById(Boss_Spell_data1[i],'I0FM',75) endfunction function Item_I0E3_Spell_Effect_action_func takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:263") set Item_I0E3_cd[id]=false call Unit_Cancel_Counter(288,id) endfunction function Item_I0E3_Spell_Effect_action takes nothing returns nothing local integer id=s__Trig_P local integer i if not Item_I0E3_cd[id]and GetRandomInt(1,20)==1 then set Item_I0E3_cd[id]=true set i=2 loop if LoadInteger(BYHT,Hero_Skills_table[(id)],i)!='A10C' then call UnitResetCooldownById((Je[(id)]),LoadInteger(BYHT,Hero_Skills_table[(id)],i)) endif exitwhen i==6 set i=i+1 endloop call SetItemDroppableTimedById((id),'I0E3',$96) call CUv((Kc[(id)]),$FF,$FF,$80,.5) call NewTextTagInTarget_B((Je[(id)]),"|c00ffff80Refresh!!",$C,$FF,$FF,$FF) call Lqv(LAv("LightStrikeArray.mdx",GetUnitX((Je[(id)])),GetUnitY((Je[(id)])),2.5),1.27) call TimerStart(NewTimer(id),$96,false,function Item_I0E3_Spell_Effect_action_func) call Unit_App_Counter(289,id) endif endfunction function Item_I0DV_PickupOrDrop_action_func002 takes integer lv returns real if lv==1 then return 10. elseif lv==2 then return 50. elseif lv==3 then return 100. elseif lv==4 then return 200. elseif lv==5 then return 500. endif return .0 endfunction function Item_I0DV_PickupOrDrop_action_func takes nothing returns nothing local integer id=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer index=UnitInventorySize((Je[(id)]))-UnitInventoryCount((Je[(id)])) local real up=0 if index!=Item_I0DV_lv[id]then set up=Item_I0DV_PickupOrDrop_action_func002(index)-Item_I0DV_PickupOrDrop_action_func002(Item_I0DV_lv[id]) call ModifyUnitMagicDamage(id,up) set Item_I0DV_lv[id]=index if up>0 then call NewTextTagInTarget_B((Je[(id)]),"|c00b1f5e8+"+I2S(R2I(up))+"% Skill damage",8,$FF,$FF,$FF) else call NewTextTagInTarget_B((Je[(id)]),"|c00ff8080-"+I2S(R2I(-up))+"% Skill damage",8,$FF,$FF,$FF) endif endif endfunction function Item_I0DV_PickupOrDrop_action takes nothing returns nothing local boolean b=ATv local integer id=Ahv if b then if Item_I0DV_timer[id]==null then set Item_I0DV_timer[id]=NewTimer(id) call TimerStart(Item_I0DV_timer[id],1,true,function Item_I0DV_PickupOrDrop_action_func) call Unit_App_Counter(290,id) endif elseif Item_I0DV_timer[id]!=null then call ReleaseTimer(Item_I0DV_timer[id],"[TimerUtils]Error:264") call ModifyUnitMagicDamage(id,-Item_I0DV_PickupOrDrop_action_func002(Item_I0DV_lv[id])) set Item_I0DV_lv[id]=0 set Item_I0DV_timer[id]=null call Unit_Cancel_Counter(291,id) endif endfunction function Item_I0DY_PickupOrDrop_action_func002 takes nothing returns nothing local integer id=(alloc__hpv(GetHandleId((GetExpiredTimer())))) call s__Trig_remove((Item_I0DY_death[id])) call ReleaseTimer(Item_I0DY_timer2[id],"[TimerUtils]Error:265") call ModifyUnitAttack((id),-Item_I0DY_atk[id]) set Item_I0DY_atk[id]=0 set Item_I0DY_death[id]=0 set Item_I0DY_timer2[id]=null call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0TN','B07B') call Unit_Cancel_Counter(292,id) endfunction function Item_I0DY_PickupOrDrop_action_func001 takes nothing returns nothing local integer EvelId=GetHandleId(GetTriggerEventId()) local integer id=(GetUnitUserData((GetTriggerUnit()))) if EvelId==46 then call s__Trig_remove((Item_I0DY_death[id])) set Item_I0DY_death[id]=0 call ResumeTimer(Item_I0DY_timer[id]) else call s__Trig_remove((Item_I0DY_death[id])) if Item_I0DY_timer[id]!=null then call PauseTimer(Item_I0DY_timer[id]) set Item_I0DY_death[id]=ADD_HERO_REVIVE_EVENT(id,function Item_I0DY_PickupOrDrop_action_func001) else set Item_I0DY_death[id]=0 endif call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0TN','B07B') call ModifyUnitAttack((id),-Item_I0DY_atk[id]) call ReleaseTimer(Item_I0DY_timer2[id],"[TimerUtils]Error:266") set Item_I0DY_atk[id]=0 set Item_I0DY_timer2[id]=null call Unit_Cancel_Counter(293,id) endif endfunction function Item_I0DY_PickupOrDrop_action_func takes nothing returns nothing local integer id=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer t=Item_I0DY_atk[id] local real life=GetWidgetLife((Je[(id)]))-$2710 call TimerStart(Item_I0DY_timer[id],60,false,function Item_I0DY_PickupOrDrop_action_func) if Item_I0DY_timer2[id]==null then set Item_I0DY_timer2[id]=NewTimer(id) set Item_I0DY_death[id]=AddUnitDeathTrigB(id,function Item_I0DY_PickupOrDrop_action_func001) call TimerStart(Item_I0DY_timer2[id],59,false,function Item_I0DY_PickupOrDrop_action_func002) call Unit_App_Counter(294,id) endif if life<1 then set life=1 endif call SetWidgetLife((Je[(id)]),life) call UnitAddAbilityBY((Je[(id)]),'A0TN') set Item_I0DY_atk[id]=R2I(GetHeroPropertiesByAll(id)*1.5) if Item_I0DY_atk[id]>99999 then set Item_I0DY_atk[id]=99999 endif call ModifyUnitAttack((id),Item_I0DY_atk[id]-t) endfunction function Item_I0DY_PickupOrDrop_action takes nothing returns nothing local boolean b=ATv local integer id=Ahv if b then if Item_I0DY_timer[id]==null then set Item_I0DY_timer[id]=NewTimer(id) call TimerStart(Item_I0DY_timer[id],60,false,function Item_I0DY_PickupOrDrop_action_func) call Unit_App_Counter(295,id) endif elseif Item_I0DY_timer[id]!=null then call ReleaseTimer(Item_I0DY_timer[id],"[TimerUtils]Error:267") set Item_I0DY_timer[id]=null call Unit_Cancel_Counter(296,id) endif endfunction function Item_I0E1_Damager1_action takes nothing returns nothing local real r if Item_I0E1_hd1_life[(pF)]>0 then set r=GetDamage() if Item_I0E1_hd1_life[(pF)]0 then call s__Trig_remove((Item_I0E1_hd1[id])) set Item_I0E1_hd1[id]=0 set Item_I0E1_hd1_life[id]=0 call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0UO','B07L') endif set Item_I0E1_timer[id]=null call Unit_Cancel_Counter(298,id) endif endfunction function Item_I0E4_PickupOrDrop_action_func02 takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:269") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0TS','B07E') call ModifyUnitMagicDamage(id,-Item_I0E4_Damege2[id]) call Unit_Cancel_Counter(299,id) set Item_I0E4_timer2[id]=null set Item_I0E4_Damege2[id]=0 endfunction function Item_I0E4_PickupOrDrop_action_func takes nothing returns nothing local integer NNv=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer id local unit u local integer i local real x local real y if UnitAlive((Je[(NNv)]))then set x=GetUnitX((Je[(NNv)])) set y=GetUnitY((Je[(NNv)])) call GroupEnumUnitsInRange(G,x,y,775,null) if Item_I0E4_Damege[NNv]==4 then call GroupRemoveUnit(G,(Je[(NNv)])) endif loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,700)and IsUnitAliveAndAlly(u,(Je[(NNv)]))and nC[(GetUnitUserData((u)))]then set id=(GetUnitUserData((u))) if Item_I0E4_timer2[id]==null then set Item_I0E4_timer2[id]=NewTimer(id) set Item_I0E4_Damege2[id]=Item_I0E4_Damege[NNv] call ModifyUnitMagicDamage(id,Item_I0E4_Damege2[id]) call UnitAddAbilityBY(u,'A0TS') call Unit_App_Counter(300,id) else if Item_I0E4_Damege[id]=GetWidgetLife((MF))+KF[HF]+.5 then set KF[HF]=KF[HF]+$989680 call SetWidgetLife((MF),1) endif else if PF>=GetWidgetLife((MF))+KF[HF]+.5 then if(100000.-TimerGetRemaining(GameTimer))>=Item_cd_I00C[(pF)]then set Item_bool_I00C[(pF)]=true set Item_cd_I00C[(pF)]=(100000.-TimerGetRemaining(GameTimer))+120 set KF[HF]=KF[HF]+$989680 call SetWidgetLife((MF),1) call TimerStart(NewTimer((pF)),3,false,function Item_I00C_Damager_action_func) endif endif endif endfunction function Item_I00E_attack_action takes nothing returns nothing local integer i=(pF_v) set Item_index_I00E[i]=Item_index_I00E[i]+1 if Item_index_I00E[i]>=$A then set Item_index_I00E[i]=0 call Ltv(LAv("uberdarkwave.mdl",GetUnitX((MF)),GetUnitY((MF)),1.5)) call Ltv(LAv("desecrate.mdl",GetUnitX((MF)),GetUnitY((MF)),2)) call UnitDamageTargetBY(((mF)),((MF)),((GetHeroPropertiesByAll(i)*70.)*1.),false,(true),false,false,(ConvertAttackType(0)),(ConvertDamageType($E)),(($F)*1.),("|c00FF8080")) endif endfunction function Item_I05H_attack_action takes nothing returns nothing if GetRandomInt(1,$F)==1 then call Ltv(LAv("Abilities\\Spells\\Undead\\Impale\\ImpaleHitTarget.mdl",GetUnitX((MF)),GetUnitY((MF)),5)) call Ltv(LNv("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",GetUnitX((MF)),GetUnitY((MF)),GetUnitFlyHeight((MF)),1)) call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Undead\\UndeadDissipate\\UndeadDissipate.mdl",(MF),"origin")) call UnitDamageTargetBY(((mF)),((MF)),((GetHeroPropertiesByAll((pF_v))*45)*1.),false,(true),false,false,(ConvertAttackType(0)),(ConvertDamageType($E)),(($F)*1.),("|c00FF8040")) endif endfunction function Item_I0DT_attack_action_func002 takes unit whichUnit,real x,real y,real damage returns nothing local unit u call Ltv(LAv("firegold.mdl",x,y,.75)) call Ltv(LAv("firenova2.mdl",x,y,1.2)) call GroupEnumUnitsInRange(G,x,y,350+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,350)then if IsUnitAliveAndEnemy(u,whichUnit)and GetUnitAbilityLevel(u,'Avul')==0 then call UnitDamageTargetBY(((whichUnit)),((u)),((((damage)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) endif endif endloop endfunction function Item_I0DT_attack_action takes nothing returns nothing if GetRandomInt(1,$A)==1 then call Boss_buff_shaoshang_add_RHZX((MF),(mF),$186A0) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\FireBallMissile\\FireBallMissile.mdl",(MF),"chest")) endif if GetUnitAbilityLevel((MF),'A0SW')>0 then call DamageMinus(-GetDamage()*.25) endif if GetRandomInt(1,100)<=3 then call Item_I0DT_attack_action_func002((mF),GetUnitX((MF)),GetUnitY((MF)),GetHeroPropertiesByAll((pF_v))*35.) endif endfunction function Item_I0DU_attack_action takes nothing returns nothing if GetRandomInt(1,5)==1 then call Auxiliary_TargetOrder(('ANab'),null,1,$D00B5,(MF)) call DestroyEffect(AddSpecialEffectTarget("firenova.mdl",(MF),"origin")) call UnitDamageTargetBY(((mF)),((MF)),((GetHeroPropertiesByAll((pF_v))*10.+$9664+$992*20)*1.),false,(true),false,false,(ConvertAttackType(0)),(ConvertDamageType($E)),(($A)*1.),("|c00FF8040")) endif endfunction function Item_I0DW_death_action takes nothing returns nothing local integer id=s__Trig_P local real x=GetUnitX((Je[(id)])) local real y=GetUnitY((Je[(id)])) local real Njv=350*GetHeroStateByMax((Je[(id)])) local group g local unit u if(100000.-TimerGetRemaining(GameTimer))>Item_cd_I0DW[id]then set Item_cd_I0DW[id]=(100000.-TimerGetRemaining(GameTimer))+.1 set g=CreateGroup() call GroupEnumUnitsInRange(g,x,y,600+75.,null) loop set u=FirstOfGroup(g) exitwhen u==null call GroupRemoveUnit(g,u) if IsUnitInRangeXY(u,x,y,600)and IsUnitAliveAndEnemy(u,(Je[(id)]))then call UnitDamageTargetBY((((Je[(id)]))),((u)),((((Njv)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),((DAMAGE_TYPE_MAGIC)),(((($F)*1.))*1.),(("|c0031822f"))) call m1v(u,2.5) endif endloop call DestroyGroup(g) set g=null call Ltv(LAv("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",x,y,3)) call Ltv(LAv("desecrate.mdl",x,y,1.75)) call CUv((Kc[(id)]),105,$FF,105,1) call CSv((Kc[(id)]),50,1) endif endfunction function Item_I0DX_attack_action takes nothing returns nothing if GetRandomInt(1,8)==1 then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",(MF),"origin")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Volcano\\VolcanoDeath.mdl",(MF),"origin")) call UnitDamageTargetBY(((mF)),((MF)),((GetHeroPropertiesByAll((pF_v))*10.+$186A0)*1.),false,(false),false,false,(ConvertAttackType(0)),(ConvertDamageType($E)),((0)*1.),("")) endif endfunction function Item_I0DZ_attack_action takes nothing returns nothing if GetRandomInt(1,20)==1 then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl",(MF),"origin")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\Impale\\ImpaleHitTarget.mdl",(MF),"origin")) call UnitDamageTargetBY(((mF)),((MF)),((GetHeroPropertiesByAll((pF_v))*30.+$7EF4*3+$A5A*20)*1.),false,(true),false,false,(ConvertAttackType(0)),(ConvertDamageType($E)),(($A)*1.),("|c00000000")) endif endfunction function Item_I0E0_attack_action_func002 takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local unit u local real x local real y local integer fx set Boss_Spell_data2[i]=Boss_Spell_data2[i]+1 if Boss_Spell_data2[i]<=6 then set x=GetUnitX(II[Boss_Spell_data1[i]])+Boss_Spell_X[i]*Boss_Spell_data2[i] set y=GetUnitY(II[Boss_Spell_data1[i]])+Boss_Spell_Y[i]*Boss_Spell_data2[i] if IsPointInWorldBounds(x,y)then call zhv((GetPlayerId((GetOwningPlayer(Boss_Spell_unit1[i])))),50,.5) set fx=LAv("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl",x,y,1.25) call LFv(fx,"Abilities\\Spells\\Other\\Monsoon\\MonsoonBoltTarget.mdl") call Ltv(Lfv(fx,$FF,0,0,$FF)) call GroupEnumUnitsInRange(G,x,y,$C8+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$C8)then if IsUnitAliveAndEnemy(u,Boss_Spell_unit1[i])and GetUnitAbilityLevel(u,'Avul')==0 then call UnitDamageTargetBY(((Boss_Spell_unit1[i])),((u)),((((Boss_Spell_Z[i])*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) if IsUnitType(u,UNIT_TYPE_HERO)then call zhv((GetPlayerId((GetOwningPlayer(u)))),75,.5) endif endif endif endloop endif endif if Boss_Spell_data2[i]>=9 then if(GetUnitUserData((Boss_Spell_unit1[i])))>0 then call HeroAddExtraAgi((GetUnitUserData((Boss_Spell_unit1[i]))),-$3E8) endif call Ltv(Boss_Spell_data1[i]) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:272") endif endfunction function Item_I0E0_attack_action takes nothing returns nothing local integer i local integer id=(pF_v) local real x local real y local real r if(100000.-TimerGetRemaining(GameTimer))>Item_I0E6_cd[id]and GetRandomInt(1,100)<=$F then set x=GetUnitX((MF))-GetUnitX((mF)) set y=GetUnitY((MF))-GetUnitY((mF)) set r=Atan2(y,x) set Item_I0E6_cd[id]=(100000.-TimerGetRemaining(GameTimer))+3 set i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=(mF) set Boss_Spell_X[i]=Cos(r)*$96 set Boss_Spell_Y[i]=Sin(r)*$96 set Boss_Spell_Z[i]=GetHeroState2(Boss_Spell_unit1[i],true)*20 set Boss_Spell_data1[i]=Lnv(GetUnitX((mF)),GetUnitY((mF)),r*bj_RADTODEG) set Boss_Spell_data2[i]=0 call TimerStart(NewTimer(i),.33,true,function Item_I0E0_attack_action_func002) call HeroAddExtraAgi(id,$3E8) endif if GetRandomInt(1,100)<=$F then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Doom\\DoomTarget.mdl",(MF),"origin")) call UnitDamageTargetBY(((mF)),((MF)),((30*GetHeroState2((mF),true)+$86C4)*1.),false,(false),false,false,(ConvertAttackType(0)),(ConvertDamageType($E)),((0)*1.),("")) endif endfunction function Item_I0E2_attack_action takes nothing returns nothing local integer i local unit u local unit whichUnit local real x local real y local real damage if GetRandomInt(1,100)<=$F then set x=GetUnitX((MF)) set y=GetUnitY((MF)) set i=0 loop call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl",x+Cos(i*bj_PI/ 3.)*$FA,y+Sin(i*bj_PI/ 3.)*$FA)) set i=i+1 exitwhen i>6 endloop call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl",x,y)) set whichUnit=(mF) set damage=$F*(GetHeroState1(whichUnit,true)+1.5*GetHeroState2(whichUnit,true))+$86C4 call Auxiliary_ImmediateOrder(('A0TR'),GetOwningPlayer(whichUnit),1,$D0080,x,y) call GroupEnumUnitsInRange(G,x,y,300+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,300)then if IsUnitAliveAndEnemy(u,whichUnit)and GetUnitAbilityLevel(u,'Avul')==0 then call UnitDamageTargetBY(((whichUnit)),((u)),((((damage)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) endif endif endloop set whichUnit=null endif endfunction function Item_I0E5_attack_action_func003 takes nothing returns nothing set Item_I0E5_off[ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:273")]=false endfunction function Item_I0E5_attack_action_func002 takes nothing returns nothing local timer t=GetExpiredTimer() local integer id=(alloc__hpv(GetHandleId((t)))) call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0TH','B077') call ModifyUnitAttack((id),-Item_I0E6_atk[id]) call ModifyUnitCrit((id),-100) call TimerStart(t,1,false,function Item_I0E5_attack_action_func003) call Unit_Cancel_Counter(303,id) set t=null endfunction function Item_I0E5_attack_action takes nothing returns nothing local integer id=(pF_v) if not Item_I0E5_off[id]and GetRandomInt(1,$F)==1 then set Item_I0E5_off[id]=true call UnitAddAbilityBY((mF),'A0TH') set Item_I0E6_atk[id]=GetHeroState2((mF),true)*$C if Item_I0E6_atk[id]>99999 then set Item_I0E6_atk[id]=99999 endif call ModifyUnitAttack((id),Item_I0E6_atk[id]) call ModifyUnitCrit((id),100) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Doom\\DoomTarget.mdl",(MF),"origin")) call UnitDamageTargetBY(((mF)),((MF)),((30*GetHeroState2((mF),true)+$86C4)*1.),false,(false),false,false,(ConvertAttackType(0)),(ConvertDamageType($E)),((0)*1.),("")) call TimerStart(NewTimer(id),9,false,function Item_I0E5_attack_action_func002) call Unit_App_Counter(304,id) endif endfunction function Item_I0E6_attack_action_func004 takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer id=Boss_Spell_data1[i] if UnitAlive((Je[(id)]))then set Boss_Spell_X[i]=Boss_Spell_X[i]-.33 call UnitDamageTargetBY(((Boss_Spell_unit1[i])),(((Je[(id)]))),((((Boss_Spell_Z[i])*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) else set Boss_Spell_X[i]=0 endif if Boss_Spell_X[i]<=0 then set Item_I0E6_timer[id]=null call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0TG','B076') call Unit_Cancel_Counter(305,id) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:274") endif endfunction function Item_I0E6_attack_action_func003 takes unit u,unit whichUnit,real s returns nothing local integer id=(GetUnitUserData((u))) local integer i if u==(Je[(id)])then if Item_I0E6_timer[id]==null then set i=Boss_Spell_allocate() set Item_I0E6_timer[id]=NewTimer(i) set Boss_Spell_data1[i]=id call TimerStart(Item_I0E6_timer[id],.33,true,function Item_I0E6_attack_action_func004) call UnitAddAbilityBY(u,'A0TG') call Unit_App_Counter(306,id) else set i=(alloc__hpv(GetHandleId((Item_I0E6_timer[id])))) endif set Boss_Spell_X[i]=$A set Boss_Spell_Z[i]=s set Boss_Spell_unit1[i]=whichUnit endif endfunction function Item_I0E6_attack_action_func002 takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer index local unit u local real x local real y local real r local real t set Boss_Spell_data2[i]=Boss_Spell_data2[i]+1 set index=$F loop set t=GetRandomReal(0,6.28) set r=GetRandomReal(0,350) set x=Boss_Spell_X[i]+Cos(t)*r set y=Boss_Spell_Y[i]+Sin(t)*r call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\FlameStrike\\FlameStrikeEmbers.mdl",x,y)) set index=index-1 exitwhen index==0 endloop set x=Boss_Spell_X[i] set y=Boss_Spell_Y[i] call GroupEnumUnitsInRange(G,x,y,350+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,350)then if IsUnitAliveAndEnemy(u,Boss_Spell_unit1[i])and GetUnitAbilityLevel(u,'Avul')==0 then call UnitDamageTargetBY(((Boss_Spell_unit1[i])),((u)),((((Boss_Spell_Z[i])*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) call Item_I0E6_attack_action_func003(u,Boss_Spell_unit1[i],Boss_Spell_Z[i]*.1) endif endif endloop if Boss_Spell_data2[i]>=9 then call Lqv(Boss_Spell_data1[i],3) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:275") endif endfunction function Item_I0E6_attack_action takes nothing returns nothing local integer i local integer id=(pF_v) if(100000.-TimerGetRemaining(GameTimer))>Item_I0E6_cd[id]and GetRandomInt(1,100)<=$F then set Item_I0E6_cd[id]=(100000.-TimerGetRemaining(GameTimer))+3 set i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=(mF) set Boss_Spell_X[i]=GetUnitX((MF)) set Boss_Spell_Y[i]=GetUnitY((MF)) set Boss_Spell_Z[i]=GetHeroState2(Boss_Spell_unit1[i],true)*$A set Boss_Spell_data1[i]=LAv("Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl",Boss_Spell_X[i],Boss_Spell_Y[i],1.5) set Boss_Spell_data2[i]=0 call TimerStart(NewTimer(i),.33,true,function Item_I0E6_attack_action_func002) endif endfunction function Item_I0E7_attack_action takes nothing returns nothing local integer eff if GetRandomInt(1,100)<=$F then call Ltv(LAv("yellowbolt",GetUnitX((MF)),GetUnitY((MF)),2.5)) set eff=LAv("holystomp.mdl",GetUnitX((MF)),GetUnitY((MF)),3) call LFv(eff,"legionstrike.mdl") call Ltv(eff) call UnitDamageTargetBY(((mF)),((MF)),((20*(GetHeroState1((mF),true)+1.5*GetHeroState2((mF),true)+GetHeroState3((mF),true))+$C350)*1.),false,(false),false,false,(ConvertAttackType(0)),(ConvertDamageType($E)),((0)*1.),("")) endif endfunction function Item_I0E8_PickupOrDrop_action_func takes nothing returns nothing local integer id=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer up=0 local integer i=8 loop set i=i-1 if MV[i]!=null then set up=up+1 endif exitwhen i==0 endloop if up!=Item_I0E8_lv[id]then set i=up-Item_I0E8_lv[id] set Item_I0E8_lv[id]=up call ModifyHeroAllStat(id,i*100) call ModifyUnitMagicDamage(id,i*5) endif endfunction function Item_I0E8_PickupOrDrop_action takes nothing returns nothing local boolean b=ATv local integer id=Ahv if b then if Item_I0E8_timer[id]==null then set Item_I0E8_timer[id]=NewTimer(id) call TimerStart(Item_I0E8_timer[id],1,true,function Item_I0E8_PickupOrDrop_action_func) call Unit_App_Counter(307,id) endif elseif Item_I0E8_timer[id]!=null then call ReleaseTimer(Item_I0E8_timer[id],"[TimerUtils]Error:276") call ModifyHeroAllStat(id,-Item_I0E8_lv[id]*100) call ModifyUnitMagicDamage(id,-Item_I0E8_lv[id]*5) set Item_I0E8_lv[id]=0 set Item_I0E8_timer[id]=null call Unit_Cancel_Counter(308,id) endif endfunction function Item_I0EC_attack_action takes nothing returns nothing if GetRandomInt(1,8)==1 then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl",(MF),"origin")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\StaffOfPurification\\PurificationCaster.mdl",(MF),"origin")) call UnitDamageTargetBY(((mF)),((MF)),((GetHeroState2((mF),true)*45+$ABDF)*1.),false,(true),false,false,(ConvertAttackType(0)),(ConvertDamageType($E)),(($A)*1.),("|c00FFFF00")) endif endfunction function Item_azhr_Damager_action2_func takes nothing returns nothing local integer i=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:278") set Item_bool_azhr[i]=0 endfunction function Item_azhr_Damager_action_func takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local unit u=Je[Boss_Spell_data1[i]] set Item_bool_azhr[Boss_Spell_data1[i]]=-1 call DestroyEffect(Boss_Spell_eff[i]) call DestroyEffect(AddSpecialEffectTarget("shiva'swrath.mdl",u,"origin")) call SetWidgetLife(u,GetWidgetLife(u)+GetUnitState(u,UNIT_STATE_MAX_LIFE)*.3) call TimerStart(GetExpiredTimer(),115,false,function Item_azhr_Damager_action2_func) call alloc__hPv(GetHandleId((GetExpiredTimer())),(Boss_Spell_data1[i])) call Boss_Spell_deallocate(i) set u=null endfunction function Item_azhr_Damager_action takes nothing returns nothing if Item_bool_azhr[(pF)]==0 then if GetWidgetLife((MF))-GetDamage()<=GetUnitState((MF),UNIT_STATE_MAX_LIFE)*.4 then set Item_bool_azhr[(pF)]=Boss_Spell_allocate() set Boss_Spell_data1[Item_bool_azhr[(pF)]]=(pF) set Boss_Spell_eff[Item_bool_azhr[(pF)]]=AddSpecialEffectTarget("Abilities\\Spells\\Undead\\FreezingBreath\\FreezingBreathTargetArt.mdl",(MF),"origin") call TimerStart(NewTimer(Item_bool_azhr[(pF)]),5,false,function Item_azhr_Damager_action_func) set KF[HF]=KF[HF]+$989680 call SetWidgetLife((MF),MinR(GetWidgetLife((MF)),GetUnitState((MF),UNIT_STATE_MAX_LIFE)*.4)) endif elseif Item_bool_azhr[(pF)]>0 then set KF[HF]=KF[HF]+$989680 endif endfunction function Item_I0F0_Damager_action takes nothing returns nothing local real r if Item_I0F0_life[(pF)]>0 then set r=GetDamage() if Item_I0F0_life[(pF)]0 then call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0VX','B085') endif call s__Trig_remove((Item_I0F0_Damager[id])) call ReleaseTimer(Item_I0F0_timer[id],"[TimerUtils]Error:279") set Item_I0F0_Damager[id]=0 set Item_I0F0_life[id]=0 set Item_I0F0_timer[id]=null call Unit_Cancel_Counter(312,id) endif endfunction function Item_I0F1_PickupOrDrop_action_func takes nothing returns nothing local integer id=(alloc__hpv(GetHandleId((GetExpiredTimer())))) if Item_I0F1_bool[id]then call ModifyUnitAttack(id,-$3A98) call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0VG','B07T') set Item_I0F1_bool[id]=false else call ModifyUnitAttack(id,$3A98) call UnitAddAbilityBY((Je[(id)]),'A0VG') call DestroyEffect(AddSpecialEffectTarget("grin curse.mdl",(Je[(id)]),"origin")) call DestroyEffect(AddSpecialEffectTarget("darkpillar.mdl",(Je[(id)]),"origin")) set Item_I0F1_bool[id]=true endif call TimerStart(GetExpiredTimer(),3,false,function Item_I0F1_PickupOrDrop_action_func) endfunction function Item_I0F1_PickupOrDrop_action takes nothing returns nothing local boolean b=ATv local integer id=Ahv if b then if Item_I0F1_timer[id]==null then call ModifyHeroProperties(id,890) set Item_I0F1_timer[id]=NewTimer(id) set Item_I0F1_bool[id]=false call TimerStart(Item_I0F1_timer[id],6,false,function Item_I0F1_PickupOrDrop_action_func) call Unit_App_Counter(313,id) endif elseif Item_I0F1_timer[id]!=null then call ModifyHeroProperties(id,-890) if Item_I0F1_bool[id]then set Item_I0F1_bool[id]=false call ModifyUnitAttack(id,-$3A98) endif call ReleaseTimer(Item_I0F1_timer[id],"[TimerUtils]Error:280") set Item_I0F1_timer[id]=null call Unit_Cancel_Counter(314,id) endif endfunction function Item_I0EX_attack_action_func takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:281") call ModifyHeroProperties(id,-$3E8) call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0VH','B07U') call Unit_Cancel_Counter(315,id) endfunction function Item_I0EX_attack_action takes nothing returns nothing local integer id=(pF_v) if(100000.-TimerGetRemaining(GameTimer))>Item_I0EX_cd[id]and GetRandomInt(1,100)<=3 then set Item_I0EX_cd[id]=(100000.-TimerGetRemaining(GameTimer))+30. call ModifyHeroProperties(id,$3E8) call UnitAddAbilityBY((Je[(id)]),'A0VH') call TimerStart(NewTimer(id),$A,false,function Item_I0EX_attack_action_func) call DestroyEffect(AddSpecialEffectTarget("darkpillar.mdl",(Je[(id)]),"origin")) call Unit_App_Counter(316,id) endif endfunction function Item_I0F5_Cure_action_func takes nothing returns nothing local integer i=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:282") local integer id=Boss_Spell_data1[i] call DeUnitMdef(id,Boss_Spell_data2[i]) call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0VI','B07V') call Unit_Cancel_Counter(317,id) call Boss_Spell_deallocate(i) endfunction function Item_I0F5_Cure_action takes nothing returns nothing local integer i if(100000.-TimerGetRemaining(GameTimer))>Item_I0F5_cd[BECURE_Unit]and GetRandomInt(1,100)<=30 then set Item_I0F5_cd[BECURE_Unit]=Item_I0F5_cd[BECURE_Unit]+10. set i=Boss_Spell_allocate() set Boss_Spell_data1[i]=BECURE_Unit set Boss_Spell_data2[i]=ModifyUnitMdef(BECURE_Unit,$F) call UnitAddAbilityBY(Je[BECURE_Unit],'A0VI') call TimerStart(NewTimer(i),5,false,function Item_I0F5_Cure_action_func) call Unit_App_Counter(318,BECURE_Unit) endif endfunction function Item_I0EW_attack_action_func takes nothing returns nothing local integer i=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:283") local integer id=Boss_Spell_data1[i] local unit u local real x=Boss_Spell_X[i] local real y=Boss_Spell_Y[i] call GroupEnumUnitsInRange(G,x,y,100+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,100)then if IsUnitAliveAndEnemyNotAvul(u,Boss_Spell_unit1[i])then call UnitDamageTargetBY(((Boss_Spell_unit1[i])),((u)),((((Boss_Spell_Z[i])*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($F)*1.))*1.),(("|c005A5A5A"))) endif endif endloop call Unit_Cancel_Counter(319,id) call Boss_Spell_deallocate(i) endfunction function Item_I0EW_attack_action takes nothing returns nothing local integer i if GetRandomInt(1,20)==1 then set i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=(mF) set Boss_Spell_data1[i]=(pF_v) set Boss_Spell_X[i]=GetUnitX((MF)) set Boss_Spell_Y[i]=GetUnitY((MF)) set Boss_Spell_Z[i]=GetHeroPropertiesByAll(Boss_Spell_data1[i])*20. call Ltv(LAv("darklightning.mdl",Boss_Spell_X[i],Boss_Spell_Y[i],2)) call TimerStart(NewTimer(i),.3,false,function Item_I0EW_attack_action_func) call Unit_App_Counter(320,Boss_Spell_data1[i]) endif endfunction function Item_I0F4_attack_action_02 takes nothing returns nothing local integer t=J[Item_I0F4_id] local integer data local unit u local integer i local real x local real y local real a local real r loop exitwhen 0==t set data=Item_I0F4_V[t] if GetUnitTypeId(Boss_Spell_unit1[data])!=0 then set Boss_Spell_data3[data]=Boss_Spell_data3[data]-1 call LKv(Boss_Spell_data2[data],GetUnitX(Boss_Spell_unit1[data])) call Llv(Boss_Spell_data2[data],GetUnitY(Boss_Spell_unit1[data])) call SetUnitFlyHeight(II[(Boss_Spell_data2[data])],((Boss_Spell_Z[data]+GetUnitFlyHeight(Boss_Spell_unit1[data]))*1.),0) else set Boss_Spell_data3[data]=0 endif if Boss_Spell_data3[data]<1 then call Ltv(Boss_Spell_data2[data]) call Boss_Spell_deallocate(data) call fvv(t) endif set t=K[t] endloop endfunction function Item_I0F4_attack_action_01 takes unit u,integer fx,real timed returns nothing local integer t local integer data if Item_I0F4_id==0 then set Item_I0F4_id=fxv(function Item_I0F4_attack_action_02) endif set t=D9v(Item_I0F4_id) set data=Boss_Spell_allocate() set Item_I0F4_V[t]=data set Boss_Spell_unit1[data]=u set Boss_Spell_data2[data]=fx set Boss_Spell_data3[data]=R2I(32*timed) set Boss_Spell_Z[data]=(GetUnitFlyHeight(II[fx])) call SetUnitFlyHeight(II[fx],Boss_Spell_Z[data]+GetUnitFlyHeight(u),0) endfunction function Item_I0F4_attack_action_func takes nothing returns nothing local integer i=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:284") local integer id=Boss_Spell_data2[i] call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0VN','B07Y') call ModifyUnitAttackSpeed(id,-20*Boss_Spell_data1[i]) call ModifyUnitMagicDamage(id,-15.*Boss_Spell_data1[i]) set Item_I0F4_timer[id]=null call Unit_Cancel_Counter(321,id) call Boss_Spell_deallocate(i) endfunction function Item_I0F4_attack_action takes nothing returns nothing local integer id=(pF_v) local integer lv=R2I((1.-GetWidgetLife((MF))/ GetUnitMaxLifeById((pF)))*4) local integer eff local integer i if lv>3 then set lv=3 elseif lv<0 then set lv=0 endif if lv>0 then if Item_I0F4_timer[id]==null then set i=Boss_Spell_allocate() set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=id set Item_I0F4_timer[id]=NewTimer(i) call UnitAddAbilityBY((Je[(id)]),'A0VN') call Unit_App_Counter(322,id) else set i=(alloc__hpv(GetHandleId((Item_I0F4_timer[id])))) endif if lv>Boss_Spell_data1[i]then set eff=LNv("Energy_Release.mdl",GetUnitX((MF)),GetUnitY((MF)),GetUnitFlyHeight((MF)),1.5) if lv==1 then call Lfv(eff,$FF,0,$FF,$FF) elseif lv==2 then call Lfv(eff,$FF,0,$7F,$FF) elseif lv==3 then call Lfv(eff,$FF,0,0,$FF) endif call DestroyEffect(AddSpecialEffectTarget("Twister Slash.mdx",(Je[(id)]),"origin")) call ModifyUnitAttackSpeed(id,20*(lv-Boss_Spell_data1[i])) call ModifyUnitMagicDamage(id,15.*(lv-Boss_Spell_data1[i])) call Item_I0F4_attack_action_01((Je[(id)]),eff,1.5) call TimerStart(Item_I0F4_timer[id],8,false,function Item_I0F4_attack_action_func) set Boss_Spell_data1[i]=lv elseif lv==Boss_Spell_data1[i]then call TimerStart(Item_I0F4_timer[id],8,false,function Item_I0F4_attack_action_func) endif endif endfunction function Item_I0EV_attack_action takes nothing returns nothing if GetRandomInt(1,20)==1 then set Boss_x[0]=GetUnitX((MF)) set Boss_y[0]=GetUnitY((MF)) set Boss_z[0]=(GetHeroState1((mF),true)+GetHeroState2((mF),true))*10. call UnitDamageTargetBY((((mF))),(((MF))),((((Boss_z[0])*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($F)*1.))*1.),(("|c005A5A5A"))) call Ltv(Lfv(LAv("Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl",Boss_x[0],Boss_y[0],1.2),0,$FF,0,$FF)) call Ltv(LAv("shadowassault.mdl",Boss_x[0],Boss_y[0],2)) endif endfunction function Item_I0F7_attack_action takes nothing returns nothing local integer id=(pF_v) if GetRandomInt(1,20)==1 then set Boss_x[0]=GetUnitX((MF)) set Boss_y[0]=GetUnitY((MF)) set Boss_z[0]=(GetHeroState1((mF),true)+GetHeroState2((mF),true))*15. call UnitDamageTargetBY((((mF))),(((MF))),((((Boss_z[0])*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($F)*1.))*1.),(("|c005A5A5A"))) call Ltv(LAv("Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl",Boss_x[0],Boss_y[0],1.2)) call Ltv(Lfv(LAv("shadowassault.mdl",Boss_x[0],Boss_y[0],2),0,0,$FF,$FF)) endif set Item_I0E7_atk[id]=Item_I0E7_atk[id]+1 if Item_I0E7_atk[id]==7 then set Item_I0E7_atk[id]=0 call DamageAmplifyDis(DAK_AMOUNT[HF]-PF,$F,"|c00808000") endif endfunction function Item_I0FD_n03L_Attack_action takes nothing returns nothing if GetUnitAbilityLevel((mF),'B084')>0 then call Ltv(LDv(Lfv(LIv("moon strike.mdl",GetUnitX((mF)),GetUnitY((mF)),0,1.5,GetUnitFacing((mF)),90),125,$FF,125,$FF),2)) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\Possession\\PossessionMissile.mdl",(MF),"origin")) call UnitDamageTargetBY((((mF))),(((MF))),((((GetHeroPropertiesByAll(Item_I0F7_Unit[(pF_v)])*3.)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($F)*1.))*1.),(("|c00008040"))) endif endfunction function Item_I0FD_create_action_func takes nothing returns nothing local integer i=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:285") call ShowUnit(Boss_Spell_unit1[i],true) call PauseUnit(Boss_Spell_unit1[i],false) call UnitAddPAttackTrig((GetUnitUserData((Boss_Spell_unit1[i]))),function Item_I0FD_n03L_Attack_action) call UnitApplyTimedLife(Boss_Spell_unit1[i],'B08B',60) call SetUnitVertexColor(Boss_Spell_unit2[i],$FF,$FF,$FF,0) call UnitApplyTimedLife(Boss_Spell_unit2[i],0,.1) call DestroyEffect(Boss_Spell_eff[i]) call Boss_Spell_deallocate(i) endfunction function Item_I0FD_create_action takes unit u,real x,real y,real a returns nothing local integer i=Boss_Spell_allocate() local integer id=(GetUnitUserData((u))) set u=CreateUnit(GetOwningPlayer(u),'n03L',x,y,a) set x=GetUnitX(u) set y=GetUnitY(u) call ShowUnit(u,false) call PauseUnit(u,true) set Boss_Spell_unit1[i]=u set Item_I0F7_Unit[(GetUnitUserData((u)))]=id set CR=false set u=CreateUnit(GetOwningPlayer(u),'n03L',x,y,a) call UnitAddAbility(u,'Aloc') call UnitAddAbility(u,'Avul') set CR=true call SetUnitX(u,x) call SetUnitY(u,y) set Boss_Spell_unit2[i]=u set Boss_Spell_eff[i]=AddSpecialEffectTarget("Abilities\\Spells\\Undead\\Darksummoning\\DarkSummonTarget.mdl",Boss_Spell_unit2[i],"origin") call SetUnitAnimation(Boss_Spell_unit1[i],"birth") call SetUnitAnimation(Boss_Spell_unit2[i],"birth") call TimerStart(NewTimer(i),2.33,false,function Item_I0FD_create_action_func) endfunction function Item_I0FD_death_action takes nothing returns nothing local integer id=s__Trig_P local real x=GetUnitX((Je[(id)])) local real y=GetUnitY((Je[(id)])) local real a local real r local integer i=2 loop exitwhen i<1 set a=GetRandomReal(0,6.28) set r=GetRandomReal(0,$96) call Item_I0FD_create_action((Je[(id)]),x+Cos(a)*r,y+Sin(a)*r,GetUnitFacing((Je[(id)]))) set i=i-1 endloop endfunction function Item_I0CH_Damager_action takes nothing returns nothing local real r if Item_I0CH_life[(pF)]>0 then set r=GetDamage() if Item_I0CH_life[(pF)]=Boss_Spell_Z[index]then call ModifyUnitMagicDamage(id,-3) call ModifyUnitCrit(id,-3) set Boss_Spell_data2[i]=Boss_Spell_data2[i]-1 call Boss_Spell_deallocate(index) if Boss_Spell_data2[i]==0 then set Item_I0EZ_Id[id]=0 call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:287") call Unit_Cancel_Counter(325,id) return else set Boss_Spell_data1[index2]=Boss_Spell_data1[index] set Boss_Spell_data2[Boss_Spell_data1[index]]=index2 if index==Boss_Spell_data1[i]then set Boss_Spell_data1[i]=index2 endif endif endif set end=end-1 exitwhen end==0 set index=index2 endloop endfunction function Item_I0EZ_Spell_Effect_action takes nothing returns nothing local integer id=s__Trig_P local integer i=Item_I0EZ_Id[id] local integer index local integer index2 local integer index3 if i==0 then set i=Boss_Spell_allocate() set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=0 set Item_I0EZ_Id[id]=i call TimerStart(NewTimer(id),1,true,function Item_I0EZ_Spell_Effect_action_func) call Unit_App_Counter(326,id) endif set index=Boss_Spell_data1[i] if Boss_Spell_data2[i]<4 then set Boss_Spell_data2[i]=Boss_Spell_data2[i]+1 if index==0 then set index=Boss_Spell_allocate() set Boss_Spell_data1[index]=index set Boss_Spell_data2[index]=index set Boss_Spell_data1[i]=index else set index2=Boss_Spell_data1[index] set index3=index set index=Boss_Spell_allocate() set Boss_Spell_data1[index]=index2 set Boss_Spell_data2[index]=index3 set Boss_Spell_data1[index3]=index set Boss_Spell_data2[index2]=index endif set Boss_Spell_Z[index]=(100000.-TimerGetRemaining(GameTimer))+6 call ModifyUnitMagicDamage(id,3) call ModifyUnitCrit(id,3) call NewTextTagInTarget_B((Je[(id)]),"|c0080FFFFSkills damage & crit chance +"+I2S(3*Boss_Spell_data2[i])+"%",8,$FF,$FF,$FF) else set Boss_Spell_Z[index]=(100000.-TimerGetRemaining(GameTimer))+6 set Boss_Spell_data1[i]=Boss_Spell_data2[index] endif endfunction function Item_I0F2_Spell_Effect_action_func takes nothing returns nothing local integer id=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer i=Item_I0F2_Id[id] local real r=(100000.-TimerGetRemaining(GameTimer)) local integer index=Boss_Spell_data1[i] local integer index2 local integer end=Boss_Spell_data3[i] loop set index2=Boss_Spell_data1[index] if r>=Boss_Spell_Z[index]then call ModifyUnitMagicDamage(id,-2.5) call HeroAddExtraStr(id,-125) call Boss_Spell_deallocate(index) set Boss_Spell_data3[i]=Boss_Spell_data3[i]-1 if Boss_Spell_data3[i]==0 then set Item_I0F2_Id[id]=0 call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:288") call Unit_Cancel_Counter(327,id) return else set Boss_Spell_data1[Boss_Spell_data2[index]]=index2 set Boss_Spell_data2[index2]=Boss_Spell_data2[index] endif endif exitwhen index2==i set index=index2 endloop endfunction function Item_I0F2_Spell_Effect_action takes nothing returns nothing local integer id=s__Trig_P local integer i=Item_I0F2_Id[id] local real r=(100000.-TimerGetRemaining(GameTimer)) local integer index local integer index2 if r>Item_I0F2_cd[id]then if i==0 then set i=Boss_Spell_allocate() set Boss_Spell_data1[i]=i set Boss_Spell_data2[i]=i set Boss_Spell_data3[i]=0 set Item_I0F2_Id[id]=i call TimerStart(NewTimer(id),1,true,function Item_I0F2_Spell_Effect_action_func) call Unit_App_Counter(328,id) endif if Boss_Spell_data3[i]<5 then set Boss_Spell_data3[i]=Boss_Spell_data3[i]+1 set index2=Boss_Spell_data1[i] set index=Boss_Spell_allocate() set Boss_Spell_data2[index2]=index set Boss_Spell_data1[i]=index set Boss_Spell_data1[index]=index2 set Boss_Spell_data2[index]=i set Boss_Spell_Z[index]=r+$A call ModifyUnitMagicDamage(id,2.5) call HeroAddExtraStr(id,125) call NewTextTagInTarget_B((Je[(id)]),"|c00FF8080Strength+"+I2S(125*Boss_Spell_data3[i])+"& Skill damage"+R2SW(2.5*Boss_Spell_data3[i],2,1)+"%",8,$FF,$FF,$FF) if Boss_Spell_data3[i]<5 then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIim\\AIimTarget.mdl",(Je[(id)]),"origin")) else set Item_I0F2_cd[id]=r+30 call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Resurrect\\ResurrectCaster.mdl",(Je[(id)]),"origin")) endif endif endif endfunction function Item_I0EY_attack_action takes nothing returns nothing if GetRandomInt(1,33)==1 then set Boss_z[0]=(GetHeroState1((mF),true)+GetHeroState2((mF),true))*$F call UnitDamageTargetBY((((mF))),(((MF))),((((Boss_z[0])*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) call DestroyEffect(AddSpecialEffectTarget("darkportalcast.max",(MF),"origin")) call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Undead\\UndeadDissipate\\UndeadDissipate.mdl",(MF),"origin")) endif endfunction function Item_I05U_spell2_action takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:289") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0W4','B088') set Item_I05U_timer[id]=null set Item_I05U_index[id]=0 endfunction function Item_I05U_spell_action takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) if Item_I05U_timer[id]==null then set Item_I05U_timer[id]=NewTimer(id) call UnitAddAbilityBY((Je[(id)]),'A0W4') endif set Item_I05U_index[id]=3 call TimerStart(Item_I05U_timer[id],30,false,function Item_I05U_spell2_action) call SetItemDroppableTimedById(id,'I05U',75) endfunction function Item_I05U_attack_action takes nothing returns nothing local integer id=(pF_v) if Item_I05U_index[id]>0 then set Item_I05U_index[id]=Item_I05U_index[id]-1 if Item_I05U_index[id]==0 then call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0W4','B088') call ReleaseTimer(Item_I05U_timer[id],"[TimerUtils]Error:290") set Item_I05U_timer[id]=null endif set Boss_z[0]=GetUnitMaxLifeById(id) set Boss_z[1]=UnitCure_Drain((mF),Boss_z[0]*.2,Boss_z[0]*.2) if Boss_z[1]>0 then call thv("|c0069ff2d+"+I2S(R2I(Boss_z[1]+.5)),GetUnitX((mF)),GetUnitY((mF)),GetUnitFlyHeight((mF))+25,.03,.02,bj_PI/ 2,.5,.75) endif call UnitDamageTargetBY((((mF))),(((MF))),((((Boss_z[0]*$A)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($F)*1.))*1.),(("|c008000FF"))) call DestroyEffect(AddSpecialEffectTarget("darkwave.max",(MF),"origin")) call DestroyEffect(AddSpecialEffectTarget("darklightning.max",(MF),"origin")) call DestroyEffect(AddSpecialEffectTarget("darknove.max",(mF),"origin")) elseif GetRandomInt(1,33)==1 then set Boss_z[0]=(GetHeroState2((mF),true))*20 call UnitDamageTargetBY((((mF))),(((MF))),((((Boss_z[0])*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($F)*1.))*1.),(("|c008000FF"))) call DestroyEffect(AddSpecialEffectTarget("darkpillar.max",(MF),"origin")) endif endfunction function Item_I05U_PickupOrDrop_action takes nothing returns nothing local boolean b=ATv local integer id=Ahv if b then if Item_I05U_Attack[id]==null then set Item_I05U_Attack[id]=UnitAddPAttackTrigB(id,function Item_I05U_attack_action) call Unit_App_Counter(329,id) if Item_I05U_Attack[0]==0 then set Item_I05U_Attack[0]=-1 call RegisterSpellEffectEvent('A0W3',function Item_I05U_spell_action) endif endif elseif Item_I05U_Attack[id]!=null then call s__Trig_remove((Item_I05U_Attack[id])) set Item_I05U_Attack[id]=0 if Item_I05U_timer[id]!=null then call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0W4','B088') call ReleaseTimer(Item_I05U_timer[id],"[TimerUtils]Error:291") set Item_I05U_timer[id]=null set Item_I05U_index[id]=0 endif call Unit_Cancel_Counter(330,id) endif endfunction function Item_I0FO_attack_action takes nothing returns nothing if GetRandomInt(1,20)==1 then set Boss_z[0]=GetHeroStateByMax((mF))*25 call UnitDamageTargetBY((((mF))),(((MF))),((((Boss_z[0])*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($F)*1.))*1.),(("|c00808080"))) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\Impale\\ImpaleHitTarget.mdl",(MF),"origin")) endif endfunction function Item_I0FN_death_action_func takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer id=Boss_Spell_data1[i] local real x local real y local real z local real r local boolean b=false if(Je[(id)])!=null then set Boss_x[0]=GetUnitX((Je[(id)])) set Boss_y[0]=GetUnitY((Je[(id)])) set Boss_z[0]=GetPointZ(Boss_x[0],Boss_y[0])+GetUnitFlyHeight((Je[(id)]))+50 set Boss_x[1]=GetUnitX(Boss_Spell_unit2[i]) set Boss_y[1]=GetUnitY(Boss_Spell_unit2[i]) set Boss_z[1]=GetPointZ(Boss_x[1],Boss_y[1])+GetUnitFlyHeight(Boss_Spell_unit2[i]) set x=(Boss_x[0]-Boss_x[1])*.05 set y=(Boss_y[0]-Boss_y[1])*.05 set z=(Boss_z[0]-Boss_z[1])*.05 set r=x*x+y*y+z*z set x=Boss_x[1]+x set y=Boss_y[1]+y set z=Boss_z[1]+z-GetPointZ(x,y) call SetUnitX(Boss_Spell_unit2[i],x) call SetUnitY(Boss_Spell_unit2[i],y) call SetUnitFlyHeight(Boss_Spell_unit2[i],z,0) if r<=$1E848 then set b=true endif else set b=true endif if b then if(Je[(id)])!=null then call ReviveHero((Je[(id)]),GetUnitX((Je[(id)])),GetUnitY((Je[(id)])),true) endif call DestroyEffect(Boss_Spell_eff[i]) call KillUnit(Boss_Spell_unit2[i]) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:292") call Unit_Cancel_Counter(331,id) endif endfunction function Item_I0FN_death_action takes nothing returns nothing local integer id=Ahv local integer i local real x=GetUnitX((Je[(id)])) local real y=GetUnitY((Je[(id)])) local real z local unit u local group g=CreateGroup() call GroupEnumUnitsInRange(g,x,y,600+75,null) loop set u=FirstOfGroup(g) exitwhen u==null call GroupRemoveUnit(g,u) if IsUnitInRangeXY(u,x,y,600)then if IsUnitAliveAndEnemyNotAvul(u,(Je[(id)]))then exitwhen not(IsUnitType(u,UNIT_TYPE_GIANT)or IsUnitType(u,UNIT_TYPE_UNDEAD)or IsUnitType(u,UNIT_TYPE_HERO)or IsUnitType(u,UNIT_TYPE_MECHANICAL)or IsUnitType(u,UNIT_TYPE_ETHEREAL)or IsUnitIllusion(u)) endif endif endloop call DestroyGroup(g) set g=null if u!=null then set Item_I0FN_cd[id]=(100000.-TimerGetRemaining(GameTimer))+120 set IsSleepRevive[id]=true set Hero_Revive_HP[id]=RMaxBJ(.4,GetUnitState(u,UNIT_STATE_LIFE)/ GetUnitState((Je[(id)]),UNIT_STATE_MAX_LIFE)) set Hero_Revive_MP[id]=GetUnitState(u,UNIT_STATE_LIFE)/ GetUnitState(u,UNIT_STATE_MAX_LIFE) set i=Boss_Spell_allocate() set Boss_Spell_data1[i]=id call KillUnit(u) set x=GetUnitX(u) set y=GetUnitY(u) set z=GetUnitFlyHeight(u) set CR=FALSE call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Undead\\UndeadDissipate\\UndeadDissipate.mdl",u,"origin")) call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",u,"origin")) set Boss_Spell_unit2[i]=CreateUnit(Player($F),'e001',x,y,0) call SetUnitX(Boss_Spell_unit2[i],x) call SetUnitY(Boss_Spell_unit2[i],y) call SetUnitFlyHeight(Boss_Spell_unit2[i],z,0) call SetUnitScale(Boss_Spell_unit2[i],.75,0,0) set Boss_Spell_eff[i]=AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DarkSummoning\\DarkSummonMissile.mdl",Boss_Spell_unit2[i],"origin") set CR=true call TimerStart(NewTimer(i),.03125,true,function Item_I0FN_death_action_func) call SetItemDroppableTimedById(id,'I0FN',120) call Unit_App_Counter(332,id) else set u=null endif endfunction function Item_I0FP_attack_action takes nothing returns nothing local unit u if GetRandomInt(1,20)==1 then set Boss_x[0]=GetUnitX((MF)) set Boss_y[0]=GetUnitY((MF)) set Boss_z[0]=GetHeroState2((mF),true)*40 call Ltv(LAv("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl",Boss_x[0],Boss_y[0],2)) call GroupEnumUnitsInRange(G,Boss_x[0],Boss_y[0],$FA+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,Boss_x[0],Boss_y[0],$FA)then if IsUnitAliveAndEnemyNotAvul(u,(mF))then call UnitDamageTargetBY((((mF))),((u)),((((Boss_z[0])*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($F)*1.))*1.),(("|c00FF8000"))) endif endif endloop endif endfunction function Init_ItemAbility takes nothing returns nothing call SaveReal(BYHT,DroppableTimed,('ratf'),((90)*1.)) call SaveReal(BYHT,DroppableTimed,('srbd'),((30)*1.)) call SaveReal(BYHT,DroppableTimed,('sor4'),((90)*1.)) call SaveReal(BYHT,DroppableTimed,('I0D9'),((90)*1.)) call SaveReal(BYHT,DroppableTimed,('rlif'),((60)*1.)) call SaveReal(BYHT,DroppableTimed,('I0D2'),((60)*1.)) call RegisterSpellEffectEvent('A0SH',function ItemAbility_001_Actions) call RegisterSpellEffectEvent('A0SI',function ItemAbility_002_Actions) call RegisterSpellEffectEvent('A0SJ',function ItemAbility_003_Actions) call RegisterSpellEffectEvent('A0TC',function ItemAbility_004_Actions) call RegisterSpellEffectEvent('A0TF',function ItemAbility_005_Actions) call RegisterSpellEffectEvent('A0TI',function ItemAbility_006_Actions) call RegisterSpellEffectEvent('A0TK',function ItemAbility_007_Actions) call RegisterSpellEffectEvent('A0TM',function ItemAbility_008_Actions) call RegisterSpellEffectEvent('A0TO',function ItemAbility_009_Actions) call RegisterSpellEffectEvent('A0TP',function ItemAbility_010_Actions) call RegisterSpellEffectEvent('A0TT',function ItemAbility_011_Actions) call RegisterSpellEffectEvent('A0TU',function ItemAbility_012_Actions) call RegisterSpellEffectEvent('A0UX',function ItemAbility_013_Actions) call RegisterSpellEffectEvent('A0VJ',function ItemAbility_014_Actions) call RegisterSpellEffectEvent('A0VL',function ItemAbility_015_Actions) call RegisterSpellEffectEvent('A0VO',function ItemAbility_016_Actions) call RegisterSpellEffectEvent('A0VT',function ItemAbility_017_Actions) call RegisterSpellEffectEvent('A0VU',function ItemAbility_018_Actions) call RegisterSpellEffectEvent('A0W0',function ItemAbility_019_Actions) call RegisterSpellEffectEvent('A0VZ',function ItemAbility_020_Actions) call RegisterSpellEffectEvent('A0W2',function ItemAbility_021_Actions) call RegisterSpellEffectEvent('A0WA',function ItemAbility_022_Actions) call RegisterSpellEffectEvent('A0WB',function ItemAbility_023_Actions) call RegisterSpellEffectEvent('A0WG',function ItemAbility_024_Actions) call RegisterSpellEffectEvent('A0WH',function ItemAbility_025_Actions) set Item_I00A_Func=function Item_I00A_attack_action set Item_I00C_Func=function Item_I00C_Damager_action set Item_I00E_Func=function Item_I00E_attack_action set Item_I05H_Func=function Item_I05H_attack_action set Item_I0DT_Func=function Item_I0DT_attack_action set Item_I0DU_Func=function Item_I0DU_attack_action set Item_I0DV_Func=function Item_I0DV_PickupOrDrop_action set Item_I0DW_Func=function Item_I0DW_death_action set Item_I0DX_Func=function Item_I0DX_attack_action set Item_I0DY_Func=function Item_I0DY_PickupOrDrop_action set Item_I0DZ_Func=function Item_I0DZ_attack_action set Item_I0E0_Func=function Item_I0E0_attack_action set Item_I0E1_Func=function Item_I0E1_PickupOrDrop_action set Item_I0E2_Func=function Item_I0E2_attack_action set Item_I0E3_Func=function Item_I0E3_Spell_Effect_action set Item_I0E4_Func=function Item_I0E4_PickupOrDrop_action set Item_I0E5_Func=function Item_I0E5_attack_action set Item_I0E6_Func=function Item_I0E6_attack_action set Item_I0E7_Func=function Item_I0E7_attack_action set Item_I0E8_Func=function Item_I0E8_PickupOrDrop_action set Item_I0EC_Func=function Item_I0EC_attack_action set Item_azhr_Func=function Item_azhr_Damager_action set Item_I0F0_Func=function Item_I0F0_PickupOrDrop_action set Item_I0F1_Func=function Item_I0F1_PickupOrDrop_action set Item_I0EX_Func=function Item_I0EX_attack_action set Item_I0F5_Func=function Item_I0F5_Cure_action set Item_I0EW_Func=function Item_I0EW_attack_action set Item_I0F4_Func=function Item_I0F4_attack_action set Item_I0EV_Func=function Item_I0EV_attack_action set Item_I0F7_Func=function Item_I0F7_attack_action set Item_I0FD_Func=function Item_I0FD_death_action set Item_I0CH_Func=function Item_I0CH_PickupOrDrop_action set Item_I0EZ_Func=function Item_I0EZ_Spell_Effect_action set Item_I0F2_Func=function Item_I0F2_Spell_Effect_action set Item_I0EY_Func=function Item_I0EY_attack_action set Item_I05U_Func=function Item_I05U_PickupOrDrop_action set Item_I0FO_Func=function Item_I0FO_attack_action set Item_I0FN_Func=function Item_I0FN_death_action set Item_I0FP_Func=function Item_I0FP_attack_action endfunction function BossDTS___Ability03_Func_02 takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local real x local real y local unit u if Boss_Spell_data3[i]==0 then set Boss_Spell_data3[i]=44 set x=GetUnitX(Boss_Spell_unit2[i]) set y=GetUnitY(Boss_Spell_unit2[i]) call DestroyEffect(AddSpecialEffect("lightnova.mdl",x,y)) call Lqv(LAv("lightstrikearray.mdl",x,y,1),2) call UnitAddAbility(Boss_Spell_unit2[i],'A0WT') call UnitAddAbility(Boss_Spell_unit2[i],'A0WU') call UnitMakeAbilityPermanent(Boss_Spell_unit2[i],true,'A0WU') call SetUnitTimeScale(Boss_Spell_unit2[i],4) set Boss_Spell_data2[i]=LAv("cauterize.mdx",x,y,1.5) call TimerStart(GetExpiredTimer(),1,true,function BossDTS___Ability03_Func_02) call GroupEnumUnitsInRange(G,x,y,600+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,600)and IsUnitAliveAndEnemyNotAvul(u,Boss_Spell_unit1[i])then if IsUnitType(u,UNIT_TYPE_HERO)then call UnitDamageTargetBY(((Boss_Spell_unit1[i])),((u)),(((($C350)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) else call UnitDamageTargetBY(((Boss_Spell_unit1[i])),((u)),(((($30D40)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) endif endif endloop else if Boss_Spell_data3[i]>1 and UnitAlive(Boss_Spell_unit2[i])then set x=GetUnitX(Boss_Spell_unit2[i]) set y=GetUnitY(Boss_Spell_unit2[i]) call DestroyEffect(AddSpecialEffect("lightnova.mdl",x,y)) set Boss_Spell_data3[i]=Boss_Spell_data3[i]-1 else call Ltv(Boss_Spell_data2[i]) call RemoveUnitBJ(Boss_Spell_unit2[i],50) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:643") endif endif endfunction function BossDTS___Ability03_Func_01 takes nothing returns nothing local integer EvelId=GetHandleId(GetTriggerEventId()) local integer id=(GetUnitUserData((GetTriggerUnit()))) local integer i local real x local real y local unit u if GetTriggerUnit()!=null then if EvelId==274 then set x=GetSpellTargetX() set y=GetSpellTargetY() set i=Boss_Spell_allocate() set Boss_Spell_data1[i]=id set Boss_Spell_data2[i]=(GetUnitUserData((CreateUnit(GetOwningPlayer((Je[(id)])),'n03W',x,y,0)))) set Boss_Spell_data3[i]=0 set Boss_Spell_unit1[i]=(Je[(id)]) set Boss_Spell_unit2[i]=(Je[(Boss_Spell_data2[i])]) call SetUnitFlyHeight(Boss_Spell_unit2[i],512,$9C4) call SetUnitTimeScale(Boss_Spell_unit2[i],0) set PB[Boss_Spell_data2[i]]=true call TimerStart(NewTimer(i),.7,false,function BossDTS___Ability03_Func_02) elseif EvelId==272 then call NewTextTagInTarget_B((Je[(id)]),"|cFFFFFF00Sanctions sword!",18,$FF,$FF,$FF) endif endif endfunction function BossDTS___Ability02_Func_01 takes nothing returns nothing call NewTextTagInTarget_B(GetTriggerUnit(),"|cFFFFFF00Divine power!",18,$FF,$FF,$FF) endfunction function BossDTS___Ability01_Func_02 takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local real x local real y local unit u if Boss_Spell_data1[i]==0 then set Boss_Spell_data1[i]=1 call DEv(Boss_Spell_data2[i],"judgementtarget.mdx") call SetUnitScale(II[(Boss_Spell_data2[i])],((3)*1.),0,0) call TimerStart(GetExpiredTimer(),.5,false,function BossDTS___Ability01_Func_02) else set x=GetUnitX(II[Boss_Spell_data2[i]]) set y=GetUnitY(II[Boss_Spell_data2[i]]) call GroupEnumUnitsInRange(G,x,y,100+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,100)and IsUnitAliveAndEnemyNotAvul(u,Boss_Spell_unit1[i])then if IsUnitType(u,UNIT_TYPE_HERO)then call UnitDamageTargetBY(((Boss_Spell_unit1[i])),((u)),(((($30D40)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($F)*1.))*1.),(("|c00FFFF00"))) else call KillUnit(u) endif endif endloop call Lqv(Boss_Spell_data2[i],1) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:644") endif endfunction function BossDTS___Ability01_Func_01 takes nothing returns nothing local integer EvelId=GetHandleId(GetTriggerEventId()) local integer id=(GetUnitUserData((GetTriggerUnit()))) local integer i local real x local real y local unit u if GetTriggerUnit()!=null then if EvelId==274 then set x=GetUnitX((Je[(id)])) set y=GetUnitY((Je[(id)])) call GroupEnumUnitsInRange(G,x,y,$9C4,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitAliveAndEnemyNotAvul(u,(Je[(id)]))then set i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=(Je[(id)]) set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=LAv("fireaura.mdx",GetUnitX(u),GetUnitY(u),1) call TimerStart(NewTimer(i),1,false,function BossDTS___Ability01_Func_02) endif endloop elseif EvelId==272 then call NewTextTagInTarget_B((Je[(id)]),"|cFFFFFF00Light ah!",18,$FF,$FF,$FF) endif endif endfunction function BossDTS___Attack_Func_1 takes nothing returns nothing local real v=GetWidgetLife((mF))/ GetUnitMaxLifeById((pF_v)) local integer i=GetRandomInt(1,100) if i>50 and v<.8 then set Xm=PickRandomUnitInUnitRange((mF),$578) if Xm!=null then call IssuePointOrderById((mF),$D009D,GetUnitX(Xm),GetUnitY(Xm)) endif endif endfunction function BossDTS___Start_2 takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local unit u if UnitAlive(BossDTS___Unit)then if Boss_Spell_data1[i]>1 then set Boss_Spell_data1[i]=Boss_Spell_data1[i]-1 else call SetRect(bj_lastMoveRect,-$52C0,-$79C0,-$42E0,-$6B40) call GroupEnumUnitsInRect(G,bj_lastMoveRect,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) exitwhen IsUnitAliveAndEnemyNotAvul(u,BossDTS___Unit) endloop if u!=null and IssueImmediateOrderById(BossDTS___Unit,$D0048)then set Boss_Spell_data1[i]=32 endif set u=null endif else call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:645") endif endfunction function BossDTS___GetEnterPoint takes integer id returns nothing local integer i=GetPlayerId(GetOwningPlayer((Je[(id)]))) local real x=-$4A80 local real y=-$7280 local real a=Deg2Rad(i*45) local real r if ModuloInteger(i,2)==0 then set r=768 else set r=512/ SquareRoot(.5) endif set BossDTS___Enter_X[id]=x+Cos(a)*r set BossDTS___Enter_Y[id]=y+Sin(a)*r endfunction function BossDTS___Start takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer index=Boss_Spell_data1[i] local integer id local unit u local group g local real l__tr=(100000.-TimerGetRemaining(GameTimer)) local real x=GetUnitX(Boss_Spell_unit1[i]) local real y=GetUnitY(Boss_Spell_unit1[i]) if index==0 then call TimerStart(GetExpiredTimer(),.03125,true,function BossDTS___Start) endif set g=Boss_Spell_group1[i] call GroupEnumUnitsInRange(G,x,y,650,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) set id=(GetUnitUserData((u))) if UnitAlive(u)and nC[id]then if BossDTS___Enter_timer[id]==0 then call GroupAddUnit(g,u) set BossDTS___Enter_timer[id]=l__tr+5 set BossDTS___Enter_X[id]=GetUnitX(u) set BossDTS___Enter_Y[id]=GetUnitY(u) endif endif endloop set Boss_Spell_group1[i]=Boss_Spell_group2[i] set Boss_Spell_group2[i]=g loop set u=FirstOfGroup(g) exitwhen u==null call GroupRemoveUnit(g,u) set id=(GetUnitUserData((u))) if UnitAlive(u)and IsUnitInRangeXY(u,x,y,600)then if BossDTS___Enter_timer[id]<=l__tr then set Off_A098[id]=TRUE set Off_A098_id[id]='n03H' call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportCaster.mdl",GetUnitX(u),GetUnitY(u))) call BossDTS___GetEnterPoint(id) call SetUnitPosition(u,BossDTS___Enter_X[id],BossDTS___Enter_Y[id]) call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportCaster.mdl",GetUnitX(u),GetUnitY(u))) else if GetUnitX(u)!=BossDTS___Enter_X[id]or GetUnitY(u)!=BossDTS___Enter_Y[id]then set BossDTS___Enter_timer[id]=l__tr+5 set BossDTS___Enter_X[id]=GetUnitX(u) set BossDTS___Enter_Y[id]=GetUnitY(u) endif call GroupAddUnit(Boss_Spell_group1[i],u) endif else set BossDTS___Enter_timer[id]=0 set BossDTS___Enter_X[id]=0 set BossDTS___Enter_Y[id]=0 endif endloop set g=null if index>32*60 then call KillUnit(Boss_Spell_unit1[i]) call DestroyGroup(Boss_Spell_group1[i]) call DestroyGroup(Boss_Spell_group2[i]) set Boss_Spell_data1[i]=32*45 call TimerStart(GetExpiredTimer(),.03125,true,function BossDTS___Start_2) set id=(GetUnitUserData((BossDTS___Unit))) call SetUnitInvulnerable(BossDTS___Unit,false) call PauseUnit(BossDTS___Unit,false) call UnitAddPAttackTrig(id,function BossDTS___Attack_Func_1) else set Boss_Spell_data1[i]=index+1 endif endfunction function BossDTS___Enter_de takes nothing returns nothing call IssueImmediateOrderById(GetTriggerUnit(),$D0004) endfunction function BossDTS___Enter takes nothing returns nothing local boolean b1=(hE==null) local boolean b2=(BossDTS___Index==-1) local boolean b3=(IsUnitInRangeXY(GetTriggerUnit(),-$4380,-$AFF,$96)) local boolean b4=IsItemCharges(GetItemOfTypeFromUnit(GetTriggerUnit(),'I04Y'),50) local integer i if b1 and b2 and b3 and b4 then call RemoveItemByCharges(GetItemOfTypeFromUnit(GetTriggerUnit(),'I04Y'),50) set BossDTS___Index=0 call CancelRegisterSpellEffectEvent('A0WP') call RegisterSpellChannelEvent('A0WP',function BossDTS___Enter_de) set hE=CreateTrigger() set i=Boss_Spell_allocate() set Boss_Spell_data1[i]=0 set Boss_Spell_group1[i]=CreateGroup() set Boss_Spell_group2[i]=CreateGroup() set CR=false set Boss_Spell_unit1[i]=CreateUnit(Player($F),'n03U',-$4380,-$AFF,0) call SetUnitX(Boss_Spell_unit1[i],-$4380) call SetUnitY(Boss_Spell_unit1[i],-$AFF) set CR=true call SetUnitAnimation(Boss_Spell_unit1[i],"birth") call SetUnitTimeScale(Boss_Spell_unit1[i],.9/ 3.) call TimerStart(NewTimer(i),3,false,function BossDTS___Start) else if b1 and b2 and b3 then call NewTextTagInTarget_B(GetTriggerUnit(),"Not enough powder",8,$CD,$FF,$9B) elseif b1 and b2 then call NewTextTagInTarget_B(GetTriggerUnit(),"You can not use it here",8,$CD,$FF,$9B) else call NewTextTagInTarget_B(GetTriggerUnit(),"Not yet time",8,$CD,$FF,$9B) endif call IssueImmediateOrderById(GetTriggerUnit(),$D0004) endif endfunction function BossDTS___onInit takes nothing returns nothing local real x=-$4A80 local real y=-$7280 set BossDTS___Unit=gg_unit_n03H_0776 call SetUnitInvulnerable(BossDTS___Unit,true) call PauseUnit(BossDTS___Unit,true) call SetUnitX(BossDTS___Unit,x) call SetUnitY(BossDTS___Unit,y) call RegisterSpellEffectEvent('A0WP',function BossDTS___Enter) call RegisterSpellEffectEvent('A0WQ',function BossDTS___Ability01_Func_01) call RegisterSpellChannelEvent('A0WQ',function BossDTS___Ability01_Func_01) call RegisterSpellChannelEvent('A0WR',function BossDTS___Ability02_Func_01) call RegisterSpellChannelEvent('A0WS',function BossDTS___Ability03_Func_01) call RegisterSpellEffectEvent('A0WS',function BossDTS___Ability03_Func_01) endfunction function BossHDLZ___Ability03_Func_05 takes nothing returns nothing local integer i=Boss_Spell_data1[0] local integer index=GetUnitUserData(GetEnumUnit()) call SetUnitFlyHeight(GetEnumUnit(),GetUnitFlyHeight(GetEnumUnit())-Boss_Spell_Z[i],0) endfunction function BossHDLZ___Ability03_Func_04 takes nothing returns nothing local unit u=GetEnumUnit() local integer index=GetUnitUserData(u) call SetUnitUserData(u,0) call UnitApplyTimedLife(u,0,.5) set Boss_Spell_unit1[index]=null if Boss_Spell_eff[index]!=null then call DestroyEffect(Boss_Spell_eff[index]) set Boss_Spell_eff[index]=null endif call Boss_Spell_deallocate(index) set u=null endfunction function BossHDLZ___Ability03_Func_03 takes nothing returns nothing local integer i=Boss_Spell_data1[0] local integer index=GetUnitUserData(GetEnumUnit()) local real x=GetUnitX(GetEnumUnit()) local real y=GetUnitY(GetEnumUnit()) local unit u if IsUnitHidden(GetEnumUnit())then set Boss_Spell_data2[index]=Boss_Spell_data2[index]-1 if Boss_Spell_data2[index]==0 then call ShowUnit(GetEnumUnit(),true) endif else if Boss_Spell_data3[i]==0 then call GroupEnumUnitsInRange(G,x,y,100+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,100)and u==Boss_Spell_unit1[i]then set Boss_Spell_data3[i]=index endif endloop endif endif set u=null endfunction function BossHDLZ___Ability03_Func_02 takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer index local integer v local integer array v_2 local real x local real y local unit u if Boss_Spell_data1[i]==0 then set Boss_Spell_X[i]=Boss_Spell_X[i]+1 if Boss_Spell_X[i]==32 then set Boss_Spell_X[i]=0 set Boss_Spell_Y[i]=Boss_Spell_Y[i]+1 if Boss_Spell_Y[i]<120 then call NewTextTagInTarget_B(Boss_Spell_unit1[i],"|c00FF8000"+I2S(120-R2I(Boss_Spell_Y[i]))+"|r",18,$FF,$FF,$FF) if ModuloInteger(R2I(Boss_Spell_Y[i]),20)==0 then set v=0 set index=0 loop exitwhen index==8 if ModuloInteger(Boss_Spell_data2[i]/ Pow2n[index],2)==0 then set v=v+1 set v_2[v]=index endif set index=index+1 endloop if v>0 then set CR=false set v=v_2[GetRandomInt(1,v)] set index=Boss_Spell_allocate() set Boss_Spell_data1[index]=v set Boss_Spell_data2[index]=32 set Boss_Spell_data2[i]=Boss_Spell_data2[i]+Pow2n[v] call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",BossHDLZ___HOJU_X[v],BossHDLZ___HOJU_Y[v])) set u=CreateUnit(GetOwningPlayer(Boss_Spell_unit1[i]),'h041',BossHDLZ___HOJU_X[v],BossHDLZ___HOJU_Y[v],0) call SetUnitX(u,BossHDLZ___HOJU_X[v]) call SetUnitY(u,BossHDLZ___HOJU_Y[v]) call ShowUnit(u,false) call SetUnitUserData(u,index) call GroupAddUnit(Boss_Spell_group1[i],u) set Boss_Spell_unit1[index]=u set Boss_Spell_eff[index]=null set CR=true endif endif else call NewTextTagInTarget_B(Boss_Spell_unit1[i],"|c00FF8000Ha ha! Now u will dead!!|r",18,$FF,$FF,$FF) set index=Boss_Spell_data1[0] set Boss_Spell_data1[0]=i call ForGroup(Boss_Spell_group1[i],function BossHDLZ___Ability03_Func_04) set Boss_Spell_data1[0]=index call TimerStart(GetExpiredTimer(),.03125,true,function BossHDLZ___Ability03_Func_02) set Boss_Spell_data1[i]=1 set Boss_Spell_data2[i]=32 if BossHDLZ___Order[GetUnitUserData(Boss_Spell_unit1[i])]==0 then set BossHDLZ___Order[GetUnitUserData(Boss_Spell_unit1[i])]=5 call PauseUnit(Boss_Spell_unit1[i],true) call SetUnitInvulnerable(Boss_Spell_unit1[i],true) call SetUnitAnimation(Boss_Spell_unit1[i],"Spell") endif endif endif if Boss_Spell_Y[i]<120 then set index=Boss_Spell_data1[0] set Boss_Spell_data1[0]=i call ForGroup(Boss_Spell_group1[i],function BossHDLZ___Ability03_Func_03) set Boss_Spell_data1[0]=index if Boss_Spell_data3[i]>0 then set index=Boss_Spell_data3[i] set v=Boss_Spell_data1[index] set x=BossHDLZ___HOJU_X[v] set y=BossHDLZ___HOJU_Y[v] call NewTextTagInTarget_B(Boss_Spell_unit1[index],"|c00FF8080Interference|r",8,$FF,$FF,$FF) call Ltv(LAv("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",x,y,2)) call GroupEnumUnitsInRange(G,x,y,$FA+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$FA)and IsUnitAliveAndEnemyNotAvul(u,Boss_Spell_unit1[i])then call UnitDamageTargetBY(((Boss_Spell_unit1[i])),((u)),(((($C350)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) endif endloop set index=Boss_Spell_data1[0] set Boss_Spell_data1[0]=i call ForGroup(Boss_Spell_group1[i],function BossHDLZ___Ability03_Func_04) set Boss_Spell_data1[0]=index call DestroyGroup(Boss_Spell_group1[i]) set Boss_Spell_group1[i]=null call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:646") endif endif elseif Boss_Spell_data1[i]==1 then set Boss_Spell_data2[i]=Boss_Spell_data2[i]-1 set index=Boss_Spell_allocate() set CR=false set u=CreateUnit(GetOwningPlayer(Boss_Spell_unit1[i]),'e001',$53C0,$9C0,0) call SetUnitX(u,$53C0) call SetUnitY(u,$9C0) if UnitAddAbility(u,'Amrf')then call UnitRemoveAbility(u,'Amrf') endif call SetUnitFlyHeight(u,$4B0,0) call SetUnitScale(u,$F,$F,$F) set Boss_Spell_eff[index]=AddSpecialEffectTarget("Abilities\\Spells\\Orc\\Bloodlust\\BloodlustTarget.mdl",u,"origin") call SetUnitUserData(u,index) call GroupAddUnit(Boss_Spell_group1[i],u) set Boss_Spell_unit1[index]=u set CR=true if Boss_Spell_data2[i]==0 then set Boss_Spell_data1[i]=2 set Boss_Spell_Z[i]=1 if BossHDLZ___Order[GetUnitUserData(Boss_Spell_unit1[i])]==5 then set BossHDLZ___Order[GetUnitUserData(Boss_Spell_unit1[i])]=0 call PauseUnit(Boss_Spell_unit1[i],false) call SetUnitInvulnerable(Boss_Spell_unit1[i],false) endif endif elseif Boss_Spell_data1[i]==2 then if Boss_Spell_Z[i]<60 then set Boss_Spell_Z[i]=Boss_Spell_Z[i]*1.1+1 endif set index=Boss_Spell_data1[0] set Boss_Spell_data1[0]=i call ForGroup(Boss_Spell_group1[i],function BossHDLZ___Ability03_Func_05) set Boss_Spell_data1[0]=index if GetUnitFlyHeight(FirstOfGroup(Boss_Spell_group1[i]))<$A then set Boss_Spell_data1[index]=3 set index=Boss_Spell_data1[0] set Boss_Spell_data1[0]=i call ForGroup(Boss_Spell_group1[i],function BossHDLZ___Ability03_Func_04) set Boss_Spell_data1[0]=index set x=$53C0 set y=$9C0 call Ltv(LAv("firegold.mdl",x,y,7)) call SetRect(bj_lastMoveRect,$5BA0,-$A00,$6BC0,$560) call GroupEnumUnitsInRect(G,bj_lastMoveRect,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitAliveAndEnemyNotAvul(u,Boss_Spell_unit1[i])then call KillUnitBJ(u) endif endloop endif else call DestroyGroup(Boss_Spell_group1[i]) set Boss_Spell_group1[i]=null call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:647") endif endfunction function BossHDLZ___Ability03_Func_01 takes unit u returns nothing local integer id=GetUnitUserData(u) local integer i local real x local real y if(Je[(id)])==u then set i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=(Je[(id)]) set Boss_Spell_unit2[i]=null set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=0 set Boss_Spell_data3[i]=0 set Boss_Spell_X[i]=0 set Boss_Spell_Y[i]=0 set Boss_Spell_Z[i]=0 set Boss_Spell_group1[i]=CreateGroup() call TimerStart(NewTimer(i),.03125,true,function BossHDLZ___Ability03_Func_02) call NewTextTagInTarget_B((Je[(id)]),"|c00FF8000Energy is gathering.|r",18,$FF,$FF,$FF) endif endfunction function BossHDLZ___Ability02_Func_04 takes nothing returns nothing local unit u=GetEnumUnit() local integer index=GetUnitUserData(u) call SetUnitUserData(u,0) call UnitApplyTimedLife(u,0,.5) call UnitApplyTimedLife(Boss_Spell_unit1[index],0,.5) set Boss_Spell_unit1[index]=null call Boss_Spell_deallocate(index) set u=null endfunction function BossHDLZ___Ability02_Func_03 takes nothing returns nothing local integer i=Boss_Spell_data1[0] local integer index=GetUnitUserData(GetEnumUnit()) local real x=GetUnitX(Boss_Spell_unit1[index])+Boss_Spell_X[index]*Boss_Spell_Z[index] local real y=GetUnitY(Boss_Spell_unit1[index])+Boss_Spell_Y[index]*Boss_Spell_Z[index] local unit u=GetEnumUnit() if IsTerrainPathable(x,y,PATHING_TYPE_FLYABILITY)then if Boss_Spell_data3[i]>1 then set Boss_Spell_data3[i]=1 endif else call SetUnitX(u,x) call SetUnitY(u,y) call SetUnitX(Boss_Spell_unit1[index],x) call SetUnitY(Boss_Spell_unit1[index],y) call IssueNeutralTargetOrderById(Player($F),u,$D0106,Boss_Spell_unit1[index]) if Boss_Spell_Z[index]<60 then set Boss_Spell_Z[index]=Boss_Spell_Z[index]+5 endif call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl",x,y)) call GroupEnumUnitsInRange(G,x,y,$96+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$96)and IsUnitAliveAndEnemyNotAvul(u,Boss_Spell_unit1[i])and BossHDLZ___Buff2_cd[GetUnitUserData(u)]<(100000.-TimerGetRemaining(GameTimer))then set BossHDLZ___Buff2_cd[GetUnitUserData(u)]=(100000.-TimerGetRemaining(GameTimer))+.05 call UnitDamageTargetBY(((Boss_Spell_unit1[i])),((u)),(((($186A0)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Demon\\DemonBoltImpact\\DemonBoltImpact.mdl",u,"origin")) endif endloop endif set u=null endfunction function BossHDLZ___Ability02_Func_02 takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer index local real x local real y local unit u if Boss_Spell_data1[i]==0 then set Boss_Spell_data1[i]=1 call SetUnitX(Boss_Spell_unit1[i],Boss_Spell_X[i]) call SetUnitY(Boss_Spell_unit1[i],Boss_Spell_Y[i]) call PauseUnit(Boss_Spell_unit1[i],true) call TimerStart(GetExpiredTimer(),1,false,function BossHDLZ___Ability02_Func_02) call SetUnitAnimationByIndex(Boss_Spell_unit1[i],3) call SetUnitTimeScale(Boss_Spell_unit1[i],.5) call SetUnitFlyHeight(Boss_Spell_unit1[i],500,500) elseif Boss_Spell_data1[i]==1 then set Boss_Spell_data1[i]=2 set Boss_Spell_data3[i]=16*3 call SetUnitTimeScale(Boss_Spell_unit1[i],.5/ 3) set CR=false set Boss_Spell_unit2[i]=CreateUnit(Player($F),'e001',Boss_Spell_X[i],Boss_Spell_Y[i],Boss_z[0]) call SetUnitX(Boss_Spell_unit2[i],Boss_Spell_X[i]) call SetUnitY(Boss_Spell_unit2[i],Boss_Spell_Y[i]) if UnitAddAbility(Boss_Spell_unit2[i],'Amrf')then call UnitRemoveAbility(Boss_Spell_unit2[i],'Amrf') endif call SetUnitFlyHeight(Boss_Spell_unit2[i],750,0) call SetUnitScale(Boss_Spell_unit2[i],$F,$F,$F) set Boss_Spell_eff[i]=AddSpecialEffectTarget("Abilities\\Weapons\\VengeanceMissile\\VengeanceMissile.mdl",Boss_Spell_unit2[i],"origin") set CR=true call TimerStart(GetExpiredTimer(),.03125*2,true,function BossHDLZ___Ability02_Func_02) elseif Boss_Spell_data1[i]==2 then set CR=false set Boss_x[0]=GetRandomReal(0,6.28) set Boss_y[0]=GetRandomReal(-90,90)/ bj_RADTODEG set Boss_z[0]=GetRandomReal(650,750) set Boss_x[1]=Boss_Spell_X[i]+Cos(Boss_x[0])*Cos(Boss_y[0])*Boss_z[0] set Boss_y[1]=Boss_Spell_Y[i]+Sin(Boss_x[0])*Cos(Boss_y[0])*Boss_z[0] set Boss_z[1]=750+Sin(Boss_y[0])*Boss_z[0] set u=CreateUnit(Player($F),'n040',Boss_x[1],Boss_y[1],Boss_y[0]*bj_RADTODEG+$B4) call SetUnitX(u,Boss_x[1]) call SetUnitY(u,Boss_y[1]) call SetUnitFlyHeight(u,Boss_z[1],0) call UnitApplyTimedLife(u,0,2) call IssueTargetOrderById(u,$D0106,Boss_Spell_unit1[i]) set CR=true set Boss_Spell_data3[i]=Boss_Spell_data3[i]-1 if Boss_Spell_data3[i]==0 then set Boss_Spell_data1[i]=3 set Boss_Spell_data3[i]=$A+33 call DestroyEffect(Boss_Spell_eff[i]) set Boss_Spell_eff[i]=null call UnitApplyTimedLife(Boss_Spell_unit2[i],0,.5) call SetUnitTimeScale(Boss_Spell_unit1[i],1) call NewTextTagInTarget_B(Boss_Spell_unit1[i],"|c00FF8000Destroy it small guy!!|r",18,$FF,$FF,$FF) call TimerStart(GetExpiredTimer(),.03125,true,function BossHDLZ___Ability02_Func_02) set CR=false set Boss_x[0]=bj_PI*.25 set Boss_y[0]=0 set Boss_z[0]=8 loop exitwhen Boss_z[0]==0 set Boss_z[0]=Boss_z[0]-1 set index=Boss_Spell_allocate() set Boss_Spell_X[index]=Cos(Boss_y[0]) set Boss_Spell_Y[index]=Sin(Boss_y[0]) set Boss_Spell_Z[index]=$A set Boss_x[1]=Boss_Spell_X[i]+Boss_Spell_X[index]*50 set Boss_y[1]=Boss_Spell_Y[i]+Boss_Spell_Y[index]*50 set u=CreateUnit(Player($F),'n040',Boss_x[1],Boss_y[1],0) call SetUnitX(u,Boss_x[1]) call SetUnitY(u,Boss_y[1]) call SetUnitFlyHeight(u,$7D0,Boss_z[1]) set Boss_Spell_unit1[index]=CreateUnit(Player($F),'n03Z',Boss_x[1],Boss_y[1],0) call SetUnitX(Boss_Spell_unit1[index],Boss_x[1]) call SetUnitY(Boss_Spell_unit1[index],Boss_y[1]) call IssueNeutralTargetOrderById(Player($F),u,$D0106,Boss_Spell_unit1[index]) call GroupAddUnit(Boss_Spell_group1[i],u) call SetUnitUserData(u,index) set Boss_y[0]=Boss_y[0]+Boss_x[0] endloop set CR=true endif elseif Boss_Spell_data1[i]==3 then set index=Boss_Spell_data1[0] set Boss_Spell_data1[0]=i set Boss_Spell_data3[i]=Boss_Spell_data3[i]-1 if Boss_Spell_data3[i]==0 then call ForGroup(Boss_Spell_group1[i],function BossHDLZ___Ability02_Func_04) call DestroyGroup(Boss_Spell_group1[i]) set Boss_Spell_group1[i]=null set Boss_Spell_data1[i]=4 call SetUnitAnimationByIndex(Boss_Spell_unit1[i],4) call TimerStart(GetExpiredTimer(),1,false,function BossHDLZ___Ability02_Func_02) else call ForGroup(Boss_Spell_group1[i],function BossHDLZ___Ability02_Func_03) endif set Boss_Spell_data1[0]=index else set BossHDLZ___Order[Boss_Spell_data2[i]]=0 call SetUnitFlyHeight(Boss_Spell_unit1[i],0,0) call SetUnitAnimation(Boss_Spell_unit1[i],"Stand") call SetUnitTimeScale(Boss_Spell_unit1[i],1) call PauseUnit(Boss_Spell_unit1[i],false) call SetUnitInvulnerable(Boss_Spell_unit1[i],false) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:648") endif endfunction function BossHDLZ___Ability02_Func_01 takes nothing returns nothing local integer EvelId=GetHandleId(GetTriggerEventId()) local integer id=GetUnitUserData(GetTriggerUnit()) local integer i local real x local real y local unit u if EvelId==274 then if BossHDLZ___Order[id]==3 then set BossHDLZ___Order[id]=4 call SetUnitNocontrol(id,false) call SetUnitInvulnerable((Je[(id)]),true) set i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=(Je[(id)]) set Boss_Spell_unit2[i]=null set Boss_Spell_group1[i]=CreateGroup() set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=id set Boss_Spell_data3[i]=0 set Boss_Spell_X[i]=$53C0 set Boss_Spell_Y[i]=$9C0 call TimerStart(NewTimer(i),0,false,function BossHDLZ___Ability02_Func_02) if UnitAddAbility((Je[(id)]),'Amrf')then call UnitRemoveAbility((Je[(id)]),'Amrf') endif endif elseif EvelId==272 then if BossHDLZ___Order[id]==0 then set BossHDLZ___Order[id]=3 call SetUnitNocontrol(id,true) call NewTextTagInTarget_B((Je[(id)]),"|c00FF8000Waiting for you is about to die!!|r",18,$FF,$FF,$FF) call SetUnitTimeScale((Je[(id)]),2) call SetUnitFacing((Je[(id)]),270) endif else if BossHDLZ___Order[id]==3 then set BossHDLZ___Order[id]=0 call SetUnitTimeScale((Je[(id)]),1) call SetUnitNocontrol(id,false) endif endif endfunction function BossHDLZ___Buff1_Remove takes unit u returns nothing local integer id=GetUnitUserData(u) local integer i if BossHDLZ___Buff1_timer[id]!=null and u==(Je[(id)])then set i=ReleaseTimer(BossHDLZ___Buff1_timer[id],"[TimerUtils]Error:649") call RemoveUnitBJ(Boss_Spell_unit2[i],51) call s__Trig_remove((BossHDLZ___Buff1_deathid[id])) call Boss_Spell_deallocate(i) set BossHDLZ___Buff1_deathid[id]=0 set BossHDLZ___Buff1_timer[id]=null call Unit_Cancel_Counter($446,id) endif endfunction function BossHDLZ___Buff1_Loop takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer id set Boss_Spell_X[i]=Boss_Spell_X[i]-.1 if Boss_Spell_X[i]<=0 or UnitAlive(Boss_Spell_unit1[i])==false then call BossHDLZ___Buff1_Remove(Boss_Spell_unit1[i]) else if GetUnitAbilityLevel(Boss_Spell_unit1[i],'B08Y')==0 then call IssueTargetOrderById(Boss_Spell_unit2[i],$D0200,Boss_Spell_unit1[i]) endif endif endfunction function BossHDLZ___Buff1_Death takes nothing returns nothing call BossHDLZ___Buff1_Remove(GetTriggerUnit()) endfunction function BossHDLZ___Buff1_Add takes unit u,real r returns boolean local integer id=GetUnitUserData(u) local integer i if UnitAlive(u)and u==(Je[(id)])then if BossHDLZ___Buff1_timer[id]==null then set i=Boss_Spell_allocate() set BossHDLZ___Buff1_timer[id]=NewTimer(i) set BossHDLZ___Buff1_deathid[id]=AddUnitDeathTrigB(id,function BossHDLZ___Buff1_Death) call TimerStart(BossHDLZ___Buff1_timer[id],.1,true,function BossHDLZ___Buff1_Loop) call Unit_App_Counter($447,id) set Boss_Spell_unit1[i]=u set CR=false set Boss_Spell_unit2[i]=CreateUnit(Player($F),'e001',GetUnitX(u),GetUnitY(u),0) call UnitAddAbility(Boss_Spell_unit2[i],'A0XN') set CR=true call IssueTargetOrderById(Boss_Spell_unit2[i],$D0200,Boss_Spell_unit1[i]) else set i=(alloc__hpv(GetHandleId((BossHDLZ___Buff1_timer[id])))) endif set Boss_Spell_X[i]=r return true endif return false endfunction function BossHDLZ___Ability01_Func_05 takes nothing returns nothing local integer i=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:650") call RemoveUnitBJ(Boss_Spell_unit1[i],52) call Boss_Spell_deallocate(i) endfunction function BossHDLZ___Ability01_Func_04 takes nothing returns nothing call SetUnitFacing(GetEnumUnit(),Boss_z[0]*bj_RADTODEG) endfunction function BossHDLZ___Ability01_Func_03 takes nothing returns nothing call RemoveUnitBJ(GetEnumUnit(),53) endfunction function BossHDLZ___Ability01_Func_02 takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer index local real x local real y local unit u if Boss_Spell_data1[i]==0 then set Boss_Spell_data1[i]=1 set x=GetUnitX(Boss_Spell_unit1[i]) set y=GetUnitY(Boss_Spell_unit1[i]) call PauseUnit(Boss_Spell_unit1[i],true) call TimerStart(GetExpiredTimer(),.03125,true,function BossHDLZ___Ability01_Func_02) call SetUnitAnimationByIndex(Boss_Spell_unit1[i],2) call SetUnitTimeScale(Boss_Spell_unit1[i],1.5) set CR=false set Boss_z[0]=GetUnitFacing(Boss_Spell_unit1[i]) set index=30 loop exitwhen index==0 set index=index-1 set u=CreateUnit(Player($F),GetUnitTypeId(Boss_Spell_unit1[i]),x,y,Boss_z[0]) call UnitAddAbility(u,'Aloc') call SetUnitAnimationByIndex(u,2) call SetUnitTimeScale(u,1.5) call PauseUnit(u,true) call SetUnitVertexColor(u,$FF,$FF,$FF,0) call GroupAddUnit(Boss_Spell_group1[i],u) endloop set CR=true elseif Boss_Spell_data1[i]==1 then set x=GetUnitX(Boss_Spell_unit1[i]) set y=GetUnitY(Boss_Spell_unit1[i]) if IsUnitInRangeXY(Boss_Spell_unit2[i],x,y,$5DC)then set Boss_Spell_X[i]=GetUnitX(Boss_Spell_unit2[i]) set Boss_Spell_Y[i]=GetUnitY(Boss_Spell_unit2[i]) set Boss_z[0]=Atan2(Boss_Spell_Y[i]-y,Boss_Spell_X[i]-x) call SetUnitFacing(Boss_Spell_unit1[i],Boss_z[0]*bj_RADTODEG) call ForGroup(Boss_Spell_group1[i],function BossHDLZ___Ability01_Func_04) set Boss_z[1]=Pow(Pow(Boss_Spell_Y[i]-y,2)+Pow(Boss_Spell_X[i]-x,2),.5) if Boss_z[1]>$96 then set Boss_z[1]=RMinBJ(45,Boss_z[1]-$96) else set Boss_z[1]=Boss_z[1]*.1 endif set Boss_x[0]=x+Boss_z[1]*Cos(Boss_z[0]) set Boss_y[0]=y+Boss_z[1]*Sin(Boss_z[0]) call SetUnitX(Boss_Spell_unit1[i],Boss_x[0]) call SetUnitY(Boss_Spell_unit1[i],Boss_y[0]) set Boss_Spell_data3[i]=Boss_Spell_data3[i]+1 if ModuloInteger(Boss_Spell_data3[i],3)==1 then set u=FirstOfGroup(Boss_Spell_group1[i]) call GroupRemoveUnit(Boss_Spell_group1[i],u) call SetUnitX(u,x) call SetUnitY(u,y) call SetUnitTimeScale(u,0) call SetUnitVertexColor(u,$FF,$FF,$FF,$80) set index=Boss_Spell_allocate() set Boss_Spell_unit1[index]=u call TimerStart(NewTimer(index),1,false,function BossHDLZ___Ability01_Func_05) call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl",x,y)) call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl",x,y)) set index=8 loop exitwhen index==0 set index=index-1 call zhv(index,$96,.5) endloop endif if Boss_z[1]<45 then set Boss_Spell_data1[i]=2 call ForGroup(Boss_Spell_group1[i],function BossHDLZ___Ability01_Func_03) call DestroyGroup(Boss_Spell_group1[i]) if UnitAlive(Boss_Spell_unit2[i])then set Boss_Spell_data1[i]=2 call SetUnitAnimation(Boss_Spell_unit1[i],"attack") call TimerStart(GetExpiredTimer(),.75,false,function BossHDLZ___Ability01_Func_02) else set BossHDLZ___Order[Boss_Spell_data2[i]]=0 call SetUnitAnimation(Boss_Spell_unit1[i],"Stand") call SetUnitTimeScale(Boss_Spell_unit1[i],1) call PauseUnit(Boss_Spell_unit1[i],false) call SetUnitInvulnerable(Boss_Spell_unit1[i],false) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:651") endif endif else set BossHDLZ___Order[Boss_Spell_data2[i]]=0 call SetUnitAnimation(Boss_Spell_unit1[i],"Stand") call SetUnitTimeScale(Boss_Spell_unit1[i],1) call PauseUnit(Boss_Spell_unit1[i],false) call SetUnitInvulnerable(Boss_Spell_unit1[i],false) call ForGroup(Boss_Spell_group1[i],function BossHDLZ___Ability01_Func_03) call DestroyGroup(Boss_Spell_group1[i]) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:652") endif call GroupEnumUnitsInRange(G,x,y,$96+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$96)and IsUnitAliveAndEnemyNotAvul(u,Boss_Spell_unit1[i])then call UnitDamageTargetBY(((Boss_Spell_unit1[i])),((u)),(((($7530)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) endif endloop else if not BossHDLZ___Buff1_Add(Boss_Spell_unit2[i],5)then endif set BossHDLZ___Order[Boss_Spell_data2[i]]=0 call SetUnitAnimation(Boss_Spell_unit1[i],"Stand") call SetUnitTimeScale(Boss_Spell_unit1[i],1) call PauseUnit(Boss_Spell_unit1[i],false) call SetUnitInvulnerable(Boss_Spell_unit1[i],false) call Boss_Spell_deallocate(i) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:653") endif endfunction function BossHDLZ___Ability01_Func_01 takes nothing returns nothing local integer EvelId=GetHandleId(GetTriggerEventId()) local integer id=GetUnitUserData(GetTriggerUnit()) local integer i local real x local real y local unit u if EvelId==274 then if BossHDLZ___Order[id]==1 then set BossHDLZ___Order[id]=2 call SetUnitNocontrol(id,false) call SetUnitInvulnerable((Je[(id)]),true) set i=Boss_Spell_allocate() set Boss_Spell_unit1[i]=(Je[(id)]) set Boss_Spell_unit2[i]=GetSpellTargetUnit() set Boss_Spell_group1[i]=CreateGroup() set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=id set Boss_Spell_data3[i]=0 set Boss_Spell_X[i]=GetUnitX(Boss_Spell_unit2[i]) set Boss_Spell_Y[i]=GetUnitY(Boss_Spell_unit2[i]) call TimerStart(NewTimer(i),0,false,function BossHDLZ___Ability01_Func_02) endif elseif EvelId==272 then if BossHDLZ___Order[id]==0 then set BossHDLZ___Order[id]=1 call SetUnitNocontrol(id,true) call NewTextTagInTarget_B((Je[(id)]),"|c00FF8000Stop over there!|r",18,$FF,$FF,$FF) endif else if BossHDLZ___Order[id]==1 then set BossHDLZ___Order[id]=0 call SetUnitNocontrol(id,false) endif endif endfunction function BossHDLZ___BossSkill_A0ZS_Start takes nothing returns nothing local integer data=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer id=Boss_Spell_data1[data] local real x local real y local unit u set Boss_Spell_V[data]=Boss_Spell_V[data]+.2 set Boss_Spell_X[data]=Boss_Spell_X[data]+Cos(Boss_Spell_Z[data])*20 set Boss_Spell_Y[data]=Boss_Spell_Y[data]+Sin(Boss_Spell_Z[data])*20 if Boss_Spell_data3[data]<300 then set Boss_Spell_data3[data]=Boss_Spell_data3[data]+$A endif set x=Boss_Spell_X[data]+Cos(Boss_Spell_V[data])*Boss_Spell_data3[data] set y=Boss_Spell_Y[data]+Sin(Boss_Spell_V[data])*Boss_Spell_data3[data] if IsTerrainPathable(x,y,PATHING_TYPE_WALKABILITY)then set Boss_Spell_data2[data]=0 else set Boss_Spell_data2[data]=Boss_Spell_data2[data]-1 endif call Ltv(LAv("Abilities\\Spells\\Other\\Volcano\\VolcanoDeath.mdl",x,y,1)) call GroupEnumUnitsInRange(G,x,y,$96+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$96)and not IsUnitInGroup(u,Boss_Spell_group1[data])and IsUnitAliveAndEnemyNotAvul(u,(Je[(id)]))then call GroupAddUnit(Boss_Spell_group1[data],u) call UnitDamageTargetBY((((Je[(id)]))),((u)),(((($186A0)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) endif endloop if Boss_Spell_data2[data]==0 then call RecycleGroup(Boss_Spell_group1[data]) call Boss_Spell_deallocate(data) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:654") set Boss_Spell_timer[data]=null set Boss_Spell_group1[data]=null endif endfunction function BossHDLZ___BossSkill_A0ZS_Actions takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) local integer data=Boss_Spell_allocate() local real x=GetUnitX((Je[(id)])) local real y=GetUnitY((Je[(id)])) local real tx=GetSpellTargetX()-x local real ty=GetSpellTargetY()-y local real a=Atan2(ty,tx) set Boss_Spell_timer[data]=NewTimer(data) set Boss_Spell_group1[data]=NewGroup() set Boss_Spell_data1[data]=id set Boss_Spell_data2[data]=$C8 set Boss_Spell_data3[data]=0 set Boss_Spell_X[data]=x set Boss_Spell_Y[data]=y set Boss_Spell_Z[data]=a set Boss_Spell_V[data]=a call TimerStart(Boss_Spell_timer[data],.01,true,function BossHDLZ___BossSkill_A0ZS_Start) endfunction function BossHDLZ___BossSkill_A0ZS_Channel takes nothing returns nothing call NewTextTagInTarget_B(GetTriggerUnit(),"|c00FF0000Purgatory!|r",18,$FF,$FF,$FF) endfunction function BossHDLZ___BossSkill_A0ZR_Start_func002 takes nothing returns nothing local integer data=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:655") local real x=(GetUnitX(II[(Boss_Spell_data1[data])])) local real y=(GetUnitY(II[(Boss_Spell_data1[data])])) local unit u call Ltv(Boss_Spell_data1[data]) call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",x,y)) call GroupEnumUnitsInRange(G,x,y,$C8+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$C8)and IsUnitAliveAndEnemyNotAvul(u,Boss_Spell_unit1[data])then call UnitDamageTargetBY(((Boss_Spell_unit1[data])),((u)),(((($4E20)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) endif endloop call Boss_Spell_deallocate(data) set Boss_Spell_unit1[data]=null endfunction function BossHDLZ___BossSkill_A0ZR_Start_func001 takes nothing returns nothing local integer data=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local real x=(GetUnitX(II[(Boss_Spell_data1[data])]))+Boss_Spell_X[data] local real y=(GetUnitY(II[(Boss_Spell_data1[data])]))+Boss_Spell_Y[data] local real t local real h set Boss_Spell_data2[data]=Boss_Spell_data2[data]+1 set t=Boss_Spell_data2[data]/ Boss_Spell_data3[data] set h=ParabolicBYRatio(Boss_Spell_Z[data],t) call LKv(Boss_Spell_data1[data],x) call Llv(Boss_Spell_data1[data],y) call SetUnitFlyHeight(II[(Boss_Spell_data1[data])],((h)*1.),0) if t>=1 then call TimerStart(Boss_Spell_timer[data],1.3,false,function BossHDLZ___BossSkill_A0ZR_Start_func002) endif endfunction function BossHDLZ___BossSkill_A0ZR_Start takes unit s,real x,real y,real tx,real ty returns nothing local integer data=Boss_Spell_allocate() local real dx=tx-x local real dy=ty-y local real r=SquareRoot(dx*dx+dy*dy) set Boss_Spell_timer[data]=NewTimer(data) set Boss_Spell_unit1[data]=s set Boss_Spell_data1[data]=LAv("Doodads\\Cinematic\\GlowingRunes\\GlowingRunes8.mdl",x,y,1.2) set Boss_Spell_data2[data]=0 set Boss_Spell_data3[data]=R2I(r/ 32+5) set Boss_Spell_X[data]=(dx/ Boss_Spell_data3[data]) set Boss_Spell_Y[data]=(dy/ Boss_Spell_data3[data]) set Boss_Spell_Z[data]=RMaxBJ($96,r*.3) call TimerStart(Boss_Spell_timer[data],.03125,true,function BossHDLZ___BossSkill_A0ZR_Start_func001) endfunction function BossHDLZ___BossSkill_A0ZR_Actions takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) local real x=GetUnitX((Je[(id)])) local real y=GetUnitY((Je[(id)])) local real tx local real ty local real a local real r local integer i=1 local integer j loop exitwhen i>6 set j=i*3+GetRandomInt(2,4) loop exitwhen j==0 set j=j-1 set a=GetRandomReal(0,Lx) set r=i*$C8+GetRandomReal(-100,100) set tx=x+Cos(a)*r set ty=y+Sin(a)*r call BossHDLZ___BossSkill_A0ZR_Start((Je[(id)]),x,y,tx,ty) endloop set i=i+1 endloop endfunction function BossHDLZ___BossSkill_A0ZR_Channel takes nothing returns nothing call NewTextTagInTarget_B(GetTriggerUnit(),"|c00FF0000No one will leave!!|r",18,$FF,$FF,$FF) endfunction function BossHDLZ___BossSkill_A0ZQ_Start takes nothing returns nothing local integer data=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer id=Boss_Spell_data1[data] local real x local real y local unit u if UnitAlive((Je[(id)]))then if Boss_Spell_data2[data]==0 then call SetUnitAnimationByIndex((Je[(id)]),1) endif set x=GetUnitX((Je[(id)]))+Boss_Spell_X[data] set y=GetUnitY((Je[(id)]))+Boss_Spell_Y[data] if IsTerrainPathable(x,y,PATHING_TYPE_WALKABILITY)then set Boss_Spell_bool[data]=true else call SetUnitX((Je[(id)]),x) call SetUnitY((Je[(id)]),y) call Ltv(LAv("knockbackdust.mdl",x,y,1.5)) call GroupEnumUnitsInRange(G,x,y,$C8+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$C8)and IsUnitAliveAndEnemyNotAvul(u,(Je[(id)]))then call UnitDamageTargetBY((((Je[(id)]))),((u)),(((($7530)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) elseif GetUnitTypeId(u)=='uobs' then set Boss_Spell_data2[data]=$F call Ltv(LAv("Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl",GetUnitX(u),GetUnitY(u),2)) call UnitRemoveAbility((Je[(id)]),'B09I') call m2v((Je[(id)]),$A,'A500','B500',true) call KillUnit(u) endif endloop set Boss_Spell_data2[data]=Boss_Spell_data2[data]+1 if Boss_Spell_data2[data]>=$F then call QueueUnitAnimation((Je[(id)]),"Stand") set Boss_Spell_bool[data]=true endif endif else set Boss_Spell_bool[data]=true endif if Boss_Spell_bool[data]then call PauseUnit((Je[(id)]),false) call Boss_Spell_deallocate(data) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:656") set Boss_Spell_timer[data]=null endif endfunction function BossHDLZ___BossSkill_A0ZQ_Actions takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) local integer data=Boss_Spell_allocate() local real x=GetUnitX((Je[(id)])) local real y=GetUnitY((Je[(id)])) local real tx=GetSpellTargetX()-x local real ty=GetSpellTargetY()-y local real a=Atan2(ty,tx) set Boss_Spell_timer[data]=NewTimer(data) set Boss_Spell_data1[data]=id set Boss_Spell_data2[data]=0 set Boss_Spell_bool[data]=false set Boss_Spell_X[data]=Cos(a)*64 set Boss_Spell_Y[data]=Sin(a)*64 call PauseUnit((Je[(id)]),true) call TimerStart(Boss_Spell_timer[data],.03125,true,function BossHDLZ___BossSkill_A0ZQ_Start) endfunction function BossHDLZ___BossSkill_A0ZO_Start takes nothing returns nothing local integer data=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer id=Boss_Spell_data1[data] local integer target=Boss_Spell_data2[data] local unit u if UnitAlive((Je[(id)]))then if UnitAlive((Je[(target)]))and IsUnitInRange((Je[(target)]),(Je[(id)]),$9C4)then call IssueTargetOrderById((Je[(id)]),$D000F,(Je[(target)])) else set u=PickRandomVisibleHeroInRange(BossHDLZ___Unit_A,BossHDLZ___HOJU_X[8],BossHDLZ___HOJU_Y[8],$7D0) if u!=null then call IssueTargetOrderById((Je[(id)]),$D000F,u) set Boss_Spell_data2[data]=(GetUnitUserData((u))) set u=null endif endif else set Boss_Spell_data3[data]=0 endif set Boss_Spell_data3[data]=Boss_Spell_data3[data]-1 if Boss_Spell_data3[data]<=0 then call ModifyUnitAttack(id,-20*$2710) call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0ZP','B09J') call Boss_Spell_deallocate(data) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:657") set Boss_Spell_timer[data]=null set BossSkill_A0ZO_Data[id]=0 endif endfunction function BossHDLZ___BossSkill_A0ZO_Actions takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) local integer data=BossSkill_A0ZO_Data[id] if data==null then set data=Boss_Spell_allocate() set BossSkill_A0ZO_Data[id]=data set Boss_Spell_timer[data]=NewTimer(data) set Boss_Spell_data1[data]=id set Boss_Spell_data2[data]=0 set Boss_Spell_data3[data]=$A call UnitAddAbilityBY((Je[(id)]),'A0ZP') call ModifyUnitAttack(id,20*$2710) endif call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",(Je[(id)]),"origin")) call TimerStart(Boss_Spell_timer[data],1,true,function BossHDLZ___BossSkill_A0ZO_Start) call NewTextTagInTarget_B((Je[(id)]),"|c00FF0000This is a devastating force!|r",18,$FF,$FF,$FF) endfunction function BossHDLZ___n04D_BeDamage takes nothing returns nothing if(DAK_DGTYPE[HF]==DAMAGE_TYPE_MAGIC)and GetUnitAbilityLevel(BossHDLZ___Unit_A,'B09I')>0 then call DamageMinus(GetDamage()*.5) endif endfunction function BossHDLZ___Boss_uobs_Start_001_func001 takes nothing returns nothing local integer b=s__MissileTypeA_Last_Missile local real x=s__barrage_X[b] local real y=s__barrage_Y[b] local unit u call GroupEnumUnitsInRange(G,x,y,$96+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$96)and IsUnitAliveAndEnemyNotAvul(u,s__barrage_atkunit[b])then exitwhen true endif endloop if u!=null then call UnitDamageTargetBY(((s__barrage_atkunit[b])),((u)),((((5000)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) call s__MissileTypeA_stop(b) else if IsTerrainPathable(x,y,PATHING_TYPE_FLYABILITY)then call s__MissileTypeA_stop(b) endif endif set u=null endfunction function Boss_uobs_Start_004 takes nothing returns nothing local integer data=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:658") local integer id=Boss_Spell_data1[data] local real x=Boss_Spell_X[data] local real y=Boss_Spell_Y[data] local unit u call Ltv(LAv("desecrate.mdl",x,y,1.5)) call GroupEnumUnitsInRange(G,x,y,350+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,350)and IsUnitAliveAndEnemyNotAvul(u,(Je[(id)]))and nC[(GetUnitUserData((u)))]then call UnitDamageTargetBY((((Je[(id)]))),((u)),(((($186A0)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) endif endloop call Boss_Spell_deallocate(data) endfunction function Boss_uobs_Start_003 takes nothing returns nothing local integer id=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer data=Boss_uobs_Index[id] local real x local real y local real tx local real ty local real a local real r local unit u if UnitAlive((Je[(id)]))then if data==0 then if GetUnitState((Je[(id)]),UNIT_STATE_MANA)==GetUnitState((Je[(id)]),UNIT_STATE_MAX_MANA)then call SetUnitInvulnerable((Je[(id)]),true) call PauseUnit((Je[(id)]),true) call SetUnitNocontrol(id,true) set data=Boss_Spell_allocate() set Boss_Spell_data1[data]=0 set Boss_Spell_X[data]=0 set Boss_uobs_Index[id]=data endif else if Boss_Spell_data1[data]==0 then set Boss_Spell_X[data]=Boss_Spell_X[data]+.0625 call SetUnitVertexColor((Je[(id)]),$96+R2I(Boss_Spell_X[data]*105),100-R2I(Boss_Spell_X[data]*100),-R2I(Boss_Spell_X[data]*100),$FF) if Boss_Spell_X[data]>=1 then set Boss_Spell_data1[data]=1 set u=PickRandomVisibleHeroInRange((Je[(id)]),BossHDLZ___HOJU_X[8],BossHDLZ___HOJU_Y[8],$7D0) if u!=null then set Boss_Spell_X[data]=GetUnitX(u) set Boss_Spell_Y[data]=GetUnitY(u) set u=null else call KillUnit((Je[(id)])) set Boss_Spell_data1[data]=id call alloc__hPv(GetHandleId((GetExpiredTimer())),(data)) call TimerStart(GetExpiredTimer(),.3,false,function Boss_uobs_Start_004) endif endif elseif Boss_Spell_data1[data]==1 then set x=GetUnitX((Je[(id)])) set y=GetUnitY((Je[(id)])) set tx=Boss_Spell_X[data]-x set ty=Boss_Spell_Y[data]-y if SquareRoot(tx*tx+ty*ty)>64 then set a=GetUnitFacing((Je[(id)]))*bj_DEGTORAD set r=Pow((Cos(Atan2(ty,tx)-a)+1)/ 2,2)*64 set x=x+Cos(a)*r set y=y+Sin(a)*r set tx=Boss_Spell_X[data]-x set ty=Boss_Spell_Y[data]-y set a=Atan2(ty,tx)*bj_RADTODEG call SetUnitX((Je[(id)]),x) call SetUnitY((Je[(id)]),y) call SetUnitFacing((Je[(id)]),a) else call SetUnitX((Je[(id)]),Boss_Spell_X[data]) call SetUnitY((Je[(id)]),Boss_Spell_Y[data]) call KillUnit((Je[(id)])) set Boss_Spell_data1[data]=id call alloc__hPv(GetHandleId((GetExpiredTimer())),(data)) call TimerStart(GetExpiredTimer(),.3,false,function Boss_uobs_Start_004) endif endif endif else if data!=0 then call Boss_Spell_deallocate(data) endif call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:659") endif endfunction function Boss_uobs_Start_002 takes nothing returns nothing local integer id=(alloc__hpv(GetHandleId((GetExpiredTimer())))) if UnitAlive((Je[(id)]))then call SetUnitInvulnerable((Je[(id)]),false) call SetUnitNocontrol(id,false) call SetUnitState((Je[(id)]),UNIT_STATE_MANA,0) call TimerStart(GetExpiredTimer(),.03125,true,function Boss_uobs_Start_003) else call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:660") endif endfunction function Boss_uobs_Start_001 takes nothing returns nothing local integer id=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer i=Boss_uobs_Index[id] local integer b local real x local real y local real tx local real ty local real a local unit u if UnitAlive((Je[(id)]))then if Boss_uobs_Data[i+8]>0 then set Boss_uobs_Data[i+8]=Boss_uobs_Data[i+8]-1 endif if Boss_uobs_Data[i+16]==0 then if GetUnitState((Je[(id)]),UNIT_STATE_MANA)==GetUnitState((Je[(id)]),UNIT_STATE_MAX_MANA)then call SetUnitInvulnerable((Je[(id)]),true) call SetUnitNocontrol(id,true) if IssueImmediateOrderById((Je[(id)]),$D0233)then set Boss_uobs_Index[0]=Boss_uobs_Index[0]-1 set Boss_uobs_Data[i]=0 set Boss_uobs_Index[id]=0 call TimerStart(GetExpiredTimer(),1,false,function Boss_uobs_Start_002) else set Boss_uobs_Data[i+8]=16 set Boss_uobs_Data[i+16]=2 endif else if Boss_uobs_Data[i+8]==0 then if not(Control_use[(id)])then set u=PickRandomVisibleHeroInRange(BossHDLZ___Unit_A,BossHDLZ___HOJU_X[8],BossHDLZ___HOJU_Y[8],$7D0) if u!=null then set x=GetUnitX((Je[(id)])) set y=GetUnitY((Je[(id)])) set tx=GetUnitX(u)+GetRandomReal(-100,100)-x set ty=GetUnitY(u)+GetRandomReal(-100,100)-y set a=Atan2(ty,tx) set b=CreateBarrageTypeD(x,y,125,x+Cos(a)*$FA0,y+Sin(a)*$FA0,0) set s__barrage_atkunit[b]=(Je[(id)]) set s__barrage_speed[b]=$7D0*.03125 set s__MissileTypeA_f3[b]=Condition(function BossHDLZ___Boss_uobs_Start_001_func001) call LMv(s__barrage_model[b],"Abilities\\Weapons\\RedDragonBreath\\RedDragonMissile.mdl") call s__MissileTypeA_fired(b) set Boss_uobs_Data[i+8]=32 set Boss_uobs_Data[i+16]=1 call SetUnitAnimation((Je[(Boss_uobs_Data[i])]),"Attack Spell") set u=null endif endif endif endif elseif Boss_uobs_Data[i+16]==1 then if Boss_uobs_Data[i+8]==0 then set Boss_uobs_Data[i+8]=32 set Boss_uobs_Data[i+16]=0 endif elseif Boss_uobs_Data[i+16]==2 then if Boss_uobs_Data[i+8]==0 then set Boss_uobs_Data[i+8]=16 if IssueImmediateOrderById((Je[(id)]),$D0233)then set Boss_uobs_Index[0]=Boss_uobs_Index[0]-1 set Boss_uobs_Data[i]=0 endif endif endif else set Boss_uobs_Index[0]=Boss_uobs_Index[0]-1 set Boss_uobs_Data[i]=0 call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:661") endif endfunction function Boss_uobs_Create_func001 takes nothing returns nothing local integer id=(alloc__hpv(GetHandleId((GetExpiredTimer())))) call ShowUnit((Je[(id)]),true) call TimerStart(GetExpiredTimer(),.03125,true,function Boss_uobs_Start_001) endfunction function Boss_uobs_Create takes real x,real y,real a returns integer local integer id=(GetUnitUserData((CreateUnit(P[$B],'uobs',x,y,a)))) call SetUnitPosition((Je[(id)]),x,y) call ShowUnit((Je[(id)]),false) call Ltv(LAv("Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl",x,y,2)) call TimerStart(NewTimer(id),.5,false,function Boss_uobs_Create_func001) return id endfunction function BossHDLZ___Start_001_func002 takes nothing returns nothing local integer data=(alloc__hpv(GetHandleId((BossHDLZ___Open_Timer)))) local integer i local real life=GetWidgetLife(BossHDLZ___Unit_A) local real maxlife=GetUnitState(BossHDLZ___Unit_A,UNIT_STATE_MAX_LIFE) local real v=life/ maxlife local real x local real y local real tx local real ty local real a local unit u if Boss_uobs_Index[0]<8 then if Boss_Spell_data1[data]>0 then set Boss_Spell_data1[data]=Boss_Spell_data1[data]-1 endif if Boss_Spell_data1[data]==0 then set Boss_Spell_data1[data]=50*32 set Boss_uobs_Index[0]=Boss_uobs_Index[0]+1 set i=GetRandomInt(0,7) loop exitwhen Boss_uobs_Data[i]==null if i==7 then set i=0 else set i=i+1 endif endloop set Boss_uobs_Data[i]=Boss_uobs_Create(BossHDLZ___HOJU_X[i],BossHDLZ___HOJU_Y[i],bj_RADTODEG*Atan2(BossHDLZ___HOJU_Y[8]-BossHDLZ___HOJU_Y[i],BossHDLZ___HOJU_X[8]-BossHDLZ___HOJU_X[i])) set Boss_uobs_Data[i+16]=0 set Boss_uobs_Data[i+8]=0 set Boss_uobs_Index[Boss_uobs_Data[i]]=i endif endif set i=GetUnitCurrentOrder(BossHDLZ___Unit_A) if i==0 or i==$D0006 or($D000E90 and v<=.9 then call IssueImmediateOrderById(BossHDLZ___Unit_A,$D009F) elseif i>80 and v<=.95 then set u=PickRandomVisibleHeroInRange2(BossHDLZ___Unit_A,$3E8) if u==null then set u=PickRandomUnitInUnitRange(BossHDLZ___Unit_A,$3E8) endif if u!=null then if IssuePointOrderById(BossHDLZ___Unit_A,$D00FA,GetUnitX(u),GetUnitY(u))then endif set u=null endif elseif i>70 and v<=.9 then set u=PickRandomVisibleHeroInRange2(BossHDLZ___Unit_A,$4B0) if u!=null then call IssueImmediateOrderById(BossHDLZ___Unit_A,$D0076) set u=null endif elseif i>65 and v<=.8 then set u=PickRandomVisibleHeroInRange2(BossHDLZ___Unit_A,$3E8) if u==null then set u=PickRandomUnitInUnitRange(BossHDLZ___Unit_A,$3E8) endif if u!=null then if IssuePointOrderById(BossHDLZ___Unit_A,$D009D,GetUnitX(u),GetUnitY(u))then endif set u=null endif elseif i>50 then call IssueImmediateOrderById(BossHDLZ___Unit_A,$D00C4) endif endif endfunction function BossHDLZ___Start_001_func001 takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((BossHDLZ___Open_Timer)))) local real x=BossHDLZ___HOJU_X[8] local real y=BossHDLZ___HOJU_Y[8] local unit u if i>0 then call alloc__hPv(GetHandleId((BossHDLZ___Open_Timer)),(i-1)) call AddSpecialEffectByAnnulus("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",x,y,1.5,$80*i,8) else set i=Boss_Spell_allocate() set Boss_Spell_data1[i]=50*32 set Boss_Spell_data2[i]=0 set Boss_Spell_data3[i]=0 set Boss_Spell_group1[i]=NewGroup() call alloc__hPv(GetHandleId((BossHDLZ___Open_Timer)),(i)) call TimerStart(BossHDLZ___Open_Timer,.03125,true,function BossHDLZ___Start_001_func002) call Ltv(Lfv(LAv("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",x,y,3),$FF,0,0,$FF)) call ShowUnit(BossHDLZ___Unit_A,true) call PauseUnit(BossHDLZ___Unit_A,false) call Lettheactorsplaylines(BossHDLZ___Unit_A,"I do not welcome you here, so I will destroy you!!") endif endfunction function BossHDLZ___Start_001 takes nothing returns nothing local unit u local real x=BossHDLZ___HOJU_X[8] local real y=BossHDLZ___HOJU_Y[8] set BossHDLZ___Unit_A=CreateUnit(P[$B],'n04D',x,y,270) call SetUnitX(BossHDLZ___Unit_A,x) call SetUnitY(BossHDLZ___Unit_A,y) call ShowUnit(BossHDLZ___Unit_A,false) call PauseUnit(BossHDLZ___Unit_A,true) call UnitAddShieldTrig((GetUnitUserData((BossHDLZ___Unit_A))),function BossHDLZ___n04D_BeDamage) call alloc__hPv(GetHandleId((BossHDLZ___Open_Timer)),($A)) call TimerStart(BossHDLZ___Open_Timer,.3,true,function BossHDLZ___Start_001_func001) endfunction function BossHDLZ___End takes nothing returns nothing local integer id local unit u loop set u=FirstOfGroup(BossHDLZ___Open_Group) exitwhen u==null call GroupRemoveUnit(BossHDLZ___Open_Group,u) set id=(GetUnitUserData((u))) call s__Trig_remove(BossHDLZ___Death_Trig[id]) call s__Trig_remove(BossHDLZ___Remove_Trig[id]) endloop call ReleaseTimer(BossHDLZ___Open_Timer,"[TimerUtils]Error:662") endfunction function BossHDLZ___Revive_Trig_Func takes nothing returns nothing local integer id=s__Trig_P local integer i if IsUnitInGroup((Je[(id)]),BossHDLZ___Open_Group)then if Off_A098_id[id]==0 then set BossHDLZ___Open_Count=BossHDLZ___Open_Count+1 set Off_A098[id]=true set Off_A098_id[id]='n01T' set i=GetRandomInt(0,7) call tEv((Je[(id)]),BossHDLZ___HOJU_X[i],BossHDLZ___HOJU_Y[i],0) endif endif call s__Trig_remove(s__Trig_Index) endfunction function BossHDLZ___Death_Trig_Func_001 takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:663") if Off_A098_id[id]!='n01T' then set BossHDLZ___Open_Count=BossHDLZ___Open_Count-1 if BossHDLZ___Open_Count>0 then call ADD_HERO_REVIVE_EVENT(id,function BossHDLZ___Revive_Trig_Func) else call BossHDLZ___End() endif endif endfunction function BossHDLZ___Death_Trig_Func takes nothing returns nothing local integer id=s__Trig_P if Jg then call TimerStart(NewTimer(id),0,false,function BossHDLZ___Death_Trig_Func_001) else set BossHDLZ___Open_Count=BossHDLZ___Open_Count-1 if BossHDLZ___Open_Count==0 then call BossHDLZ___End() endif endif endfunction function BossHDLZ___Remove_Trig_Func takes nothing returns nothing local integer id=le if Off_A098_id[id]=='n01T' then set BossHDLZ___Open_Count=BossHDLZ___Open_Count-1 if BossHDLZ___Open_Count==0 then call BossHDLZ___End() endif endif endfunction function BossHDLZ___Open_Enter_Func_004 takes nothing returns nothing local integer id=(GetUnitUserData((GetEnumUnit()))) if Off_A098_id[id]=='n01T' then set BossHDLZ___Open_Count=BossHDLZ___Open_Count+1 set BossHDLZ___Death_Trig[id]=AddUnitDeathTrigB(id,function BossHDLZ___Death_Trig_Func) set BossHDLZ___Remove_Trig[id]=UnitAddBeRemoveTrigB(id,Condition(function BossHDLZ___Remove_Trig_Func)) endif endfunction function BossHDLZ___Open_Enter_Func_003 takes nothing returns nothing local integer fx=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:664") call TimerDialogDisplay(ConvertVersion(GetHandleId(BossHDLZ___Open_Trig)),false) call DestroyTimerDialog(ConvertVersion(GetHandleId(BossHDLZ___Open_Trig))) call Ltv(fx) call BossHDLZ___Start_001() call ForGroup(BossHDLZ___Open_Group,function BossHDLZ___Open_Enter_Func_004) set BossHDLZ___Open_Trig=null endfunction function BossHDLZ___Open_Enter_Func_002 takes nothing returns nothing local integer i local real x=BossHDLZ___HOJU_X[18] local real y=BossHDLZ___HOJU_Y[18] local unit u local integer id call GroupEnumUnitsInRange(G,x,y,$96,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInGroup(u,BossHDLZ___Open_Group)and UnitAlive(u)then set i=(alloc__hpv(GetHandleId((BossHDLZ___Open_Timer)))) call alloc__hPv(GetHandleId((BossHDLZ___Open_Timer)),(i+1)) set id=(GetUnitUserData((u))) set Off_A098[id]=true set Off_A098_id[id]='n01T' call tEv(u,BossHDLZ___HOJU_X[i],BossHDLZ___HOJU_Y[i],0) endif endloop endfunction function BossHDLZ___Open_Enter_Func_001 takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((BossHDLZ___Open_Timer)))) local timer t if i==0 then call alloc__hPv(GetHandleId((BossHDLZ___Open_Timer)),(i+1)) call TimerStart(BossHDLZ___Open_Timer,2,false,function BossHDLZ___Open_Enter_Func_001) call RemoveDestructable(gg_dest_B00D_11119) call Ltv(LAv("Objects\\Spawnmodels\\Undead\\UCancelDeath\\UCancelDeath.mdl",BossHDLZ___HOJU_X[18],BossHDLZ___HOJU_Y[18],6)) else call alloc__hPv(GetHandleId((BossHDLZ___Open_Timer)),(0)) set t=NewTimer(Lfv(LAv("quietmoon2.mdl",BossHDLZ___HOJU_X[18],BossHDLZ___HOJU_Y[18],18),$FF,0,0,$FF)) set BossHDLZ___Open_Trig=CreateTimerDialog(t) call TimerDialogSetTitle(ConvertVersion(GetHandleId(BossHDLZ___Open_Trig)),"|c00FF0000Time:|r") call TimerDialogDisplay(ConvertVersion(GetHandleId(BossHDLZ___Open_Trig)),true) call TimerStart(t,60,false,function BossHDLZ___Open_Enter_Func_003) call TimerStart(BossHDLZ___Open_Timer,.3125,true,function BossHDLZ___Open_Enter_Func_002) set t=null endif endfunction //summon lord of chaos function BossHDLZ___Open_Enter_Loop takes nothing returns nothing local integer i local real x local real y local unit u local unit array u2 local integer index local boolean b if BossHDLZ___Open_Count>=8 then set i=0 set index=0 loop exitwhen i>7 set x=BossHDLZ___HOJU_X[$A+i] set y=BossHDLZ___HOJU_Y[$A+i] set b=false call GroupEnumUnitsInRange(G,x,y,75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInGroup(u,BossHDLZ___Open_Group)and UnitAlive(u)and IsItemCharges(GetItemOfTypeFromUnit(u,'I04X'),$C)then if not b then set u2[index]=u set b=true else call GroupRemoveUnit(BossHDLZ___Open_Group,u) set BossHDLZ___Open_Count=BossHDLZ___Open_Count-1 endif endif endloop if b then set index=index+1 endif set i=i+1 endloop if index==8 then set BossHDLZ___Open_Count=0 call GroupClear(BossHDLZ___Open_Group) loop exitwhen index==0 set index=index-1 if GetHeroLevel(u2[index])>=380 then call GroupAddUnit(BossHDLZ___Open_Group,u2[index]) endif call RemoveItemByCharges(GetItemOfTypeFromUnit(u2[index],'I04X'),$C) set u2[index]=null endloop call DisplayTimedText("|c00FF0000The red powder|r disappeared and a weird noise came from the tower..",5) call SetDestructableAnimation(gg_dest_B00D_11119,"stand alternate") call QueueDestructableAnimation(gg_dest_B00D_11119,"stand work") call TimerStart(BossHDLZ___Open_Timer,5,false,function BossHDLZ___Open_Enter_Func_001) call DestroyTrigger(BossHDLZ___Open_Trig) call RemoveRegion(BossHDLZ___Open_Region) set BossHDLZ___Open_Trig=null endif loop exitwhen index==0 set index=index-1 set u2[index]=null endloop endif endfunction function BossHDLZ___Open_Enter takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) if nC[id]and not IsUnitInGroup((Je[(id)]),BossHDLZ___Open_Group)then if BossHDLZ___Open_Count==0 then set BossHDLZ___Open_Timer=NewTimer(0) call TimerStart(BossHDLZ___Open_Timer,.5,true,function BossHDLZ___Open_Enter_Loop) endif call GroupAddUnit(BossHDLZ___Open_Group,(Je[(id)])) set BossHDLZ___Open_Count=BossHDLZ___Open_Count+1 endif endfunction function BossHDLZ___Open_Leave takes nothing returns boolean if IsUnitInGroup(GetFilterUnit(),BossHDLZ___Open_Group)then call GroupRemoveUnit(BossHDLZ___Open_Group,GetFilterUnit()) set BossHDLZ___Open_Count=BossHDLZ___Open_Count-1 if BossHDLZ___Open_Count==0 then call ReleaseTimer(BossHDLZ___Open_Timer,"[TimerUtils]Error:665") endif endif return false endfunction function BossHDLZ___onInit takes nothing returns nothing local real x local real y local integer i set BossHDLZ___Unit=gg_unit_h01T_0350 call SetUnitInvulnerable(BossHDLZ___Unit,true) call PauseUnit(BossHDLZ___Unit,true) call ShowUnit(BossHDLZ___Unit,false) call RegisterSpellEffectEvent('A0XM',function BossHDLZ___Ability01_Func_01) call RegisterSpellChannelEvent('A0XM',function BossHDLZ___Ability01_Func_01) call RegisterSpellEndCastEvent('A0XM',function BossHDLZ___Ability01_Func_01) call RegisterSpellEffectEvent('A0XO',function BossHDLZ___Ability02_Func_01) call RegisterSpellChannelEvent('A0XO',function BossHDLZ___Ability02_Func_01) call RegisterSpellEndCastEvent('A0XO',function BossHDLZ___Ability02_Func_01) call RegisterSpellEffectEvent('A0ZO',function BossHDLZ___BossSkill_A0ZO_Actions) call RegisterSpellEffectEvent('A0ZQ',function BossHDLZ___BossSkill_A0ZQ_Actions) call RegisterSpellEffectEvent('A0ZR',function BossHDLZ___BossSkill_A0ZR_Actions) call RegisterSpellChannelEvent('A0ZR',function BossHDLZ___BossSkill_A0ZR_Channel) call RegisterSpellEffectEvent('A0ZS',function BossHDLZ___BossSkill_A0ZS_Actions) call RegisterSpellChannelEvent('A0ZS',function BossHDLZ___BossSkill_A0ZS_Channel) set BossHDLZ___HOJU_X[0]=$5800 set BossHDLZ___HOJU_Y[0]=$C00 set BossHDLZ___HOJU_X[1]=$5800 set BossHDLZ___HOJU_Y[1]=$780 set BossHDLZ___HOJU_X[2]=$5600 set BossHDLZ___HOJU_Y[2]=$E00 set BossHDLZ___HOJU_X[3]=$517C set BossHDLZ___HOJU_Y[3]=$E00 set BossHDLZ___HOJU_X[4]=$4F80 set BossHDLZ___HOJU_Y[4]=$C00 set BossHDLZ___HOJU_X[5]=$4F80 set BossHDLZ___HOJU_Y[5]=$780 set BossHDLZ___HOJU_X[6]=$517C set BossHDLZ___HOJU_Y[6]=$580 set BossHDLZ___HOJU_X[7]=$5600 set BossHDLZ___HOJU_Y[7]=$580 set BossHDLZ___HOJU_X[8]=$53C0 set BossHDLZ___HOJU_Y[8]=$9C0 set BossHDLZ___Open_Region=CreateRegion() set BossHDLZ___Open_Trig=CreateTrigger() set BossHDLZ___Open_Group=NewGroup() set bj_lastCreatedRegion=BossHDLZ___Open_Region set x=GetDestructableX(gg_dest_B00D_11119) set y=GetDestructableY(gg_dest_B00D_11119) set BossHDLZ___HOJU_X[18]=x set BossHDLZ___HOJU_Y[18]=y set i=0 loop exitwhen i>7 set BossHDLZ___HOJU_X[$A+i]=x+Cos(Lx/ 8*i)*360 set BossHDLZ___HOJU_Y[$A+i]=y+Sin(Lx/ 8*i)*360 call CreateDestructable('B00E',BossHDLZ___HOJU_X[$A+i],BossHDLZ___HOJU_Y[$A+i],.0,1,0) call RegisterEnterRect_V(BossHDLZ___HOJU_X[$A+i]-64,BossHDLZ___HOJU_Y[$A+i]-64,BossHDLZ___HOJU_X[$A+i]+64,BossHDLZ___HOJU_Y[$A+i]+64) set i=i+1 endloop call TriggerRegisterLeaveRegion(BossHDLZ___Open_Trig,BossHDLZ___Open_Region,Filter(function BossHDLZ___Open_Leave)) call TriggerRegisterEnterRegion(BossHDLZ___Open_Trig,BossHDLZ___Open_Region,Filter(function RegisterEnterRect_Filter)) call TriggerAddCondition(BossHDLZ___Open_Trig,Filter(function BossHDLZ___Open_Enter)) endfunction function Boss_n035_BuffA0ZU_func takes nothing returns nothing local integer id=(alloc__hpv(GetHandleId((GetExpiredTimer())))) if UnitAlive((Je[(id)]))then set Boss_n035_BuffA0ZU_Count[id]=Boss_n035_BuffA0ZU_Count[id]-1 call UnitDamageTargetBY(((Boss_n035_BuffA0ZU_Source[id])),(((Je[(id)]))),(((($FA0)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($A)*1.))*1.),(("|c00A0FF00"))) else set Boss_n035_BuffA0ZU_Count[id]=0 endif if Boss_n035_BuffA0ZU_Count[id]==0 then call ReleaseTimer(Boss_n035_BuffA0ZU_Timer[id],"[TimerUtils]Error:666") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0ZU','B09K') call Unit_Cancel_Counter($448,id) set Boss_n035_BuffA0ZU_Source[id]=null set Boss_n035_BuffA0ZU_Timer[id]=null endif endfunction function Boss_n035_BuffA0ZU takes unit s,unit u returns nothing local integer id=(GetUnitUserData((u))) if UnitAlive(u)and(Je[(id)])==u then if Boss_n035_BuffA0ZU_Timer[id]==null then set Boss_n035_BuffA0ZU_Timer[id]=NewTimer(id) call UnitAddAbilityBY(u,'A0ZU') call Unit_App_Counter($449,id) call TimerStart(Boss_n035_BuffA0ZU_Timer[id],1,true,function Boss_n035_BuffA0ZU_func) endif set Boss_n035_BuffA0ZU_Count[id]=$A set Boss_n035_BuffA0ZU_Source[id]=s endif endfunction function Boss_n035_Buff002_Expired takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:667") call SetUnitNocontrol(id,false) call UnitRemoveAbilityandBuffBY((Je[(id)]),'A10M','B09L') call Unit_Cancel_Counter($44A,id) set Boss_n035_Buff002_Timer=null endfunction function Boss_n035_Buff002_add takes nothing returns nothing if UnitAlive(Boss_n035_Unit)then if Boss_n035_Buff002_Timer==null then set Boss_n035_Buff002_Timer=NewTimer((GetUnitUserData((Boss_n035_Unit)))) call SetUnitNocontrol((GetUnitUserData((Boss_n035_Unit))),true) call UnitAddAbilityBY(Boss_n035_Unit,'A10M') call Unit_App_Counter($44B,(GetUnitUserData((Boss_n035_Unit)))) endif call TimerStart(Boss_n035_Buff002_Timer,$A,false,function Boss_n035_Buff002_Expired) endif endfunction function Boss_n035_Ability002_Start takes nothing returns nothing local integer data=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local real x local real y local real tx local real ty local real r local unit u if UnitAlive(Boss_Spell_unit2[data])then if Boss_Spell_bool[data]then if UnitAlive(Boss_Spell_unit1[data])then set Boss_Spell_X[data]=GetUnitX(Boss_Spell_unit1[data]) set Boss_Spell_Y[data]=GetUnitY(Boss_Spell_unit1[data]) else set Boss_Spell_bool[data]=false endif endif if GetUnitAbilityLevel(Boss_Spell_unit2[data],'B07A')==0 and GetUnitAbilityLevel(Boss_Spell_unit2[data],'Bfrz')==0 then set x=GetUnitX(Boss_Spell_unit2[data]) set y=GetUnitY(Boss_Spell_unit2[data]) set tx=Boss_Spell_X[data]-x set ty=Boss_Spell_Y[data]-y set r=$A/(SquareRoot(tx*tx+ty*ty)+.1) set x=x+tx*r set y=y+ty*r call SetUnitX(Boss_Spell_unit2[data],x) call SetUnitY(Boss_Spell_unit2[data],y) if r>=.2 then if Boss_Spell_bool[data]then call SetUnitState(Boss_Spell_unit1[data],UNIT_STATE_MANA,GetUnitState(Boss_Spell_unit1[data],UNIT_STATE_MANA)+7) call Ltv(LAv("Abilities\\Spells\\NightElf\\Taunt\\TauntCaster.mdl",Boss_Spell_X[data],Boss_Spell_Y[data],2)) call NewTextTagInTarget_B(Boss_Spell_unit1[data],"|cFF339933Feeling good!|r",$C,$FF,$FF,$FF) call UnitCureTaret(Boss_Spell_unit1[data],Boss_Spell_unit1[data],GetUnitState(Boss_Spell_unit1[data],UNIT_STATE_MAX_LIFE)*.1) call GroupEnumUnitsInRange(G,x,y,$FA+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$FA)and IsUnitAliveAndEnemyNotAvul(u,Boss_Spell_unit1[data])then call UnitDamageTargetBY(((Boss_Spell_unit1[data])),((u)),(((($9C40)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) call Boss_n035_BuffA0ZU(Boss_Spell_unit1[data],u) endif endloop call ExecuteFunc("Boss_n035_Ability006_Start") endif call KillUnit(Boss_Spell_unit2[data]) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:668") call Boss_Spell_deallocate(data) set Boss_Spell_unit1[data]=null set Boss_Spell_unit2[data]=null endif endif else call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:669") call Boss_Spell_deallocate(data) set Boss_Spell_unit1[data]=null set Boss_Spell_unit2[data]=null endif endfunction function Boss_n035_Ability002_Actions takes nothing returns nothing local integer i=0 local unit nmum=null local unit u local real x local real y call GroupEnumUnitsInRect(G,gg_rct_YWZD______________000,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if UnitAlive(u)and GetUnitTypeId(u)=='ufro' then set i=i+1 if GetRandomInt(1,i)==1 then set nmum=u endif endif endloop if nmum!=null then set i=Boss_Spell_allocate() set x=GetUnitX(nmum) set y=GetUnitY(nmum) set Boss_Spell_X[i]=GetUnitX(Boss_n035_Unit) set Boss_Spell_Y[i]=GetUnitY(Boss_n035_Unit) set Boss_Spell_bool[i]=true set Boss_Spell_unit1[i]=Boss_n035_Unit set Boss_Spell_unit2[i]=CreateUnit(P[$B],'unec',x,y,Atan2(Boss_Spell_Y[i]-y,Boss_Spell_X[i]-x)*bj_RADTODEG) call Ltv(LAv("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",x,y,5)) call TimerStart(NewTimer(i),.03125,true,function Boss_n035_Ability002_Start) set nmum=null endif endfunction function Boss_n035_Ability003_Start takes nothing returns nothing local integer data=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local real x=Boss_Spell_X[data] local real y=Boss_Spell_Y[data] local real tx local real ty local real r local real a local integer i local integer j local unit u set i=0 loop exitwhen i>4 set j=0 set a=Boss_Spell_Z[data]+Boss_Spell_V[data]+bj_PI/ 2*i set r=0 loop set j=j+1 exitwhen j>$A set r=r+$C8 set tx=x+Cos(a)*r set ty=y+Sin(a)*r call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\RaiseSkeletonWarrior\\RaiseSkeleton.mdl",tx,ty)) call GroupEnumUnitsInRange(G,tx,ty,100+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,tx,ty,100)and IsUnitAliveAndEnemyNotAvul(u,Boss_Spell_unit1[data])then call UnitDamageTargetBY(((Boss_Spell_unit1[data])),((u)),(((($186A0)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) call Boss_n035_BuffA0ZU(Boss_Spell_unit1[data],u) endif endloop endloop set i=i+1 endloop set Boss_Spell_V[data]=Boss_Spell_V[data]+5*bj_DEGTORAD if Boss_Spell_V[data]>bj_PI/ 2 then call PauseUnit(Boss_n035_Unit,false) call SetUnitInvulnerable(Boss_n035_Unit,false) call SetUnitAnimation(Boss_n035_Unit,"stand") call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:670") call Boss_Spell_deallocate(data) set Boss_Spell_unit1[data]=null endif endfunction function Boss_n035_Ability003_Actions takes nothing returns nothing local integer data=Boss_Spell_allocate() set Boss_Spell_unit1[data]=Boss_n035_Unit set Boss_Spell_X[data]=GetUnitX(Boss_n035_Unit) set Boss_Spell_Y[data]=GetUnitY(Boss_n035_Unit) set Boss_Spell_Z[data]=GetUnitFacing(Boss_n035_Unit)*bj_DEGTORAD set Boss_Spell_V[data]=0 call PauseUnit(Boss_n035_Unit,true) call SetUnitInvulnerable(Boss_n035_Unit,true) call SetUnitAnimation(Boss_n035_Unit,"birth") call GFv_v(Boss_n035_Unit) call TimerStart(NewTimer(data),.1,true,function Boss_n035_Ability003_Start) endfunction function Boss_n035_Ability005_Actions_Func003 takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:671") local real x=GetUnitX((Je[(id)])) local real y=GetUnitY((Je[(id)])) local unit u call GroupEnumUnitsInRange(G,x,y,$96+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$96)and IsUnitAliveAndEnemyNotAvul(u,(Je[(id)]))then call UnitDamageTargetBY((((Je[(id)]))),((u)),(((($C350)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) endif endloop endfunction function Boss_n035_Ability005_Actions_Func002 takes nothing returns nothing local real life=GetWidgetLife((MF)) local real maxlife=GetUnitState((MF),UNIT_STATE_MAX_LIFE) local real v=life/ maxlife if life-GetDamage()>.5 and v<.05 then call SetUnitExploded((MF),true) call KillUnit((MF)) call TimerStart(NewTimer((pF)),0,false,function Boss_n035_Ability005_Actions_Func003) endif endfunction function Boss_n035_Ability005_Actions_Func001 takes nothing returns nothing set Boss_n035_Ability005_Number=Boss_n035_Ability005_Number+1 endfunction function Boss_n035_Ability005_Actions takes nothing returns nothing local real x=GetRandomReal(GetRectMinX(gg_rct_YWZD______________001),GetRectMaxX(gg_rct_YWZD______________001)) local real y=GetRandomReal(GetRectMinY(gg_rct_YWZD______________001),GetRectMaxY(gg_rct_YWZD______________001)) local integer id=(GetUnitUserData((CreateUnit(P[$B],'ndrj',x,y,GetRandomReal(0,360))))) call UnitAddBeRemoveTrig(id,Condition(function Boss_n035_Ability005_Actions_Func001)) call UnitAddBeDamagerTrig(id,function Boss_n035_Ability005_Actions_Func002) call UnitApplyTimedLife((Je[(id)]),'BTLF',0) call Ltv(LAv("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",GetUnitX((Je[(id)])),GetUnitY((Je[(id)])),2)) set Boss_n035_Ability005_Number=Boss_n035_Ability005_Number-1 endfunction function Boss_n035_Ability006_Start_func003 takes nothing returns nothing local integer data=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local real x=(GetUnitX(II[(Boss_Spell_data1[data])])) local real y=(GetUnitY(II[(Boss_Spell_data1[data])])) local real t=Sin(Boss_Spell_V[data])*72*bj_DEGTORAD local real a=Boss_Spell_Z[data]+t local unit u set Boss_Spell_V[data]=Boss_Spell_V[data]+$A*bj_DEGTORAD set x=x+Cos(a)*32 set y=y+Sin(a)*32 call LKv(Boss_Spell_data1[data],x) call Llv(Boss_Spell_data1[data],y) call GroupEnumUnitsInRange(G,x,y,100+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$96)and IsUnitAliveAndEnemyNotAvul(u,Boss_n035_Unit)and IsUnitOfPlayerNotseckill(u)then call KillUnitBJ(u) call DestroyEffect(AddSpecialEffectTarget("desecrategreen.mdl",u,"origin")) endif endloop set Boss_Spell_data2[data]=Boss_Spell_data2[data]-1 if Boss_Spell_data2[data]==0 or IsTerrainPathable(x,y,PATHING_TYPE_WALKABILITY)then call Ltv(Boss_Spell_data1[data]) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:672") call Boss_Spell_deallocate(data) endif endfunction function Boss_n035_Ability006_Start_func002 takes nothing returns nothing local integer v=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer i=0 local integer j=Boss_n035_Ability006_Index local real x=GetUnitX(Boss_n035_Unit) local real y=GetUnitY(Boss_n035_Unit) local real a local real t=Lx/ j local real r if v>32 then set a=Boss_n035_Ability006_Ange+.05+.05*((64-v)/ 32.) set r=300 else if v==32 then call NewTextTagInTarget_B(Boss_n035_Unit,"|c003A9115You are not welcome to roll here!|r",18,$FF,$FF,$FF) endif set a=Boss_n035_Ability006_Ange+.1*((v-8)/ 24.) set r=300*(v/ 32.) endif set Boss_n035_Ability006_Ange=a loop exitwhen i==j call LKv(Boss_n035_Ability006_Vessel[i],x+Cos(a)*r) call Llv(Boss_n035_Ability006_Vessel[i],y+Sin(a)*r) set i=i+1 set a=a+t endloop if v==0 then loop exitwhen i==0 set i=i-1 set a=a-t set j=Boss_Spell_allocate() set Boss_Spell_data1[j]=Boss_n035_Ability006_Vessel[i] set Boss_Spell_data2[j]=$FA set Boss_Spell_X[j]=(GetUnitX(II[(Boss_Spell_data1[j])])) set Boss_Spell_Y[j]=(GetUnitY(II[(Boss_Spell_data1[j])])) set Boss_Spell_Z[j]=a+bj_PI set Boss_Spell_V[j]=-bj_PI/ 2 call TimerStart(NewTimer(j),.01,true,function Boss_n035_Ability006_Start_func003) endloop set Boss_n035_Ability006_Ange=0 set Boss_n035_Ability006_Index=0 call ReleaseTimer(Boss_n035_Ability006_Timer,"[TimerUtils]Error:673") else call alloc__hPv(GetHandleId((GetExpiredTimer())),(v-1)) endif endfunction function Boss_n035_Ability006_Start_func001 takes nothing returns nothing local integer i=0 local integer j=Boss_n035_Ability006_Index local real x=GetUnitX(Boss_n035_Unit) local real y=GetUnitY(Boss_n035_Unit) local real a=Boss_n035_Ability006_Ange+.05 local real t=Lx/ j if UnitAlive(Boss_n035_Unit)then set Boss_n035_Ability006_Ange=a loop exitwhen i==j call LKv(Boss_n035_Ability006_Vessel[i],x+Cos(a)*300) call Llv(Boss_n035_Ability006_Vessel[i],y+Sin(a)*300) set i=i+1 set a=a+t endloop if Boss_n035_Ability006_Open>0 then set Boss_n035_Ability006_Open=Boss_n035_Ability006_Open-1 if Boss_n035_Ability006_Index==$A and Boss_n035_Ability006_Open>0 then call alloc__hPv(GetHandleId((Boss_n035_Ability006_Timer)),(64)) call TimerStart(Boss_n035_Ability006_Timer,.03125,true,function Boss_n035_Ability006_Start_func002) endif endif else loop exitwhen i==j call Ltv(Boss_n035_Ability006_Vessel[i]) set i=i+1 endloop set Boss_n035_Ability006_Ange=0 set Boss_n035_Ability006_Index=0 call ReleaseTimer(Boss_n035_Ability006_Timer,"[TimerUtils]Error:674") endif endfunction function Boss_n035_Ability006_Start takes nothing returns nothing local integer i=0 local integer j=Boss_n035_Ability006_Index local real x=GetUnitX(Boss_n035_Unit) local real y=GetUnitY(Boss_n035_Unit) local real a=Boss_n035_Ability006_Ange local real t=Lx/(j+1) if Boss_n035_Ability006_Index<$A then loop exitwhen i==j call LKv(Boss_n035_Ability006_Vessel[i],x+Cos(a)*300) call Llv(Boss_n035_Ability006_Vessel[i],y+Sin(a)*300) set i=i+1 set a=a+t endloop set Boss_n035_Ability006_Vessel[Boss_n035_Ability006_Index]=LNv("Abilities\\Weapons\\IllidanMissile\\IllidanMissile.mdl",x+Cos(a)*300,y+Sin(a)*300,$96,3) set Boss_n035_Ability006_Index=Boss_n035_Ability006_Index+1 if Boss_n035_Ability006_Index==1 then set Boss_n035_Ability006_Timer=(NewTimer(0)) call TimerStart(Boss_n035_Ability006_Timer,.03125,true,function Boss_n035_Ability006_Start_func001) endif endif endfunction function Boss_n035_AI takes unit s returns nothing local real life=GetWidgetLife(s) local real maxlife=GetUnitState(s,UNIT_STATE_MAX_LIFE) local real v=life/ maxlife local integer orderid=GetUnitCurrentOrder(s) local integer i local unit u local boolean b=true if Boss_n035_Ability003_Number<3 then if v>=Pow(2,Boss_n035_Ability003_Number+1)*.1+.15 then set Boss_n035_Ability003_Number=Boss_n035_Ability003_Number+1 endif endif if orderid==0 or orderid==$D0006 or($D000E0 and v<=Pow(2,Boss_n035_Ability003_Number)*.1 then set Boss_n035_Ability003_Number=Boss_n035_Ability003_Number-1 call Boss_n035_Ability003_Actions() else if i>80 then set u=PickRandomVisibleHeroInRange2(s,$578) if u==null then set u=PickRandomUnitInUnitRange(s,$578) endif if u!=null then set b=IssuePointOrderById(s,$D009D,GetUnitX(u),GetUnitY(u)) set u=null endif endif if b and i>70 and v<=.7 then set u=PickRandomVisibleHeroInRange2(s,$9C4) if u!=null then set b=IssueImmediateOrderById(s,$D0076) set u=null endif endif if b and v<=.95 then set u=PickRandomUnitInUnitRange(s,$5DC) if u!=null then set b=IssueImmediateOrderById(s,$D011D) set u=null endif endif endif endif set Boss_n035_Ability006_Open=320 endfunction function Boss_n035_BeDamager takes nothing returns nothing call Boss_n035_AI((MF)) endfunction function Boss_n035_onAttack takes nothing returns nothing call Boss_n035_AI((mF)) call Boss_n035_BuffA0ZU((mF),(MF)) endfunction function Boss_n035_Loop takes nothing returns nothing if UnitAlive(Boss_n035_Unit)then if GetUnitState(Boss_n035_Unit,UNIT_STATE_MANA)>=$A then call Boss_n035_Ability002_Actions() call SetUnitState(Boss_n035_Unit,UNIT_STATE_MANA,0) endif if Boss_n035_Ability005_Number>0 then set Boss_n035_Ability005_Time=Boss_n035_Ability005_Time+1 if Boss_n035_Ability005_Time>=256 then set Boss_n035_Ability005_Time=0 call Boss_n035_Ability005_Actions() endif endif else call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:675") endif endfunction function Boss_ufro_Ability01_Start takes nothing returns nothing local integer m=s__SoulMissile_Last_Missile local real x=(GetUnitX(II[(s__barrage_model[m])])) local real y=(GetUnitY(II[(s__barrage_model[m])])) local unit u call Ltv(LAv("acid ex.mdl",x,y,3)) call zHv(30,.5,x,y,500) call GroupEnumUnitsInRange(G,x,y,500+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,500)and IsUnitAliveAndEnemyNotAvul(u,Boss_n035_Unit)then call UnitDamageTargetBY(((Boss_n035_Unit)),((u)),((((GetUnitState(u,UNIT_STATE_MAX_LIFE)*.5)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) endif endloop call Boss_n035_Buff002_add() endfunction function Boss_ufro_Ability01_Actions takes integer id returns nothing local real x=GetUnitX((Je[(id)])) local real y=GetUnitY((Je[(id)])) local integer m=CreateBarrageTypeC(x,y,300,Boss_n035_Unit) call LMv(s__barrage_model[m],"Abilities\\Spells\\NightElf\\CorrosiveBreath\\CorrosiveBreathMissile.mdl") call s__SoulMissile_BarrageFiringByA(m,function Boss_ufro_Ability01_Start,((GetUnitFacing(II[(s__barrage_model[m])]))+GetRandomReal(-20,20))*bj_DEGTORAD,GetRandomReal(0,45)*bj_DEGTORAD,$3E8*.03125,0,1.65) call SetUnitState((Je[(id)]),UNIT_STATE_MANA,0) call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Undead\\UDeathSmall\\UDeathSmall.mdl",(Je[(id)]),"origin")) call DestroyEffect(Boss_ufro_Effect[id]) set Boss_ufro_Effect[id]=null endfunction function Boss_ufro_BeDamager takes nothing returns nothing if GetWidgetLife((MF))-GetDamage()<=.5 then call SetUnitInvulnerable((MF),true) call PauseUnit((MF),true) call SetWidgetLife((MF),1) call SetUnitState((MF),UNIT_STATE_MANA,0) set Boss_ufro_Pause[(pF)]=$C8 endif endfunction function Boss_ufro_Loop takes nothing returns nothing local integer i=0 local integer id local real v loop set i=i+1 exitwhen i>3 if UnitAlive(Boss_ufro_Unit[i])then set id=(GetUnitUserData((Boss_ufro_Unit[i]))) if Boss_ufro_Pause[id]>0 then set Boss_ufro_Pause[id]=Boss_ufro_Pause[id]-1 elseif IsUnitPaused(Boss_ufro_Unit[i])then call SetUnitInvulnerable(Boss_ufro_Unit[i],false) call PauseUnit(Boss_ufro_Unit[i],false) call SetWidgetLife(Boss_ufro_Unit[i],GetUnitState(Boss_ufro_Unit[i],UNIT_STATE_MAX_LIFE)) endif if not IsUnitPaused(Boss_ufro_Unit[i])then set v=GetUnitState(Boss_ufro_Unit[i],UNIT_STATE_MANA)+.2 call SetUnitState(Boss_ufro_Unit[i],UNIT_STATE_MANA,v) if v>=100 then if UnitAlive(Boss_n035_Unit)then call Boss_ufro_Ability01_Actions(id) endif elseif v>=50 and Boss_ufro_Effect[id]==null then set Boss_ufro_Effect[id]=AddSpecialEffectTarget("Abilities\\Spells\\Undead\\Unsummon\\UnsummonTarget.mdl",Boss_ufro_Unit[i],"origin") endif endif endif endloop endfunction function Boss_n035_Open_func001 takes nothing returns nothing local integer i=0 set Boss_n035_Open=false call s__Trig_remove(s__Trig_Index) set KF[HF]=PF+1000000. call PauseUnit(Boss_n035_Unit,false) call UnitAddBeDamagerTrig((GetUnitUserData((Boss_n035_Unit))),function Boss_n035_BeDamager) call UnitAddPAttackTrig((GetUnitUserData((Boss_n035_Unit))),function Boss_n035_onAttack) call TimerStart((NewTimer(0)),.5,true,function Boss_n035_Loop) call TimerStart((NewTimer(0)),.1,true,function Boss_ufro_Loop) loop set i=i+1 exitwhen i>3 if UnitAlive(Boss_ufro_Unit[i])then call UnitAddBeDamagerTrig((GetUnitUserData((Boss_ufro_Unit[i]))),function Boss_ufro_BeDamager) endif endloop endfunction function Bossn035___BossSkill_A0ZT_Start takes nothing returns nothing local integer m=s__SoulMissile_Last_Missile local real x=(GetUnitX(II[(s__barrage_model[m])])) local real y=(GetUnitY(II[(s__barrage_model[m])])) local unit u call Ltv(LAv("acid ex.mdl",x,y,3)) call zHv(30,.5,x,y,400) call GroupEnumUnitsInRange(G,x,y,400+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,400)and IsUnitAliveAndEnemyNotAvul(u,s__barrage_atkunit[m])then call UnitDamageTargetBY(((s__barrage_atkunit[m])),((u)),((((GetUnitState(u,UNIT_STATE_MAX_LIFE)*.7)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) call Boss_n035_BuffA0ZU(s__barrage_atkunit[m],u) endif endloop endfunction function Bossn035___BossSkill_A0ZT_Actions takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) local real x=GetUnitX((Je[(id)])) local real y=GetUnitY((Je[(id)])) local real tx=GetSpellTargetX() local real ty=GetSpellTargetY() local real dx=tx-x local real dy=ty-y local real a=Atan2(dy,dx) local integer m=CreateBarrageTypeD(x,y,300,tx,ty,0) call LMv(s__barrage_model[m],GetAbilityEffectById('A0ZT',EFFECT_TYPE_MISSILE,0)) call s__SoulMissile_BarrageFiringByA(m,function Bossn035___BossSkill_A0ZT_Start,a+GetRandomReal(-$A,$A)*bj_DEGTORAD,GetRandomReal(0,$F)*bj_DEGTORAD,$7D0*.03125,$3E8*.03125*.03125,1.65) set s__barrage_atkunit[m]=(Je[(id)]) endfunction function Bossn035___BossSkill_A0ZT_Channel takes nothing returns nothing call NewTextTagInTarget_B(GetTriggerUnit(),"|cFF339933Yoyoyoyoyoyo!|r",18,$FF,$FF,$FF) endfunction function Bossn035___BossSkill_A0ZV_Start takes nothing returns nothing local integer m=s__SoulMissile_Last_Missile call UnitDamageTargetBY(((s__barrage_atkunit[m])),((s__barrage_target[m])),(((($2710)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) call Boss_n035_BuffA0ZU(s__barrage_atkunit[m],s__barrage_target[m]) call DestroyEffect(AddSpecialEffectTarget(GetAbilityEffectById('A0ZV',EFFECT_TYPE_MISSILE,0),s__barrage_target[m],"origin")) endfunction function Bossn035___BossSkill_A0ZV_Actions takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) local real x=GetUnitX((Je[(id)])) local real y=GetUnitY((Je[(id)])) local real tx local real ty local real dx local real dy local real a local integer m local integer i=0 local integer j=0 local integer k=0 local unit u local unit array uv call GroupClear(G2) call GroupClear(G3) call GroupEnumUnitsInRange(G,x,y,$5DC+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$5DC)and IsUnitAliveAndEnemyNotAvul(u,(Je[(id)]))then if nC[(GetUnitUserData((u)))]then set i=i+1 call GroupAddUnit(G2,u) else set j=j+1 call GroupAddUnit(G3,u) endif endif endloop loop set u=FirstOfGroup(G2) exitwhen u==null or k==5 call GroupRemoveUnit(G2,u) set i=i-1 if GetRandomInt(1,i)<=(5-k)then set k=k+1 set uv[k]=u endif endloop loop set u=FirstOfGroup(G3) exitwhen u==null or k==5 call GroupRemoveUnit(G3,u) set j=j-1 if GetRandomInt(1,j)<=(5-k)then set k=k+1 set uv[k]=u endif endloop loop exitwhen k==0 set u=uv[k] set uv[k]=null set k=k-1 set tx=GetUnitX(u) set ty=GetUnitY(u) set dx=tx-x set dy=ty-y set a=Atan2(dy,dx) set m=CreateBarrageTypeC(x,y,500,u) call LMv(s__barrage_model[m],GetAbilityEffectById('A0ZV',EFFECT_TYPE_MISSILE,0)) call SetUnitScale(II[(s__barrage_model[m])],((1.5)*1.),0,0) call s__SoulMissile_BarrageFiringByA(m,function Bossn035___BossSkill_A0ZV_Start,a+GetRandomReal(-$A,$A)*bj_DEGTORAD,GetRandomReal(-$A,$A)*bj_DEGTORAD,$7D0*.03125,0,1.55) set s__barrage_atkunit[m]=(Je[(id)]) endloop endfunction function Bossn035___BossSkill_A10O_Start_A takes nothing returns nothing local integer m=s__SoulMissile_Last_Missile local real x=(GetUnitX(II[(s__barrage_model[m])])) local real y=(GetUnitY(II[(s__barrage_model[m])])) local unit u call Ltv(LAv("desecrategreen.mdl",x,y,.75)) call zHv(30,.5,x,y,$C8) call GroupEnumUnitsInRange(G,x,y,$C8+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$C8)and IsUnitAliveAndEnemyNotAvul(u,s__barrage_atkunit[m])then call UnitDamageTargetBY(((s__barrage_atkunit[m])),((u)),((((GetUnitState(u,UNIT_STATE_MAX_LIFE))*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) call Boss_n035_BuffA0ZU(s__barrage_atkunit[m],u) endif endloop endfunction function Bossn035___BossSkill_A10O_Start_B takes nothing returns nothing local integer m=s__SoulMissile_Last_Missile call UnitCureTaret(s__barrage_atkunit[m],s__barrage_target[m],GetUnitState(s__barrage_target[m],UNIT_STATE_MAX_LIFE)*.05) call DestroyEffect(AddSpecialEffectTarget(GetAbilityEffectById('A10O',EFFECT_TYPE_TARGET,0),s__barrage_target[m],"origin")) endfunction function Bossn035___BossSkill_A10O_Start takes nothing returns nothing local integer data=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer v=Boss_Spell_data1[data] local integer data2 local integer i=Boss_Spell_data2[data] local integer m local real x=GetUnitX(Boss_Spell_unit1[data]) local real y=GetUnitY(Boss_Spell_unit1[data]) local real z=GetUnitFlyHeight(Boss_Spell_unit1[data])+400 local real tx local real ty local real tz local real a local real h local unit u if Boss_Spell_data2[data]<8 then set a=GetRandomReal(0,Lx) set h=GetRandomReal(-Lx/ 8,Lx/ 8) if GetRandomInt(0,1)==0 then set h=bj_PI+h endif set Boss_x[0]=Cos(a) set Boss_y[0]=Sin(a) set Boss_x[1]=Cos(h) set Boss_y[1]=Sin(h) set data2=Boss_Spell_allocate() set Boss_Spell_X[data2]=a set Boss_Spell_Y[data2]=h set Boss_Spell_Z[data2]=GetRandomReal(0,Lx) set Boss_x[2]=Cos(Boss_Spell_Z[data2]) set Boss_y[2]=Sin(Boss_Spell_Z[data2]) set Boss_x[3]=Boss_x[2]*Boss_x[1] set Boss_z[4]=-Boss_x[2]*Boss_y[1] set Boss_x[4]=Boss_x[3]*Boss_x[0]-Boss_y[2]*Boss_y[0] set Boss_y[4]=Boss_y[2]*Boss_x[0]+Boss_x[3]*Boss_y[0] set tx=x+Boss_x[4]*300 set ty=y+Boss_y[4]*300 set tz=z+Boss_z[4]*300 set Boss_Spell_data1[data2]=LNv(GetAbilityEffectById('A10O',EFFECT_TYPE_MISSILE,0),tx,ty,tz,1.5) call SaveInteger(BYHT,v,i,data2) set Boss_Spell_data2[data]=Boss_Spell_data2[data]+1 else set Boss_Spell_data3[data]=Boss_Spell_data3[data]-1 endif loop exitwhen i==0 set i=i-1 set data2=LoadInteger(BYHT,v,i) set Boss_Spell_Z[data2]=Boss_Spell_Z[data2]+5*bj_DEGTORAD set Boss_x[0]=Cos(Boss_Spell_X[data2]) set Boss_y[0]=Sin(Boss_Spell_X[data2]) set Boss_x[1]=Cos(Boss_Spell_Y[data2]) set Boss_y[1]=Sin(Boss_Spell_Y[data2]) set Boss_x[2]=Cos(Boss_Spell_Z[data2]) set Boss_y[2]=Sin(Boss_Spell_Z[data2]) set Boss_x[3]=Boss_x[2]*Boss_x[1] set Boss_z[4]=-Boss_x[2]*Boss_y[1] set Boss_x[4]=Boss_x[3]*Boss_x[0]-Boss_y[2]*Boss_y[0] set Boss_y[4]=Boss_y[2]*Boss_x[0]+Boss_x[3]*Boss_y[0] set tx=x+Boss_x[4]*300 set ty=y+Boss_y[4]*300 set tz=z+Boss_z[4]*300 set Boss_x[0]=tx-(GetUnitX(II[(Boss_Spell_data1[data2])])) set Boss_y[0]=ty-(GetUnitY(II[(Boss_Spell_data1[data2])])) if Boss_Spell_data3[data]==0 then set Boss_z[0]=tz-(GetUnitFlyHeight(II[(Boss_Spell_data1[data2])]))+GetPointZ(Boss_x[0],Boss_y[0]) set u=GroupPickRandomHeroInRange(Boss_Spell_unit1[data],x,y,$9C4,Boss_Spell_group1[data]) if u!=null then set m=CreateBarrageTypeE(Boss_Spell_data1[data2],GetUnitX(u),GetUnitY(u),50) call s__SoulMissile_BarrageFiringByB(m,function Bossn035___BossSkill_A10O_Start_A,Boss_x[0],Boss_y[0],Boss_z[0],$7D0*.03125,0,1.5) call GroupAddUnit(Boss_Spell_group1[data],u) set u=null else set m=CreateBarrageTypeE(Boss_Spell_data1[data2],x,y,50) call s__SoulMissile_BarrageFiringByB(m,function Bossn035___BossSkill_A10O_Start_B,Boss_x[0],Boss_y[0],Boss_z[0],$5DC*.03125,0,1.55) set s__barrage_target[m]=Boss_Spell_unit1[data] endif set s__barrage_atkunit[m]=Boss_Spell_unit1[data] call Boss_Spell_deallocate(data2) endif call LKv(Boss_Spell_data1[data2],tx) call Llv(Boss_Spell_data1[data2],ty) call SetUnitFlyHeight(II[(Boss_Spell_data1[data2])],((tz-GetPointZ(tx,ty))*1.),0) call SetUnitFacing(II[(Boss_Spell_data1[data2])],((Atan2(Boss_y[0],Boss_x[0]))*1.)*bj_RADTODEG) endloop if Boss_Spell_data3[data]==0 then call PauseUnit(Boss_Spell_unit1[data],false) call SetUnitInvulnerable(Boss_Spell_unit1[data],false) call RecycleGroup(Boss_Spell_group1[data]) call Boss_Spell_deallocate(data) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:676") set Boss_Spell_unit1[data]=null endif endfunction function Bossn035___BossSkill_A10O_Actions takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) local integer data=Boss_Spell_allocate() set Boss_Spell_unit1[data]=(Je[(id)]) set Boss_Spell_data1[data]=malloc() set Boss_Spell_data2[data]=0 set Boss_Spell_data3[data]=64 set Boss_Spell_group1[data]=NewGroup() call PauseUnit((Je[(id)]),true) call SetUnitInvulnerable((Je[(id)]),true) call GFv_v((Je[(id)])) call TimerStart(NewTimer(data),.03125,true,function Bossn035___BossSkill_A10O_Start) endfunction function Bossn035___BossSkill_A10N_Start takes nothing returns nothing local integer m=s__SoulMissile_Last_Missile call UnitDamageTargetBY(((s__barrage_atkunit[m])),((s__barrage_target[m])),((((9999)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((0)*1.))*1.),((""))) call m2v(s__barrage_target[m],5,'A500','B500',true) endfunction function Bossn035___BossSkill_A10N_Actions takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) local real x=GetUnitX((Je[(id)])) local real y=GetUnitY((Je[(id)])) local real a=GetUnitFacing((Je[(id)])) local integer m=CreateBarrageTypeC(x,y,120,GetSpellTargetUnit()) call LMv(s__barrage_model[m],"Abilities\\Weapons\\GreenDragonMissile\\GreenDragonMissile.mdl") call s__SoulMissile_BarrageFiringByA(m,function Bossn035___BossSkill_A10N_Start,(a+GetRandomReal(-$F,$F))*bj_DEGTORAD,GetRandomReal($A,25)*bj_DEGTORAD,$3E8*.03125,100*.03125*.03125,1.65) set s__barrage_atkunit[m]=(Je[(id)]) endfunction function Bossn035___onInit takes nothing returns nothing local integer i=0 local integer j=3 local integer k local integer array v local unit t set v[1]=0 set v[2]=50 set v[3]=100 set Boss_n035_Unit=gg_unit_n035_0003 set Boss_ufro_Unit[1]=gg_unit_ufro_1583 set Boss_ufro_Unit[2]=gg_unit_ufro_1584 set Boss_ufro_Unit[3]=gg_unit_ufro_1585 set Boss_ufro_Pause[(GetUnitUserData((Boss_ufro_Unit[1])))]=0 set Boss_ufro_Pause[(GetUnitUserData((Boss_ufro_Unit[2])))]=5*$A set Boss_ufro_Pause[(GetUnitUserData((Boss_ufro_Unit[3])))]=$A*$A call PauseUnit(Boss_n035_Unit,true) loop set i=i+1 exitwhen i>3 set k=GetRandomInt(1,j) call PauseUnit(Boss_ufro_Unit[i],true) call SetUnitInvulnerable(Boss_ufro_Unit[i],true) call SetWidgetLife(Boss_ufro_Unit[i],1) set Boss_ufro_Pause[(GetUnitUserData((Boss_ufro_Unit[i])))]=v[k] set v[k]=v[j] set j=j-1 endloop call UnitAddShieldTrigB((GetUnitUserData((Boss_n035_Unit))),function Boss_n035_Open_func001) call RegisterSpellEffectEvent('A0ZT',function Bossn035___BossSkill_A0ZT_Actions) call RegisterSpellChannelEvent('A0ZT',function Bossn035___BossSkill_A0ZT_Channel) call RegisterSpellEffectEvent('A0ZV',function Bossn035___BossSkill_A0ZV_Actions) call RegisterSpellEffectEvent('A10O',function Bossn035___BossSkill_A10O_Actions) call RegisterSpellEffectEvent('A10N',function Bossn035___BossSkill_A10N_Actions) set t=null endfunction function Equip_Off takes integer id,item i,integer itemid returns nothing local integer h=GetHandleId(i) local integer v=6 if HaveSavedInteger(BYHT2,Item_PickupOrDrop_event,itemid)then set ATv=false set Ahv=id call GameExecuteFunc(ConvertVersion(LoadInteger(BYHT2,Item_PickupOrDrop_event,itemid))) endif call s__suit_activate(id,itemid,false) loop exitwhen v==0 set v=v-1 if HaveSavedInteger(BYHT,Equip_trigSlot_O[v],h)then call s__Trig_remove(((LoadInteger(BYHT,Equip_trigSlot_O[v],h)))) call RemoveSavedInteger(BYHT,Equip_trigSlot_O[v],h) endif endloop endfunction function Equip_On takes integer id,item i,integer itemid returns nothing local integer func local integer v=6 local integer h=GetHandleId(i) loop exitwhen v==0 set v=v-1 if HaveSavedInteger(BYHT,Equip_trigSlot_O[v],itemid)then set func=LoadInteger(BYHT,Equip_trigSlot_O[v],itemid) call SaveInteger(BYHT,Equip_trigSlot_O[v],h,sc___prototype163_evaluate(func,(id),ConvertVersion(LoadInteger(BYHT2,Equip_trigSlot_O[v],itemid)))) endif endloop call s__suit_activate(id,itemid,true) if HaveSavedInteger(BYHT2,Item_PickupOrDrop_event,itemid)then set ATv=true set Ahv=id call GameExecuteFunc(ConvertVersion(LoadInteger(BYHT2,Item_PickupOrDrop_event,itemid))) endif endfunction function s__poison_onInit takes nothing returns nothing set s__poison_R=calloc(6) endfunction function s__poison_end takes integer this returns nothing set s__poison_count[s__poison_targer[this]]=s__poison_count[s__poison_targer[this]]-1 if s__poison_count[s__poison_targer[this]]==0 then call UnitRemoveAbilityandBuffBY((Je[(s__poison_targer[this])]),'A03Y','B01Y') endif call DestroyEffect(s__poison_eff[this]) call RemoveSavedInteger(BYHT,((s__poison_R)+(s__poison_offset[this])),s__poison_targer[this]) call Unit_Cancel_Counter(869,s__poison_which[this]) call Unit_Cancel_Counter(870,s__poison_targer[this]) call s__poison_deallocate(this) set s__poison_eff[this]=null endfunction function s__poison_loop_c takes nothing returns nothing local integer this=(alloc__hpv(GetHandleId((GetExpiredTimer())))) if UnitAlive((Je[(s__poison_targer[this])]))then call UnitDamageTargetBY((((Je[(s__poison_which[this])]))),(((Je[(s__poison_targer[this])]))),((((s__poison_amount[this])*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) set s__poison_maxtimed[this]=s__poison_maxtimed[this]-s__poison_retimed[this] if s__poison_maxtimed[this]$C8 then call DamageMinus($C8) endif endfunction function Magic_dragon_series_D_action takes nothing returns nothing if GetDamage()>300 then call DamageMinus(300) endif endfunction function Lobster_series_A_actiom takes nothing returns nothing if GetRandomInt(1,$A)==1 then call UnitDamageTargetBY((((MF))),(((mF))),((((5*GetHeroState1((MF),true))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((9)*1.))*1.),(("|c00d7b4eb"))) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\FeralSpirit\\feralspirittarget.mdl",(mF),"chest")) else call UnitDamageTargetBY((((MF))),(((mF))),((((.5*GetHeroState1((MF),true))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) call DestroyEffect(AddSpecialEffectTarget("blood damage impact.mdl",(mF),"chest")) endif endfunction function Lobster_series_B_actiom takes nothing returns nothing local unit u local real x local real y local real a if GetRandomInt(1,20)<4 then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",(MF),"origin")) call UnitDamageTargetBY((((mF))),(((MF))),((((600)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) call UnitCureTaret((mF),(mF),600) endif if GetRandomInt(1,$A)<4 then set x=GetUnitX((mF)) set y=GetUnitY((mF)) set a=Atan2(GetUnitY((MF))-y,GetUnitX((MF))-x) set x=x-64*Cos(a) set y=y-64*Sin(a) call GroupEnumUnitsInRange(G,x,y,375,null) call GroupRemoveUnit(G,(MF)) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,300)and IsUnitAliveAndEnemy(u,(mF))then if(Cos(((Atan2(GetUnitY(u)-y,GetUnitX(u)-x))*1.)-((a)*1.))>=Cos(((1.7)*1.)))then call UnitDamageTargetBY(((mF)),(u),(((DAK_AMOUNT[HF]))*1.),false,(false),false,false,(ATTACK_TYPE_HERO),(DAMAGE_TYPE_NORMAL),.0,"") call DestroyEffect(AddSpecialEffectTarget("blood.mdl",u,"chest")) endif endif endloop endif endfunction function Sea_series_A_action takes nothing returns nothing local unit u local real x local real y if GetRandomInt(1,$A)==1 then set x=GetUnitX((MF)) set y=GetUnitY((MF)) call Ltv(LAv("Abilities\\Spells\\Undead\\FreezingBreath\\FreezingBreathMissile.mdl",x,y,2)) call GroupEnumUnitsInRange(G,x,y,$C8+75,null) call GroupRemoveUnit(G,(MF)) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$C8)and IsUnitAliveAndEnemy(u,(mF))then call UnitDamageTargetBY(((mF)),(u),(((DAK_AMOUNT[HF]))*1.),false,(false),false,false,(ATTACK_TYPE_HERO),(DAMAGE_TYPE_NORMAL),.0,"") call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\CrushingWave\\CrushingWaveDamage.mdl",u,"origin")) endif endloop endif endfunction function Hill_series_A_action takes nothing returns nothing if GetRandomInt(1,$A)==1 then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\Impale\\ImpaleHitTarget.mdl",(MF),"origin")) call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Undead\\UndeadDissipate\\UndeadDissipate.mdl",(MF),"origin")) call UnitDamageTargetBY((((mF))),(((MF))),(((($9C4)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endfunction function Corruptor_series_action_enable takes nothing returns nothing set Corruptor_series_Off[(ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:538"))]=false endfunction function Corruptor_series_action_loop takes nothing returns nothing local integer i=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer id=GetHandleId(Boss_Spell_unit1[i]) local integer lv=Boss_Spell_data1[i] local integer j=5 local real sA=Boss_Spell_Z[i]+Boss_Spell_data2[i]*bj_PI/ 6. local real fYv=60*Cos(sA) local real fzv=60*Sin(sA) local real pX local real pY local unit u loop set j=j-1 set pX=Boss_Spell_X[i]+(j+1)*fYv set pY=Boss_Spell_Y[i]+(j+1)*fzv call GroupEnumUnitsInRange(G,pX,pY,96,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,pX,pY,48)then if not IsUnitInGroup(u,Boss_Spell_group1[i])and IsUnitAliveAndEnemy(u,(Je[(id)]))then call GroupAddUnit(Boss_Spell_group1[i],u) call UnitDamageTargetBY((((Je[(id)]))),((u)),((((Boss_Spell_data3[i])*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") if lv==2 then call Auxiliary_TargetOrder(('A0HL'),null,1,$D00B5,u) elseif lv==1 then call Auxiliary_TargetOrder(('A0C6'),null,1,$D00B5,u) elseif lv==3 then call Auxiliary_TargetOrder(('A0VP'),null,1,$D00B5,u) endif endif endif endloop if lv==2 then call Ltv(LAv("Abilities\\Spells\\Demon\\DemonBoltImpact\\DemonBoltImpact.mdl",pX,pY,1.125)) elseif lv==1 then call Ltv(LAv("Abilities\\Spells\\Other\\AcidBomb\\BottleMissile.mdl",pX,pY,1.125)) elseif lv==3 then call Lqv(LAv("ShadowTrap.mdl",pX,pY,1.125),1.25) endif exitwhen j==0 endloop if Boss_Spell_data2[i]>0 then set j=5 set sA=Boss_Spell_Z[i]-Boss_Spell_data2[i]*bj_PI/ 6 set fYv=60*Cos(sA) set fzv=60*Sin(sA) loop set j=j-1 set pX=Boss_Spell_X[i]+(j+1)*fYv set pY=Boss_Spell_Y[i]+(j+1)*fzv call GroupEnumUnitsInRange(G,pX,pY,96,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,pX,pY,48)then if not IsUnitInGroup(u,Boss_Spell_group1[i])and IsUnitAliveAndEnemy(u,(Je[(id)]))then call GroupAddUnit(Boss_Spell_group1[i],u) call UnitDamageTargetBY((((Je[(id)]))),((u)),((((Boss_Spell_data3[i])*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") if lv==2 then call Auxiliary_TargetOrder(('A0HL'),null,1,$D00B5,u) elseif lv==1 then call Auxiliary_TargetOrder(('A0C6'),null,1,$D00B5,u) elseif lv==3 then call Auxiliary_TargetOrder(('A0VP'),null,1,$D00B5,u) endif endif endif endloop if lv==2 then call Ltv(LAv("Abilities\\Spells\\Demon\\DemonBoltImpact\\DemonBoltImpact.mdl",pX,pY,1.125)) elseif lv==1 then call Ltv(LAv("Abilities\\Spells\\Other\\AcidBomb\\BottleMissile.mdl",pX,pY,1.125)) elseif lv==3 then call Lqv(LAv("ShadowTrap.mdl",pX,pY,1.125),1.25) endif exitwhen j==0 endloop endif if Boss_Spell_data2[i]<2 then set Boss_Spell_data2[i]=Boss_Spell_data2[i]+1 else call alloc__hPv(GetHandleId((GetExpiredTimer())),(id)) call TimerStart(GetExpiredTimer(),4.25,false,function Corruptor_series_action_enable) call Unit_Cancel_Counter(875,id) call RecycleGroup(Boss_Spell_group1[i]) call Boss_Spell_deallocate(i) set Boss_Spell_unit1[i]=null set Boss_Spell_group1[i]=null endif endfunction function Corruptor_series_action takes integer u,unit t,integer lv returns nothing local integer i=Boss_Spell_allocate() set Corruptor_series_Off[u]=true set Boss_Spell_unit1[i]=ConvertVersion(u) set Boss_Spell_group1[i]=NewGroup() set Boss_Spell_data1[i]=lv set Boss_Spell_data2[i]=0 set Boss_Spell_X[i]=GetUnitX((Je[(u)])) set Boss_Spell_Y[i]=GetUnitY((Je[(u)])) set Boss_Spell_Z[i]=Atan2(GetUnitY(t)-Boss_Spell_Y[i],GetUnitX(t)-Boss_Spell_X[i]) if lv==2 then set Boss_Spell_data3[i]=20*GetHeroState1((Je[(u)]),true) call DestroyEffect(AddSpecialEffectTarget("Evil Bomb.mdx",t,"origin")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Demon\\DemonBoltImpact\\DemonBoltImpact.mdl",t,"origin")) elseif lv==1 then set Boss_Spell_data3[i]=$F*GetHeroState1((Je[(u)]),true) call DestroyEffect(AddSpecialEffectTarget("CurseBoltGreen.mdl",t,"chest")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\AcidBomb\\BottleMissile.mdl",t,"chest")) elseif lv==3 then set Boss_Spell_data3[i]=R2I(32.5*GetHeroState1((Je[(u)]),true)) call DestroyEffect(AddSpecialEffectTarget("CurseBoltPurple.mdl",t,"chest")) call TimerDestroyAddSpecialEffectTargetBY("DarkLightning.mdl",t,"chest",1.25) endif call UnitDamageTargetBY((((Je[(u)]))),((t)),((((Boss_Spell_data3[i])*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call TimerStart(NewTimer(i),.125,true,function Corruptor_series_action_loop) call Unit_App_Counter(876,u) endfunction function Corruptor_series_v_action takes nothing returns nothing local integer id=(GetUnitUserData(((mF)))) local integer lv=1 if not Corruptor_series_Off[(id)]and GetRandomInt(1,100)<16 then if(LoadBoolean(BYHT,EquipSlot_R[EquipSlot[(id)]],('I0FC')))then set lv=3 elseif(LoadBoolean(BYHT,EquipSlot_R[EquipSlot[(id)]],('I0C9')))then set lv=2 endif call Corruptor_series_action((id),(MF),lv) endif endfunction function LichKing_series_A_action takes nothing returns nothing if GetRandomInt(1,$A)==1 then call pmv((mF),1.5) endif endfunction function DeadOfTheClothes_action takes nothing returns nothing local integer id=(GetUnitUserData(((MF)))) local real life local real damage if GetUnitAbilityLevel((MF),'Bcy2')>0 then call DamageMinus(.95*GetDamage()) elseif Item_I0BS_cd[id]<(100000.-TimerGetRemaining(GameTimer))then set damage=GetDamage() set life=GetWidgetLife((MF)) if life-damage<=.1*GetUnitState((MF),UNIT_STATE_MAX_LIFE)then set Item_I0BS_cd[id]=(100000.-TimerGetRemaining(GameTimer))+90 call DamageMinus(damage-(life-RMaxBJ(.5,life-damage*.05))) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",(MF),"origin")) call Auxiliary_TargetOrder(('A0HD'),null,1,$D006B,(MF)) endif endif endfunction function Aspects_of_a_wind_enable takes nothing returns nothing local integer t=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:539") set Aspects_of_a_wind_off[t]=false call Unit_Cancel_Counter(877,t) endfunction function Aspects_of_a_wind_action takes nothing returns nothing local integer t=(pF) if(mF)!=(MF)and not Aspects_of_a_wind_off[t]and GetWidgetLife((MF))-GetDamage()<=.405 then set Aspects_of_a_wind_off[t]=true if(LoadBoolean(BYHT,EquipSlot_R[EquipSlot[(t)]],('hval')))then call TimerStart(NewTimer(t),90,false,function Aspects_of_a_wind_enable) call SetItemDroppableTimed((ConvertVersion(LoadInteger(BYHT2,EquipSlot_R[EquipSlot[(t)]],('hval')))),90) else call TimerStart(NewTimer(t),45,false,function Aspects_of_a_wind_enable) call SetItemDroppableTimed((ConvertVersion(LoadInteger(BYHT2,EquipSlot_R[EquipSlot[(t)]],('will')))),90) endif call DestroyEffect(AddSpecialEffectTarget("FreezingRing.mdl",(MF),"origin")) call NewTextTagInTarget_B((MF),"|c007387ffBLOCK ("+I2S(R2I(GetDamage()))+")",$A,$FF,$FF,$FF) set KF[HF]=PF+1000000. call Unit_App_Counter(878,t) endif endfunction function HolyRelic_series_removebuff takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:540") if HolyRelic_series_atktrig[id]!=0 then call s__Trig_remove((HolyRelic_series_atktrig[id])) call DestroyEffectBY(HolyRelic_series_eff[id]) set HolyRelic_series_atktrig[id]=0 endif call UnitRemoveAbilityandBuffBY((Je[(id)]),'A06C','B05O') call ModifyUnitMagicDamage((id),-HolyRelic_series_MagicDamage[id]) call ModifyUnitHpRegen((id),-HolyRelic_series_HpRegen[id]) call Unit_Cancel_Counter(879,(id)) set HolyRelic_series_timer[id]=null endfunction function HolyRelic_series_attack_action takes nothing returns nothing local integer id=s__Trig_P2[s__Trig_Index] call TimerDestroyAddSpecialEffectTargetBY("DarkLightning.mdl",(MF),"origin",1) call UnitDamageTargetBY((((mF))),(((MF))),(((((3+1.5*HolyRelic_series_lv[id])*GetHeroState3((MV[GetPlayerId(GetOwningPlayer(Je[((GetUnitUserData(((mF)))))]))]),true))*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((7.5+1.5*HolyRelic_series_lv[id])*1.))*1.),(("|c00bcb3f2"))) call s__Trig_remove((HolyRelic_series_atktrig[id])) call DestroyEffectBY(HolyRelic_series_eff[id]) set HolyRelic_series_atktrig[id]=0 endfunction function HolyRelic_series_addbuff takes unit u,integer lv returns nothing local integer id=(GetUnitUserData((u))) local real mdg local real hpr if HolyRelic_series_lv[id]!=lv then if lv==1 then set mdg=6. set hpr=150. elseif lv==2 then set mdg=7.5 set hpr=200. elseif lv==3 then set mdg=10. set hpr=250. endif if HolyRelic_series_timer[id]==null then set HolyRelic_series_timer[id]=NewTimer(id) set HolyRelic_series_MagicDamage[id]=0 set HolyRelic_series_HpRegen[id]=0 call UnitAddAbilityBY(u,'A06C') call Unit_App_Counter(880,(id)) endif if BNv((id))and HolyRelic_series_atktrig[id]==0 then set HolyRelic_series_atktrig[id]=UnitAddPAttackTrigB((id),function HolyRelic_series_attack_action) set s__Trig_P2[HolyRelic_series_atktrig[id]]=id set HolyRelic_series_eff[id]=(s__Effect_connect(((s__Effect_connect((CreateEffectFor()),(s__Effect_build(AddSpecialEffectTarget((("DarkHands.mdl")),((u)),(("hand right")))))))),(s__Effect_build(AddSpecialEffectTarget((("DarkHands.mdl")),((u)),(("hand left"))))))) endif set HolyRelic_series_lv[id]=lv call ModifyUnitMagicDamage((id),mdg-HolyRelic_series_MagicDamage[id]) call ModifyUnitHpRegen((id),hpr-HolyRelic_series_HpRegen[id]) call TimerStart(HolyRelic_series_timer[id],2+2*lv,false,function HolyRelic_series_removebuff) set HolyRelic_series_MagicDamage[id]=mdg set HolyRelic_series_HpRegen[id]=hpr endif endfunction function HolyRelic_series_action takes nothing returns nothing local integer id=s__Trig_P local unit c=(Je[(id)]) local unit u local integer lv=1 local real x=GetUnitX(c) local real y=GetUnitY(c) if(LoadBoolean(BYHT,EquipSlot_R[EquipSlot[(id)]],('ram4')))then set lv=2 elseif(LoadBoolean(BYHT,EquipSlot_R[EquipSlot[(id)]],('rej5')))then set lv=3 endif call GroupEnumUnitsInRange(G,x,y,450,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,375)and IsUnitAllyNotbag(u,c)then call HolyRelic_series_addbuff(u,lv) endif endloop call Ltv(Lfv(LAv("Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl",x,y,1.25),$FF,25,$FF,$AF)) call Ltv(Lfv(LAv("Epicenter.mdl",x,y,1.25),45,25,$FF,$FF)) set c=null endfunction function Wrath_of_the_thunder_Rage_A_action takes nothing returns nothing local integer fx local real x local real y if GetUnitAbilityLevel((mF),'B01R')>0 then if GetRandomInt(1,3)==1 then set x=GetUnitX((MF)) set y=GetUnitY((MF)) set fx=LAv("LightningWrath.mdl",x,y,1.25) call DestroyEffect(AddSpecialEffectTarget("s_MagicElectricMissile.mdl",(MF),"chest")) call PlaySoundOnUnit_BJ((kn),((100)*1.),((MF))) call UnitDamageTargetBY((((mF))),(((MF))),(((($AFC8+$F*GetHeroState2((mF),true))*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),((DAMAGE_TYPE_MAGIC)),(((($A)*1.))*1.),(("|c00bbc7fb"))) call Ltv(Lfv(LAv("Great Lightning.mdl",x,y,1),$9B,$9B,0,$FF)) call LFv(fx,"Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl") call Ltv(fx) endif elseif GetRandomInt(1,9)==1 then set fx=LAv("LightningWrath.mdl",GetUnitX((MF)),GetUnitY((MF)),.75) call UnitDamageTargetBY((((mF))),(((MF))),(((($3A98+7.5*GetHeroState2((mF),true))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call LFv(fx,"Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl") call Ltv(fx) endif endfunction function Wrath_of_the_thunder_Rage_B_action takes nothing returns nothing if GetRandomInt(1,9)==1 then call Auxiliary_TargetOrder(('A0IL'),null,1,$D0085,(Je[(s__Trig_P)])) endif endfunction function Wrath_of_the_thunder_action takes nothing returns nothing local integer fx if GetRandomInt(1,$A)==1 then set fx=LAv("LightningWrath.mdl",GetUnitX((MF)),GetUnitY((MF)),.75) call UnitDamageTargetBY((((mF))),(((MF))),(((($2EE0+3.5*GetHeroState2((mF),true))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call LFv(fx,"Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl") call Ltv(fx) endif endfunction function Disaster_and_death_enable takes nothing returns nothing set Disaster_and_death_off[ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:541")]=false endfunction function Disaster_and_death_action takes nothing returns nothing local integer id=s__Trig_P local real x=GetUnitX((Je[(id)])) local real y=GetUnitY((Je[(id)])) local real Njv=275*GetHeroStateByMax((Je[(id)])) local unit u local group g if not Disaster_and_death_off[id]then set Disaster_and_death_off[id]=true set g=CreateGroup() call GroupEnumUnitsInRange(g,x,y,600+75.,null) loop set u=FirstOfGroup(g) exitwhen u==null call GroupRemoveUnit(g,u) if IsUnitInRangeXY(u,x,y,600)and IsUnitAliveAndEnemy(u,(Je[(id)]))then call UnitDamageTargetBY((((Je[(id)]))),((u)),((((Njv)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),((DAMAGE_TYPE_MAGIC)),(((($F)*1.))*1.),(("|c0031822f"))) call m1v(u,2.5) endif endloop call DestroyGroup(g) set g=null call TimerStart(NewTimer(id),0,false,function Disaster_and_death_enable) call Ltv(Lbv(LVv('e027',x,y,0),4,.5)) call Ltv(LAv("DesecrateGreen.mdx",x,y,1.75)) call CUv((Kc[(id)]),105,$FF,105,1) call zhv((Kc[(id)]),50,1) endif endfunction function Equip_bzbf_Damaged_enable takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:542") call Unit_Cancel_Counter(881,(id)) set Equip_bzbf_off[id]=false endfunction function Equip_bzbf_Damaged_action takes nothing returns nothing local integer id=(GetUnitUserData(((MF)))) if not Equip_bzbf_off[id]and GetDamage()>0 and GetRandomInt(1,100)<=$A then set Equip_bzbf_off[id]=true call NewTextTagInTarget_B((MF),"ABSORB ("+I2S(R2I(GetDamage()))+")",9,125,125,$FF) call UnitCureTaret(null,(MF),GetDamage()) set KF[HF]=PF+1000000. call DestroyEffect(AddSpecialEffectTarget("Energy_Release.mdl",(MF),"origin")) call TimerStart(NewTimer(id),4,false,function Equip_bzbf_Damaged_enable) call SetItemDroppableTimed((ConvertVersion(LoadInteger(BYHT2,EquipSlot_R[EquipSlot[(id)]],('bzbf')))),4) call Unit_App_Counter(882,(id)) endif endfunction function s__stel_switch takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:543") call Unit_Cancel_Counter(883,(id)) set s__stel_off[id]=false endfunction function s__stel_StatUp takes nothing returns nothing local integer id=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local boolean isoff=(s__stel_timed[id]>=s__stel_timedmax) if not(UnitAlive((Je[(id)]))and(LoadBoolean(BYHT,EquipSlot_R[EquipSlot[(id)]],('stel'))))then set isoff=true endif if isoff then call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:544") call ModifyHeroProperties(id,-100*s__stel_timed[id]) call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0QJ','B068') else set s__stel_timed[id]=s__stel_timed[id]+1 call NewTextTagInTarget_B((Je[(id)]),"|c00bbc9e8+"+I2S(100)+" MAIN STAT",8,$FF,$FF,$FF) call ModifyHeroProperties(id,100) endif endfunction function s__stel_onAttack takes nothing returns nothing local integer id=(GetUnitUserData(((mF)))) if not s__stel_off[id]and GetRandomInt(1,100)<=8 then set s__stel_off[id]=true set s__stel_timed[id]=0 call UnitAddAbilityBY((Je[(id)]),'A0QJ') call UnitCureTaret(null,(Je[(id)]),.4*GetUnitMaxLifeById((id))) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl",(Je[(id)]),"origin")) call TimerStart(NewTimer(id),10./ s__stel_timedmax,true,function s__stel_StatUp) call TimerStart(NewTimer(id),30.,false,function s__stel_switch) call Unit_App_Counter(884,(id)) endif endfunction function s__sor3_onAttack takes nothing returns boolean local integer id=(GetUnitUserData(((mF)))) local integer fx local boolean eSe local real x local real y local real d local unit u set s__sor3_hit_num[id]=ModuloInteger(s__sor3_hit_num[id]+1,s__sor3_hit_num_max) if s__sor3_hit_num[id]==0 then set eSe=GetUnitAbilityLevel((mF),'A0RP')==1 set u=(mF) set x=GetUnitX((MF)) set y=GetUnitY((MF)) set d=40*GetHeroPropertiesByAll((GetUnitUserData(((mF))))) set fx=Lbv(LVv('e00X',x,y,GetUnitFacing((MF))),2.75,1.66) call GroupEnumUnitsInRange(G,x,y,375+75,null) call GroupRemoveUnit(G,u) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,375)then if eSe then if IsUnitAliveAndEnemy(u,(mF))then call DestroyEffect(AddSpecialEffectTarget("CurseBolt.mdl",u,"chest")) call UnitDamageTargetBY((((mF))),((u)),((((3*d)*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($C)*1.))*1.),(("|c00cc3939"))) call m1v(u,1) elseif IsUnitAllyNotbag(u,(mF))then call UnitCureTaret(null,u,$8CA+.45*GetHeroPropertiesByAll((GetUnitUserData(((mF)))))) endif elseif IsUnitAliveAndEnemy(u,(mF))then call UnitDamageTargetBY((((mF))),((u)),((((d)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop if eSe then call zhv((GetPlayerId((GetOwningPlayer((mF))))),30,.25) call UnitCureTaret(null,(mF),4500+.9*GetHeroPropertiesByAll((GetUnitUserData(((mF)))))) call Ltv(LAv("BigBloodEX-NoSplat-NoGutz.mdl",x,y,1.25)) else call zhv((GetPlayerId((GetOwningPlayer((mF))))),$F,.25) call UnitCureTaret(null,(mF),$BB8+.6*GetHeroPropertiesByAll((GetUnitUserData(((mF)))))) call Ltv(Lfv(LAv("AncientExplode.mdl",x,y,1.125),$FF,25,25,$CD)) endif call Ltv(LAv("BloodWave.mdl",x,y,.75)) call Ltv(LAv("BloodSlam.mdl",GetUnitX((mF)),GetUnitY((mF)),.875)) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",(mF),"origin")) call SetUnitAnimationByIndex(II[fx],3) call PlaySoundAtPoint_BJ((cn),(($7F)*1.),((x)*1.),((y)*1.),0) call Lsv(Lfv(fx,$FF,25,25,125),1.5) endif return false endfunction function s__sor3_switch takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:545") call Unit_Cancel_Counter(885,(id)) set s__sor3_off[id]=false endfunction function s__sor3_removebuff takes nothing returns nothing local integer id=(alloc__hpv(GetHandleId((GetExpiredTimer())))) call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0RP','B06Q') call ModifyHeroAgi((id),-500) call ModifyUnitHP((id),-5000) call SetUnitVertexColor((Je[(id)]),$FF,$FF,$FF,$FF) call TimerStart(GetExpiredTimer(),s__sor3_CD-s__sor3_duration,false,function s__sor3_switch) endfunction function s__sor3_onCast takes nothing returns nothing local integer id=s__Trig_P if not s__sor3_off[id]and GetRandomInt(1,9)==1 then set s__sor3_off[id]=true call UnitAddAbilityBY((Je[(id)]),'A0RP') call ModifyHeroAgi((id),500) call ModifyUnitHP((id),5000) call NewTextTagInTarget_B((Je[(id)]),"|c00d66b6b+"+I2S(500)+" AGI +"+I2S(5000)+" HEALTH",10.5,$FF,$FF,$FF) call zKv((Kc[((id))]),$FF,25,25,.27) call SetUnitVertexColor((Je[(id)]),$FF,$CD,$CD,$FF) call DestroyEffect(AddSpecialEffectTarget("BloodEX-Special.mdl",(mF),"origin")) call TimerStart(NewTimer(id),s__sor3_duration,false,function s__sor3_removebuff) call SetItemDroppableTimed((ConvertVersion(LoadInteger(BYHT2,EquipSlot_R[EquipSlot[(id)]],('sor3')))),s__sor3_CD) call Unit_App_Counter(886,(id)) endif endfunction function Equip_I0C6_enable takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:546") set Equip_I0C6_Buff[id]=Equip_I0C6_Buff[id]-$2710 endfunction function Equip_I0C6_removebuff takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:547") local integer i=Equip_I0C6_Buff[id] if(Je[(id)])!=null then call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0EW','B02U') call HeroAddExtraStr((id),-Boss_Spell_data2[i]) endif call Boss_Spell_deallocate(i) call Unit_Cancel_Counter(887,id) set Boss_Spell_timer[i]=null set Equip_I0C6_Buff[id]=0 endfunction function Equip_I0C6_action takes nothing returns nothing local integer id=(GetUnitUserData(((MF)))) local integer i local real nS local unit u local real x local real y local real d local real m if Equip_I0C6_Buff[id]<$2710 then set m=GetUnitMaxLifeById((GetUnitUserData(((MF))))) set d=GetWidgetLife((MF))-GetDamage() if d<.35*m and d>.405 then set i=Equip_I0C6_Buff[id] set nS=.05*GetHeroStrNotExtra((GetUnitUserData(((MF))))) set x=GetUnitX((MF)) set y=GetUnitY((MF)) set d=25*GetHeroState1((MF),true) if i==null then set i=Boss_Spell_allocate() set Equip_I0C6_Buff[id]=i set Boss_Spell_data1[i]=0 set Boss_Spell_data2[i]=0 set Boss_Spell_timer[i]=NewTimer(id) call UnitAddAbilityBY((MF),'A0EW') call Unit_App_Counter(888,id) else set i=i-i/ $2710*$2710 endif set Equip_I0C6_Buff[id]=Equip_I0C6_Buff[id]+$2710 set nS=nS*Pow(1.5,Boss_Spell_data1[i]) call HeroAddExtraStr((id),R2I(nS)-Boss_Spell_data2[i]) set Boss_Spell_data2[i]=R2I(nS) set Boss_Spell_data1[i]=Boss_Spell_data1[i]+1 call SetItemDroppableTimed((ConvertVersion(LoadInteger(BYHT2,EquipSlot_R[EquipSlot[(id)]],('I0C6')))),8) call UnitCureTaret(null,(MF),.14*m) call TimerDestroyAddSpecialEffectTargetBY("MagmaBurst.mdl",(MF),"origin",1.75) call DestroyEffect(AddSpecialEffectTarget("ExplosiveShot.mdl",(MF),"chest")) call TimerStart(NewTimer(id),8,false,function Equip_I0C6_enable) call TimerStart(Boss_Spell_timer[i],$A,false,function Equip_I0C6_removebuff) call GroupEnumUnitsInRange(G,x,y,400,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitAliveAndEnemy(u,(MF))then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Volcano\\VolcanoMissile.mdl",u,"chest")) call UnitDamageTargetBY((((MF))),((u)),((((d)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call UnitAppBuff((GetUnitUserData((u))),'A0HO',$D006B) endif endloop endif endif endfunction function Equip_I0AN_enable takes nothing returns nothing set Equip_I0AN_off[ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:548")]=false endfunction function Equip_I0AN_action takes nothing returns nothing local integer id=(GetUnitUserData(((MF)))) if not Equip_I0AN_off[id]and GetRandomInt(1,$A)==1 then set Equip_I0AN_off[id]=true call NewTextTagInTarget_B((MF),"|c008461cb-"+I2S(R2I(GetDamage())),9,$FF,$FF,$FF) call TimerDestroyAddSpecialEffectTargetBY("DarkShield.mdl",(MF),"origin",1.25) call TimerDestroyAddSpecialEffectTargetBY("Shade Bomb.mdx",(MF),"origin",1.25) call TimerStart(NewTimer(id),6,false,function Equip_I0AN_enable) set KF[HF]=PF+1000000. endif endfunction function Equip_I067_onAttack takes nothing returns nothing local integer id=(GetUnitUserData(((mF)))) local integer fx set Equip_I067_hit_num[id]=Equip_I067_hit_num[id]+1 if Equip_I067_hit_num[id]==8 then set Equip_I067_hit_num[id]=0 set fx=LAv("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl",GetUnitX((MF)),GetUnitY((MF)),1.4) call UnitDamageTargetBY((((mF))),(((MF))),((((1.8*(GetHeroState1((mF),true)+1.5*GetHeroState2((mF),true)))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) call LFv(fx,"Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl") call LFv(fx,"Shiva'sWrath.mdx") call LFv(fx,"Doodads\\Cinematic\\FrostTrapUp\\FrostTrapUp.mdl") call Ltv(Lfv(fx,75,75,$FF,$FF)) endif endfunction function Equip_I081_onAttack takes nothing returns nothing local integer fx if GetRandomInt(1,$A)==1 then set fx=LAv("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",GetUnitX((MF)),GetUnitY((MF)),1.5) call UnitDamageTargetBY((((mF))),(((MF))),(((($2EE0+3.5*GetHeroState1((mF),true))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call LFv(fx,"Abilities\\Spells\\Other\\Incinerate\\FireLordDeathExplode.mdl") call Ltv(fx) endif endfunction function Equip_I097_removebuff takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:549") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A05H','B02G') call HeroAddExtraInt((id),-$FA) call Unit_Cancel_Counter(889,id) set Equip_I097_timer[id]=null endfunction function Equip_I097_onAttack takes nothing returns nothing local integer id if GetRandomInt(1,$A)==1 then set id=(GetUnitUserData(((mF)))) if Equip_I097_timer[id]==null then set Equip_I097_timer[id]=NewTimer(id) call UnitAddAbilityBY((mF),'A05H') call HeroAddExtraInt((id),$FA) call Unit_App_Counter(890,id) endif call TimerStart(Equip_I097_timer[id],6,false,function Equip_I097_removebuff) endif endfunction function Equip_I099_onAttack takes nothing returns nothing if GetRandomInt(1,100)<9 then call TimerDestroyAddSpecialEffectTargetBY("BlizzardEruption.mdl",(MF),"origin",1.5) call Auxiliary_TargetOrder(('A05Q'),null,1,$D00B5,(MF)) endif call UnitDamageTargetBY(((mF)),((MF)),(((DAK_AMOUNT[HF])*.1)*1.),false,false,true,false,DAK_ACTYPE[HF],DAK_DGTYPE[HF],.0,"") call UnitDamageTargetBY(((mF)),((MF)),((400)*1.),false,false,true,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),.0,"") endfunction function Equip_I0D5_onAttack takes nothing returns nothing if GetRandomInt(1,100)<$D then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Demon\\DemonBoltImpact\\DemonBoltImpact.mdl",(MF),"origin")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",(MF),"origin")) call Auxiliary_TargetOrder(('A0MK'),null,1,$D00B5,(MF)) endif endfunction function Equip_I0BR_onAttack takes nothing returns nothing local integer id=(GetUnitUserData(((mF)))) if(100000.-TimerGetRemaining(GameTimer))>Equip_I0BR_cd[id]then set Equip_I0BR_cd[id]=(100000.-TimerGetRemaining(GameTimer))+.75 call UnitCureTaret((mF),(mF),500) call UnitDamageTargetBY(((mF)),((MF)),((500)*1.),false,false,true,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),.0,"") call DestroyEffect(AddSpecialEffectTarget("SmallBloodEX-NoSplat.mdl",(MF),"chest")) endif endfunction function Equip_I0C8_enable takes nothing returns nothing set Equip_I0C8_off[ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:550")]=false endfunction function Equip_I0C8_removebuff takes nothing returns nothing local timer t=GetExpiredTimer() local integer id=(alloc__hpv(GetHandleId((t)))) call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0HF','BNcr') call ModifyUnitAttack((id),-$3A98) call ModifyHeroProperties((id),-900) call ModifyUnitHpRegen((id),-$3E8) call TimerStart(t,9,false,function Equip_I0C8_enable) call Unit_Cancel_Counter(891,id) set t=null endfunction function Equip_I0C8_onAttack takes nothing returns nothing local integer id=(GetUnitUserData(((mF)))) if not Equip_I0C8_off[id]and GetRandomInt(1,20)==1 then set Equip_I0C8_off[id]=true call UnitAddAbilityBY((mF),'A0HF') call ModifyUnitAttack((id),$3A98) call ModifyHeroProperties((id),900) call ModifyUnitHpRegen((id),$3E8) call DestroyEffect(AddSpecialEffectTarget("ShadowAssault.mdl",(mF),"origin")) call TimerStart(NewTimer(id),6,false,function Equip_I0C8_removebuff) call Unit_App_Counter(892,id) endif endfunction function Equip_I0CU_Loop_c takes nothing returns nothing local integer id=(alloc__hpv(GetHandleId((GetExpiredTimer())))) set Equip_I0CU_Timed[id]=Equip_I0CU_Timed[id]-1 call UnitDamageTargetBY((((Je[(Equip_I0CU_Atkunit[id])]))),(((Je[(id)]))),((((5*GetHeroState2((Je[(Equip_I0CU_Atkunit[id])]),true))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") if UnitAlive((Je[(id)]))and Equip_I0CU_Timed[id]>0 then if Equip_I0CU_Timed[id]>4 then set Equip_I0CU_num[id]=Equip_I0CU_num[id]+1 call NewTextTagInTarget_B((Je[(id)]),"-20",9,$FF,105,105) call ModifyUnitArmor((id),-20) endif else call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:551") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0IR','B02W') call ModifyUnitArmor((id),20*Equip_I0CU_num[id]) call Unit_Cancel_Counter(893,Equip_I0CU_Atkunit[id]) call Unit_Cancel_Counter(894,id) endif endfunction function Equip_I0CU_onAttack takes nothing returns nothing local integer id if GetUnitAbilityLevel((MF),'A0IR')==0 and GetRandomInt(1,8)==1 then set id=(GetUnitUserData(((MF)))) set Equip_I0CU_Atkunit[id]=(GetUnitUserData(((mF)))) set Equip_I0CU_Timed[id]=$A set Equip_I0CU_num[id]=0 call UnitAddAbilityBY((MF),'A0IR') call TimerStart(NewTimer(id),1,true,function Equip_I0CU_Loop_c) call Unit_App_Counter(895,Equip_I0CU_Atkunit[id]) call Unit_App_Counter(896,id) endif endfunction function Equip_bspd_onAttack takes nothing returns nothing if GetRandomInt(1,20)<4 then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\FrostArrows\\NagaColdArrowMissile.mdl",(MF),"chest")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl",(MF),"origin")) call DestroyEffect(AddSpecialEffectTarget("BluefireBolt.mdl",(MF),"chest")) call UnitDamageTargetBY((((mF))),(((MF))),((((GetRandomReal(7.5,$A)*GetHeroState2((mF),true))*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($A)*1.))*1.),(("|c007387ff+"))) call UnitAppBuffByLevel((GetUnitUserData(((MF)))),'AUfn',$D0102,2) endif endfunction function Equip_gmfr_onAttack takes nothing returns nothing local real x local real y if GetRandomInt(1,$A)==1 then set x=GetUnitX((MF)) set y=GetUnitY((MF)) call UnitDamageTargetBY((((mF))),(((MF))),(((($3A98+4.5*GetHeroState1((mF),true))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call Ltv(LFv(LAv("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",x,y,1.65),"Abilities\\Spells\\Other\\Incinerate\\FireLordDeathExplode.mdl")) call Lqv(LAv("Objects\\Spawnmodels\\Human\\SmallFlameSpawn\\SmallFlameSpawn.mdl",x,y,1.5),3) endif endfunction function Equip_kysn_onAttack takes nothing returns nothing local integer id=(GetUnitUserData(((mF)))) local integer i local unit u local real x local real y local real a local real fYv local real fzv local real d set Equip_kysn_up[id]=Equip_kysn_up[id]+1 if GetRandomReal(1,100)<2.+.125*Equip_kysn_up[id]then set Equip_kysn_up[id]=0 set i=16 set x=GetUnitX((MF)) set y=GetUnitY((MF)) set d=42*(GetHeroState1((mF),true)+GetHeroState2((mF),true))+7*(DAK_AMOUNT[HF]) if(LoadBoolean(BYHT,EquipSlot_R[EquipSlot[(id)]],('tgxp')))then set d=d*1.2 endif loop set i=i-1 set a=i*Lx/ 16 set fYv=$C8*Cos(a) set fzv=$C8*Sin(a) call Ltv(LAv("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",x+fYv,y+fzv,1.75)) call Ltv(LAv("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",x+2*fYv,y+2*fzv,1.75)) exitwhen i==0 endloop call GroupEnumUnitsInRange(G,x,y,525,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,450)and IsUnitAliveAndEnemy(u,(mF))then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",u,"origin")) call UnitDamageTargetBY((((mF))),((u)),((((d)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v(u,.25) endif endloop call NewTextTagInTarget_B((MF),I2S(R2I(d))+"!",$C,$FF,25,25) call Ltv(LAv("Desecrate.mdl",x,y,1.25)) call zhv((GetPlayerId((GetOwningPlayer((mF))))),40,.5) elseif ModuloInteger(Equip_kysn_up[id],$A)==0 then call NewTextTagInTarget_B((mF),I2S(Equip_kysn_up[id])+" COMBO",9,$FF,55,55) endif endfunction function s__pgin_collision takes integer this,unit u returns boolean if IsUnitAliveAndEnemy(u,s__barrage_atkunit[this])then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\GreenDragonMissile\\GreenDragonMissile.mdl",u,"chest")) call UnitAppBuff((GetUnitUserData((u))),'A0M0',$D006B) call UnitDamageTargetBY(((s__barrage_atkunit[this])),((u)),((((s__pgin_amount[this])*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($C)*1.))*1.),(("|c0080ff80"))) elseif IsUnitAliveAndAlly(u,s__barrage_atkunit[this])then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\GreenDragonMissile\\GreenDragonMissile.mdl",u,"chest")) call UnitCureTaret(s__barrage_atkunit[this],u,.05*GetUnitState(s__barrage_atkunit[this],UNIT_STATE_MAX_LIFE)) endif return false endfunction function s__pgin_ReoveBarrage takes integer this returns nothing call RemoveBarrage(this) endfunction function s__pgin_start takes nothing returns nothing local integer this=s__barrage_FR[s__pgin_launcher] local unit u if this!=s__pgin_launcher then call UseBarrage(s__pgin_launcher) loop exitwhen this==s__pgin_launcher if(s__barrage_outside[(this)])then call RemoveBarrage((this)) elseif(s__barrage_finish[(this)])then call RemoveBarrage((this)) else if s__barrage_CollisionRange[this]!=0 then call GroupEnumUnitsInRange(G,s__barrage_X[this],s__barrage_Y[this],s__barrage_CollisionRange[this]+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,s__barrage_X[this],s__barrage_Y[this],s__barrage_CollisionRange[this])then if not IsUnitInGroup(u,s__barrage_enum_g[this])then call GroupAddUnit(s__barrage_enum_g[this],u) if u!=s__barrage_target[this]and s__pgin_collision(this,u)then set u=null call RemoveBarrage((this)) exitwhen true endif endif endif endloop endif endif set this=s__barrage_FR[this] endloop elseif s__barrage_InOperation[s__pgin_launcher]then set s__barrage_InOperation[s__pgin_launcher]=false call frv(s__pgin_launcher) endif endfunction function s__pgin_FiredBarrage takes integer this returns nothing call s__barrage_Filling((s__pgin_launcher),(this)) if not s__barrage_InOperation[s__pgin_launcher]then set s__barrage_InOperation[s__pgin_launcher]=true call fov(s__pgin_func) endif endfunction function s__pgin_onInit takes nothing returns nothing set s__pgin_func=fxv(function s__pgin_start) set s__pgin_launcher=NewLauncher() endfunction function s__pgin_open takes nothing returns nothing set s__pgin_off[ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:552")]=false endfunction function s__pgin_onAttack takes nothing returns nothing local unit c=(mF) local integer id=(GetUnitUserData((c))) local integer b local real x local real y local real a if not s__pgin_off[id]and GetRandomInt(1,$A)==1 then set s__pgin_off[id]=true set x=GetUnitX(c) set y=GetUnitY(c) set a=Atan2(GetUnitY((MF))-y,GetUnitX((MF))-x) set b=CreateBarrageTypeD(x,y,0,x+600*Cos(a),y+600*Sin(a),0) call LMv(s__barrage_model[b],"ShockwaveMissile.mdl") call SetUnitScale(II[(s__barrage_model[b])],((1.5)*1.),0,0) set s__barrage_atkunit[b]=c set s__barrage_speed[b]=.03125*375. set s__barrage_acceleration[b]=.03125*.03125*750. set s__barrage_CollisionRange[b]=225. set s__pgin_amount[b]=35*GetHeroState1(c,true) call Ltv(LAv("NatureExplosion.mdx",x,y,.75)) call TimerStart(NewTimer(id),6,false,function s__pgin_open) call Lfv(s__barrage_model[b],0,$CD,55,$FF) call s__pgin_FiredBarrage(b) endif set c=null endfunction function Equip_pmna_onAttack takes nothing returns nothing local unit u local real x local real y local real a if GetRandomInt(1,4)==1 then set x=GetUnitX((mF)) set y=GetUnitY((mF)) set a=Atan2(GetUnitY((MF))-y,GetUnitX((MF))-x) set x=x-64*Cos(a) set y=y-64*Sin(a) call GroupEnumUnitsInRange(G,x,y,325,null) call GroupRemoveUnit(G,(MF)) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitAliveAndEnemy(u,(mF))and(Cos(((Atan2(GetUnitY(u)-y,GetUnitX(u)-x))*1.)-((a)*1.))>=Cos(((1.7)*1.)))then call DestroyEffect(AddSpecialEffectTarget("blood.mdl",u,"origin")) call UnitDamageTargetBY(((mF)),(u),(((DAK_AMOUNT[HF]))*1.),false,(false),false,false,(ATTACK_TYPE_HERO),(DAMAGE_TYPE_NORMAL),.0,"") endif endloop endif endfunction function Equip_prvt_onAttack takes nothing returns nothing call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\FrostArrows\\NagaColdArrowMissile.mdl",(MF),"chest")) call UnitDamageTargetBY((((mF))),(((MF))),((((GetRandomInt(800,$5DC))*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((8)*1.))*1.),(("|c007387ff+"))) call UnitAppBuff((GetUnitUserData(((MF)))),'AUfn',$D0102) endfunction function Equip_ratc_onAttack takes nothing returns nothing if GetRandomInt(1,100)<$E then call DestroyEffect(AddSpecialEffectTarget("OrbOfCorruption.mdl",(MF),"chest")) call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Undead\\UndeadDissipate\\UndeadDissipate.mdl",(MF),"origin")) call Ltv(LAv("ShadowSlam.mdl",GetUnitX((MF)),GetUnitY((MF)),.625)) call Lqv(LAv("DarkLightning.mdl",GetUnitX((MF)),GetUnitY((MF)),1.75),1) call UnitDamageTargetBY((((mF))),(((MF))),((((35*GetHeroPropertiesByAll((GetUnitUserData(((mF))))))*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),((DAMAGE_TYPE_MAGIC)),(((($C)*1.))*1.),(("|c00800080"))) endif endfunction function Equip_rin1_onAttack takes nothing returns nothing local unit u local real x local real y local real d if GetRandomInt(1,100)<9 then set x=GetUnitX((MF)) set y=GetUnitY((MF)) set d=$A*GetHeroState2((mF),true) call Ltv(Lfv(LAv("Acid Ex.mdl",x,y,1.5),$FF,$FF,$FF,$CD)) call Ltv(Lfv(LAv("AncientExplode.mdl",x,y,.75),55,$FF,55,$CD)) call UnitDamageTargetBY((((mF))),(((MF))),((((1.5*d)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\AcidBomb\\BottleMissile.mdl",(MF),"chest")) call GroupEnumUnitsInRange(G,x,y,325,null) call GroupRemoveUnit(G,(MF)) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$FA)and IsUnitAliveAndEnemy(u,(mF))then call UnitDamageTargetBY((((mF))),((u)),((((d)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\AcidBomb\\BottleMissile.mdl",u,"chest")) endif endloop endif endfunction function Equip_rhth_onAttack takes nothing returns nothing if GetRandomInt(1,100)<$E then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\FrostWyrmMissile\\FrostWyrmMissile.mdl",(MF),"chest")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\FrostBolt\\FrostBoltMissile.mdl",(MF),"origin")) call LQv(LAv("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl",GetUnitX((MF)),GetUnitY((MF)),1.25),1.5) call UnitDamageTargetBY((((mF))),(((MF))),(((($C*GetHeroState1((mF),true))*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),((DAMAGE_TYPE_MAGIC)),(((($B)*1.))*1.),(("|c006c93ec"))) call UnitAppBuff((GetUnitUserData(((MF)))),'A0KP',$D006B) endif endfunction function Equip_I0D6_onAttack takes nothing returns nothing if GetRandomInt(1,100)<$E then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\FrostWyrmMissile\\FrostWyrmMissile.mdl",(MF),"chest")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\FrostBolt\\FrostBoltMissile.mdl",(MF),"origin")) call LQv(LAv("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl",GetUnitX((MF)),GetUnitY((MF)),1.25),1.5) call UnitDamageTargetBY((((mF))),(((MF))),(((($C*GetHeroState2((mF),true))*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),((DAMAGE_TYPE_MAGIC)),(((($B)*1.))*1.),(("|c006c93ec"))) call UnitAppBuff((GetUnitUserData(((MF)))),'A0KP',$D006B) endif endfunction function Equip_sbok_enable takes nothing returns nothing set Equip_sbok_off[ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:553")]=false endfunction function Equip_sbok_removebuff takes nothing returns nothing local timer t=GetExpiredTimer() local integer id=(alloc__hpv(GetHandleId((t)))) call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0MH','B04P') call ModifyUnitAttack((id),-$6B6C) call ModifyHeroProperties((id),-825) call ModifyUnitCrit((id),-100) call TimerStart(t,6,false,function Equip_sbok_enable) call Unit_Cancel_Counter(897,id) set t=null endfunction function Equip_sbok_onAttack takes nothing returns nothing local integer id=(GetUnitUserData(((mF)))) if not Equip_sbok_off[id]and GetRandomInt(1,$F)==1 then set Equip_sbok_off[id]=true call UnitAddAbilityBY((mF),'A0MH') call ModifyUnitAttack((id),$6B6C) call ModifyHeroProperties((id),825) call ModifyUnitCrit((id),100) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl",(mF),"origin")) call TimerStart(NewTimer(id),4,false,function Equip_sbok_removebuff) call Unit_App_Counter(898,id) endif endfunction function Equip_sehr_buff_remove takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:554") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0P2','B05J') call ModifyUnitAttack((id),-$4E2*Equip_sehr_buff_num[id]) set Equip_sehr_timer[id]=null set Equip_sehr_buff_num[id]=0 call Unit_Cancel_Counter(899,id) endfunction function Equip_sehr_onAttack takes nothing returns nothing local integer id local real x local real y if GetRandomInt(1,$A)==1 then set id=(GetUnitUserData(((mF)))) set x=GetUnitX((MF)) set y=GetUnitY((MF)) if Equip_sehr_timer[id]==null then set Equip_sehr_timer[id]=NewTimer(id) call UnitAddAbilityBY((mF),'A0P2') call Unit_App_Counter(900,id) endif if Equip_sehr_buff_num[id]<8 then set Equip_sehr_buff_num[id]=Equip_sehr_buff_num[id]+1 call NewTextTagInTarget_B((mF),"+1250 DAMAGE",8,$FF,125,125) call ModifyUnitAttack((id),$4E2) endif call DestroyEffect(AddSpecialEffectTarget("OrbOfFire.mdl",(MF),"chest")) call UnitDamageTargetBY((((mF))),(((MF))),(((((DAK_AMOUNT[HF])+6*GetHeroState1((mF),true))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call Ltv(LFv(LAv("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",x,y,1.8),"Abilities\\Spells\\Other\\Incinerate\\FireLordDeathExplode.mdl")) call Lqv(LAv("Objects\\Spawnmodels\\Human\\SmallFlameSpawn\\SmallFlameSpawn.mdl",x,y,2.25),3) call Lqv(LAv("Flame Cyclone.mdl",x,y,1.75),1.25) call TimerStart(Equip_sehr_timer[id],8,false,function Equip_sehr_buff_remove) endif endfunction function Equip_shcw_onAttack takes nothing returns nothing if GetRandomInt(1,50)==1 then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\FireBallMissile\\FireBallMissile.mdl",(MF),"chest")) call UnitDamageTargetBY((((mF))),(((MF))),((((50*GetHeroState1((mF),true))*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($D)*1.))*1.),(("|c00dc6565"))) call Ltv(LAv("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",GetUnitX((MF)),GetUnitY((MF)),1.5)) call Lqv(LAv("MagmaBurst.mdl",GetUnitX((MF)),GetUnitY((MF)),.875),1.25) call zhv((GetPlayerId((GetOwningPlayer((mF))))),30,.4) endif endfunction function Equip_skrt_enable takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:555") set Equip_skrt_off[id]=false call Unit_Cancel_Counter(901,id) endfunction function Equip_skrt_attacktarget takes unit s,unit t returns nothing local integer id=(GetUnitUserData((s))) local integer b local integer i local real sX local real sY local real sA local real a if not Equip_skrt_off[id]and GetRandomInt(1,$C)==1 then set Equip_skrt_off[id]=true set i=5 set sX=GetUnitX(s) set sY=GetUnitY(s) set sA=Atan2(GetUnitY(t)-sY,GetUnitX(t)-sX) loop set i=i-1 set a=sA+(i-2.)*Lx/ 9. set b=CreateBarrageTypeC(sX-$C8*Cos(a),sY-$C8*Sin(a),100,t) set s__barrage_atkunit[b]=s call LMv(s__barrage_model[b],"Abilities\\Spells\\Other\\FrostBolt\\FrostBoltMissile.mdl") set s__barrage_speed[b]=.03125*(500+$FA*i) set s__barrage_acceleration[b]=.03125*.03125*$5DC set s__FrostBarrage_damage[b]=GetRandomReal(4,6)*GetHeroState2(s,true) call s__FrostBarrage_Fired(b) exitwhen i==0 endloop call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl",s,"origin")) call TimerStart(NewTimer(id),6,false,function Equip_skrt_enable) call Unit_App_Counter(902,id) endif endfunction function Equip_skrt_onAttack takes nothing returns nothing call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\FrostArrows\\NagaColdArrowMissile.mdl",(MF),"chest")) call UnitDamageTargetBY((((mF))),(((MF))),((((GetRandomReal(.75,1.25)*GetHeroState2((mF),true))*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((8)*1.))*1.),(("|c007387ff+"))) call UnitAppBuff((GetUnitUserData(((MF)))),'AUfn',$D0102) call Equip_skrt_attacktarget((mF),(MF)) endfunction function Equip_sor9_onAttack takes nothing returns nothing if GetRandomInt(1,100)<=$A then call DestroyEffect(AddSpecialEffectTarget("Soulfire Missile.mdl",(MF),"chest")) call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Undead\\UndeadDissipate\\UndeadDissipate.mdl",(MF),"origin")) call Ltv(LAv("ShadowAssault.mdl",GetUnitX((MF)),GetUnitY((MF)),2.25)) call Ltv(LAv("DoomBlack.mdl",GetUnitX((MF)),GetUnitY((MF)),2.25)) call UnitDamageTargetBY((((mF))),(((MF))),((((50*GetHeroPropertiesByAll((GetUnitUserData(((mF))))))*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),((DAMAGE_TYPE_MAGIC)),(((($E)*1.))*1.),(("|c006c78a2"))) endif endfunction function s__IceStorm_move takes integer this returns boolean local integer i=4 local integer fx local real a set s__IceStorm_num[this]=s__IceStorm_num[this]+1 loop set i=i-1 set a=(i/ 4.+s__IceStorm_num[this]/ 20.)*Lx set fx=LoadInteger(BYHT,s__IceStorm_vessel[this],i) call LKv(fx,s__barrage_X[this]+137.5*Cos(a)) call Llv(fx,s__barrage_Y[this]+137.5*Sin(a)) call SetUnitFacing(II[(fx)],((a+.25*Lx)*1.)*bj_RADTODEG) exitwhen i==0 endloop if ModuloInteger(s__IceStorm_num[this],2)==0 then set fx=BRv(s__barrage_X[this],s__barrage_Y[this],s__barrage_Z[this],0,350,GetRandomReal(0,Lx),$4E2,500,GetRandomReal(.25,.5)) call LMv(fx,"Abilities\\Weapons\\ZigguratFrostMissile\\ZigguratFrostMissile.mdl") call SetUnitScale(II[(fx)],((2)*1.),0,0) if ModuloInteger(s__IceStorm_num[this],6)==0 then call Ltv(LAv("Abilities\\Weapons\\FrostWyrmMissile\\FrostWyrmMissile.mdl",s__barrage_X[this],s__barrage_Y[this],3)) endif endif return false endfunction function s__IceStorm_impact takes integer this,unit u returns boolean if IsUnitAliveAndEnemy(u,s__barrage_atkunit[this])then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl",u,"origin")) call UnitDamageTargetBY(((s__barrage_atkunit[this])),((u)),((((s__IceStorm_damage[this])*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((18)*1.))*1.),(("|c007387ff"))) call UnitAppBuff((GetUnitUserData((u))),'AUfn',$D0102) endif return false endfunction function s__IceStorm_remove takes integer this returns nothing local integer i=4 loop set i=i-1 call Ltv((LoadInteger(BYHT,s__IceStorm_vessel[this],i))) exitwhen i==0 endloop call free(s__IceStorm_vessel[this]) call RemoveBarrage(this) endfunction function s__IceStorm_stop takes nothing returns nothing call frv(s__IceStorm_func) endfunction function s__IceStorm_start takes nothing returns nothing call fov(s__IceStorm_func) endfunction function s__IceStorm_loop_c takes nothing returns boolean local integer this=s__barrage_FR[s__IceStorm_launcher] local unit u if this!=s__IceStorm_launcher then call UseBarrage(s__IceStorm_launcher) loop exitwhen this==s__IceStorm_launcher if(s__barrage_outside[(this)])or(s__barrage_finish[(this)])then call s__IceStorm_remove(this) else if s__IceStorm_move(this)then call s__IceStorm_remove(this) endif if s__barrage_CollisionRange[this]!=0 then call GroupEnumUnitsInRange(G,s__barrage_X[this],s__barrage_Y[this],s__barrage_CollisionRange[this]+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,s__barrage_X[this],s__barrage_Y[this],s__barrage_CollisionRange[this])then if not IsUnitInGroup(u,s__barrage_enum_g[this])then call GroupAddUnit(s__barrage_enum_g[this],u) if u!=s__barrage_target[this]and s__IceStorm_impact(this,u)then set u=null call s__IceStorm_remove(this) exitwhen true endif endif endif endloop endif endif set this=s__barrage_FR[this] endloop elseif s__barrage_InOperation[s__IceStorm_launcher]then set s__barrage_InOperation[s__IceStorm_launcher]=false call frv(s__IceStorm_func) endif return false endfunction function s__IceStorm_Fired takes integer this returns nothing if s__IceStorm_launcher==null then set s__IceStorm_func=fxv(function s__IceStorm_loop_c) set s__IceStorm_launcher=NewLauncher() endif if not s__barrage_InOperation[s__IceStorm_launcher]then set s__barrage_InOperation[s__IceStorm_launcher]=true call fov(s__IceStorm_func) endif call s__barrage_Filling((s__IceStorm_launcher),(this)) endfunction function Equip_tkno_enable takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:556") set s__IceStorm_off[id]=false call Unit_Cancel_Counter(903,id) endfunction function Equip_tkno_atk takes unit s,unit t returns nothing local integer id=(GetUnitUserData((s))) local integer this local integer fx local integer i local real sX local real sY local real a if not s__IceStorm_off[id]and GetRandomInt(1,$F)==1 then set s__IceStorm_off[id]=true set i=4 set sX=GetUnitX(s) set sY=GetUnitY(s) set a=Atan2(GetUnitY(t)-sY,GetUnitX(t)-sX) set sX=sX+75*Cos(a) set sY=sY+75*Sin(a) set this=CreateBarrageTypeD(sX,sY,0,sX+900*Cos(a),sY+900*Sin(a),0) set s__barrage_atkunit[this]=s call LMv(s__barrage_model[this],"Abilities\\Spells\\Other\\Tornado\\TornadoElemental.mdl") set s__barrage_speed[this]=.03125*750 set s__barrage_acceleration[this]=.03125*.03125*$3E8 call SetUnitScale(II[(s__barrage_model[this])],((1.5)*1.),0,0) set s__barrage_CollisionRange[this]=$FA set s__IceStorm_vessel[this]=malloc() set s__IceStorm_num[this]=0 set s__IceStorm_damage[this]=GetRandomReal(40,60)*GetHeroState2(s,true) loop set i=i-1 set a=Lx*i/ 4. set fx=Lnv(sX+137.5*Cos(a),sY+137.5*Sin(a),a+.25*Lx) call LMv(fx,"Abilities\\Weapons\\FrostWyrmMissile\\FrostWyrmMissile.mdl") call SetUnitFlyHeight(II[(fx)],((25)*1.),0) call SaveInteger(BYHT,s__IceStorm_vessel[this],i,fx) exitwhen i==0 endloop call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl",s,"origin")) call TimerStart(NewTimer(id),9,false,function Equip_tkno_enable) call Lfv(s__barrage_model[this],95,95,$FF,$FF) call s__IceStorm_Fired(this) call Unit_App_Counter(904,id) endif endfunction function Equip_tkno_onAttack takes nothing returns nothing call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\FrostArrows\\NagaColdArrowMissile.mdl",(MF),"chest")) call UnitDamageTargetBY((((mF))),(((MF))),((((GetRandomReal(1.5,2)*GetHeroState2((mF),true))*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((9)*1.))*1.),(("|c007387ff+"))) call UnitAppBuff((GetUnitUserData(((MF)))),'AUfn',$D0102) call Equip_tkno_atk((mF),(MF)) endfunction function Equip_k3m2_Enable takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:557") call Unit_Cancel_Counter(905,(id)) set Equip_k3m2_off[id]=false endfunction function Equip_k3m2_RemoveBuff takes nothing returns nothing local integer id=(alloc__hpv(GetHandleId((GetExpiredTimer())))) set Equip_k3m2_num[id]=0 call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0RF','B06L') call ModifyUnitAttack((id),-$7D0) call ModifyHeroProperties((id),-$3E8) call ModifyUnitHpRegen((id),-$3E8) call TimerStart(GetExpiredTimer(),9,false,function Equip_k3m2_Enable) endfunction function Equip_k3m2_onAttack takes nothing returns nothing local integer id=(GetUnitUserData(((mF)))) if not Equip_k3m2_off[id]and GetRandomInt(1,100)<=5 then set Equip_k3m2_off[id]=true set Equip_k3m2_num[id]=3 call UnitAddAbilityBY((mF),'A0RF') call ModifyUnitAttack((id),$7D0) call ModifyHeroProperties((id),$3E8) call ModifyUnitHpRegen((id),$3E8) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",(mF),"origin")) call DestroyEffect(AddSpecialEffectTarget("ShadowAssault.mdl",(mF),"origin")) call TimerStart(NewTimer(id),6,false,function Equip_k3m2_RemoveBuff) call Unit_App_Counter(906,(id)) elseif Equip_k3m2_num[id]>0 then set Equip_k3m2_num[id]=Equip_k3m2_num[id]-1 call zhv((Kc[((GetUnitUserData(((mF)))))]),40,.5) call DestroyEffect(AddSpecialEffectTarget("CurseBolt.mdx",(MF),"chest")) call DamageAmplifyDis((DAK_AMOUNT[HF])-GetDamage(),$C,"|c00f8c4b1") endif endfunction function Equip_rde3_Enable takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:558") call Unit_Cancel_Counter(907,(id)) set Equip_rde3_off[id]=false endfunction function Equip_rde3_RemoveBuff takes nothing returns nothing local integer id=(alloc__hpv(GetHandleId((GetExpiredTimer())))) call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0RJ','B06N') call ModifyUnitCrit((id),-30) call TimerStart(GetExpiredTimer(),20-3,false,function Equip_rde3_Enable) endfunction function Equip_rde3_onAttack takes nothing returns nothing local integer id=(GetUnitUserData(((mF)))) if not Equip_rde3_off[id]and GetRandomInt(1,100)<=5 then set Equip_rde3_off[id]=true call UnitAddAbilityBY((mF),'A0RJ') call ModifyUnitCrit((id),30) call TimerDestroyEffectBY((s__Effect_build(AddSpecialEffectTarget(("Abilities\\Spells\\Demon\\DarkConversion\\ZombifyTarget.mdl"),((mF)),("origin")))),1) call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Undead\\UndeadDissipate\\UndeadDissipate.mdl",(mF),"origin")) call TimerStart(NewTimer(id),3,false,function Equip_rde3_RemoveBuff) call SetItemDroppableTimed((ConvertVersion(LoadInteger(BYHT2,EquipSlot_R[EquipSlot[(id)]],('rde3')))),20) call Unit_App_Counter(908,(id)) endif endfunction function Equip_I0CM_Buff takes nothing returns nothing if GetUnitAbilityLevel((MF),'Bfro')==0 then call UnitDamageTargetBY((((mF))),(((MF))),((((7.5*GetHeroState3((mF),true))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") else call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\FrostWyrmMissile\\FrostWyrmMissile.mdl",(MF),"chest")) call UnitDamageTargetBY((((mF))),(((MF))),(((($F*GetHeroState3((mF),true))*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),((DAMAGE_TYPE_MAGIC)),(((($A)*1.))*1.),(("|c006d7bdc"))) endif call DestroyEffect(AddSpecialEffectTarget("FrozenOrb.mdl",(MF),"chest")) call DestroyEffect(AddSpecialEffectTarget("WaterNovaTarget.mdl",(MF),"chest")) call UnitAppBuff((GetUnitUserData(((MF)))),'ACfn',$D0102) call UnitRemoveAbilityandBuffBY((mF),'A0IM','B01T') call s__Trig_remove(s__Trig_Index) endfunction function Equip_I0CM_onSpellEffect takes nothing returns nothing if GetUnitAbilityLevel((Je[(s__Trig_P)]),'A0IM')==0 then call UnitAddPAttackTrigB((s__Trig_P),function Equip_I0CM_Buff) call UnitAddAbilityBY((Je[(s__Trig_P)]),'A0IM') endif endfunction function Equip_I0DI_RemoveBuff takes integer id returns nothing if Equip_I0DI_Shield[id]!=0 then call UnitRemoveAbilityandBuffBY((Je[(id)]),'A07Y','B00O') call s__Trig_remove(Equip_I0DI_Shield[id]) call Unit_Cancel_Counter(909,(id)) set Equip_I0DI_Shield[id]=0 endif endfunction function Equip_I0DI_Shield_actions takes nothing returns nothing local integer id=(pF) if Equip_I0DI_Shield_life[id]>GetDamage()then set Equip_I0DI_Shield_life[id]=Equip_I0DI_Shield_life[id]-GetDamage() set KF[HF]=PF+1000000. else call DamageMinus(Equip_I0DI_Shield_life[id]) call Equip_I0DI_RemoveBuff(id) endif endfunction function Equip_I0DI_onSpellEffect takes nothing returns nothing local integer id=s__Trig_P if Equip_I0DI_Shield[id]==0 then set Equip_I0DI_Shield[id]=UnitAddShieldTrigB((id),function Equip_I0DI_Shield_actions) set Equip_I0DI_Shield_life[id]=$5DC call DestroyEffect(AddSpecialEffectTarget("ForestBolt.mdl",(Je[(id)]),"origin")) call UnitAddAbilityBY((Je[(id)]),'A07Y') call Unit_App_Counter(910,(id)) else set Equip_I0DI_Shield_life[id]=MinR(Equip_I0DI_Shield_life[id]+$5DC,6000) endif call NewTextTagInTarget_B((Je[(id)]),"|c00bef2acSHIELD ("+I2S(R2I(Equip_I0DI_Shield_life[id]))+")",9,$FF,$FF,$FF) endfunction function Equip_afac_onAttack takes nothing returns nothing call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\LightningBolt\\LightningBoltMissile.mdl",(MF),"origin")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\Bolt\\BoltImpact.mdl",(MF),"origin")) call UnitDamageTargetBY((((mF))),(((MF))),((((1.5*GetHeroState1((mF),true))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endfunction function Equip_afac_Enable takes nothing returns nothing set Equip_afac_off[ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:559")]=false endfunction function Equip_afac_Expired takes nothing returns nothing local integer id=(alloc__hpv(GetHandleId((GetExpiredTimer())))) call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0IZ','B035') call ModifyHeroStr((id),-425) call s__Trig_remove(Equip_afac_atk[id]) call TimerStart(GetExpiredTimer(),4,false,function Equip_afac_Enable) call Unit_Cancel_Counter(911,id) endfunction function Equip_afac_onSpellEffect takes nothing returns nothing local integer id=s__Trig_P if not Equip_afac_off[id]then set Equip_afac_off[id]=true set Equip_afac_atk[id]=UnitAddPAttackTrigB((id),function Equip_afac_onAttack) call UnitAddAbilityBY((Je[(id)]),'A0IZ') call ModifyHeroStr((id),425) call SetItemDroppableTimed((ConvertVersion(LoadInteger(BYHT2,EquipSlot_R[EquipSlot[(id)]],('afac')))),$A) call TimerStart(NewTimer(id),6,false,function Equip_afac_Expired) call Unit_App_Counter(912,id) endif endfunction function Equip_blba_onSpellEffect takes nothing returns nothing local unit c local unit u local real x local real y local real d if GetRandomInt(1,8)==1 then set c=(Je[(s__Trig_P)]) set x=GetUnitX(c) set y=GetUnitY(c) set d=40*GetHeroPropertiesByAll((GetUnitUserData((c)))) call GroupEnumUnitsInRange(G,x,y,425,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,350)and IsUnitAliveAndEnemy(u,c)then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Demon\\DemonBoltImpact\\DemonBoltImpact.mdl",u,"origin")) call UnitDamageTargetBY(((c)),((u)),((((d)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v(u,1) endif endloop call Ltv(Lfv(LAv("AncientExplode.mdl",x,y,1.25),$FF,0,0,$FF)) call CUv((GetPlayerId((GetOwningPlayer(c)))),$FF,125,125,.27) set c=null endif endfunction function Equip_cnhn_Enbale takes nothing returns nothing set Equip_cnhn_off[ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:560")]=false endfunction function Equip_cnhn_RemoveBuff takes nothing returns nothing local integer id=(alloc__hpv(GetHandleId((GetExpiredTimer())))) call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0P3','B05K') call ModifyUnitAttack((id),-$FA0*Equip_cnhn_count[id]) call ModifyHeroStr((id),-575) call s__Trig_remove((Equip_cnhn_atk[id])) call TimerStart(GetExpiredTimer(),5,false,function Equip_cnhn_Enbale) call Unit_Cancel_Counter(913,id) endfunction function Equip_cnhn_onAttack takes nothing returns nothing local integer id if GetRandomInt(1,5)==1 then set id=(GetUnitUserData(((mF)))) if Equip_cnhn_count[id]<5 then set Equip_cnhn_count[id]=Equip_cnhn_count[id]+1 call NewTextTagInTarget_B((mF),"+4000 DAMAGE",$A,$FF,125,125) call ModifyUnitAttack((id),$FA0) endif call DestroyEffect(AddSpecialEffectTarget("OrbOfFire.mdl",(MF),"origin")) call Ltv(LAv("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",GetUnitX((MF)),GetUnitY((MF)),1.8)) call Lqv(LAv("MagmaBurst.mdl",GetUnitX((MF)),GetUnitY((MF)),.75),1.5) call UnitDamageTargetBY((((mF))),(((MF))),(((((1+.2*Equip_cnhn_count[id])*(DAK_AMOUNT[HF])+$A*GetHeroState1((mF),true))*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((13.5)*1.))*1.),(("|c00ec7766"))) endif endfunction function Equip_cnhn_onSpellEffect takes nothing returns nothing local integer id=s__Trig_P if not Equip_cnhn_off[id]then set Equip_cnhn_off[id]=true set Equip_cnhn_atk[id]=UnitAddPAttackTrigB((id),function Equip_cnhn_onAttack) set Equip_cnhn_count[id]=0 call UnitAddAbilityBY((Je[(id)]),'A0P3') call ModifyHeroStr((id),575) call SetItemDroppableTimed((ConvertVersion(LoadInteger(BYHT2,EquipSlot_R[EquipSlot[(id)]],('afac')))),$C) call TimerStart(NewTimer(id),7.5,false,function Equip_cnhn_RemoveBuff) call Unit_App_Counter(914,id) endif endfunction function Equip_gobm_Remove takes integer id returns integer if Equip_gobm_timer[id]!=null then call ReleaseTimer(Equip_gobm_timer[id],"[TimerUtils]Error:561") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A08J','B02Y') call Unit_Cancel_Counter(915,id) set Equip_gobm_timer[id]=null return Equip_gobm_bufflv[id] endif return 0 endfunction function Equip_gobm_loop_c takes nothing returns nothing local integer id=(alloc__hpv(GetHandleId((GetExpiredTimer())))) set Equip_gobm_duration[id]=Equip_gobm_duration[id]-1 call UnitDamageTargetBY((((Je[(Equip_gobm_Source[id])]))),(((Je[(id)]))),((((.5*Equip_gobm_bufflv[id]*GetHeroState2((Je[(Equip_gobm_Source[id])]),true))*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),((DAMAGE_TYPE_MAGIC)),((((8)*1.))*1.),(("|c002d8017"))) if not UnitAlive((Je[(id)]))or Equip_gobm_duration[id]<1 then call Equip_gobm_Remove(id) endif endfunction function Equip_gobm_onAttack takes nothing returns nothing local integer id=(GetUnitUserData(((MF)))) if Equip_gobm_timer[id]==null then set Equip_gobm_timer[id]=NewTimer(id) set Equip_gobm_bufflv[id]=1 call UnitAddAbilityBY((MF),'A08J') call TimerStart(Equip_gobm_timer[id],1,true,function Equip_gobm_loop_c) call Unit_App_Counter(916,id) elseif Equip_gobm_bufflv[id]<$A then set Equip_gobm_bufflv[id]=Equip_gobm_bufflv[id]+1 if ModuloInteger(Equip_gobm_bufflv[id],5)==0 then call thv("|c002d8017"+I2S(Equip_gobm_bufflv[id])+" Charge",GetUnitX((MF)),GetUnitY((MF)),GetUnitFlyHeight((MF))+100,.075,.05,bj_PI/ 2,.6,1) endif endif set Equip_gobm_Source[id]=(GetUnitUserData(((mF)))) set Equip_gobm_duration[id]=$A call Ltv(Lfv(LAv("CenarionFury.mdl",GetUnitX((MF)),GetUnitY((MF)),1.5),0,55,0,$FF)) call UnitRemoveAbilityandBuffBY((mF),'A07R','B02X') call s__Trig_remove(s__Trig_Index) endfunction function Equip_gobm_onSpellEffect takes nothing returns nothing if GetUnitAbilityLevel((Je[(s__Trig_P)]),'A07R')==0 then call UnitAddPAttackTrigB((s__Trig_P),function Equip_gobm_onAttack) call UnitAddAbilityBY((Je[(s__Trig_P)]),'A07R') endif endfunction function s__hcun_enable takes nothing returns nothing local integer this=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:562") set s__hcun_off[this]=false call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl",(Je[(this)]),"origin")) call Unit_Cancel_Counter(917,(this)) endfunction function s__hcun_recycle takes integer this returns nothing if s__hcun_use[this]then set s__hcun_FL[s__hcun_FR[this]]=s__hcun_FL[this] set s__hcun_FR[s__hcun_FL[this]]=s__hcun_FR[this] set s__hcun_use[this]=false if s__hcun_FR[(0)]==0 then call frv(s__hcun_func) endif call Unit_Cancel_Counter(918,(this)) endif endfunction function s__hcun_loop_c takes nothing returns boolean local integer this=s__hcun_FR[(0)] local integer fx local integer i local real x local real y local real a loop exitwhen this==0 if UnitAlive((Je[(this)]))then set s__hcun_duration[this]=s__hcun_duration[this]-1 set s__hcun_ang[this]=s__hcun_ang[this]+.04+.02*s__hcun_bufflv[this] set i=s__hcun_bufflv[this] set x=GetUnitX((Je[(this)])) set y=GetUnitY((Je[(this)])) loop exitwhen i==0 set i=i-1 set a=s__hcun_ang[this]+i*Lx/ s__hcun_bufflv[this] set fx=LoadInteger(BYHT,s__hcun_vessel[this],i) call LKv(fx,x+s__hcun_Angle*Cos(a)) call Llv(fx,y+s__hcun_Angle*Sin(a)) call SetUnitFacing(II[(fx)],((a+.25*Lx)*1.)*bj_RADTODEG) endloop else set s__hcun_duration[this]=0 endif if s__hcun_duration[this]<1 then set s__hcun_off[this]=true call TimerStart(NewTimer(this),5,false,function s__hcun_enable) call ModifyHeroStr((this),-125*s__hcun_bufflv[this]) call ModifyUnitMagicDamage((this),-2.5*s__hcun_bufflv[this]) call SetItemDroppableTimed((ConvertVersion(LoadInteger(BYHT2,EquipSlot_R[EquipSlot[(this)]],('hcun')))),5) call Unit_App_Counter(919,(this)) loop exitwhen s__hcun_bufflv[this]==0 set s__hcun_bufflv[this]=s__hcun_bufflv[this]-1 call Ltv((LoadInteger(BYHT,s__hcun_vessel[this],s__hcun_bufflv[this]))) endloop call s__Trig_remove((s__hcun_atk[this])) call free(s__hcun_vessel[this]) call s__hcun_recycle(this) endif set this=s__hcun_FR[this] endloop return false endfunction function s__hcun_statr takes integer this returns boolean if not s__hcun_use[this]then if s__hcun_FR[(0)]==0 then if s__hcun_func==0 then set s__hcun_func=fxv(function s__hcun_loop_c) endif call fov(s__hcun_func) endif set s__hcun_FR[this]=s__hcun_FR[(0)] set s__hcun_FL[s__hcun_FR[(0)]]=this set s__hcun_FR[(0)]=this set s__hcun_FL[this]=0 set s__hcun_use[this]=true call Unit_App_Counter(920,(this)) return true endif return false endfunction function s__hcun_onattack takes nothing returns nothing local integer this=(GetUnitUserData(((mF)))) if GetRandomInt(1,5)<4 then call DestroyEffect(AddSpecialEffectTarget("HolyBlast.mdl",(MF),"chest")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\FaerieDragonMissile\\FaerieDragonMissile.mdl",(MF),"chest")) call UnitDamageTargetBY((((mF))),(((MF))),((((1.5*s__hcun_bufflv[this]*GetHeroState1((mF),true))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endfunction function s__hcun_addbuff takes integer this returns nothing local integer fx local real a if not s__hcun_off[this]then if s__hcun_statr(this)then set s__hcun_vessel[this]=malloc() set s__hcun_atk[this]=UnitAddPAttackTrigB((this),function s__hcun_onattack) set s__hcun_bufflv[this]=0 set s__hcun_ang[this]=0 endif if s__hcun_bufflv[this]<4 then set a=s__hcun_ang[this]+s__hcun_bufflv[this]*Lx/(s__hcun_bufflv[this]+1) set fx=Lnv(GetUnitX((Je[(this)]))+s__hcun_Angle*Cos(a),GetUnitY((Je[(this)]))+s__hcun_Angle*Sin(a),a+.25*Lx) call LMv(fx,"Abilities\\Weapons\\FaerieDragonMissile\\FaerieDragonMissile.mdl") call SetUnitFlyHeight(II[(fx)],((50)*1.),0) call SaveInteger(BYHT,s__hcun_vessel[this],s__hcun_bufflv[this],fx) set s__hcun_bufflv[this]=s__hcun_bufflv[this]+1 set s__hcun_duration[this]=$A0 if s__hcun_bufflv[this]==4 then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Resurrect\\ResurrectCaster.mdl",(Je[(this)]),"origin")) call CSv((Kc[(this)]),30,.375) endif call Lfv(fx,$FF,125,125,$FF) call ModifyHeroStr((this),125) call ModifyUnitMagicDamage((this),2.5) call SetItemDroppableTimed((ConvertVersion(LoadInteger(BYHT2,EquipSlot_R[EquipSlot[(this)]],('hcun')))),5) call ttv((Je[(this)]),"|c00d7b4eb"+I2S(125*s__hcun_bufflv[this])+" STR +"+mYv(2.5*s__hcun_bufflv[this])+"% 技能伤害") call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl",(Je[(this)]),"origin")) endif endif endfunction function s__hcun_onSpellEffect takes nothing returns nothing call s__hcun_addbuff((s__Trig_P)) endfunction function Equip_k3m3_Enable takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:563") set Equip_k3m3_off[id]=false call Unit_Cancel_Counter(921,id) endfunction function Equip_k3m3_onSpellEffect takes nothing returns nothing local integer id=s__Trig_P local integer i if not Equip_k3m3_off[id]and GetRandomInt(1,20)==1 then set Equip_k3m3_off[id]=true set i=2 loop if LoadInteger(BYHT,Hero_Skills_table[(id)],i)!='A10C' then call UnitResetCooldownById((Je[(id)]),LoadInteger(BYHT,Hero_Skills_table[(id)],i)) endif exitwhen i==6 set i=i+1 endloop call SetItemDroppableTimed((ConvertVersion(LoadInteger(BYHT2,EquipSlot_R[EquipSlot[(id)]],('k3m3')))),$96) call CUv((Kc[(id)]),$FF,$FF,$80,.5) call NewTextTagInTarget_B((Je[(id)]),"|c00ffff80Skill refresh!",$C,$FF,$FF,$FF) call Lqv(LAv("LightStrikeArray.mdx",GetUnitX((Je[(id)])),GetUnitY((Je[(id)])),2.5),1.27) call TimerStart(NewTimer(id),$96,false,function Equip_k3m3_Enable) call Unit_App_Counter(922,id) endif endfunction function Equip_ofro_onAttack takes nothing returns nothing call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",(mF),"origin")) call DestroyEffect(AddSpecialEffectTarget("ChaosExplosion.mdl",(MF),"origin")) call UnitDamageTargetBY((((mF))),(((MF))),((((5000+2*GetHeroStateByMax((mF)))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) call UnitCureTaret(null,(mF),.025*GetUnitState((mF),UNIT_STATE_MAX_LIFE)) call UnitRemoveAbilityandBuffBY((mF),'A097','BIil') call s__Trig_remove((s__Trig_Index)) endfunction function Equip_ofro_onSpellEffect takes nothing returns nothing if GetUnitAbilityLevel((Je[(s__Trig_P)]),'A097')==0 then call UnitAddPAttackTrigB((s__Trig_P),function Equip_ofro_onAttack) call UnitAddAbilityBY((Je[(s__Trig_P)]),'A097') endif endfunction //ring of eternal flame storm function Equip_I0EB_Enable takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:564") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A110','B09O') call ModifyUnitMagicDamage((id),-3*Equip_I0EB_count[id]) call Unit_Cancel_Counter(923,(id)) set Equip_I0EB_timer[id]=null endfunction function Equip_I0EB_onSpellEffect takes nothing returns nothing local integer id=s__Trig_P if Equip_I0EB_timer[id]==null then set Equip_I0EB_timer[id]=NewTimer(id) set Equip_I0EB_count[id]=0 call UnitAddAbilityBY((Je[(id)]),'A110') call Unit_App_Counter(924,(id)) endif if Equip_I0EB_count[id]<6 then set Equip_I0EB_count[id]=Equip_I0EB_count[id]+1 call ModifyUnitMagicDamage((id),3) call ttv((Je[(id)]),"|c008bf3d1+"+I2S(R2I(3*Equip_I0EB_count[id]))+"% Skill damage") call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIim\\AIimTarget.mdl",(Je[(id)]),"origin")) endif call SetItemDroppableTimed((ConvertVersion(LoadInteger(BYHT2,EquipSlot_R[EquipSlot[(id)]],('I0EB')))),10) call TimerStart(Equip_I0EB_timer[id],10,false,function Equip_I0EB_Enable) endfunction //ring of storm function Equip_srtl_Enable takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:564") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0ME','B04O') call ModifyUnitMagicDamage((id),-3*Equip_srtl_count[id]) call Unit_Cancel_Counter(923,(id)) set Equip_srtl_timer[id]=null endfunction function Equip_srtl_onSpellEffect takes nothing returns nothing local integer id=s__Trig_P if Equip_srtl_timer[id]==null then set Equip_srtl_timer[id]=NewTimer(id) set Equip_srtl_count[id]=0 call UnitAddAbilityBY((Je[(id)]),'A0ME') call Unit_App_Counter(924,(id)) endif if Equip_srtl_count[id]<4 then set Equip_srtl_count[id]=Equip_srtl_count[id]+1 call ModifyUnitMagicDamage((id),3) call ttv((Je[(id)]),"|c008bf3d1+"+I2S(R2I(3*Equip_srtl_count[id]))+"% Skill damage") call DestroyEffect(AddSpecialEffectTarget("Enchantment.mdl",(Je[(id)]),"origin")) endif call SetItemDroppableTimed((ConvertVersion(LoadInteger(BYHT2,EquipSlot_R[EquipSlot[(id)]],('srtl')))),6) call TimerStart(Equip_srtl_timer[id],6,false,function Equip_srtl_Enable) endfunction function Equip_stwa_Removebuff takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:565") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0LW','B04G') call ModifyUnitHpRegen((id),-300) call ModifyUnitMagicDamage((id),-6) call Unit_Cancel_Counter(925,id) set Equip_stwa_timer[id]=null endfunction function Equip_stwa_onSpellEffect takes nothing returns nothing local integer id=s__Trig_P if Equip_stwa_timer[id]==null then set Equip_stwa_timer[id]=NewTimer(id) call UnitAddAbilityBY((Je[(id)]),'A0LW') call ModifyUnitHpRegen((id),300) call ModifyUnitMagicDamage((id),6) call Unit_App_Counter(926,id) endif call TimerStart(Equip_stwa_timer[id],3,false,function Equip_stwa_Removebuff) endfunction function s__rat3_removebuff takes integer this returns nothing if s__rat3_time[this]!=null then call ReleaseTimer(s__rat3_time[this],"[TimerUtils]Error:566") call UnitRemoveAbilityandBuffBY((Je[(this)]),'A08J','B02Y') call Unit_Cancel_Counter(927,(this)) set s__rat3_time[this]=null endif endfunction function s__rat3_loop_c takes nothing returns nothing local integer this=(alloc__hpv(GetHandleId((GetExpiredTimer())))) if UnitAlive((Je[(this)]))then set s__rat3_duration[this]=s__rat3_duration[this]-1 call UnitDamageTargetBY((((Je[(s__rat3_source[this])]))),(((Je[(this)]))),((((s__rat3_lv[this]*GetHeroState2((Je[(s__rat3_source[this])]),true))*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),((DAMAGE_TYPE_MAGIC)),((((9)*1.))*1.),(("|c002d8017"))) else set s__rat3_duration[this]=0 endif if s__rat3_duration[this]<1 then call s__rat3_removebuff(this) endif endfunction function s__rat3_onattack takes nothing returns nothing local integer this=(pF) local real x=GetUnitX((MF)) local real y=GetUnitY((MF)) if s__rat3_time[this]==null then set s__rat3_time[this]=NewTimer(this) set s__rat3_lv[this]=0 call UnitAddAbilityBY((MF),'A08J') call TimerStart(s__rat3_time[this],1,true,function s__rat3_loop_c) call Unit_App_Counter(928,(this)) endif if s__rat3_lv[this]300 then call UnitDamageTargetBY((((MF))),(((mF))),(((($4B0)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) else call UnitDamageTargetBY((((MF))),(((mF))),((((4*(DAK_AMOUNT[HF]))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) endif call DestroyEffect(AddSpecialEffectTarget("blood damage impact.mdl",(mF),"chest")) endfunction function Equip_lgdh_Enable takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:569") set Equip_lgdh_off[id]=false call Unit_Cancel_Counter(931,id) endfunction function Equip_lgdh_beAttack takes nothing returns nothing local integer id=(pF) local unit u local real x local real y if not Equip_lgdh_off[id]and GetRandomInt(1,$A)==1 then set Equip_lgdh_off[id]=true set x=GetUnitX((MF)) set y=GetUnitY((MF)) call GroupEnumUnitsInRange(G,x,y,400,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,325)and IsUnitAliveAndEnemy(u,(MF))then call UnitDamageTargetBY((((MF))),((u)),(((($7530)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call pmv(u,1.5) endif endloop call Ltv(LAv("IceNova.mdl",x,y,1.5)) call Ltv(LAv("FreezingRing.mdl",x,y,1.25)) call TimerStart(NewTimer(id),60,false,function Equip_lgdh_Enable) call Unit_App_Counter(932,id) endif endfunction function Equip_I0CP_Shield takes nothing returns nothing local integer id=(pF) if(100000.-TimerGetRemaining(GameTimer))>Equip_I0CP_cd[id]and GetRandomInt(1,8)==1 then set Equip_I0CP_cd[id]=(100000.-TimerGetRemaining(GameTimer))+5 call TimerDestroyAddSpecialEffectTargetBY("Abilities\\Spells\\Human\\Heal\\HealTarget.mdl",(MF),"origin",1) call UnitCureTaret((MF),(MF),.025*GetUnitMaxLifeById((pF))) endif endfunction function Equip_esaz_Shield takes nothing returns nothing local integer id=(pF) if(100000.-TimerGetRemaining(GameTimer))>Equip_esaz_cd[id]and GetRandomInt(1,8)==1 then set Equip_esaz_cd[id]=(100000.-TimerGetRemaining(GameTimer))+5 call TimerDestroyAddSpecialEffectTargetBY("natureHeal.mdx",(MF),"origin",1) call UnitCureTaret((MF),(MF),.01*4.*GetUnitMaxLifeById((pF))) call SetItemDroppableTimed((ConvertVersion(LoadInteger(BYHT2,EquipSlot_R[EquipSlot[(id)]],('esaz')))),5.) endif endfunction function Equip_jpnt_RemoveBuff takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:570") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0QP','B06B') call DeUnitAdef((id),Equip_jpnt_def[id]) call Unit_Cancel_Counter(933,(id)) endfunction function Equip_jpnt_Shield takes nothing returns nothing local integer id=(pF) if(100000.-TimerGetRemaining(GameTimer))>Equip_jpnt_cd[id]and GetWidgetLife((MF))-GetDamage()<=.15*GetUnitMaxLifeById((id))then set Equip_jpnt_cd[id]=(100000.-TimerGetRemaining(GameTimer))+60 set Equip_jpnt_def[id]=ModifyUnitAdef((id),90) call DamageMinus(.9*GetDamage()) call zKv((Kc[((id))]),$CD,$FF,$CD,.27) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",(MF),"origin")) call UnitCureTaret(null,(MF),.01*25.*GetUnitMaxLifeById((id))) call UnitAddAbilityBY((MF),'A0QP') call TimerStart(NewTimer(id),3.,false,function Equip_jpnt_RemoveBuff) call Unit_App_Counter(934,(id)) endif endfunction function Equip_I0B5_Loop_c takes nothing returns nothing local integer data=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer Source=Boss_Spell_data1[data] local integer target=Boss_Spell_data2[data] set Boss_Spell_data3[data]=Boss_Spell_data3[data]-1 call UnitDamageTargetBY((((Je[(Source)]))),(((Je[(target)]))),((((Unit_DOT[(Source)]*Boss_Spell_X[data])*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) if Boss_Spell_data3[data]<1 then set Equip_I0B5_count[target]=Equip_I0B5_count[target]-1 if Equip_I0B5_count[target]==0 then call UnitRemoveAbilityandBuffBY((Je[(target)]),'A0F0','Bmlt') call Unit_Cancel_Counter(935,target) endif call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:571") call Unit_Cancel_Counter(936,Source) call Boss_Spell_deallocate(data) endif endfunction function Equip_I0B5_Meleemagic takes nothing returns nothing local integer data=Boss_Spell_allocate() local integer Source=(pF_v) local integer target=(pF) set Boss_Spell_data1[data]=Source set Boss_Spell_data2[data]=target set Boss_Spell_data3[data]=6 set Boss_Spell_X[data]=.025*GetDamage() set Equip_I0B5_count[target]=Equip_I0B5_count[target]+1 if Equip_I0B5_count[target]==1 then call UnitAddAbilityBY((MF),'A0F0') call Unit_App_Counter(937,target) endif call DestroyEffect(AddSpecialEffectTarget("DeathBladeRegeneration.mdl",(MF),"origin")) call TimerStart(NewTimer(data),.5,true,function Equip_I0B5_Loop_c) call Unit_App_Counter(938,Source) endfunction function s__glsk_list_recycle takes integer this returns nothing set s__glsk_list_last[s__glsk_list_next[this]]=s__glsk_list_last[this] set s__glsk_list_next[s__glsk_list_last[this]]=s__glsk_list_next[this] call s__glsk_list_deallocate(this) endfunction function s__glsk_list_alloc takes nothing returns integer local integer this=s__glsk_list__allocate() set s__glsk_list_next[this]=this set s__glsk_list_last[this]=this return this endfunction function s__glsk_list_link takes integer this,integer l returns nothing local integer t=s__glsk_list_last[this] local integer v=s__glsk_list_last[l] set s__glsk_list_last[this]=v set s__glsk_list_last[l]=t set s__glsk_list_next[t]=l set s__glsk_list_next[v]=this endfunction function s__glsk_list_clear takes integer this returns nothing local integer t=this loop call s__glsk_list_deallocate(t) set t=s__glsk_list_next[t] exitwhen t==this endloop endfunction function s__glsk_hash_create takes nothing returns integer local integer this=s__glsk_hash__allocate() set s__glsk_hash_vessel[this]=malloc() return this endfunction function s__glsk_hash_destroy takes integer this returns nothing call free(s__glsk_hash_vessel[this]) endfunction function s__glsk_hash_have takes integer this,integer k returns boolean return HaveSavedInteger(BYHT,s__glsk_hash_vessel[this],k) endfunction function s__glsk_hash_remove takes integer this,integer k returns boolean if HaveSavedInteger(BYHT,s__glsk_hash_vessel[this],k)then set s__glsk_hash_size[this]=s__glsk_hash_size[this]-1 call RemoveSavedInteger(BYHT,s__glsk_hash_vessel[this],k) return true endif return false endfunction function s__glsk_hash_load takes integer this,integer k returns integer return LoadInteger(BYHT,s__glsk_hash_vessel[this],k) endfunction function s__glsk_hash_save takes integer this,integer k,integer v returns boolean if s__glsk_hash_size[this]1 then set s__glsk_list_count[l]=s__glsk_list_count[l]-1 else call s__glsk_list_recycle(l) endif set l=s__glsk_list_next[l] exitwhen l==data endloop if data==s__glsk_list_next[data]then call s__glsk_list_clear(data) call s__glsk_hash_remove(ht,Source) call s__glsk_list_recycle(t) endif set t=s__glsk_list_next[t] endloop endif set this=s__glsk_FR[this] endloop endfunction function s__glsk_Start takes integer this returns boolean if not s__glsk_Use[this]then if s__glsk_FR[(0)]==(0)then if s__glsk_Func==0 then set s__glsk_Func=fxv(function s__glsk_loop_c) endif call fov(s__glsk_Func) endif set s__glsk_FR[this]=s__glsk_FR[(0)] set s__glsk_FL[s__glsk_FR[(0)]]=this set s__glsk_FR[(0)]=this set s__glsk_FL[this]=(0) set s__glsk_Use[this]=true call Unit_App_Counter(941,(this)) return true endif return false endfunction function s__glsk_onDirectHit takes nothing returns nothing local integer this=(pF) local integer v local integer t local integer data local integer l local integer ht if s__glsk_Start(this)then set ht=s__glsk_hash_create() set v=s__glsk_list_alloc() set s__glsk_List[this]=v set s__glsk_Ht[this]=ht set s__glsk_mdef[this]=ModifyUnitMdef((this),-s__glsk_mdef_v) set s__glsk_time[this]=0 call DestroyEffect(AddSpecialEffectTarget("ShadowAssasult.mdl",(Je[(this)]),"origin")) call NewTextTagInTarget_B((MF),"|c00735e9d(sin)"+I2S(R2I(s__glsk_mdef_v))+"%",$A,$FF,$FF,$FF) call UnitAddAbilityBY((MF),'A0RR') else set ht=s__glsk_Ht[this] set v=s__glsk_List[this] endif if(HaveSavedInteger(BYHT,s__glsk_hash_vessel[(ht)],((pF_v))))then set data=(LoadInteger(BYHT,s__glsk_hash_vessel[(ht)],((pF_v)))) else set data=s__glsk_list_alloc() if s__glsk_hash_save(ht,(pF_v),data)then set s__glsk_list_count[data]=(pF_v) set s__glsk_list_damage[data]=0 set t=s__glsk_list_alloc() set s__glsk_list_count[t]=(pF_v) call s__glsk_list_link(v,t) call Unit_App_Counter(942,(pF_v)) else call s__glsk_list_clear(data) set data=0 endif endif if data!=null then set l=s__glsk_list_alloc() call s__glsk_list_link(data,l) set s__glsk_list_count[l]=6 set s__glsk_list_damage[l]=.01*s__glsk_DamagePercent*GetDamage()/ 6 set s__glsk_list_damage[data]=s__glsk_list_damage[data]+s__glsk_list_damage[l] call DestroyEffect(AddSpecialEffectTarget("DoomBlack.mdl",(MF),"origin")) endif endfunction function Equip_I0CC_onKillUnit takes nothing returns nothing call UnitCureTaret(IF,IF,500) call SetUnitState(IF,UNIT_STATE_MANA,GetUnitState(IF,UNIT_STATE_MANA)+500) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",IF,"origin")) endfunction function Equip_mort_removebuff takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:572") call SetHandicapXP((id),-$C) call ModifyUnitMpRegen((id),-$F) call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0B1','BNdc') call Unit_Cancel_Counter(943,id) set Equip_mort_timer[id]=null endfunction function Equip_mort_onKillUnit takes nothing returns nothing local integer id if UnitAlive(IF)and GetRandomInt(1,100)<9 then set id=(GetUnitUserData((IF))) if Equip_mort_timer[id]==null then set Equip_mort_timer[id]=NewTimer(id) call SetHandicapXP((id),$C) call ModifyUnitMpRegen((id),$F) call UnitAddAbilityBY((Je[(id)]),'A0B1') call Unit_App_Counter(944,id) endif call TimerStart(Equip_mort_timer[id],30,false,function Equip_mort_removebuff) endif endfunction function Equip_mcou_Removebuff takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:573") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0CM','BEfn') call ModifyUnitHP((id),-Equip_mcou_HP[id]) call Unit_Cancel_Counter(945,(id)) set Equip_mcou_Timer[id]=null set Equip_mcou_HP[id]=0 endfunction function Equip_mcou_Addbuff takes integer id,real tJv returns nothing local integer up=Equip_mcou_HP[id]+R2I(.1*tJv) local integer up_max=R2I(.15*GetUnitState((Je[(id)]),UNIT_STATE_MAX_LIFE)) if up>up_max then set up=up_max endif if Equip_mcou_Timer[id]==null then set Equip_mcou_Timer[id]=NewTimer(id) call UnitAddAbilityBY((Je[(id)]),'A0CM') call Unit_App_Counter(946,(id)) endif call ModifyUnitHP((id),up-Equip_mcou_HP[id]) call TimerStart(Equip_mcou_Timer[id],6,false,function Equip_mcou_Removebuff) set Equip_mcou_HP[id]=up endfunction function Equip_mcou_onCured takes nothing returns nothing local real uplife=GetUnitState((Je[(BECURE_Unit)]),UNIT_STATE_MAX_LIFE)-GetWidgetLife((Je[(BECURE_Unit)])) if CURE_Damage>uplife then call Equip_mcou_Addbuff(BECURE_Unit,CURE_Damage-uplife) set CURE_Damage=uplife endif endfunction function MagicDragonSuit takes nothing returns nothing local integer data=le local unit u=(Je[(data)]) local integer itemid local boolean b1 local boolean b2 local boolean b3 if s__suit_IsActivate then set itemid=GetHeroEquipSlot(data,1) set b1=itemid=='I07R' or itemid=='I09S' or itemid=='I07S' or itemid=='I09T' set itemid=GetHeroEquipSlot(data,2) set b2=itemid=='I07U' or itemid=='I07W' set itemid=GetHeroEquipSlot(data,3) set b3=itemid=='I07Y' or itemid=='I07X' if b1 and b2 and b3 then call UnitAddAbilityBY((u),'A0G6') call ttv(u,"|c00ff8080+4000 HP +200 HP Regen +10% 技能伤害") call ModifyUnitHP((data),$FA0) call ModifyUnitHpRegen((data),$C8) call ModifyUnitMagicDamage((data),$A) endif else if GetUnitAbilityLevel(u,'A0G6')>0 then call UnitRemoveAbilityandBuffBY(u,'A0G6','BNdh') call ModifyUnitHP((data),-$FA0) call ModifyUnitHpRegen((data),-$C8) call ModifyUnitMagicDamage((data),-$A) endif endif set u=null endfunction function LobsterSuit takes nothing returns nothing local integer data=le local unit u=(Je[(data)]) if s__suit_IsActivate then if(LoadBoolean(BYHT,EquipSlot_R[EquipSlot[(data)]],('I0C0')))and(LoadBoolean(BYHT,EquipSlot_R[EquipSlot[(data)]],('I0C1')))then call UnitAddAbilityBY(u,'A0H0') call ttv(u,"|c00d7b4eb+3000 HP +7.5% 技能伤害") call ModifyUnitMagicDamage((data),7.5) call ModifyUnitHP((data),$BB8) endif else if GetUnitAbilityLevel(u,'A0H0')>0 then call UnitRemoveAbilityandBuffBY(u,'A0H0','BIcb') call ModifyUnitMagicDamage((data),-7.5) call ModifyUnitHP((data),-$BB8) endif endif set u=null endfunction function Jack_s_Suit takes nothing returns nothing local integer data=le local unit u=(Je[(data)]) local integer itemid local boolean b1 local boolean b2 local boolean b3 if s__suit_IsActivate then set itemid=GetHeroEquipSlot(data,1) set b1=itemid=='I0AY' set itemid=GetHeroEquipSlot(data,3) set b2=itemid=='I07O' or itemid=='I07N' or itemid=='I07M' or itemid=='I07P' set itemid=GetHeroEquipSlot(data,4) set b3=itemid=='cnob' or itemid=='shhn' if b1 and b2 and b3 then call UnitAddAbilityBY(u,'A0LR') call ttv(u,"|c0093a3ce+400 Main Stat +12% 技能伤害") call ModifyHeroProperties((data),400) call ModifyUnitMagicDamage((data),$C) call Ltv(LAv("Grin Curse.mdl",GetUnitX(u),GetUnitY(u),1.25)) endif else if GetUnitAbilityLevel(u,'A0LR')>0 then call UnitRemoveAbilityandBuffBY(u,'A0LR','B04B') call ModifyHeroProperties((data),-400) call ModifyUnitMagicDamage((data),-$C) endif endif set u=null endfunction function Active_A05S_action takes nothing returns nothing local unit u=GetTriggerUnit() call SetUnitState(u,UNIT_STATE_MANA,GetUnitState(u,UNIT_STATE_MANA)+.2*GetUnitState(u,UNIT_STATE_MAX_MANA)) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIma\\AImaTarget.mdl",u,"origin")) set u=null endfunction function Active_A05S_Init takes nothing returns nothing call RegisterSpellEffectEvent('A05S',function Active_A05S_action) call SaveReal(BYHT,DroppableTimed,('I0CG'),((45)*1.)) endfunction function Active_A0HB_buff_remove takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:574") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0HC','BNwm') call ModifyUnitMagicDamage((id),-$A) call s__Trig_remove((Active_A0HB_buff[id])) call Unit_Cancel_Counter(947,(id)) set Active_A0HB_Timer[id]=null endfunction function Active_A0HB_buff_Cure takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:575") call UnitCureTaret(null,(Je[(id)]),Active_A0HB_life[id]) set Active_A0HB_life[id]=0 endfunction function Active_A0HB_buff_action takes nothing returns nothing local integer id if(DAK_DGTYPE[HF]==DAMAGE_TYPE_MAGIC)then set id=(GetUnitUserData(((mF)))) if Active_A0HB_life[id]==0 then call TimerStart(NewTimer(id),0,false,function Active_A0HB_buff_Cure) endif set Active_A0HB_life[id]=Active_A0HB_life[id]+.06*GetDamage() endif endfunction function Active_A0HB_Action takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) if Active_A0HB_Timer[id]==null then set Active_A0HB_Timer[id]=NewTimer(id) set Active_A0HB_buff[id]=UnitAddDamagerTrigB((id),function Active_A0HB_buff_action) call UnitAddAbilityBY((Je[(id)]),'A0HC') call ModifyUnitMagicDamage((id),$A) call DestroyEffect(AddSpecialEffectTarget("ChaosExplosion.mdx",(Je[(id)]),"origin")) call Unit_App_Counter(948,(id)) endif call TimerStart(Active_A0HB_Timer[id],9,false,function Active_A0HB_buff_remove) endfunction function Active_A0HB_Init takes nothing returns nothing call RegisterSpellEffectEvent('A0HB',function Active_A0HB_Action) call SaveReal(BYHT,DroppableTimed,('I0BR'),((30)*1.)) endfunction function Active_A0JN_removebuff takes nothing returns nothing local integer data=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:576") local integer id=Boss_Spell_data1[data] local integer target=Boss_Spell_data2[data] local integer eff=Boss_Spell_data3[data] call Ltv(LAv("Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl",(GetUnitX(II[(eff)])),(GetUnitY(II[(eff)])),1.5)) set Active_A0JN_Counter1[id]=Active_A0JN_Counter1[id]-1 set Active_A0JN_Counter2[target]=Active_A0JN_Counter2[target]-1 if Active_A0JN_Counter1[id]==0 then call ModifyUnitMagicDamage(id,-9) endif if Active_A0JN_Counter2[target]==0 then call UnitRemoveAbilityandBuffBY((Je[(target)]),'A0JO','B03K') endif call LTv(eff) call Unit_Cancel_Counter(949,id) call Unit_Cancel_Counter(950,target) call Boss_Spell_deallocate(data) endfunction function Active_A0JN_action takes nothing returns nothing local integer data=Boss_Spell_allocate() local integer id=(GetUnitUserData((GetTriggerUnit()))) local integer target=(GetUnitUserData((GetSpellTargetUnit()))) local integer i=6 local real x=GetUnitX((Je[(target)])) local real y=GetUnitY((Je[(target)])) local real z=60+GetUnitFlyHeight((Je[(target)])) local real a=Deg2Rad(GetUnitFacing((Je[(id)]))) local integer eff=Lnv(GetUnitX((Je[(id)]))-100*Cos(a),GetUnitY((Je[(id)]))-100*Sin(a),a) set Boss_Spell_data1[data]=id set Boss_Spell_data2[data]=target set Boss_Spell_data3[data]=eff call UnitDamageTargetBY((((Je[(id)]))),(((Je[(target)]))),(((($96*GetHeroPropertiesByAll(id))*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((20)*1.))*1.),(("|c008000cd"))) set Active_A0JN_Counter1[id]=Active_A0JN_Counter1[id]+1 set Active_A0JN_Counter2[target]=Active_A0JN_Counter2[target]+1 if Active_A0JN_Counter1[id]==1 then call ModifyUnitMagicDamage(id,9) endif if Active_A0JN_Counter2[target]==1 then call UnitAddAbilityBY((Je[(target)]),'A0JO') endif call zKv((Kc[id]),$80,$80,125,.45) call zhv((Kc[id]),40,.9) call LMv(eff,"GrimReaper.mdl") call SetUnitScale(II[(eff)],((1.5)*1.),0,0) call SetUnitFlyHeight(II[(eff)],((25)*1.),0) loop set i=i-1 call Ltv(LIv("Objects\\Spawnmodels\\Undead\\UndeadDissipate\\UndeadDissipate.mdl",x,y,z,1.5,i*Lx/ 6.+GetRandomReal(-.1,.1),GetRandomReal(45,75))) exitwhen i==0 endloop call LFv(eff,"s_ShadowEruption_Rain.mdl") call Ltv(LAv("ShadowTrap.mdl",x,y,3)) call Ltv(Lfv(LAv("Objects\\Spawnmodels\\Undead\\UDeathSmall\\UDeathSmall.mdl",x,y,3),125,0,$FF,$CD)) call Ltv(LAv("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",x,y,3)) call Ltv(Lfv(LAv("Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl",x,y,3),0,0,0,$FF)) call DestroyEffect(AddSpecialEffectTarget("ChaosExplosion.mdx",(Je[(target)]),"origin")) call TimerStart(NewTimer(data),$A,false,function Active_A0JN_removebuff) call Unit_App_Counter(951,id) call Unit_App_Counter(952,target) endfunction function Active_A0JN_Init takes nothing returns nothing call RegisterSpellEffectEvent('A0JN',function Active_A0JN_action) call SaveReal(BYHT,DroppableTimed,('ratc'),(($96)*1.)) endfunction function Active_Corruptor_End takes integer id returns nothing local integer data if Corruptor_Active_Buff[id]!=null then set data=Corruptor_Active_Buff[id] call ReleaseTimer(Boss_Spell_timer[data],"[TimerUtils]Error:577") if Corruptor_type[id]=='I0FC' then call ModifyUnitAttackSpeed((id),-50) call ModifyUnitCrit((id),-25) else call ModifyUnitAttackSpeed((id),-30) call ModifyUnitCrit((id),-20) endif call ModifyHeroStr((id),-Boss_Spell_data3[data]*Boss_Spell_data2[data]) call ModifyUnitMagicDamage((id),-Boss_Spell_X[data]*Boss_Spell_data2[data]) call zJv(Kc[(id)]) call Unit_Cancel_Counter(953,(id)) call Boss_Spell_deallocate(data) set Corruptor_Active_Buff[id]=0 set Boss_Spell_timer[data]=null endif endfunction function Active_Corruptor_Loop_c takes nothing returns nothing local integer id=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer data=Corruptor_Active_Buff[id] local integer abid local real h if Corruptor_type[id]=='I0FC' then set abid='B080' else set abid='B00C' endif if GetUnitAbilityLevel((Je[(id)]),abid)>0 then set Boss_Spell_data1[data]=Boss_Spell_data1[data]+1 if Boss_Spell_data1[data]>31 then set Boss_Spell_data1[data]=0 if Boss_Spell_data2[data]<$A then set Boss_Spell_data2[data]=Boss_Spell_data2[data]+1 call ModifyHeroStr((id),Boss_Spell_data3[data]) call ModifyUnitMagicDamage((id),Boss_Spell_X[data]) if Corruptor_type[id]=='I0FC' then set Boss_Spell_Y[data]=Boss_Spell_Y[data]+25 else set Boss_Spell_Y[data]=Boss_Spell_Y[data]+12.5 endif endif if Corruptor_type[id]=='I0FC' then call DestroyEffect(AddSpecialEffectTarget("ShadowAssault.mdl",(Je[(id)]),"origin")) call zKv((Kc[(id)]),$FF,$FF,$FF-20*Boss_Spell_data2[data],1) else call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",(Je[(id)]),"origin")) call zKv((Kc[(id)]),$FF,$FF-20*Boss_Spell_data2[data],$FF-20*Boss_Spell_data2[data],1) endif call Ltv(LAv("Grin Curse.mdl",GetUnitX((Je[(id)])),GetUnitY((Je[(id)])),1.+.05*Boss_Spell_data2[data])) call zhv((Kc[(id)]),$F+2*Boss_Spell_data2[data],.375) endif set h=GetWidgetLife((Je[(id)]))-Boss_Spell_Y[data] if h<.5 then set h=.5 if GetUnitAbilityLevel((Je[(id)]),'B00V')==0 and GetUnitAbilityLevel((Je[(id)]),'Avul')==0 then call UnitRemoveAbility((Je[(id)]),abid) call Active_Corruptor_End(id) endif endif call SetWidgetLife((Je[(id)]),h) else call Active_Corruptor_End(id) endif endfunction function Active_Corruptor_action takes nothing returns boolean local integer id=(GetUnitUserData((GetTriggerUnit()))) local integer data=Corruptor_Active_Buff[id] if data==null then set data=Boss_Spell_allocate() set Corruptor_Active_Buff[id]=data set Boss_Spell_timer[data]=NewTimer(id) set Boss_Spell_data1[data]=0 set Boss_Spell_data2[data]=0 if Corruptor_type[id]=='I0FC' then set Boss_Spell_X[data]=2 set Boss_Spell_data3[data]=125 set Boss_Spell_Y[data]=25 call ModifyUnitAttackSpeed((id),50) call ModifyUnitCrit((id),25) else set Boss_Spell_X[data]=1.5 if Corruptor_type[id]=='I0DU' then set Boss_Spell_data3[data]=$A5 else set Boss_Spell_data3[data]=75 endif set Boss_Spell_Y[data]=50 call ModifyUnitAttackSpeed((id),30) call ModifyUnitCrit((id),20) endif call zKv(Kc[(id)],$FF,$FF,$FF,1) call TimerStart(Boss_Spell_timer[data],.03125,true,function Active_Corruptor_Loop_c) call Unit_App_Counter(954,(id)) endif return false endfunction function Active_Corruptor_Init takes nothing returns nothing call RegisterSpellEffectEvent('A0HN',function Active_Corruptor_action) call RegisterSpellEffectEvent('A0VQ',function Active_Corruptor_action) endfunction function s__HellDemon_end takes integer this returns nothing set s__HellDemon_next[s__HellDemon_last[this]]=s__HellDemon_next[this] set s__HellDemon_last[s__HellDemon_next[this]]=s__HellDemon_last[this] if s__HellDemon_next[(0)]==(0)then call frv(s__HellDemon_func) endif endfunction function s__HellDemon_loop_c takes nothing returns nothing local integer this=s__HellDemon_next[(0)] local unit u local integer p local real x local real y local real d loop exitwhen this==(0) if UnitAlive((Je[(this)]))then set s__HellDemon_num[this]=s__HellDemon_num[this]+1 if ModuloInteger(s__HellDemon_num[this],8)==0 then set p=GetRandomInt(1,5) if p<3 then call ModifyUnitAttack((this),$96) elseif p<5 then call ModifyUnitArmor((this),$C) elseif ModuloInteger(s__HellDemon_num[this],16)==0 then set x=GetUnitX((Je[(this)])) set y=GetUnitY((Je[(this)])) set d=5*GetHeroState3((Je[(s__HellDemon_summoner[this])]),true) call GroupEnumUnitsInRange(G,x,y,256+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,256)then if IsUnitAliveAndEnemy(u,(Je[(this)]))then call UnitDamageTargetBY((((Je[(s__HellDemon_summoner[this])]))),((u)),((((d)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop call Ltv(Lfv(LAv("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",x,y,1.5),$FF,$9B,$9B,$9B)) call SetWidgetLife((Je[(this)]),GetWidgetLife((Je[(this)]))+.2*d) endif call SetUnitVertexColor((Je[(this)]),GetRandomInt(0,125),GetRandomInt(0,125),GetRandomInt(0,125),$9B) endif else call Unit_Cancel_Counter(955,s__HellDemon_summoner[this]) call Unit_Cancel_Counter(956,this) call s__HellDemon_end(this) endif set this=s__HellDemon_next[this] endloop endfunction function s__HellDemon_onInit takes nothing returns nothing set s__HellDemon_func=fxv(function s__HellDemon_loop_c) endfunction function s__HellDemon_start takes integer this returns integer if s__HellDemon_next[(0)]==(0)then call fov(s__HellDemon_func) endif set s__HellDemon_next[this]=s__HellDemon_next[(0)] set s__HellDemon_last[this]=(0) set s__HellDemon_last[s__HellDemon_next[this]]=this set s__HellDemon_next[(0)]=this return this endfunction function s__HellDemon_attack_action takes nothing returns nothing local real x=GetUnitX((mF)) local real y=GetUnitY((mF)) local real a=Atan2(GetUnitY((MF))-y,GetUnitX((MF))-x) local real d=.75*(DAK_AMOUNT[HF]) local unit u=(MF) set x=x-40*Cos(a) set y=y-40*Sin(a) call GroupEnumUnitsInRange(G,x,y,256+75,null) call GroupRemoveUnit(G,u) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,256)then if IsUnitAliveAndEnemy(u,(mF))and(Cos(((Atan2(GetUnitY(u)-y,GetUnitX(u)-x))*1.)-((a)*1.))>=Cos(((1.8326)*1.)))then call UnitDamageTargetBY((((mF))),((u)),((((d)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) call DestroyEffect(AddSpecialEffectTarget("blood.mdl",u,"chest")) endif endif endloop endfunction function s__HellDemon_create takes integer s,real x,real y returns integer local integer this local integer id if GetRandomInt(1,4)==1 then set id='nfgu' elseif GetRandomInt(1,2)==1 then set id='npfl' else set id='nvdw' endif set this=(GetUnitUserData((CreateUnit(GetOwningPlayer((Je[(s)])),id,x,y,GetRandomReal(0,359))))) set s__HellDemon_summoner[this]=s set s__HellDemon_num[this]=0 if id=='nfgu' then call UnitAddPAttackTrig((this),function s__HellDemon_attack_action) elseif id=='npfl' then call ModifyUnitCrit((this),25) else call ModifyUnitDodge((this),25) endif call DestroyEffect(AddSpecialEffectTarget("DeathBladeRegeneration.mdl",(Je[(this)]),"origin")) call UnitApplyTimedLife((Je[(this)]),'Bply',40) call SetUnitVertexColor((Je[(this)]),125,125,125,$9B) call Unit_App_Counter(957,s) call Unit_App_Counter(958,this) call s__HellDemon_start(this) return this endfunction function Active_A0A7_action_c takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:578") call ModifyHeroInt(id,333) call Unit_Cancel_Counter(959,id) endfunction function Active_A0A7_action_b takes nothing returns nothing local integer data=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:579") local integer id=(GetUnitUserData((Boss_Spell_unit1[data]))) local integer i=Boss_Spell_data2[data] local real x=(GetUnitX(II[(Boss_Spell_data1[data])])) local real y=(GetUnitY(II[(Boss_Spell_data1[data])])) local real a if id!=null then loop exitwhen i==0 set i=i-1 set a=i*Lx/ Boss_Spell_data2[data]+GetRandomReal(-.15,.15) call s__HellDemon_create(id,x+$80*Cos(a),y+$80*Sin(a)) endloop endif call zhv((Kc[((id))]),75,1) call Ltv(Lfv(LAv("Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl",x,y,5),$FF,55,55,$FF)) call Ltv(Boss_Spell_data1[data]) call Boss_Spell_deallocate(data) set Boss_Spell_unit1[data]=null endfunction function Active_A0A7_action takes nothing returns nothing local integer data=Boss_Spell_allocate() local integer id=(GetUnitUserData((GetTriggerUnit()))) local integer i=16 local real x=GetSpellTargetX() local real y=GetSpellTargetY() loop set i=i-1 call Ltv(LAv("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",x+$FA*Cos(i*Lx/ 16),y+$C8*Sin(i*Lx/ 16),1.5)) exitwhen i==0 endloop set Boss_Spell_unit1[data]=(Je[(id)]) set Boss_Spell_data1[data]=LNv("Void.mdl",x,y,25,1.5) if GetSpellAbilityId()=='A0A7' then set Boss_Spell_data2[data]=4 call ModifyHeroInt((id),-333) call Unit_App_Counter(960,id) call TimerStart(NewTimer(id),100,false,function Active_A0A7_action_c) elseif GetSpellAbilityId()=='A07P' then set Boss_Spell_data2[data]=6 elseif GetSpellAbilityId()=='A0TE' then set Boss_Spell_data2[data]=8 endif call TimerStart(NewTimer(data),1.5,false,function Active_A0A7_action_b) endfunction function Active_A0A7_Init takes nothing returns nothing call RegisterSpellEffectEvent('A0A7',function Active_A0A7_action) call RegisterSpellEffectEvent('A07P',function Active_A0A7_action) call RegisterSpellEffectEvent('A0TE',function Active_A0A7_action) call SaveReal(BYHT,DroppableTimed,('ches'),((100)*1.)) call SaveReal(BYHT,DroppableTimed,('rump'),((100)*1.)) call SaveReal(BYHT,DroppableTimed,('I0E4'),((100)*1.)) endfunction function s__A0DW_kill takes integer this returns nothing call UnitRemoveAbilityandBuffBY(c4v(this),'A0DY','BNmr') call s__Trig_remove(s__A0DW_soul_t[this]) call DestroyEffectBY(s__A0DW_soul_eff[this]) call Lsv(s__A0DW_soul_model[this],.75) set s__A0DW_soul_life[this]=0 endfunction function s__A0DW_dealloc takes integer this returns nothing if s__A0DW_soul_use[this]then set s__A0DW_FL[s__A0DW_FR[this]]=s__A0DW_FL[this] set s__A0DW_FR[s__A0DW_FL[this]]=s__A0DW_FR[this] set s__A0DW_soul_use[this]=false if s__A0DW_FR[(0)]==0 then call frv(s__A0DW_func) endif call s__A0DW_kill(this) call Unit_Cancel_Counter(961,(this)) endif endfunction function s__A0DW_loop_c takes nothing returns boolean local integer this=s__A0DW_FR[(0)] local unit u local real x local real y local real d loop exitwhen this==0 if UnitAlive((Je[(this)]))then set s__A0DW_soul_timed[this]=s__A0DW_soul_timed[this]-1 set x=GetUnitX((Je[(this)])) set y=GetUnitY((Je[(this)])) call LKv(s__A0DW_soul_model[this],x) call Llv(s__A0DW_soul_model[this],y) call SetUnitFacing(II[(s__A0DW_soul_model[this])],((bj_DEGTORAD*GetUnitFacing((Je[(this)])))*1.)*bj_RADTODEG) else set s__A0DW_soul_timed[this]=0 endif call Lfv(s__A0DW_soul_model[this],0,0,$FF,R2I($FF-s__A0DW_soul_timed[this]/ 2)) if s__A0DW_soul_timed[this]<1 then call s__A0DW_dealloc(this) endif set this=s__A0DW_FR[this] endloop return false endfunction function s__A0DW_start takes integer this returns boolean if not s__A0DW_soul_use[this]then if s__A0DW_FR[(0)]==0 then if s__A0DW_func==0 then set s__A0DW_func=fxv(function s__A0DW_loop_c) endif call fov(s__A0DW_func) endif set s__A0DW_FR[this]=s__A0DW_FR[(0)] set s__A0DW_FL[this]=(0) set s__A0DW_FL[s__A0DW_FR[(0)]]=this set s__A0DW_FR[(0)]=this set s__A0DW_soul_use[this]=true call Unit_App_Counter(962,(this)) return true endif return false endfunction function s__A0DW_onShield takes nothing returns nothing local integer this=(pF) local real damage=GetDamage() if damage>0 then if s__A0DW_soul_life[this]>damage then set s__A0DW_soul_life[this]=s__A0DW_soul_life[this]-damage set KF[HF]=PF+1000000. else call DamageMinus(s__A0DW_soul_life[this]) call s__A0DW_dealloc(this) endif endif endfunction function s__A0DW_Active_skills takes nothing returns nothing local integer this=(GetUnitUserData((GetTriggerUnit()))) local real x=GetUnitX((Je[(this)])) local real y=GetUnitY((Je[(this)])) if s__A0DW_start(this)then set s__A0DW_soul_t[this]=UnitAddShieldTrigB((this),function s__A0DW_onShield) set s__A0DW_soul_model[this]=Lnv(x,y,bj_DEGTORAD*GetUnitFacing((Je[(this)]))) call LMv(s__A0DW_soul_model[this],"units\\undead\\Shade\\Shade.mdl") call SetUnitScale(II[(s__A0DW_soul_model[this])],((2)*1.),0,0) set s__A0DW_soul_eff[this]=(s__Effect_build(AddSpecialEffectTarget(("Abilities\\Weapons\\FrostWyrmMissile\\FrostWyrmMissile.mdl"),(II[s__A0DW_soul_model[this]]),("origin")))) call UnitAddAbilityBY((Je[(this)]),'A0DY') else call LKv(s__A0DW_soul_model[this],x) call Llv(s__A0DW_soul_model[this],y) call SetUnitFacing(II[(s__A0DW_soul_model[this])],((bj_DEGTORAD*GetUnitFacing((Je[(this)])))*1.)*bj_RADTODEG) endif set s__A0DW_soul_timed[this]=256 set s__A0DW_soul_life[this]=1.2*GetUnitState((Je[(this)]),UNIT_STATE_MAX_MANA)+5.*GetHeroState3((Je[(this)]),true) call Lfv(s__A0DW_soul_model[this],0,0,$FF,125) call Ltv(Lfv(LAv("Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl",x,y,1),0,0,$FF,$FF)) call Ltv(Lfv(LAv("IceNova.mdl",x,y,.3),0,0,$FF,$FF)) endfunction function s__A0DW_onInit takes nothing returns nothing call RegisterSpellEffectEvent('A0DW',function s__A0DW_Active_skills) call SaveReal(BYHT,DroppableTimed,('I0B4'),((75)*1.)) call Luv('A0DW') endfunction function s__A0IN_Alloc takes nothing returns integer return D9v(s__A0IN_func) endfunction function s__A0IN_Recycle takes integer this returns nothing call fvv(this) endfunction function s__A0IN_loop_c takes nothing returns nothing local integer this=J[s__A0IN_func] local integer data local unit u local real x local real y local real a local real d loop exitwhen 0==this set s__A0IN_count[this]=s__A0IN_count[this]-1 set data=s__A0IN_vessel[this] set x=(GetUnitX(II[(Boss_Spell_data2[data])])) set y=(GetUnitY(II[(Boss_Spell_data2[data])])) call LKv(Boss_Spell_data3[data],x+400*Cos(Lx*s__A0IN_count[this]/ 24.)) call Llv(Boss_Spell_data3[data],y+400*Sin(Lx*s__A0IN_count[this]/ 24.)) if ModuloInteger(s__A0IN_count[this],8)==0 then call GroupEnumUnitsInRange(G,x,y,400+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,400)then if IsUnitAliveAndEnemy(u,Boss_Spell_unit1[data])then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\ZigguratFrostMissile\\ZigguratFrostMissile.mdl",u,"chest")) call UnitAppBuff((GetUnitUserData((u))),'ACfn',$D0102) call UnitDamageTargetBY(((Boss_Spell_unit1[data])),((u)),((((Boss_Spell_X[data])*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop if ModuloInteger(s__A0IN_count[this],16)==0 then set a=GetRandomReal(0,Lx) set d=GetRandomReal(50,350) set x=x+d*Cos(a) set y=y+d*Sin(a) call GroupEnumUnitsInRange(G,x,y,$FA+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$FA)then if IsUnitAliveAndEnemy(u,Boss_Spell_unit1[data])then call UnitDamageTargetBY(((Boss_Spell_unit1[data])),((u)),((((4*Boss_Spell_X[data])*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call pmv(u,1) endif endif endloop call LQv(LAv("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl",x,y,2.25),1.25) call Lqv(LAv("Shiva'sWrath.mdl",x,y,2.5),1.25) endif endif if s__A0IN_count[this]<1 then call Unit_Cancel_Counter(963,Boss_Spell_data1[data]) call Ltv(Boss_Spell_data3[data]) call Ltv(Boss_Spell_data2[data]) call Boss_Spell_deallocate(data) set Boss_Spell_unit1[data]=null call fvv((this)) endif set this=K[this] endloop endfunction function s__A0IN_actions takes nothing returns nothing local integer this=(D9v(s__A0IN_func)) local integer data=Boss_Spell_allocate() local real x=GetSpellTargetX() local real y=GetSpellTargetY() local unit u set s__A0IN_vessel[this]=data set s__A0IN_count[this]=$80 set Boss_Spell_unit1[data]=GetTriggerUnit() set Boss_Spell_data1[data]=(GetUnitUserData((GetTriggerUnit()))) set Boss_Spell_data2[data]=LAv("FreezingPrison.mdl",x,y,5) set Boss_Spell_data3[data]=Lnv(x+400,y,0) set Boss_Spell_X[data]=100./ 56.*GetHeroState3(Boss_Spell_unit1[data],true) call LMv(Boss_Spell_data3[data],"Abilities\\Weapons\\ZigguratFrostMissile\\ZigguratFrostMissile.mdl") call SetUnitScale(II[(Boss_Spell_data3[data])],((4)*1.),0,0) call SetUnitFlyHeight(II[(Boss_Spell_data3[data])],((50)*1.),0) call GroupEnumUnitsInRange(G,x,y,400+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,400)then if IsUnitAliveAndEnemy(u,Boss_Spell_unit1[data])then call UnitDamageTargetBY(((Boss_Spell_unit1[data])),((u)),((((8*Boss_Spell_X[data])*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call pmv(u,2.5) endif endif endloop call Ltv(LAv("FrostNova.mdl",x,y,1.25)) call Ltv(Lfv(LAv("AncientExplode.mdx",x,y,3),0,0,$9B,$9B)) call zhv((Kc[(Boss_Spell_data1[data])]),25,.5) call Unit_App_Counter(964,Boss_Spell_data1[data]) endfunction function s__A0IN_onInit takes nothing returns nothing set s__A0IN_func=fxv(function s__A0IN_loop_c) call RegisterSpellEffectEvent('A0IN',function s__A0IN_actions) endfunction function s__A0II_Alloc takes nothing returns integer return D9v(s__A0II_func) endfunction function s__A0II_Recycle takes integer this returns nothing call fvv(this) endfunction function s__A0II_loop_c takes nothing returns nothing local integer this=J[s__A0II_func] local integer data local unit u local real x local real y local real r loop exitwhen 0==this set data=s__A0II_vessel[this] set Boss_Spell_data2[data]=Boss_Spell_data2[data]-1 if Boss_Spell_data2[data]>=96 then set r=1.-(Boss_Spell_data2[data]-96.)/ 32. call SetUnitScale(II[(Boss_Spell_data3[data])],((1+r)*1.),0,0) call SetUnitFlyHeight(II[(Boss_Spell_data3[data])],(($C8*r*r)*1.),0) call Lfv(Boss_Spell_data3[data],$FF,$FF,$FF,R2I($FF*r)) elseif ModuloInteger(Boss_Spell_data2[data],24)==0 then set x=(GetUnitX(II[(Boss_Spell_data3[data])])) set y=(GetUnitY(II[(Boss_Spell_data3[data])])) if(LoadBoolean(BYHT,EquipSlot_R[EquipSlot[(Boss_Spell_data1[data])]],('I0DI')))and Boss_Spell_data2[data]<1 then call GroupEnumUnitsInRange(G,x,y,525+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,525)then if IsUnitAliveAndEnemy(u,Boss_Spell_unit1[data])then call UnitDamageTargetBY(((Boss_Spell_unit1[data])),((u)),((((6*Boss_Spell_X[data])*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call UnitAppBuff((GetUnitUserData((u))),'A0PA',$D00CB) call m2v(u,1.5,'A500','B500',true) elseif IsUnitAllyNotbag(u,Boss_Spell_unit1[data])then call TimerDestroyAddSpecialEffectTargetBY("Abilities\\Spells\\Items\\AIhe\\AIheTarget.mdl",u,"origin",1.75) call UnitCureTaret(null,u,5000+.25*GetUnitMaxLifeById((GetUnitUserData((u))))) endif endif endloop call Ltv(Lfv(LAv("AncientExplode.mdl",x,y,2.25),$9B,$FF,$9B,125)) call Ltv(LAv("ForestBolt.mdl",x,y,3.75)) else call GroupEnumUnitsInRange(G,x,y,525+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,525)then if IsUnitAliveAndEnemy(u,Boss_Spell_unit1[data])then call UnitDamageTargetBY(((Boss_Spell_unit1[data])),((u)),((((Boss_Spell_X[data])*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call UnitAppBuff((GetUnitUserData((u))),'A0PA',$D00CB) elseif IsUnitAllyNotbag(u,Boss_Spell_unit1[data])then call UnitCureTaret(null,u,$4E2+.075*GetUnitMaxLifeById((GetUnitUserData((u))))) call TimerDestroyAddSpecialEffectTargetBY("Abilities\\Spells\\Items\\AIhe\\AIheTarget.mdl",u,"origin",1.75) endif endif endloop call Ltv(LNv("EarthNova.mdl",x,y,(GetUnitFlyHeight(II[(Boss_Spell_data3[data])])),.875)) endif if Boss_Spell_data2[data]<1 then call Unit_Cancel_Counter(965,Boss_Spell_data1[data]) call Lsv(Boss_Spell_data3[data],.5) call Boss_Spell_deallocate(data) set Boss_Spell_unit1[data]=null call fvv((this)) endif endif set this=K[this] endloop endfunction function s__A0II_actions takes nothing returns nothing local integer this=(D9v(s__A0II_func)) local integer data=Boss_Spell_allocate() set s__A0II_vessel[this]=data set Boss_Spell_unit1[data]=GetTriggerUnit() set Boss_Spell_data1[data]=(GetUnitUserData((GetTriggerUnit()))) set Boss_Spell_data3[data]=Lnv(GetUnitX(Boss_Spell_unit1[data]),GetUnitY(Boss_Spell_unit1[data]),0) call LMv(Boss_Spell_data3[data],"EmeraldCore.mdl") set Boss_Spell_data2[data]=$80 set Boss_Spell_X[data]=12.5*GetHeroState3(Boss_Spell_unit1[data],true) call Ltv(Lfv(LAv("Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl",(GetUnitX(II[(Boss_Spell_data3[data])])),(GetUnitY(II[(Boss_Spell_data3[data])])),2.5),55,$FF,55,$FF)) call Lfv(Boss_Spell_data3[data],$FF,$FF,$FF,0) call Unit_App_Counter(966,Boss_Spell_data1[data]) endfunction function s__A0II_onInit takes nothing returns nothing call RegisterSpellEffectEvent('A0II',function s__A0II_actions) call SaveReal(BYHT,DroppableTimed,('I0DH'),((75)*1.)) call SaveReal(BYHT,DroppableTimed,('I0DI'),((75)*1.)) set s__A0II_func=fxv(function s__A0II_loop_c) endfunction function Active_A094_Action takes nothing returns nothing local unit c=GetTriggerUnit() local unit u=GetSpellTargetUnit() local integer i=Equip_gobm_Remove((GetUnitUserData((u)))) local real x local real y if i==0 then call IssueUnitStop_DisplayText(c,"Can not be reused") else set x=GetUnitX(u) set y=GetUnitY(u) if i>4 then call Ltv(Lfv(LAv("CenarionFury.mdl",x,y,3),0,$9B,0,$FF)) call Ltv(LAv("DesecrateGreen.mdl",x,y,2)) call zKv((Kc[(GetUnitUserData((c)))]),125,$FF,125,1) call zhv((Kc[(GetUnitUserData((c)))]),50,1) endif call UnitDamageTargetBY(((c)),((u)),((((8.5*i*GetHeroState2(c,true))*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($A+.5*i)*1.))*1.),(("|c002d8017"))) call Ltv(Lfv(LAv("CenarionFury.mdl",x,y,1.5),0,$9B,0,$FF)) call DestroyEffect(AddSpecialEffectTarget("CurseBoltGreen.mdl",u,"chest")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\ChimaeraAcidMissile\\ChimaeraAcidMissile.mdl",u,"chest")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\ChimaeraAcidMissile\\ChimaeraAcidMissile.mdl",u,"chest")) endif set c=null set u=null endfunction function Active_A094_Init takes nothing returns nothing call RegisterSpellEffectEvent('A094',function Active_A094_Action) call SaveReal(BYHT,DroppableTimed,('gobm'),((100)*1.)) endfunction function s__A0R0_removebuff takes nothing returns nothing local integer this=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:580") if s__A0R0_buff_atk[this]==0 then call HeroAddExtraAgi((this),-s__A0R0_buff_agi[this]) call ModifyUnitCrit((this),-$A) call UnitRemoveAbilityandBuffBY((Je[(this)]),'A0CI','Bbar') else call UnitRemoveAbilityandBuffBY((Je[(this)]),'A0R1','B06F') call s__Trig_remove((s__A0R0_buff_atk[this])) endif call Unit_Cancel_Counter(967,(this)) set s__A0R0_buff_timer[this]=null endfunction function s__A0R0_onattack takes nothing returns nothing local integer this=(pF) local real m=GetUnitState((MF),UNIT_STATE_MAX_LIFE) local real damage=GetDamage() if(mF)!=(MF)and damage>.1*m then if damage>m then set s__A0R0_buff_agi[this]=R2I(.3*GetHeroAgiNotExtra((this))) call UnitDamageTargetBY((((MF))),(((mF))),((((2*m)*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($F)*1.))*1.),(("|c00b1f8a5"))) else set s__A0R0_buff_agi[this]=R2I((.15+.15*damage/ m)*GetHeroAgiNotExtra((this))) call UnitDamageTargetBY((((MF))),(((mF))),((((2*damage)*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($F)*1.))*1.),(("|c00b1f8a5"))) endif if s__A0R0_buff_agi[this]>$4E2 then set s__A0R0_buff_agi[this]=$4E2 endif call DestroyEffect(AddSpecialEffectTarget("CurseBoltGreen.mdl",(MF),"chest")) call NewTextTagInTarget_B((MF),"|c0080ff80BLOCK ("+I2S(R2I(GetDamage()))+")",$F,$FF,$FF,$FF) call Ltv(LAv("DesecrateGreen.mdl",GetUnitX((MF)),GetUnitY((MF)),.875)) call m1v((mF),7.5) set KF[HF]=PF+1000000. call PlaySoundOnUnit_BJ((s__A0R0_snd_SargerasLaugh),((125)*1.),((MF))) call UnitRemoveAbilityandBuffBY((MF),'A0R1','B06F') call UnitAddAbilityBY((MF),'A0CI') call HeroAddExtraAgi((this),s__A0R0_buff_agi[this]) call ModifyUnitCrit((this),$A) call zhv((Kc[((this))]),40,.5) call zKv((Kc[((this))]),$CD,$FF,$CD,.27) call TimerStart(s__A0R0_buff_timer[this],$F,false,function s__A0R0_removebuff) call s__Trig_remove((s__A0R0_buff_atk[this])) set s__A0R0_buff_atk[this]=0 endif endfunction function s__A0R0_actions takes nothing returns nothing local integer this=(GetUnitUserData((GetTriggerUnit()))) set s__A0R0_buff_atk[this]=UnitAddBeDamagerTrigB((this),function s__A0R0_onattack) set s__A0R0_buff_timer[this]=NewTimer(this) set s__A0R0_buff_agi[this]=0 call UnitAddAbilityBY((Je[(this)]),'A0R1') call TimerStart(s__A0R0_buff_timer[this],6,false,function s__A0R0_removebuff) call Unit_App_Counter(968,(this)) endfunction function s__A0R0_onInit takes nothing returns nothing call RegisterSpellEffectEvent('A0R0',function s__A0R0_actions) call SaveReal(BYHT,DroppableTimed,('rat3'),((105)*1.)) set s__A0R0_snd_SargerasLaugh=CreateSound_BJ("Sound\\Ambient\\DoodadEffects\\SargerasLaugh.wav",false,true,true,$A,$A,"DefaultEAXON") call SetSoundParamsFromLabel_BJ(s__A0R0_snd_SargerasLaugh,"SargerasLaugh") call SetSoundDuration_BJ(s__A0R0_snd_SargerasLaugh,$CFE) endfunction function Active_A0FC_Removebuff takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:581") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0HU','B01F') call ModifyUnitHP((id),-$4E20) call ModifyUnitMP((id),-7500) call Unit_Cancel_Counter(969,(id)) endfunction function Active_A0FC_Addbuff takes unit u returns nothing local integer id=(GetUnitUserData((u))) if UnitAddAbilityBY((Je[(id)]),'A0HU')then call ModifyUnitHP((id),$4E20) call ModifyUnitMP((id),7500) call TimerStart(NewTimer(id),$F,true,function Active_A0FC_Removebuff) call Unit_App_Counter(970,(id)) endif endfunction function Active_A0FC_Action takes nothing returns nothing local unit u=GetTriggerUnit() call Active_A0FC_Addbuff(u) call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",u,"origin")) call PlaySoundOnUnit_BJ((hn),((125)*1.),(u)) set u=null endfunction function Active_A0FC_Init takes nothing returns nothing call RegisterSpellEffectEvent('A0FC',function Active_A0FC_Action) call SaveReal(BYHT,DroppableTimed,('I0CP'),(($B4)*1.)) endfunction function s__A0RL_remove takes nothing returns nothing local integer this=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:582") if s__A0RL_bufftimer[this]!=null then call UnitRemoveAbilityandBuffBY((Je[(this)]),'A0RK','B06O') call DeUnitAdef((this),s__A0RL_Aurabuff[this]) call Unit_Cancel_Counter(971,(this)) set s__A0RL_Aurabuff[this]=0 set s__A0RL_bufftimer[this]=null endif endfunction function s__A0RL_addbuff takes unit u returns nothing local integer this=(GetUnitUserData((u))) if s__A0RL_bufftimer[this]==null then set s__A0RL_bufftimer[this]=NewTimer(this) set s__A0RL_Aurabuff[this]=ModifyUnitAdef((this),30.) call UnitAddAbilityBY(u,'A0RK') call Unit_App_Counter(972,(this)) endif call TimerStart(s__A0RL_bufftimer[this],1,false,function s__A0RL_remove) endfunction function s__A0RL_Recycle takes integer this returns nothing if s__A0RL_AuraUnit[this]!=null then set s__A0RL_AuraUnit[this]=0 set s__A0RL_FR[s__A0RL_FL[this]]=s__A0RL_FR[this] set s__A0RL_FL[s__A0RL_FR[this]]=s__A0RL_FL[this] if s__A0RL_FR[(0)]==(0)then call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:583") endif endif endfunction function s__A0RL_loop_c takes nothing returns nothing local integer this=s__A0RL_FR[(0)] local unit u local real x local real y loop exitwhen(0)==this if UnitAlive((Je[(s__A0RL_AuraUnit[this])]))and s__A0RL_AuraDuration[this]>1 then set s__A0RL_AuraDuration[this]=s__A0RL_AuraDuration[this]-1 set x=GetUnitX((Je[(s__A0RL_AuraUnit[this])])) set y=GetUnitY((Je[(s__A0RL_AuraUnit[this])])) call LKv(s__A0RL_AuraModelA[this],x) call Llv(s__A0RL_AuraModelA[this],y) call LKv(s__A0RL_AuraModelB[this],x) call Llv(s__A0RL_AuraModelB[this],y) if ModuloInteger(s__A0RL_AuraDuration[this],R2I(32*.25))==0 then call GroupEnumUnitsInRange(G,x,y,s__A0RL_Range+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,s__A0RL_Range)then if IsUnitAllyNotbag(u,(Je[(s__A0RL_AuraUnit[this])]))then call s__A0RL_addbuff(u) endif endif endloop endif else set s__A0RL_AuraDuration[this]=0 endif if s__A0RL_AuraDuration[this]<1 then call ModifyUnitHP(s__A0RL_AuraUnit[this],-$C350) call ModifyUnitMP(s__A0RL_AuraUnit[this],-$4E20) call Unit_Cancel_Counter(973,s__A0RL_AuraUnit[this]) call Ltv(s__A0RL_AuraModelA[this]) call Ltv(s__A0RL_AuraModelB[this]) call s__A0RL_Recycle(this) endif set this=s__A0RL_FR[this] endloop endfunction function s__A0RL_Alloc takes integer this returns boolean if s__A0RL_AuraUnit[this]==null then if s__A0RL_FR[(0)]==(0)then call TimerStart((NewTimer(0)),.03125,true,function s__A0RL_loop_c) endif set s__A0RL_FR[this]=s__A0RL_FR[(0)] set s__A0RL_FL[this]=(0) set s__A0RL_FL[s__A0RL_FR[(0)]]=this set s__A0RL_FR[(0)]=this set s__A0RL_AuraUnit[this]=this return true endif return false endfunction function s__A0RL_actions takes nothing returns nothing local integer this=(GetUnitUserData((GetTriggerUnit()))) if this>0 and s__A0RL_Alloc(this)then set s__A0RL_AuraModelA[this]=LAv("GreenChakra.mdl",GetUnitX((Je[(s__A0RL_AuraUnit[this])])),GetUnitY((Je[(s__A0RL_AuraUnit[this])])),3) set s__A0RL_AuraModelB[this]=LAv("EarthlyEminence.mdl",(GetUnitX(II[(s__A0RL_AuraModelA[this])])),(GetUnitY(II[(s__A0RL_AuraModelA[this])])),4) set s__A0RL_AuraDuration[this]=R2I(32*15.) call Ltv(LAv("NatureWave.mdl",(GetUnitX(II[(s__A0RL_AuraModelA[this])])),(GetUnitY(II[(s__A0RL_AuraModelA[this])])),2)) call ModifyUnitHP(s__A0RL_AuraUnit[this],$C350) call ModifyUnitMP(s__A0RL_AuraUnit[this],$4E20) call Unit_App_Counter(974,s__A0RL_AuraUnit[this]) endif endfunction function s__A0RL_onInit takes nothing returns nothing call RegisterSpellEffectEvent('A0RL',function s__A0RL_actions) call SaveReal(BYHT,DroppableTimed,('esaz'),((125)*1.)) endfunction function Summon_h00L_onAttack takes nothing returns boolean local real x=GetUnitX((MF)) local real y=GetUnitY((MF)) local unit u call GroupEnumUnitsInRange(G2,x,y,675,null) call GroupRemoveUnit(G2,(MF)) loop set u=FirstOfGroup(G2) exitwhen u==null call GroupRemoveUnit(G2,u) if IsUnitInRangeXY(u,x,y,600)and IsUnitAliveAndEnemy(u,(mF))then call UnitDamageTargetBY((((mF))),((u)),((((GetDamage())*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) endif endloop call Ltv(LAv("FireNova.mdl",x,y,1.25)) return false endfunction function Summon_h00L_Init takes nothing returns nothing set bj_lastCreatedUnit=GetSummonedUnit() endfunction function Active_A0CZ_SpellChannel takes nothing returns nothing call Ltv(LAv("Abilities\\Spells\\Human\\FlameStrike\\FlameStrikeTarget.mdl",GetSpellTargetX(),GetSpellTargetY(),2)) endfunction function Active_A0CZ_SpellEffect takes nothing returns nothing local unit c=GetTriggerUnit() local unit u local integer id local integer i=5 local real x=GetSpellTargetX() local real y=GetSpellTargetY() local real d=30*GetHeroState3(c,true) local real a call GroupEnumUnitsInRange(G,x,y,675,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,600)and IsUnitAliveAndEnemy(u,c)then call UnitDamageTargetBY(((c)),((u)),((((d)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v(u,1) endif endloop loop set i=i-1 set a=Lx*i/ 5 call Ltv(LAv("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",x+350*Cos(a),y+350*Sin(a),2)) call Lqv(LAv("Objects\\Spawnmodels\\Human\\SmallFlameSpawn\\SmallFlameSpawn.mdl",x+350*Cos(a),y+350*Sin(a),2.5),7.5) exitwhen i==0 endloop call Ltv(LAv("FireNova.mdx",x,y,1.5)) call Ltv(LAv("Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl",x,y,2)) call Lqv(LAv("Objects\\Spawnmodels\\Human\\SmallFlameSpawn\\SmallFlameSpawn.mdl",x,y,5),7.5) call zhv((GetPlayerId((GetOwningPlayer(c)))),40,.5) set bj_lastCreatedUnit=null call Auxiliary_PointOrder(('A0D3'),GetOwningPlayer(c),1,$D0108,x,y) if bj_lastCreatedUnit!=null then set id=(GetUnitUserData((bj_lastCreatedUnit))) call SummonedUnitSetMaster(id,(GetUnitUserData((c)))) call UnitAddPAttackTrig(id,function Summon_h00L_onAttack) call ModifyUnitHP(id,5*GetHeroState3(c,true)) endif set c=null endfunction function Active_A0IU_SpellEffect_c takes nothing returns nothing local integer data=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:584") local integer master=Boss_Spell_data1[data] local integer fx=Boss_Spell_data2[data] local real x=(GetUnitX(II[((fx))])) local real y=(GetUnitY(II[((fx))])) local real d=Boss_Spell_Z[data] local unit u call GroupEnumUnitsInRange(G,x,y,325,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$FA)and IsUnitAliveAndEnemy(u,(Je[(master)]))then call UnitDamageTargetBY((((Je[(master)]))),((u)),((((d)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v(u,1) endif endloop call zhv(Boss_Spell_data3[data],30,.5) call Ltv((fx)) call Unit_Cancel_Counter(975,master) call Boss_Spell_deallocate(data) endfunction function Active_A0IU_SpellEffect takes nothing returns nothing local integer data=Boss_Spell_allocate() local integer master=(Master[((GetUnitUserData((GetTriggerUnit()))))]) local integer fx=LAv("MeteorStrike.mdx",GetSpellTargetX(),GetSpellTargetY(),.75) local real d=30*GetHeroState3((Je[(master)]),true) if d<$7530 then set d=$7530 endif set Boss_Spell_data1[data]=master set Boss_Spell_data2[data]=fx set Boss_Spell_data3[data]=GetPlayerId(GetTriggerPlayer()) set Boss_Spell_Z[data]=d call Lqv(LAv("Abilities\\Spells\\Human\\FlameStrike\\FlameStrikeTarget.mdl",GetSpellTargetX(),GetSpellTargetY(),1.25),.5) call TimerStart(NewTimer(data),.75,false,function Active_A0IU_SpellEffect_c) call Unit_App_Counter(976,master) endfunction function Active_A0IU_Init takes nothing returns nothing call RegisterSummonEvent('h00L',function Summon_h00L_Init) call RegisterSpellChannelEvent('A0CZ',function Active_A0CZ_SpellChannel) call RegisterSpellEffectEvent('A0CZ',function Active_A0CZ_SpellEffect) call RegisterSpellEffectEvent('A0IU',function Active_A0IU_SpellEffect) call SaveReal(BYHT,DroppableTimed,('I092'),(($B4)*1.)) endfunction function Active_A0JX_removebuff takes integer id returns nothing if Active_A0JX_App_matk[id]then set Active_A0JX_App_matk[id]=false call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0JU','B03N') call ModifyUnitMagicDamage((id),-$A) endif if Active_A0JX_App_def[id]then set Active_A0JX_App_def[id]=false call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0JV','B03O') call DeUnitAdef((id),Active_A0JX_Adef[id]) endif if Active_A0JX_App_regen[id]then set Active_A0JX_App_regen[id]=false call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0JW','B03P') endif endfunction function Active_A0JX_Addbuff takes integer id,integer i returns nothing local boolean a=i==1 or i==4 local boolean b=i==2 or i==4 local boolean c=i==3 or i==4 local string s="" set Active_A0JX_duration[id]=8 if a and not Active_A0JX_App_matk[id]then set Active_A0JX_App_matk[id]=true set s="|c00ff8080+10% Skill damage" call UnitAddAbilityBY((Je[(id)]),'A0JU') call ModifyUnitMagicDamage((id),$A) endif if b and not Active_A0JX_App_def[id]then set Active_A0JX_App_def[id]=true set Active_A0JX_Adef[id]=ModifyUnitAdef((id),16) if s=="" then set s="|c00adb3f5+16% Damage reduction" else set s=s+" |c00adb3f5+16% 减伤" endif call UnitAddAbilityBY((Je[(id)]),'A0JV') endif if c and not Active_A0JX_App_regen[id]then set Active_A0JX_App_regen[id]=true if s=="" then set s="|c0080ff80+Regeneration" else set s=s+" |c0080ff80+恢复速度" endif call UnitAddAbilityBY((Je[(id)]),'A0JW') endif call NewTextTagInTarget_B((Je[(id)]),s,9,$FF,$FF,$FF) call TimerStart(Active_A0JX_Timer[id],1,true,Active_A0JX_Loop_Func) endfunction function Active_A0JX_Loop_c takes nothing returns nothing local integer id=(alloc__hpv(GetHandleId((GetExpiredTimer())))) if UnitAlive((Je[(id)]))then set Active_A0JX_duration[id]=Active_A0JX_duration[id]-1 if Active_A0JX_App_regen[id]then call UnitCureTaret((Je[(id)]),(Je[(id)]),.2*GetHeroPropertiesByAll((id))) endif if Active_A0JX_duration[id]<1 then call Active_A0JX_removebuff(id) call Active_A0JX_Addbuff(id,GetRandomInt(1,3)) endif else set Active_A0JX_duration[id]=8 call Active_A0JX_removebuff(id) endif endfunction function Active_A0JX_App takes integer id returns nothing set Active_A0JX_count[id]=Active_A0JX_count[id]+1 if Active_A0JX_count[id]==1 and Active_A0JX_Timer[id]==null then set Active_A0JX_Timer[id]=NewTimer(id) set Active_A0JX_duration[id]=8 call TimerStart(Active_A0JX_Timer[id],1,true,Active_A0JX_Loop_Func) call Unit_App_Counter(977,(id)) endif endfunction function Active_A0JX_Cancel takes integer id returns nothing set Active_A0JX_count[id]=Active_A0JX_count[id]-1 if Active_A0JX_count[id]==0 and Active_A0JX_Timer[id]!=null then call ReleaseTimer(Active_A0JX_Timer[id],"[TimerUtils]Error:585") call Active_A0JX_removebuff(id) call Unit_Cancel_Counter(978,(id)) set Active_A0JX_Timer[id]=null endif endfunction function Active_A0JX_onSpellEffect takes nothing returns boolean local integer id=(GetUnitUserData((GetTriggerUnit()))) local real x=GetUnitX((Je[(id)])) local real y=GetUnitY((Je[(id)])) if Active_A0JX_Timer[id]!=null then call Active_A0JX_Addbuff(id,4) endif call zhv((Kc[(id)]),50,.5) call Ltv(LAv("BlackChakraExplosion.mdl",x,y,1.5)) call Ltv(LAv("DarkWave.mdl",x,y,1.5)) return false endfunction function Active_A0JX_Init takes nothing returns nothing call RegisterSpellEffectEvent('A0JX',function Active_A0JX_onSpellEffect) call SaveReal(BYHT,DroppableTimed,('rat9'),((90)*1.)) call SaveReal(BYHT,DroppableTimed,('I0D9'),((90)*1.)) set Active_A0JX_Loop_Func=function Active_A0JX_Loop_c endfunction function Active_A0C9_Timed_Actions takes nothing returns nothing local integer data=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local unit u local real x local real y set Boss_Spell_data3[data]=Boss_Spell_data3[data]-1 set x=(GetUnitX(II[(Boss_Spell_data2[data])])) set y=(GetUnitY(II[(Boss_Spell_data2[data])])) if ModuloInteger(Boss_Spell_data3[data],4)==0 then call LFv(Boss_Spell_data2[data],"ToxicField.mdl") endif call GroupEnumUnitsInRange(G,x,y,375+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,375)then if IsUnitAliveAndEnemy(u,(Je[(Boss_Spell_data1[data])]))then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\AcidBomb\\BottleMissile.mdl",u,"chest")) call UnitDamageTargetBY((((Je[(Boss_Spell_data1[data])]))),((u)),((((Boss_Spell_X[data])*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call UnitAppBuff((GetUnitUserData((u))),'A0CA',$D006B) endif endif endloop if Boss_Spell_data3[data]<1 then call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:586") call Boss_Spell_deallocate(data) call Unit_Cancel_Counter(979,Boss_Spell_data1[data]) call Ltv(Boss_Spell_data2[data]) endif endfunction function Active_A0C9_onSpellEffect takes nothing returns nothing local integer data=Boss_Spell_allocate() local real x=GetSpellTargetX() local real y=GetSpellTargetY() set Boss_Spell_data1[data]=(GetUnitUserData((GetTriggerUnit()))) set Boss_Spell_data2[data]=LAv("ToxicField.mdl",x,y,.9) set Boss_Spell_data3[data]=16 set Boss_Spell_X[data]=5*GetHeroState3((Je[(Boss_Spell_data1[data])]),true) call Ltv(LAv("Acid Ex.mdl",x,y,2.5)) call Lqv(LAv("Abilities\\Spells\\Undead\\Darksummoning\\DarkSummonTarget.mdl",x,y,3),1) call Ltv(Lfv(LAv("Abilities\\Spells\\Undead\\DarkRitual\\DarkRitualTarget.mdl",x,y,3.5),55,$FF,55,$CD)) call TimerStart(NewTimer(data),.5,true,function Active_A0C9_Timed_Actions) call zhv((GetPlayerId((GetOwningPlayer((Je[(Boss_Spell_data1[data])]))))),30,.4) call Unit_App_Counter(980,Boss_Spell_data1[data]) endfunction function Active_A0C9_Init takes nothing returns nothing call RegisterSpellEffectEvent('A0C9',function Active_A0C9_onSpellEffect) endfunction function s__A0QT_start takes integer this returns nothing call fov(s__A0QT_func) endfunction function s__A0QT_stop takes integer this returns nothing call frv(s__A0QT_func) endfunction function s__A0QT_impact takes integer this returns nothing if UnitAlive(s__barrage_target[this])then call UnitDamageTargetBY(((s__barrage_atkunit[this])),((s__barrage_target[this])),((((s__A0QT_damage[this])*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($F)*1.))*1.),(("|c00c83e3e"))) call m1v(s__barrage_target[this],1.) endif call zhv((GetPlayerId((GetOwningPlayer(s__barrage_atkunit[this])))),25,.5) call Ltv(LAv("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",GetUnitX(s__barrage_target[this]),GetUnitY(s__barrage_target[this]),2.5)) call DestroyEffectBY(s__A0QT_eff[this]) endfunction function s__A0QT_proc takes integer this returns nothing call s__A0QT_impact(this) call RemoveBarrage(this) endfunction function s__A0QT_Barrage_loop_c takes nothing returns nothing local integer this=s__barrage_FR[s__A0QT_launcher] local unit u if this!=s__A0QT_launcher then call UseBarrage(s__A0QT_launcher) loop exitwhen this==s__A0QT_launcher if(s__barrage_outside[(this)])then call s__A0QT_proc(this) elseif(s__barrage_finish[(this)])then call s__A0QT_proc(this) endif set this=s__barrage_FR[this] endloop elseif s__barrage_InOperation[s__A0QT_launcher]then set s__barrage_InOperation[s__A0QT_launcher]=false call s__A0QT_stop(this) endif endfunction function s__A0QT_FiredBarrage takes integer this returns nothing call s__barrage_Filling((s__A0QT_launcher),(this)) if not s__barrage_InOperation[s__A0QT_launcher]then set s__barrage_InOperation[s__A0QT_launcher]=true call s__A0QT_start(this) endif endfunction function s__A0QT_Tm_Loop takes nothing returns nothing local integer data=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer fx local integer this local integer i if UnitAlive((Je[(Boss_Spell_data1[data])]))then set Boss_Spell_data3[data]=Boss_Spell_data3[data]-1 set fx=LoadInteger(BYHT,Boss_Spell_data2[data],ModuloInteger(Boss_Spell_data3[data],4)) set this=CreateBarrageTypeC((GetUnitX(II[(fx)])),(GetUnitY(II[(fx)])),(GetUnitFlyHeight(II[(fx)])),(Je[(Boss_Spell_data1[data])])) call LMv(s__barrage_model[this],"Abilities\\Weapons\\DemonHunterMissile\\DemonHunterMissile.mdl") call SetUnitScale(II[(s__barrage_model[this])],((3)*1.),0,0) set s__barrage_atkunit[this]=Boss_Spell_unit1[data] set s__barrage_speed[this]=.03125*1500. set s__A0QT_damage[this]=10.*GetHeroState3(Boss_Spell_unit1[data],true) set s__A0QT_eff[this]=(s__Effect_build(AddSpecialEffectTarget(("Abilities\\Weapons\\RedDragonBreath\\RedDragonMissile.mdl"),(II[s__barrage_model[this]]),("origin")))) call Lfv(s__barrage_model[this],$FF,25,25,$FF) call s__A0QT_FiredBarrage(this) else set Boss_Spell_data3[data]=0 endif if Boss_Spell_data3[data]<1 then set i=4 loop exitwhen i==0 set i=i-1 call Lsv((LoadInteger(BYHT,Boss_Spell_data2[data],i)),1) endloop call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:587") call Unit_Cancel_Counter(981,GetHandleId(Boss_Spell_unit2[data])) call Unit_Cancel_Counter(982,Boss_Spell_data1[data]) call free(Boss_Spell_data2[data]) call Boss_Spell_deallocate(data) set Boss_Spell_unit1[data]=null set Boss_Spell_unit2[data]=null endif endfunction function s__A0QT_onSpellEffect takes nothing returns nothing local integer data=Boss_Spell_allocate() local integer c=(GetUnitUserData((GetTriggerUnit()))) local integer i=4 local integer fx local real x local real y local real a set Boss_Spell_unit1[data]=(Je[(c)]) set Boss_Spell_unit2[data]=ConvertVersion(c) set Boss_Spell_data1[data]=(GetUnitUserData((GetSpellTargetUnit()))) set Boss_Spell_data2[data]=malloc() set Boss_Spell_data3[data]=16 set x=GetUnitX(Boss_Spell_unit1[data]) set y=GetUnitY(Boss_Spell_unit1[data]) loop exitwhen i==0 set i=i-1 set a=i*Lx/ 4+GetRandomReal(-1,1)*bj_DEGTORAD*20. set fx=Lnv(x-500.*Cos(a),y-500.*Sin(a),a) call LMv(fx,"Doodads\\Cinematic\\EyeOfSargeras\\EyeOfSargeras.mdl") call SetUnitScale(II[(fx)],((2)*1.),0,0) call SetUnitFlyHeight(II[(fx)],((400+GetRandomReal(-1,1)*200.)*1.),0) call SaveInteger(BYHT,Boss_Spell_data2[data],i,fx) call LFv(fx,"Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl") call Lfv(fx,$CD,$F,$F,$FF) endloop call TimerStart(NewTimer(data),2./ 16,true,function s__A0QT_Tm_Loop) call Unit_App_Counter(983,(c)) call Unit_App_Counter(984,Boss_Spell_data1[data]) endfunction function s__A0QT_onInit takes nothing returns nothing set s__A0QT_launcher=NewLauncher() set s__barrage_InOperation[s__A0QT_launcher]=false set s__A0QT_func=fxv(function s__A0QT_Barrage_loop_c) call RegisterSpellEffectEvent('A0QT',function s__A0QT_onSpellEffect) call SaveReal(BYHT,DroppableTimed,('kybl'),((75)*1.)) endfunction function s__A0QR_impact takes integer this returns boolean local real x=(GetUnitX(II[(s__barrage_model[this])])) local real y=(GetUnitY(II[(s__barrage_model[this])])) local real d=$30D4+50*GetHeroState3(s__barrage_atkunit[this],true) local unit u call GroupEnumUnitsInRange(G,x,y,350+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,350)then if IsUnitAliveAndEnemy(u,s__barrage_atkunit[this])then call UnitDamageTargetBY(((s__barrage_atkunit[this])),((u)),((((d)*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($F)*1.))*1.),(("|c00ea4f3e"))) call m1v(u,4) endif endif endloop call UnitCureTaret(null,s__barrage_atkunit[this],$3A98) call Ltv(LAv("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",x,y,2.5)) call Ltv(Lfv(LAv("AncientExplode.mdl",x,y,1.25),$FF,55,55,$FF)) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\HealingSpray\\HealBottleMissile.mdl",s__barrage_atkunit[this],"chest")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\HealingSpray\\HealBottleMissile.mdl",s__barrage_atkunit[this],"chest")) return true endfunction function s__A0QR_proc takes integer this returns nothing call RemoveBarrage(this) endfunction function s__A0QR_start takes nothing returns nothing local integer this=s__barrage_FR[s__A0QR_launcher] local unit u if this!=s__A0QR_launcher then call UseBarrage(s__A0QR_launcher) loop exitwhen this==s__A0QR_launcher if(s__barrage_outside[(this)])then call RemoveBarrage((this)) call RemoveBarrage((this)) elseif(s__barrage_finish[(this)])then if s__A0QR_impact(this)then call RemoveBarrage((this)) else set s__barrage_finish[(this)]=false endif endif set this=s__barrage_FR[this] endloop elseif s__barrage_InOperation[s__A0QR_launcher]then set s__barrage_InOperation[s__A0QR_launcher]=false call frv(s__A0QR_func) endif endfunction function s__A0QR_FiredBarrage takes integer this returns nothing call s__barrage_Filling((s__A0QR_launcher),(this)) if not s__barrage_InOperation[s__A0QR_launcher]then set s__barrage_InOperation[s__A0QR_launcher]=true call fov(s__A0QR_func) endif endfunction function s__A0QR_onSpell takes nothing returns nothing local integer this=CreateBarrageTypeA(GetTriggerUnit(),GetSpellTargetUnit()) call LMv(s__barrage_model[this],"PumpkinNightmare_Projectile.mdl") call SetUnitScale(II[(s__barrage_model[this])],((2.5)*1.),0,0) set s__barrage_speed[this]=.03125*1500. call SetBarrageFlightRadianEZ(this,.15) call Lfv(s__barrage_model[this],$FF,55,55,$FF) call s__A0QR_FiredBarrage(this) endfunction function s__A0QR_onInit takes nothing returns nothing set s__A0QR_launcher=NewLauncher() set s__barrage_InOperation[s__A0QR_launcher]=false set s__A0QR_func=fxv(function s__A0QR_start) call RegisterSpellEffectEvent('A0QR',function s__A0QR_onSpell) call SaveReal(BYHT,DroppableTimed,('rde4'),((75)*1.)) endfunction function Active_A0DR_RemoveBuff takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:588") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0G7','BUsl') call ModifyUnitMpRegen((id),-300) call ModifyUnitMagicDamage((id),-$A) call Unit_Cancel_Counter(985,(id)) endfunction function Active_A0DR_AddBuff takes unit u returns nothing local integer id=(GetUnitUserData((u))) if UnitAddAbilityBY((Je[(id)]),'A0G7')then call ModifyUnitMpRegen((id),300) call ModifyUnitMagicDamage((id),$A) call TimerStart(NewTimer(id),30,true,function Active_A0DR_RemoveBuff) call Unit_App_Counter(986,(id)) endif endfunction function Active_A0DQ_RemoveBuff takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:589") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0FO','BUts') call ModifyUnitMpRegen((id),-$FA) call Unit_Cancel_Counter(987,(id)) endfunction function Active_A0DQ_AddBuff takes unit u returns nothing local integer id=(GetUnitUserData((u))) if UnitAddAbilityBY((Je[(id)]),'A0FO')then call ModifyUnitMpRegen((id),$FA) call TimerStart(NewTimer(id),18,true,function Active_A0DQ_RemoveBuff) call Unit_App_Counter(988,(id)) endif endfunction function Active_A0DP_Actions takes nothing returns nothing local unit u=GetTriggerUnit() local integer abilityid=GetSpellAbilityId() if LastSpellAbilityId[(GetUnitUserData((u)))]==0 then call NewTextTagInTarget_B(u,"Skills for the initial state",8,$CD,$FF,$9B) call IssueImmediateOrderById(u,$D0004) else call NewTextTagInTarget_B(u,"Skill has been refreshed",7.5,$CD,$FF,$9B) call UnitResetCooldownById(u,LastSpellAbilityId[(GetUnitUserData((u)))]) call DestroyEffect(AddSpecialEffectTarget("Enchantment.mdl",u,"origin")) if abilityid=='A0DQ' then call Active_A0DQ_AddBuff(u) elseif abilityid=='A0DR' then call Active_A0DR_AddBuff(u) endif endif set u=null endfunction function Active_A0DP_Init takes nothing returns nothing call RegisterSpellEffectEvent('A0DP',function Active_A0DP_Actions) call RegisterSpellEffectEvent('A0DQ',function Active_A0DP_Actions) call RegisterSpellEffectEvent('A0DR',function Active_A0DP_Actions) call SaveReal(BYHT,DroppableTimed,('I0AZ'),(($96)*1.)) call SaveReal(BYHT,DroppableTimed,('I0B0'),(($87)*1.)) call SaveReal(BYHT,DroppableTimed,('I0B1'),((120)*1.)) call SaveReal(BYHT,DroppableTimed,('I05I'),((120)*1.)) endfunction function Active_A0F6_Loop_c takes nothing returns nothing local integer data=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer data2=Boss_Spell_data2[data] local integer id=Boss_Spell_data1[data] local unit u local integer i local real cX local real cY local real dX local real dY local real a if UnitAlive(Boss_Spell_unit1[data])then set Boss_Spell_X[data]=Boss_Spell_X[data]+Boss_Spell_X[data2] set Boss_Spell_Y[data]=Boss_Spell_Y[data]+Boss_Spell_Y[data2] set cX=GetUnitX(Boss_Spell_unit1[data]) set cY=GetUnitY(Boss_Spell_unit1[data]) set dX=Boss_Spell_X[data]-cX set dY=Boss_Spell_Y[data]-cY if dX*dX+dY*dY>$5F5E10 then set Boss_Spell_data3[data]=0 else set Boss_Spell_data3[data]=Boss_Spell_data3[data]-1 if ModuloInteger(Boss_Spell_data3[data],4)==0 then set i=8 loop set i=i-1 set a=i*Lx/ 8 call Ltv(Lfv(LAv("Abilities\\Spells\\Other\\Incinerate\\FireLordDeathExplode.mdl",Boss_Spell_X[data]+187.5*Cos(a),Boss_Spell_Y[data]+187.5*Sin(a),1.5),$FF,125,125,$FF)) exitwhen i==0 endloop call Ltv(LAv("Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl",Boss_Spell_X[data],Boss_Spell_Y[data],2)) call MoveLightningEx(Boss_Spell_lig[data],true,cX,cY,GetPointZ(cX,cY)+120,Boss_Spell_X[data],Boss_Spell_Y[data],GetPointZ(Boss_Spell_X[data],Boss_Spell_Y[data])) call GroupEnumUnitsInRange(G,Boss_Spell_X[data],Boss_Spell_Y[data],325+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,Boss_Spell_X[data],Boss_Spell_Y[data],325)then if not IsUnitInGroup(u,Boss_Spell_group1[data])and IsUnitAliveAndEnemyNotAvul(u,Boss_Spell_unit1[data])then call GroupAddUnit(Boss_Spell_group1[data],u) call UnitDamageTargetBY(((Boss_Spell_unit1[data])),((u)),((((Boss_Spell_Z[data])*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v(u,1) call addUnitdefbuff(u,'A0F7','BEsv',.08,$C) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Demon\\DemonBoltImpact\\DemonBoltImpact.mdl",u,"origin")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",u,"origin")) endif endif endloop endif endif else set Boss_Spell_data3[data]=0 endif if Boss_Spell_data3[data]<1 then call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:590") call DestroyLightning(Boss_Spell_lig[data]) call RecycleGroup(Boss_Spell_group1[data]) call Unit_Cancel_Counter(989,id) call Boss_Spell_deallocate(data) call Boss_Spell_deallocate(data2) set Boss_Spell_group1[data]=null set Boss_Spell_unit1[data]=null set Boss_Spell_lig[data]=null endif endfunction function Active_A0F6_Actions takes nothing returns nothing local integer data=Boss_Spell_allocate() local integer data2=Boss_Spell_allocate() local integer id=(GetUnitUserData((GetTriggerUnit()))) local real cX local real cY local real a set Boss_Spell_unit1[data]=GetTriggerUnit() set Boss_Spell_group1[data]=NewGroup() set Boss_Spell_data1[data]=id set Boss_Spell_data2[data]=data2 set Boss_Spell_data3[data]=23 set cX=GetUnitX(Boss_Spell_unit1[data]) set cY=GetUnitY(Boss_Spell_unit1[data]) set a=Atan2(GetSpellTargetY()-cY,GetSpellTargetX()-cX) set Boss_Spell_X[data2]=50*Cos(a) set Boss_Spell_Y[data2]=50*Sin(a) set Boss_Spell_X[data]=cX+Boss_Spell_X[data2] set Boss_Spell_Y[data]=cY+Boss_Spell_Y[data2] set Boss_Spell_Z[data]=100*GetHeroStateByMax(Boss_Spell_unit1[data]) set Boss_Spell_lig[data]=AddLightningEx("AFOD",true,cX,cY,GetPointZ(cX,cY)+120,Boss_Spell_X[data],Boss_Spell_Y[data],GetPointZ(Boss_Spell_X[data],Boss_Spell_Y[data])) call SetItemDroppableTimedById((id),'I0B6',$96) call DestroyEffect(AddSpecialEffectTarget("ChaosExplosion.mdl",Boss_Spell_unit1[data],"origin")) call TimerStart(NewTimer(data),.03125,true,function Active_A0F6_Loop_c) call Unit_App_Counter(990,id) endfunction function Active_A0F6_Init takes nothing returns nothing call RegisterSpellEffectEvent('A0F6',function Active_A0F6_Actions) call SaveReal(BYHT,DroppableTimed,('I0B6'),(($96)*1.)) call Luv('A0F6') endfunction function Active_A06K_ReBuff takes integer id returns nothing local integer l__tm local integer i if Active_A06K_Type[id]!=null then set l__tm=Active_A06K_Type[id]/ 2 set i=Active_A06K_Type[id]-l__tm*2 if i==1 then call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0RH','B06M') call HeroAddExtraInt((id),-$3E8) call ModifyUnitMagicDamage((id),-7.5) else call UnitRemoveAbilityandBuffBY((Je[(id)]),'A06L','B02M') call HeroAddExtraInt((id),-750) call ModifyUnitMP((id),-5000) endif call ReleaseTimer(ConvertVersion(l__tm),"[TimerUtils]Error:591") call Unit_Cancel_Counter(991,(id)) set Active_A06K_Type[id]=0 endif endfunction function Active_A06K_Expired takes nothing returns nothing call Active_A06K_ReBuff((alloc__hpv(GetHandleId((GetExpiredTimer()))))) endfunction function Active_A06K_Actions takes nothing returns nothing local unit c=GetTriggerUnit() local integer id=(GetUnitUserData((c))) local timer l__tm local integer i if c==(Je[(id)])then call Active_A06K_ReBuff(id) set l__tm=NewTimer(id) set Active_A06K_Type[id]=GetHandleId(l__tm)*2 set i=GetHeroEquipSlot(id,3) if i=='wtlg' then set Active_A06K_Type[id]=Active_A06K_Type[id]+1 call UnitAddAbilityBY(c,'A0RH') call HeroAddExtraInt((id),$3E8) call ModifyUnitMagicDamage((id),7.5) else call UnitAddAbilityBY(c,'A06L') call HeroAddExtraInt((id),750) call ModifyUnitMP((id),5000) endif call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\ReplenishMana\\ReplenishManaCasterOverhead.mdl",c,"overhead")) call TimerStart(l__tm,8,false,function Active_A06K_Expired) call Unit_App_Counter(992,(id)) set l__tm=null endif set c=null endfunction function Active_A06K_Init takes nothing returns nothing call RegisterSpellEffectEvent('A06K',function Active_A06K_Actions) call SaveReal(BYHT,DroppableTimed,('I0AE'),((60)*1.)) call SaveReal(BYHT,DroppableTimed,('wtlg'),((60)*1.)) endfunction function Active_A0D4_Alloc takes nothing returns integer return D9v(Active_A0D4_Func) endfunction function Active_A0D4_Recycle takes integer data returns nothing call fvv(data) endfunction function Active_A0D4_Start takes nothing returns nothing local integer data=J[Active_A0D4_Func] local real x local real y local real dX local real dY local real a local real d loop exitwhen 0==data set x=(GetUnitX(II[(Active_A0D4_Pumpkin[data])])) set y=(GetUnitY(II[(Active_A0D4_Pumpkin[data])])) set dX=GetUnitX((Je[(Active_A0D4_Target[data])]))-x set dY=GetUnitY((Je[(Active_A0D4_Target[data])]))-y if(dX*dX+dY*dY<=1024.)then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",(Je[(Active_A0D4_Target[data])]),"origin")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",(Je[(Active_A0D4_Target[data])]),"origin")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\HealingSpray\\HealBottleMissile.mdl",(Je[(Active_A0D4_AtkUnit[data])]),"chest")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\HealingSpray\\HealBottleMissile.mdl",(Je[(Active_A0D4_AtkUnit[data])]),"chest")) call UnitDamageTargetBY((((Je[(Active_A0D4_AtkUnit[data])]))),(((Je[(Active_A0D4_Target[data])]))),((((7500+30*GetHeroState3((Je[(Active_A0D4_AtkUnit[data])]),true))*1.))*1.),false,(true),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call UnitCureTaret(null,(Je[(Active_A0D4_AtkUnit[data])]),$2710) call m1v((Je[(Active_A0D4_Target[data])]),2) call Ltv(Active_A0D4_Pumpkin[data]) call Unit_Cancel_Counter(993,Active_A0D4_AtkUnit[data]) call Unit_Cancel_Counter(994,Active_A0D4_Target[data]) call fvv((data)) else set a=Atan2(dY,dX) call LKv(Active_A0D4_Pumpkin[data],x+37.5*Cos(a)) call Llv(Active_A0D4_Pumpkin[data],y+37.5*Sin(a)) call SetUnitFacing(II[(Active_A0D4_Pumpkin[data])],((a)*1.)*bj_RADTODEG) endif set data=K[data] endloop endfunction function Active_A0D4_Actions takes nothing returns nothing local integer data=(D9v(Active_A0D4_Func)) set Active_A0D4_AtkUnit[data]=(GetUnitUserData((GetTriggerUnit()))) set Active_A0D4_Target[data]=(GetUnitUserData((GetSpellTargetUnit()))) set Active_A0D4_Pumpkin[data]=Lnv(GetUnitX((Je[(Active_A0D4_AtkUnit[data])])),GetUnitY((Je[(Active_A0D4_AtkUnit[data])])),0) call LMv(Active_A0D4_Pumpkin[data],"PumpkinNightmare_Projectile.mdl") call SetUnitScale(II[(Active_A0D4_Pumpkin[data])],((2)*1.),0,0) call SetUnitFlyHeight(II[(Active_A0D4_Pumpkin[data])],((60)*1.),0) call Unit_App_Counter(995,Active_A0D4_AtkUnit[data]) call Unit_App_Counter(996,Active_A0D4_Target[data]) endfunction function Active_A0D4_Init takes nothing returns nothing set Active_A0D4_Func=fxv(function Active_A0D4_Start) call RegisterSpellEffectEvent('A0D4',function Active_A0D4_Actions) call SaveReal(BYHT,DroppableTimed,('I0AY'),((75)*1.)) endfunction function Active_A08G_ReBuff takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:592") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0PD','B05M') call ModifyUnitAttack((id),-$3A98) call HeroAddExtraStr((id),-800) call HeroAddExtraInt((id),-800) call Unit_Cancel_Counter(997,(id)) endfunction function Active_A08G_Actions takes nothing returns nothing local unit c=GetTriggerUnit() local unit u local integer id=(GetUnitUserData((c))) local integer i=8 local real x=GetSpellTargetX() local real y=GetSpellTargetY() local real tx local real ty local real d=25*GetHeroState1(c,true)+50*GetHeroState3(c,true) call GroupEnumUnitsInRange(G,x,y,450+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,450)then if IsUnitAliveAndEnemy(u,c)then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",u,"origin")) call UnitDamageTargetBY(((c)),((u)),((((.075*GetUnitMaxLifeById((GetUnitUserData((u))))+d)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($F)*1.))*1.),(("|c0074756c"))) call m2v(u,1.5,'A500','B500',true) endif endif endloop loop set i=i-1 set tx=125*Cos(Lx*i/ 8.) set ty=125*Sin(Lx*i/ 8.) call Ltv(LAv("Abilities\\Spells\\Orc\\FeralSpirit\\feralspirittarget.mdl",x+3*tx,y+3*ty,2.125)) call Ltv(LAv("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",x+2*tx,y+2*ty,2)) call Ltv(LAv("Abilities\\Spells\\Orc\\FeralSpirit\\feralspirittarget.mdl",x+tx,y+ty,1.875)) exitwhen i==0 endloop call Ltv(LAv("DarkWave.mdl",x,y,1.5)) call Ltv(Lfv(LAv("Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl",x,y,2.5),$FF,0,$FF,$FF)) call Ltv(Lfv(LAv("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",x,y,2.5),$FF,0,$FF,$FF)) call zhv((GetPlayerId((GetOwningPlayer(c)))),40,.5) if UnitAddAbilityBY((Je[(id)]),'A0PD')then call ModifyUnitAttack((id),$3A98) call HeroAddExtraStr((id),800) call HeroAddExtraInt((id),800) call TimerStart(NewTimer(id),$F,false,function Active_A08G_ReBuff) call Unit_App_Counter(998,(id)) endif set c=null endfunction function Active_A08G_Init takes nothing returns nothing call RegisterSpellEffectEvent('A08G',function Active_A08G_Actions) call SaveReal(BYHT,DroppableTimed,('sorf'),((75)*1.)) endfunction function Active_A0HK_Actions2 takes nothing returns nothing local integer data=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:593") local integer id=Boss_Spell_data1[data] local integer i=8 local real x=Boss_Spell_X[data] local real y=Boss_Spell_Y[data] local real d=Boss_Spell_Z[data] local real a local real c local real s local unit u loop set i=i-1 set a=Lx*i/ 8. set c=100*Cos(a) set s=100*Sin(a) call Lqv(LFv(Lfv(LAv("Units\\Creeps\\ForgottenOne\\ForgottenOneTent.mdl",x+1.5*c,y+1.5*s,1.5),75,0,$9B,$FF),"Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl"),.375) call Lqv(LFv(Lfv(LAv("Units\\Creeps\\ForgottenOne\\ForgottenOneTent.mdl",x+3*c,y+3*s,1.5),75,0,$9B,$FF),"Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl"),.375) exitwhen i==0 endloop call GroupEnumUnitsInRange(G,x,y,400+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,400)then if IsUnitAliveAndEnemy(u,(Je[(id)]))then set i=i+1 call UnitDamageTargetBY((((Je[(id)]))),((u)),((((d)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call FloatedTargetBYStun(u,true) endif endif endloop if i>0 then call UnitCureTaret((Je[(id)]),(Je[(id)]),.125*i*GetUnitState((Je[(id)]),UNIT_STATE_MAX_LIFE)) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",(Je[(id)]),"origin")) endif call zKv((GetPlayerId(((P[Kc[((id))]])))),$FF,$9B,$FF,.5) call PlaySoundAtPoint_BJ((Fn),(($C8)*1.),((x)*1.),((y)*1.),0) call Ltv(LAv("AquaSpike.mdl",x,y,2.5)) call Unit_Cancel_Counter(999,(id)) call Ltv(Boss_Spell_data2[data]) call Boss_Spell_deallocate(data) endfunction function Active_A0HK_Actions takes nothing returns nothing local integer data=Boss_Spell_allocate() local integer id=(GetUnitUserData((GetTriggerUnit()))) local integer i=$C local real x=GetUnitX((Je[(id)])) local real y=GetUnitY((Je[(id)])) local unit u set Boss_Spell_data1[data]=id set Boss_Spell_data2[data]=LAv("Whirlpool.mdl",x,y,.5) set Boss_Spell_X[data]=x set Boss_Spell_Y[data]=y set Boss_Spell_Z[data]=37.5*GetHeroPropertiesByAll((id)) call GroupEnumUnitsInRange(G,x,y,800+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,800)then if IsUnitAliveAndEnemy(u,(Je[(id)]))then call UnitDamageTargetBY((((Je[(id)]))),((u)),((((7500)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call UnitAppBuff((GetUnitUserData((u))),'A0GA',$D006B) endif endif endloop loop set i=i-1 call Ltv(LAv("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",x+300*Cos(Lx*i/ $C),y+300*Sin(Lx*i/ $C),1.25)) exitwhen i==0 endloop call Lqv(LAv("Abilities\\Spells\\Human\\CloudOfFog\\CloudOfFog.mdl",x,y,1.75),1.5) call TimerStart(NewTimer(data),1.5,false,function Active_A0HK_Actions2) call Unit_App_Counter($3E8,(id)) endfunction function Active_A0HK_Init takes nothing returns nothing call RegisterSpellEffectEvent('A0HK',function Active_A0HK_Actions) call SaveReal(BYHT,DroppableTimed,('I0C2'),(($96)*1.)) endfunction function Active_A079_Actions takes nothing returns nothing local unit c=GetTriggerUnit() local unit u local integer i=8 local real x=GetUnitX(c) local real y=GetUnitY(c) local real fYv local real fzv local real a local real d=30*GetHeroState3(c,true) call GroupEnumUnitsInRange(G,x,y,750+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,750)then if IsUnitAliveAndEnemy(u,c)then call UnitDamageTargetBY(((c)),((u)),((((d)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m2v(u,2.5,'A500','B500',true) endif endif endloop loop set i=i-1 set a=bj_PI*i/ 4 set fYv=300*Cos(a) set fzv=300*Sin(a) call Ltv(LAv("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl",x+fYv,y+fzv,2)) call Ltv(LAv("Abilities\\Spells\\Human\\Resurrect\\ResurrectCaster.mdl",x+fYv,y+fzv,2)) call Ltv(LAv("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl",x+2*fYv,y+2*fzv,2)) call Ltv(LAv("Abilities\\Spells\\Human\\Resurrect\\ResurrectCaster.mdl",x+2*fYv,y+2*fzv,2)) exitwhen i==0 endloop set c=null endfunction function Active_A079_Init takes nothing returns nothing call RegisterSpellEffectEvent('A079',function Active_A079_Actions) call SaveReal(BYHT,DroppableTimed,('I087'),((75)*1.)) call SaveReal(BYHT,DroppableTimed,('I08I'),((75)*1.)) endfunction function Active_A0SF_Actions takes nothing returns nothing local unit c=GetTriggerUnit() local unit u local integer i=8 local real x=GetUnitX(c) local real y=GetUnitY(c) local real fYv local real fzv local real a local real d=3500000. call GroupEnumUnitsInRange(G,x,y,800+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,800)then if IsUnitAliveAndEnemy(u,c)then call UnitDamageTargetBY(((c)),((u)),((((d)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop set c=null endfunction function Active_A0SF_Init takes nothing returns nothing call RegisterSpellEffectEvent('A0SF',function Active_A0SF_Actions) call SaveReal(BYHT,DroppableTimed,('I00D'),((60)*1.)) endfunction function Active_A0HI_Expired takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:594") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0HJ','BHca') call ModifyHeroProperties((id),-400) call s__Trig_remove(Active_A0HI_AtkTrig[id]) call zKv((GetPlayerId((GetOwningPlayer((Je[(id)]))))),$FF,125,125,.1) call Unit_Cancel_Counter($3E9,(id)) set Active_A0HI_Timer[id]=null endfunction function Active_A0HI_onAttack takes nothing returns nothing call UnitCureTaret((mF),(mF),.3*GetDamage()) call DestroyEffect(AddSpecialEffectTarget("VampiricAuraTarget.mdx",(mF),"chest")) endfunction function Active_A0HI_Actions takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) if Active_A0HI_Timer[id]==null then set Active_A0HI_Timer[id]=NewTimer(id) set Active_A0HI_AtkTrig[id]=UnitAddPAttackTrigB((id),function Active_A0HI_onAttack) call UnitAddAbilityBY((Je[(id)]),'A0HJ') call ModifyHeroProperties((id),400) call Unit_App_Counter($3EA,(id)) endif call zKv((GetPlayerId((GetOwningPlayer((Je[(id)]))))),$FF,125,125,8) call Ltv(LAv("BigBloodEX-NoSplat-NoGutz.mdx",GetUnitX((Je[(id)])),GetUnitY((Je[(id)])),2.25)) call TimerStart(Active_A0HI_Timer[id],8,false,function Active_A0HI_Expired) endfunction function Active_A0HI_Init takes nothing returns nothing call RegisterSpellEffectEvent('A0HI',function Active_A0HI_Actions) call SaveReal(BYHT,DroppableTimed,('I0C3'),((90)*1.)) call SaveReal(BYHT,DroppableTimed,('I05T'),((90)*1.)) endfunction function Active_A0D2_Actions2 takes nothing returns nothing local integer data=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer data2=Boss_Spell_data2[data] local unit c=Boss_Spell_unit1[data] local unit u local real x local real y local real vx=Cos(Boss_Spell_Z[data]) local real vy=Sin(Boss_Spell_Z[data]) local real sx=Boss_Spell_X[data]+vx*Boss_Spell_data1[data2] local real sy=Boss_Spell_Y[data]+vy*Boss_Spell_data1[data2] local real tx local real ty local real a local real d=Boss_Spell_Z[data2] local real l=Boss_Spell_X[data2] local real slope=Boss_Spell_Y[data2] local real r=(Boss_Spell_data3[data2]+Boss_Spell_data2[data2])*.5 set x=Boss_Spell_X[data]+vx*r set y=Boss_Spell_Y[data]+vy*r call GroupEnumUnitsInRange(G,x,y,r+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitAliveAndEnemy(u,c)then set tx=GetUnitX(u)-sx set ty=GetUnitY(u)-sy set a=RMinBJ(RMaxBJ(0,(tx*vx+ty*vy)+RAbsBJ(ty*vx-tx*vy)*slope),l) set tx=sx+vx*a set ty=sy+vy*a set a=Boss_Spell_data1[data2]+a*slope if IsUnitInRangeXY(u,tx,ty,a)then call UnitDamageTargetBY(((c)),((u)),((((d)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop set Boss_Spell_data1[data]=Boss_Spell_data1[data]-1 if Boss_Spell_data1[data]<1 then call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:595") call Boss_Spell_deallocate(data) call Boss_Spell_deallocate(data2) set Boss_Spell_unit1[data]=null endif set c=null endfunction function Active_MoLongTuXi_Actions takes unit u,real x,real y,real a,integer b,integer c,integer d,real r,integer num,real time returns nothing local integer data=Boss_Spell_allocate() local integer data2=Boss_Spell_allocate() local real l=I2R(d-b) local real h=I2R(c-b) set Boss_Spell_unit1[data]=u set Boss_Spell_data1[data]=num set Boss_Spell_data2[data]=data2 set Boss_Spell_X[data]=x set Boss_Spell_Y[data]=y set Boss_Spell_Z[data]=a set Boss_Spell_data1[data2]=b set Boss_Spell_data2[data2]=c set Boss_Spell_data3[data2]=d set Boss_Spell_X[data2]=l set Boss_Spell_Y[data2]=h/ SquareRoot(l*l-h*h) set Boss_Spell_Z[data2]=r/ num call TimerStart(NewTimer(data),time/ num,true,function Active_A0D2_Actions2) endfunction function Active_A0D2_Actions takes nothing returns nothing local integer data=Boss_Spell_allocate() local unit c=GetTriggerUnit() local real x=GetUnitX(c) local real y=GetUnitY(c) local real a=Atan2(GetSpellTargetY()-y,GetSpellTargetX()-x) call Lqv(LMv(Lnv(x+100*Cos(a),y+100*Sin(a),a),"PinkRedLaser.mdl"),1.5) call Active_MoLongTuXi_Actions(c,x,y,a,100,$FA,$3E8,25000.,$A,.5) set c=null endfunction function Active_A0D5_Actions takes nothing returns nothing local unit u=GetTriggerUnit() local real x=GetUnitX(u) local real y=GetUnitY(u) local real a=Atan2(GetSpellTargetY()-y,GetSpellTargetX()-x) local integer fx=Lnv(x+100*Cos(a),y+100*Sin(a),a) call LMv(fx,"PinkRedLaser.mdl") call SetUnitScale(II[(fx)],((1.25)*1.),0,0) call Lqv(fx,1.5) call Lqv(LAv("Abilities\\Weapons\\Bolt\\BoltImpact.mdl",x,y,1.25),1) call Active_MoLongTuXi_Actions(u,x,y,a,100,350,$4E2,50000.,$A,.5) set u=null endfunction function Active_A0D2_Init takes nothing returns nothing call RegisterSpellEffectEvent('A0D2',function Active_A0D2_Actions) call RegisterSpellEffectEvent('A0D5',function Active_A0D5_Actions) call SaveReal(BYHT,DroppableTimed,('I07T'),((60)*1.)) call SaveReal(BYHT,DroppableTimed,('I07Q'),((60)*1.)) endfunction function Active_A0HQ_Expired takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:596") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0HS','B00G') call s__Trig_remove((Active_A0HQ_AtkTrig[id])) call Unit_Cancel_Counter($3EB,(id)) set Active_A0HQ_AtkTrig[id]=0 endfunction function Active_A0HQ_onDamaged takes nothing returns nothing local real d=GetDamage() local real x local real y local unit u if d>0 then set x=GetUnitX((MF)) set y=GetUnitY((MF)) call GroupEnumUnitsInRange(G,x,y,400+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,400)then if IsUnitAliveAndAlly(u,(MF))then call UnitCureTaret((MF),u,d) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\Possession\\PossessionMissile.mdl",u,"chest")) endif endif endloop call Lqv(LAv("DarkLightningNova.mdl",x,y,1.25),1.25) call Ltv(LAv("ArcaneExplosion.mdl",x,y,.75)) set KF[HF]=PF+1000000. endif endfunction function Active_A0HQ_Actions takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) if Active_A0HQ_AtkTrig[id]==null then set Active_A0HQ_AtkTrig[id]=UnitAddShieldTrigB((id),function Active_A0HQ_onDamaged) call UnitAddAbilityBY((Je[(id)]),'A0HS') call Ltv(LAv("ShadowAssault.mdl",GetUnitX((Je[(id)])),GetUnitY((Je[(id)])),2.5)) call TimerStart(NewTimer(id),2,false,function Active_A0HQ_Expired) call Unit_App_Counter($3EC,(id)) endif endfunction function Active_A0HQ_Init takes nothing returns nothing call RegisterSpellEffectEvent('A0HQ',function Active_A0HQ_Actions) call SaveReal(BYHT,DroppableTimed,('I0C5'),(($96)*1.)) endfunction function Active_A05C_Expired takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:597") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A05D','B02E') call ModifyUnitAttack((id),-$2EE0) call HeroAddExtraStr((id),-$3E8) call Unit_Cancel_Counter($3ED,(id)) endfunction function Active_A05C_Actions takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) call Ltv(LAv("Shiva'sWrath.mdl",GetUnitX((Je[(id)])),GetUnitY((Je[(id)])),2.5)) call UnitAddAbilityBY((Je[(id)]),'A05D') call ModifyUnitAttack((id),$2EE0) call HeroAddExtraStr((id),$3E8) call TimerStart(NewTimer(id),8,false,function Active_A05C_Expired) call Unit_App_Counter($3EE,(id)) endfunction function Active_A05C_Init takes nothing returns nothing call RegisterSpellEffectEvent('A05C',function Active_A05C_Actions) call SaveReal(BYHT,DroppableTimed,('I098'),(($C)*1.)) endfunction function Active_A080_SummonedUnitDeath takes nothing returns nothing local integer id=s__Trig_P local unit u local real x local real y if not UnitAlive((Je[(id)]))then set x=GetUnitX((Je[(id)])) set y=GetUnitY((Je[(id)])) call GroupEnumUnitsInRange(G,x,y,450+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,450)then if IsUnitAliveAndAlly(u,(Je[(id)]))then call DestroyEffect(AddSpecialEffectTarget("ForestBolt.mdl",u,"origin")) call Auxiliary_TargetOrder(('Arej'),GetOwningPlayer((Je[(id)])),2,$D00C0,u) endif endif endloop call Ltv(LAv("NatureExplosion.mdl",x,y,2.5)) endif endfunction function SummonedUnit_n02S_onAttack takes nothing returns nothing call DamageAmplify($7D0) call Passive_Skill_SpiriBreath_Addbuff((MF),false) endfunction function Active_A080_Actions takes nothing returns nothing local unit u=GetTriggerUnit() local real a=bj_DEGTORAD*GetUnitFacing(u) local integer c=(GetUnitUserData((u))) local integer id if(LoadBoolean(BYHT,EquipSlot_R[EquipSlot[(c)]],('lhst')))then set id=(GetUnitUserData((CreateUnit(GetOwningPlayer(u),'n02S',GetUnitX(u)+$96*Cos(a),GetUnitY(u)+$96*Sin(a),a*bj_RADTODEG)))) call UnitAddPAttackTrig((id),function SummonedUnit_n02S_onAttack) else set id=(GetUnitUserData((CreateUnit(GetOwningPlayer(u),'n01X',GetUnitX(u)+$96*Cos(a),GetUnitY(u)+$96*Sin(a),a*bj_RADTODEG)))) endif call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\FaerieDragonInvis\\FaerieDragon_Invis.mdl",(Je[(id)]),"chest")) call UnitApplyTimedLife((Je[(id)]),'Bply',45) call AddUnitDeathTrig((id),function Active_A080_SummonedUnitDeath) call SummonedUnitSetMaster(id,c) set u=null endfunction function Active_A080_Init takes nothing returns nothing call RegisterSpellEffectEvent('A080',function Active_A080_Actions) call SaveReal(BYHT,DroppableTimed,('lhst'),((90)*1.)) call SaveReal(BYHT,DroppableTimed,('I0AV'),((90)*1.)) endfunction function Active_A069_Actions takes nothing returns nothing local unit c=GetTriggerUnit() local unit u local integer i=$A local real x=GetUnitX(c) local real y=GetUnitY(c) local real fYv local real fzv local real a local real d=60*GetHeroState3(c,true) call GroupEnumUnitsInRange(G,x,y,750+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,750)then if IsUnitAliveAndEnemy(u,c)then call UnitDamageTargetBY(((c)),((u)),((((d)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m2v(u,2.5,'A500','B500',true) endif endif endloop loop set i=i-1 set a=bj_PI*i/ 5 set fYv=$96*Cos(a) set fzv=$96*Sin(a) call Ltv(LAv("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",x+4*fYv,y+4*fzv,2.25)) call Ltv(LAv("Abilities\\Spells\\Orc\\FeralSpirit\\feralspirittarget.mdl",x+3*fYv,y+3*fzv,2.125)) call Ltv(LAv("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",x+2*fYv,y+2*fzv,2)) call Ltv(LAv("Abilities\\Spells\\Orc\\FeralSpirit\\feralspirittarget.mdl",x+fYv,y+fzv,1.875)) exitwhen i==0 endloop call Ltv(LAv("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",x,y,5)) set c=null endfunction function Active_A069_Init takes nothing returns nothing call RegisterSpellEffectEvent('A069',function Active_A069_Actions) call SaveReal(BYHT,DroppableTimed,('I08M'),((75)*1.)) endfunction function Active_A05G_Actions_func takes nothing returns nothing local integer data=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local unit u local real x=(GetUnitX(II[(Boss_Spell_data2[data])]))+Boss_Spell_X[data] local real y=(GetUnitY(II[(Boss_Spell_data2[data])]))+Boss_Spell_Y[data] call LKv(Boss_Spell_data2[data],x) call Llv(Boss_Spell_data2[data],y) set Boss_Spell_data3[data]=Boss_Spell_data3[data]-1 if ModuloInteger(Boss_Spell_data3[data],4)==0 then call LQv(LAv("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl",x,y,2.5),1.27) endif call GroupEnumUnitsInRange(G,x,y,275+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,275)then if not IsUnitInGroup(u,Boss_Spell_group1[data])and IsUnitAliveAndEnemy(u,(Je[(Boss_Spell_data1[data])]))then call GroupAddUnit(Boss_Spell_group1[data],u) call UnitDamageTargetBY((((Je[(Boss_Spell_data1[data])]))),((u)),((((Boss_Spell_Z[data])*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop if Boss_Spell_data3[data]<=0 then call GroupEnumUnitsInRange(G,x,y,425+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,425)then if IsUnitAliveAndEnemy(u,(Je[(Boss_Spell_data1[data])]))then call pmv(u,4) endif endif endloop call Ltv(LAv("FrostNova.mdl",x,y,2.5)) call Ltv(LAv("Shiva'sWrath.mdl",x,y,4.5)) call LTv(Boss_Spell_data2[data]) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:598") call RecycleGroup(Boss_Spell_group1[data]) call Unit_Cancel_Counter($3EF,Boss_Spell_data1[data]) call Boss_Spell_deallocate(data) set Boss_Spell_group1[data]=null endif endfunction function Active_A05G_Actions takes nothing returns nothing local integer data=Boss_Spell_allocate() local real x=GetUnitX(GetTriggerUnit()) local real y=GetUnitY(GetTriggerUnit()) local real a=Atan2(GetSpellTargetY()-y,GetSpellTargetX()-x) set Boss_Spell_group1[data]=NewGroup() set Boss_Spell_data1[data]=(GetUnitUserData((GetTriggerUnit()))) set Boss_Spell_data2[data]=Lnv(x,y,a) set Boss_Spell_data3[data]=30 set Boss_Spell_X[data]=30*Cos(a) set Boss_Spell_Y[data]=30*Sin(a) set Boss_Spell_Z[data]=52.5*GetHeroState3(GetTriggerUnit(),true) call LMv(Boss_Spell_data2[data],"FrozenOrb.mdl") call SetUnitScale(II[(Boss_Spell_data2[data])],((3.25)*1.),0,0) call SetUnitFlyHeight(II[(Boss_Spell_data2[data])],((75)*1.),0) call Unit_App_Counter($3F0,Boss_Spell_data1[data]) call TimerStart(NewTimer(data),.03125,true,function Active_A05G_Actions_func) endfunction function Active_A05G_Init takes nothing returns nothing call RegisterSpellEffectEvent('A05G',function Active_A05G_Actions) call SaveReal(BYHT,DroppableTimed,('I096'),((75)*1.)) endfunction function Active_A0MB_RemoveBuff takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:599") if Active_A0MB_Bool[id]then set Active_A0MB_Bool[id]=false call ModifyUnitMagicDamage((id),-5) endif call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0MC','B04N') call ModifyUnitHP((id),-Active_A0MB_HP[id]) call Unit_Cancel_Counter($3F1,(id)) set Active_A0MB_Timer[id]=null endfunction function Active_A0MB_Actions takes nothing returns nothing local unit c=GetTriggerUnit() local unit u local real x=GetUnitX(c) local real y=GetUnitY(c) local integer id local integer value call GroupEnumUnitsInRange(G,x,y,550+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,550)then if IsUnitAllyNotbag(u,c)then set id=(GetUnitUserData((u))) if Active_A0MB_Timer[id]==null then set Active_A0MB_Timer[id]=NewTimer(id) set Active_A0MB_HP[id]=0 call UnitAddAbilityBY(u,'A0MC') call Unit_App_Counter($3F2,(id)) endif if u==c or IsUnitType(u,UNIT_TYPE_SUMMONED)then set value=6000 if not Active_A0MB_Bool[id]then set Active_A0MB_Bool[id]=true call ModifyUnitMagicDamage((id),5) endif call NewTextTagInTarget_B(u,"|c00affc96+6000 HP +5% Skill damage",9,$FF,$FF,$FF) else set value=$BB8 call NewTextTagInTarget_B(u,"|c00affc96+3000 HP",9,$FF,$FF,$FF) endif call ModifyUnitHP((id),value-Active_A0MB_HP[id]) call TimerStart(Active_A0MB_Timer[id],45,false,function Active_A0MB_RemoveBuff) set Active_A0MB_HP[id]=value endif endif endloop call Lqv(LAv("Abilities\\Spells\\NightElf\\Tranquility\\Tranquility.mdl",x,y,1.25),3) call Ltv(LAv("ForestBolt.mdl",x,y,4)) set c=null endfunction function Active_A0MB_Init takes nothing returns nothing call RegisterSpellEffectEvent('A0MB',function Active_A0MB_Actions) call SaveReal(BYHT,DroppableTimed,('I0D2'),((60)*1.)) endfunction function Active_A0QL_Actions takes nothing returns nothing local unit c=GetTriggerUnit() local real x=GetUnitX(c) local real y=GetUnitY(c) local real exe=GetUnitState(c,UNIT_STATE_MANA) local real eoe=exe/ GetUnitState(c,UNIT_STATE_MAX_MANA) local real Njv=eoe*75*GetHeroState3(c,true) local unit u call GroupEnumUnitsInRange(G,x,y,550.+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,550.)then if IsUnitAllyNotbag(u,c)then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",u,"origin")) call UnitCureTaret(null,u,.4*eoe*GetUnitMaxLifeById((GetUnitUserData((u))))) elseif IsUnitAliveAndEnemy(u,c)then if not(IsUnitType((u),UNIT_TYPE_GIANT))then call m1v(u,2.5) endif call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",u,"origin")) call UnitDamageTargetBY(((c)),((u)),((((Njv)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),((((9)*1.))*1.),(("|c00c1d2ee"))) endif endif endloop call zhv((GetPlayerId((GetOwningPlayer(c)))),40,.75) call Ltv(LAv("ShadowAssault.mdl",x,y,3)) call Ltv(LAv("DarkWave.mdx",x,y,1.5)) call LQv(LAv("DarkPillar.mdx",x,y,3),2) call SetUnitState(c,UNIT_STATE_MANA,.3*exe) set c=null endfunction function Active_A0QL_Init takes nothing returns nothing call RegisterSpellEffectEvent('A0QL',function Active_A0QL_Actions) call SaveReal(BYHT,DroppableTimed,('bzbe'),((30)*1.)) endfunction function Active_A07O_Actions takes nothing returns nothing local unit c=GetTriggerUnit() local unit u local integer fx local integer i=8 local real x=GetUnitX(c) local real y=GetUnitY(c) local real l=.1*GetUnitState(c,UNIT_STATE_MAX_LIFE) local real h=.6*l+1.5*GetHeroPropertiesByAll((GetUnitUserData((c)))) local real a loop set i=i-1 set a=bj_PI*i/ 4 call Ltv(LAv("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl",x+$FA*Cos(a),y+$FA*Sin(a),1.35)) call Ltv(Lbv(LVv('e003',x+$C8*Cos(a),y+$C8*Sin(a),0),2,1.5)) exitwhen i==0 endloop call GroupEnumUnitsInRange(G,x,y,400+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,400)then if IsUnitAllyNotbag(u,c)and Hc[(GetUnitUserData((u)))]then call Globals_Shield_Add(u,h,8,'A071','B02O') endif endif endloop call Ltv(LAv("TheHolyBomb.mdx",x,y,1.25)) call SetItemDroppableTimedById((GetUnitUserData((c))),'crdt',60) call SetWidgetLife(c,MaxR(.5,GetWidgetLife(c)-l)) set c=null endfunction function Active_A07O_Init takes nothing returns nothing call RegisterSpellEffectEvent('A07O',function Active_A07O_Actions) call SaveReal(BYHT,DroppableTimed,('crdt'),((60)*1.)) endfunction function Active_A0DT_BuffExpired takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:600") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0DU','BIsv') call ModifyHeroProperties((id),-350) call Unit_Cancel_Counter($3F3,id) set Active_A0DT_Buff_timer[id]=null endfunction function Active_A0DT_Actions_End takes integer data returns nothing if Boss_Spell_lig[data]!=null then call DestroyLightning(Boss_Spell_lig[data]) set Boss_Spell_lig[data]=null endif call Unit_Cancel_Counter($3F4,Boss_Spell_data1[data]) call Unit_Cancel_Counter($3F5,Boss_Spell_data2[data]) call ReleaseTimer(Boss_Spell_timer[data],"[TimerUtils]Error:601") call Boss_Spell_deallocate(data) set Boss_Spell_timer[data]=null endfunction function Active_A0DT_Actions_Func02 takes nothing returns nothing local integer data=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local unit c=Boss_Spell_unit1[data] local unit ta=Boss_Spell_unit2[data] local real cX local real cY local real tX local real tY if UnitAlive(c)then set Boss_Spell_data3[data]=Boss_Spell_data3[data]-1 if ModuloInteger(Boss_Spell_data3[data],32)==0 then if GetUnitAbilityLevel(ta,'Avul')==0 and GetUnitAbilityLevel(ta,'B00W')==0 and GetUnitAbilityLevel(ta,'B00X')==0 then call UnitCureTaret(c,c,Boss_Spell_X[data]) endif call UnitDamageTargetBY(((c)),((ta)),((((8*GetHeroStateByMax(c)+Boss_Spell_X[data])*1.))*1.),false,(true),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",c,"origin")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Demon\\DemonBoltImpact\\DemonBoltImpact.mdl",ta,"origin")) endif if not UnitAlive(ta)then if Active_A0DT_Buff_timer[Boss_Spell_data1[data]]==null then set Active_A0DT_Buff_timer[Boss_Spell_data1[data]]=NewTimer(Boss_Spell_data1[data]) call UnitAddAbilityBY(c,'A0DU') call ModifyHeroProperties((Boss_Spell_data1[data]),350) call Unit_App_Counter($3F6,Boss_Spell_data1[data]) endif call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl",c,"origin")) call TimerStart(Active_A0DT_Buff_timer[Boss_Spell_data1[data]],300,false,function Active_A0DT_BuffExpired) call Active_A0DT_Actions_End(data) elseif Boss_Spell_data3[data]>0 then set cX=GetUnitX(c) set cY=GetUnitY(c) set tX=GetUnitX(ta) set tY=GetUnitY(ta) call MoveLightningEx(Boss_Spell_lig[data],true,cX,cY,GetPointZ(cX,cY)+120,tX,tY,GetPointZ(tX,tY)+GetUnitFlyHeight(ta)+50) else call Active_A0DT_Actions_End(data) endif else call Active_A0DT_Actions_End(data) endif set c=null set ta=null endfunction function Active_A0DT_Actions takes nothing returns nothing local integer data=Boss_Spell_allocate() local unit c=GetTriggerUnit() local unit ta=GetSpellTargetUnit() local real cX=GetUnitX(c) local real cY=GetUnitY(c) local real tX=GetUnitX(ta) local real tY=GetUnitY(ta) set Boss_Spell_unit1[data]=c set Boss_Spell_unit2[data]=ta set Boss_Spell_data1[data]=(GetUnitUserData((c))) set Boss_Spell_data2[data]=(GetUnitUserData((ta))) set Boss_Spell_data3[data]=$A0 set Boss_Spell_X[data]=GetUnitState(c,UNIT_STATE_MAX_LIFE)/ 7.5 set Boss_Spell_lig[data]=AddLightningEx("AFOD",true,cX,cY,GetPointZ(cX,cY)+120,tX,tY,GetPointZ(tX,tY)+GetUnitFlyHeight(ta)+50) set Boss_Spell_timer[data]=NewTimer(data) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl",c,"origin")) call Unit_App_Counter($3F7,Boss_Spell_data1[data]) call Unit_App_Counter($3F8,Boss_Spell_data2[data]) call TimerStart(Boss_Spell_timer[data],.03125,true,function Active_A0DT_Actions_Func02) set c=null set ta=null endfunction function Active_A0DT_Init takes nothing returns nothing call RegisterSpellEffectEvent('A0DT',function Active_A0DT_Actions) call SaveReal(BYHT,DroppableTimed,('ktrm'),(($96)*1.)) call Luv('A0DT') endfunction function Active_A0MJ_Alloc takes nothing returns integer return D9v(Active_A0MJ_Func) endfunction function Active_A0MJ_Stop takes integer t returns nothing call fvv(t) endfunction function Active_A0MJ_Start takes nothing returns nothing local integer t=J[Active_A0MJ_Func] local integer data local integer fx local unit u local integer i local real x local real y local real a loop exitwhen 0==t set data=Timer_List[t] set i=4 set x=(GetUnitX(II[(Boss_Spell_data3[data])])) set y=(GetUnitY(II[(Boss_Spell_data3[data])])) loop set i=i-1 set a=(i/ 4.+Boss_Spell_Y[data]/ 20.)*Lx set fx=LoadInteger(BYHT,Boss_Spell_data2[data],i) call LKv(fx,x+275*Cos(a)) call Llv(fx,y+275*Sin(a)) exitwhen i==0 endloop set Boss_Spell_Y[data]=Boss_Spell_Y[data]-1 if Boss_Spell_Y[data]==0 then set Boss_Spell_Y[data]=8 set Boss_Spell_Z[data]=Boss_Spell_Z[data]-1 if Boss_Spell_Z[data]<8 then call GroupEnumUnitsInRange(G,x,y,325+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,325)then if IsUnitAliveAndEnemy(u,(Je[(Boss_Spell_data1[data])]))then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\LightningBolt\\LightningBoltMissile.mdl",u,"origin")) call Ltv(Lfv(LAv("LightningWrath.mdl",GetUnitX(u),GetUnitY(u),.5),$9B,$FF,$9B,$CD)) call Lqv(Lfv(LAv("Abilities\\Weapons\\Bolt\\BoltImpact.mdl",GetUnitX(u),GetUnitY(u),1.5),$9B,$FF,$9B,$CD),1) call UnitDamageTargetBY((((Je[(Boss_Spell_data1[data])]))),((u)),((((Boss_Spell_X[data])*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($C)*1.))*1.),(("|c00fef3cf"))) call m2v(u,1,'A500','B500',true) endif endif endloop if Boss_Spell_Z[data]==0 then set i=4 loop set i=i-1 call LQv((LoadInteger(BYHT,Boss_Spell_data2[data],i)),1) exitwhen i==0 endloop call Unit_Cancel_Counter($3F9,(Boss_Spell_data1[data])) call free(Boss_Spell_data2[data]) call Ltv(Boss_Spell_data3[data]) call Boss_Spell_deallocate(data) call fvv((t)) endif endif endif set t=K[t] endloop endfunction function Active_A0MJ_Actions takes nothing returns nothing local integer t=(D9v(Active_A0MJ_Func)) local integer data=Boss_Spell_allocate() local integer i=4 local integer fx local real x local real y local real a set Timer_List[t]=data set Boss_Spell_data1[data]=(GetUnitUserData((GetTriggerUnit()))) set Boss_Spell_data2[data]=malloc() set x=GetUnitX((Je[(Boss_Spell_data1[data])])) set y=GetUnitY((Je[(Boss_Spell_data1[data])])) set Boss_Spell_data3[data]=LAv("cumulonimbus.mdx",x,y,2.5) set Boss_Spell_X[data]=12.5*GetHeroPropertiesByAll((Boss_Spell_data1[data])) set Boss_Spell_Y[data]=16 set Boss_Spell_Z[data]=9 loop set i=i-1 set a=i*Lx/ 4. set fx=Lnv(x+275*Cos(a),y+275*Sin(a),0) call LMv(fx,"Abilities\\Spells\\Other\\Tornado\\TornadoElementalSmall.mdl") call SetUnitScale(II[(fx)],((.75)*1.),0,0) call SaveInteger(BYHT,Boss_Spell_data2[data],i,fx) exitwhen i==0 endloop call Unit_App_Counter($3FA,Boss_Spell_data1[data]) endfunction function Active_A0MJ_Init takes nothing returns nothing set Active_A0MJ_Func=fxv(function Active_A0MJ_Start) call RegisterSpellEffectEvent('A0MJ',function Active_A0MJ_Actions) call SaveReal(BYHT,DroppableTimed,('srtl'),((120)*1.)) endfunction function Active_A0CF_Remove takes integer id returns nothing if Active_A0CF_Timer[id]!=null then if Active_A0CF_DagTrig[id]==0 then call HeroAddExtraAgi((id),-Active_A0CF_Agi[id]) call ModifyUnitAttackSpeed((id),-25) call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0CI','Bbar') else call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0CH','Bmfa') call s__Trig_remove((Active_A0CF_DagTrig[id])) endif call Unit_Cancel_Counter($3FB,(id)) call ReleaseTimer(Active_A0CF_Timer[id],"[TimerUtils]Error:602") set Active_A0CF_Timer[id]=null endif endfunction function Active_A0CF_Expired takes nothing returns nothing call Active_A0CF_Remove((alloc__hpv(GetHandleId((GetExpiredTimer()))))) endfunction function Active_A0CF_onDamaged takes nothing returns nothing local integer id=(pF) local real m=GetUnitState((MF),UNIT_STATE_MAX_LIFE) if(mF)!=(MF)and GetDamage()>.1*m then if GetDamage()>m then set Active_A0CF_Agi[id]=R2I(.25*GetHeroAgiNotExtra((id))) call UnitDamageTargetBY((((MF))),(((mF))),((((m)*1.))*1.),false,(true),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") else set Active_A0CF_Agi[id]=R2I((.1+.15*GetDamage()/ m)*GetHeroAgiNotExtra((id))) call UnitDamageTargetBY((((MF))),(((mF))),((((GetDamage())*1.))*1.),false,(true),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif if Active_A0CF_Agi[id]>$3E8 then set Active_A0CF_Agi[id]=$3E8 endif call DestroyEffect(AddSpecialEffectTarget("CurseBoltGreen.mdl",(MF),"chest")) call NewTextTagInTarget_B((MF),"|c0080ff80BLOCK ("+I2S(R2I(GetDamage()))+")",$F,$FF,$FF,$FF) call m1v((mF),7.5) set KF[HF]=PF+1000000. call Ltv(LAv("DesecrateGreen.mdl",GetUnitX((MF)),GetUnitY((MF)),.75)) call PlaySoundOnUnit_BJ((Bn),((125)*1.),((MF))) call UnitRemoveAbilityandBuffBY((MF),'A0CH','Bmfa') call UnitAddAbilityBY((MF),'A0CI') call HeroAddExtraAgi((id),Active_A0CF_Agi[id]) call ModifyUnitAttackSpeed((id),25) call zhv((GetPlayerId((GetOwningPlayer((MF))))),25,.5) call TimerStart(Active_A0CF_Timer[id],$F,false,function Active_A0CF_Expired) call s__Trig_remove((Active_A0CF_DagTrig[id])) set Active_A0CF_DagTrig[id]=0 endif endfunction function Active_A0CF_Actions takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) call Active_A0CF_Remove(id) set Active_A0CF_Timer[id]=NewTimer(id) set Active_A0CF_DagTrig[id]=UnitAddBeDamagerTrigB((id),function Active_A0CF_onDamaged) set Active_A0CF_Agi[id]=0 call UnitAddAbilityBY((Je[(id)]),'A0CH') call Unit_App_Counter($3FC,(id)) call TimerStart(Active_A0CF_Timer[id],6,false,function Active_A0CF_Expired) endfunction function Active_A0CF_Init takes nothing returns nothing call RegisterSpellEffectEvent('A0CF',function Active_A0CF_Actions) call SaveReal(BYHT,DroppableTimed,('kpin'),((120)*1.)) endfunction function Active_A0RE_Start takes nothing returns nothing local integer id=(alloc__hpv(GetHandleId((GetExpiredTimer())))) if UnitAlive((Je[(id)]))and GetWidgetLife((Je[(id)]))0 then set s__Redemption_timed[this]=0 if GetUnitAbilityLevel((Je[(this)]),'A07Z')>0 then call UnitRemoveAbilityandBuffBY((Je[(this)]),'A07Z','B01M') call ModifyUnitHpRegen((this),-$9C4) elseif GetUnitAbilityLevel((Je[(this)]),'A09W')>0 then call UnitRemoveAbilityandBuffBY((Je[(this)]),'A09W','B031') call ModifyUnitHpRegen((this),-$DAC) endif endif endfunction function s__Redemption_stop takes integer this returns nothing if s__Redemption_is_app[this]then set s__Redemption_FL[s__Redemption_FR[this]]=s__Redemption_FL[this] set s__Redemption_FR[s__Redemption_FL[this]]=s__Redemption_FR[this] set s__Redemption_is_app[this]=false if s__Redemption_FR[(0)]==0 then call frv(s__Redemption_func) endif call s__Redemption_cancel(this) call Unit_Cancel_Counter($418,this) endif endfunction function s__Redemption_loop_c takes nothing returns boolean local integer this=s__Redemption_FR[(0)] loop exitwhen this==0 if s__Redemption_timed[this]>0 then if not UnitAlive((Je[(this)]))or s__Redemption_timed[this]==1 then call s__Redemption_cancel(this) else set s__Redemption_timed[this]=s__Redemption_timed[this]-1 endif elseif(100000.-TimerGetRemaining(GameTimer))>s__Redemption_cd[this]and UnitAlive((Je[(this)]))and GetWidgetLife((Je[(this)]))<=.3*GetUnitState((Je[(this)]),UNIT_STATE_MAX_LIFE)then set s__Redemption_timed[this]=320 if s__Redemption_is_sbch[this]then set s__Redemption_cd[this]=(100000.-TimerGetRemaining(GameTimer))+35 call SetItemDroppableTimed((ConvertVersion(LoadInteger(BYHT2,EquipSlot_R[EquipSlot[(this)]],('sbch')))),35) call UnitAddAbilityBY((Je[(this)]),'A09W') call ModifyUnitHpRegen(this,$DAC) else set s__Redemption_cd[this]=(100000.-TimerGetRemaining(GameTimer))+55 call SetItemDroppableTimed((ConvertVersion(LoadInteger(BYHT2,EquipSlot_R[EquipSlot[(this)]],('I08X')))),55) call UnitAddAbilityBY((Je[(this)]),'A07Z') call ModifyUnitHpRegen(this,$9C4) endif endif set this=s__Redemption_FR[this] endloop return false endfunction function s__Redemption_start takes integer this returns boolean if not s__Redemption_is_app[this]then if s__Redemption_FR[(0)]==0 then if s__Redemption_func==0 then set s__Redemption_func=fxv(function s__Redemption_loop_c) endif call fov(s__Redemption_func) endif set s__Redemption_FR[this]=s__Redemption_FR[(0)] set s__Redemption_FL[s__Redemption_FR[(0)]]=this set s__Redemption_FR[(0)]=this set s__Redemption_FL[this]=0 set s__Redemption_is_app[this]=true call Unit_App_Counter($419,this) return true endif return false endfunction function s__Redemption_Passive takes nothing returns nothing local integer id=Ahv local boolean b=ATv if b then call s__Redemption_start(id) set s__Redemption_is_sbch[id]=((LasManipulatedEquipTypeId)=='sbch') else call s__Redemption_stop(id) endif endfunction function Corruptor_series_B_action takes nothing returns nothing local integer id=Ahv local boolean b=ATv if b then set Corruptor_type[id]=LasManipulatedEquipTypeId else call Active_Corruptor_End(id) set Corruptor_type[id]=0 endif endfunction function s__AubreyFurHats_RemoveBuff takes integer this returns nothing if s__AubreyFurHats_isbuff[this]then call UnitRemoveAbilityandBuffBY((Je[(this)]),'A0PL','B05Q') call HeroAddExtraInt((this),-s__AubreyFurHats_Int[this]) set s__AubreyFurHats_isbuff[this]=false endif endfunction function s__AubreyFurHats_End takes integer this returns nothing if s__AubreyFurHats_use[this]then set s__AubreyFurHats_FL[s__AubreyFurHats_FR[this]]=s__AubreyFurHats_FL[this] set s__AubreyFurHats_FR[s__AubreyFurHats_FL[this]]=s__AubreyFurHats_FR[this] set s__AubreyFurHats_use[this]=false if s__AubreyFurHats_FR[(0)]==0 then call frv(s__AubreyFurHats_func) endif call s__AubreyFurHats_RemoveBuff(this) call Unit_Cancel_Counter($41A,(this)) endif endfunction function s__AubreyFurHats_loop_c takes nothing returns boolean local integer this=s__AubreyFurHats_FR[(0)] local unit u local real x local real y local real d loop exitwhen this==0 if not UnitAlive((Je[(this)]))then set s__AubreyFurHats_timed[this]=0 elseif s__AubreyFurHats_timed[this]>0 then set s__AubreyFurHats_timed[this]=s__AubreyFurHats_timed[this]-1 elseif not s__AubreyFurHats_isbuff[this]and GetWidgetLife((Je[(this)]))<.25*GetUnitMaxLifeById((this))then set s__AubreyFurHats_isbuff[this]=true set s__AubreyFurHats_timed[this]=480 call SetItemDroppableTimed((ConvertVersion(LoadInteger(BYHT2,EquipSlot_R[EquipSlot[((this))]],(GetHeroEquipSlot((this),3))))),$F) set x=GetUnitX((Je[(this)])) set y=GetUnitY((Je[(this)])) if(LoadBoolean(BYHT,EquipSlot_R[EquipSlot[((this))]],('sor6')))then set s__AubreyFurHats_Int[this]=R2I(.12*GetHeroIntNotExtra((this))) set d=50*GetHeroState3((Je[(this)]),true) else set s__AubreyFurHats_Int[this]=R2I(.15*GetHeroIntNotExtra((this))) set d=75*GetHeroState3((Je[(this)]),true) endif call Ltv(LAv("ShadowWave.mdl",x,y,1.5)) call Ltv(LAv("Desecrate.mdl",x,y,1.5)) call zhv((Kc[(this)]),25,.27) call zKv((Kc[(this)]),$FF,25,$FF,.27) call UnitAddAbilityBY((Je[(this)]),'A0PL') call HeroAddExtraInt((this),s__AubreyFurHats_Int[this]) call UnitCureTaret(null,(Je[(this)]),.4*GetUnitMaxLifeById((this))) call GroupEnumUnitsInRange(G,x,y,475,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,400)and IsUnitAliveAndEnemy(u,(Je[(this)]))then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",u,"origin")) call UnitDamageTargetBY((((Je[(this)]))),((u)),((((d)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($F)*1.))*1.),(("|c00625676"))) call m2v(u,1.5,'A500','B500',true) endif endloop endif if s__AubreyFurHats_timed[this]<1 then call s__AubreyFurHats_RemoveBuff(this) endif set this=s__AubreyFurHats_FR[this] endloop return false endfunction function s__AubreyFurHats_strt takes integer this returns integer if s__AubreyFurHats_use[this]then call s__AubreyFurHats_RemoveBuff(this) else if s__AubreyFurHats_FR[(0)]==0 then if s__AubreyFurHats_func==0 then set s__AubreyFurHats_func=fxv(function s__AubreyFurHats_loop_c) endif call fov(s__AubreyFurHats_func) endif set s__AubreyFurHats_FR[this]=s__AubreyFurHats_FR[(0)] set s__AubreyFurHats_FL[s__AubreyFurHats_FR[(0)]]=this set s__AubreyFurHats_FR[(0)]=this set s__AubreyFurHats_FL[this]=0 set s__AubreyFurHats_use[this]=true call Unit_App_Counter($41B,(this)) endif return this endfunction function s__AubreyFurHats_Passive takes nothing returns nothing local integer id=Ahv local boolean b=ATv if b then call s__AubreyFurHats_strt(id) else call s__AubreyFurHats_End(id) endif endfunction function s__rej4_removebuff takes integer this returns nothing call ModifyHeroInt((this),-100*s__rej4_int[this]) call UnitRemoveAbilityandBuffBY((Je[(this)]),'A0QI','B067') set s__rej4_int[this]=0 endfunction function s__rej4_loop_c takes nothing returns nothing local integer this=s__rej4_FL[(0)] local unit local_hero local unit u local integer i local real x local real y local integer local_num local integer local_num_max=$C local integer local_timed_mod=R2I(32*.25) loop exitwhen this==0 set s__rej4_timed[this]=ModuloInteger(s__rej4_timed[this]+1,local_timed_mod) if s__rej4_timed[this]==0 then set local_num=0 set local_hero=(Je[(this)]) set i=GetPlayerId(GetOwningPlayer(local_hero)) if UnitAlive(local_hero)then set x=GetUnitX(local_hero) set y=GetUnitY(local_hero) call GroupEnumUnitsInRange(G,x,y,750.+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,750.)then if IsUnitType(u,UNIT_TYPE_MECHANICAL)and IsUnitOwnedByPlayer(u,P[i])then set local_num=local_num+1 exitwhen local_num==local_num_max endif endif endloop endif if local_num<1 and GetUnitAbilityLevel(local_hero,'A0QI')==1 then call UnitRemoveAbilityandBuffBY(local_hero,'A0QI','B067') elseif local_num>0 and GetUnitAbilityLevel(local_hero,'A0QI')==0 then call UnitAddAbilityBY(local_hero,'A0QI') endif if local_num!=s__rej4_int[this]then call ModifyHeroInt((this),100*(local_num-s__rej4_int[this])) set s__rej4_int[this]=local_num endif set local_hero=null endif set this=s__rej4_FL[this] endloop set u=null endfunction function s__rej4_Passive takes nothing returns nothing local integer this=Ahv local boolean b=ATv if b then if s__rej4_use[this]then call s__rej4_removebuff(this) else if s__rej4_FL[(0)]==0 then if s__rej4_func==0 then set s__rej4_func=fxv(function s__rej4_loop_c) endif call fov(s__rej4_func) endif set s__rej4_FL[this]=s__rej4_FL[(0)] set s__rej4_FR[s__rej4_FL[(0)]]=this set s__rej4_FL[(0)]=this set s__rej4_FR[this]=0 set s__rej4_use[this]=true call Unit_App_Counter($41C,this) endif else if s__rej4_use[this]then set s__rej4_FR[s__rej4_FL[this]]=s__rej4_FR[this] set s__rej4_FL[s__rej4_FR[this]]=s__rej4_FL[this] set s__rej4_use[this]=false if s__rej4_FL[(0)]==0 then call frv(s__rej4_func) endif call s__rej4_removebuff(this) call Unit_Cancel_Counter($41D,this) endif endif endfunction function s__bzbe_stop takes nothing returns nothing call frv(s__bzbe_func) endfunction function s__bzbe_ReoveBarrage takes integer this returns nothing call RemoveBarrage(this) endfunction function s__bzbe_proc takes integer this returns boolean if UnitAlive(s__barrage_target[this])then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\OrbOfDeath\\OrbOfDeathMissile.mdl",s__barrage_target[this],"chest")) call UnitCureTaret(null,s__barrage_target[this],.01*4.5*GetUnitMaxLifeById((GetUnitUserData((s__barrage_target[this]))))) call SetUnitState(s__barrage_target[this],UNIT_STATE_MANA,GetUnitState(s__barrage_target[this],UNIT_STATE_MANA)+.01*3.*GetUnitState(s__barrage_target[this],UNIT_STATE_MAX_MANA)) endif return true endfunction function s__bzbe_start takes nothing returns boolean local integer this=s__barrage_FR[s__bzbe_launcher] local unit u if this!=s__bzbe_launcher then call UseBarrage(s__bzbe_launcher) loop exitwhen this==s__bzbe_launcher if(s__barrage_outside[(this)])then call s__bzbe_proc(this) call RemoveBarrage((this)) elseif(s__barrage_finish[(this)])then if s__bzbe_proc(this)then call RemoveBarrage((this)) else set s__barrage_finish[(this)]=false endif endif set this=s__barrage_FR[this] endloop elseif s__barrage_InOperation[s__bzbe_launcher]then set s__barrage_InOperation[s__bzbe_launcher]=false call frv(s__bzbe_func) endif return false endfunction function s__bzbe_FiredBarrage takes integer this returns nothing call s__barrage_Filling((s__bzbe_launcher),(this)) if not s__barrage_InOperation[s__bzbe_launcher]then set s__barrage_InOperation[s__bzbe_launcher]=true call fov(s__bzbe_func) endif endfunction function s__bzbe_onInit takes nothing returns nothing set s__bzbe_func=fxv(function s__bzbe_start) set s__bzbe_launcher=NewLauncher() endfunction function s__bzbe_loop_c takes nothing returns nothing local integer id=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer b local integer i local real a local real x local real y if UnitAlive((Je[(id)]))then set i=3 set x=GetUnitX((Je[(id)])) set y=GetUnitY((Je[(id)])) set a=GetRandomReal(0,Lx) loop exitwhen i==0 set i=i-1 set a=a+Lx/ 3 set b=CreateBarrageTypeC(x+250.*Cos(a),y+250.*Sin(a),50,(Je[(id)])) call LMv(s__barrage_model[b],"Punishment_Missle.mdl") call SetUnitScale(II[(s__barrage_model[b])],((.75)*1.),0,0) set s__barrage_speed[b]=.03125*750. call SetBarrageFlightRadian(b,.3) call s__bzbe_FiredBarrage(b) endloop endif endfunction function s__bzbe_Passive takes nothing returns nothing local integer id=Ahv local boolean b=ATv if b then if s__bzbe_Tm[id]==null then set s__bzbe_Tm[id]=NewTimer(id) endif call TimerStart(s__bzbe_Tm[id],5.,true,function s__bzbe_loop_c) else if s__bzbe_Tm[id]!=null then call ReleaseTimer(s__bzbe_Tm[id],"[TimerUtils]Error:613") set s__bzbe_Tm[id]=null endif endif endfunction function s__I0CE_removebuff takes nothing returns nothing local integer this=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:614") call UnitRemoveAbilityandBuffBY((Je[(this)]),'A0IA','B019') call ModifyHeroAgi((this),-60*s__I0CE_bufflv[this]) call Unit_Cancel_Counter($41E,(this)) set s__I0CE_buff_tm[this]=null set s__I0CE_bufflv[this]=0 endfunction function s__I0CE_Equip_I0CE_AddBuff takes integer this returns nothing if s__I0CE_buff_tm[this]==null then set s__I0CE_buff_tm[this]=NewTimer(this) call UnitAddAbilityBY((Je[(this)]),'A0IA') call Unit_App_Counter($41F,(this)) endif if s__I0CE_bufflv[this]<$A then set s__I0CE_bufflv[this]=s__I0CE_bufflv[this]+1 call ModifyHeroAgi((this),60) endif call TimerStart(s__I0CE_buff_tm[this],7,false,function s__I0CE_removebuff) endfunction function s__I0CE_onAttack takes nothing returns nothing local integer this=(GetUnitUserData(((mF)))) if GetRandomInt(1,8)==1 then call DestroyEffect(AddSpecialEffectTarget("DarkLightning.mdl",MF,"origin")) call DestroyEffect(AddSpecialEffectTarget("DarkLightningNova.mdl",MF,"origin")) call UnitDamageTargetBY((((mF))),((MF)),(((($3A98+6*GetHeroStateByMax((mF)))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((20)*1.))*1.),(("|cFFFF6600"))) call UnitCureTaret(null,(mF),.075*GetUnitState((mF),UNIT_STATE_MAX_LIFE)) else call DestroyEffect(AddSpecialEffectTarget("ShadowAssault.mdl",MF,"origin")) call DestroyEffect(AddSpecialEffectTarget("DarknessExplosion.mdl",MF,"origin")) call UnitDamageTargetBY((((mF))),((MF)),((((7500+2.5*GetHeroStateByMax((mF)))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) call UnitCureTaret(null,(mF),.03*GetUnitState((mF),UNIT_STATE_MAX_LIFE)) endif call s__I0CE_Equip_I0CE_AddBuff(this) call TimerDestroyAddSpecialEffectTargetBY("ShadowTrap.mdl",(mF),"origin",1.25) call UnitRemoveAbilityandBuffBY((mF),'A0I9','B013') call s__Trig_remove(s__I0CE_atk[this]) set s__I0CE_atk[this]=0 endfunction function s__I0CE_onSpellEffect takes nothing returns nothing local integer this=s__Trig_P if s__I0CE_atk[this]==null then set s__I0CE_atk[this]=UnitAddPAttackTrigB((this),function s__I0CE_onAttack) call UnitAddAbilityBY((Je[(this)]),'A0I9') endif endfunction function s__I0CE_Passive takes nothing returns nothing local integer this=Ahv local boolean b=ATv if b==false then if s__I0CE_atk[this]>0 then call s__Trig_remove(s__I0CE_atk[this]) set s__I0CE_atk[this]=0 endif endif endfunction function Equip_I0DI_PickupOrDrop takes nothing returns nothing call Equip_I0DI_RemoveBuff(Ahv) endfunction function s__odef_Removebuff takes integer this returns nothing if s__odef_Source[this]!=0 then if s__odef_Type_Id[this]==3 then call UnitRemoveAbilityandBuffBY((Je[(s__odef_Source[this])]),'A0VR','B081') else call UnitRemoveAbilityandBuffBY((Je[(s__odef_Source[this])]),'A0IV','B034') endif call s__Trig_remove((s__odef_Atk_trig[this])) call Unit_Cancel_Counter($420,s__odef_Source[this]) set s__odef_Source[this]=0 endif endfunction function s__odef_onattakc takes nothing returns nothing local integer this=s__Trig_P2[s__Trig_Index] local boolean crit=false local integer lv=s__odef_Type_Id[this] local integer v=GetHeroState1((Je[(this)]),true)+GetHeroState2((Je[(this)]),true)+GetHeroState3((Je[(this)]),true) local integer index=3 if lv==3 then if IsUnitType((mF),UNIT_TYPE_SUMMONED)then set index=index-1 endif set crit=GetRandomInt(1,3)==1 elseif lv==2 then if IsUnitType((mF),UNIT_TYPE_SUMMONED)then set index=index-1 endif set crit=GetRandomInt(1,5)==1 elseif lv==1 then if IsUnitType((mF),UNIT_TYPE_SUMMONED)==false then set index=index+1 endif endif set s__odef_time[this]=32*index if lv!=3 then if crit then call UnitDamageTargetBY((((Je[(this)]))),(((MF))),(((($F*v)*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),((DAMAGE_TYPE_MAGIC)),((((20)*1.))*1.),(("|c00f2fed6"))) call Ltv(Lfv(LAv("NatureExplosion.mdl",GetUnitX((MF)),GetUnitY((MF)),1.25),125,125,125,125)) else call UnitDamageTargetBY((((Je[(this)]))),(((MF))),((((7.5*v)*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),((DAMAGE_TYPE_MAGIC)),(((($F)*1.))*1.),(("|c00f2fed6"))) call Ltv(Lfv(LAv("NatureExplosion.mdl",GetUnitX((MF)),GetUnitY((MF)),.75),125,125,125,125)) endif call DestroyEffect(AddSpecialEffectTarget("Ultima.mdl",(MF),"origin")) call PlaySoundOnUnit_BJ((s__odef_snd_ReviveNightElf),((75)*1.),((MF))) call UnitAppBuff((pF),'A0VS',$D006B) else if crit then call UnitDamageTargetBY((((Je[(this)]))),(((MF))),((((3*12.5*v)*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),((DAMAGE_TYPE_MAGIC)),((((20)*1.))*1.),(("|c00a799d0"))) else call UnitDamageTargetBY((((Je[(this)]))),(((MF))),((((12.5*v)*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),((DAMAGE_TYPE_MAGIC)),(((($F)*1.))*1.),(("|c00a799d0"))) endif call DestroyEffect(AddSpecialEffectTarget("CurseBoltPurple.mdl",(MF),"chest")) call Lqv(LAv("DarkLightningNova.mdl",GetUnitX((MF)),GetUnitY((MF)),.75),1.25) call UnitAppBuff((pF),'A0SU',$D006B) endif call s__odef_Removebuff(this) endfunction function s__odef_Recycle takes integer this returns nothing if s__odef_Use[this]then set s__odef_FL[s__odef_FR[this]]=s__odef_FL[this] set s__odef_FR[s__odef_FL[this]]=s__odef_FR[this] set s__odef_Use[this]=false if s__odef_FR[(0)]==(0)then call frv(s__odef_Func) endif call s__odef_Removebuff(this) call Unit_Cancel_Counter($421,(this)) endif endfunction function s__odef_loop_c takes nothing returns nothing local integer this=s__odef_FR[(0)] local integer id local integer fx local real a local real zA loop exitwhen this==0 if s__odef_time[this]>0 then set s__odef_time[this]=s__odef_time[this]-1 elseif s__odef_Source[this]==0 then set id=HeroSkills_A089_Target[(this)] if id==0 or not UnitAlive((Je[(id)]))then set id=this endif if UnitAlive((Je[(id)]))then set s__odef_Source[this]=id set s__odef_Atk_trig[this]=UnitAddPAttackTrigB((s__odef_Source[this]),function s__odef_onattakc) set s__Trig_P2[s__odef_Atk_trig[this]]=this set s__odef_count[this]=0 if s__odef_Type_Id[this]==3 then call UnitAddAbilityBY((Je[(s__odef_Source[this])]),'A0VR') else call UnitAddAbilityBY((Je[(s__odef_Source[this])]),'A0IV') endif call Unit_App_Counter($422,s__odef_Source[this]) endif elseif not UnitAlive((Je[(s__odef_Source[this])]))then call s__odef_Removebuff(this) else set id=HeroSkills_A089_Target[(this)] if id==0 then set id=this endif if id!=s__odef_Source[this]then call s__odef_Removebuff(this) else set s__odef_count[this]=s__odef_count[this]+1 if ModuloInteger(s__odef_count[this],6)==0 then set a=GetRandomReal(0,Lx) set zA=GetRandomReal(0,Lx/ 2.) set fx=CreateBarrageTypeC(GetUnitX((Je[(s__odef_Source[this])]))+125*Cos(a)*Sin(zA),GetUnitY((Je[(s__odef_Source[this])]))+125*Sin(a)*Sin(zA),GetUnitFlyHeight((Je[(s__odef_Source[this])]))+60+125*Cos(zA),(Je[(s__odef_Source[this])])) set s__barrage_speed[fx]=7.5 set s__barrage_acceleration[fx]=5 if s__odef_Type_Id[this]==3 then call LMv(s__barrage_model[fx],"DarkTrail.mdl") call SetUnitScale(II[(s__barrage_model[fx])],((.75)*1.),0,0) else call LMv(s__barrage_model[fx],"Abilities\\Weapons\\FaerieDragonMissile\\FaerieDragonMissile.mdl") call SetUnitScale(II[(s__barrage_model[fx])],((.675)*1.),0,0) endif call Lfv(s__barrage_model[fx],$9B,$9B,$9B,$9B) call BOv(fx) if s__odef_count[this]>=60 then set s__odef_count[this]=0 if s__odef_Type_Id[this]==3 then call DestroyEffect(AddSpecialEffectTarget("DarkPortalCast.mdl",(Je[(s__odef_Source[this])]),"chest")) else call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Invisibility\\InvisibilityTarget.mdl",(Je[(s__odef_Source[this])]),"chest")) endif endif endif endif endif set this=s__odef_FR[this] endloop endfunction function s__odef_Start takes integer this returns boolean if not s__odef_Use[this]then if s__odef_FR[(0)]==(0)then if s__odef_Func==0 then set s__odef_Func=fxv(function s__odef_loop_c) endif call fov(s__odef_Func) endif set s__odef_FR[this]=s__odef_FR[(0)] set s__odef_FL[s__odef_FR[(0)]]=this set s__odef_FR[(0)]=this set s__odef_FL[this]=(0) set s__odef_Use[this]=true call Unit_App_Counter($423,(this)) return true endif return false endfunction function s__odef_Passive takes nothing returns nothing local integer this=Ahv local boolean b=ATv if b then if LasManipulatedEquipTypeId=='I0FB' then set s__odef_Type_Id[this]=3 set s__odef_time[this]=32*3 elseif LasManipulatedEquipTypeId=='odef' then set s__odef_Type_Id[this]=2 set s__odef_time[this]=32*4 else set s__odef_Type_Id[this]=1 set s__odef_time[this]=32*5 endif call s__odef_Start(this) else call s__odef_Recycle(this) endif endfunction function s__odef_onInit takes nothing returns nothing set s__odef_snd_ReviveNightElf=CreateSound_BJ("Abilities\\Spells\\NightElf\\ReviveNightElf\\ReviveNightElf.wav",false,true,true,$A,$A,"SpellsEAX") call SetSoundParamsFromLabel_BJ(s__odef_snd_ReviveNightElf,"ReviveNightElf") call SetSoundDuration_BJ(s__odef_snd_ReviveNightElf,$CC4) endfunction function s__I092_RemoveBuff takes nothing returns nothing local integer this=(alloc__hpv(GetHandleId((GetExpiredTimer())))) call ReleaseTimer(s__I092_Buff[this],"[TimerUtils]Error:615") call ModifyUnitHpRegen(this,-$96) call UnitRemoveAbilityandBuffBY((Je[(this)]),'A0D0','BCtc') call Unit_Cancel_Counter($424,(this)) set s__I092_Buff[this]=null endfunction function s__I092_Loop_c takes nothing returns nothing local integer Halo=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer this local unit u local real x local real y if UnitAlive((Je[(Halo)]))then set x=GetUnitX((Je[(Halo)])) set y=GetUnitY((Je[(Halo)])) call GroupEnumUnitsInRange(G,x,y,825,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,750)and IsUnitAliveAndAlly(u,(Je[(Halo)]))and(IsUnitType(u,UNIT_TYPE_HERO)or IsUnitType(u,UNIT_TYPE_MECHANICAL))then set this=(GetUnitUserData((u))) if s__I092_Buff[this]==null then set s__I092_Buff[this]=NewTimer(this) call UnitAddAbilityBY(u,'A0D0') call ModifyUnitHpRegen(this,$96) call Unit_App_Counter($425,(this)) endif call TimerStart(s__I092_Buff[this],2,false,function s__I092_RemoveBuff) endif endloop endif endfunction function s__I092_Passive takes nothing returns nothing local integer this=Ahv local boolean b=ATv if b then if s__I092_Timer[this]==null then set s__I092_Timer[this]=NewTimer(this) call TimerStart(s__I092_Timer[this],1,true,function s__I092_Loop_c) endif else if s__I092_Timer[this]!=null then call ReleaseTimer(s__I092_Timer[this],"[TimerUtils]Error:616") set s__I092_Timer[this]=null endif endif endfunction function s__I0D8_RemoveBuff takes nothing returns nothing local integer this=(alloc__hpv(GetHandleId((GetExpiredTimer())))) call ReleaseTimer(s__I0D8_Buff[this],"[TimerUtils]Error:617") call ModifyUnitHpRegen(this,-$C8) call ModifyUnitAttack(this,-6666) call UnitRemoveAbilityandBuffBY((Je[(this)]),'A0N6','B04R') call Unit_Cancel_Counter($426,(this)) set s__I0D8_Buff[this]=null endfunction function s__I0D8_Loop_c takes nothing returns nothing local integer Halo=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer this local unit u local real x local real y if UnitAlive((Je[(Halo)]))then set x=GetUnitX((Je[(Halo)])) set y=GetUnitY((Je[(Halo)])) call GroupEnumUnitsInRange(G,x,y,825,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,750)and IsUnitAliveAndAlly(u,(Je[(Halo)]))and(IsUnitType(u,UNIT_TYPE_HERO)or IsUnitType(u,UNIT_TYPE_MECHANICAL))then set this=(GetUnitUserData((u))) if s__I0D8_Buff[this]==null then set s__I0D8_Buff[this]=NewTimer(this) call UnitAddAbilityBY(u,'A0N6') call ModifyUnitHpRegen(this,$C8) call ModifyUnitAttack(this,6666) call Unit_App_Counter($427,(this)) endif call TimerStart(s__I0D8_Buff[this],2,false,function s__I0D8_RemoveBuff) endif endloop endif endfunction function s__I0D8_Passive takes nothing returns nothing local integer this=Ahv local boolean b=ATv if b then if s__I0D8_Timer[this]==null then set s__I0D8_Timer[this]=NewTimer(this) call TimerStart(s__I0D8_Timer[this],1,true,function s__I0D8_Loop_c) endif else if s__I0D8_Timer[this]!=null then call ReleaseTimer(s__I0D8_Timer[this],"[TimerUtils]Error:618") set s__I0D8_Timer[this]=null endif endif endfunction function s__I0B2_table_new takes nothing returns integer local integer this=s__I0B2_table__allocate() set s__I0B2_table_vessel[this]=malloc() return this endfunction function s__I0B2_table_recycle takes integer this returns nothing call free(s__I0B2_table_vessel[this]) endfunction function s__I0B2_removebuff takes integer this returns nothing if s__I0B2_table_timer_dt[this]!=null then loop exitwhen s__I0B2_table_v_size[this]==0 set s__I0B2_table_v_size[this]=s__I0B2_table_v_size[this]-1 call Ltv((LoadInteger(BYHT,s__I0B2_table_vessel[this],s__I0B2_table_v_size[this]))) endloop call ReleaseTimer(s__I0B2_table_timer_dt[this],"[TimerUtils]Error:619") call UnitRemoveAbilityandBuffBY((Je[(s__I0B2_table_user[this])]),'A0FA','BNsl') call ModifyUnitHP((s__I0B2_table_user[this]),-s__I0B2_table_value_hp[this]) set s__I0B2_table_timer_dt[this]=null set s__I0B2_table_value_hp[this]=0 set s__I0B2_table_value_ang[this]=0 endif endfunction function s__I0B2_loop_c takes nothing returns nothing local integer this=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer i=s__I0B2_table_v_size[this] local real x=GetUnitX((Je[(s__I0B2_table_user[this])])) local real y=GetUnitY((Je[(s__I0B2_table_user[this])])) local integer fx if s__I0B2_table_value_cd[this]>0 then set s__I0B2_table_value_cd[this]=s__I0B2_table_value_cd[this]-1 endif set s__I0B2_table_value_duration[this]=s__I0B2_table_value_duration[this]-1 set s__I0B2_table_value_ang[this]=s__I0B2_table_value_ang[this]+Lx/ 64. if s__I0B2_table_value_duration[this]>0 and UnitAlive((Je[(this)]))then loop exitwhen i==0 set i=i-1 set fx=LoadInteger(BYHT,s__I0B2_table_vessel[this],i) call LKv(fx,x+80*Cos(s__I0B2_table_value_ang[this]+i*Lx/ 3)) call Llv(fx,y+80*Sin(s__I0B2_table_value_ang[this]+i*Lx/ 3)) endloop else call s__I0B2_removebuff(this) endif endfunction function s__I0B2_addbuff takes nothing returns nothing local integer this=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:620") local integer UUv=R2I(2*GetHeroState2((Je[(s__I0B2_table_user[this])]),true)) local integer i local integer fx set s__I0B2_table_value_duration[this]=256 if s__I0B2_table_value_hp[this]!=UUv then set i=s__I0B2_table_value_hp[this]+R2I(s__I0B2_table_value_damage[this]) if i>UUv then set i=UUv endif if s__I0B2_table_timer_dt[this]==null then set s__I0B2_table_timer_dt[this]=NewTimer(this) call UnitAddAbilityBY((Je[(s__I0B2_table_user[this])]),'A0FA') call TimerStart(s__I0B2_table_timer_dt[this],.03125,true,function s__I0B2_loop_c) endif if s__I0B2_table_value_cd[this]==0 and s__I0B2_table_value_damage[this]>1 then set s__I0B2_table_value_cd[this]=$C call NewTextTagInTarget_B((Je[(s__I0B2_table_user[this])]),"+"+I2S(i-s__I0B2_table_value_hp[this]),8,$FF,105,105) call DestroyEffect(AddSpecialEffectTarget("SmallBloodEX-NoSplat.mdl",(Je[(s__I0B2_table_user[this])]),"chest")) endif call ModifyUnitHP((s__I0B2_table_user[this]),i-s__I0B2_table_value_hp[this]) set s__I0B2_table_value_hp[this]=i if i==UUv then set i=3 else set i=R2I(3.*i/ UUv) endif loop exitwhen s__I0B2_table_v_size[this]>=i set fx=Lnv(GetUnitX((Je[(s__I0B2_table_user[this])]))+80*Cos(s__I0B2_table_value_ang[this]+s__I0B2_table_v_size[this]*Lx/ 3),GetUnitY((Je[(s__I0B2_table_user[this])]))+80*Sin(s__I0B2_table_value_ang[this]+s__I0B2_table_v_size[this]*Lx/ 3),0) call LMv(fx,"BloodySplat Missile.mdl") call SetUnitScale(II[(fx)],((.75)*1.),0,0) call SetUnitFlyHeight(II[(fx)],((50)*1.),0) call Lfv(fx,$FF,125,125,105) call SaveInteger(BYHT,s__I0B2_table_vessel[this],s__I0B2_table_v_size[this],fx) set s__I0B2_table_v_size[this]=s__I0B2_table_v_size[this]+1 endloop endif set s__I0B2_table_timer_dg[this]=null set s__I0B2_table_value_damage[this]=0 endfunction function s__I0B2_onDamaged takes nothing returns nothing local integer this=s__I0B2_Table[(pF_v)] if s__I0B2_table_timer_dg[this]==null then set s__I0B2_table_timer_dg[this]=NewTimer(this) call TimerStart(s__I0B2_table_timer_dg[this],0,false,function s__I0B2_addbuff) endif set s__I0B2_table_value_damage[this]=s__I0B2_table_value_damage[this]+.007*GetDamage() endfunction function s__I0B2_cancel takes integer id returns nothing local integer this=s__I0B2_Table[id] call s__I0B2_removebuff(this) call s__Trig_remove(s__I0B2_table_trig_dg[this]) if s__I0B2_table_timer_dg[this]!=null then call ReleaseTimer(s__I0B2_table_timer_dg[this],"[TimerUtils]Error:621") if s__I0B2_table_value_agi[this]>0 then call HeroAddExtraAgi((id),-s__I0B2_table_value_agi[this]) call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0F8','BNso') set s__I0B2_table_value_agi[this]=0 endif endif call free(s__I0B2_table_vessel[(this)]) set s__I0B2_Table[id]=0 call Unit_Cancel_Counter($428,(id)) endfunction function s__I0B2_app takes integer id returns nothing local integer this=s__I0B2_table_new() set s__I0B2_table_user[this]=id set s__I0B2_table_trig_dg[this]=UnitAddDamagerTrigB((id),function s__I0B2_onDamaged) set s__I0B2_Table[id]=this call Unit_App_Counter($429,(id)) endfunction function s__I0B2_onSpell_end takes nothing returns nothing local integer this=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:622") local integer id=s__I0B2_table_user[this] call HeroAddExtraAgi((id),-s__I0B2_table_value_agi[this]) call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0F8','BNso') call Unit_Cancel_Counter($42A,(id)) set s__I0B2_table_trig_dg[this]=UnitAddDamagerTrigB((id),function s__I0B2_onDamaged) set s__I0B2_table_timer_dg[this]=null set s__I0B2_table_value_agi[this]=0 endfunction function s__I0B2_onSpell takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) local integer this=s__I0B2_Table[id] local unit u local integer i local real x local real y local real a local real c local real s local real d if s__I0B2_table_timer_dt[this]==null then call IssueUnitStop_DisplayText((Je[(id)]),"|c00ff8080Not enough blood is stored|r") else call s__Trig_remove(s__I0B2_table_trig_dg[this]) set s__I0B2_table_trig_dg[this]=0 if s__I0B2_table_timer_dg[this]==null then set s__I0B2_table_timer_dg[this]=NewTimer(this) endif set s__I0B2_table_value_agi[this]=IMaxBJ(1,R2I(.15*GetHeroAgiNotExtra((id)))) set i=16 set x=GetUnitX((Je[(id)])) set y=GetUnitY((Je[(id)])) set d=30*s__I0B2_table_value_hp[this] loop set i=i-1 set a=Lx*i/ 16 set c=125*Cos(a) set s=125*Sin(a) call Ltv(LAv("blood.mdl",x+c,y+s,1.5)) call Ltv(LAv("blood.mdl",x+2*c,y+2*s,1.5)) call Ltv(LAv("blood.mdl",x+3*c,y+3*s,1.5)) exitwhen i==0 endloop call GroupEnumUnitsInRange(G,x,y,675,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitAliveAndEnemy(u,(Je[(id)]))and IsUnitInRangeXY(u,x,y,600)then call DestroyEffect(AddSpecialEffectTarget("SmallBloodEX-NoSplat.mdl",u,"chest")) call UnitDamageTargetBY((((Je[(id)]))),((u)),((((d)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v(u,2.5) endif endloop call HeroAddExtraAgi((id),s__I0B2_table_value_agi[this]) call UnitAddAbilityBY((Je[(id)]),'A0F8') call Ltv(LAv("BloodSlam.mdl",x,y,1.5)) call Ltv(LAv("BigBloodEX-NoSplat-NoGutz.mdl",x,y,2)) call TimerStart(s__I0B2_table_timer_dg[this],$C,false,function s__I0B2_onSpell_end) call Unit_App_Counter($42B,(id)) call s__I0B2_removebuff(this) endif endfunction function s__I0B2_Passive takes nothing returns nothing local boolean b=ATv local integer id=Ahv if b then call s__I0B2_app(id) else call s__I0B2_cancel(id) endif endfunction function s__I0B2_onInit takes nothing returns nothing call RegisterSpellEffectEvent('A0F9',function s__I0B2_onSpell) call SaveReal(BYHT,DroppableTimed,('I0B2'),(($96)*1.)) endfunction function s__I0B3_removebuff takes nothing returns nothing local integer this=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:623") if s__I0B3_buff_lv[this]==1 then call UnitRemoveAbilityandBuffBY((Je[(this)]),'A0DV','BNrd') elseif s__I0B3_buff_lv[this]==2 then call UnitRemoveAbilityandBuffBY((Je[(this)]),'A0MY','B04T') endif call ModifyHeroAllStatPercent(this,-s__I0B3_buff_stat[this]) call Unit_Cancel_Counter($42C,this) set s__I0B3_buff_t[this]=null endfunction function s__I0B3_loop_c takes nothing returns nothing local integer this=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer id local unit u local integer i local real percent local real x local real y if UnitAlive((Je[(this)]))then set percent=.04+.01*s__I0B3_Lv[this] set x=GetUnitX((Je[(this)])) set y=GetUnitY((Je[(this)])) call GroupEnumUnitsInRange(G,x,y,775,null) if s__I0B3_Lv[this]==1 then call GroupRemoveUnit(G,(Je[(this)])) endif loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,700)and IsUnitAliveAndAlly(u,(Je[(this)]))and nC[(GetUnitUserData((u)))]then set id=(GetUnitUserData((u))) if s__I0B3_buff_t[id]==null then set s__I0B3_buff_t[id]=NewTimer(id) set s__I0B3_buff_lv[id]=0 set s__I0B3_buff_stat[id]=0 call Unit_App_Counter($42D,id) endif if s__I0B3_Lv[this]>=s__I0B3_buff_lv[id]then if s__I0B3_Lv[this]!=s__I0B3_buff_lv[id]then if s__I0B3_buff_lv[id]==1 then call UnitRemoveAbilityandBuffBY(u,'A0DV','BNrd') elseif s__I0B3_buff_lv[id]==2 then call UnitRemoveAbilityandBuffBY(u,'A0MY','B04T') endif set s__I0B3_buff_lv[id]=s__I0B3_Lv[this] if s__I0B3_buff_lv[id]==1 then call UnitAddAbilityBY(u,'A0DV') elseif s__I0B3_buff_lv[id]==2 then call UnitAddAbilityBY(u,'A0MY') endif endif if percent!=s__I0B3_buff_stat[id]then call ModifyHeroAllStatPercent(id,percent-s__I0B3_buff_stat[id]) set s__I0B3_buff_stat[id]=percent endif endif call TimerStart(s__I0B3_buff_t[id],.625,false,function s__I0B3_removebuff) endif endloop endif endfunction function s__I0B3_cancel takes integer this returns nothing if s__I0B3_time[this]!=null then call ReleaseTimer(s__I0B3_time[this],"[TimerUtils]Error:624") call DestroyEffectBY(s__I0B3_model[this]) call Unit_Cancel_Counter($42E,(this)) set s__I0B3_time[this]=null endif endfunction function s__I0B3_app takes integer this,integer lv returns nothing if s__I0B3_time[this]==null then set s__I0B3_time[this]=NewTimer(this) set s__I0B3_Lv[this]=lv if s__I0B3_Lv[this]==1 then set s__I0B3_model[this]=(s__Effect_build(AddSpecialEffectTarget(("Abilities\\Spells\\Orc\\LiquidFire\\Liquidfire.mdl"),((Je[(this)])),("origin")))) elseif s__I0B3_Lv[this]==2 then set s__I0B3_model[this]=(s__Effect_build(AddSpecialEffectTarget(("Abilities\\Spells\\Human\\FlameStrike\\FlameStrikeTarget.mdl"),((Je[(this)])),("origin")))) endif call TimerStart(s__I0B3_time[this],.3125,true,function s__I0B3_loop_c) call Unit_App_Counter($42F,(this)) endif endfunction function Equip_I0B3_Passive takes nothing returns nothing local boolean b=ATv local integer id=Ahv if b then call s__I0B3_app((id),1) else call s__I0B3_cancel((id)) endif endfunction function Equip_rat9_Passive takes nothing returns nothing local boolean b=ATv local integer id=Ahv if b then call Active_A0JX_App(id) else call Active_A0JX_Cancel(id) endif endfunction function Equip_I0D9_Passive takes nothing returns nothing local boolean b=ATv local integer id=Ahv if b then call s__I0B3_app((id),2) call Active_A0JX_App(id) else call s__I0B3_cancel((id)) call Active_A0JX_Cancel(id) endif endfunction function Equip_I0C7_Loop takes nothing returns nothing local integer id=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer h local integer iI if Equip_I0D9_CD[id]==0 then set h=R2I(.02*GetUnitState((Je[(id)]),UNIT_STATE_MAX_LIFE)) if h>$4B0 then set h=$4B0 endif if Equip_I0D9_Int[id]74 then set iI=75 set Equip_I0D9_CD[id]=16 call NewTextTagInTarget_B((Je[(id)]),"+75",8,$FF,105,105) call DestroyEffect(AddSpecialEffectTarget("ExplosiveShot.mdl",(Je[(id)]),"chest")) endif set Equip_I0D9_Int[id]=Equip_I0D9_Int[id]+iI call HeroAddExtraInt((id),iI) endif else set Equip_I0D9_CD[id]=Equip_I0D9_CD[id]-1 endif endfunction function Equip_I0C7_Passive takes nothing returns nothing local integer id=Ahv local boolean b=ATv if b then if Equip_I0D9_Timer[id]==null then set Equip_I0D9_Timer[id]=NewTimer(id) set Equip_I0D9_CD[id]=0 call UnitAddAbilityBY((Je[(id)]),'A0HP') call TimerStart(Equip_I0D9_Timer[id],.03125,true,function Equip_I0C7_Loop) call Unit_App_Counter($430,(id)) endif elseif Equip_I0D9_Timer[id]!=null then call ReleaseTimer(Equip_I0D9_Timer[id],"[TimerUtils]Error:625") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0HP','B00F') call HeroAddExtraInt((id),-Equip_I0D9_Int[id]) call Unit_Cancel_Counter($431,(id)) set Equip_I0D9_Timer[id]=null set Equip_I0D9_Int[id]=0 endif endfunction function s__I0CA_removebuff takes integer this returns nothing if s__I0CA_buff_timer[this]!=null then call ReleaseTimer(s__I0CA_buff_timer[this],"[TimerUtils]Error:626") call UnitRemoveAbilityandBuffBY((Je[(this)]),'A0I6','B012') call HeroAddExtraInt((this),-s__I0CA_buff_int[this]) set s__I0CA_buff_timer[this]=null set s__I0CA_user_spell[this]=false set s__I0CA_buff_int[this]=0 set s__I0CA_buff_textdis[this]=75 endif endfunction function s__I0CA_expired takes nothing returns nothing call s__I0CA_removebuff(((alloc__hpv(GetHandleId((GetExpiredTimer())))))) endfunction function s__I0CA_addbuff takes nothing returns nothing local integer this=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:627") local integer i local integer tI if s__I0CA_buff_timer[this]==null then set s__I0CA_buff_timer[this]=NewTimer(this) call UnitAddAbilityBY((Je[(this)]),'A0I6') endif if s__I0CA_buff_int[this]<600 then set i=R2I(s__I0CA_buff_int[this]+s__I0CA_tak_damage[this]) if i>600 then set i=600 endif if i>=s__I0CA_buff_textdis[this]then set tI=75*(i/ 75) set s__I0CA_buff_textdis[this]=tI+75 call NewTextTagInTarget_B((Je[(this)]),"~"+I2S(tI)+"~",9,$CD,$9B,$9B) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl",(Je[(this)]),"chest")) endif call HeroAddExtraInt((this),i-s__I0CA_buff_int[this]) set s__I0CA_buff_int[this]=i endif call TimerStart(s__I0CA_buff_timer[this],8,false,function s__I0CA_expired) set s__I0CA_tak_timer[this]=null set s__I0CA_tak_damage[this]=0 endfunction function s__I0CA_onDamage takes nothing returns nothing local integer this=(pF_v) if not s__I0CA_user_spell[this]then if s__I0CA_tak_timer[this]==null then set s__I0CA_tak_timer[this]=NewTimer(this) call TimerStart(s__I0CA_tak_timer[this],0,false,function s__I0CA_addbuff) endif set s__I0CA_tak_damage[this]=s__I0CA_tak_damage[this]+.00035*GetDamage() endif endfunction function s__I0CA_cancel takes integer this returns nothing call s__I0CA_removebuff(this) if s__I0CA_tak_timer[this]!=null then call ReleaseTimer(s__I0CA_tak_timer[this],"[TimerUtils]Error:628") set s__I0CA_tak_timer[this]=null endif call s__Trig_remove((s__I0CA_tak_trig[this])) call Unit_Cancel_Counter($432,(this)) endfunction function s__I0CA_app takes integer this returns nothing set s__I0CA_tak_trig[this]=UnitAddDamagerTrigB((this),function s__I0CA_onDamage) set s__I0CA_buff_int[this]=0 set s__I0CA_buff_textdis[this]=75 set s__I0CA_tak_damage[this]=0 call Unit_App_Counter($433,(this)) endfunction function s__I0CA_onSpell takes nothing returns nothing local integer this=(GetUnitUserData((GetTriggerUnit()))) local unit u local real r local real x local real y local real d if s__I0CA_buff_int[this]<300 then call IssueUnitStop_DisplayText((Je[(this)]),"|c00ff8080Intelligence needed: "+I2S(300-s__I0CA_buff_int[this])) else set x=GetSpellTargetX() set y=GetSpellTargetY() set r=.5+(s__I0CA_buff_int[this]-300.)/ 600. set d=r*90*GetHeroState3((Je[(this)]),true) set s__I0CA_user_spell[this]=true call GroupEnumUnitsInRange(G,x,y,450*r,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitAliveAndEnemy(u,(Je[(this)]))then call m2v(u,4*r,'A500','B500',true) call UnitDamageTargetBY((((Je[(this)]))),((u)),((((d)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",u,"origin")) endif endloop call Ltv(Lfv(LAv("AncientExplode.mdl",x,y,1.25*r),0,$9B,$9B,$FF)) call Ltv(LAv("uberdarkwave.mdl",x,y,.5*r)) call CSv((Kc[(this)]),35,.3) call s__I0CA_removebuff(this) endif endfunction function s__I0CA_Passive takes nothing returns nothing local integer this=Ahv local boolean b=ATv if b then call s__I0CA_app(this) else call s__I0CA_cancel(this) endif endfunction function s__I0CA_onInit takes nothing returns nothing call RegisterSpellEffectEvent('A0I4',function s__I0CA_onSpell) call SaveReal(BYHT,DroppableTimed,('I0CA'),((75)*1.)) endfunction function s__I0CO_end takes nothing returns nothing local integer this=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:629") call UnitRemoveAbilityandBuffBY((Je[(this)]),'A03U','B01D') set s__I0CO_buff_timer[this]=null endfunction function s__I0CO_enable takes nothing returns nothing local integer this=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:630") set s__I0CO_buff_timer[this]=null set s__I0CO_cooling_user[this]=false endfunction function s__I0CO_onDamaged takes nothing returns nothing local integer this=(pF) local unit u local integer nG local real x local real y if(JF[HF])then if GetRandomInt(1,6)==1 then call UnitDamageTargetBY((((MF))),(((mF))),((((5*GetHeroState1((MF),true))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((9)*1.))*1.),(("|c00bbc7fb"))) call DestroyEffect(AddSpecialEffectTarget("LightningSphere_FX.mdl",(mF),"chest")) else call UnitDamageTargetBY((((MF))),(((mF))),((((.6*GetHeroState1((MF),true))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) call DestroyEffect(AddSpecialEffectTarget("LightningArrow1.mdl",(mF),"chest")) endif endif if not s__I0CO_cooling_user[this]then if s__I0CO_buff_timer[this]==null then set s__I0CO_buff_timer[this]=NewTimer(this) set s__I0CO_charged_rate[this]=0 set s__I0CO_charged_max[this]=$A*GetUnitState((MF),UNIT_STATE_MAX_LIFE) set s__I0CO_charged_value[this]=0 call UnitAddAbilityBY((MF),'A03U') endif if(DAK_AMOUNT[HF])>.2*s__I0CO_charged_max[this]then set s__I0CO_charged_value[this]=s__I0CO_charged_value[this]+.2*s__I0CO_charged_max[this] else set s__I0CO_charged_value[this]=s__I0CO_charged_value[this]+(DAK_AMOUNT[HF]) endif if s__I0CO_charged_value[this]s__I0CO_charged_rate[this]then set s__I0CO_charged_rate[this]=nG call DestroyEffect(AddSpecialEffectTarget("BluefireBolt.mdl",(MF),"chest")) call NewTextTagInTarget_B((MF),"|c006fa4f2"+I2S($A*nG)+"%",9,$FF,$FF,$FF) endif call TimerStart(s__I0CO_buff_timer[this],8,false,function s__I0CO_end) else set s__I0CO_cooling_user[this]=true set x=GetUnitX((MF)) set y=GetUnitY((MF)) call SetItemDroppableTimed((ConvertVersion(LoadInteger(BYHT2,EquipSlot_R[EquipSlot[(this)]],('I0CO')))),5) call UnitRemoveAbilityandBuffBY((MF),'A03U','B01D') call Lqv(Lfv(LAv("Abilities\\Spells\\NightElf\\Blink\\BlinkTarget.mdl",x,y,3.5),125,125,$FF,$CD),2) call Lqv(Lfv(LAv("Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl",x,y,3),125,125,$FF,$CD),2) call DestroyEffect(AddSpecialEffectTarget("Energy_Release.mdl",(MF),"origin")) call TimerStart(s__I0CO_buff_timer[this],5,false,function s__I0CO_enable) call GroupEnumUnitsInRange(G,x,y,525,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,450)and IsUnitAliveAndEnemy(u,(MF))then call UnitDamageTargetBY((((MF))),((u)),((((1.75*s__I0CO_charged_max[this])*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v(u,2.5) endif endloop endif endif endfunction function s__I0CO_Passive takes nothing returns nothing local integer this=Ahv local boolean b=ATv if b then set s__I0CO_atk_trig[this]=UnitAddShieldTrigB((this),function s__I0CO_onDamaged) call Unit_App_Counter($434,(this)) else if s__I0CO_buff_timer[this]!=null then call ReleaseTimer(s__I0CO_buff_timer[this],"[TimerUtils]Error:631") call UnitRemoveAbilityandBuffBY((Je[(this)]),'A03U','B01D') set s__I0CO_buff_timer[this]=null endif call s__Trig_remove(s__I0CO_atk_trig[this]) call Unit_Cancel_Counter($435,(this)) endif endfunction function s__I0CR_End takes integer this returns nothing call UnitRemoveAbilityandBuffBY((Je[(this)]),'A0IK','B01G') set s__I0CR_Count[this]=0 endfunction function s__I0CR_onDamaged takes nothing returns nothing local integer this=s__Trig_P2[s__Trig_Index] if s__I0CR_Count[this]>0 and GetDamage()>0 then set s__I0CR_Count[this]=s__I0CR_Count[this]-1 call DestroyEffect(AddSpecialEffectTarget("BlackBlink.mdl",(MF),"origin")) call thv("|c00ff0000MISS!",GetUnitX((mF)),GetUnitY((mF)),GetUnitFlyHeight((mF))+35,.035,.025,bj_PI/ 2,1,1.5) set KF[HF]=PF+1000000. if s__I0CR_Count[this]<1 then call s__I0CR_End(this) endif endif endfunction function s__I0CR_Loop_c takes nothing returns nothing local integer this=(alloc__hpv(GetHandleId((GetExpiredTimer())))) set s__I0CR_Count[this]=3 call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIil\\AIilTarget.mdl",(Je[(this)]),"origin")) call UnitAddAbilityBY((Je[(this)]),'A0IK') endfunction function s__I0CR_Passive takes nothing returns nothing local integer this=Ahv local boolean b=ATv if b then set s__I0CR_Shield[this]=UnitAddShieldTrigB((this),function s__I0CR_onDamaged) set s__Trig_P2[s__I0CR_Shield[this]]=this set s__I0CR_Time[this]=NewTimer(this) set s__I0CR_Count[this]=0 call TimerStart(s__I0CR_Time[this],20,true,function s__I0CR_Loop_c) call Unit_App_Counter($436,(this)) else if s__I0CR_Time[this]!=null then call s__I0CR_End(this) call s__Trig_remove(s__I0CR_Shield[this]) call ReleaseTimer(s__I0CR_Time[this],"[TimerUtils]Error:632") call Unit_Cancel_Counter($437,(this)) set s__I0CR_Time[this]=null endif endif endfunction function s__dsum_Loop_c takes nothing returns nothing local integer this=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local unit u local real x local real y if UnitAlive((Je[(this)]))then set x=GetUnitX((Je[(this)])) set y=GetUnitY((Je[(this)])) call GroupEnumUnitsInRange(G,x,y,275,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$C8)and IsUnitAliveAndEnemy(u,(Je[(this)]))then call UnitDamageTargetBY((((Je[(this)]))),((u)),(((($960)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call TimerDestroyAddSpecialEffectTargetBY("Abilities\\Spells\\Other\\ImmolationRed\\ImmolationRedDamage.mdl",u,"chest",.5) endif endloop endif endfunction function s__dsum_Cancel takes integer this returns nothing if s__dsum_Time[this]!=null then call ReleaseTimer(s__dsum_Time[this],"[TimerUtils]Error:633") call DestroyEffectBY(s__dsum_Effect[this]) call Unit_Cancel_Counter($438,(this)) set s__dsum_Time[this]=null endif endfunction function s__dsum_App takes integer this returns nothing if s__dsum_Time[this]==null then set s__dsum_Time[this]=NewTimer(this) set s__dsum_Effect[this]=(s__Effect_build(AddSpecialEffectTarget(("Abilities\\Spells\\Other\\ImmolationRed\\ImmolationRedTarget.mdl"),((Je[(this)])),("chest")))) call TimerStart(s__dsum_Time[this],1,true,function s__dsum_Loop_c) call Unit_App_Counter($439,(this)) endif endfunction function s__dsum_Passive takes nothing returns nothing local integer this=Ahv local boolean b=ATv if b then call s__dsum_App(this) else call s__dsum_Cancel(this) endif endfunction function s__kybl_RemoveBuff takes integer this returns nothing if s__kybl_buff_timer[this]!=null then call ReleaseTimer(s__kybl_buff_timer[this],"[TimerUtils]Error:634") call UnitRemoveAbilityandBuffBY((Je[(this)]),'A0QV','B06D') call ModifyHeroInt((this),-s__kybl_unit_Int*s__kybl_buff_lv[this]) call ModifyUnitMagicDamage((this),-s__kybl_unit_MATK*s__kybl_buff_lv[this]) call SetUnitVertexColor((Je[(this)]),$FF,$FF,$FF,$FF) set s__kybl_buff_timer[this]=null endif endfunction function s__kybl_expired takes nothing returns nothing call s__kybl_RemoveBuff(((alloc__hpv(GetHandleId((GetExpiredTimer())))))) endfunction function s__kybl_onSpellEffect takes nothing returns nothing local integer this=s__Trig_P if s__kybl_buff_timer[this]==null then set s__kybl_buff_timer[this]=NewTimer(this) set s__kybl_buff_lv[this]=0 call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl",(Je[(this)]),"origin")) call SetUnitVertexColor((Je[(this)]),$FF,$CD,$CD,$FF) call UnitAddAbilityBY((Je[(this)]),'A0QV') endif if s__kybl_buff_lv[this]<5 then set s__kybl_buff_lv[this]=s__kybl_buff_lv[this]+1 call NewTextTagInTarget_B((Je[(this)]),"|c00de6969+"+I2S(s__kybl_unit_Int*s__kybl_buff_lv[this])+" INT +"+I2S(R2I(s__kybl_unit_MATK*s__kybl_buff_lv[this]))+"% skill damage",8+.5*s__kybl_buff_lv[this],$FF,$FF,$FF) call ModifyHeroInt((this),s__kybl_unit_Int) call ModifyUnitMagicDamage((this),s__kybl_unit_MATK) endif call TimerStart(s__kybl_buff_timer[this],6.,false,function s__kybl_expired) endfunction function s__kybl_Passive takes nothing returns nothing local integer this=Ahv local boolean b=ATv if b then if s__kybl_spell_trig[this]==0 then set s__kybl_spell_trig[this]=HeroAddSpellEffectTrigB((this),function s__kybl_onSpellEffect) call Unit_App_Counter($43A,(this)) endif else if s__kybl_spell_trig[this]!=0 then call s__Trig_remove((s__kybl_spell_trig[this])) call Unit_Cancel_Counter($43B,(this)) set s__kybl_spell_trig[this]=0 endif call s__kybl_RemoveBuff(this) endif endfunction function s__rde4_RemoveBuff takes integer this returns nothing if s__rde4_buff_timer[this]!=null then call ReleaseTimer(s__rde4_buff_timer[this],"[TimerUtils]Error:635") call UnitRemoveAbilityandBuffBY((Je[(this)]),'A0QU','B06C') call ModifyHeroInt((this),-50*s__rde4_buff_lv[this]) call ModifyUnitMagicDamage((this),-s__rde4_unit_MATK*s__rde4_buff_lv[this]) set s__rde4_buff_timer[this]=null endif endfunction function s__rde4_expired takes nothing returns nothing call s__rde4_RemoveBuff(((alloc__hpv(GetHandleId((GetExpiredTimer())))))) endfunction function s__rde4_onSpellEffect takes nothing returns nothing local integer this=s__Trig_P if s__rde4_buff_timer[this]==null then set s__rde4_buff_timer[this]=NewTimer(this) set s__rde4_buff_lv[this]=0 call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl",(Je[(this)]),"origin")) call UnitAddAbilityBY((Je[(this)]),'A0QU') endif if s__rde4_buff_lv[this]<5 then set s__rde4_buff_lv[this]=s__rde4_buff_lv[this]+1 call NewTextTagInTarget_B((Je[(this)]),"|c00de6969+"+I2S(50*s__rde4_buff_lv[this])+" INT +"+I2S(R2I(s__rde4_unit_MATK*s__rde4_buff_lv[this]))+"% skill damage",8+.5*s__rde4_buff_lv[this],$FF,$FF,$FF) call ModifyHeroInt((this),50) call ModifyUnitMagicDamage((this),s__rde4_unit_MATK) endif call TimerStart(s__rde4_buff_timer[this],6.,false,function s__rde4_expired) endfunction function s__rde4_Passive takes nothing returns nothing local integer this=Ahv local boolean b=ATv if b then if s__rde4_spell_trig[this]==0 then set s__rde4_spell_trig[this]=HeroAddSpellEffectTrigB((this),function s__rde4_onSpellEffect) call Unit_App_Counter($43C,(this)) endif else if s__rde4_spell_trig[this]!=0 then call s__Trig_remove((s__rde4_spell_trig[this])) call Unit_Cancel_Counter($43D,(this)) set s__rde4_spell_trig[this]=0 endif call s__rde4_RemoveBuff(this) endif endfunction function s__rde2_onAttack takes nothing returns nothing local unit u local real x local real y local real d if GetUnitAbilityLevel((mF),'A0QO')==1 then set u=(MF) set x=GetUnitX((MF)) set y=GetUnitY((MF)) set d=50.*GetHeroState2((mF),true) call GroupEnumUnitsInRange(G,x,y,300+75,null) call GroupRemoveUnit(G,u) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,300)then if IsUnitAliveAndEnemy(u,(mF))then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\AcidBomb\\BottleMissile.mdl",u,"chest")) call UnitDamageTargetBY((((mF))),((u)),((((d)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",(mF),"origin")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\AcidBomb\\BottleMissile.mdl",(MF),"chest")) call UnitDamageTargetBY((((mF))),(((MF))),((((1.5*d)*1.))*1.),false,(true),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call UnitCureTaret(null,(mF),.08*GetUnitMaxLifeById((pF_v))) call Ltv(Lfv(LAv("Acid Ex.mdl",x,y,2),$FF,$FF,$FF,$CD)) call Ltv(Lfv(LAv("AncientExplode.mdl",x,y,1),55,$FF,55,$CD)) call UnitRemoveAbilityandBuffBY((mF),'A0QO','B06A') endif endfunction function s__rde2_loop_c takes nothing returns nothing local integer this=(alloc__hpv(GetHandleId((GetExpiredTimer())))) if UnitAlive((Je[(this)]))then call UnitAddAbilityBY((Je[(this)]),'A0QO') endif endfunction function s__rde2_Passive takes nothing returns nothing local integer this=Ahv local boolean b=ATv if b then if s__rde2_time[this]==null then set s__rde2_time[this]=NewTimer(this) set s__rde2_atk_trig[this]=UnitAddPAttackTrigB((this),function s__rde2_onAttack) call HeroSkillsreplace((this),'A06A','A0QN') call Unit_App_Counter($43E,(this)) endif call TimerStart(s__rde2_time[this],6,true,function s__rde2_loop_c) else if s__rde2_time[this]!=null then call ReleaseTimer(s__rde2_time[this],"[TimerUtils]Error:636") call s__Trig_remove(s__rde2_atk_trig[this]) call UnitRemoveAbilityandBuffBY((Je[(this)]),'A0QO','B06A') call HeroSkillsreplace((this),'A0QN','A06A') call Unit_Cancel_Counter($43F,(this)) set s__rde2_time[this]=null endif endif endfunction function s__sclp_removebuff takes nothing returns nothing local integer this=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:637") call UnitRemoveAbilityandBuffBY((Je[(this)]),'A0QM','B069') call ModifyUnitArmor((this),-$96) call DeUnitMdef((this),s__sclp_buff_mdef[this]) call Unit_Cancel_Counter($440,(this)) set s__sclp_buff_time[this]=null endfunction function s__sclp_addbuff takes unit u returns nothing local integer this=(GetUnitUserData((u))) if s__sclp_buff_time[this]==null then set s__sclp_buff_time[this]=NewTimer(this) set s__sclp_buff_mdef[this]=ModifyUnitMdef((this),10.) call UnitAddAbilityBY(u,'A0QM') call ModifyUnitArmor((this),$96) call Unit_App_Counter($441,(this)) endif call TimerStart(s__sclp_buff_time[this],2*.5,false,function s__sclp_removebuff) endfunction function s__sclp_loop_c takes nothing returns nothing local integer this=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local unit u local real x local real y if UnitAlive((Je[(this)]))then set x=GetUnitX((Je[(this)])) set y=GetUnitY((Je[(this)])) call GroupEnumUnitsInRange(G,x,y,800.+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,800.)then if IsUnitAllyNotbag(u,(Je[(this)]))then call s__sclp_addbuff(u) endif endif endloop endif endfunction function s__sclp_Passive takes nothing returns nothing local integer this=Ahv local boolean b=ATv if b then if s__sclp_time[this]==null then set s__sclp_time[this]=NewTimer(this) set s__sclp_model[this]=(s__Effect_build(AddSpecialEffectTarget(("HealingWater.mdl"),((Je[(this)])),("origin")))) call Unit_App_Counter($442,(this)) endif call TimerStart(s__sclp_time[this],.5,true,function s__sclp_loop_c) else if s__sclp_time[this]!=null then call ReleaseTimer(s__sclp_time[this],"[TimerUtils]Error:638") call DestroyEffectBY(s__sclp_model[this]) call Unit_Cancel_Counter($443,(this)) set s__sclp_time[this]=null endif endif endfunction function s__I06D_removebuff takes integer this returns nothing call UnitRemoveAbilityandBuffBY((Je[(this)]),'A07Y','B00O') set s__I06D_shield_life[this]=0 endfunction function s__I06D_onDamaged takes nothing returns nothing local integer this=s__Trig_P2[s__Trig_Index] if s__I06D_shield_life[this]>0 then if s__I06D_shield_life[this]>GetDamage()then set s__I06D_shield_life[this]=s__I06D_shield_life[this]-GetDamage() set KF[HF]=PF+1000000. else call DamageMinus(s__I06D_shield_life[this]) call s__I06D_removebuff(this) endif endif endfunction function s__I06D_loop_c takes nothing returns nothing local integer this=(alloc__hpv(GetHandleId((GetExpiredTimer())))) if(LoadBoolean(BYHT,EquipSlot_R[EquipSlot[((this))]],('clsd')))then set s__I06D_shield_life[this]=5000 else set s__I06D_shield_life[this]=$BB8 endif call UnitAddAbilityBY((Je[(this)]),'A07Y') endfunction function s__I06D_Passive takes nothing returns nothing local integer this=Ahv local boolean b=ATv if b then set s__I06D_time[this]=NewTimer(this) set s__I06D_shield_trig[this]=UnitAddShieldTrigB((this),function s__I06D_onDamaged) set s__Trig_P2[s__I06D_shield_trig[this]]=this call TimerStart(s__I06D_time[this],8,true,function s__I06D_loop_c) call Unit_App_Counter($444,(this)) else call s__I06D_removebuff(this) call ReleaseTimer(s__I06D_time[this],"[TimerUtils]Error:639") call s__Trig_remove(s__I06D_shield_trig[this]) call Unit_Cancel_Counter($445,(this)) set s__I06D_time[this]=null endif endfunction function EquipTrigger_onInit2 takes nothing returns nothing local integer s call SaveInteger(BYHT2,Item_PickupOrDrop_event,('I08X'),GetHandleId(Filter((function s__Redemption_Passive)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('sbch'),GetHandleId(Filter((function s__Redemption_Passive)))) call Equipment_to_build_TrigSlot('I06Y',Equip_trigSlot_A,(1),function Highly_toxic_series_A_action) call Equipment_to_build_TrigSlot('I06Z',Equip_trigSlot_A,(1),function Highly_toxic_series_A_action) call Equipment_to_build_TrigSlot('I070',Equip_trigSlot_A,(1),function Highly_toxic_series_A_action) call Equipment_to_build_TrigSlot('I071',Equip_trigSlot_A,(1),function Highly_toxic_series_A_action) call Equipment_to_build_TrigSlot('I09F',Equip_trigSlot_A,(1),function Highly_toxic_series_A_action) call Equipment_to_build_TrigSlot('I0GY',Equip_trigSlot_A,(1),function Highly_toxic_series_A_action) call Equipment_to_build_TrigSlot('I077',Equip_trigSlot_A,(1),function Highly_toxic_series_B_action) call Equipment_to_build_TrigSlot('I078',Equip_trigSlot_A,(1),function Highly_toxic_series_B_action) call Equipment_to_build_TrigSlot('I079',Equip_trigSlot_A,(1),function Highly_toxic_series_B_action) call Equipment_to_build_TrigSlot('I07A',Equip_trigSlot_A,(1),function Highly_toxic_series_B_action) call Equipment_to_build_TrigSlot('I09D',Equip_trigSlot_A,(1),function Highly_toxic_series_B_action) call Equipment_to_build_TrigSlot('I0GZ',Equip_trigSlot_A,(1),function Highly_toxic_series_B_action) call Equipment_to_build_TrigSlot('I07B',Equip_trigSlot_A,(1),function Highly_toxic_series_C_action) call Equipment_to_build_TrigSlot('I086',Equip_trigSlot_A,(1),function Akers_mia_action) call Equipment_to_build_TrigSlot('I08H',Equip_trigSlot_A,(1),function Akers_mia_action) call Equipment_to_build_TrigSlot('I09O',Equip_trigSlot_A,(1),function Akers_mia_action) call Equipment_to_build_TrigSlot('I09Q',Equip_trigSlot_A,(1),function Akers_mia_action) call Equipment_to_build_TrigSlot('I085',Equip_trigSlot_A,(1),function Carla_fe_mia_action) call Equipment_to_build_TrigSlot('I08G',Equip_trigSlot_A,(1),function Carla_fe_mia_action) call Equipment_to_build_TrigSlot('ckng',Equip_trigSlot_A,(1),function Bloodthirsty_A_action) call Equipment_to_build_TrigSlot('gopr',Equip_trigSlot_A,(1),function Bloodthirsty_A_action) call Equipment_to_build_TrigSlot('I0BQ',Equip_trigSlot_A,(1),function Bloodthirsty_B_action) call Equipment_to_build_TrigSlot('I0CB',Equip_trigSlot_A,(1),function Bloodthirsty_B_action) call Equipment_to_build_TrigSlot('I08L',Equip_trigSlot_A,(1),function Series_of_Atlantis_A_action) call Equipment_to_build_TrigSlot('I09P',Equip_trigSlot_A,(1),function Series_of_Atlantis_A_action) call Equipment_to_build_TrigSlot('I07R',Equip_trigSlot_A,(1),function Magic_dragon_series_A_action) call Equipment_to_build_TrigSlot('I09S',Equip_trigSlot_A,(1),function Magic_dragon_series_A_action) call Equipment_to_build_TrigSlot('I07S',Equip_trigSlot_A,(1),function Magic_dragon_series_B_action) call Equipment_to_build_TrigSlot('I09T',Equip_trigSlot_A,(1),function Magic_dragon_series_B_action) call Equipment_to_build_TrigSlot('I07U',Equip_trigSlot_D,(2),function Magic_dragon_series_C_action) call Equipment_to_build_TrigSlot('I07W',Equip_trigSlot_D,(2),function Magic_dragon_series_D_action) call Equipment_to_build_TrigSlot('I0C0',Equip_trigSlot_D,(2),function Lobster_series_A_actiom) call Equipment_to_build_TrigSlot('I0C1',Equip_trigSlot_A,(1),function Lobster_series_B_actiom) call Equipment_to_build_TrigSlot('I0BL',Equip_trigSlot_A,(1),function Sea_series_A_action) call Equipment_to_build_TrigSlot('I0BM',Equip_trigSlot_A,(1),function Sea_series_A_action) call Equipment_to_build_TrigSlot('I0BN',Equip_trigSlot_A,(1),function Sea_series_A_action) call Equipment_to_build_TrigSlot('I0BO',Equip_trigSlot_A,(1),function Sea_series_A_action) call Equipment_to_build_TrigSlot('I0H1',Equip_trigSlot_A,(1),function Sea_series_A_action) call Equipment_to_build_TrigSlot('I0A5',Equip_trigSlot_A,(1),function Hill_series_A_action) call Equipment_to_build_TrigSlot('I0A6',Equip_trigSlot_A,(1),function Hill_series_A_action) call Equipment_to_build_TrigSlot('I0A7',Equip_trigSlot_A,(1),function Hill_series_A_action) call Equipment_to_build_TrigSlot('I0A8',Equip_trigSlot_A,(1),function Hill_series_A_action) call Equipment_to_build_TrigSlot('I0A9',Equip_trigSlot_A,(1),function Hill_series_A_action) call Equipment_to_build_TrigSlot('I0H0',Equip_trigSlot_A,(1),function Hill_series_A_action) call Equipment_to_build_TrigSlot('phlt',Equip_trigSlot_A,(1),function Corruptor_series_v_action) call Equipment_to_build_TrigSlot('I0C9',Equip_trigSlot_A,(1),function Corruptor_series_v_action) call Equipment_to_build_TrigSlot('I0FC',Equip_trigSlot_A,(1),function Corruptor_series_v_action) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('phlt'),GetHandleId(Filter((function Corruptor_series_B_action)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('I0C9'),GetHandleId(Filter((function Corruptor_series_B_action)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('I0DU'),GetHandleId(Filter((function Corruptor_series_B_action)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('I0FC'),GetHandleId(Filter((function Corruptor_series_B_action)))) call Equipment_to_build_TrigSlot('I08R',Equip_trigSlot_D,(2),function LichKing_series_A_action) call Equipment_to_build_TrigSlot('I08E',Equip_trigSlot_D,(2),function LichKing_series_A_action) call Equipment_to_build_TrigSlot('I0BS',Equip_trigSlot_C,(3),function DeadOfTheClothes_action) call Equipment_to_build_TrigSlot('hval',Equip_trigSlot_C,(3),function Aspects_of_a_wind_action) call Equipment_to_build_TrigSlot('will',Equip_trigSlot_C,(3),function Aspects_of_a_wind_action) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('sor6'),GetHandleId(Filter((function s__AubreyFurHats_Passive)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('sor7'),GetHandleId(Filter((function s__AubreyFurHats_Passive)))) call Equipment_to_build_TrigSlot('sksh',Equip_trigSlot_B,(4),function HolyRelic_series_action) call Equipment_to_build_TrigSlot('ram4',Equip_trigSlot_B,(4),function HolyRelic_series_action) call Equipment_to_build_TrigSlot('rej5',Equip_trigSlot_B,(4),function HolyRelic_series_action) call Equipment_to_build_TrigSlot('I0CN',Equip_trigSlot_A,(1),function Wrath_of_the_thunder_Rage_A_action) call Equipment_to_build_TrigSlot('I0CN',Equip_trigSlot_B,(4),function Wrath_of_the_thunder_Rage_B_action) call Equipment_to_build_TrigSlot('I080',Equip_trigSlot_A,(1),function Wrath_of_the_thunder_action) call Equipment_to_build_TrigSlot('crys',Equip_trigSlot_F,(5),function Disaster_and_death_action) call Equipment_to_build_TrigSlot('gcel',Equip_trigSlot_F,(5),function Disaster_and_death_action) call Equipment_to_build_TrigSlot('bzbf',Equip_trigSlot_C,(3),function Equip_bzbf_Damaged_action) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('rej4'),GetHandleId(Filter((function s__rej4_Passive)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('bzbe'),GetHandleId(Filter((function s__bzbe_Passive)))) call Equipment_to_build_TrigSlot('stel',Equip_trigSlot_A,(1),function s__stel_onAttack) call Equipment_to_build_TrigSlot('sor3',Equip_trigSlot_A,(1),function s__sor3_onAttack) call Equipment_to_build_TrigSlot('sor3',Equip_trigSlot_B,(4),function s__sor3_onCast) call Equipment_to_build_TrigSlot('I0C6',Equip_trigSlot_E,(6),function Equip_I0C6_action) call Equipment_to_build_TrigSlot('I0AN',Equip_trigSlot_E,(6),function Equip_I0AN_action) call Equipment_to_build_TrigSlot('I067',Equip_trigSlot_A,(1),function Equip_I067_onAttack) call Equipment_to_build_TrigSlot('I081',Equip_trigSlot_A,(1),function Equip_I081_onAttack) call Equipment_to_build_TrigSlot('I097',Equip_trigSlot_A,(1),function Equip_I097_onAttack) call Equipment_to_build_TrigSlot('I099',Equip_trigSlot_A,(1),function Equip_I099_onAttack) call Equipment_to_build_TrigSlot('I0D5',Equip_trigSlot_A,(1),function Equip_I0D5_onAttack) call Equipment_to_build_TrigSlot('I0BR',Equip_trigSlot_A,(1),function Equip_I0BR_onAttack) call Equipment_to_build_TrigSlot('I0C8',Equip_trigSlot_A,(1),function Equip_I0C8_onAttack) call Equipment_to_build_TrigSlot('I0CU',Equip_trigSlot_A,(1),function Equip_I0CU_onAttack) call Equipment_to_build_TrigSlot('bspd',Equip_trigSlot_A,(1),function Equip_bspd_onAttack) call Equipment_to_build_TrigSlot('gmfr',Equip_trigSlot_A,(1),function Equip_gmfr_onAttack) call Equipment_to_build_TrigSlot('kysn',Equip_trigSlot_A,(1),function Equip_kysn_onAttack) call Equipment_to_build_TrigSlot('tgxp',Equip_trigSlot_A,(1),function Equip_kysn_onAttack) call Equipment_to_build_TrigSlot('pgin',Equip_trigSlot_A,(1),function s__pgin_onAttack) call Equipment_to_build_TrigSlot('pmna',Equip_trigSlot_A,(1),function Equip_pmna_onAttack) call Equipment_to_build_TrigSlot('prvt',Equip_trigSlot_A,(1),function Equip_prvt_onAttack) call Equipment_to_build_TrigSlot('ratc',Equip_trigSlot_A,(1),function Equip_ratc_onAttack) call Equipment_to_build_TrigSlot('rin1',Equip_trigSlot_A,(1),function Equip_rin1_onAttack) call Equipment_to_build_TrigSlot('rhth',Equip_trigSlot_A,(1),function Equip_rhth_onAttack) call Equipment_to_build_TrigSlot('I0D6',Equip_trigSlot_A,(1),function Equip_I0D6_onAttack) call Equipment_to_build_TrigSlot('sbok',Equip_trigSlot_A,(1),function Equip_sbok_onAttack) call Equipment_to_build_TrigSlot('sehr',Equip_trigSlot_A,(1),function Equip_sehr_onAttack) call Equipment_to_build_TrigSlot('shcw',Equip_trigSlot_A,(1),function Equip_shcw_onAttack) call Equipment_to_build_TrigSlot('skrt',Equip_trigSlot_A,(1),function Equip_skrt_onAttack) call Equipment_to_build_TrigSlot('sor9',Equip_trigSlot_A,(1),function Equip_sor9_onAttack) call Equipment_to_build_TrigSlot('tkno',Equip_trigSlot_A,(1),function Equip_tkno_onAttack) call Equipment_to_build_TrigSlot('k3m2',Equip_trigSlot_A,(1),function Equip_k3m2_onAttack) call Equipment_to_build_TrigSlot('rde3',Equip_trigSlot_A,(1),function Equip_rde3_onAttack) call Equipment_to_build_TrigSlot('I0CE',Equip_trigSlot_B,(4),function s__I0CE_onSpellEffect) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('I0CE'),GetHandleId(Filter((function s__I0CE_Passive)))) call Equipment_to_build_TrigSlot('I0CM',Equip_trigSlot_B,(4),function Equip_I0CM_onSpellEffect) call Equipment_to_build_TrigSlot('I0DI',Equip_trigSlot_B,(4),function Equip_I0DI_onSpellEffect) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('I0DI'),GetHandleId(Filter((function Equip_I0DI_PickupOrDrop)))) call Equipment_to_build_TrigSlot('afac',Equip_trigSlot_B,(4),function Equip_afac_onSpellEffect) call Equipment_to_build_TrigSlot('blba',Equip_trigSlot_B,(4),function Equip_blba_onSpellEffect) call Equipment_to_build_TrigSlot('cnhn',Equip_trigSlot_B,(4),function Equip_cnhn_onSpellEffect) call Equipment_to_build_TrigSlot('gobm',Equip_trigSlot_B,(4),function Equip_gobm_onSpellEffect) call Equipment_to_build_TrigSlot('hcun',Equip_trigSlot_B,(4),function s__hcun_onSpellEffect) call Equipment_to_build_TrigSlot('k3m3',Equip_trigSlot_B,(4),function Equip_k3m3_onSpellEffect) call Equipment_to_build_TrigSlot('ofro',Equip_trigSlot_B,(4),function Equip_ofro_onSpellEffect) call Equipment_to_build_TrigSlot('srtl',Equip_trigSlot_B,(4),function Equip_srtl_onSpellEffect) call Equipment_to_build_TrigSlot('stwa',Equip_trigSlot_B,(4),function Equip_stwa_onSpellEffect) call Equipment_to_build_TrigSlot('rat3',Equip_trigSlot_B,(4),function s__rat3_onSpellEffect) call Equipment_to_build_TrigSlot('rag1',Equip_trigSlot_A,(7),function Equip_rag1_onCrit) call Equipment_to_build_TrigSlot('I08C',Equip_trigSlot_D,(2),function Equip_I08C_beAttack) call Equipment_to_build_TrigSlot('I08D',Equip_trigSlot_D,(2),function Equip_I08D_beAttack) call Equipment_to_build_TrigSlot('I088',Equip_trigSlot_D,(2),function Equip_I088_beAttack) call Equipment_to_build_TrigSlot('spsh',Equip_trigSlot_D,(2),function Equip_spsh_beAttack) call Equipment_to_build_TrigSlot('lgdh',Equip_trigSlot_D,(2),function Equip_lgdh_beAttack) call Equipment_to_build_TrigSlot('I0CP',Equip_trigSlot_D,(3),function Equip_I0CP_Shield) call Equipment_to_build_TrigSlot('esaz',Equip_trigSlot_C,(3),function Equip_esaz_Shield) call Equipment_to_build_TrigSlot('jpnt',Equip_trigSlot_C,(3),function Equip_jpnt_Shield) call Equipment_to_build_TrigSlot('I0B5',Equip_trigSlot_C,(8),function Equip_I0B5_Meleemagic) call Equipment_to_build_TrigSlot('glsk',Equip_trigSlot_C,(8),function s__glsk_onDirectHit) call Equipment_to_build_TrigSlot('I0CC',Equip_trigSlot_E,(9),function Equip_I0CC_onKillUnit) call Equipment_to_build_TrigSlot('mort',Equip_trigSlot_E,(9),function Equip_mort_onKillUnit) call Equipment_to_build_TrigSlot('mcou',Equip_trigSlot_C,($A),function Equip_mcou_onCured) call Equipment_to_build_TrigSlot('I00A',Equip_trigSlot_A,(1),Item_I00A_Func) call Equipment_to_build_TrigSlot('I00C',Equip_trigSlot_C,(6),Item_I00C_Func) call Equipment_to_build_TrigSlot('I00E',Equip_trigSlot_A,(1),Item_I00E_Func) call Equipment_to_build_TrigSlot('I05H',Equip_trigSlot_A,(1),Item_I05H_Func) call Equipment_to_build_TrigSlot('I0H2',Equip_trigSlot_A,(1),Item_I05H_Func) call Equipment_to_build_TrigSlot('I0DT',Equip_trigSlot_A,(1),Item_I0DT_Func) call Equipment_to_build_TrigSlot('I0DU',Equip_trigSlot_A,(1),Item_I0DU_Func) call Equipment_to_build_TrigSlot('I0DW',Equip_trigSlot_F,(5),Item_I0DW_Func) call Equipment_to_build_TrigSlot('I0DX',Equip_trigSlot_A,(1),Item_I0DX_Func) call Equipment_to_build_TrigSlot('I0DZ',Equip_trigSlot_A,(1),Item_I0DZ_Func) call Equipment_to_build_TrigSlot('I0E0',Equip_trigSlot_A,(1),Item_I0E0_Func) call Equipment_to_build_TrigSlot('I0E2',Equip_trigSlot_A,(1),Item_I0E2_Func) call Equipment_to_build_TrigSlot('I0E3',Equip_trigSlot_B,(4),Item_I0E3_Func) call Equipment_to_build_TrigSlot('I0E5',Equip_trigSlot_A,(1),Item_I0E5_Func) call Equipment_to_build_TrigSlot('I0E6',Equip_trigSlot_A,(1),Item_I0E6_Func) call Equipment_to_build_TrigSlot('I0E7',Equip_trigSlot_A,(1),Item_I0E7_Func) call Equipment_to_build_TrigSlot('I0EB',Equip_trigSlot_B,(4),function Equip_I0EB_onSpellEffect) call Equipment_to_build_TrigSlot('I0EC',Equip_trigSlot_A,(1),Item_I0EC_Func) call Equipment_to_build_TrigSlot('azhr',Equip_trigSlot_C,(6),Item_azhr_Func) call Equipment_to_build_TrigSlot('I0EV',Equip_trigSlot_A,(1),Item_I0EV_Func) call Equipment_to_build_TrigSlot('I0EW',Equip_trigSlot_A,(1),Item_I0EW_Func) call Equipment_to_build_TrigSlot('I0EX',Equip_trigSlot_A,(1),Item_I0EX_Func) call Equipment_to_build_TrigSlot('I0EZ',Equip_trigSlot_B,(4),Item_I0EZ_Func) call Equipment_to_build_TrigSlot('I0F2',Equip_trigSlot_B,(4),Item_I0F2_Func) call Equipment_to_build_TrigSlot('I0F4',Equip_trigSlot_A,(1),Item_I0F4_Func) call Equipment_to_build_TrigSlot('I0F5',Equip_trigSlot_C,($B),Item_I0F5_Func) call Equipment_to_build_TrigSlot('I0F7',Equip_trigSlot_A,(1),Item_I0F7_Func) call Equipment_to_build_TrigSlot('I0FD',Equip_trigSlot_F,(5),Item_I0FD_Func) call Equipment_to_build_TrigSlot('I0FO',Equip_trigSlot_A,(1),Item_I0FO_Func) call Equipment_to_build_TrigSlot('I0FP',Equip_trigSlot_A,(1),Item_I0FP_Func) call Equipment_to_build_TrigSlot('I0EY',Equip_trigSlot_A,(1),Item_I0EY_Func) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('I0DV'),GetHandleId(Filter((Item_I0DV_Func)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('I0DY'),GetHandleId(Filter((Item_I0DY_Func)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('I0E1'),GetHandleId(Filter((Item_I0E1_Func)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('ches'),GetHandleId(Filter((Item_I0E4_Func)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('rump'),GetHandleId(Filter((Item_I0E4_Func)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('I0E4'),GetHandleId(Filter((Item_I0E4_Func)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('I0E8'),GetHandleId(Filter((Item_I0E8_Func)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('I0F0'),GetHandleId(Filter((Item_I0F0_Func)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('I0F1'),GetHandleId(Filter((Item_I0F1_Func)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('I0CH'),GetHandleId(Filter((Item_I0CH_Func)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('I05U'),GetHandleId(Filter((Item_I05U_Func)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('rej6'),GetHandleId(Filter((function s__odef_Passive)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('odef'),GetHandleId(Filter((function s__odef_Passive)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('I0FB'),GetHandleId(Filter((function s__odef_Passive)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('I092'),GetHandleId(Filter((function s__I092_Passive)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('I0D8'),GetHandleId(Filter((function s__I0D8_Passive)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('I0B2'),GetHandleId(Filter((function s__I0B2_Passive)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('I0B3'),GetHandleId(Filter((function Equip_I0B3_Passive)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('rat9'),GetHandleId(Filter((function Equip_rat9_Passive)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('I0D9'),GetHandleId(Filter((function Equip_I0D9_Passive)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('I0C7'),GetHandleId(Filter((function Equip_I0C7_Passive)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('I0CA'),GetHandleId(Filter((function s__I0CA_Passive)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('I0CO'),GetHandleId(Filter((function s__I0CO_Passive)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('I0CR'),GetHandleId(Filter((function s__I0CR_Passive)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('dsum'),GetHandleId(Filter((function s__dsum_Passive)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('kybl'),GetHandleId(Filter((function s__kybl_Passive)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('rde4'),GetHandleId(Filter((function s__rde4_Passive)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('rde2'),GetHandleId(Filter((function s__rde2_Passive)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('sclp'),GetHandleId(Filter((function s__sclp_Passive)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('I06D'),GetHandleId(Filter((function s__I06D_Passive)))) call SaveInteger(BYHT2,Item_PickupOrDrop_event,('clsd'),GetHandleId(Filter((function s__I06D_Passive)))) set s=s__suit_new(function MagicDragonSuit) call s__suit_add(s__suit_add(s__suit_add(s__suit_add(s,'I07R'),'I09S'),'I07S'),'I09T') call s__suit_add(s__suit_add(s,'I07U'),'I07W') call s__suit_add(s__suit_add(s,'I07Y'),'I07X') set s=s__suit_new(function LobsterSuit) call s__suit_add(s__suit_add(s,'I0C0'),'I0C0') set s=s__suit_new(function Jack_s_Suit) call s__suit_add(s,'I0AY') call s__suit_add(s__suit_add(s__suit_add(s__suit_add(s,'I07O'),'I07N'),'I07M'),'I07P') call s__suit_add(s__suit_add(s,'cnob'),'shhn') call Active_A05S_Init() call Active_A0HB_Init() call Active_A0JN_Init() call Active_Corruptor_Init() call Active_A0A7_Init() call Active_A094_Init() call Active_A0FC_Init() call Active_A0IU_Init() call Active_A0JX_Init() call RegisterSpellEffectEvent('A0C9',function Active_A0C9_onSpellEffect) call Active_A0DP_Init() call Active_A0F6_Init() call Active_A06K_Init() call Active_A0D4_Init() call Active_A08G_Init() call Active_A0HK_Init() call Active_A079_Init() call Active_A0SF_Init() call Active_A0HI_Init() call Active_A0D2_Init() call Active_A0HQ_Init() call Active_A05C_Init() call Active_A080_Init() call Active_A069_Init() call Active_A05G_Init() call Active_A0MB_Init() call Active_A0QL_Init() call Active_A07O_Init() call Active_A0DT_Init() call Active_A0MJ_Init() call Active_A0CF_Init() call Active_A0RE_Init() call Active_A0PJ_Init() call Active_A0P5_Init() call Active_A0P6_Init() call Active_A0QY_Init() call Active_A0RA_Init() call Active_A020_Init() call Active_A0JP_Init() call Active_A0JR_Init() call Active_A0MF_Init() call Active_A06H_Init() call Active_A0S0_Init() call Active_A0AS_Init() call Active_A0CC_Init() call SaveReal(BYHT,DroppableTimed,('I084'),((20)*1.)) endfunction function EquipTrigger_onInit takes nothing returns nothing set Equip_trigSlot_A=malloc() set Equip_trigSlot_B=malloc() set Equip_trigSlot_C=malloc() set Equip_trigSlot_D=malloc() set Equip_trigSlot_E=malloc() set Equip_trigSlot_F=malloc() set Equip_trigSlot_O[0]=Equip_trigSlot_F set Equip_trigSlot_O[1]=Equip_trigSlot_E set Equip_trigSlot_O[2]=Equip_trigSlot_D set Equip_trigSlot_O[3]=Equip_trigSlot_C set Equip_trigSlot_O[4]=Equip_trigSlot_B set Equip_trigSlot_O[5]=Equip_trigSlot_A call TimerStart((NewTimer(0)),.01,false,function EquipTrigger_onInit2) endfunction function GameInformation___TimedToString takes nothing returns string local integer t=R2I((100000.-TimerGetRemaining(GameTimer))) local integer h local integer m local string s set h=t/ $E10 set t=t-h*$E10 set m=t/ 60 set t=t-m*60 set s=I2S(t) if t<$A then set s="0"+s endif set s=I2S(m)+":"+s if m<$A then set s="0"+s endif set s=I2S(h)+":"+s if h<$A then set s="0"+s endif return s endfunction function GameInformation___Refresh takes nothing returns nothing local integer i set GameInformation___AC=GameInformation___AC+1 if GameInformation___AC==60 then set i=8 set GameInformation___AC=0 set GameInformation___IC=GameInformation___IC+1 set GameInformation___NC=GameInformation___NC+1 loop set i=i-1 if MV[i]!=null and not IsPointInRect(GetUnitX(MV[i]),GetUnitY(MV[i]),gg_rct_XSC___________000)then call Cpv(((GetUnitUserData((MV[i])))),1) endif exitwhen i==0 endloop if GameInformation___NC==60 then set GameInformation___NC=0 set GameInformation___bC=GameInformation___bC+1 endif endif if GameInformation___IC==$A then set GameInformation___IC=$B call StartSound(Ca) call DisplayTimedText("|c0000FF00If you are newbie, open F9 to watch some info. To find team and strategy for bosses, join QQ group: 240519071|r",$F) call DisplayTimedText("|c0000FF00Translated by Vodka Team :|r",$F) call DisplayTimedText("|c008000FFPyCCKuu_4eJl|r",$F) call DisplayTimedText("|c00DC143CBaleriy|r",$F) call DisplayTimedText("|cFF66FF66Xatsi|r",$F) call DisplayTimedText("|c0000FF00Join eng community discord!|r",$F) call DisplayTimedText("|c0000FF00https://discord.gg/UwQVjft <--- invite that wont expire!|r",$F) elseif GameInformation___IC==20 then set GameInformation___IC=0 call StartSound(Ca) call DisplayTimedText("|c0000FF00If you are newbie, open F9 to watch some info. To find team and strategy for bosses, join QQ group: 240519071|r",$F) call DisplayTimedText("|c0000FF00Translated by Vodka Team :|r",$F) call DisplayTimedText("|c008000FFPyCCKuu_4eJl|r",$F) call DisplayTimedText("|c00DC143CBaleriy|r",$F) call DisplayTimedText("|cFF66FF66Xatsi|r",$F) call DisplayTimedText("|c0000FF00Join eng community discord!|r",$F) call DisplayTimedText("|c0000FF00https://discord.gg/UwQVjft|r",$F) endif call MultiboardSetItemValueBY(TV,$A,1,GameInformation___TimedToString()) endfunction function GameInformation___Initialize takes nothing returns nothing local integer i=8 local integer c set TV=NewMultiboard($B,5) call MultiboardSetItemsStyle(s__Multiboard_Ie[(TV)],(true),(false)) call MultiboardSetItemRowStyleBY(TV,0,true,true) call MultiboardSetItemColumnWidthBY(TV,0,.055)//players call MultiboardSetItemColumnValueBY(TV,2,"0")//level call MultiboardSetItemColumnWidthBY(TV,2,.04) call MultiboardSetItemColumnValueBY(TV,3,"0")//stats call MultiboardSetItemColumnWidthBY(TV,3,.04) call MultiboardSetItemColumnValueBY(TV,4,"0") call MultiboardSetItemIconBY(TV,0,0,"ReplaceableTextures\\CommandButtons\\BTNAnkh.blp") call MultiboardSetItemIconBY(TV,0,1,"ReplaceableTextures\\CommandButtons\\BTNOrb.blp") call MultiboardSetItemWidthBY(TV,0,1,.05)//name call MultiboardSetItemIconBY(TV,0,2,"ReplaceableTextures\\CommandButtons\\BTNTransmute.blp") call MultiboardSetItemIconBY(TV,0,3,"ReplaceableTextures\\CommandButtons\\BTNStatUp.blp") call MultiboardSetItemIconBY(TV,0,4,"ReplaceableTextures\\CommandButtons\\BTNSkillz.tga") call MultiboardSetItemWidthBY(TV,0,4,.05)//fatigue call MultiboardSetItemRowStyleBY(TV,9,false,false) call MultiboardSetItemStyleBY(TV,$A,1,true,false) call MultiboardSetTitleText(s__Multiboard_Ie[(TV)],("[|c0000FFFFHoly Spirit II ORPG 1.00 eng|r]")) call MultiboardSetItemValueBY(TV,0,0,"|c0052E252Player|r") call MultiboardSetItemValueBY(TV,0,1,"|c0087CEEBHero|r") call MultiboardSetItemValueBY(TV,0,2,"|cFFFFCC00Level|r") call MultiboardSetItemValueBY(TV,0,3,"|c00FF8200Stats|r") call MultiboardSetItemValueBY(TV,0,4,"|c00FF0000Fatigue|r") call MultiboardSetItemValueBY(TV,$A,0,"|c002040F0Game time|r :") call MultiboardSetItemValueBY(TV,$A,1,GameInformation___TimedToString()) call MultiboardSetItemWidthBY(TV,$A,1,.05) call MultiboardSetItemValueBY(TV,$A,2,"") call MultiboardSetItemWidthBY(TV,$A,2,.02) call MultiboardSetItemValueBY(TV,$A,3,"") call MultiboardSetItemWidthBY(TV,$A,3,.04) call MultiboardSetItemValueBY(TV,$A,4,"") loop set c=i set i=i-1 if pV[i]then call MultiboardSetItemValueBY(TV,c,0,"|c00FFB6C1"+Game_PlayerName[i]) else call MultiboardSetItemValueBY(TV,c,0,"|c00808080Free Slot") endif call MultiboardSetItemWidthBY(TV,c,1,.055) call MultiboardSetItemWidthBY(TV,c,4,.05) exitwhen i==0 endloop call MultiboardDisplay(s__Multiboard_Ie[(TV)],(true)) call MultiboardMinimize(s__Multiboard_Ie[(TV)],(true)) call TimerStart(GetExpiredTimer(),1.,true,function GameInformation___Refresh) endfunction function GameInformation___onInit takes nothing returns nothing call TimerStart((NewTimer(0)),.0,false,function GameInformation___Initialize) endfunction function HeroSkills_A08U_End takes nothing returns nothing local integer id=le if HeroSkills_A08U_App[id]then set HeroSkills_A08U_Last[HeroSkills_A08U_Next[id]]=HeroSkills_A08U_Next[id] set HeroSkills_A08U_Next[HeroSkills_A08U_Last[id]]=HeroSkills_A08U_Last[id] set HeroSkills_A08U_App[id]=false call Unit_Cancel_Counter(366,(id)) if HeroSkills_A08U_Next[0]==0 then call frv(HeroSkills_A08U_Func) endif endif endfunction function HeroSkills_A08U_Loop takes nothing returns nothing local integer id=HeroSkills_A08U_Next[0] local integer local_str loop exitwhen id==0 set local_str=GetHeroState1((Je[(id)]),true) if HeroSkills_A08U_Str[id]!=local_str then call ModifyUnitHP(id,(local_str-HeroSkills_A08U_Str[id])*8) set HeroSkills_A08U_Str[id]=local_str endif set id=HeroSkills_A08U_Next[id] endloop endfunction function HeroSkills_A08U_Open takes integer id returns boolean if HeroSkills_A08U_App[id]then return false endif if HeroSkills_A08U_Next[0]==0 then call fov(HeroSkills_A08U_Func) endif set HeroSkills_A08U_Last[id]=0 set HeroSkills_A08U_Next[id]=HeroSkills_A08U_Next[0] set HeroSkills_A08U_Last[HeroSkills_A08U_Next[0]]=id set HeroSkills_A08U_Next[0]=id set HeroSkills_A08U_App[id]=true call Unit_App_Counter(367,(id)) return true endfunction function HeroSkills_A08U_Actions takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) local integer lv=GetUnitAbilityLevel((Je[(id)]),'A08U') if lv>HeroSkills_A08U_Lv[id]then set HeroSkills_A08U_Lv[id]=lv call UnitAdefChange(id,HeroSkills_A08U_Adef[id],lv*2.5) endif endfunction function Hero_EnterWorld_H000 takes nothing returns nothing local integer id=le if HeroSkills_A08U_Open(id)then set HeroSkills_A08U_Lv[id]=1 set HeroSkills_A08U_Str[id]=GetHeroState1((Je[(id)]),true) set HeroSkills_A08U_Adef[id]=ModifyUnitAdef((id),2.5) call ModifyUnitHP(id,HeroSkills_A08U_Str[id]*8) call UnitAddBeRemoveTrig(id,Filter(function HeroSkills_A08U_End)) endif endfunction function HeroSkills_A08U_Init takes nothing returns nothing set HeroSkills_A08U_Func=fxv(function HeroSkills_A08U_Loop) call RegisterHeroInitEvent('H000',function Hero_EnterWorld_H000) call RegisterHeroSkillEvent('A08U',function HeroSkills_A08U_Actions) call Luv('A08U') endfunction function HeroSkills_A01O_Actions takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) local integer target=(GetUnitUserData((GetSpellTargetUnit()))) local integer lv=GetUnitAbilityLevel((Je[(id)]),'A01O') local real d=(450*lv+($F+3.5*lv)*GetHeroState1((Je[(id)]),true)) local real x=GetUnitX((Je[(target)])) local real y=GetUnitY((Je[(target)])) local unit u if MB[target]then call IssueTargetOrderById((Je[(target)]),$D000F,(Je[(id)])) endif call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl",(Je[(target)]),"origin")) call UnitDamageTargetBY((((Je[(id)]))),(((Je[(target)]))),((((d)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v((Je[(target)]),.5) call GroupEnumUnitsInRange(G,x,y,$C8+75,null) call GroupRemoveUnit(G,(Je[(target)])) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$C8)then if IsUnitAliveAndEnemy(u,(Je[(id)]))then call UnitDamageTargetBY((((Je[(id)]))),((u)),((((d)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v(u,.5) endif endif endloop endfunction function HeroSkills_A01O_Init takes nothing returns nothing call RegisterSpellEffectEvent('A01O',function HeroSkills_A01O_Actions) call Luv('A01O') endfunction function HeroSkills_A00B_Expired takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:317") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0KJ','B03Y') call DeUnitMdef(id,HeroSkills_A00B_Mdef[id]) call ModifyUnitArmor(id,-HeroSkills_A00B_Lv[id]*40) set HeroSkills_A00B_Timer[id]=null set HeroSkills_A00B_Lv[id]=0 endfunction function HeroSkills_A00B_Actions_func takes unit s,real r,real d returns nothing local integer f=CreateEffectFor() local real x=GetUnitX(s) local real y=GetUnitY(s) local unit u call TimerDestroyEffectBY(f,2) call Ltv(LAv("Abilities\\Spells\\NightElf\\Taunt\\TauntCaster.mdl",x,y,r/ $C8)) call GroupEnumUnitsInRange(G,x,y,r+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,r)then if IsUnitAliveAndEnemy(u,s)then if UnitIsSleeping(u)then call UnitWakeUp(u) endif call s__Effect_connect((f),(s__Effect_build(AddSpecialEffectTarget((("Abilities\\Spells\\Other\\Silence\\SilenceTarget.mdl")),((u)),(("overhead")))))) call UnitDamageTargetBY(((s)),((u)),((((d)*1.))*1.),false,(true),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call IssueTargetOrderById(u,$D000F,s) endif endif endloop endfunction function HeroSkills_A00B_Actions takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) local integer lv=GetUnitAbilityLevel((Je[(id)]),'A00B') if HeroSkills_A00B_Timer[id]==null then set HeroSkills_A00B_Timer[id]=NewTimer(id) set HeroSkills_A00B_Mdef[id]=ModifyUnitMdef(id,30) call UnitAddAbilityBY((Je[(id)]),'A0KJ') call Unit_App_Counter(368,(id)) endif if HeroSkills_A00B_Lv[id]!=lv then call ModifyUnitArmor(id,(lv-HeroSkills_A00B_Lv[id])*40) set HeroSkills_A00B_Lv[id]=lv endif call DestroyEffect(AddSpecialEffectTarget("Energy_Release.mdl",(Je[(id)]),"origin")) call TimerStart(HeroSkills_A00B_Timer[id],$A,false,function HeroSkills_A00B_Expired) call HeroSkills_A00B_Actions_func((Je[(id)]),$C8+lv*70,850*lv+(25+4*lv)*GetHeroState1((Je[(id)]),true)) endfunction function HeroSkills_A00B_Init takes nothing returns nothing call RegisterSpellEffectEvent('A00B',function HeroSkills_A00B_Actions) call Luv('A00B') endfunction function HeroSkills_A019_Stop takes integer data returns nothing call SetUnitAnimation(Boss_Spell_unit1[data],"Stand Ready") call SetUnitPathing(Boss_Spell_unit1[data],true) call PauseUnit(Boss_Spell_unit1[data],false) call Ltv(Boss_Spell_data3[data]) call ReleaseTimer(Boss_Spell_timer[data],"[TimerUtils]Error:318") call Boss_Spell_deallocate(data) set Boss_Spell_unit1[data]=null set Boss_Spell_unit2[data]=null set Boss_Spell_eff[data]=null set Boss_Spell_timer[data]=null endfunction function HeroSkills_A019_Start takes nothing returns nothing local integer data=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local unit u local integer lv local real x local real y local real dX local real dY local real a local real d local real damage local real time local real s local boolean local_bool if not UnitAlive(Boss_Spell_unit1[data])then call HeroSkills_A019_Stop(data) return endif set x=GetUnitX(Boss_Spell_unit1[data]) set y=GetUnitY(Boss_Spell_unit1[data]) if Boss_Spell_bool[data]then if UnitAlive(Boss_Spell_unit2[data])and IsUnitInRangeXY(Boss_Spell_unit2[data],Boss_Spell_X[data],Boss_Spell_Y[data],256)then set Boss_Spell_X[data]=GetUnitX(Boss_Spell_unit2[data]) set Boss_Spell_Y[data]=GetUnitY(Boss_Spell_unit2[data]) else set Boss_Spell_bool[data]=false endif endif set dX=Boss_Spell_X[data]-x set dY=Boss_Spell_Y[data]-y set a=Atan2(dY,dX) set d=SquareRoot(dX*dX+dY*dY) set s=30+d/ 17.5 set x=x+s*Cos(a) set y=y+s*Sin(a) if d>$80 and(Boss_Spell_unit2[data]!=null or IsTerrainWalkable(x,y))then set Boss_Spell_data1[data]=Boss_Spell_data1[data]+R2I(s*100) call SetUnitX(Boss_Spell_unit1[data],x) call SetUnitY(Boss_Spell_unit1[data],y) call LKv(Boss_Spell_data3[data],x+(s+$A)*Cos(a)) call Llv(Boss_Spell_data3[data],y+(s+$A)*Sin(a)) if Boss_Spell_eff[data]==null then endif call SetUnitFacingTimed(Boss_Spell_unit1[data],a*bj_RADTODEG,0) call Lqv(LAv("KnockbackDust.mdl",x,y,1),.75) if Boss_Spell_data2[data]==0 then set Boss_Spell_data2[data]=CreatePhantom('e00M',3,x,y,bj_RADTODEG*a) else set Boss_Spell_data2[data]=0 endif else set d=0 endif if d==0 then call LDv(Boss_Spell_data3[data],3) if Boss_Spell_data1[data]>$9C40 then set damage=Boss_Spell_V[data]*1.5 set time=2.25 call Ltv(Lfv(LFv(LAv("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl",x,y,1.5),"AncientExplode.mdl"),0,55,$FF,$FF)) else set damage=Boss_Spell_V[data] set time=1.5 call Ltv(Lfv(LFv(LAv("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl",x,y,1.125),"AncientExplode.mdl"),0,55,$FF,$FF)) endif set local_bool=Boss_Spell_eff[data]!=null if local_bool then call zhv((GetPlayerId((GetOwningPlayer(Boss_Spell_unit1[data])))),40,.5) call Lqv(LAv("BlizzardEruption.mdl",x,y,2.25),2.5) call Ltv(Lfv(LAv("AncientExplode.mdl",x,y,2),0,0,$FF,$FF)) call Ltv(LAv("ColdBlast.mdl",x,y,1.75)) endif call GroupEnumUnitsInRange(G,x,y,275+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,275)then if IsUnitAliveAndEnemyNotAvul(u,Boss_Spell_unit1[data])then if local_bool then if u==Boss_Spell_unit2[data]then call UnitDamageTargetBY(((Boss_Spell_unit1[data])),((u)),((((3.5*damage)*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($F)*1.))*1.),(("|c00acbefd"))) else call UnitDamageTargetBY(((Boss_Spell_unit1[data])),((u)),((((2.5*damage)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($C)*1.))*1.),(("|c00acbefd"))) endif elseif u==Boss_Spell_unit2[data]then call UnitDamageTargetBY(((Boss_Spell_unit1[data])),((u)),((((damage)*1.))*1.),false,(true),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") else call UnitDamageTargetBY(((Boss_Spell_unit1[data])),((u)),((((damage)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif call m2v(u,time,'A500','B500',true) endif endif endloop call HeroSkills_A019_Stop(data) endif endfunction function HeroSkills_A019_Actions takes nothing returns nothing local integer data=Boss_Spell_allocate() local integer lv=GetUnitAbilityLevel(GetTriggerUnit(),'A019') local real v=GetUnitMoveSpeed(GetTriggerUnit()) local real x local real y local real a set Boss_Spell_unit1[data]=GetTriggerUnit() set Boss_Spell_unit2[data]=GetSpellTargetUnit() set Boss_Spell_data1[data]=0 set Boss_Spell_data2[data]=0 set Boss_Spell_bool[data]=true set Boss_Spell_eff[data]=null set Boss_Spell_timer[data]=NewTimer(data) if Boss_Spell_unit2[data]!=null then set Boss_Spell_X[data]=GetUnitX(Boss_Spell_unit2[data]) set Boss_Spell_Y[data]=GetUnitY(Boss_Spell_unit2[data]) else set Boss_Spell_X[data]=GetSpellTargetX() set Boss_Spell_Y[data]=GetSpellTargetY() endif set Boss_Spell_V[data]=$41A*lv+(30+3*lv)*GetHeroState1(Boss_Spell_unit1[data],true) set x=GetUnitX(Boss_Spell_unit1[data]) set y=GetUnitY(Boss_Spell_unit1[data]) set a=Atan2(Boss_Spell_Y[data]-y,Boss_Spell_X[data]-x) set Boss_Spell_data3[data]=LVv('e00L',x+$A*Cos(a),y+$A*Sin(a),bj_RADTODEG*a) call LDv(Boss_Spell_data3[data],.6) call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl",x,y)) call SetUnitAnimation(II[Boss_Spell_data3[data]],"Birth") call SetUnitPathing(Boss_Spell_unit1[data],false) call PauseUnit(Boss_Spell_unit1[data],true) call SetUnitAnimationByIndex(Boss_Spell_unit1[data],3) if v>345 then call TimerStart(Boss_Spell_timer[data],.03125*345/ v,true,function HeroSkills_A019_Start) else call TimerStart(Boss_Spell_timer[data],.03125,true,function HeroSkills_A019_Start) endif endfunction function HeroSkills_A019_Init takes nothing returns nothing call RegisterSpellEffectEvent('A019',function HeroSkills_A019_Actions) call Luv('A019') endfunction function HeroSkills_A00D_BuffExpired takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:319") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0KL','B041') call DeUnitMdef((id),HeroSkills_A08W_Buff_Mdef[id]) call Unit_Cancel_Counter(369,(id)) set HeroSkills_A08W_Buff_Timer[id]=null endfunction function HeroSkills_A00D_BuffAdd takes unit u returns nothing local integer id=(GetUnitUserData((u))) if HeroSkills_A08W_Buff_Timer[id]==null then set HeroSkills_A08W_Buff_Timer[id]=NewTimer(id) set HeroSkills_A08W_Buff_Mdef[id]=ModifyUnitMdef((id),30) call UnitAddAbilityBY((Je[(id)]),'A0KL') call Unit_App_Counter(370,(id)) endif call TimerStart(HeroSkills_A08W_Buff_Timer[id],5,false,function HeroSkills_A00D_BuffExpired) endfunction function HeroSkills_A00D_Explode takes integer id returns nothing local real x=GetUnitX((Je[(id)])) local real y=GetUnitY((Je[(id)])) local real s=1.+2.*HeroSkills_A08W_Energy[id]/ HeroSkills_A08W_MaxEnergy[id] local unit u local boolean b=(LoadBoolean(BYHT,EquipSlot_R[EquipSlot[(id)]],('sbch'))) set HeroSkills_A08W_Energy[id]=HeroSkills_A08W_Energy[id]+$BB8*GetUnitAbilityLevel((Je[(id)]),'A00D') call GroupEnumUnitsInRange(G,x,y,500+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,500)then if IsUnitAliveAndEnemyNotAvul(u,(Je[(id)]))then if b then call BrokenShield_A(u) endif call UnitDamageTargetBY((((Je[(id)]))),((u)),((((HeroSkills_A08W_Energy[id])*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m2v(u,s,'A500','B500',true) elseif IsUnitAliveAndAlly(u,(Je[(id)]))then call HeroSkills_A00D_BuffAdd(u) if b then call UnitCureTaret((Je[(id)]),u,GetUnitMaxLifeById((GetUnitUserData((u))))*.25) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIma\\AImaTarget.mdl",u,"origin")) endif endif endif endloop call Ltv(LAv("ManaWave.mdl",x,y,3)) call Lqv(LAv("FreezingRing.mdl",x,y,2),2.5) call PlaySoundAtPoint_BJ((wa),((100)*1.),((x)*1.),((y)*1.),0) call UnitRemoveAbilityBY((Je[(id)]),'A08W') call UnitRemoveAbilityandBuffBY((Je[(id)]),'A08V','BOwk') call SetPlayerAbilityAvailable(GetOwningPlayer((Je[(id)])),'A00D',true) call DestroyTextTag(HeroSkills_A08W_TextTag[id]) call s__Trig_remove((HeroSkills_A08W_Trig[id])) set HeroSkills_A08W_TextTag[id]=null endfunction function HeroSkills_A08W_TextTagFollow takes integer id returns nothing local real x=GetUnitX((Je[(id)])) local real y=GetUnitY((Je[(id)])) if HeroSkills_A08W_TextTagSize[id]>.025 then set HeroSkills_A08W_TextTagSize[id]=HeroSkills_A08W_TextTagSize[id]-.0025 endif call SetTextTagPos(HeroSkills_A08W_TextTag[id],x,y,50) call SetTextTagText(HeroSkills_A08W_TextTag[id],I2S(R2I(HeroSkills_A08W_Energy[id])),HeroSkills_A08W_TextTagSize[id]) endfunction function HeroSkills_A00D_End takes integer id returns nothing if HeroSkills_A08W_Open[id]then set HeroSkills_A08W_Last[HeroSkills_A08W_Next[id]]=HeroSkills_A08W_Last[id] set HeroSkills_A08W_Next[HeroSkills_A08W_Last[id]]=HeroSkills_A08W_Next[id] set HeroSkills_A08W_Open[id]=false if HeroSkills_A08W_Next[(0)]==0 then call frv(HeroSkills_A08W_Func) endif call HeroSkills_A00D_Explode(id) call Unit_Cancel_Counter(371,(id)) endif endfunction function HeroSkills_A00D_Loop_c takes nothing returns boolean local integer id=HeroSkills_A08W_Next[(0)] loop exitwhen id==0 set HeroSkills_A08W_Duration[id]=HeroSkills_A08W_Duration[id]-1 if HeroSkills_A08W_Duration[id]>0 then call HeroSkills_A08W_TextTagFollow(id) else call HeroSkills_A00D_End(id) endif set id=HeroSkills_A08W_Next[id] endloop return false endfunction function HeroSkills_A00D_App takes integer id returns integer if HeroSkills_A08W_Open[id]then call HeroSkills_A00D_Explode(id) else if HeroSkills_A08W_Next[(0)]==0 then if HeroSkills_A08W_Func==0 then set HeroSkills_A08W_Func=fxv(function HeroSkills_A00D_Loop_c) endif call fov(HeroSkills_A08W_Func) endif set HeroSkills_A08W_Next[id]=HeroSkills_A08W_Next[(0)] set HeroSkills_A08W_Last[HeroSkills_A08W_Next[(0)]]=id set HeroSkills_A08W_Next[(0)]=id set HeroSkills_A08W_Last[id]=0 set HeroSkills_A08W_Open[id]=true call Unit_App_Counter(372,(id)) endif return id endfunction function HeroSkills_A00D_BeDamager takes nothing returns nothing local integer id=(pF) local real x=GetUnitX((MF)) local real y=GetUnitY((MF)) local real n=HeroSkills_A08W_Energy[id]+(DAK_AMOUNT[HF]) local integer fx=Lnv(x,y,Atan2(GetUnitY((mF))-y,GetUnitX((mF))-x)) call LMv(fx,"Abilities\\Spells\\Items\\SpellShieldAmulet\\SpellShieldCaster.mdl") call SetUnitScale(II[(fx)],((1.25)*1.),0,0) set HeroSkills_A08W_TextTagSize[id]=.04 if n>HeroSkills_A08W_MaxEnergy[id]then set HeroSkills_A08W_Energy[id]=HeroSkills_A08W_MaxEnergy[id] else set HeroSkills_A08W_Energy[id]=n endif call SetTextTagText(HeroSkills_A08W_TextTag[id],I2S(R2I(HeroSkills_A08W_Energy[id])),HeroSkills_A08W_TextTagSize[id]) call DamageMinus(HeroSkills_A08W_DefRatio[id]*GetDamage()) call Ltv(Lfv(fx,55,55,$FF,$FF)) endfunction function HeroSkills_A08W_Actions takes nothing returns nothing call HeroSkills_A00D_End(((GetUnitUserData((GetTriggerUnit()))))) endfunction function HeroSkills_A00D_Actions takes nothing returns nothing local integer id=HeroSkills_A00D_App((GetUnitUserData((GetTriggerUnit())))) local integer lv=GetUnitAbilityLevel((Je[(id)]),'A00D') local real x=GetUnitX((Je[(id)])) local real y=GetUnitY((Je[(id)])) local unit u set HeroSkills_A08W_Trig[id]=UnitAddBeDamagerTrigB((id),function HeroSkills_A00D_BeDamager) set HeroSkills_A08W_TextTag[id]=CreateTextTag() set HeroSkills_A08W_Duration[id]=384 set HeroSkills_A08W_Energy[id]=0 set HeroSkills_A08W_DefRatio[id]=.6+.0275*lv set HeroSkills_A08W_MaxEnergy[id]=(50+5*lv)*GetHeroState1((Je[(id)]),true) set HeroSkills_A08W_TextTagSize[id]=.025 call GroupEnumUnitsInRange(G,x,y,500+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,500)then if GetUnitAbilityLevel(u,'Avul')==0 and IsUnitAliveAndEnemy(u,(Je[(id)]))then call IssueTargetOrderById(u,$D000F,(Je[(id)])) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\ManaFlare\\ManaFlareMissile.mdl",u,"chest")) endif endif endloop call SetPlayerAbilityAvailable(GetOwningPlayer((Je[(id)])),'A00D',false) call SetTextTagColor(HeroSkills_A08W_TextTag[id],75,75,$FF,$FF) call UnitAddAbilityBY((Je[(id)]),'A08W') call UnitAddAbilityBY((Je[(id)]),'A08V') call HeroSkills_A08W_TextTagFollow(id) endfunction function HeroSkills_A00D_Init takes nothing returns nothing call RegisterSpellEffectEvent('A00D',function HeroSkills_A00D_Actions) call RegisterSpellEffectEvent('A08W',function HeroSkills_A08W_Actions) call Luv('A00D') endfunction function HeroSkills_A00N_Start takes nothing returns nothing local integer id=(alloc__hpv(GetHandleId((GetExpiredTimer())))) if UnitAlive((Je[(id)]))then set HeroSkills_A00N_Duration[id]=HeroSkills_A00N_Duration[id]-.5 call UnitCureTaret((Je[(id)]),(Je[(id)]),HeroSkills_A00N_Damage[id]/ $A*.5) else set HeroSkills_A00N_Duration[id]=0 endif if HeroSkills_A00N_Duration[id]<=0 then call SetUnitNocontrol(id,false) call SetUnitNotSeckill(id,false) call DeUnitAdef((id),HeroSkills_A00N_Adef[id]) call UnitRemoveAbilityandBuffBY((Je[(id)]),'A009','Bcmg') call Unit_Cancel_Counter(373,(id)) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:320") set HeroSkills_A00N_Timer[id]=null endif endfunction function HeroSkills_A00N_Actions takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) local integer lv=GetUnitAbilityLevel((Je[(id)]),'A00N') if HeroSkills_A00N_Timer[id]==null then set HeroSkills_A00N_Timer[id]=NewTimer(id) set HeroSkills_A00N_Adef[id]=ModifyUnitAdef((id),100) call SetUnitNocontrol(id,true) call SetUnitNotSeckill(id,true) call UnitAddAbilityBY((Je[(id)]),'A009') call Unit_App_Counter(374,(id)) endif set HeroSkills_A00N_Duration[id]=$A set HeroSkills_A00N_Damage[id]=500*lv+1.5*lv*GetHeroState1((Je[(id)]),true) call Ltv(LAv("Abilities\\Spells\\NightElf\\BattleRoar\\RoarCaster.mdl",GetUnitX((Je[(id)])),GetUnitY((Je[(id)])),1.5)) call TimerStart(HeroSkills_A00N_Timer[id],.5,true,function HeroSkills_A00N_Start) endfunction function HeroSkills_A00N_Init takes nothing returns nothing call RegisterSpellEffectEvent('A00N',function HeroSkills_A00N_Actions) call Luv('A00N') endfunction function HeroSkills_A00S_BuffExpired takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:321") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0F1','BNbr') call DeUnitAdef((id),HeroSkills_A00S_Buff_Adef[id]) call Unit_Cancel_Counter(375,(id)) set HeroSkills_A00S_Buff_Timer[id]=null endfunction function HeroSkills_A00S_BuffApp takes unit u returns nothing local integer id=(GetUnitUserData((u))) if HeroSkills_A00S_Buff_Timer[id]==null then set HeroSkills_A00S_Buff_Timer[id]=NewTimer(id) set HeroSkills_A00S_Buff_Adef[id]=ModifyUnitAdef((id),100) call UnitAddAbilityBY(u,'A0F1') call Unit_App_Counter(376,(id)) endif call DestroyEffect(AddSpecialEffectTarget("ZLightArrowImpact.mdl",u,"chest")) call TimerStart(HeroSkills_A00S_Buff_Timer[id],4,false,function HeroSkills_A00S_BuffExpired) endfunction function HeroSkills_A00S_Outburst takes unit s,real x,real y,real a,real b,real c,real d,real e,boolean local_bool returns nothing local unit u local real vx=Cos(a) local real vy=Sin(a) local real sx=x+vx*b local real sy=y+vy*b local real tx local real ty local real l=d-b local real h=c-b local real slope=h/ SquareRoot(l*l-h*h) local real r=(c+d)*.5 local real ang set x=x+vx*r set y=y+vy*r call GroupEnumUnitsInRange(G,x,y,r+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) set tx=GetUnitX(u)-sx set ty=GetUnitY(u)-sy set ang=RMinBJ(RMaxBJ(0,(tx*vx+ty*vy)+RAbsBJ(ty*vx-tx*vy)*slope),l) set tx=sx+vx*ang set ty=sy+vy*ang set ang=b+ang*slope if IsUnitInRangeXY(u,tx,ty,ang)then if IsUnitAliveAndEnemyNotAvul(u,s)then call UnitDamageTargetBY(((s)),((u)),((((e)*1.))*1.),false,((false)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($C)*1.))*1.),(("|c00FFFF80"))) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",u,"origin")) if local_bool then call Gjv(u,50,a,.5,"KnockbackDust.mdx") call m1v(u,5) else call m1v(u,.5) endif elseif nC[(GetUnitUserData((u)))]and IsUnitAliveAndAlly(u,s)then call HeroSkills_A00S_BuffApp(u) endif endif endloop endfunction function HeroSkills_A00S_Start takes nothing returns nothing local integer id=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer cFv local unit u local integer i local real x local real y local real z local real an set HeroSkills_A00S_Buff_Number[id]=HeroSkills_A00S_Buff_Number[id]-1 if HeroSkills_A00S_Buff_Number[id]>=24 then set x=GetUnitX((Je[(id)])) set y=GetUnitY((Je[(id)])) if HeroSkills_A00S_Buff_Number[id]>=48 then call Lqv(Lfv(LIv("Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl",x,y,50,.75,HeroSkills_A00S_Buff_Angle[id]+.5*Lx-Cos(96.-HeroSkills_A00S_Buff_Number[id])*Lx/ 4.,$A),0,0,0,$FF),2) if HeroSkills_A00S_Buff_Number[id]==48 then call SetUnitAnimation((Je[(id)]),"Spell Channel one") endif elseif HeroSkills_A00S_Buff_Number[id]==40 then call SetUnitAnimation((Je[(id)]),"Spell Channel Two") elseif HeroSkills_A00S_Buff_Number[id]==24 then set z=GetPointZ(x,y)+50 set x=x+HeroSkills_A00S_Buff_VectorX[id] set y=y+HeroSkills_A00S_Buff_VectorY[id] set HeroSkills_A00S_Buff_Effect[id]=Lnv(x,y,HeroSkills_A00S_Buff_Angle[id]) call LHv(HeroSkills_A00S_Buff_Effect[id],0) call LMv(HeroSkills_A00S_Buff_Effect[id],"Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl") call SetUnitScale(II[(HeroSkills_A00S_Buff_Effect[id])],((5)*1.),0,0) call SetUnitFlyHeight(II[(HeroSkills_A00S_Buff_Effect[id])],((z-GetPointZ(x,y))*1.),0) call zhv(Kc[id],30,.3) endif elseif HeroSkills_A00S_Buff_Number[id]>0 then set x=(GetUnitX(II[(HeroSkills_A00S_Buff_Effect[id])])) set y=(GetUnitY(II[(HeroSkills_A00S_Buff_Effect[id])])) if HeroSkills_A00S_Buff_Number[id]>=8 then if HeroSkills_A00S_Buff_Number[id]>=16 and ModuloInteger(HeroSkills_A00S_Buff_Number[id],2)==0 then call LFv(HeroSkills_A00S_Buff_Effect[id],"Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl") if HeroSkills_A00S_Buff_Number[id]==16 then call Ltv(LVv('e03T',x-HeroSkills_A00S_Buff_VectorX[id],y-HeroSkills_A00S_Buff_VectorY[id],HeroSkills_A00S_Buff_Angle[id])) endif endif if HeroSkills_A00S_Buff_Number[id]==8 then call QueueUnitAnimation((Je[(id)]),"stand") call PauseUnit((Je[(id)]),false) call SetUnitInvulnerable((Je[(id)]),false) call zhv(Kc[id],50,1) endif endif call GroupEnumUnitsInRange(G,x,y,500+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,500)then if UnitAlive(u)then if not IsUnitInGroup(u,HeroSkills_A00S_Buff_Group[id])and nC[(GetUnitUserData((u)))]and IsUnitAliveAndAlly(u,(Je[(id)]))then call GroupAddUnit(HeroSkills_A00S_Buff_Group[id],u) call HeroSkills_A00S_BuffApp(u) endif endif endif endloop if HeroSkills_A00S_Buff_Number[id]<=$A then set x=x-HeroSkills_A00S_Buff_VectorX[id] set y=y-HeroSkills_A00S_Buff_VectorY[id] call HeroSkills_A00S_Outburst((Je[(id)]),x,y,HeroSkills_A00S_Buff_Angle[id],350,$C8,512*4,HeroSkills_A00S_Buff_Damage[id]/ $A,false) endif else if HeroSkills_A00S_Buff_Number[id]<=$A then set x=(GetUnitX(II[(HeroSkills_A00S_Buff_Effect[id])]))-HeroSkills_A00S_Buff_VectorX[id] set y=(GetUnitY(II[(HeroSkills_A00S_Buff_Effect[id])]))-HeroSkills_A00S_Buff_VectorY[id] call HeroSkills_A00S_Outburst((Je[(id)]),x,y,HeroSkills_A00S_Buff_Angle[id],520,300,512*4,HeroSkills_A00S_Buff_Damage[id],true) endif call Unit_Cancel_Counter(377,(id)) call Ltv(HeroSkills_A00S_Buff_Effect[id]) call RecycleGroup(HeroSkills_A00S_Buff_Group[id]) call ReleaseTimer(HeroSkills_A00S_Timer[id],"[TimerUtils]Error:322") set HeroSkills_A00S_Timer[id]=null set HeroSkills_A00S_Buff_Group[id]=null endif endfunction function HeroSkills_A00S_Actions takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) set HeroSkills_A00S_Timer[id]=NewTimer(id) set HeroSkills_A00S_Buff_Group[id]=NewGroup() set HeroSkills_A00S_Buff_Number[id]=80 set HeroSkills_A00S_Buff_Angle[id]=Atan2(GetSpellTargetY()-GetUnitY((Je[(id)])),GetSpellTargetX()-GetUnitX((Je[(id)]))) set HeroSkills_A00S_Buff_VectorX[id]=$80*Cos(HeroSkills_A00S_Buff_Angle[id]) set HeroSkills_A00S_Buff_VectorY[id]=$80*Sin(HeroSkills_A00S_Buff_Angle[id]) set HeroSkills_A00S_Buff_Damage[id]=450*GetHeroState1((Je[(id)]),true) call PauseUnit((Je[(id)]),true) call SetUnitInvulnerable((Je[(id)]),true) call SetUnitAnimation((Je[(id)]),"Spell Channel") call Unit_App_Counter(378,(id)) call TimerStart(HeroSkills_A00S_Timer[id],.03125,true,function HeroSkills_A00S_Start) endfunction function HeroSkills_A00S_Init takes nothing returns nothing call RegisterSpellEffectEvent('A00S',function HeroSkills_A00S_Actions) call Luv('A00S') endfunction function Hero_H000_Init takes nothing returns nothing local integer i=0 call HeroSkills_A08U_Init() call HeroSkills_A01O_Init() call HeroSkills_A00B_Init() call HeroSkills_A019_Init() call HeroSkills_A00D_Init() call HeroSkills_A00N_Init() call HeroSkills_A00S_Init() endfunction function Hero_Skills_QuickDraw_Stop takes integer id returns nothing set Hero_QuickDraw_Crit[id]=false if Hero_QuickDraw_On[id]then set Hero_QuickDraw_On[id]=false call UnitRemoveAbilityBY((Je[(id)]),'A001') call SetPlayerAbilityAvailable(GetOwningPlayer((Je[(id)])),'A0GR',false) endif endfunction function Hero_H001_onAttack_Actions takes nothing returns nothing local integer id=(pF_v) local boolean b=not Hero_QuickDraw_On[id] local integer lv=GetUnitAbilityLevel((mF),'A000') local real ratio=1.75+.075*lv local real x=GetUnitX((mF)) local real y=GetUnitY((mF)) local real a=Atan2(GetUnitY((MF))-y,GetUnitX((MF))-x) local real d=(1+Unit_MATK[(id)]) local unit u=(MF) if b then set d=d*(ratio-1)*GetDamage() if Hero_QuickDraw_Crit[id]then call DamageAmplify(1.5*d) call Ltv(Lfv(LIv("basicstrike.mdl",x,y,25,1.4,a,90),$FF,105,105,$9B)) else call DamageAmplify(d) call Ltv(Lfv(LIv("basicstrike.mdl",x,y,25,1.1,a,90),$FF,$9B,$9B,$9B)) endif call DestroyEffect(AddSpecialEffectTarget("blood damage impact.mdl",(MF),"chest")) else set d=d*((3*ratio-1)*GetDamage()+(1.5+.15*lv)*GetHeroState2((mF),true)) if Hero_QuickDraw_Crit[id]then call DamageAmplifyDis(1.5*d,20,"|c00ff8080") call Ltv(Lfv(LIv("basicstrike.mdl",x,y,30,2.125,a,90),$FF,25,25,$CD)) call Ltv(Lfv(LIv("basicstrike.mdl",x,y,30,2.375,a,90),25,25,$FF,$CD)) else call DamageAmplifyDis(d,$F,"|c00ff8080") call Ltv(Lfv(LIv("basicstrike.mdl",x,y,30,1.75,a,90),$FF,25,25,$CD)) endif call DestroyEffect(AddSpecialEffectTarget("blood.mdl",(MF),"chest")) call zhv((Kc[((id))]),25,.175) call Hero_Skills_QuickDraw_Stop(id) endif set x=x-64*Cos(a) set y=y-64*Sin(a) set d=.6*ratio*(DAK_AMOUNT[HF]) call GroupEnumUnitsInRange(G,x,y,256+75,null) call GroupRemoveUnit(G,u) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,256)then if IsUnitAliveAndEnemyNotAvul(u,(mF))and(Cos(((Atan2(GetUnitY(u)-y,GetUnitX(u)-x))*1.)-((a)*1.))>=Cos(((1.7)*1.)))then call UnitDamageTargetBY(((mF)),(u),((d)*1.),false,(false),false,false,(ATTACK_TYPE_HERO),(DAMAGE_TYPE_NORMAL),.0,"") if b then call DestroyEffect(AddSpecialEffectTarget("blood damage impact.mdl",u,"chest")) else call DestroyEffect(AddSpecialEffectTarget("blood.mdl",u,"chest")) endif endif endif endloop endfunction function Hero_H001_Crit_Actions takes nothing returns nothing local integer id=(pF_v) set Hero_QuickDraw_Crit[id]=true endfunction function Hero_H001_onSpell_Actions takes nothing returns nothing local integer id=s__Trig_P if not Hero_QuickDraw_On[id]then set Hero_QuickDraw_On[id]=true call UnitAddAbilityBY((Je[(id)]),'A001') call SetPlayerAbilityAvailable(GetOwningPlayer((Je[(id)])),'A0GR',true) endif endfunction function Hero_H001_Death_Actions takes nothing returns nothing call Hero_Skills_QuickDraw_Stop(s__Trig_P) endfunction function Hero_H001_onRemoved_Actions takes nothing returns nothing local integer id=le set Hero_QuickDraw_Crit[id]=false set Hero_QuickDraw_On[id]=false endfunction function Hero_EnterWorld_H001 takes nothing returns nothing local integer id=le local unit u=(Je[(id)]) call UnitAddAbilityBY(u,'A0AD') call UnitAddPAttackTrig(id,function Hero_H001_onAttack_Actions) call HeroAddCritTrig(id,function Hero_H001_Crit_Actions) call HeroAddSpellEffectTrig(id,function Hero_H001_onSpell_Actions) call AddUnitDeathTrig(id,function Hero_H001_Death_Actions) call UnitAddBeRemoveTrig(id,Condition(function Hero_H001_onRemoved_Actions)) call SetPlayerAbilityAvailable(GetOwningPlayer(u),'A0AD',false) call SetPlayerAbilityAvailable(GetOwningPlayer(u),'A0GR',false) set u=null endfunction function Hero_H001_SkillsDefault takes integer id returns nothing if Hero_H001_SkillsSet_Timer[id]!=null then if Hero_H001_SkillsSet_Type[id]==1 then call UnitRemoveAbilityBY((Je[(id)]),'A005') call SetPlayerAbilityAvailable(GetOwningPlayer((Je[(id)])),'A0BM',true) elseif Hero_H001_SkillsSet_Type[id]==2 then call UnitRemoveAbilityBY((Je[(id)]),'A021') call SetPlayerAbilityAvailable(GetOwningPlayer((Je[(id)])),'A0BL',true) elseif Hero_H001_SkillsSet_Type[id]==3 then call UnitRemoveAbilityBY((Je[(id)]),'A0BN') call SetPlayerAbilityAvailable(GetOwningPlayer((Je[(id)])),'A003',true) endif call ReleaseTimer(Hero_H001_SkillsSet_Timer[id],"[TimerUtils]Error:323") set Hero_H001_SkillsSet_Timer[id]=null endif endfunction function Hero_H001_SkillsSet_End takes nothing returns nothing call Hero_H001_SkillsDefault(((alloc__hpv(GetHandleId((GetExpiredTimer())))))) endfunction function Hero_H001_SkillsSet takes integer id,integer tp returns nothing call Hero_H001_SkillsDefault(id) set Hero_H001_SkillsSet_Timer[id]=NewTimer(id) set Hero_H001_SkillsSet_Type[id]=tp if tp==1 then call SetPlayerAbilityAvailable(GetOwningPlayer((Je[(id)])),'A0BM',false) call UnitAddAbilityLevelBY((Je[(id)]),'A005',GetUnitAbilityLevel((Je[(id)]),'A003')) call TimerStart(Hero_H001_SkillsSet_Timer[id],2.5,false,function Hero_H001_SkillsSet_End) elseif tp==2 then call SetPlayerAbilityAvailable(GetOwningPlayer((Je[(id)])),'A0BL',false) call UnitAddAbilityLevelBY((Je[(id)]),'A021',GetUnitAbilityLevel((Je[(id)]),'A0BM')) call TimerStart(Hero_H001_SkillsSet_Timer[id],2.5,false,function Hero_H001_SkillsSet_End) elseif tp==3 then call SetPlayerAbilityAvailable(GetOwningPlayer((Je[(id)])),'A003',false) call UnitAddAbilityLevelBY((Je[(id)]),'A0BN',GetUnitAbilityLevel((Je[(id)]),'A0BL')) call TimerStart(Hero_H001_SkillsSet_Timer[id],3.5,false,function Hero_H001_SkillsSet_End) endif endfunction function HeroSkills_A003_Stop takes integer data returns nothing local integer id=Boss_Spell_data1[data] call SetUnitTimeScale((Je[(id)]),1) call PauseUnit((Je[(id)]),false) call Hero_H001_SkillsSet((id),1) call DestroyEffectBY(Boss_Spell_data3[data]) call Unit_Cancel_Counter(379,(id)) call Unit_Cancel_Counter(380,Boss_Spell_data2[data]) call Boss_Spell_deallocate(data) endfunction function HeroSkills_A003_End takes nothing returns nothing call HeroSkills_A003_Stop((ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:324"))) endfunction function HeroSkills_A003_Start takes nothing returns nothing local timer t=GetExpiredTimer() local integer data=(alloc__hpv(GetHandleId((t)))) local integer id=Boss_Spell_data1[data] local unit u local integer lv local real d if UnitAlive((Je[(id)]))then set lv=GetUnitAbilityLevel((Je[(id)]),'A003') set d=Unit_Fire_Damage[(id)]*(100*lv+(5+.5*lv)*GetHeroState2((Je[(id)]),true)) set u=(Je[(Boss_Spell_data2[data])]) call GroupEnumUnitsInRange(G,Boss_Spell_X[data],Boss_Spell_Y[data],300+75,null) call GroupRemoveUnit(G,u) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,Boss_Spell_X[data],Boss_Spell_Y[data],300)then if IsUnitAliveAndEnemyNotAvul(u,(Je[(id)]))and(Cos(((Atan2(GetUnitY(u)-Boss_Spell_Y[data],GetUnitX(u)-Boss_Spell_X[data]))*1.)-((Boss_Spell_Z[data])*1.))>=Cos(((1.8)*1.)))then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIfb\\AIfbSpecialArt.mdl",u,"chest")) call UnitDamageTargetBY((((Je[(id)]))),((u)),((((.75*d)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v(u,.45) endif endif endloop call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIfb\\AIfbSpecialArt.mdl",(Je[(Boss_Spell_data2[data])]),"chest")) call Ltv(LIv("Flame Cyclone.mdl",Boss_Spell_X[data],Boss_Spell_Y[data],0,1.25,Boss_Spell_Z[data],120)) call Ltv(LAv("s_LavaBomb.mdl",Boss_Spell_X[data],Boss_Spell_Y[data],3)) call UnitDamageTargetBY((((Je[(id)]))),(((Je[(Boss_Spell_data2[data])]))),((((d)*1.))*1.),false,(true),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v((Je[(Boss_Spell_data2[data])]),.6) call zhv((Kc[(id)]),25,.4) call QueueUnitAnimation((Je[(id)]),"Stand") call TimerStart(t,.25,false,function HeroSkills_A003_End) else call ReleaseTimer(t,"[TimerUtils]Error:325") call HeroSkills_A003_Stop(id) endif set t=null endfunction function HeroSkills_A003_Prepare takes nothing returns nothing local timer t=GetExpiredTimer() local integer data=(alloc__hpv(GetHandleId((t)))) local integer id=Boss_Spell_data1[data] call Lqv(LAv("KnockbackDust.mdl",Boss_Spell_X[data]-50*Cos(Boss_Spell_Z[data]),Boss_Spell_Y[data]-50*Sin(Boss_Spell_Z[data]),.75),.5) call PlaySoundOnUnit_BJ((nn),((75)*1.),((Je[(id)]))) call PauseUnit((Je[(id)]),true) call SetUnitAnimation((Je[(id)]),"Spell Five") call TimerStart(t,.3,false,function HeroSkills_A003_Start) set t=null endfunction function HeroSkills_A003_Actions takes nothing returns nothing local integer data=Boss_Spell_allocate() local integer id=(GetUnitUserData((GetTriggerUnit()))) set Boss_Spell_data1[data]=id set Boss_Spell_data2[data]=(GetUnitUserData((GetSpellTargetUnit()))) set Boss_Spell_data3[data]=CreateEffectFor() set Boss_Spell_X[data]=GetUnitX((Je[(Boss_Spell_data2[data])])) set Boss_Spell_Y[data]=GetUnitY((Je[(Boss_Spell_data2[data])])) set Boss_Spell_Z[data]=Atan2(Boss_Spell_Y[data]-GetUnitY((Je[(id)])),Boss_Spell_X[data]-GetUnitX((Je[(id)]))) call s__Effect_connect((Boss_Spell_data3[data]),(s__Effect_build(AddSpecialEffectTarget((("Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile_mini.mdl")),(((Je[(id)]))),(("hand right")))))) call s__Effect_connect((Boss_Spell_data3[data]),(s__Effect_build(AddSpecialEffectTarget((("Abilities\\Weapons\\AvengerMissile\\AvengerMissile.mdl")),(((Je[(id)]))),(("hand right")))))) call SetUnitTimeScale((Je[(id)]),1.5) call TimerStart(NewTimer(data),0,false,function HeroSkills_A003_Prepare) call Unit_App_Counter(381,(id)) call Unit_App_Counter(382,Boss_Spell_data2[data]) endfunction function HeroSkills_A003_Init takes nothing returns nothing call RegisterSpellEffectEvent('A003',function HeroSkills_A003_Actions) call Luv('A003') endfunction function HeroSkills_A005_Stop takes integer id returns nothing call SetUnitTimeScale((Je[(id)]),1) call PauseUnit((Je[(id)]),false) call Unit_Cancel_Counter(383,(id)) endfunction function HeroSkills_A005_End takes nothing returns nothing call HeroSkills_A005_Stop((ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:326"))) endfunction function HeroSkills_A005_Start takes nothing returns nothing local timer t=GetExpiredTimer() local integer id=(alloc__hpv(GetHandleId((t)))) local group g local unit u local integer lv local integer i local real cX local real cY local real a local real d if UnitAlive((Je[(id)]))then set g=NewGroup() set lv=GetUnitAbilityLevel((Je[(id)]),'A005') set i=6 set d=$C8*lv+(8+.5*lv)*GetHeroState2((Je[(id)]),true) set cX=GetUnitX((Je[(id)])) set cY=GetUnitY((Je[(id)])) set a=Atan2(HeroSkills_A005_TargetY[id]-cY,HeroSkills_A005_TargetX[id]-cX) loop set i=i-1 set cX=cX+75*Cos(a) set cY=cY+75*Sin(a) if not IsTerrainWalkable(cX,cY)then set cX=IsTerrainWalkable_X set cY=IsTerrainWalkable_Y set i=0 endif call GroupEnumUnitsInRange(G,cX,cY,$80+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,cX,cY,$80)then if not IsUnitInGroup(u,g)and IsUnitAliveAndEnemyNotAvul(u,(Je[(id)]))then call GroupAddUnit(g,u) call DestroyEffect(AddSpecialEffectTarget("Blood.mdl",u,"chest")) call m1v(u,2.5) if GetUnitAbilityLevel(u,'Bcor')>0 then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl",u,"chest")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Demon\\DemonBoltImpact\\DemonBoltImpact.mdl",u,"origin")) call DestroyEffect(AddSpecialEffectTarget("LightningSphere_FX.mdl",u,"chest")) call UnitDamageTargetBY((((Je[(id)]))),((u)),((((1.75*d)*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),((DAMAGE_TYPE_MAGIC)),((((12.5)*1.))*1.),(("|c00a6cdf9"))) else call UnitDamageTargetBY((((Je[(id)]))),((u)),((((d)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endif endloop call Ltv(LAv("Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl",cX,cY,1.5)) exitwhen i==0 endloop call Hero_H001_SkillsDefault((id)) call sc__PhantomSword_AddNumber((id),1) call SetUnitX((Je[(id)]),cX) call SetUnitY((Je[(id)]),cY) call zhv((GetPlayerId((GetOwningPlayer((Je[(id)]))))),35,.4) call QueueUnitAnimation((Je[(id)]),"Stand") call TimerStart(t,.25,false,function HeroSkills_A005_End) call RecycleGroup(g) set g=null else call ReleaseTimer(t,"[TimerUtils]Error:327") call HeroSkills_A005_Stop(id) endif set t=null endfunction function HeroSkills_A005_Prepare takes nothing returns nothing local timer t=GetExpiredTimer() local integer id=(alloc__hpv(GetHandleId((t)))) call Ltv(Lfv(LAv("Abilities\\Spells\\NightElf\\Blink\\BlinkTarget.mdl",GetUnitX((Je[(id)])),GetUnitY((Je[(id)])),1.25),$9B,$9B,$9B,$FF)) call IssueImmediateOrderById((Je[(id)]),$D0004) call PauseUnit((Je[(id)]),true) call SetUnitAnimation((Je[(id)]),"Spell Three") call TimerStart(t,.3,false,function HeroSkills_A005_Start) endfunction function HeroSkills_A005_Actions takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) set HeroSkills_A005_TargetX[id]=GetSpellTargetX() set HeroSkills_A005_TargetY[id]=GetSpellTargetY() call SetUnitTimeScale((Je[(id)]),3) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Invisibility\\InvisibilityTarget.mdl",(Je[(id)]),"hand right")) call TimerStart(NewTimer(id),0,false,function HeroSkills_A005_Prepare) call Unit_App_Counter(384,(id)) endfunction function HeroSkills_A005_Init takes nothing returns nothing call RegisterSpellEffectEvent('A005',function HeroSkills_A005_Actions) call SaveBoolean(BYHT,HeroOnSpellEffect_t,('A005'),true) call Luv('A005') endfunction function HeroSkills_A0BM_BuffRemove takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:328") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0BY','Bcor') call ModifyUnitArmor((id),HeroSkills_A0BM_Buff_Armor[id]) call Unit_Cancel_Counter(385,(id)) set HeroSkills_A0BM_Buff_Timer[id]=null endfunction function HeroSkills_A0BM_Buffadd takes unit u,integer lv returns nothing local integer id local integer value if UnitAlive(u)then set id=(GetUnitUserData((u))) set value=R2I(.12*GetUnitDefaultArmor(id))+5*lv if HeroSkills_A0BM_Buff_Timer[id]==null then set HeroSkills_A0BM_Buff_Timer[id]=NewTimer(id) set HeroSkills_A0BM_Buff_Armor[id]=0 call UnitAddAbilityBY(u,'A0BY') call Unit_App_Counter(386,id) endif call ModifyUnitArmor(id,HeroSkills_A0BM_Buff_Armor[id]-value) set HeroSkills_A0BM_Buff_Armor[id]=value call TimerStart(HeroSkills_A0BM_Buff_Timer[id],6,false,function HeroSkills_A0BM_BuffRemove) endif endfunction function HeroSkills_A0BM_Stop takes integer t returns nothing local integer data=Timer_List[t] local integer id=GetHandleId(Boss_Spell_unit2[data]) if UnitAlive(Boss_Spell_unit1[data])then call QueueUnitAnimation(Boss_Spell_unit1[data],"Stand") call Hero_H001_SkillsSet(id,2) endif call DeUnitDodge(id,Boss_Spell_data1[data]) call SetUnitTimeScale(Boss_Spell_unit1[data],1) call PauseUnit(Boss_Spell_unit1[data],false) call SetUnitPathing(Boss_Spell_unit1[data],true) call SetUnitVertexColor(Boss_Spell_unit1[data],$FF,$FF,$FF,$FF) call Unit_Cancel_Counter(387,id) call Boss_Spell_deallocate(data) set Boss_Spell_unit1[data]=null set Boss_Spell_unit2[data]=null call fvv(t) endfunction function HeroSkills_A0BM_Alloc takes nothing returns integer return D9v(HeroSkills_A0BM_Func) endfunction function HeroSkills_A0BM_Start takes nothing returns nothing local integer t=J[HeroSkills_A0BM_Func] local integer data=Timer_List[t] local unit u local integer lv local integer i local real x local real y local real tx local real ty local real ang local real d loop exitwhen 0==t set Boss_Spell_data2[data]=Boss_Spell_data2[data]-1 if UnitAlive(Boss_Spell_unit1[data])and Boss_Spell_data2[data]>0 then set Boss_x[0]=Cos(Boss_Spell_Z[data]) set Boss_y[0]=Sin(Boss_Spell_Z[data]) if Boss_Spell_data2[data]>$D then set i=Boss_Spell_data2[data]-$E set d=$F+2.5*i call SetUnitX(Boss_Spell_unit1[data],GetUnitX(Boss_Spell_unit1[data])-d*Boss_x[0]) call SetUnitY(Boss_Spell_unit1[data],GetUnitY(Boss_Spell_unit1[data])-d*Boss_y[0]) call SetUnitVertexColor(Boss_Spell_unit1[data],$FF,$FF,$FF,R2I(255./ 8.*i)) if Boss_Spell_data2[data]==$E then set x=GetUnitX(Boss_Spell_unit1[data]) set y=GetUnitY(Boss_Spell_unit1[data]) loop exitwhen Boss_Spell_data3[data]<=0 set Boss_Spell_data3[data]=Boss_Spell_data3[data]-1 set x=x+64*Boss_x[0] set y=y+64*Boss_y[0] set ang=Boss_Spell_Z[data]+GetRandomReal(-bj_PI/ 1.5,bj_PI/ 1.5) call Ltv(Lfv(LIv("BlackBlink.mdl",x+64*Cos(ang),y+64*Sin(ang),0,.9,Boss_Spell_Z[data]-ang,90),$9B,$9B,$9B,$9B)) endloop endif elseif Boss_Spell_data2[data]<$C and Boss_Spell_data2[data]>7 then set i=Boss_Spell_data2[data]-8 set d=5*i*i+7.5*i call SetUnitX(Boss_Spell_unit1[data],Boss_Spell_X[data]-d*Boss_x[0]) call SetUnitY(Boss_Spell_unit1[data],Boss_Spell_Y[data]-d*Boss_y[0]) call SetUnitVertexColor(Boss_Spell_unit1[data],$FF,$FF,$FF,R2I($FF-255./ 4.*i)) elseif Boss_Spell_data2[data]==6 then set i=3 set x=GetUnitX(Boss_Spell_unit1[data]) set y=GetUnitY(Boss_Spell_unit1[data]) loop set i=i-1 set ang=Boss_Spell_Z[data]+i*bj_PI/ 4 call Ltv(Lfv(LIv("moon strike.mdl",x-24*Cos(ang),y-24*Sin(ang),0,2.75,ang,90),125,125,125,$E1)) exitwhen i==0 endloop set lv=GetUnitAbilityLevel(Boss_Spell_unit1[data],'A0BJ') set x=x-64*Boss_x[0] set y=y-64*Boss_y[0] set d=300*lv+(7.5+lv)*GetHeroState2(Boss_Spell_unit1[data],true) set Boss_z[0]=Tan(1.9) call GroupEnumUnitsInRange(G,x,y,375+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,375)then set Boss_x[1]=GetUnitX(u)-x set Boss_y[1]=GetUnitY(u)-y set tx=Boss_x[1]*Boss_x[0]+Boss_y[1]*Boss_y[0] set ty=RAbsBJ(Boss_y[1]*Boss_x[0]-Boss_x[1]*Boss_y[0]) if IsUnitAliveAndEnemyNotAvul(u,Boss_Spell_unit1[data])and(tx>=0 or tx>=ty/ Boss_z[0])then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl",u,"chest")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AbsorbMana\\AbsorbManaBirthMissile.mdl",u,"chest")) call DestroyEffect(AddSpecialEffectTarget("BluefireBolt.mdl",u,"chest")) call UnitDamageTargetBY(((Boss_Spell_unit1[data])),((u)),((((d)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call HeroSkills_A0BM_Buffadd(u,lv) endif endif endloop call PlaySoundAtPoint_BJ((An),((125)*1.),((x)*1.),((y)*1.),0) endif else call HeroSkills_A0BM_Stop(t) endif set t=K[t] endloop endfunction function HeroSkills_A0BM_Prepare takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:329") call PauseUnit((Je[(id)]),true) call SetUnitPathing((Je[(id)]),false) call SetUnitTimeScale((Je[(id)]),3) call SetUnitAnimationByIndex((Je[(id)]),4) endfunction function HeroSkills_A0BM_Actions takes nothing returns nothing local integer t=(D9v(HeroSkills_A0BM_Func)) local integer data=Boss_Spell_allocate() local integer id=(GetUnitUserData((GetTriggerUnit()))) local integer i=0 local integer index local real x=GetUnitX(GetTriggerUnit()) local real y=GetUnitY(GetTriggerUnit()) local real tx local real ty local real dX local real dY local real pwv set Timer_List[t]=data set Boss_Spell_unit1[data]=GetTriggerUnit() set Boss_Spell_unit2[data]=ConvertVersion(id) set Boss_Spell_data1[data]=ModifyUnitDodge(id,90) set Boss_Spell_data2[data]=22 set Boss_Spell_X[data]=x set Boss_Spell_Y[data]=y set dX=GetSpellTargetX()-x set dY=GetSpellTargetY()-y set pwv=SquareRoot(dX*dX+dY*dY)/ 64. if pwv>0 then set Boss_Spell_Z[data]=Atan2(dY,dX) set tx=dX/ pwv set ty=dY/ pwv else set Boss_Spell_Z[data]=GetUnitFacing(GetTriggerUnit())*bj_DEGTORAD set tx=Cos(Boss_Spell_Z[data])*64 set ty=Sin(Boss_Spell_Z[data])*64 endif set index=R2I(pwv) call Lqv(Lfv(LIv("Abilities\\Spells\\NightElf\\Starfall\\StarfallCaster.mdl",x,y,50,1.75,Boss_Spell_Z[data],0),0,0,0,$FF),2) call Ltv(LIv("Enchantment.mdl",x,y,25,1.25,Boss_Spell_Z[data],0)) call TimerStart(NewTimer(id),0,false,function HeroSkills_A0BM_Prepare) call Unit_App_Counter(388,id) loop if i==index then set x=x+(pwv-index)*tx set y=y+(pwv-index)*ty else set x=x+tx set y=y+ty endif exitwhen not IsTerrainWalkable(x,y) set Boss_Spell_X[data]=x set Boss_Spell_Y[data]=y exitwhen i==index set i=i+1 endloop set Boss_Spell_data3[data]=i endfunction function HeroSkills_A0BM_Init takes nothing returns nothing set HeroSkills_A0BM_Func=fxv(function HeroSkills_A0BM_Start) call RegisterSpellEffectEvent('A0BM',function HeroSkills_A0BM_Actions) call Luv('A0BM') endfunction function HeroSkills_A021_End takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:330") call Hero_H001_SkillsDefault((id)) call SetUnitAnimation((Je[(id)]),"Spell Five") call QueueUnitAnimation((Je[(id)]),"Stand") endfunction function HeroSkills_A021_Start takes nothing returns nothing local unit c=GetTriggerUnit() local unit u local integer id=(GetUnitUserData((c))) local integer lv=GetUnitAbilityLevel(c,'A021') local integer i=6 local real x=GetUnitX(c) local real y=GetUnitY(c) local real d=Unit_Gas_Damage[(GetUnitUserData((c)))]*(450*lv+($F+lv)*GetHeroState2(c,true)) local real a loop set i=i-1 set a=i*Lx/ 6+GetRandomReal(-.15,.15) call Ltv(Lfv(LIv("moon strike.mdl",x-50*Cos(a),y-50*Sin(a),0,4,a,90),125,125,$FF,$CD)) exitwhen i==0 endloop call GroupEnumUnitsInRange(G,x,y,350+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,350)then if IsUnitAliveAndEnemyNotAvul(u,c)then call UnitDamageTargetBY(((c)),((u)),((((d)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call UnitAppBuff((GetUnitUserData((u))),'A026',$D006B) if not(IsUnitType((u),UNIT_TYPE_GIANT))then call Gjv(u,40,Atan2(GetUnitY(u)-y,GetUnitX(u)-x),.375,"KnockbackDust.mdl") endif endif endif endloop call sc__PhantomSword_AddNumber((id),1) call Ltv(Lfv(LAv("ManaWave.mdx",x,y,.75),$FF,$FF,$FF,105)) call zhv((GetPlayerId((GetOwningPlayer(c)))),30,.3125) call TimerStart(NewTimer(id),0,false,function HeroSkills_A021_End) set c=null endfunction function HeroSkills_A021_Init takes nothing returns nothing call RegisterSpellEffectEvent('A021',function HeroSkills_A021_Start) call SaveBoolean(BYHT,HeroOnSpellEffect_t,('A021'),true) call Luv('A021') endfunction function HeroSkills_A0BL_Largen takes integer id returns nothing local integer i if HeroSkills_A0BL_Vessel[id]!=0 then set HeroSkills_A0BL_Count[id]=8 set i=16 loop set i=i-1 call SetUnitScale(II[((LoadInteger(BYHT,HeroSkills_A0BL_Vessel[id],i)))],((2.25)*1.),0,0) exitwhen i==0 endloop endif endfunction function HeroSkills_A0BL_Start takes nothing returns nothing local integer id=HeroSkills_A0BL_Next[(0)] local integer fx local unit u local integer i local real x local real y local real a local real d loop exitwhen id==0 if HeroSkills_A0BL_Count[id]>0 then set HeroSkills_A0BL_Count[id]=HeroSkills_A0BL_Count[id]-1 if HeroSkills_A0BL_Count[id]==0 then set i=16 loop set i=i-1 call SetUnitScale(II[((LoadInteger(BYHT,HeroSkills_A0BL_Vessel[id],i)))],((1.5)*1.),0,0) exitwhen i==0 endloop endif endif set i=16 set x=GetUnitX((Je[(id)])) set y=GetUnitY((Je[(id)])) call LKv(HeroSkills_A0BL_Effect[id],x) call Llv(HeroSkills_A0BL_Effect[id],y) set HeroSkills_A0BL_Duration[id]=HeroSkills_A0BL_Duration[id]-1 loop set i=i-1 set fx=LoadInteger(BYHT,HeroSkills_A0BL_Vessel[id],3*i) set a=LoadReal(BYHT,(HeroSkills_A0BL_Vessel[id]),3*i+1)+.18 set d=LoadReal(BYHT,(HeroSkills_A0BL_Vessel[id]),3*i+2) call LKv(fx,x+d*Cos(a)) call Llv(fx,y+d*Sin(a)) call SetUnitFacing(II[(fx)],((a+bj_PI/ 2)*1.)*bj_RADTODEG) call SaveReal(BYHT,(HeroSkills_A0BL_Vessel[id]),3*i+1,a) exitwhen i==0 endloop if ModuloInteger(HeroSkills_A0BL_Duration[id],$C)==0 then call GroupEnumUnitsInRange(G,x,y,375+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,375)then if IsUnitAliveAndEnemy(u,(Je[(id)]))then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl",u,"chest")) call UnitDamageTargetBY((((Je[(id)]))),((u)),((((Unit_DOT[(id)]*HeroSkills_A0BL_Damage[id])*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif endif endloop endif if HeroSkills_A0BL_Duration[id]==$94 and HeroSkills_A0BL_Mdef[id]!=0 then call DeUnitMdef((id),HeroSkills_A0BL_Mdef[id]) set HeroSkills_A0BL_Mdef[id]=0 endif if HeroSkills_A0BL_Duration[id]<=0 or not UnitAlive((Je[(id)]))then set HeroSkills_A0BL_Last[HeroSkills_A0BL_Next[id]]=HeroSkills_A0BL_Last[id] set HeroSkills_A0BL_Next[HeroSkills_A0BL_Last[id]]=HeroSkills_A0BL_Next[id] if HeroSkills_A0BL_Next[0]==0 then call frv(HeroSkills_A0BL_Func) endif set i=16 loop set i=i-1 call Ltv((LoadInteger(BYHT,HeroSkills_A0BL_Vessel[id],3*i))) exitwhen i==0 endloop if HeroSkills_A0BL_Mdef[id]!=0 then call DeUnitMdef((id),HeroSkills_A0BL_Mdef[id]) set HeroSkills_A0BL_Mdef[id]=0 endif call UnitRemoveAbilityBY((Je[(id)]),'A0C0') call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0BZ','Bvng') call SetUnitDecay(II[HeroSkills_A0BL_Effect[id]],$9B,$9B,$9B,105,.875) call Unit_Cancel_Counter(389,(id)) call LQv(HeroSkills_A0BL_Effect[id],.875) call free(HeroSkills_A0BL_Vessel[id]) set HeroSkills_A0BL_Vessel[id]=0 endif set id=HeroSkills_A0BL_Next[id] endloop endfunction function HeroSkills_A0BL_Actions takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) local integer lv=GetUnitAbilityLevel((Je[(id)]),'A0BL') local integer i local real x=GetUnitX((Je[(id)])) local real y=GetUnitY((Je[(id)])) local real a local real d local integer fx if HeroSkills_A0BL_Vessel[id]==0 then if HeroSkills_A0BL_Next[0]==0 then call fov(HeroSkills_A0BL_Func) endif set HeroSkills_A0BL_Next[id]=HeroSkills_A0BL_Next[0] set HeroSkills_A0BL_Last[id]=0 set HeroSkills_A0BL_Last[HeroSkills_A0BL_Next[0]]=id set HeroSkills_A0BL_Next[0]=id set HeroSkills_A0BL_Vessel[id]=malloc() set HeroSkills_A0BL_Effect[id]=LAv("ShadowTornado.mdl",x,y,.875) set i=16 loop set i=i-1 set a=i*Lx/ 16+GetRandomReal(-.1,.1) set d=GetRandomReal(64,256) set fx=Lnv(x+d*Cos(a),y+d*Sin(a),a+bj_PI/ 2) call LMv(fx,"Abilities\\Spells\\Other\\Tornado\\Tornado_Target.mdl") call SetUnitScale(II[(fx)],((1.5)*1.),0,0) call SetUnitFlyHeight(II[(fx)],((GetRandomReal(32,96))*1.),0) call SaveInteger(BYHT,HeroSkills_A0BL_Vessel[id],3*i,fx) call SaveReal(BYHT,(HeroSkills_A0BL_Vessel[id]),3*i+1,a) call SaveReal(BYHT,(HeroSkills_A0BL_Vessel[id]),3*i+2,d) exitwhen i==0 endloop call Lfv(HeroSkills_A0BL_Effect[id],$9B,$9B,$9B,105) call UnitAddAbilityBY((Je[(id)]),'A0C0') call UnitAddAbilityBY((Je[(id)]),'A0BZ') call Unit_App_Counter(390,(id)) endif if HeroSkills_A0BL_Mdef[id]==0 then set HeroSkills_A0BL_Mdef[id]=ModifyUnitMdef(id,70) endif set HeroSkills_A0BL_Duration[id]=$C0 set HeroSkills_A0BL_Damage[id]=Unit_Gas_Damage[id]*(75*lv+(2+.15*lv)*GetHeroState2((Je[(id)]),true)) call Ltv(Lfv(LAv("Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl",x,y,1.5),0,0,0,$CD)) call Ltv(Lfv(LAv("Epicenter.mdl",x,y,1.25),0,55,$FF,$FF)) call Hero_H001_SkillsSet((id),3) if(LoadBoolean(BYHT,EquipSlot_R[EquipSlot[(id)]],('penr')))then set HeroSkills_A0BN_Number[id]=4 else set HeroSkills_A0BN_Number[id]=3 endif set HeroSkills_A0BN_MaxNumber[id]=HeroSkills_A0BN_Number[id] endfunction function HeroSkills_A0BL_Init takes nothing returns nothing set HeroSkills_A0BL_Func=fxv(function HeroSkills_A0BL_Start) call RegisterSpellEffectEvent('A0BL',function HeroSkills_A0BL_Actions) call Luv('A0BL') endfunction function HeroSkills_A0BN_Func01 takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:331") call SetUnitAnimation((Je[(id)]),"Spell Two") call QueueUnitAnimation((Je[(id)]),"Stand") endfunction function HeroSkills_A0BN_Actions takes nothing returns nothing local unit c=GetTriggerUnit() local unit t=GetSpellTargetUnit() local unit u local real x=GetUnitX(c) local real y=GetUnitY(c) local real dX=GetUnitX(t)-x local real dY=GetUnitY(t)-y local real a=Atan2(dY,dX) local real vector_x=96*Cos(a) local real vector_y=96*Sin(a) local real pwv=SquareRoot(dX*dX+dY*dY) local integer i=R2I(pwv/ 96.) local integer lv=GetUnitAbilityLevel(c,'A0BN') local integer id=(GetUnitUserData((c))) local real r=1.+pwv/ 1500. local real d=Unit_Gas_Damage[(GetUnitUserData((c)))]*r*($A+lv)*GetHeroState2(c,true) local real ang local group g if not IsTerrainWalkable(dX+x,dY+y)then call IssueUnitStop_DisplayText(c,"The target area can not be transmitted") else if HeroSkills_A0BN_Number[id]>0 then set HeroSkills_A0BN_Number[id]=HeroSkills_A0BN_Number[id]-1 set g=NewGroup() call Ltv(LIv("Enchantment.mdl",x,y,25,1,a,0)) call Ltv(LAv("Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl",x,y,.75)) loop exitwhen i<1 set i=i-1 set x=x+vector_x set y=y+vector_y set ang=a+GetRandomReal(-bj_PI/ 1.5,bj_PI/ 1.5) call Lsv(Lfv(LAv("ShadowTornado.mdl",x,y,.875),125,125,125,55),.5) call Ltv(Lfv(LIv("BlackBlink.mdl",x+64*Cos(ang),y+64*Sin(ang),0,1,a-ang,90),$9B,$9B,$9B,$9B)) call DestroyEffect(AddSpecialEffect("FeatherCrow.mdl",x+GetRandomReal(-$C8,$C8),y+GetRandomReal(-$C8,$C8))) call GroupEnumUnitsInRange(G,x,y,325+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,325)then if not IsUnitInGroup(u,g)and IsUnitAliveAndEnemy(u,c)then call GroupAddUnit(g,u) call DestroyEffect(AddSpecialEffectTarget("BluefireBolt.mdl",u,"chest")) call DestroyEffect(AddSpecialEffectTarget("blood.mdl",u,"chest")) call UnitDamageTargetBY(((c)),((u)),((((d)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v(u,1) endif endif endloop endloop call NewTextTagInTarget_B(c,"|c000080ff"+I2S(HeroSkills_A0BN_MaxNumber[id]-HeroSkills_A0BN_Number[id])+" COMBO!",$A,$FF,$FF,$FF) call Ltv(LAv("Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl",GetUnitX(c),GetUnitY(c),.75)) call UnitDamageTargetBY(((c)),((t)),((((r*750*lv+d)*1.))*1.),false,(true),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v(t,1) call SetUnitX(c,GetUnitX(t)+80*Cos(a)) call SetUnitY(c,GetUnitY(t)+80*Sin(a)) call SetUnitFacing(c,bj_RADTODEG*a+$B4) call TimerStart(NewTimer(id),0,false,function HeroSkills_A0BN_Func01) call sc__PhantomSword_AddNumber((id),1) call HeroSkills_A0BL_Largen(id) call RecycleGroup(g) if HeroSkills_A0BN_Number[id]>0 then call Hero_H001_SkillsSet((id),3) else call Hero_H001_SkillsDefault((id)) endif set g=null else call Hero_H001_SkillsDefault((id)) endif endif set c=null set t=null endfunction function HeroSkills_A0BN_Init takes nothing returns nothing call RegisterSpellEffectEvent('A0BN',function HeroSkills_A0BN_Actions) call SaveBoolean(BYHT,HeroOnSpellEffect_t,('A0BN'),true) call Luv('A0BN') endfunction function s__PhantomSword_loop_c takes nothing returns nothing local integer this=s__PhantomSword_next[(0)] local integer fx local integer i local integer alpha local real x local real y local real a loop exitwhen 0==this set i=s__PhantomSword_count[this] if GetUnitTypeId((Je[(this)]))==0 then set s__PhantomSword_next[s__PhantomSword_last[this]]=s__PhantomSword_next[this] set s__PhantomSword_last[s__PhantomSword_next[this]]=s__PhantomSword_last[this] if s__PhantomSword_next[(0)]==(0)then call frv(s__PhantomSword_func) endif loop exitwhen i<=0 set i=i-1 call DestroyEffectBY((LoadInteger(BYHT,s__PhantomSword_vessel[this],2*i+1))) call Ltv((LoadInteger(BYHT,s__PhantomSword_vessel[this],2*i))) endloop call Unit_Cancel_Counter(391,(this)) call free(s__PhantomSword_vessel[this]) set s__PhantomSword_count[this]=0 set s__PhantomSword_cycle[this]=0 set s__PhantomSword_time[this]=0 set s__PhantomSword_vessel[this]=0 else if UnitAlive((Je[(this)]))then if s__PhantomSword_time[this]<32 then set s__PhantomSword_time[this]=s__PhantomSword_time[this]+1 endif else if s__PhantomSword_time[this]>=0 then set s__PhantomSword_time[this]=s__PhantomSword_time[this]-1 endif endif if s__PhantomSword_time[this]>=0 then set s__PhantomSword_cycle[this]=s__PhantomSword_cycle[this]+1 set x=GetUnitX((Je[(this)])) set y=GetUnitY((Je[(this)])) set alpha=R2I((125+30.*(s__PhantomSword_cycle[this])/(64.))*s__PhantomSword_time[this]/ 32.) if s__PhantomSword_cycle[this]==64 then set s__PhantomSword_cycle[this]=0 endif loop exitwhen i<=0 set i=i-1 set fx=LoadInteger(BYHT,s__PhantomSword_vessel[this],2*i) set a=Lx*(i/ I2R(s__PhantomSword_count[this])+s__PhantomSword_cycle[this]/ 64.) call LKv(fx,x+$96*Cos(a)) call Llv(fx,y+$96*Sin(a)) call SetUnitFacing(II[(fx)],(((GetUnitFacing(II[(fx)]))+Lx/ 64)*1.)*bj_RADTODEG) call Lfv(fx,45,45,45,alpha) endloop endif endif set this=s__PhantomSword_next[this] endloop endfunction function s__PhantomSword_AddNumber takes integer this,integer i returns nothing local integer fx local integer maxcount local integer value local real a if s__PhantomSword_vessel[this]==0 then if GetUnitAbilityLevel((Je[(this)]),'A0C1')>0 then if s__PhantomSword_next[(0)]==(0)then call fov(s__PhantomSword_func) endif set s__PhantomSword_next[this]=s__PhantomSword_next[(0)] set s__PhantomSword_last[s__PhantomSword_next[this]]=this set s__PhantomSword_next[(0)]=this set s__PhantomSword_last[this]=0 set s__PhantomSword_vessel[this]=malloc() call Unit_App_Counter(392,(this)) endif endif if s__PhantomSword_vessel[this]!=0 then set maxcount=5+(GetUnitAbilityLevel((Je[(this)]),'A0C1')+1)/ 3 if GetHeroEquipSlot(this,1)=='I0FX' then set maxcount=maxcount+5 endif if s__PhantomSword_count[this]+i>maxcount then set i=maxcount-s__PhantomSword_count[this] endif call ModifyHeroAgiPercent(this,.015*i) loop exitwhen i<=0 set i=i-1 set a=Lx*s__PhantomSword_cycle[this]/ 55 set fx=Lnv(GetUnitX((Je[(this)]))+$96*Cos(a),GetUnitY((Je[(this)]))+$96*Sin(a),a) call LMv(fx,"Frostmourne.mdl") call SetUnitFlyHeight(II[(fx)],((212.5)*1.),0) call SetUnitScale(II[(fx)],((1.25)*1.),0,0) call LHv(fx,0) call SaveInteger(BYHT,s__PhantomSword_vessel[this],2*s__PhantomSword_count[this],fx) call SaveInteger(BYHT,s__PhantomSword_vessel[this],2*s__PhantomSword_count[this]+1,(s__Effect_build(AddSpecialEffectTarget(("Abilities\\Weapons\\AvengerMissile\\AvengerMissile.mdl"),(II[fx]),("origin"))))) set s__PhantomSword_count[this]=s__PhantomSword_count[this]+1 call Lfv(fx,45,45,45,$9B) endloop endif endfunction function HeroSkills_A0C1_End takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:332") set HeroSkills_A0C1_BuffTimer[id]=null set HeroSkills_A0C1_BuffLv[id]=0 endfunction function HeroSkills_A0C1_Stop takes integer data returns nothing local unit u local integer cS local integer lv local real x local real y local real d if UnitAlive((Je[(HeroSkills_A0C1_Target[data])]))then set u=(Je[(HeroSkills_A0C1_Target[data])]) set cS=HeroSkills_A0C1_BuffLv[HeroSkills_A0C1_Target[data]] set lv=GetUnitAbilityLevel((Je[(HeroSkills_A0C1_AtkUnit[data])]),'A0C1') set x=GetUnitX((Je[(HeroSkills_A0C1_Target[data])])) set y=GetUnitY((Je[(HeroSkills_A0C1_Target[data])])) set d=Unit_Gas_Damage[(HeroSkills_A0C1_AtkUnit[data])]*Unit_Dark_Damage[(HeroSkills_A0C1_AtkUnit[data])]*(1+(.15+Unit_MATK[(HeroSkills_A0C1_AtkUnit[data])])*cS)*(600*lv+(5+.5*lv)*GetHeroState2((Je[(HeroSkills_A0C1_AtkUnit[data])]),true)) if cS>8 then set cS=8 endif call GroupEnumUnitsInRange(G,x,y,300+75,null) call GroupRemoveUnit(G,u) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,300)then if IsUnitAliveAndEnemy(u,(Je[(HeroSkills_A0C1_AtkUnit[data])]))then call DestroyEffect(AddSpecialEffectTarget("Evil Bomb.mdl",u,"origin")) call UnitDamageTargetBY((((Je[(HeroSkills_A0C1_AtkUnit[data])]))),((u)),((((.6*d)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v(u,1.5) endif endif endloop call DestroyEffect(AddSpecialEffectTarget("SmallBloodEX-NoSplat.mdl",(Je[(HeroSkills_A0C1_Target[data])]),"chest")) call DestroyEffect(AddSpecialEffectTarget("Evil Bomb.mdl",(Je[(HeroSkills_A0C1_Target[data])]),"origin")) call Ltv(Lfv(LAv("Abilities\\Spells\\Undead\\DarkRitual\\DarkRitualTarget.mdl",x,y,2+.2*cS),$FF,0,0,$CD)) call Ltv(LAv("Desecrate.mdl",x,y,1+.125*cS)) call Ltv(LAv("DarkWave.mdl",x,y,1.25+.1*cS)) call zhv((Kc[(HeroSkills_A0C1_AtkUnit[data])]),50,.25) call UnitDamageTargetBY((((Je[(HeroSkills_A0C1_AtkUnit[data])]))),(((Je[(HeroSkills_A0C1_Target[data])]))),((((d)*1.))*1.),false,((true)),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),(((($C+cS)*1.))*1.),(("|c00d83030"))) call m1v((Je[(HeroSkills_A0C1_Target[data])]),1.5+.25*cS) if HeroSkills_A0C1_BuffTimer[HeroSkills_A0C1_Target[data]]==null then set HeroSkills_A0C1_BuffTimer[HeroSkills_A0C1_Target[data]]=NewTimer(HeroSkills_A0C1_Target[data]) endif set HeroSkills_A0C1_BuffLv[HeroSkills_A0C1_Target[data]]=cS+1 call TimerStart(HeroSkills_A0C1_BuffTimer[HeroSkills_A0C1_Target[data]],1.5,false,function HeroSkills_A0C1_End) endif call SetUnitDecay(II[HeroSkills_A0C1_Sword[data]],45,45,45,$9B,1) call Unit_Cancel_Counter(393,HeroSkills_A0C1_AtkUnit[data]) call Unit_Cancel_Counter(394,HeroSkills_A0C1_Target[data]) call LQv(HeroSkills_A0C1_Sword[data],1) call DestroyEffectBY(HeroSkills_A0C1_Effect[data]) call fvv(data) endfunction function HeroSkills_A0C1_Start takes nothing returns nothing local integer data=J[HeroSkills_A0C1_Func] local real x local real y local real dX local real dY local real a local real d loop exitwhen 0==data if UnitAlive((Je[(HeroSkills_A0C1_Target[data])]))then if HeroSkills_A0C1_Const[data]>0 then set HeroSkills_A0C1_Const[data]=HeroSkills_A0C1_Const[data]-1 call SetUnitFlyHeight(II[(HeroSkills_A0C1_Sword[data])],(((GetUnitFlyHeight(II[(HeroSkills_A0C1_Sword[data])]))+12.5)*1.),0) if HeroSkills_A0C1_Const[data]==0 then call Ltv(LNv("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",(GetUnitX(II[(HeroSkills_A0C1_Sword[data])])),(GetUnitY(II[(HeroSkills_A0C1_Sword[data])])),(GetUnitFlyHeight(II[(HeroSkills_A0C1_Sword[data])])),1.5)) endif else set HeroSkills_A0C1_Time[data]=HeroSkills_A0C1_Time[data]+1 set x=(GetUnitX(II[(HeroSkills_A0C1_Sword[data])])) set y=(GetUnitY(II[(HeroSkills_A0C1_Sword[data])])) set dX=GetUnitX((Je[(HeroSkills_A0C1_Target[data])]))-x set dY=GetUnitY((Je[(HeroSkills_A0C1_Target[data])]))-y set a=Atan2(dY,dX) set d=SquareRoot(dX*dX+dY*dY) call LKv(HeroSkills_A0C1_Sword[data],x+56*Cos(a)) call Llv(HeroSkills_A0C1_Sword[data],y+56*Sin(a)) call SetUnitFacing(II[(HeroSkills_A0C1_Sword[data])],((a)*1.)*bj_RADTODEG) call LHv(HeroSkills_A0C1_Sword[data],90-R2I(bj_RADTODEG*Atan2((GetUnitFlyHeight(II[(HeroSkills_A0C1_Sword[data])])),d))) if(GetUnitFlyHeight(II[(HeroSkills_A0C1_Sword[data])]))>25 then call SetUnitFlyHeight(II[(HeroSkills_A0C1_Sword[data])],((.95*(GetUnitFlyHeight(II[(HeroSkills_A0C1_Sword[data])]))-5)*1.),0) endif if ModuloInteger(HeroSkills_A0C1_Time[data],4)==0 then call Ltv(LNv("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",(GetUnitX(II[(HeroSkills_A0C1_Sword[data])])),(GetUnitY(II[(HeroSkills_A0C1_Sword[data])])),(GetUnitFlyHeight(II[(HeroSkills_A0C1_Sword[data])])),1.25)) endif if d<=96 then call HeroSkills_A0C1_Stop(data) endif endif else call HeroSkills_A0C1_Stop(data) endif set data=K[data] endloop endfunction function HeroSkills_A0C1_Launch takes integer atku,integer target,integer sword,integer eff,integer t returns nothing local integer data=D9v(HeroSkills_A0C1_Func) local real tX=GetUnitX((Je[(target)])) local real tY=GetUnitY((Je[(target)])) local real a set HeroSkills_A0C1_AtkUnit[data]=atku set HeroSkills_A0C1_Target[data]=target set HeroSkills_A0C1_Sword[data]=sword set HeroSkills_A0C1_Effect[data]=eff set HeroSkills_A0C1_Const[data]=t set HeroSkills_A0C1_Time[data]=0 call Unit_App_Counter(395,HeroSkills_A0C1_AtkUnit[data]) call Unit_App_Counter(396,HeroSkills_A0C1_Target[data]) endfunction function HeroSkills_A0C1_Actions takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) local integer target=(GetUnitUserData((GetSpellTargetUnit()))) call ModifyHeroAgiPercent(id,-.015*s__PhantomSword_count[id]) loop exitwhen s__PhantomSword_count[id]==0 set s__PhantomSword_count[id]=s__PhantomSword_count[id]-1 call HeroSkills_A0C1_Launch(id,target,LoadInteger(BYHT,s__PhantomSword_vessel[id],2*s__PhantomSword_count[id]),LoadInteger(BYHT,s__PhantomSword_vessel[id],2*s__PhantomSword_count[id]+1),24+4*s__PhantomSword_count[id]) endloop endfunction function HeroSkills_A0C1_Channel_Actions takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) if s__PhantomSword_count[id]==0 then call IssueImmediateOrderById((Je[(id)]),$D0004) call NewTextTagInTarget_B((Je[(id)]),"The target can not be moved",8,$80,$80,$9B) endif endfunction function HeroSkills_A0C1_Init takes nothing returns nothing set s__PhantomSword_func=fxv(function s__PhantomSword_loop_c) set HeroSkills_A0C1_Func=fxv(function HeroSkills_A0C1_Start) call RegisterSpellChannelEvent('A0C1',function HeroSkills_A0C1_Channel_Actions) call RegisterSpellEffectEvent('A0C1',function HeroSkills_A0C1_Actions) call Luv('A0C1') endfunction function hSe takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:333") call DeUnitMdef((id),HeroSkills_A0C2_Buff_Mdef[id]) call UnitRemoveAbilityandBuffBY((Je[(id)]),'A0C3','Bmfl') call Unit_Cancel_Counter(397,(id)) set HeroSkills_A0C2_Buff_TImer[id]=null endfunction function HeroSkills_A0C2_BuffAdd takes unit u returns nothing local integer id=(GetUnitUserData((u))) if HeroSkills_A0C2_Buff_TImer[id]==null then set HeroSkills_A0C2_Buff_TImer[id]=NewTimer(id) set HeroSkills_A0C2_Buff_Mdef[id]=ModifyUnitMdef((id),-$A) call UnitAddAbilityBY(u,'A0C3') call Unit_App_Counter(398,(id)) endif call TimerStart(HeroSkills_A0C2_Buff_TImer[id],$C,false,function hSe) endfunction function HeroSkills_A0C2_Alloc takes nothing returns integer return D9v(HeroSkills_A0C2_Func) endfunction function HeroSkills_A0C2_Stop takes integer data returns nothing call fvv(data) endfunction function HeroSkills_A0C2_Start takes nothing returns nothing local integer t=J[HeroSkills_A0C2_Func] local integer data local integer id local integer fx local unit u local integer i local real tX local real tY local real a local real d loop exitwhen 0==t set data=Timer_List[t] set id=GetHandleId(Boss_Spell_unit2[data]) set Boss_Spell_data2[data]=Boss_Spell_data2[data]-1 if ModuloInteger(Boss_Spell_data2[data],4)==0 then set i=$F loop set i=i-1 set fx=LoadInteger(BYHT,Boss_Spell_data1[data],i) set a=Atan2((GetUnitY(II[(fx)]))-Boss_Spell_Y[data],(GetUnitX(II[(fx)]))-Boss_Spell_X[data])+bj_PI+GetRandomReal(-bj_PI/ $C,bj_PI/ $C) set tX=Boss_Spell_X[data]+Boss_Spell_V[data]*Cos(a) set tY=Boss_Spell_Y[data]+Boss_Spell_V[data]*Sin(a) call LKv(fx,tX) call Llv(fx,tY) call SetUnitFacing(II[(fx)],((a+bj_PI)*1.)*bj_RADTODEG) call SetUnitAnimation(II[fx],"Spell One") call DestroyEffect(AddSpecialEffect("blood.mdl",tX,tY)) exitwhen i==0 endloop call GroupEnumUnitsInRange(G,Boss_Spell_X[data],Boss_Spell_Y[data],Boss_Spell_V[data]+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,Boss_Spell_X[data],Boss_Spell_Y[data],Boss_Spell_V[data])then if IsUnitAliveAndEnemy(u,Boss_Spell_unit1[data])then call DestroyEffect(AddSpecialEffectTarget("SmallBloodEX-NoSplat.mdl",u," chest")) call UnitDamageTargetBY(((Boss_Spell_unit1[data])),((u)),((((Unit_DOT[(id)]*Boss_Spell_Z[data])*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v(u,2.5) endif endif endloop if ModuloInteger(Boss_Spell_data2[data],8)==0 then set i=6 loop set i=i-1 set a=i*Lx/ 6+GetRandomReal(-.25,.25) set d=GetRandomReal(25,Boss_Spell_V[data]-25) call Ltv(LAv("FeatherCrow.mdl",Boss_Spell_X[data]+d*Cos(a),Boss_Spell_Y[data]+d*Sin(a),1.25)) exitwhen i==0 endloop if ModuloInteger(Boss_Spell_data2[data],16)==0 then call GroupEnumUnitsInRange(G,Boss_Spell_X[data],Boss_Spell_Y[data],Boss_Spell_V[data]+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,Boss_Spell_X[data],Boss_Spell_Y[data],Boss_Spell_V[data])then if IsUnitAliveAndEnemy(u,Boss_Spell_unit1[data])then call HeroSkills_A0C2_BuffAdd(u) endif endif endloop call Ltv(Lfv(LAv("BloodSlam.mdl",Boss_Spell_X[data],Boss_Spell_Y[data],1.35+Boss_Spell_V[data]/ 1000.),$CD,$CD,$CD,125)) call Ltv(Lfv(LAv("Epicenter.mdl",Boss_Spell_X[data],Boss_Spell_Y[data],1.35+Boss_Spell_V[data]/ 1000.),$FF,0,0,$FF)) endif endif endif if Boss_Spell_data2[data]<=0 then set i=$F loop set i=i-1 set fx=LoadInteger(BYHT,Boss_Spell_data1[data],i) call Ltv(LAv("s_ShadowEruption_Rain.mdl",(GetUnitX(II[(fx)])),(GetUnitY(II[(fx)])),.75)) call SetUnitDecay(II[fx],125,125,125,$87,.75) call LQv(fx,.75) exitwhen i==0 endloop call s__PhantomSword_AddNumber((id),4) call SetUnitInvulnerable(Boss_Spell_unit1[data],false) call PauseUnit(Boss_Spell_unit1[data],false) call ShowUnit(Boss_Spell_unit1[data],true) if GetLocalPlayer()==GetOwningPlayer(Boss_Spell_unit1[data])then call ClearSelection() call SelectUnit(Boss_Spell_unit1[data],true) endif set Boss_Spell_unit1[data]=null set Boss_Spell_unit2[data]=null call Unit_Cancel_Counter(399,id) call free(Boss_Spell_data1[data]) call Boss_Spell_deallocate(data) call fvv((t)) endif set t=K[t] endloop endfunction function HeroSkills_A0C2_Actions takes nothing returns nothing local integer t=(D9v(HeroSkills_A0C2_Func)) local integer data=Boss_Spell_allocate() local integer id=(GetUnitUserData((GetTriggerUnit()))) local integer i=$F local integer lv=GetUnitAbilityLevel(GetTriggerUnit(),'A0C2') local integer fx local real a set Timer_List[t]=data set Boss_Spell_unit1[data]=GetTriggerUnit() set Boss_Spell_unit2[data]=ConvertVersion(id) set Boss_Spell_data1[data]=malloc() set Boss_Spell_data2[data]=80 set Boss_Spell_V[data]=375+25*lv set Boss_Spell_X[data]=GetUnitX(Boss_Spell_unit1[data]) set Boss_Spell_Y[data]=GetUnitY(Boss_Spell_unit1[data]) set Boss_Spell_Z[data]=(4*lv*GetHeroAttack((id))+(75+$A*lv)*GetHeroState2(Boss_Spell_unit1[data],true))/ 20. loop set i=i-1 set a=i*Lx/ $F set fx=LVv('e00R',Boss_Spell_X[data]-Boss_Spell_V[data]*Cos(a),Boss_Spell_Y[data]-Boss_Spell_V[data]*Sin(a),bj_RADTODEG*a) call SetUnitOwner(II[(fx)],(GetOwningPlayer(Boss_Spell_unit1[data])),false) call LDv(fx,7.5) call SaveInteger(BYHT,Boss_Spell_data1[data],i,fx) call Lfv(fx,125,125,125,$87) exitwhen i==0 endloop call zhv((GetPlayerId((GetOwningPlayer(Boss_Spell_unit1[data])))),40,3) call SetUnitInvulnerable(Boss_Spell_unit1[data],true) call PauseUnit(Boss_Spell_unit1[data],true) call ShowUnit(Boss_Spell_unit1[data],false) call Unit_App_Counter(400,id) endfunction function HeroSkills_A0C2_Init takes nothing returns nothing set HeroSkills_A0C2_Func=fxv(function HeroSkills_A0C2_Start) call RegisterSpellEffectEvent('A0C2',function HeroSkills_A0C2_Actions) call Luv('A0C2') endfunction function HeroSkills_A0C4_Start takes nothing returns nothing local integer data=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer fx local unit u local integer i local real pX local real pY local real a local real d set Boss_Spell_data2[data]=Boss_Spell_data2[data]-1 if not UnitAlive(Boss_Spell_unit1[data])then call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:334") call PauseUnit(Boss_Spell_unit1[data],false) call SetUnitInvulnerable(Boss_Spell_unit1[data],false) call Unit_Cancel_Counter(401,Boss_Spell_data1[data]) call Boss_Spell_deallocate(data) set Boss_Spell_unit1[data]=null elseif Boss_Spell_data2[data]>2 then set a=GetRandomReal(0,Lx) set d=GetRandomReal(100,600) set pX=Boss_Spell_X[data]+d*Cos(a) set pY=Boss_Spell_Y[data]+d*Sin(a) set a=a*bj_RADTODEG call SetUnitX(Boss_Spell_unit1[data],pX) call SetUnitY(Boss_Spell_unit1[data],pY) call SetUnitFacing(Boss_Spell_unit1[data],a) call SetUnitAnimation(Boss_Spell_unit1[data],"Spell One") call Ltv(Lbv(LVv('e00V',pX,pY,a),2.25,2)) call Ltv(LIv("PoisonStream.mdl",pX,pY,50,1.25,(a+90)*bj_DEGTORAD,0)) call Ltv(LAv("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl",pX,pY,3.5)) call Lqv(LAv("Abilities\\Weapons\\Bolt\\BoltImpact.mdl",pX,pY,3.5),1) call GroupEnumUnitsInRange(G,pX,pY,500+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,pX,pY,500)then if IsUnitAliveAndEnemy(u,Boss_Spell_unit1[data])then call UnitDamageTargetBY(((Boss_Spell_unit1[data])),((u)),((((Boss_Spell_Z[data])*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl",u,"chest")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",u,"origin")) endif endif endloop elseif Boss_Spell_data2[data]==2 then call SetUnitAnimation(Boss_Spell_unit1[data],"Spell") elseif Boss_Spell_data2[data]==0 then set i=8 set pX=Boss_Spell_X[data] set pY=Boss_Spell_Y[data] set a=GetRandomReal(0,Lx)*bj_RADTODEG set Boss_Spell_Z[data]=12.*Boss_Spell_Z[data] call SetUnitX(Boss_Spell_unit1[data],pX) call SetUnitY(Boss_Spell_unit1[data],pY) call SetUnitFacing(Boss_Spell_unit1[data],a) call Ltv(LVv('e004',pX,pY,a+90.)) call Ltv(Lbv(LVv('e00V',pX,pY,a),2.25,2)) call Lqv(LAv("Abilities\\Weapons\\Bolt\\BoltImpact.mdl",pX,pY,3),1) loop set i=i-1 set a=i*Lx/ 8 call Ltv(LAv("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl",pX+$96*Cos(a),pY+$96*Sin(a),3)) exitwhen i==0 endloop call GroupEnumUnitsInRange(G,pX,pY,600+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,pX,pY,600)then if IsUnitAliveAndEnemy(u,Boss_Spell_unit1[data])then call UnitDamageTargetBY(((Boss_Spell_unit1[data])),((u)),((((Boss_Spell_Z[data])*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl",u,"chest")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",u,"origin")) call SetUnitAnimation(u,"death") endif endif endloop call s__PhantomSword_AddNumber((Boss_Spell_data1[data]),8) call PauseUnit(Boss_Spell_unit1[data],false) call SetUnitInvulnerable(Boss_Spell_unit1[data],false) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:335") call Unit_Cancel_Counter(402,Boss_Spell_data1[data]) call Boss_Spell_deallocate(data) set Boss_Spell_unit1[data]=null endif endfunction function HeroSkills_A0C4_Actions takes nothing returns nothing local integer data=Boss_Spell_allocate() local unit u=GetTriggerUnit() set Boss_Spell_unit1[data]=u set Boss_Spell_data1[data]=(GetUnitUserData((u))) set Boss_Spell_data2[data]=30 set Boss_Spell_X[data]=GetUnitX(u) set Boss_Spell_Y[data]=GetUnitY(u) set Boss_Spell_Z[data]=25*GetHeroState2(u,true) call GroupEnumUnitsInRange(G,Boss_Spell_X[data],Boss_Spell_Y[data],600+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,Boss_Spell_X[data],Boss_Spell_Y[data],600)then if IsUnitAliveAndEnemy(u,Boss_Spell_unit1[data])then call m2v(u,3,'A500','B500',true) endif endif endloop call TimerDestroyAddSpecialEffectTargetBY("Abilities\\Weapons\\IllidanMissile\\IllidanMissile.mdl",Boss_Spell_unit1[data],"hand, right",4.5) call PauseUnit(Boss_Spell_unit1[data],true) call SetUnitInvulnerable(Boss_Spell_unit1[data],true) call SetUnitTimeScale(Boss_Spell_unit1[data],2) call TimerStart(NewTimer(data),.1,true,function HeroSkills_A0C4_Start) call Unit_App_Counter(403,Boss_Spell_data1[data]) endfunction function HeroSkills_A0C4_Init takes nothing returns nothing call RegisterSpellEffectEvent('A0C4',function HeroSkills_A0C4_Actions) call Luv('A0C4') endfunction function Hero_H001_Init takes nothing returns nothing call RegisterHeroInitEvent('H001',function Hero_EnterWorld_H001) call HeroSkills_A003_Init() call HeroSkills_A005_Init() call HeroSkills_A0BM_Init() call HeroSkills_A021_Init() call HeroSkills_A0BL_Init() call HeroSkills_A0BN_Init() call HeroSkills_A0C1_Init() call HeroSkills_A0C2_Init() call HeroSkills_A0C4_Init() endfunction function HeroSkills_Aspb_AuraAbility1_Expired takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:336") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A09H','Beye') call ModifyUnitAttack((id),-HeroSkills_Aspb_AuraAbility1_Damage[id]) call Unit_Cancel_Counter(404,(id)) set HeroSkills_Aspb_AuraAbility1_timer[id]=null set HeroSkills_Aspb_AuraAbility1_HaloOwner[id]=0 set HeroSkills_Aspb_AuraAbility1_Damage[id]=0 endfunction function HeroSkills_Aspb_AuraAbility2_Expired takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:337") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A09I','Bstt') call ModifyUnitArmor((id),-HeroSkills_Aspb_AuraAbility2_Def[id]) call Unit_Cancel_Counter(405,(id)) set HeroSkills_Aspb_AuraAbility2_timer[id]=null set HeroSkills_Aspb_AuraAbility2_HaloOwner[id]=0 set HeroSkills_Aspb_AuraAbility2_Def[id]=0 endfunction function HeroSkills_Aspb_AuraAbility3_Expired takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:338") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A09J','Bena') call ModifyUnitHpRegen((id),-HeroSkills_Aspb_AuraAbility3_HpRegen[id]) call Unit_Cancel_Counter(406,(id)) set HeroSkills_Aspb_AuraAbility3_timer[id]=null set HeroSkills_Aspb_AuraAbility3_HaloOwner[id]=0 set HeroSkills_Aspb_AuraAbility3_HpRegen[id]=.0 endfunction function HeroSkills_Aspb_AuraAbility4_Expired takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:339") call UnitRemoveAbility((Je[(id)]),'Bens') call Unit_Cancel_Counter(407,(id)) set HeroSkills_Aspb_AuraAbility4_timer[id]=null endfunction function HeroSkills_Aspb_AuraAbility takes integer id,integer c,integer i,integer lv returns nothing local real value local real value_max if i==1 then if HeroSkills_Aspb_AuraAbility1_timer[id]==null then set HeroSkills_Aspb_AuraAbility1_timer[id]=NewTimer(id) call UnitAddAbilityBY((Je[(id)]),'A09H') call Unit_App_Counter(408,(id)) endif set value=$A*lv*lv+2*GetHeroState1((Je[(c)]),true)-$A if IsUnitType((Je[(id)]),UNIT_TYPE_HERO)then set value_max=100*GetHeroLevel((Je[(id)])) if value>value_max then set value=value_max endif endif if id!=c then set value=.5*value endif if R2I(value)>HeroSkills_Aspb_AuraAbility1_Damage[id]or HeroSkills_Aspb_Type[(HeroSkills_Aspb_AuraAbility1_HaloOwner[id])]!=1 or not IsUnitInRange((Je[(id)]),(Je[(HeroSkills_Aspb_AuraAbility1_HaloOwner[id])]),600)then call ModifyUnitAttack((id),R2I(value)-HeroSkills_Aspb_AuraAbility1_Damage[id]) set HeroSkills_Aspb_AuraAbility1_HaloOwner[id]=c set HeroSkills_Aspb_AuraAbility1_Damage[id]=R2I(value) endif call TimerStart(HeroSkills_Aspb_AuraAbility1_timer[id],1,false,function HeroSkills_Aspb_AuraAbility1_Expired) elseif i==2 then if HeroSkills_Aspb_AuraAbility2_timer[id]==null then set HeroSkills_Aspb_AuraAbility2_timer[id]=NewTimer(id) call UnitAddAbilityBY((Je[(id)]),'A09I') call Unit_App_Counter(409,(id)) endif set value=($A+.75*SquareRoot(GetHeroState1((Je[(c)]),true)))*lv if id!=c then set value=.5*value endif if R2I(value)>HeroSkills_Aspb_AuraAbility2_Def[id]or HeroSkills_Aspb_Type[(HeroSkills_Aspb_AuraAbility2_HaloOwner[id])]!=2 or not IsUnitInRange((Je[(id)]),(Je[(HeroSkills_Aspb_AuraAbility2_HaloOwner[id])]),600)then call ModifyUnitArmor((id),R2I(value)-HeroSkills_Aspb_AuraAbility2_Def[id]) set HeroSkills_Aspb_AuraAbility2_HaloOwner[id]=c set HeroSkills_Aspb_AuraAbility2_Def[id]=R2I(value) endif call TimerStart(HeroSkills_Aspb_AuraAbility2_timer[id],1,false,function HeroSkills_Aspb_AuraAbility2_Expired) elseif i==3 then if HeroSkills_Aspb_AuraAbility3_timer[id]==null then set HeroSkills_Aspb_AuraAbility3_timer[id]=NewTimer(id) call UnitAddAbilityBY((Je[(id)]),'A09J') call Unit_App_Counter(410,(id)) endif set value=.006*GetUnitState((Je[(id)]),UNIT_STATE_MAX_LIFE)+3*SquareRoot(GetHeroState1((Je[(c)]),true)) if value>HeroSkills_Aspb_AuraAbility3_HpRegen[id]or HeroSkills_Aspb_Type[(HeroSkills_Aspb_AuraAbility3_HaloOwner[id])]!=3 or not IsUnitInRange((Je[(id)]),(Je[(HeroSkills_Aspb_AuraAbility3_HaloOwner[id])]),600)then call ModifyUnitHpRegen((id),value-HeroSkills_Aspb_AuraAbility3_HpRegen[id]) set HeroSkills_Aspb_AuraAbility3_HaloOwner[id]=c set HeroSkills_Aspb_AuraAbility3_HpRegen[id]=value endif call TimerStart(HeroSkills_Aspb_AuraAbility3_timer[id],1,false,function HeroSkills_Aspb_AuraAbility3_Expired) elseif i==4 then if HeroSkills_Aspb_AuraAbility4_timer[id]==null then set HeroSkills_Aspb_AuraAbility4_timer[id]=NewTimer(id) call Auxiliary_TargetOrder(('Ablo'),null,1,$D0085,(Je[(id)])) call Unit_App_Counter(411,(id)) endif call TimerStart(HeroSkills_Aspb_AuraAbility4_timer[id],1,false,function HeroSkills_Aspb_AuraAbility4_Expired) endif endfunction function HeroSkills_Aspb_Attack_Type4_Expired takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:340") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A09O','Blsh') call ModifyHeroAllStatPercent(id,-.1) endfunction function HeroSkills_Aspb_AttackEffect takes unit s,unit t returns nothing local integer id=(GetUnitUserData((s))) if HeroSkills_Aspb_Type[id]==1 then call UnitDamageTargetBY(((s)),((t)),((((25*HeroSkills_Aspb_Level[id]+(2.5+HeroSkills_Aspb_Level[id]+.1*SquareRoot(GetHeroState1(s,true)))*GetHeroState1(s,true))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") else call UnitDamageTargetBY(((s)),((t)),((((25*HeroSkills_Aspb_Level[id]+(2.5+.5*HeroSkills_Aspb_Level[id])*GetHeroState1(s,true))*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") if HeroSkills_Aspb_Type[id]==2 then call UnitAppBuff((GetUnitUserData((t))),'ACcr',$D00DD) elseif HeroSkills_Aspb_Type[id]==3 then if(100000.-TimerGetRemaining(GameTimer))>=HeroSkills_Aspb_Type3_cd[id]then set HeroSkills_Aspb_Type3_cd[id]=(100000.-TimerGetRemaining(GameTimer))+6 call UnitCureTaret(s,s,.1*GetUnitMaxLifeById((GetUnitUserData((s))))) call DestroyEffect(AddSpecialEffectTarget("HolyLight.mdl",s,"origin")) endif elseif HeroSkills_Aspb_Type[id]==4 then if HeroSkills_Aspb_Type4_Timer[id]==null then set HeroSkills_Aspb_Type4_Timer[id]=NewTimer(id) call ModifyHeroAllStatPercent(id,.1) call UnitAddAbilityBY(s,'A09O') call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\Possession\\PossessionMissile.mdl",s,"chest")) call Unit_App_Counter(412,(id)) endif call TimerStart(HeroSkills_Aspb_Type4_Timer[id],60,false,function HeroSkills_Aspb_Attack_Type4_Expired) endif endif call DestroyEffect(AddSpecialEffectTarget("HolyBlast.mdl",t,"chest")) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl",t,"origin")) endfunction function HeroSkills_Aspb_onAttack takes nothing returns nothing if GetRandomInt(1,$A)==1 then call HeroSkills_Aspb_AttackEffect((mF),(MF)) endif endfunction function HeroSkills_Aspb_Loop_c takes nothing returns nothing local integer id=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local unit u local real x local real y if GetUnitTypeId((Je[(id)]))==0 then call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:341") call Unit_Cancel_Counter(413,(id)) set HeroSkills_Aspb_Type[id]=0 elseif UnitAlive((Je[(id)]))then set HeroSkills_Aspb_Level[id]=GetUnitAbilityLevel((Je[(id)]),LoadInteger(BYHT,HeroSkills_Aspb_List,HeroSkills_Aspb_Type[id])) set x=GetUnitX((Je[(id)])) set y=GetUnitY((Je[(id)])) call GroupEnumUnitsInRange(G,x,y,600+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,600)then if Hc[(GetUnitUserData((u)))]and IsUnitAliveAndAlly(u,(Je[(id)]))then call HeroSkills_Aspb_AuraAbility(((GetUnitUserData((u)))),id,HeroSkills_Aspb_Type[id],HeroSkills_Aspb_Level[id]) endif endif endloop endif endfunction function HeroSkills_Aspb_Switch takes integer id,integer i returns nothing if HeroSkills_Aspb_Type[id]==0 then set HeroSkills_Aspb_Level[id]=1 call UnitAddAbilityBY((Je[(id)]),LoadInteger(BYHT,HeroSkills_Aspb_List,i)) else set HeroSkills_Aspb_Level[id]=GetUnitAbilityLevel((Je[(id)]),LoadInteger(BYHT,HeroSkills_Aspb_List,HeroSkills_Aspb_Type[id])) call HeroSkillsreplace((id),LoadInteger(BYHT,HeroSkills_Aspb_List,HeroSkills_Aspb_Type[id]),LoadInteger(BYHT,HeroSkills_Aspb_List,i)) endif set HeroSkills_Aspb_Type[id]=i endfunction function HeroSkills_Aspb_Actions takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) call HeroSkills_Aspb_Switch(id,LoadInteger(BYHT,HeroSkills_Aspb_List,GetSpellAbilityId())) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl",(Je[(id)]),"origin")) endfunction function Hero_EnterWorld_H003 takes nothing returns nothing local integer id=le call HeroSkills_Aspb_Switch(id,1) call UnitAddPAttackTrig((id),function HeroSkills_Aspb_onAttack) call TimerStart(NewTimer(id),.5,true,function HeroSkills_Aspb_Loop_c) call Unit_App_Counter(414,(id)) endfunction function HeroSkills_Aspb_Register takes integer i,integer ida,integer idb returns boolean call SaveInteger(BYHT,HeroSkills_Aspb_List,ida,i) call SaveInteger(BYHT,HeroSkills_Aspb_List,i,idb) call Luv(ida) call Luv(idb) call RegisterSpellEffectEvent(ida,function HeroSkills_Aspb_Actions) return true endfunction function HeroSkills_Aspb_Init takes nothing returns nothing set HeroSkills_Aspb_List=malloc() call HeroSkills_Aspb_Register(1,'A01G','Aspb') call HeroSkills_Aspb_Register(2,'A06Y','A09E') call HeroSkills_Aspb_Register(3,'A09A','A09F') call HeroSkills_Aspb_Register(4,'A09C','A09G') call RegisterHeroInitEvent('H003',function Hero_EnterWorld_H003) endfunction function HeroSkills_A02M_SetSwitch takes boolean b returns nothing set HeroSkills_A02M_DamageNotA006=b endfunction function HeroSkills_A02M_DeBuff_End takes integer id returns nothing if HeroSkills_A02M_DeBuff_Timer[id]!=null then call ReleaseTimer(HeroSkills_A02M_DeBuff_Timer[id],"[TimerUtils]Error:342") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A09K','BOhx') call s__Trig_remove((HeroSkills_A02M_DeBuff_Trig[id])) call Unit_Cancel_Counter(415,(id)) set HeroSkills_A02M_DeBuff_Timer[id]=null endif endfunction function Fhe takes nothing returns nothing call HeroSkills_A02M_DeBuff_End(((alloc__hpv(GetHandleId((GetExpiredTimer())))))) endfunction function HeroSkills_A02M_DeBuff_onDamaged takes nothing returns nothing local integer id=(pF) if HeroSkills_A02M_DamageNotA006 and(DAK_DGTYPE[HF]==DAMAGE_TYPE_MAGIC)then if(Control_abid[(id)])=='A500' then call mDv((MF),1) else call m1v((MF),2) endif call DamageAmplifyDis(.15*GetDamage(),$F,"|c00fadc91") call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\StaffOfPurification\\PurificationCaster.mdl",(MF),"chest")) call HeroSkills_A02M_DeBuff_End(id) endif endfunction function HeroSkills_A02M_DeBuffAdd takes unit u returns nothing local integer id if UnitAlive(u)and(Control_abid[((GetUnitUserData((u))))])!='ACfb' then set id=(GetUnitUserData((u))) if HeroSkills_A02M_DeBuff_Timer[id]==null then set HeroSkills_A02M_DeBuff_Timer[id]=NewTimer(id) set HeroSkills_A02M_DeBuff_Trig[id]=UnitAddShieldTrigB((id),function HeroSkills_A02M_DeBuff_onDamaged) call UnitAddAbilityBY((Je[(id)]),'A09K') call Unit_App_Counter(416,(id)) endif call TimerStart(HeroSkills_A02M_DeBuff_Timer[id],8,false,function Fhe) endif endfunction function HeroSkills_A02M_Start takes nothing returns nothing local integer data=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local unit u local real x local real y set x=(GetUnitX(II[(Boss_Spell_data3[data])]))+Boss_Spell_X[data] set y=(GetUnitY(II[(Boss_Spell_data3[data])]))+Boss_Spell_Y[data] call LKv(Boss_Spell_data3[data],x) call Llv(Boss_Spell_data3[data],y) set Boss_Spell_data1[data]=Boss_Spell_data1[data]-1 call GroupEnumUnitsInRange(G,x,y,$96+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,$96)then if not IsUnitInGroup(u,Boss_Spell_group1[data])and IsUnitAliveAndEnemyNotAvul(u,Boss_Spell_unit1[data])then set Boss_Spell_data2[data]=Boss_Spell_data2[data]-1 call GroupAddUnit(Boss_Spell_group1[data],u) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl",u,"origin")) call UnitDamageTargetBY(((Boss_Spell_unit1[data])),((u)),((((Boss_Spell_Z[data])*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call HeroSkills_A02M_DeBuffAdd(u) endif exitwhen Boss_Spell_data2[data]==0 and Boss_Spell_eff[data]==null endif endloop if Boss_Spell_data1[data]<=0 or Boss_Spell_data2[data]<=0 then if Boss_Spell_eff[data]!=null then call GroupEnumUnitsInRange(G,x,y,450+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,450)then if IsUnitAliveAndEnemyNotAvul(u,Boss_Spell_unit1[data])then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl",u,"origin")) call UnitDamageTargetBY(((Boss_Spell_unit1[data])),((u)),((((3*Boss_Spell_Z[data])*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call HeroSkills_A02M_DeBuffAdd(u) endif endif endloop call Ltv(LAv("LightNova.mdl",x,y,1.5)) call Ltv(LAv("TheHolyBomb.mdl",x,y,1.25)) endif call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:343") call RecycleGroup(Boss_Spell_group1[data]) call Ltv(Boss_Spell_data3[data]) call Boss_Spell_deallocate(data) set Boss_Spell_unit1[data]=null set Boss_Spell_group1[data]=null set Boss_Spell_eff[data]=null endif endfunction function HeroSkills_A02M_Actions takes nothing returns nothing local integer data=Boss_Spell_allocate() local integer lv=GetUnitAbilityLevel(GetTriggerUnit(),'A02M') local real x=GetUnitX(GetTriggerUnit()) local real y=GetUnitY(GetTriggerUnit()) local real a=Atan2(GetSpellTargetY()-y,GetSpellTargetX()-x) set Boss_Spell_unit1[data]=GetTriggerUnit() set Boss_Spell_group1[data]=NewGroup() set Boss_Spell_eff[data]=ConvertVersion(GetUnitAbilityLevel(Boss_Spell_group1[data],'A09U')) set Boss_Spell_data1[data]=30 set Boss_Spell_data2[data]=4 set Boss_Spell_Z[data]=$FA*lv+($A+lv)*GetHeroState1(Boss_Spell_unit1[data],true) set Boss_Spell_X[data]=30*Cos(a) set Boss_Spell_Y[data]=30*Sin(a) set Boss_Spell_data3[data]=Lnv(x,y,a) call LMv(Boss_Spell_data3[data],"Holy Cross.mdl") call SetUnitScale(II[(Boss_Spell_data3[data])],((2.4)*1.),0,0) call Ltv(LIv("TheHolyBomb.mdl",x,y,125,.85,a,0)) call PlaySoundAtPoint_BJ((Ya),((100)*1.),((x)*1.),((y)*1.),0) call TimerStart(NewTimer(data),.03125,true,function HeroSkills_A02M_Start) endfunction function HeroSkills_A02M_Init takes nothing returns nothing call RegisterSpellEffectEvent('A02M',function HeroSkills_A02M_Actions) call Luv('A02M') endfunction function HeroSkills_Absk_End takes integer id returns nothing if HeroSkills_Absk_AtkTrig[id]!=0 then call s__Trig_remove((HeroSkills_Absk_AtkTrig[id])) set HeroSkills_Absk_AtkTrig[id]=0 endif call ReleaseTimer(HeroSkills_Absk_Timer[id],"[TimerUtils]Error:344") call UnitRemoveAbilityBY((Je[(id)]),'Absk') call SetPlayerAbilityAvailable(GetOwningPlayer((Je[(id)])),'A09L',true) call UnitRemoveAbility((Je[(id)]),'Bdvv') call Unit_Cancel_Counter(417,(id)) set HeroSkills_Absk_Timer[id]=null endfunction function HeroSkills_Absk_Expired takes nothing returns nothing call HeroSkills_Absk_End(((alloc__hpv(GetHandleId((GetExpiredTimer())))))) endfunction function HeroSkills_Absk_onAttack takes nothing returns nothing local integer id=(pF_v) local real x=GetUnitX((mF)) local real y=GetUnitY((mF)) local real tx=GetUnitX((MF))-x local real ty=GetUnitY((MF))-y local real a=SquareRoot(tx*tx+ty*ty) local unit u if a>0 then set tx=tx/ a set ty=ty/ a else set a=GetUnitFacing((mF))*bj_DEGTORAD set tx=Cos(a) set ty=Sin(a) endif if GetUnitAbilityLevel((mF),'A09U')>0 then call DestroyEffect(AddSpecialEffectTarget("HolyStomp.mdl",(MF),"origin")) call DamageAmplifyDis(9*GetDamage()+$F*GetHeroState1((mF),true),17.5,"|c00fadc91") call zhv((Kc[((id))]),50,.4) else call DamageAmplifyDis(4*GetDamage()+2.5*GetHeroState1((mF),true),12.5,"|c00fadc91") call zhv((Kc[((id))]),37.5,.4) endif call Ltv(LIv("Explosion.mdl",x+$A*Cos(a),y+$A*Sin(a),125,1,a,0)) call HeroSkills_Absk_End(id) set x=x-40*tx set y=y-40*ty set a=Tan(1.8326) call GroupEnumUnitsInRange(G,x,y,350+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,350)then if IsUnitAliveAndEnemy(u,(mF))then set Boss_x[0]=GetUnitX(u)-x set Boss_y[0]=GetUnitY(u)-y set Boss_x[1]=Boss_x[0]*tx+Boss_y[0]*ty if Boss_x[1]>=0 or Boss_x[1]>=RAbsBJ(Boss_y[0]*tx-Boss_x[0]*ty)/ a then if not(IsUnitType((u),UNIT_TYPE_GIANT))then call Gjv(u,40,a,1.5,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl") endif call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",u,"chest")) call UnitDamageTargetBY((((mF))),((u)),((((GetDamage())*1.))*1.),false,(false),false,false,(ATTACK_TYPE_CHAOS),(DAMAGE_TYPE_UNIVERSAL),((((0)*1.))*1.),((""))) call HeroSkills_Aspb_AttackEffect((mF),u) endif endif endif endloop endfunction function HeroSkills_Absk_App takes integer id returns nothing set HeroSkills_Absk_Timer[id]=NewTimer(id) call SetPlayerAbilityAvailable(GetOwningPlayer((Je[(id)])),'A09L',false) call UnitAddAbilityBY((Je[(id)]),'Absk') call TimerStart(HeroSkills_Absk_Timer[id],3,false,function HeroSkills_Absk_Expired) call Unit_App_Counter(418,(id)) endfunction function HeroSkills_Absk_Actions takes nothing returns nothing local integer id=(GetUnitUserData((GetTriggerUnit()))) set HeroSkills_Absk_AtkTrig[id]=UnitAddPAttackTrigB((id),function HeroSkills_Absk_onAttack) call TimerStart(HeroSkills_Absk_Timer[id],6,false,function HeroSkills_Absk_Expired) endfunction function HeroSkills_A09L_Start takes nothing returns nothing local integer data=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local integer b=Boss_Spell_data2[data] local unit u local boolean VZe local integer lv local real t=RMinBJ(Boss_Spell_Y[data]+Boss_Spell_X[data],1) local real x=s__BezierCurve_getx(b,t) local real y=s__BezierCurve_gety(b,t) local real z=s__BezierCurve_getz(b,t) local real d call SetUnitX(Boss_Spell_unit1[data],x) call SetUnitY(Boss_Spell_unit1[data],y) call SetUnitFlyHeight(Boss_Spell_unit1[data],z,0) if t>=1 then set VZe=false set lv=GetUnitAbilityLevel(Boss_Spell_unit1[data],'A09L') set d=500*lv+($F+lv)*GetHeroState1(Boss_Spell_unit1[data],true) call GroupEnumUnitsInRange(G,x,y,275+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,275)then if IsUnitAliveAndEnemy(u,Boss_Spell_unit1[data])then set VZe=true call UnitDamageTargetBY(((Boss_Spell_unit1[data])),((u)),((((d)*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") call m1v(u,1) endif endif endloop if VZe then call HeroSkills_Absk_App((Boss_Spell_data1[data])) endif call Ltv(LAv("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl",x,y,2)) call Ltv(LAv("TheHolyBomb.mdl",x,y,1.5)) call Ltv(LAv("Explosion.mdl",x,y,1.75)) call PauseUnit(Boss_Spell_unit1[data],false) call SetUnitInvulnerable(Boss_Spell_unit1[data],false) call SetUnitPathing(Boss_Spell_unit1[data],true) call QueueUnitAnimation(Boss_Spell_unit1[data],"Stand Ready") call DestroyEffect(Boss_Spell_eff[data]) call Unit_Cancel_Counter(419,Boss_Spell_data1[data]) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:345") call Boss_Spell_deallocate(data) call s__BezierCurve_deallocate(b) set Boss_Spell_unit1[data]=null set Boss_Spell_eff[data]=null else set Boss_Spell_Y[data]=t set Boss_Spell_X[data]=Boss_Spell_X[data]+.0025 endif endfunction function HeroSkills_A09L_Actions takes nothing returns nothing local integer data=Boss_Spell_allocate() local real x=GetUnitX(GetTriggerUnit()) local real y=GetUnitY(GetTriggerUnit()) local real tx=GetSpellTargetX() local real ty=GetSpellTargetY() local real dX=(tx-x)/ 3. local real dY=(ty-y)/ 3. local integer b=s__BezierCurve_Power2(x,y,0,x+dX,y+dY,500+SquareRoot(dX*dX+dY*dY),tx,ty,0) set Boss_Spell_unit1[data]=GetTriggerUnit() set Boss_Spell_data1[data]=(GetUnitUserData((GetTriggerUnit()))) set Boss_Spell_data2[data]=b set Boss_Spell_eff[data]=AddSpecialEffectTarget("s_HolymagicProjectile.mdl",Boss_Spell_unit1[data],"weapon") set Boss_Spell_X[data]=.025 set Boss_Spell_Y[data]=0 if UnitAddAbility(Boss_Spell_unit1[data],'Amrf')then call UnitRemoveAbility(Boss_Spell_unit1[data],'Amrf') endif call PauseUnit(Boss_Spell_unit1[data],true) call SetUnitInvulnerable(Boss_Spell_unit1[data],true) call SetUnitPathing(Boss_Spell_unit1[data],false) call SetUnitAnimation(Boss_Spell_unit1[data],"Attack Slam") call Unit_App_Counter(420,Boss_Spell_data1[data]) call TimerStart(NewTimer(data),.03125,true,function HeroSkills_A09L_Start) endfunction function HeroSkills_A09L_ChannelActions takes nothing returns nothing if not IsTerrainWalkable(GetSpellTargetX(),GetSpellTargetY())then call IssueImmediateOrderById(GetTriggerUnit(),$D0004) endif endfunction function HeroSkills_A09L_Init takes nothing returns nothing call RegisterSpellChannelEvent('A09L',function HeroSkills_A09L_ChannelActions) call RegisterSpellEffectEvent('A09L',function HeroSkills_A09L_Actions) call RegisterSpellEffectEvent('Absk',function HeroSkills_Absk_Actions) call SaveBoolean(BYHT,HeroOnSpellEffect_t,('Absk'),true) call Luv('A09L') call Luv('Absk') endfunction function HeroSkills_A027_Start takes nothing returns nothing local integer data=(alloc__hpv(GetHandleId((GetExpiredTimer())))) local unit u local real x local real y local real d set Boss_Spell_data3[data]=Boss_Spell_data3[data]-1 if UnitAlive(Boss_Spell_unit2[data])then set x=GetUnitX(Boss_Spell_unit2[data]) set y=GetUnitY(Boss_Spell_unit2[data]) call LKv(Boss_Spell_data1[data],x) call Llv(Boss_Spell_data1[data],y) call LKv(Boss_Spell_data2[data],x) call Llv(Boss_Spell_data2[data],y) endif call Lfv(Boss_Spell_data2[data],$FF,$FF,$FF,R2I(255./ $80*Boss_Spell_data3[data])) if ModuloInteger(Boss_Spell_data3[data],28)==0 then set x=(GetUnitX(II[(Boss_Spell_data1[data])])) set y=(GetUnitY(II[(Boss_Spell_data1[data])])) call Ltv(LAv("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl",x,y,3.5)) if Boss_Spell_data3[data]<=0 then if UnitAlive(Boss_Spell_unit2[data])then set d=GetWidgetLife(Boss_Spell_unit2[data])/ GetUnitState(Boss_Spell_unit2[data],UNIT_STATE_MAX_LIFE) else set d=0 endif if GetUnitAbilityLevel(Boss_Spell_unit1[data],'A09U')>0 then set Boss_Spell_X[data]=(2.5-1.5*d)*Boss_Spell_X[data] call Lqv(LAv("LightStrikeArray.mdl",x,y,3),2) else set Boss_Spell_X[data]=(1.75-.75*d)*Boss_Spell_X[data] endif call GroupEnumUnitsInRange(G,x,y,300+75,null) loop set u=FirstOfGroup(G) exitwhen u==null call GroupRemoveUnit(G,u) if IsUnitInRangeXY(u,x,y,300)then if IsUnitAliveAndEnemy(u,Boss_Spell_unit1[data])then if u==Boss_Spell_unit2[data]then call UnitDamageTargetBY(((Boss_Spell_unit1[data])),((u)),((((Boss_Spell_X[data])*1.))*1.),false,(true),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") else call UnitDamageTargetBY(((Boss_Spell_unit1[data])),((u)),((((.6*Boss_Spell_X[data])*1.))*1.),false,(false),false,false,(ATTACK_TYPE_NORMAL),(DAMAGE_TYPE_MAGIC),.0,"") endif call DestroyEffect(AddSpecialEffectTarget("ZLightArrowImpact.mdl",u,"chest")) call m1v(u,2.5) endif endif endloop call AddSpecialEffectByAnnulus("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl",x,y,1,$C8,8) call Ltv(LAv("HolyStomp.mdl",x,y,2.125)) call Ltv(LAv("TheHolyBomb.mdl",x,y,1.75)) call LTv(Boss_Spell_data1[data]) call LTv(Boss_Spell_data2[data]) call ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:346") call Boss_Spell_deallocate(data) set Boss_Spell_unit1[data]=null set Boss_Spell_unit2[data]=null endif endif endfunction function HeroSkills_A027_Actions takes nothing returns nothing local integer data=Boss_Spell_allocate() local integer lv=GetUnitAbilityLevel(GetTriggerUnit(),'A027') set Boss_Spell_unit1[data]=GetTriggerUnit() set Boss_Spell_unit2[data]=GetSpellTargetUnit() set Boss_Spell_data1[data]=LVv('e008',GetUnitX(Boss_Spell_unit2[data]),GetUnitY(Boss_Spell_unit2[data]),0) call LDv(Boss_Spell_data1[data],.065) call SetUnitOwner(II[(Boss_Spell_data1[data])],(GetOwningPlayer(Boss_Spell_unit1[data])),false) set Boss_Spell_data2[data]=LVv('e009',(GetUnitX(II[(Boss_Spell_data1[data])])),(GetUnitY(II[(Boss_Spell_data1[data])])),90) set Boss_Spell_data3[data]=112 set Boss_Spell_X[data]=GetHeroAttack((GetUnitUserData((Boss_Spell_unit1[data]))))*lv+(20+2*lv)*GetHeroState1(Boss_Spell_unit1[data],true) call UnitAppBuff((GetUnitUserData((Boss_Spell_unit2[data]))),'AEer',$D00CB) call TimerStart(NewTimer(data),.03125,true,function HeroSkills_A027_Start) endfunction function HeroSkills_A027_Init takes nothing returns nothing call RegisterSpellEffectEvent('A027',function HeroSkills_A027_Actions) call Luv('A027') endfunction function HeroSkills_A09M_Type1_Expired takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:347") call ModifyUnitMagicDamage((id),-20) call UnitRemoveAbilityandBuffBY((Je[(id)]),'A09Q','Bblo') call Unit_Cancel_Counter(421,(id)) set HeroSkills_A09M_Type1_Timer[id]=null endfunction function HeroSkills_A09M_Type2_Expired takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:348") call DeUnitAdef((id),HeroSkills_A09M_Type2_Adef[id]) call UnitRemoveAbilityandBuffBY((Je[(id)]),'A09R','Beng') call Unit_Cancel_Counter(422,(id)) set HeroSkills_A09M_Type2_Timer[id]=null endfunction function HeroSkills_A09M_Type4_Expired takes nothing returns nothing local integer id=ReleaseTimer(GetExpiredTimer(),"[TimerUtils]Error:349") call UnitRemoveAbilityandBuffBY((Je[(id)]),'A09S','Bprg') call Unit_Cancel_Counter(423,(id)) call SetUnitNocontrol((id),false) set HeroSkills_A09M_Type4_Timer[id]=null endfunction function HeroSkills_A09M_BuffApp takes integer id,integer c,integer local_type,real time returns nothing if local_type==1 then if HeroSkills_A09M_Type1_Timer[id]==null then set HeroSkills_A09M_Type1_Timer[id]=NewTimer(id) call UnitAddAbilityBY((Je[(id)]),'A09Q') call ModifyUnitMagicDamage((id),20) call TimerStart(HeroSkills_A09M_Type1_Timer[id],time,false,function HeroSkills_A09M_Type1_Expired) call Unit_App_Counter(424,(id)) elseif TimerGetRemaining(HeroSkills_A09M_Type1_Timer[id])