globalsinteger array Iinteger array Ointeger array Ainteger array Binteger array Cinteger array Dinteger array Einteger array Finteger array Ginteger array Hinteger array Zinteger array Vinteger array Winteger array Xinteger array Yinteger array Jinteger array Kreal array Ltimer M=nullreal N=0integer array Tboolean array Rinteger array Pinteger array Qinteger array I0boolean O0=falseboolean array A0boolean B0=falsestring array C0boolean array D0timer array E0timer array F0integer array G0integer H0=0integer Z0=0integer array V0integer array W0boolean X0=falseboolean Y0=falseboolean J0=falseboolean K0=falseboolean L0=falsemultiboard M0=nullunit N0=nullboolean array S0integer T0=0boolean R0=falseboolean P0=falseboolean Q0=falselocation U0=nulllocation II=nulllocation BI=nulllocation CI=nulllocation DI=nullboolean EI=falseboolean FI=falseboolean GI=falseboolean HI=falseboolean ZI=falseboolean VI=falseboolean WI=falseboolean XI=falseboolean YI=falseboolean JI=falseboolean KI=falseboolean LI=falseinteger NI=0integer SI=0location TI=nulllocation RI=nulllocation PI=nulllocation QI=nulllocation UI=nulllocation I1=nulllocation O1=nulllocation A1=nulllocation B1=nulllocation C1=nulllocation D1=nulllocation E1=nulllocation F1=nulllocation G1=nullinteger array H1integer array Z1integer array V1integer array W1integer X1=0integer array Y1integer array J1unit array K1integer L1=0integer M1=0player array N1player array S1integer array T1integer array R1integer array P1integer array Q1unit array U1integer array IOforce OO=nullforce AO=nullplayer array BOplayer array COplayer DO=nullplayer EO=nullboolean FO=falseleaderboard array GOinteger HO=0integer ZO=0integer array VOplayer WO=nullunit XO=nullinteger YO=0real JO=0item array KOitem array LOitem array NOitem array TOitem array POitem array QOboolean UO=falseinteger I2=0location array O2unit A2=nullgroup B2=nullboolean C2=falseboolean D2=falseboolean E2=falseboolean F2=falseboolean G2=falseboolean H2=falseboolean Z2=falseboolean V2=falsestring W2=""timer X2=nullboolean Y2=falseboolean J2=falseitem K2=nullplayer L2=nullstring array M2boolean N2=falseboolean array S2integer array T2integer R2=0force P2=nullboolean Q2=falsereal U2=0boolean I3=falseboolean O3=falseboolean A3=falseboolean B3=falseboolean array C3string D3=""boolean array E3boolean array F3boolean G3=falseboolean H3=falseweathereffect Z3=nullweathereffect V3=nullboolean W3=falselocation X3=nullreal Y3=0string J3=""string array K3rect L3=nullrect M3=nullrect N3=nullrect S3=nullrect T3=nullrect R3=nullrect P3=nullrect Q3=nullrect U3=nullrect I4=nullrect O4=nullrect A4=nullrect B4=nullrect C4=nullrect D4=nullrect E4=nullrect F4=nullrect G4=nullrect H4=nullrect Z4=nullrect V4=nullrect W4=nullrect X4=nullrect Y4=nullrect J4=nullrect K4=nullrect L4=nullrect M4=nullrect N4=nullrect S4=nullrect T4=nullrect R4=nullrect P4=nullrect Q4=nullrect U4=nullrect I5=nullrect O5=nullrect A5=nullrect B5=nullrect C5=nullrect D5=nullrect E5=nullrect F5=nullrect G5=nullrect H5=nullrect Z5=nullrect V5=nullrect W5=nullrect X5=nullrect Y5=nullrect J5=nullrect K5=nullrect L5=nullrect M5=nullrect N5=nullrect S5=nullrect T5=nullrect R5=nullrect P5=nullrect Q5=nullrect U5=nullrect I6=nullrect O6=nullrect A6=nullrect B6=nullrect C6=nullrect D6=nullrect E6=nullrect F6=nullrect G6=nullrect H6=nullrect Z6=nullrect V6=nullrect W6=nullrect X6=nullrect Y6=nullrect J6=nullrect K6=nullrect L6=nullrect M6=nullrect N6=nullrect S6=nullrect T6=nullrect R6=nullrect P6=nullrect Q6=nullrect U6=nullrect I7=nullrect O7=nullrect A7=nullrect B7=nullrect C7=nullrect D7=nullrect E7=nullrect F7=nullrect G7=nullrect H7=nullrect Z7=nullrect V7=nullrect W7=nullrect X7=nullrect Y7=nullrect J7=nullrect K7=nullrect L7=nullrect M7=nullrect N7=nullrect S7=nullrect T7=nullrect R7=nullrect P7=nullrect Q7=nullrect U7=nullrect I8=nullrect O8=nullrect A8=nullrect B8=nullrect C8=nullrect D8=nullrect E8=nullrect F8=nullrect G8=nullrect H8=nullrect Z8=nullrect V8=nullrect W8=nullrect X8=nullrect Y8=nullrect J8=nullrect K8=nullrect L8=nullrect M8=nullrect N8=nullrect S8=nullrect T8=nullrect R8=nullrect P8=nullrect Q8=nullrect U8=nullrect I9=nullrect O9=nullrect A9=nullrect B9=nullrect C9=nullrect D9=nullrect E9=nullrect F9=nullrect G9=nullrect H9=nullrect Z9=nullrect V9=nullrect W9=nullrect X9=nullrect Y9=nullrect J9=nullrect K9=nullrect L9=nullrect M9=nullrect N9=nullrect S9=nullrect T9=nullrect R9=nullrect P9=nullrect Q9=nullrect U9=nullrect IA=nullrect OA=nullrect BA=nullrect CA=nullrect DA=nullrect EA=nullrect FA=nullrect GA=nullrect HA=nullrect ZA=nullrect VA=nullrect WA=nullrect XA=nullrect YA=nullrect JA=nullrect KA=nullrect LA=nullrect MA=nullrect NA=nullrect SA=nullrect TA=nullrect RA=nullrect PA=nullrect QA=nullrect UA=nullrect IB=nullrect OB=nullrect AB=nullrect BB=nullrect CB=nullrect DB=nullrect EB=nullrect FB=nullrect GB=nullrect HB=nullrect ZB=nullrect VB=nullrect WB=nullrect XB=nullrect YB=nullrect JB=nullrect KB=nullrect LB=nullrect MB=nullrect SB=nullrect TB=nullrect RB=nullrect PB=nullrect QB=nullrect IC=nullrect OC=nullrect AC=nullsound BC=nullsound CC=nullsound DC=nullsound EC=nullsound FC=nullsound GC=nullsound HC=nullsound ZC=nullsound VC=nullsound WC=nullsound XC=nullsound YC=nullsound JC=nullstring KC="Sound\\Music\\mp3Music\\Human1.mp3"string LC="Sound\\Music\\mp3Music\\Human2.mp3"string MC="Sound\\Music\\mp3Music\\Human3.mp3"sound NC=nullsound TC=nullsound RC=nullsound PC=nullsound QC=nullsound UC=nullsound OD=nullstring AD="Sound\\Music\\mp3Music\\NightElf1.mp3"string BD="Sound\\Music\\mp3Music\\NightElf2.mp3"string DD="Sound\\Music\\mp3Music\\NightElf3.mp3"sound ED=nullstring FD="Sound\\Music\\mp3Music\\Orc1.mp3"string GD="Sound\\Music\\mp3Music\\Orc2.mp3"string HD="Sound\\Music\\mp3Music\\Orc3.mp3"string ZD="Sound\\Music\\mp3Music\\BloodElfTheme.mp3"string VD="Sound\\Music\\mp3Music\\DarkAgents.mp3"string WD="Sound\\Music\\mp3Music\\TragicConfrontation.mp3"string XD="Sound\\Music\\mp3Music\\SadMystery.mp3"string YD="Sound\\Music\\mp3Music\\IllidansTheme.mp3"sound JD=nullsound KD=nullsound LD=nullsound MD=nullsound ND=nullsound TD=nullsound PD=nullsound QD=nullsound UD=nullsound IE=nullsound OE=nullsound AE=nullstring BE="Sound\\Music\\mp3Music\\Undead1.mp3"string CE="Sound\\Music\\mp3Music\\Undead2.mp3"string DE="Sound\\Music\\mp3Music\\Undead3.mp3"sound EE=nullsound FE=nullsound GE=nullsound HE=nullsound ZE=nullsound VE=nullsound WE=nullsound XE=nullsound YE=nullsound JE=nullsound KE=nullsound LE=nullsound ME=nullsound NE=nullsound SE=nullsound TE=nullsound RE=nullsound PE=nullsound QE=nullsound UE=nullsound IF=nullsound OF=nullsound AF=nullsound BF=nullsound CF=nullsound DF=nullsound EF=nullsound FF=nullstring GF="Sound\\Music\\mp3Music\\Tension.mp3"string HF="Sound\\Music\\mp3Music\\ArthasTheme.mp3"string ZF="Sound\\Music\\mp3Music\\NightElfDefeat.mp3"string VF="Sound\\Music\\mp3Music\\NightElfVictory.mp3"sound WF=nullsound XF=nullsound YF=nullsound JF=nullsound KF=nullsound LF=nullsound MF=nullsound NF=nullsound SF=nullsound TF=nullsound RF=nullsound PF=nullsound QF=nullsound UF=nulltrigger IG=nulltrigger OG=nulltrigger AG=nulltrigger BG=nulltrigger CG=nulltrigger DG=nulltrigger EG=nulltrigger FG=nulltrigger GG=nulltrigger HG=nulltrigger ZG=nulltrigger VG=nulltrigger WG=nulltrigger XG=nulltrigger YG=nulltrigger JG=nulltrigger KG=nulltrigger LG=nulltrigger MG=nulltrigger NG=nulltrigger SG=nulltrigger TG=nulltrigger RG=nulltrigger PG=nulltrigger QG=nulltrigger UG=nulltrigger IH=nulltrigger OH=nulltrigger BH=nulltrigger CH=nulltrigger DH=nulltrigger EH=nulltrigger FH=nulltrigger GH=nulltrigger HH=nulltrigger ZH=nulltrigger VH=nulltrigger WH=nulltrigger XH=nulltrigger YH=nulltrigger JH=nulltrigger KH=nulltrigger LH=nulltrigger MH=nulltrigger NH=nullunit TH=nullunit RH=nullunit PH=nullunit QH=nullunit UH=nullunit IZ=nullunit OZ=nullunit AZ=nullunit BZ=nullunit CZ=nullunit DZ=nullunit EZ=nullunit FZ=nullunit GZ=nullunit HZ=nullunit ZZ=nullunit VZ=nullunit WZ=nullunit XZ=nullunit YZ=nullunit JZ=nullunit KZ=nullunit LZ=nullunit MZ=nullunit NZ=nullunit SZ=nullunit TZ=nullunit RZ=nullunit PZ=nullunit QZ=nullunit UZ=nullunit IV=nullunit OV=nullunit AV=nullunit BV=nullunit CV=nullunit DV=nullunit EV=nullunit FV=nullunit GV=nullunit HV=nullunit ZV=nullunit VV=nullunit WV=nullunit XV=nullunit YV=nullunit JV=nullunit KV=nullunit LV=nullunit MV=nullunit NV=nullunit SV=nullunit TV=nullunit PV=nullunit QV=nullunit UV=nullunit IW=nullunit OW=nullunit AW=nullunit BW=nullunit CW=nullunit DW=nullunit EW=nullunit FW=nullunit GW=nullunit HW=nullunit ZW=nullunit VW=nullunit WW=nullunit XW=nullunit YW=nullunit JW=nullunit KW=nullunit LW=nullunit MW=nullunit SW=nullunit TW=nullunit RW=nullunit PW=nullunit QW=nullunit UW=nullunit IX=nullunit OX=nullunit AX=nullunit BX=nullunit CX=nullunit DX=nullunit EX=nullunit GX=nullunit HX=nullunit ZX=nullunit VX=nullunit WX=nullunit XX=nullunit YX=nullunit JX=nullunit KX=nullunit LX=nullunit MX=nullunit NX=nullunit SX=nullunit TX=nullunit RX=nullunit PX=nullunit QX=nullunit UX=nullunit IY=nullunit OY=nullunit AY=nullunit BY=nullunit CY=nullunit DY=nullunit EY=nullunit FY=nullunit GY=nullunit HY=nullunit ZY=nullunit VY=nullunit WY=nullhashtable XYstring YY=""unit array JYunit array KYunit array LYinteger MY=0destructable array NYdestructable array SYdestructable array TYinteger RY=0group array PYboolean array QYinteger UYinteger IJboolean OJ=falsetrigger array AJreal array BJinteger CJ=0boolean array DJreal array EJinteger array FJinteger array GJinteger HJ=0string array ZJinteger array VJinteger WJ=0string XJreal YJinteger JJ=0sound KJunit LJreal MJreal NJreal SJinteger TJinteger RJinteger PJreal QJreal UJreal IKreal OKreal AKreal BKunit CKunit DKunit EKitem FKtrigger GKgroup HKgroup ZKplayer VKboolean WKstring XKimage YK=nullunit JK=nullinteger KKboolean LK=truetrigger MKtrigger NKregion SKinteger TK=1boolean RK=falsetimer PKboolean QK=falseinteger UK=90boolean IL=falseboolean OL=falsestring AL="No Mode"boolean BL=falseboolean CL=trueboolean DL=falseboolean EL=falseboolean FL=falseboolean GL=falseinteger HLboolean ZL=falseinteger array VLboolean array WLinteger YL=0integer array JLinteger array KLinteger array LLinteger array MLinteger array SLinteger array TLinteger array RLinteger array PLinteger array QLinteger array ULboolean array IMboolean array AMboolean array BMboolean array FMunit GM=nullunit HM=nullboolean VM=falseplayer WM=nullplayer XM=nullboolean array YMinteger JMplayer KMtrigger SM=nullboolean TM=falseinteger RMinteger QMboolean UM=falseboolean IN=falsetrigger ONboolean AN=falseinteger BN=1093742670integer CN=1093686064integer DN=1093742671integer EN=1093742672boolean FN=falseinteger array GNregion HNregion ZNregion VNregion WNregion XNregion YNconstant real JN=150integer array KNinteger LN=0integer array MNinteger array NNinteger array SNinteger array TNinteger RN=0gamecache PNinteger array QNinteger array UNinteger array ISinteger array OSinteger array BStrigger CSinteger array DSinteger array ESinteger array FSboolean array HSinteger array ZSreal array VSweathereffect WSweathereffect XSrect YSboolean JS=falseconstant playercolor KS=ConvertPlayerColor(0)constant playercolor LS=ConvertPlayerColor(12)real MS=-7360real SS=-6688real TS=-6592real PS=-6464real QS=-7392real US=-6240real IT=-7392real OT=-6432real AT=-6592real BT=-6720real CT=-6816real DT=-5984real ET=-6944real FT=-5920real GT=-7072real HT=-5920real ZT=-7200real VT=-5920real WT=-7328real XT=-5984real YT=-7328real JT=-5984real KT=-5632real LT=-5952real MT=-6112real ST=1504real RT=-1504real PT=-1824real QT=4960real UT=-6752real IR=-6112real OR=-1312real BR=-3488real CR=-3296real DR=-544real GR=-6688real HR=-6496real ZR=-4832real WR=-4576real XR=-4832real YR=-4512real JR=-6752real KR=-5920real LR=-5984real SR=-5664real RR=-6240real PR=-6400real QR=-4224real UR=-4288real IP=-4992real OP=-3776real BP=-6720real DP=-5952real EP=-4160real FP=-4800real GP=-4608real ZP=-3776real VP=-6272real WP=-7136real XP=-4640real YP=-6496real JP=-5536real KP=-5088real LP=-5280real MP=-5920real TP=-4640real RP=-4832real PP=-4384real QP=-4128real UP=-5024real IQ=-5216real OQ=-6816real AQ=-4192real BQ=-7456real CQ=-4192real DQ=-6176real EQ=-5664real FQ=-3872real GQ=-5664real HQ=-3872real ZQ=-5440real VQ=-4800real WQ=-3840real XQ=-5184real YQ=-5440real JQ=-4800real KQ=-3840real LQ=-5184unit MQunit NQunit SQunit TQunit RQunit PQunit QQunit UQunit I00unit II0unit I10unit IO0unit I20unit I30unit I40unit I50unit I60unit I70unit I80unit I90unit IA0unit IB0unit IC0unit ID0unit IE0unit IF0unit IG0unit IH0unit IZ0unit IV0unit IW0unit IX0unit IY0unit IJ0unit IK0unit IL0unit IM0unit IN0unit IS0unit IT0unit IR0unit IP0unit IQ0unit IU0constant playercolor O00=ConvertPlayerColor(6)constant playercolor OI0=ConvertPlayerColor(12)real O10=6272real OO0=5504real O20=6464real O30=5120real O40=5952real O50=5568real O60=6080real O70=5568real O80=6464real O90=4736real OA0=5696real OB0=5120real OC0=5568real OD0=5248real OE0=5568real OF0=5376real OG0=5696real OH0=5504real OZ0=5568real OV0=5696real OW0=5568real OX0=5696real OY0=4992real OJ0=4544real OK0=-4704real OL0=5920real OM0=1056real ON0=-160real OS0=6048real OT0=-2080real OR0=32real OP0=5856real OQ0=2400real OU0=1696real A00=6112real AI0=-96real A10=3168real AO0=5920real A20=3616real A30=3296real A40=6048real A50=2784real A60=4640real A70=4576real A80=5088real A90=4192real AA0=3776real AB0=5888real AC0=4096real AD0=3392real AE0=6208real AF0=3264real AG0=3520real AH0=5376real AZ0=3776real AV0=3840real AW0=5696real AX0=3264real AY0=3168real AJ0=4000real AK0=4192real AL0=5536real AM0=4128real AN0=4512real AS0=4640real AT0=3680real AR0=4832real AP0=3104real AQ0=5408real AU0=2592real B00=5408real BI0=3296real B10=6112real BO0=4000real B20=3040real B30=5088real B40=6304real B50=3744real B60=6304real B70=3744real B80=3520real B90=4608real BA0=4096real BB0=2624real BC0=4096real BD0=2624real BE0=4096real BF0=2624unit BG0unit BH0unit BZ0unit BV0unit BW0unit BX0unit BY0unit BJ0unit BK0unit BL0unit BM0unit BN0unit BS0unit BT0unit BR0unit BP0unit BQ0unit BU0unit C00unit CI0unit C10unit CO0unit C20unit C30unit C40unit C50unit C60unit C70unit C80unit C90unit CA0unit CB0unit CC0unit CD0unit CE0unit CF0unit CG0unit CH0unit CZ0unit CV0unit CW0unit CX0unit CY0unit CJ0unit CK0unit CL0unit CM0unit CN0unit CS0unit CT0unit CR0unit CP0unit CQ0unit CU0unit array D00real array DI0real array D10player DO0player D20string array D30integer array D40integer array D50integer array D60integer array D70integer array D80integer D90integer DA0integer DB0integer DC0integer array DD0integer DE0integer array DF0integer DG0integer array DH0integer DZ0integer array DV0integer DW0integer array DX0integer DY0string array DJ0integer array DK0string array DL0string array DM0string array DN0string array DS0string array DT0unit DR0unit DP0unit DQ0unit DU0unit E00unit EI0unit E10unit EO0unit E20unit E30unit E40unit E50integer array E60integer E70=0integer array E80integer E90=-1boolean array EA0integer EB0=0integer EC0player ED0trigger EE0trigger EF0trigger EG0hashtable EH0timer array EZ0integer array EV0integer array EW0real array EX0integer array EY0integer array EJ0integer EK0=1constant real EL0=15player array EM0unit array EN0real array ES0boolean array ET0integer ER0=0unit array EP0real array EQ0boolean array EU0unit F00unit FI0integer F10integer FO0integer F20integer F30integer array F40integer array F50integer F60integer F70integer F80=0integer array F90integer array FA0integer FB0real FC0real FD0unit FE0=nullboolean FF0=trueinteger FG0=1integer FH0=600integer FZ0=360trigger FV0integer FW0=0leaderboard array FX0boolean array FY0integer array FJ0integer array FK0integer array FL0integer array FM0string array FN0integer array FS0integer array FT0integer FR0=0integer FP0integer FQ0integer FU0integer G00integer GI0integer G10integer GO0integer G20integer G30integer G40integer G50integer G60integer G70integer G80integer G90integer GA0integer GB0integer GC0integer GD0integer GE0integer GF0integer GG0integer GH0integer GZ0integer GV0integer GW0integer GX0integer GY0integer GJ0integer GK0integer GL0integer GM0integer GN0integer GS0integer GT0integer GR0integer GP0integer GQ0integer GU0integer H00integer HI0integer H10integer HO0integer H20integer H30integer H40integer H50integer H60integer H70integer H80integer H90integer HA0integer HB0integer HC0integer HD0integer HE0integer HF0integer HG0integer HH0integer HZ0integer HV0integer HW0integer HX0integer HY0integer HJ0integer HK0integer HL0integer HM0integer HN0integer HS0integer HT0integer HR0integer HP0integer HQ0integer HU0integer Z00integer ZI0integer Z10integer ZO0integer Z20integer Z30integer Z40integer Z50integer Z60integer Z70integer Z80integer Z90integer ZA0integer ZB0integer ZC0integer ZD0integer ZE0integer ZF0integer ZG0integer ZH0integer ZZ0integer ZV0integer ZW0integer ZX0integer ZY0integer ZJ0integer ZK0integer ZL0integer ZM0integer ZN0integer ZS0integer ZT0integer ZR0integer ZP0integer ZQ0integer ZU0integer V00integer VI0integer V10integer VO0integer V20integer V30integer V40integer V50integer V60integer V70integer V80integer V90integer VA0integer VB0integer VC0integer VD0integer VE0integer VF0integer VG0integer VH0integer VZ0integer VV0integer VW0integer VX0integer VY0integer VJ0integer VK0integer VL0integer VM0integer VN0integer VS0integer VT0integer VR0integer VP0integer VQ0integer VU0integer W00integer WI0integer W10integer WO0integer W20integer W30integer W40integer W50integer W60integer W70integer W80integer W90integer WA0integer WB0integer WC0integer WD0integer WE0integer WF0integer WG0integer WH0integer WZ0integer WV0integer WW0integer WX0integer WY0integer WJ0integer WK0integer WL0integer WM0integer WN0integer WS0integer WT0integer WR0integer WP0integer WQ0integer WU0integer X00integer XI0integer X10integer XO0integer X20integer X30integer X40integer X50integer X60integer X70integer X80integer X90integer XA0integer XB0integer XC0integer XD0integer XE0integer XF0integer XG0integer XH0integer XZ0integer XV0integer XW0integer XX0integer XY0integer XJ0integer XK0integer XL0integer XM0integer XN0integer XS0integer XT0integer XR0integer XP0integer XQ0integer XU0integer Y00integer YI0integer Y10integer YO0integer Y20integer Y30integer Y40integer Y50integer Y60integer Y70integer Y80integer Y90integer YA0integer YB0integer YC0integer YD0integer YE0integer YF0integer YG0integer YH0integer YZ0integer YV0integer YW0integer YX0integer YY0integer YJ0integer YK0integer YL0trigger YM0integer YN0=-1integer array YS0integer array YT0integer array YR0integer array YP0integer array YQ0integer array YU0integer array J00integer JI0=0integer J10integer JO0integer J20integer J30integer J40integer J50integer J60integer J70integer J80integer J90integer JA0integer JB0integer JC0integer JD0integer JE0integer JF0integer JG0integer JH0integer JZ0integer JV0integer JW0integer JX0integer JY0integer JJ0integer JK0integer JL0integer JM0integer JN0integer JS0integer JT0integer JR0integer JP0integer JQ0integer JU0integer K00integer KI0integer K10integer KO0integer K20integer K30integer K40integer K50integer K60integer K70integer K80integer K90integer KA0integer KB0integer KC0integer KD0integer KE0integer KF0integer KG0integer KH0integer KZ0integer KV0integer KW0integer KX0integer KY0integer KJ0integer KK0integer KL0integer array KM0integer array KN0integer array KS0integer array KT0integer array KR0integer array KP0integer array KQ0player KU0unit L00unit LI0integer L10boolean LO0=falseunit L20trigger L30integer L40=0integer L50=0integer L60=0integer L70=0integer L80=0integer L90=0integer LA0=0integer LB0=0integer LC0=0integer LD0=0integer array LE0boolean LF0=falsetrigger LG0trigger LH0real array LZ0item array LV0integer LW0=0trigger LX0unit array LY0unit LJ0=nullinteger array LK0integer array LL0constant real LM0=16constant real LN0=5constant real LS0=15constant real LT0=4constant real LR0=40integer array LP0unit LQ0boolean LU0=falseconstant real M00=17real array MI0real array M10player array MO0real array M20real array M30real array M40integer M50=-1constant real M60=25constant real M70=575region M80integer M90integer MA0=1093742918integer MB0=1093742917integer MC0=1093686067integer MD0=1093742916integer ME0=1093742919integer MF0=1093742920integer MG0=1093815369integer MH0=1093742914integer MZ0=1093742913integer MV0=1093686066integer MW0=1093742905integer MX0=1093742915integer MY0=1093742904integer MJ0=1093815368integer MK0=1093682777unit ML0unit MM0integer MN0group MS0unit MT0unit MR0player MP0boolean MQ0=falseboolean MU0=falseconstant real N00=5boolean NI0=falsereal N10boolean NO0=falseboolean array N20constant real N30=8constant real N40=6player N50constant real N60=25constant real N70=4constant real N80=4boolean N90=falseboolean NA0=falseboolean NB0=falseboolean NC0=falseboolean ND0=falseboolean NE0=falseboolean NF0=falseboolean NG0=falseboolean NH0=falseinteger array NZ0integer array NV0integer array NW0integer NX0=0integer NY0integer NJ0integer NK0=0integer NL0=0string NM0="|c00ff0303"string NN0="|c00ff0303"string NS0="|c000042ff"string NT0="|c00646464"string NR0="|c00ffffff"multiboard NP0integer array NQ0integer array NU0player array S00integer SI0=0string S10="|c00FF6600"multiboard SO0trigger S20real S30=0real S40=0real S50=0real S60=0real S70=0real S80=0real S90=0real SA0=0real SB0=0real SC0=0real SD0=0real SE0=0real SF0=0real SG0=0real SH0=0real SZ0=0real SV0=0real SW0=0real SX0=0real SY0=0real SJ0=0real SK0=0real SL0=0real SM0=0real SN0=0real SS0=0real ST0=0real SR0=0real SP0=0real SQ0=0constant real SU0=90boolean T00=falseboolean TI0=falseboolean T10=falseboolean TO0=falseboolean T20=falseboolean T30=falseboolean T40=falseboolean T50=falseboolean T60=falseunit T70=nullunit T80=nullgroup T90boolean TA0=trueboolean TB0=falseinteger TC0=0string array TD0boolean TE0=falseinteger TF0player TG0integer TH0integer TZ0=1093683285integer TV0=1093683288trigger TW0region TX0boolean TY0=falseboolean TJ0=falseboolean TK0=falseboolean TL0=falseboolean TM0=falseunit array TN0group TS0unit TT0integer TR0integer TP0=0integer array TQ0integer array TU0boolean array R00boolean array RI0boolean array R10boolean RO0=trueboolean array R20real R30=-200boolean array R40leaderboard array R50boolean array R60boolean R70=trueweathereffect R80boolean array R90boolean array RA0boolean array RB0boolean RC0=trueboolean array RD0string array RE0integer RF0=0string RG0="Sound\\Music\\mp3Music\\PH1.mp3"boolean array RH0integer RZ0integer RV0integer RW0string array RX0boolean array RY0integer RJ0=0boolean RK0=trueinteger array RL0boolean array RM0constant real RN0=-6950constant real RS0=6750boolean RT0=falsetrigger RR0boolean RP0=falseinteger array RQ0boolean RU0boolean P00=falseboolean PI0=falseinteger array P10integer PO0player P20integer P30integer P40player P50player P60integer P70integer P80integer array P90integer array PA0integer PB0=0integer PC0=0integer array PD0integer array PE0integer PF0=0integer PG0=0multiboard PH0image PZ0image PV0image PW0image PX0unit array PY0integer array PJ0boolean array PK0unit array PL0real array PM0real array PN0real array PS0real array PT0real array PR0real array PP0real array PQ0real array PU0real Q00=-7030real QI0=6966real Q10=-7000real QO0=6875constant real Q20=400constant real Q30=75constant real Q40=125player Q50=nullplayer Q60=nullinteger Q70boolean Q80=falseboolean Q90=falseboolean array QA0real QB0real QC0real QD0real QE0unit array QF0integer QG0=0trigger QH0unit array QZ0unit array QV0boolean QW0=falsetrigger QX0integer array QY0unit array QJ0unit array QK0integer QL0=0unit array QM0integer QN0integer QS0integer array QT0integer QR0boolean array QP0integer array QQ0integer array QU0integer U00=0integer UI0=0real array U10real array UO0real array U20real array U30integer array U40boolean U50=trueimage U60image U70image U80image U90image UA0image UB0image UC0image UD0image UE0image UF0image UG0image UH0image UZ0image UV0image UW0image UX0constant real UY0=450constant real UJ0=75constant real UK0=140boolean UL0=falseboolean UM0=falseinteger array UN0integer array US0integer array UT0integer array UR0integer array UP0integer array UQ0integer array UU0integer I0Iinteger IIIinteger I1Istring IOI="|c008A2BE2Option 1: |r"string I2I="|c008A2BE2Option 2: |r"string I3I="|c008A2BE2Option 3: |r"integer I4Iinteger array I5Iboolean I6I=falseboolean I7I=falseleaderboard I8Iinteger I9Iinteger array IAIboolean IBI=falseboolean ICI=falseleaderboard IDIboolean IEI=falseboolean IFI=falseboolean IGI=falseboolean IHI=falseboolean IZI=trueboolean IVI=falseboolean IWI=falseboolean IXI=falseboolean IYI=falseboolean IJI=falseboolean IKI=falsereal ILI=1.0boolean IMI=falseboolean INI=falseboolean ISI=falsecamerasetup ITI=nullboolean IRI=falseunit IPIunit IQIunit IUIunit O0Iunit OIIunit O1Ireal OOIreal O2Ireal O3Ireal O4Ireal O5Ireal O6Iboolean O7I=falsereal array O8Iunit array O9Iunit array OAIinteger array OBIinteger array OCItrigger ODI=CreateTrigger()boolean array OEIplayer OFIboolean OGI=falseboolean OHI=falseboolean OZI=falseitem OVI=nullitem OWI=nullboolean OXI=falseboolean OYI=falseunit OJIunit OKIunit OLIunit OMIunit ONIconstant real OSI=-2576constant real OTI=1818constant real ORI=2337constant real OPI=-2004constant real OQI=2500constant real OUI=-2177constant real A0I=2706constant real AII=-2356constant real A1I=2935constant real AOI=-2526group A2Iunit A3Iinteger A4Iunit A5Iunit A6Ireal A7Ireal A8Iinteger array A9Ireal AAIunit ABIboolean ACIboolean ADIinteger AEI=0integer AFIunit AGIreal AHIunit AZIunit AVIinteger AWIreal AXIunit AYIinteger AJIboolean AKIunit ALIinteger AMIunit ANIinteger ASIunit ATIreal ARIunit APIreal AQIinteger AUIinteger B0Iunit BIIreal B1Iunit array BOIunit array B2Iinteger B3Iunit B4Iinteger B5Iinteger B6Ireal B7Ireal B8Iunit B9Iunit array BAIreal BBIreal BCIinteger BDIinteger BEIunit BFIreal BGIreal BHIreal BZIunit BVIinteger array BWIunit array BXIunit BYIinteger BJIgroup BKIunit BLIreal BMIinteger BNIunit BSIinteger BTIunit BRIreal BPIreal BQIreal BUIinteger C0I=0real CIIreal C1Iinteger COIreal C2Iunit C3Iinteger array C4Iinteger array C5Iunit C6Iunit C7Igroup C8Igroup C9Igroup CAIunit CBIgroup CCIinteger CDI=0unit CEIinteger array CFIinteger array CGIinteger array CHIinteger array CZIinteger array CVIunit CWIunit CXIunit CYIreal CJIreal CKIreal CLIunit CMIreal CNIreal CSIreal CTIunit CRIunit CPIreal CQIinteger array CUIunit D0Iunit DIIunit D1Ireal DOIinteger array D2Iinteger D3Iunit D4Iinteger D5Iunit D6Iinteger D7Iinteger D8Iinteger D9Iunit DAIunit DBIreal DCIreal DDIreal DEIreal DFIgroup DGIunit DHIreal DZIinteger DVIinteger DWIinteger DXIunit array DYIboolean DJI=falseboolean DKI=falsetrigger DLIinteger DMIplayer DNIinteger DSIunit DTIreal DRIunit DPIunit DQIreal DUIreal E0Iinteger EIIunit E1Iunit EOIunit E2Igroup E3Iinteger E4Igroup E5Iunit E6Ireal E7Iinteger E8Idestructable E9I=nullunit EAI=nullreal EBI=0constant real ECI=26constant real EDI=550constant real EEI=500real EFIreal EGIgroup EHIunit EZIreal EVIinteger EWIinteger EXIunit EYIinteger EJIunit EKIinteger ELIboolean EMI=falsetrigger ENIinteger ESIunit ETIinteger ERIinteger array EPIinteger array EQIinteger array EUIinteger array F0Iunit FIIunit F1Iinteger FOIreal F2Ireal F3Iunit F4Iunit F5Iboolean F6I=falseinteger F7Iunit F8Iinteger array F9Iinteger array FAIinteger array FBIinteger array FCIgroup FDIgroup FEIunit FFIinteger FGIunit array FHIunit array FZIinteger FVI=1747990090real FWIreal FXIunit FYIunit FJIunit FKIreal FLIreal FMIreal FNIinteger FSIreal FTIreal FRIunit FPIunit FQIinteger FUIgroup G0Iunit GIIunit G1Iinteger GOIinteger G2Iplayer G3Iinteger G4Iunit array G5Iinteger G6Iinteger G7Iconstant real G8I=55group G9Iinteger GAIunit GBIunit GCIunit GDIconstant real GEI=7integer array GFIconstant real GGI=1constant real GHI=4real GZIunit GVIinteger array GWIgroup GXIunit GYIinteger GJIboolean GKIinteger array GLItrigger GMItrigger GNIinteger GSI=0boolean GTI=falseunit GRIunit GPIgroup GQIreal GUIunit H0Ireal HIIinteger H1Iinteger HOIreal H2Ireal H3Iunit H4Iunit H5Iunit H6Igroup H7Ireal H8Iunit H9Igroup HAIconstant real HBI=6unit HCIinteger HDIunit HEIinteger HFIinteger HGI=1093678422boolean HHI=falseunit HZIunit HVIconstant real HWI=7constant real HXI=300unit HYIreal HJIunit HKIreal HLIunit HMIreal HNIunit HSIinteger array HTIinteger array HRIgroup HPIinteger HQIunit HUIreal Z0Iinteger array ZIIinteger array Z1Ireal ZOIunit Z2Iunit Z3Ireal Z4Iinteger Z5Iunit array Z6Iunit Z7Iunit Z8Ireal Z9Iunit ZAIunit ZBIinteger ZCIreal ZDIgroup ZEI=nullconstant real ZFI=3unit ZGIunit ZHIunit ZZIreal ZVIgroup ZWIinteger ZXIunit ZYIconstant real ZJI=6unit ZKIinteger ZLIunit ZMIreal ZNIinteger ZSIunit ZTIunit ZRIreal ZPIreal ZQIconstant real ZUI=4unit array V0Iboolean VII=falseunit V1Iinteger VOIreal array V2Ireal array V3Ireal array V4Iunit array V5Iinteger array V6Iinteger array V7Iconstant real V8I=17integer V9Iunit VAIinteger VBIunit VCIunit VDIgroup VEIinteger VFIunit VGIunit VHIinteger VZIreal VVIgroup VWIunit VXIunit VYIreal VJIreal VKIreal VLIconstant real VMI=1300constant real VNI=20constant real VSI=20constant real VTI=20integer VRIunit VPIgroup VQIreal VUIreal W0Iunit WIIunit W1Igroup WOIinteger array W2Iconstant real W3I=20unit W4Iunit W5Ireal W6Ireal W7Ireal W8Ireal W9Iconstant real WAI=325unit WBIunit WCIinteger WDIreal WEIunit WFIboolean WGI=falseboolean WHI=falseunit WZIunit WVIreal WWIunit WXIinteger WYIinteger WJIunit WKIgroup WLIreal WMIinteger WNIregion WSIregion WTIunit WRIunit WPIinteger WQIgroup WUIgroup X0Igroup XIIunit X1Iunit XOIunit X2Iunit X3Iinteger X4Ireal X5Ireal X6Ireal X7Iinteger X8Iunit X9Iunit XAIunit XBIunit XCIgroup XDIreal XEIinteger array XFIinteger XGI=0integer array XHIinteger array XZIinteger XVI=0integer XWIunit XXIinteger XYIinteger XJIunit XKIreal XLIreal XMIreal XNIunit XSIinteger array XTIboolean XRI=trueunit XPIinteger XQIunit XUIgroup Y0Ireal YIIgroup Y1Ireal array YOIinteger array Y2Iinteger array Y3Iinteger Y4Iinteger Y5Iinteger Y6Iunit Y7Iinteger Y8Iinteger Y9Isound YAI=nullboolean YBI=falseconstant real YCI=300integer YDIinteger YEIinteger array YFIconstant real YGI=200constant real YHI=200group YZIunit YVIinteger YWIconstant real YXI=20integer YYIunit YJIinteger YKIunit YLIunit YMIreal YNI=1.35real YSI=500group YTItrigger YRIunit YPIunit YQI=nullconstant real YUI=6constant real J0I=6unit JIIinteger J1Iunit JOIinteger J2Iunit J3Iunit J4Iinteger J5Itrigger J6I=nullconstant real J7I=50integer J8Iinteger J9Iunit JAIreal JBIreal JCIconstant real JDI=1000group JEIunit JFIinteger JGIreal JHIreal JZIinteger JVIconstant real JWI=30constant real JXI=800unit JYIunit JJIgroup JKIinteger JLIinteger array JMIboolean JNIreal JSIinteger JTIunit JRIconstant real JPI=1200group JQIunit JUIunit K0Iinteger KIIreal K1Iinteger KOIinteger K2Iunit K3Iunit K4Iinteger K5Ireal K6Iunit K7Iunit K8Iunit K9Iboolean KAIinteger KBIconstant real KCI=55group KDIunit KEIunit KFItimer KGI=nullreal KZI=0.real KVI=0.force KXI=nullboolexpr KYI=nullendglobalsfunction KKI takes real KLI returns nothinglocal real KMIlocal real st=TimerGetElapsed(KGI)if st<=0 thenset KGI=CreateTimer()call TimerStart(KGI,1000000,false,null)endifif(KLI>0)thenloopset KMI=KLI-TimerGetElapsed(KGI)+stexitwhen KMI<=0if(KMI>bj_POLLED_WAIT_SKIP_THRESHOLD)thencall TriggerSleepAction(0.1*KMI)elsecall TriggerSleepAction(bj_POLLED_WAIT_INTERVAL)endifendloopendifendfunctionfunction KNI takes location KSI,real KTI,real KRI returns locationreturn Location(GetLocationX(KSI)+KTI*Cos(KRI*bj_DEGTORAD),GetLocationY(KSI)+KTI*Sin(KRI*bj_DEGTORAD))endfunctionfunction KPI takes nothing returns booleanlocal real dx=GetDestructableX(GetFilterDestructable())-KZIlocal real dy=GetDestructableY(GetFilterDestructable())-KVIreturn(dx*dx+dy*dy<=bj_enumDestructableRadius)endfunctionfunction KQI takes player KUI returns forceset KXI=CreateForce()call ForceEnumEnemies(KXI,KUI,KYI)return KXIendfunctionfunction L0I takes itemtype LII,integer L1I returns nothinglocal group gset bj_stockPickedItemType=LIIset bj_stockPickedItemLevel=L1Iset g=CreateGroup()call GroupEnumUnitsOfType(g,"marketplace",KYI)call ForGroup(g,function UpdateEachStockBuildingEnum)call DestroyGroup(g)set g=nullendfunctionfunction LOI takes nothing returns nothinglocal integer pickedItemIdlocal itemtype L2Ilocal integer L3I=0local integer L4I=0local integer L1Iset L1I=1loopif(bj_stockAllowedPermanent[L1I])thenset L4I=L4I+1if(GetRandomInt(1,L4I)==1)thenset L2I=ITEM_TYPE_PERMANENTset L3I=L1Iendifendifif(bj_stockAllowedCharged[L1I])thenset L4I=L4I+1if(GetRandomInt(1,L4I)==1)thenset L2I=ITEM_TYPE_CHARGEDset L3I=L1Iendifendifif(bj_stockAllowedArtifact[L1I])thenset L4I=L4I+1if(GetRandomInt(1,L4I)==1)thenset L2I=ITEM_TYPE_ARTIFACTset L3I=L1Iendifendifset L1I=L1I+1exitwhen L1I>10endloopif(L4I==0)thenset L2I=nullreturnendifcall L0I(L2I,L3I)set L2I=nullendfunctionfunction L5I takes nothing returns nothingcall LOI()call TimerStart(bj_stockUpdateTimer,bj_STOCK_RESTOCK_INTERVAL,true,function LOI)endfunctionfunction L7I takes nothing returns booleanreturn trueendfunctionfunction LGI takes nothing returns nothingcall DisplayTimedTextToPlayer(GetEnumPlayer(),0,U2,YJ,XJ)endfunctionfunction LHI takes force LZI,real KLI,string LVI returns nothingset XJ=LVIset YJ=KLIcall ForForce(LZI,function LGI)endfunctionfunction LWI takes nothing returns booleanreturn trueendfunctionfunction InitializeHashtable takes nothing returns nothingset XY=InitHashtable()endfunctionfunction HLC_GetCommandString takes nothing returns stringreturn YYendfunctionfunction LXI takes nothing returns nothinglocal integer ilocal integer jlocal integer hlocal integer vlocal string LYI="abcdefghijklmnopqrstuvwxyz0123456789 -=,."local integer array LJIlocal boolean array LKIset LKI[0]=trueset LKI[50]=trueset LKI[60]=trueset LKI[70]=trueset LKI[80]=trueset LKI[90]=trueset LKI[100]=trueset i=0set j=0loopif LKI[j]thenset j=j+1endifexitwhen j>=256set LJI[j]=iset i=i+1set j=j+1endloopset i=0loopexitwhen i>=12set h=R2I(100*GetPlayerHandicap(Player(i)))if not LKI[h]thenset h=LJI[h]set v=h/6set h=h-v*6call SetPlayerHandicap(Player(i),1)set YY=YY+SubString(LYI,v,v+1)endifset i=i+1endloopendfunctionfunction LLI takes multiboard LMI,integer c,integer r,string LNI returns nothinglocal multiboarditem LSI=nullset LSI=MultiboardGetItem(LMI,r-1,c-1)call MultiboardSetItemValue(LSI,LNI)call MultiboardReleaseItem(LSI)set LSI=nullendfunctionfunction LTI takes multiboard LMI,integer c,integer r,string LRI returns nothinglocal multiboarditem LSI=nullset LSI=MultiboardGetItem(LMI,r-1,c-1)call MultiboardSetItemIcon(LSI,LRI)call MultiboardReleaseItem(LSI)set LSI=nullendfunctionfunction LPI takes multiboard LMI,integer c,integer r,boolean LQI,boolean LUI returns nothinglocal multiboarditem LSI=nullset LSI=MultiboardGetItem(LMI,r-1,c-1)call MultiboardSetItemStyle(LSI,LQI,LUI)call MultiboardReleaseItem(LSI)set LSI=nullendfunctionfunction M0I takes multiboard LMI,integer c,integer r,real MII,real M1I,real MOI,real M2I returns nothinglocal multiboarditem LSI=nullset LSI=MultiboardGetItem(LMI,r-1,c-1)call MultiboardSetItemValueColor(LSI,PercentTo255(MII),PercentTo255(M1I),PercentTo255(MOI),PercentTo255(100.0-M2I))call MultiboardReleaseItem(LSI)set LSI=nullendfunctionfunction M3I takes multiboard LMI,integer c,integer r,real M4I returns nothinglocal multiboarditem LSI=nullset LSI=MultiboardGetItem(LMI,r-1,c-1)call MultiboardSetItemWidth(LSI,M4I/100)call MultiboardReleaseItem(LSI)set LSI=nullendfunctionfunction TI_RequestBugReport takes nothing returns nothinglocal integer i=0if Q2==false and TL0==false thenloopcall DisplayTimedTextToPlayer(Player(i),0,0,120,"|c00ff0303An internal index has failed|r")call DisplayTimedTextToPlayer(Player(i),0,0,120,"|c00ff0303This might not be a serious glitch, but it is important for me to get it|r")call DisplayTimedTextToPlayer(Player(i),0,0,120,"|c00ff0303Please send me the replay for this game to IceFrog@gmail.com|r")set i=i+1exitwhen i==12endloopendifendfunctionfunction M5I takes integer i returns nothingif i>16000 thenset LY[i-16000]=nullelseif i>8000 thenset KY[i-8000]=nullelseset JY[i]=nullendifendfunctionfunction M6I takes integer i returns unitif i>16000 thenreturn LY[i-16000]elseif i>8000 thenreturn KY[i-8000]elsereturn JY[i]endifendfunctionfunction M7I takes integer i returns destructableif i>16000 thenreturn TY[i-16000]elseif i>8000 thenreturn SY[i-8000]elsereturn NY[i]endifreturn NY[i]endfunctionfunction M8I takes unit u returns integerset MY=MY+1if MY>16000 thenset LY[MY-16000]=uelseif MY>8000 thenset KY[MY-8000]=uelseset JY[MY]=uendifreturn MYendfunctionfunction M9I takes integer i returns nothingif i>16000 thenset TY[i-16000]=nullelseif i>8000 thenset SY[i-8000]=nullelseset NY[i]=nullendifendfunctionfunction MAI takes destructable d returns integerset RY=RY+1if RY>24000 thenset TY[RY-16000]=delseif RY>8000 thenset SY[RY-8000]=delseset NY[RY]=dendifreturn RYendfunctionfunction GetTime takes nothing returns realreturn TimerGetElapsed(M)endfunctionfunction MBI takes unit u returns booleanreturn GetUnitAbilityLevel(u,1110458953)>0 or GetUnitAbilityLevel(u,1112437619)>0 or GetUnitAbilityLevel(u,1110459734)>0endfunctionfunction MCI takes group g returns nothinglocal integer i=GetHandleId(g)-UYif i<0 or i>120 thenset OJ=trueelsecall GroupClear(g)set QY[i]=falseset IJ=iendifendfunctionfunction MDI takes nothing returns grouplocal integer i=IJloopexitwhen i==IJ-1if QY[i]==false thenset IJ=i+1if IJ==120 thenset IJ=0endifset QY[i]=truereturn PY[i]endifset i=i+1if i==120 thenset i=0endifendloopcall LHI(P2,5.00,"|c00ff0303CRITICAL ERROR: FOUND NO AVAILABLE GROUPS|r")call LHI(P2,5.00,"|c00ff0303Send this replay to IceFrog@gmail.com|r")return CreateGroup()endfunctionfunction MEI takes nothing returns booleanlocal integer MFI=0local integer i=0loopexitwhen i==120if QY[i]==true thenset MFI=MFI+1endifset i=i+1endloopif MFI>100 or OJ thencall LHI(P2,5.00,"|c00ff0303Please send me this replay ("+I2S(MFI)+")")endifreturn falseendfunctionfunction MGI takes nothing returns nothinglocal integer i=0set IJ=0set PY[i]=CreateGroup()set QY[i]=falseset i=i+1set UY=GetHandleId(PY[0])loopexitwhen i==120set PY[i]=CreateGroup()set QY[i]=falseset i=i+1endloopendfunctionfunction MHI takes nothing returns nothinglocal integer i=0if Q2==false and TL0==false thenloopcall DisplayTimedTextToPlayer(Player(i),0,0,120,"|c00ff0303An internal checksum has failed|r")call DisplayTimedTextToPlayer(Player(i),0,0,120,"|c00ff0303This might not be a serious glitch, but it is important for me to get it|r")call DisplayTimedTextToPlayer(Player(i),0,0,120,"|c00ff0303Please send me the replay for this game to IceFrog@gmail.com|r")set i=i+1exitwhen i==12endloopendifendfunctionfunction CleanTrigger_GetTime takes nothing returns realreturn TimerGetElapsed(M)endfunctionfunction MZI takes trigger t returns nothingcall DisableTrigger(t)set CJ=CJ+1set AJ[CJ]=tset BJ[CJ]=(TimerGetElapsed(M))+60if CJ>8000 thencall MHI()endifendfunctionfunction MVI takes integer i returns nothingif i!=CJ thenset AJ[i]=AJ[CJ]set BJ[i]=BJ[CJ]endifset AJ[CJ]=nullset BJ[CJ]=0set CJ=CJ-1endfunctionfunction MWI takes nothing returns booleanlocal real MXI=(TimerGetElapsed(M))local integer iset i=1loopexitwhen i>CJif BJ[i]<MXI thenif AJ[i]==null or IsTriggerEnabled(AJ[i])==true thencall MHI()elsecall DestroyTrigger(AJ[i])endifcall MVI(i)elseset i=i+1endifendloopreturn falseendfunctionfunction MJI takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)call SaveInteger(XY,(GetHandleId(((LoadTriggerHandle(XY,(MKI),(35)))))),(((LoadInteger(XY,(MKI),(33))))),(2))call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullreturn falseendfunctionfunction MLI takes trigger t,integer MMI,real KLI returns nothinglocal trigger t2=CreateTrigger()call TriggerAddCondition(t2,Condition(function MJI))call TriggerRegisterTimerEvent(t2,KLI,false)call SaveInteger(XY,(GetHandleId((t))),((MMI)),(1))call SaveTriggerHandle(XY,(GetHandleId(t2)),(35),(t))call SaveInteger(XY,(GetHandleId(t2)),(33),(MMI))set t2=nullendfunctionfunction MNI takes unit u returns stringif u==null thenreturn GetObjectName(1848654164)endifreturn GetObjectName(D80[GetUnitPointValue(u)])endfunctionfunction MSI takes integer i returns stringif i==0 thenreturn GetObjectName(1848654164)endifreturn GetObjectName(D80[i])endfunctionfunction MTI takes unit u returns stringif u==null thenreturn"UI\\Widgets\\Console\\Undead\\undead-inventory-slotfiller.blp"endifreturn DJ0[GetUnitPointValue(u)]endfunctionfunction MRI takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)call SaveInteger(XY,(GetHandleId(((LoadUnitHandle(XY,(MKI),(14)))))),(((LoadInteger(XY,(MKI),(33))))),(2))call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullreturn falseendfunctionfunction MPI takes unit MQI,integer MMI,real KLI returns nothinglocal trigger t=CreateTrigger()call TriggerAddCondition(t,Condition(function MRI))call TriggerRegisterTimerEvent(t,KLI,false)call SaveInteger(XY,(GetHandleId((MQI))),((MMI)),(1))call SaveUnitHandle(XY,(GetHandleId(t)),(14),(MQI))call SaveInteger(XY,(GetHandleId(t)),(33),(MMI))set t=nullendfunctionfunction MUI takes unit N0I returns integerlocal integer xlocal integer id=GetUnitTypeId(N0I)set x=1loopexitwhen x>DE0if id==DD0[x]thenreturn 2endifset x=x+1endloopset x=1loopexitwhen x>DG0if id==DF0[x]thenreturn 3endifset x=x+1endloopset x=1loopexitwhen x>DZ0if id==DH0[x]thenreturn 1endifset x=x+1endloopif id==1164277357 or id==1160786518 or id==1160786519 or id==1160786517 or id==1311781442 or id==1311781175 or id==1211119684 or id==1211119683 or id==1211119668 or id==1211119682 or id==1311781171 or id==1311781172 or id==1311781173 or id==1160786511 or id==1311788365 thenreturn 2endifif id==1311781192 or id==1311781204 or id==1311781194 or id==1211117637 or id==1211117639 or id==1211117638 or id==1211119433 or id==1160786229 or id==1211122513 or id==1211122995 or id==1211122996 or id==1211122997 or id==1429221720 or id==1311788375 thenreturn 3endifif id==1211119192 or id==1211119193 or id==1211119191 or id==1211122243 or id==1328558391 or id==1311788354 or id==1311788355 or id==1311788367 or id==1311788353 thenreturn 1endifreturn 0endfunctionfunction NII takes integer id returns integerlocal integer xset x=1loopexitwhen x>DE0if id==DD0[x]thenreturn 2endifset x=x+1endloopset x=1loopexitwhen x>DG0if id==DF0[x]thenreturn 3endifset x=x+1endloopset x=1loopexitwhen x>DZ0if id==DH0[x]thenreturn 1endifset x=x+1endloopif id==1164277357 or id==1160786518 or id==1160786519 or id==1160786517 or id==1311781442 or id==1311781175 or id==1211119684 or id==1211119683 or id==1211119668 or id==1211119682 or id==1311781171 or id==1311781172 or id==1311781173 or id==1160786511 or id==1311788365 thenreturn 2endifif id==1311781192 or id==1311781204 or id==1311781194 or id==1211117637 or id==1211117639 or id==1211117638 or id==1211119433 or id==1160786229 or id==1211122513 or id==1211122995 or id==1211122996 or id==1211122997 or id==1429221720 thenreturn 3endifif id==1211119192 or id==1211119193 or id==1211119191 or id==1211122243 or id==1328558391 or id==1311788354 or id==1311788355 or id==1311788367 or id==1311788353 thenreturn 1endifreturn 0endfunctionfunction N1I takes unit N0I returns integerlocal integer NOI=MUI(N0I)if NOI==1 thenreturn GetHeroInt(N0I,true)endifif NOI==2 thenreturn GetHeroAgi(N0I,true)endifif NOI==3 thenreturn GetHeroStr(N0I,true)endifreturn 0endfunctionfunction N2I takes unit N3I returns booleanreturn GetUnitState(N3I,UNIT_STATE_LIFE)<1 or DJ[GetPlayerId(GetOwningPlayer(N3I))]==trueendfunctionfunction N5I takes integer N6I,real N7I,integer N8I returns nothingset HJ=HJ+1set EJ[HJ]=N7Iset FJ[HJ]=N6Iset GJ[HJ]=N8Iendfunctionfunction N9I takes unit u returns reallocal integer N6I=GetUnitTypeId(u)local integer i=1loopexitwhen i>HJif FJ[i]==N6I or GJ[i]==N6I thenreturn EJ[i]endifset i=i+1endloopreturn 1.0endfunctionfunction NAI takes integer NBI,string NCI returns nothingset WJ=WJ+1set ZJ[WJ]=NCIset VJ[WJ]=NBIendfunctionfunction NDI takes unit u returns stringlocal integer NBI=GetUnitTypeId(u)local integer i=1loopexitwhen i>WJif VJ[i]==NBI thenreturn ZJ[i]endifset i=i+1endloopreturn"stand"endfunctionfunction NEI takes unit u returns nothingif GetUnitTypeId(u)==1311781193 thencall SetUnitAnimationByIndex(u,6)elsecall SetUnitAnimation(u,NDI(u))endifendfunctionfunction NFI takes integer NGI returns integerif NGI==1 thenreturn 25elseif NGI==2 thenreturn 41elseif NGI==3 thenreturn 62elseif NGI==4 thenreturn 88elseif NGI==5 thenreturn 119elseif NGI==6 thenreturn 155elseif NGI<=25 thenreturn R2I(2.5*NGI*NGI+8.5*NGI+14)endifreturn R2I(2.5*25*25+8.5*25+14)endfunctionfunction NHI takes player p returns integerlocal integer iset i=1if p==BO[i]or p==CO[i]thenreturn iendifset i=2if p==BO[i]or p==CO[i]thenreturn iendifset i=3if p==BO[i]or p==CO[i]thenreturn iendifset i=4if p==BO[i]or p==CO[i]thenreturn iendifset i=5if p==BO[i]or p==CO[i]thenreturn iendifreturn 0endfunctionfunction NZI takes player NVI returns booleanif(NVI==BO[0])thenreturn trueendifif(NVI==BO[1])thenreturn trueendifif(NVI==BO[2])thenreturn trueendifif(NVI==BO[3])thenreturn trueendifif(NVI==BO[4])thenreturn trueendifif(NVI==BO[5])thenreturn trueendifreturn falseendfunctionfunction NWI takes player NVI returns booleanif(NVI==CO[0])thenreturn trueendifif(NVI==CO[1])thenreturn trueendifif(NVI==CO[2])thenreturn trueendifif(NVI==CO[3])thenreturn trueendifif(NVI==CO[4])thenreturn trueendifif(NVI==CO[5])thenreturn trueendifreturn falseendfunctionfunction NXI takes player p returns booleanreturn p==BO[1]or p==BO[2]or p==BO[3]or p==BO[4]or p==BO[5]or p==CO[1]or p==CO[2]or p==CO[3]or p==CO[4]or p==CO[5]endfunctionfunction NYI takes player NJI returns booleanif(GetPlayerSlotState(NJI)==PLAYER_SLOT_STATE_PLAYING)thenif(GetPlayerController(NJI)==MAP_CONTROL_USER)thenreturn trueendifendifreturn falseendfunctionfunction NKI takes player NJI returns booleanif(GetPlayerSlotState(NJI)==PLAYER_SLOT_STATE_PLAYING or GetPlayerSlotState(NJI)==PLAYER_SLOT_STATE_LEFT)thenif(GetPlayerController(NJI)==MAP_CONTROL_USER)thenreturn trueendifendifreturn falseendfunctionfunction NLI takes player NJI returns booleanif GetPlayerSlotState(NJI)==PLAYER_SLOT_STATE_LEFT thenif(GetPlayerController(NJI)==MAP_CONTROL_USER)thenreturn trueendifendifreturn falseendfunctionfunction NMI takes nothing returns nothingif(NYI(GetEnumPlayer())==true)thenset bj_forceCountPlayers=bj_forceCountPlayers+1endifendfunctionfunction NNI takes force f returns integerset bj_forceCountPlayers=0call ForForce(f,function NMI)return bj_forceCountPlayersendfunctionfunction CountHumanPlayers takes nothing returns nothingif GetPlayerSlotState(GetEnumPlayer())==PLAYER_SLOT_STATE_LEFT or GetPlayerSlotState(GetEnumPlayer())==PLAYER_SLOT_STATE_PLAYING thenset bj_forceCountPlayers=bj_forceCountPlayers+1endifendfunctionfunction NSI takes nothing returns nothingif GetPlayerSlotState(GetEnumPlayer())==PLAYER_SLOT_STATE_PLAYING thenif GetEnumPlayer()!=Player(13)and GetEnumPlayer()!=Player(14)thenset bj_forceCountPlayers=bj_forceCountPlayers+1endifendifendfunctionfunction NTI takes force f returns integerset bj_forceCountPlayers=0call ForForce(f,function NSI)return bj_forceCountPlayersendfunctionfunction NRI takes integer MQI,player NJI returns nothingif LK thencall SetPlayerTechMaxAllowed(NJI,MQI,0)set R[GetUnitPointValueByType(MQI)]=trueendifendfunctionfunction NPI takes integer MQI returns nothingcall NRI(MQI,BO[1])call NRI(MQI,BO[2])call NRI(MQI,BO[3])call NRI(MQI,BO[4])call NRI(MQI,BO[5])call NRI(MQI,CO[1])call NRI(MQI,CO[2])call NRI(MQI,CO[3])call NRI(MQI,CO[4])call NRI(MQI,CO[5])endfunctionfunction NQI takes integer MQI returns nothingif LK thencall SetPlayerTechMaxAllowed(BO[1],MQI,0)call SetPlayerTechMaxAllowed(BO[2],MQI,0)call SetPlayerTechMaxAllowed(BO[3],MQI,0)call SetPlayerTechMaxAllowed(BO[4],MQI,0)call SetPlayerTechMaxAllowed(BO[5],MQI,0)call SetPlayerTechMaxAllowed(CO[1],MQI,0)call SetPlayerTechMaxAllowed(CO[2],MQI,0)call SetPlayerTechMaxAllowed(CO[3],MQI,0)call SetPlayerTechMaxAllowed(CO[4],MQI,0)call SetPlayerTechMaxAllowed(CO[5],MQI,0)endifendfunctionfunction NUI takes integer MQI returns nothinglocal player pif LK thenset p=BO[1]if K1[GetPlayerId(p)]==null thencall SetPlayerTechMaxAllowed(p,MQI,1)endifset p=BO[2]if K1[GetPlayerId(p)]==null thencall SetPlayerTechMaxAllowed(p,MQI,1)endifset p=BO[3]if K1[GetPlayerId(p)]==null thencall SetPlayerTechMaxAllowed(p,MQI,1)endifset p=BO[4]if K1[GetPlayerId(p)]==null thencall SetPlayerTechMaxAllowed(p,MQI,1)endifset p=BO[5]if K1[GetPlayerId(p)]==null thencall SetPlayerTechMaxAllowed(p,MQI,1)endifset p=CO[1]if K1[GetPlayerId(p)]==null thencall SetPlayerTechMaxAllowed(p,MQI,1)endifset p=CO[2]if K1[GetPlayerId(p)]==null thencall SetPlayerTechMaxAllowed(p,MQI,1)endifset p=CO[3]if K1[GetPlayerId(p)]==null thencall SetPlayerTechMaxAllowed(p,MQI,1)endifset p=CO[4]if K1[GetPlayerId(p)]==null thencall SetPlayerTechMaxAllowed(p,MQI,1)endifset p=CO[5]if K1[GetPlayerId(p)]==null thencall SetPlayerTechMaxAllowed(p,MQI,1)endifendifendfunctionfunction S0I takes player NJI returns nothinglocal integer SII=D90local integer S1I=DA0if LK thenloopexitwhen SII>S1Icall SetPlayerTechMaxAllowed(NJI,D70[SII],0)set SII=SII+1endloopset SII=DB0set S1I=DC0loopexitwhen SII>S1Icall SetPlayerTechMaxAllowed(NJI,D70[SII],0)set SII=SII+1endloopendifendfunctionfunction SOI takes nothing returns nothingcall S0I(BO[1])call S0I(BO[2])call S0I(BO[3])call S0I(BO[4])call S0I(BO[5])call S0I(CO[1])call S0I(CO[2])call S0I(CO[3])call S0I(CO[4])call S0I(CO[5])endfunctionfunction S3I takes nothing returns nothinglocal integer iif LK thenset i=DB0loopexitwhen i>DC0call SetPlayerTechMaxAllowed(BO[1],D70[i],0)call SetPlayerTechMaxAllowed(BO[2],D70[i],0)call SetPlayerTechMaxAllowed(BO[3],D70[i],0)call SetPlayerTechMaxAllowed(BO[4],D70[i],0)call SetPlayerTechMaxAllowed(BO[5],D70[i],0)set i=i+1endloopset i=D90loopexitwhen i>DA0call SetPlayerTechMaxAllowed(CO[1],D70[i],0)call SetPlayerTechMaxAllowed(CO[2],D70[i],0)call SetPlayerTechMaxAllowed(CO[3],D70[i],0)call SetPlayerTechMaxAllowed(CO[4],D70[i],0)call SetPlayerTechMaxAllowed(CO[5],D70[i],0)set i=i+1endloopendifendfunctionfunction IsEnemyCreepCond takes nothing returns booleanreturn IsUnitAlly(GetFilterUnit(),GetOwningPlayer(XO))and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>0 and(GetOwningPlayer(GetFilterUnit())==BO[0])or(GetOwningPlayer(GetFilterUnit())==CO[0])endfunctionfunction S4I takes nothing returns nothinglocal integer SIIlocal integer S1Ilocal integer S5I=0set HO=D90set SII=D90set S1I=DA0loopexitwhen SII>S1Iset S5I=S5I+1set VO[S5I]=SIIset SII=SII+1endloopset SII=DB0set S1I=DC0loopexitwhen SII>S1Iset S5I=S5I+1set VO[S5I]=SIIset SII=SII+1endloopset ZO=S5Iendfunctionfunction S6I takes nothing returns integerlocal integer S7I=GetRandomInt(HO,ZO)local integer S8I=VO[S7I]set S8I=VO[S7I]if(HO==ZO)thenset VO[S7I]=0return S8Iendifif(S7I==ZO)thenset ZO=ZO-1return S8Iendifset VO[S7I]=VO[ZO]set ZO=ZO-1return S8Iendfunctionfunction S9I takes unit N3I returns booleanreturn GetUnitAbilityLevel(N3I,1110454612)>0 or GetUnitAbilityLevel(N3I,1112437609)>0 or GetUnitAbilityLevel(N3I,1110454616)>0 or GetUnitAbilityLevel(N3I,1112433775)>0 or GetUnitAbilityLevel(N3I,1110454861)>0 or GetUnitAbilityLevel(N3I,1114137953)>0 or GetUnitAbilityLevel(N3I,1110456150)>0 or GetUnitAbilityLevel(N3I,1110458969)>0 or GetUnitAbilityLevel(N3I,1110456399)>0 or GetUnitAbilityLevel(N3I,1110456149)>0 or GetUnitAbilityLevel(N3I,1110459468)>0 or GetUnitAbilityLevel(N3I,1110456406)>0 or GetUnitAbilityLevel(N3I,1110455089)>0 or GetUnitAbilityLevel(N3I,1110459988)>0 or GetUnitAbilityLevel(N3I,1110459975)>0endfunctionfunction SAI takes string SBI returns integerif SBI=="a"thenreturn 10elseif SBI=="b"thenreturn 11elseif SBI=="c"thenreturn 12elseif SBI=="d"thenreturn 13elseif SBI=="e"thenreturn 14elseif SBI=="f"thenreturn 15elsereturn S2I(SBI)endifendfunctionfunction SCI takes string SDI returns integerreturn SAI(SubString(SDI,0,1))*16+SAI(SubString(SDI,1,2))endfunctionfunction SEI takes integer SFI returns booleanlocal integer i=1loopexitwhen i>R2if SFI==T2[i]thenreturn falseendifset i=i+1endloopreturn trueendfunctionfunction SGI takes integer SFI returns booleanlocal integer i=1loopexitwhen i>R2if SFI==T2[i]thenreturn falseendifset i=i+1endloopset i=1loopexitwhen i>E90if SFI==E80[i]thenreturn falseendifset i=i+1endloopreturn trueendfunctionfunction SHI takes unit SZI returns integerlocal integer SVI=GetUnitTypeId(SZI)if SVI==1697656914 or SVI==1966092365 thenreturn 1elseif SVI==1697657137 or SVI==1966092356 thenreturn 2elseif SVI==1697656915 or SVI==1966092366 thenreturn 3elseif SVI==1697657145 or SVI==1966092372 thenreturn 4endifreturn 0endfunctionfunction SWI takes player KUI,integer SXI returns nothinglocal texttag tif SXI>0 thenset EW0[GetPlayerId(KUI)]=EW0[GetPlayerId(KUI)]+SXIset EV0[GetPlayerId(KUI)]=EV0[GetPlayerId(KUI)]+SXIset t=CreateTextTag()call SetPlayerState(KUI,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(KUI,PLAYER_STATE_RESOURCE_GOLD)+SXI)call SetTextTagText(t,"+"+I2S(SXI),0.025)call SetTextTagPosUnit(t,K1[GetPlayerId(KUI)],0)call SetTextTagColor(t,255,220,0,255)call SetTextTagVelocity(t,0,0.03)if GetLocalPlayer()==KUI thencall SetTextTagVisibility(t,true)elsecall SetTextTagVisibility(t,false)endifcall SetTextTagFadepoint(t,2)call SetTextTagLifespan(t,3)call SetTextTagPermanent(t,false)endifendfunctionfunction SYI takes unit N3I,integer NGI returns nothinglocal integer SJIlocal player p=GetOwningPlayer(N3I)local integer SKI=0local integer NumOfPlayersif NGI==1 thenset SJI=264elseif NGI==2 thenset SJI=312elseif NGI==3 thenset SJI=358elseif NGI==4 thenset SJI=405endifif IsUnitAlly(GetDyingUnit(),p)thenif NGI==1 thenset SJI=100elseif NGI==2 thenset SJI=120elseif NGI==3 thenset SJI=140elseif NGI==4 thenset SJI=160endifendifif GetOwningPlayer(GetDyingUnit())==CO[0]thencall SWI(BO[1],SJI)call SWI(BO[2],SJI)call SWI(BO[3],SJI)call SWI(BO[4],SJI)call SWI(BO[5],SJI)elsecall SWI(CO[1],SJI)call SWI(CO[2],SJI)call SWI(CO[3],SJI)call SWI(CO[4],SJI)call SWI(CO[5],SJI)endifendfunctionfunction SLI takes integer N6I returns booleanlocal integer i=1loopexitwhen i>DZ0if DH0[i]==N6I thenreturn trueendifset i=i+1endloopreturn falseendfunctionfunction SMI takes integer N6I returns booleanlocal integer i=1loopexitwhen i>DE0if DD0[i]==N6I thenreturn trueendifset i=i+1endloopreturn falseendfunctionfunction SNI takes integer N6I returns booleanlocal integer i=1loopexitwhen i>DG0if DF0[i]==N6I thenreturn trueendifset i=i+1endloopreturn falseendfunctionfunction SSI takes player NJI returns nothinglocal integer STIlocal integer SRIlocal location SPIlocal integer S7Ilocal boolean GotHero=falseset S0[GetPlayerId(NJI)]=trueif NZI(NJI)==true thenset STI=D90set SRI=DA0set SPI=GetRectCenter(O4)elseset STI=DB0set SRI=DC0set SPI=GetRectCenter(S3)endifif K0 thenif(GetRandomInt(1,2)==1)thenset STI=D90set SRI=DA0elseset STI=DB0set SRI=DC0endifendifloopset S7I=GetRandomInt(STI,SRI)exitwhen R[S7I]==false and SLI(D70[S7I])and D70[S7I]!=1211117643endloopif F2==false thencall NQI(D70[S7I])set R[S7I]=trueendifcall CreateUnitAtLoc(NJI,D70[S7I],SPI,0)call RemoveLocation(SPI)endfunctionfunction SQI takes player NJI returns nothinglocal integer STIlocal integer SRIlocal location SPIlocal integer S7Ilocal boolean GotHero=falseset S0[GetPlayerId(NJI)]=trueif NZI(NJI)==true thenset STI=D90set SRI=DA0set SPI=GetRectCenter(O4)elseset STI=DB0set SRI=DC0set SPI=GetRectCenter(S3)endifif K0 thenif(GetRandomInt(1,2)==1)thenset STI=D90set SRI=DA0elseset STI=DB0set SRI=DC0endifendifloopset S7I=GetRandomInt(STI,SRI)exitwhen R[S7I]==false and SNI(D70[S7I])endloopif F2==false thencall NQI(D70[S7I])set R[S7I]=trueendifcall CreateUnitAtLoc(NJI,D70[S7I],SPI,0)call RemoveLocation(SPI)endfunctionfunction SUI takes player NJI returns nothinglocal integer STIlocal integer SRIlocal location SPIlocal integer S7Ilocal boolean GotHero=falseset S0[GetPlayerId(NJI)]=trueif NZI(NJI)==true thenset STI=D90set SRI=DA0set SPI=GetRectCenter(O4)elseset STI=DB0set SRI=DC0set SPI=GetRectCenter(S3)endifif K0 thenif(GetRandomInt(1,2)==1)thenset STI=D90set SRI=DA0elseset STI=DB0set SRI=DC0endifendifloopset S7I=GetRandomInt(STI,SRI)exitwhen R[S7I]==false and SMI(D70[S7I])endloopif F2==false thencall NQI(D70[S7I])set R[S7I]=trueendifcall CreateUnitAtLoc(NJI,D70[S7I],SPI,0)call RemoveLocation(SPI)endfunctionfunction T0I takes player NJI returns nothinglocal integer STIlocal integer SRIlocal location SPIlocal integer S7Ilocal boolean GotHero=falseset S0[GetPlayerId(NJI)]=trueif NZI(NJI)==true thenset STI=D90set SRI=DA0set SPI=GetRectCenter(O4)elseset STI=DB0set SRI=DC0set SPI=GetRectCenter(S3)endifif K0 thenif(GetRandomInt(1,2)==1)thenset STI=D90set SRI=DA0elseset STI=DB0set SRI=DC0endifendifloopset S7I=GetRandomInt(STI,SRI)exitwhen R[S7I]==falseendloopif F2==false thencall NQI(D70[S7I])set R[S7I]=trueendifcall CreateUnitAtLoc(NJI,D70[S7I],SPI,0)call RemoveLocation(SPI)endfunctionfunction TII takes boolean T1I,boolean TOI returns integerlocal integer STIlocal integer SRIif T1I and TOI thenif(GetRandomInt(1,2)==1)thenset STI=D90set SRI=DA0elseset STI=DB0set SRI=DC0endifelseif T1I thenset STI=D90set SRI=DA0elseset STI=DB0set SRI=DC0endifreturn GetRandomInt(STI,SRI)endfunctionfunction T2I takes unit N3I returns booleanreturn GetUnitTypeId(N3I)==1848651849 or GetUnitTypeId(N3I)==1848652338 or GetUnitTypeId(N3I)==1848652337 or GetUnitTypeId(N3I)==1848658777 or GetUnitTypeId(N3I)==1848658778 or GetUnitTypeId(N3I)==1848659013 or GetUnitTypeId(N3I)==1848652339 or GetUnitTypeId(N3I)==1848652340 or GetUnitTypeId(N3I)==1848652341 or GetUnitTypeId(N3I)==1848658992 or GetUnitTypeId(N3I)==1848658993 or GetUnitTypeId(N3I)==1848659252 or GetUnitTypeId(N3I)==1848651853 or GetUnitTypeId(N3I)==1848658006 or GetUnitTypeId(N3I)==1848659027endfunctionfunction T3I takes unit N3I returns booleanreturn GetUnitTypeId(N3I)==1697657160 or GetUnitTypeId(N3I)==1697657178 or GetUnitTypeId(N3I)==1697657426 or GetUnitTypeId(N3I)==1697657428 or GetUnitTypeId(N3I)==1697657427 or GetUnitTypeId(N3I)==1697657648endfunctionfunction T4I takes unit N3I returns booleanreturn T2I(N3I)or T3I(N3I)endfunctionfunction T5I takes destructable d returns booleanreturn GetDestructableTypeId(d)==1314157667 or GetDestructableTypeId(d)==1314157687 or GetDestructableTypeId(d)==1096053874 or GetDestructableTypeId(d)==1110454322 or GetDestructableTypeId(d)==1110454323 or GetDestructableTypeId(d)==1110454325endfunctionfunction T6I takes unit u returns booleanreturn GetUnitAbilityLevel(u,1093686070)>0 or GetUnitAbilityLevel(u,1093744441)>0 or GetUnitAbilityLevel(u,1094937961)>0 or GetUnitAbilityLevel(u,1093686101)>0 or GetUnitAbilityLevel(u,1110454580)>0 or GetUnitAbilityLevel(u,1093683251)>0 or((LoadInteger(XY,(GetHandleId(((u)))),((4252))))==1)endfunctionfunction T7I takes unit T8I returns booleanreturn GetUnitAbilityLevel(T8I,1093678162)>0 and NXI(GetOwningPlayer(T8I))endfunctionfunction T9I takes unit u returns booleanreturn GetUnitTypeId(u)==1211117638 or GetUnitTypeId(u)==1211117637 or GetUnitTypeId(u)==1211117639 or GetUnitTypeId(u)==1328558391endfunctionfunction TAI takes real d returns booleanreturn 2<d and d<3000endfunctionfunction TBI takes nothing returns nothinglocal integer SII=1set WO=BO[1]loopexitwhen NYI(WO)or SII>5set SII=SII+1set WO=BO[SII]endloopif NYI(WO)==false thenset WO=CO[1]set SII=1loopexitwhen NYI(WO)or SII>5set SII=SII+1set WO=CO[SII]endloopendifendfunctionfunction TCI takes unit N0I returns booleanreturn IsUnitType(N0I,UNIT_TYPE_HERO)==true and IsUnitIllusion(N0I)==false and GetUnitTypeId(N0I)!=1211117645 and GetUnitTypeId(N0I)!=1311788365 and GetUnitTypeId(N0I)!=1211117657 and GetUnitTypeId(N0I)!=1211119431 and GetUnitTypeId(N0I)!=1211122232endfunctionfunction TDI takes integer i returns integerlocal integer x=0loopexitwhen x>DC0if DK0[x]==i thenreturn D70[x]endifset x=x+1endloopreturn-1endfunctionfunction TEI takes integer N6I returns integerlocal integer i=1loopexitwhen i>DC0if N6I==D70[i]thenreturn iendifset i=i+1endloopreturn 0endfunctionfunction TFI takes unit N0I returns integerlocal integer NGI=GetHeroLevel(N0I)if NGI==1 thenreturn 100elseif NGI==2 thenreturn 120elseif NGI==3 thenreturn 160elseif NGI==4 thenreturn 220elsereturn-200+100*NGIendifreturn 0endfunctionfunction TGI takes player p returns booleanreturn C2 and(DO0==p or D20==p)endfunctionfunction THI takes unit u returns booleanreturn GetUnitAbilityLevel(u,1113815395)>0 or GetUnitAbilityLevel(u,1113815346)>0endfunctionfunction TZI takes unit u returns booleanreturn((LoadInteger(XY,(GetHandleId((u))),((4400))))==1)or((LoadInteger(XY,(GetHandleId((u))),((4401))))==1)or((LoadInteger(XY,(GetHandleId((u))),((4402))))==1)or((LoadInteger(XY,(GetHandleId((u))),((4403))))==1)or((LoadInteger(XY,(GetHandleId((u))),((4404))))==1)or((LoadInteger(XY,(GetHandleId((u))),((4405))))==1)or((LoadInteger(XY,(GetHandleId((u))),((4406))))==1)or((LoadInteger(XY,(GetHandleId((u))),((4407))))==1)or((LoadInteger(XY,(GetHandleId((u))),((4408))))==1)or((LoadInteger(XY,(GetHandleId((u))),((4409))))==1)or((LoadInteger(XY,(GetHandleId((u))),((4410))))==1)or((LoadInteger(XY,(GetHandleId((u))),((4411))))==1)or((LoadInteger(XY,(GetHandleId((u))),((4412))))==1)or((LoadInteger(XY,(GetHandleId((u))),((4413))))==1)or((LoadInteger(XY,(GetHandleId((u))),((4414))))==1)or((LoadInteger(XY,(GetHandleId((u))),((4415))))==1)endfunctionfunction TVI takes integer id returns booleanreturn id==1966092596 or id==1966092597 or id==1966092598 or id==1966092612 or id==1966092613 or id==1966092614endfunctionfunction TWI takes unit u returns booleanreturn GetUnitAbilityLevel(u,1112500344)>0 or GetUnitAbilityLevel(u,1110454344)>0endfunctionfunction TXI takes integer SVI returns booleanif SVI==1852862003 or SVI==1852862006 or SVI==1848652080 or SVI==1848657754 thenreturn trueendifif SVI==1852862002 or SVI==1852862005 or SVI==1848652082 or SVI==1848657969 thenreturn trueendifif SVI==1852862001 or SVI==1852862004 or SVI==1848652081 or SVI==1848657968 thenreturn trueendifreturn falseendfunctionfunction TYI takes unit u returns realif NZI(GetOwningPlayer(u))thenreturn GetRectCenterX(O4)elsereturn GetRectCenterX(S3)endifendfunctionfunction TJI takes unit u returns realif NZI(GetOwningPlayer(u))thenreturn GetRectCenterY(O4)elsereturn GetRectCenterY(S3)endifendfunctionfunction TKI takes unit TLI,unit TMI,integer TNI,real TSI returns nothingif TNI==0 thenreturnendifif TNI==1 thencall UnitDamageTarget(TLI,TMI,TSI,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE,WEAPON_TYPE_WHOKNOWS)elseif TNI==2 thencall UnitDamageTarget(TLI,TMI,TSI,true,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)elseif TNI==3 thencall UnitDamageTarget(TLI,TMI,TSI,true,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)elseif TNI==4 thencall UnitDamageTarget(TLI,TMI,TSI,true,true,ATTACK_TYPE_PIERCE,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)elseif TNI==5 thencall UnitDamageTarget(TLI,TMI,TSI,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)elseif TNI==6 thencall SetUnitState(TMI,UNIT_STATE_LIFE,RMaxBJ(GetUnitState(TMI,UNIT_STATE_LIFE)-TSI,1))if GetUnitState(TMI,UNIT_STATE_LIFE)<2 thencall UnitRemoveBuffs(TMI,true,true)call UnitRemoveAbility(TMI,1097167980)call UnitDamageTarget(CreateUnit(GetOwningPlayer(TLI),1697656901,0,0,0),TMI,100000000.00,true,false,ATTACK_TYPE_MELEE,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)endifelseif TNI==7 thenif GetUnitAbilityLevel(TMI,1097167980)>0 or GetUnitAbilityLevel(TMI,1110454606)>0 thencall UnitDamageTarget(TLI,TMI,TSI,true,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)elsecall UnitDamageTarget(TLI,TMI,TSI,true,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_UNIVERSAL,WEAPON_TYPE_WHOKNOWS)endifelseif TNI==8 thencall UnitDamageTarget(TLI,TMI,TSI,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_UNIVERSAL,WEAPON_TYPE_WHOKNOWS)endifendfunctionfunction TTI takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer TRI=(LoadInteger(XY,(MKI),(30)))local unit TMI=M6I(TRI)local integer TNI=(LoadInteger(XY,(MKI),(36)))local real TSI=(LoadReal(XY,(MKI),(20)))call TKI(TLI,TMI,TNI,TSI)call M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction TPI takes unit TLI,unit TMI,integer TNI,real TSI,real KLI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(30),(M8I(TMI)))call SaveInteger(XY,(MKI),(36),(TNI))call SaveReal(XY,(MKI),(20),((TSI)*1.0))call TriggerRegisterTimerEvent(t,KLI,false)call TriggerAddCondition(t,Condition(function TTI))set t=nullendfunctionfunction TQI takes player KUI,string TUI returns nothinglocal sound R0I=CreateSound(TUI,false,false,false,10,10,"DefaultEAXON")if(GetLocalPlayer()==KUI)thencall StartSound(R0I)endifcall KillSoundWhenDone(R0I)endfunctionfunction RII takes player KUI,string TUI returns nothingcall TQI(BO[1],TUI)call TQI(BO[2],TUI)call TQI(BO[3],TUI)call TQI(BO[4],TUI)call TQI(BO[5],TUI)call TQI(CO[1],TUI)call TQI(CO[2],TUI)call TQI(CO[3],TUI)call TQI(CO[4],TUI)call TQI(CO[5],TUI)endfunctionfunction R1I takes player ROI,string LNI returns nothinglocal sound R3I=CreateSoundFromLabel("InterfaceError",false,false,false,10,10)if(GetLocalPlayer()==ROI)thenif(LNI!="")and(LNI!=null)thencall ClearTextMessages()call DisplayTimedTextToPlayer(ROI,0.50,-1.00,2.00,"|cffffcc00"+LNI+"|r")endifcall StartSound(R3I)endifcall KillSoundWhenDone(R3I)endfunctionfunction R4I takes player ROI,string LNI returns nothinglocal sound R3I=CreateSoundFromLabel("InterfaceError",false,false,false,10,10)if(GetLocalPlayer()==ROI)thenif(LNI!="")and(LNI!=null)thencall DisplayTimedTextToPlayer(ROI,0,0,2.00,"|cffffcc00"+LNI+"|r")endifcall StartSound(R3I)endifcall KillSoundWhenDone(R3I)endfunctionfunction R5I takes player ROI,string LNI returns nothinglocal sound R3I=CreateSoundFromLabel("InterfaceError",false,false,false,10,10)if(GetLocalPlayer()==ROI)thenif(LNI!="")and(LNI!=null)thencall DisplayTimedTextToPlayer(ROI,0,0,5.00,"|cffffcc00"+LNI+"|r")endifcall StartSound(R3I)endifcall KillSoundWhenDone(R3I)endfunctionfunction R6I takes unit R7I returns nothingcall PauseUnit(R7I,true)call IssueImmediateOrder(R7I,"stop")call PauseUnit(R7I,false)endfunctionfunction R8I takes nothing returns booleanif(GetTimeOfDay()>6.00 and GetTimeOfDay()<18.00)thenreturn trueelsereturn falseendifendfunctionfunction R9I takes string RAI,boolean RBI returns nothingif RBI thencall ExecuteFunc(RAI)endifendfunctionfunction RCI takes real x returns reallocal real RDI=GetRectMinX(bj_mapInitialPlayableArea)+50if(x<RDI)thenreturn RDIendifset RDI=GetRectMaxX(bj_mapInitialPlayableArea)-50if(x>RDI)thenreturn RDIendifreturn xendfunctionfunction REI takes real x returns reallocal real RDI=GetRectMinX(bj_mapInitialPlayableArea)+75if(x<RDI)thenreturn RDIendifset RDI=GetRectMaxX(bj_mapInitialPlayableArea)-75if(x>RDI)thenreturn RDIendifreturn xendfunctionfunction RFI takes real x returns reallocal real RDI=GetRectMinX(bj_mapInitialPlayableArea)if(x<RDI)thenreturn RDIendifset RDI=GetRectMaxX(bj_mapInitialPlayableArea)if(x>RDI)thenreturn RDIendifreturn xendfunctionfunction RGI takes real y returns reallocal real RDI=GetRectMinY(bj_mapInitialPlayableArea)+50if(y<RDI)thenreturn RDIendifset RDI=GetRectMaxY(bj_mapInitialPlayableArea)-50if(y>RDI)thenreturn RDIendifreturn yendfunctionfunction RHI takes real y returns reallocal real RDI=GetRectMinY(bj_mapInitialPlayableArea)+75if(y<RDI)thenreturn RDIendifset RDI=GetRectMaxY(bj_mapInitialPlayableArea)-75if(y>RDI)thenreturn RDIendifreturn yendfunctionfunction RZI takes real y returns reallocal real RDI=GetRectMinY(bj_mapInitialPlayableArea)if(y<RDI)thenreturn RDIendifset RDI=GetRectMaxY(bj_mapInitialPlayableArea)if(y>RDI)thenreturn RDIendifreturn yendfunctionfunction RVI takes integer RWI returns nothinglocal unit u=CreateUnit(Player(15),1211117657,0,0,270)call UnitAddAbility(u,RWI)call UnitRemoveAbility(u,RWI)call RemoveUnit(u)set u=nullendfunctionfunction RXI takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer RWI=(LoadInteger(XY,(MKI),(37)))call RVI(RWI)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullreturn falseendfunctionfunction RYI takes integer RWI,real RJI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SaveInteger(XY,(MKI),(37),(RWI))call TriggerRegisterTimerEvent(t,RJI,false)call TriggerAddCondition(t,Condition(function RXI))set t=nullendfunctionfunction Tree_Killer takes nothing returns nothingcall KillDestructable(GetEnumDestructable())endfunctionfunction RKI takes unit N0I returns nothingcall SaveBoolean(XY,(GetHandleId(N0I)),(38),(false))call FlushChildHashtable(XY,(GetHandleId(N0I)))call RemoveUnit(N0I)endfunctionfunction RLI takes unit N3I,integer RMI,integer RNI returns nothingif GetUnitAbilityLevel(N3I,RMI)==0 thencall UnitAddAbility(N3I,RMI)endifcall SetUnitAbilityLevel(N3I,RMI,RNI)endfunctionfunction RSI takes integer a,integer b returns integerif(a<b)thenreturn aelsereturn bendifendfunctionfunction RTI takes integer a,integer b returns integerif(a<b)thenreturn belsereturn aendifendfunctionfunction RRI takes integer KSI,integer a,integer b returns integerreturn RTI(RSI(KSI,b),a)endfunctionfunction RPI takes real a,real b returns realif(a<b)thenreturn aelsereturn bendifendfunctionfunction RQI takes real a,real b returns realif(a<b)thenreturn belsereturn aendifendfunctionfunction RUI takes nothing returns nothinglocal integer MKI=GetHandleId(GetExpiredTimer())local unit N3I=(LoadUnitHandle(XY,(MKI),(26)))call SetUnitState(N3I,UNIT_STATE_LIFE,GetUnitState(N3I,UNIT_STATE_LIFE)+(LoadReal(XY,(MKI),(20))))endfunctionfunction P0I takes unit N3I,real TSI returns nothinglocal timer t=CreateTimer()local integer MKI=GetHandleId(t)call SaveReal(XY,(MKI),(20),((TSI)*1.0))call SaveUnitHandle(XY,(MKI),(26),(N3I))call TimerStart(t,0,false,function RUI)endfunctionfunction PII takes unit N3I,real TSI returns nothinglocal real P1I=GetUnitState(N3I,UNIT_STATE_MAX_LIFE)local real POI=GetUnitState(N3I,UNIT_STATE_LIFE)if(GetUnitState(N3I,UNIT_STATE_LIFE)>1)thenif TSI>(P1I-POI)thenif TSI>=POI thencall SetUnitState(N3I,UNIT_STATE_LIFE,P1I)call P0I(N3I,TSI-(P1I-POI))elsecall P0I(N3I,TSI)endifelsecall SetUnitState(N3I,UNIT_STATE_LIFE,GetUnitState(N3I,UNIT_STATE_LIFE)+TSI)endifendifendfunctionfunction P2I takes unit TLI,unit TMI,real P3I returns booleanlocal real P4I=GetUnitX(TLI)local real P5I=GetUnitY(TLI)local real P6I=GetUnitX(TMI)local real P7I=GetUnitY(TMI)if((P4I-P6I)*(P4I-P6I)+(P5I-P7I)*(P5I-P7I))<P3I*P3I thenreturn trueelsereturn falseendifreturn falseendfunctionfunction P8I takes unit TLI,unit TMI returns reallocal real P4I=GetUnitX(TLI)local real P5I=GetUnitY(TLI)local real P6I=GetUnitX(TMI)local real P7I=GetUnitY(TMI)if TLI==null or TMI==null thenreturn I2R(9999999999)elsereturn SquareRoot((P4I-P6I)*(P4I-P6I)+(P5I-P7I)*(P5I-P7I))endifreturn 1.0endfunctionfunction P9I takes unit TLI,location TMI returns reallocal real P4I=GetUnitX(TLI)local real P5I=GetUnitY(TLI)local real P6I=GetLocationX(TMI)local real P7I=GetLocationY(TMI)if TLI==null thenreturn I2R(9999999999)elsereturn SquareRoot((P4I-P6I)*(P4I-P6I)+(P5I-P7I)*(P5I-P7I))endifreturn 1.0endfunctionfunction PAI takes real x1,real y1,real x2,real y2 returns realreturn SquareRoot(((x1-x2)*(x1-x2))+((y1-y2)*(y1-y2)))endfunctionfunction PBI takes unit N3I returns nothingcall SetUnitState(N3I,UNIT_STATE_MANA,GetUnitState(N3I,UNIT_STATE_MAX_MANA))endfunctionfunction PCI takes nothing returns nothingcall DisplayTimedTextToPlayer(GetEnumPlayer(),0,U2,YJ,XJ)endfunctionfunction PDI takes force LZI,real KLI,string LVI returns nothingset XJ=LVIset YJ=KLIcall ForForce(LZI,function PCI)endfunctionfunction PEI takes nothing returns nothingif IM[GetPlayerId(GetEnumPlayer())]thencall DisplayTimedTextToPlayer(GetEnumPlayer(),0,U2,YJ,XJ)endifendfunctionfunction PFI takes force LZI,real KLI,string LVI returns nothingset XJ=LVIset YJ=KLIcall ForForce(LZI,function PEI)endfunctionfunction PGI takes unit N3I,real PHI returns nothingcall SetUnitState(N3I,UNIT_STATE_LIFE,GetUnitState(N3I,UNIT_STATE_LIFE)+PHI)endfunctionfunction PZI takes nothing returns nothingcall PauseAllUnitsBJ(true)endfunctionfunction RepeatedPauseAll takes nothing returns nothinglocal timer t=CreateTimer()call TimerStart(t,1,true,function PZI)endfunctionfunction PVI takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI((t))set t=nullreturn falseendfunctionfunction PWI takes string PXI,unit N3I,string PYI,real KLI returns nothinglocal effect fx=AddSpecialEffectTarget(PXI,N3I,PYI)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SaveEffectHandle(XY,(MKI),(32),(fx))call TriggerRegisterTimerEvent(t,KLI,false)call TriggerAddCondition(t,Condition(function PVI))set fx=nullset t=nullendfunctionfunction PJI takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI((t))set t=nullreturn falseendfunctionfunction PKI takes string PXI,unit N3I,string PYI,real KLI returns nothinglocal effect fx=AddSpecialEffectTarget(PXI,N3I,PYI)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SaveEffectHandle(XY,(MKI),(32),(fx))call TriggerRegisterUnitEvent(t,N3I,EVENT_UNIT_DEATH)call TriggerRegisterTimerEvent(t,KLI,false)call TriggerAddCondition(t,Condition(function PJI))set fx=nullset t=nullendfunctionfunction PLI takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI((t))set t=nullreturn falseendfunctionfunction PMI takes string PXI,real x,real y,real KLI returns nothinglocal effect fx=AddSpecialEffect(PXI,x,y)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SaveEffectHandle(XY,(MKI),(32),(fx))call TriggerRegisterTimerEvent(t,KLI,false)call TriggerAddCondition(t,Condition(function PLI))set fx=nullset t=nullendfunctionfunction PulseEffectTarget_Child takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local string PXI=(LoadStr(XY,(MKI),(39)))local string PYI=(LoadStr(XY,(MKI),(40)))local integer MFI=(LoadInteger(XY,(MKI),(34)))call PKI(PXI,TMI,PYI,2)if GetTriggerEventId()==EVENT_UNIT_DEATH or GetTriggerEvalCount(t)>MFI thencall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TMI=nullreturn falseendfunctionfunction PNI takes unit N3I,integer PSI returns itemlocal integer L9I=0local item PTIloopexitwhen L9I==6set PTI=UnitItemInSlot(N3I,L9I)if PTI!=null and GetItemTypeId(PTI)==PSI thenreturn PTIendifset L9I=L9I+1endloopreturn nullendfunctionfunction PRI takes timer t returns nothingcall PauseTimer(t)call FlushChildHashtable(XY,(GetHandleId(t)))call DestroyTimer(t)endfunctionfunction PPI takes real x1,real y1,real x2,real y2 returns realreturn SquareRoot((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))endfunctionfunction PQI takes unit a,unit b returns realreturn bj_RADTODEG*Atan2(GetUnitY(b)-GetUnitY(a),GetUnitX(b)-GetUnitX(a))endfunctionfunction PUI takes real x1,real y1,real x2,real y2 returns realreturn bj_RADTODEG*Atan2(y2-y1,x2-x1)endfunctionfunction Q0I takes nothing returns nothingcall DestroyLightning((LoadLightningHandle(XY,(GetHandleId(GetExpiredTimer())),(41))))endfunctionfunction QII takes string Q1I,real x1,real y1,real x2,real y2,real r,real g,real b,real a,real KLI returns nothinglocal timer t=CreateTimer()local lightning QOI=AddLightning(Q1I,true,x1,y1,x2,y2)call SetLightningColor(QOI,r,g,b,a)call SaveLightningHandle(XY,(GetHandleId(t)),(41),(QOI))call TimerStart(t,KLI,false,function Q0I)endfunctionfunction Q2I takes string Q3I,unit Q4I,integer r,integer g,integer b returns nothinglocal texttag tt=CreateTextTag()call SetTextTagText(tt,Q3I,0.03)call SetTextTagPosUnit(tt,Q4I,0)call SetTextTagColor(tt,r,g,b,255)call SetTextTagPermanent(tt,true)set tt=nullendfunctionfunction Q5I takes string Q3I,real KLI,unit Q4I,real Q6I,integer r,integer g,integer b,integer a returns nothinglocal texttag tt=CreateTextTag()call SetTextTagText(tt,Q3I,Q6I)call SetTextTagPosUnit(tt,Q4I,64)call SetTextTagColor(tt,r,g,b,a)call SetTextTagVelocity(tt,0,0.0355)call SetTextTagFadepoint(tt,2)call SetTextTagPermanent(tt,false)call SetTextTagLifespan(tt,KLI)if IsUnitVisible(Q4I,GetLocalPlayer())or TGI(GetLocalPlayer())thencall SetTextTagVisibility(tt,true)elsecall SetTextTagVisibility(tt,false)endifset tt=nullendfunctionfunction Q7I takes player p,string Q3I,real KLI,unit Q4I,real Q6I,integer r,integer g,integer b,integer a returns nothinglocal texttag tt=CreateTextTag()call SetTextTagText(tt,Q3I,Q6I)call SetTextTagPosUnit(tt,Q4I,64)call SetTextTagColor(tt,r,g,b,a)call SetTextTagVelocity(tt,0,0.0355)call SetTextTagFadepoint(tt,2)call SetTextTagPermanent(tt,false)call SetTextTagLifespan(tt,KLI)if IsPlayerAlly(GetLocalPlayer(),p)==true or TGI(GetLocalPlayer())thencall SetTextTagVisibility(tt,true)elsecall SetTextTagVisibility(tt,false)endifset tt=nullendfunctionfunction Q8I takes nothing returns booleanreturn trueendfunctionfunction Q9I takes trigger t,playerunitevent QAI returns nothinglocal integer L9I=0loopcall TriggerRegisterPlayerUnitEvent(t,Player(L9I),QAI,Condition(function Q8I))set L9I=L9I+1exitwhen L9I==16endloopendfunctionfunction QBI takes trigger t,playerunitevent QAI returns nothinglocal integer i=1loopexitwhen i>5call TriggerRegisterPlayerUnitEvent(t,BO[i],QAI,Condition(function Q8I))call TriggerRegisterPlayerUnitEvent(t,CO[i],QAI,Condition(function Q8I))set i=i+1endloopendfunctionfunction QCI takes real x1,real y1,real x2,real y2 returns realreturn SquareRoot(((x1-x2)*(x1-x2))+((y1-y2)*(y1-y2)))endfunctionfunction QDI takes nothing returns nothingif T5I(GetEnumDestructable())and IsDestructableAliveBJ(GetEnumDestructable())thenset JJ=JJ+1call KillDestructable(GetEnumDestructable())endifendfunctionfunction QEI takes real x,real y,real d returns integerlocal rect r=Rect(x-d,y-d,x+d,y+d)set JJ=0call EnumDestructablesInRect(r,Condition(function LWI),function QDI)call RemoveRect(r)set r=nullreturn JJendfunctionfunction QFI takes real x,real y returns booleanif IsTerrainPathable(x,y,PATHING_TYPE_WALKABILITY)thenreturn falseendifreturn trueendfunctionfunction QGI takes unit TLI,unit TMI returns nothinglocal unit QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call UnitAddAbility(QHI,1093685817)call IssueTargetOrder(QHI,"thunderbolt",TMI)set QHI=nullendfunctionfunction QZI takes player KUI,sound QVI,real x,real y returns nothingcall SetSoundPosition(QVI,x,y,0)call SetSoundVolume(QVI,127)set bj_lastPlayedSound=QVIif(QVI!=null)thenif(GetLocalPlayer()==KUI)thencall StartSound(QVI)endifendifendfunctionfunction QWI takes sound QVI,real x,real y returns nothingcall SetSoundPosition(QVI,x,y,0)call SetSoundVolume(QVI,127)set bj_lastPlayedSound=QVIif(QVI!=null)thencall StartSound(QVI)endifendfunctionfunction QXI takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local fogmodifier QYI=(LoadFogModifierHandle(XY,(MKI),(42)))call FogModifierStop(QYI)call DestroyFogModifier(QYI)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset QYI=nullreturn falseendfunctionfunction QJI takes player p,real KLI,real x,real y,real r returns nothinglocal trigger t=CreateTrigger()local fogmodifier QYI=CreateFogModifierRadius(p,FOG_OF_WAR_VISIBLE,x,y,r,true,true)call FogModifierStart(QYI)call SaveFogModifierHandle(XY,(GetHandleId(t)),(42),(QYI))call TriggerRegisterTimerEvent(t,KLI,false)call TriggerAddCondition(t,Condition(function QXI))set QYI=nullset t=nullendfunctionfunction GroupCount_Helper takes nothing returns nothingset bj_groupCountUnits=bj_groupCountUnits+1endfunctionfunction QKI takes nothing returns nothingif(T5I(GetEnumDestructable())or GetDestructableTypeId(GetEnumDestructable())==1110454325)and GetDestructableLife(GetEnumDestructable())>0 thenset WK=trueendifendfunctionfunction QLI takes real x,real y,real d returns booleanlocal rect r=Rect(x-d,y-d,x+d,y+d)set WK=falsecall EnumDestructablesInRect(r,Condition(function LWI),function QKI)call RemoveRect(r)set r=nullreturn WKendfunctionfunction QMI takes nothing returns nothingcall PauseUnit(GetEnumUnit(),true)endfunctionfunction QNI takes nothing returns booleanlocal group g=MDI()call GroupEnumUnitsInRange(g,0,0,16000,Condition(function Q8I))call ForGroup(g,function QMI)call MCI(g)set g=nullreturn falseendfunctionfunction QSI takes nothing returns nothinglocal trigger t=CreateTrigger()call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function QNI))call TriggerEvaluate(t)set t=nullendfunctionfunction QTI takes unit N0I,integer QRI returns nothingcall UnitAddAbility(N0I,QRI)call UnitMakeAbilityPermanent(N0I,true,QRI)endfunctionfunction QPI takes unit u returns booleanreturn GetUnitTypeId(u)<1 or IsUnitType(u,UNIT_TYPE_DEAD)==trueendfunctionfunction QQI takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer TRI=(LoadInteger(XY,(MKI),(30)))local unit TMI=M6I(TRI)local integer QUI=(LoadInteger(XY,(MKI),(43)))local unit TLI=M6I(QUI)local real U0I=(LoadReal(XY,(MKI),(44)))local unit UII=(LoadUnitHandle(XY,(MKI),(45)))local real x=GetUnitX(UII)local real y=GetUnitY(UII)local real P6I=GetUnitX(TMI)local real P7I=GetUnitY(TMI)local real U1I=U0I*0.03local real UOI=PUI(x,y,P6I,P7I)local real U2I=x+U1I*Cos(UOI*bj_DEGTORAD)local real U3I=y+U1I*Sin(UOI*bj_DEGTORAD)local boolean U4I=(LoadBoolean(XY,(MKI),(698)))local boolean U5I=(LoadBoolean(XY,(MKI),(818)))call SetUnitX(UII,U2I)call SetUnitY(UII,U3I)call SetUnitFacing(UII,UOI)if QPI(TMI)and U4I==false or(((LoadInteger(XY,(GetHandleId((TMI))),((4422))))==1)==true and U5I==true)thencall KillUnit(UII)call M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)elseif QCI(P6I,P7I,U2I,U3I)<=U1I thencall KillUnit(UII)set CK=TLIset DK=TMIcall ExecuteFunc((LoadStr(XY,(MKI),(46))))call M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TMI=nullset TLI=nullset UII=nullreturn falseendfunctionfunction U6I takes unit TLI,unit TMI,integer U7I,string U8I,real U0I,boolean U9I returns triggerlocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real P4I=GetUnitX(TLI)local real P5I=GetUnitY(TLI)local real UAI=GetUnitFacing(TLI)call TriggerRegisterTimerEvent(t,0.03,true)call TriggerAddCondition(t,Condition(function QQI))call SaveReal(XY,(MKI),(44),((U0I)*1.0))call SaveInteger(XY,(MKI),(30),(M8I(TMI)))call SaveStr(XY,(MKI),(46),(U8I))call SaveInteger(XY,(MKI),(43),(M8I(TLI)))call SaveUnitHandle(XY,(MKI),(45),(CreateUnit(GetOwningPlayer(TLI),U7I,P4I,P5I,UAI)))call SaveBoolean(XY,(MKI),(698),(false))call SaveBoolean(XY,(MKI),(818),(U9I))set GK=tset t=nullreturn GKendfunctionfunction MoveProjectileToXY_Move takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local real U0I=(LoadReal(XY,(MKI),(44)))local unit UII=(LoadUnitHandle(XY,(MKI),(45)))local real x=GetUnitX(UII)local real y=GetUnitY(UII)local real P6I=(LoadReal(XY,(MKI),(47)))local real P7I=(LoadReal(XY,(MKI),(48)))local real U1I=U0I*0.03local real UOI=PUI(x,y,P6I,P7I)local real U2I=x+U1I*Cos(UOI*bj_DEGTORAD)local real U3I=y+U1I*Sin(UOI*bj_DEGTORAD)call SetUnitX(UII,U2I)call SetUnitY(UII,U3I)if QCI(P6I,P7I,U2I,U3I)<=U1I thencall KillUnit(UII)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset UII=nullreturn falseendfunctionfunction DamageProjectile_Move takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real U0I=(LoadReal(XY,(MKI),(44)))local unit UII=(LoadUnitHandle(XY,(MKI),(45)))local real x=GetUnitX(UII)local real y=GetUnitY(UII)local real P6I=GetUnitX(TMI)local real P7I=GetUnitY(TMI)local real U1I=U0I*0.03local real UOI=PUI(x,y,P6I,P7I)local real U2I=x+U1I*Cos(UOI*bj_DEGTORAD)local real U3I=y+U1I*Sin(UOI*bj_DEGTORAD)call SetUnitX(UII,U2I)call SetUnitY(UII,U3I)call SetUnitFacing(UII,UOI)if GetTriggerEventId()==EVENT_UNIT_DEATH thencall KillUnit(UII)call FlushChildHashtable(XY,(MKI))call MZI(t)elseif QCI(P6I,P7I,U2I,U3I)<=U1I thencall TKI((LoadUnitHandle(XY,(MKI),(2))),TMI,(LoadInteger(XY,(MKI),(36))),(LoadReal(XY,(MKI),(20))))call KillUnit(UII)call FlushChildHashtable(XY,(MKI))call MZI(t)endifreturn falseendfunctionfunction DelayedLocust_Helper takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)call UnitAddAbility((LoadUnitHandle(XY,(MKI),(26))),1097625443)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullreturn falseendfunctionfunction UBI takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer MFI=GetTriggerEvalCount(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local real UCI=(LoadReal(XY,(MKI),(49)))local real N7I=UCI-(UCI-N9I(N0I))*MFI/40if MFI>40 or QPI(N0I)thencall FlushChildHashtable(XY,(MKI))call MZI(t)elsecall SetUnitScale(N0I,N7I,N7I,N7I)endifset t=nullset N0I=nullreturn falseendfunctionfunction UDI takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local real UEI=(LoadReal(XY,(MKI),(50)))call FlushChildHashtable(XY,(MKI))call MZI(t)set t=CreateTrigger()call TriggerRegisterTimerEvent(t,0.025,true)call TriggerAddCondition(t,Condition(function UBI))set MKI=GetHandleId(t)call SaveReal(XY,(MKI),(49),((UEI)*1.0))call SaveUnitHandle(XY,(MKI),(14),(N0I))set t=nullset N0I=nullreturn falseendfunctionfunction UFI takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer MFI=GetTriggerEvalCount(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local real UGI=((LoadReal(XY,(MKI),(51)))-N9I(N0I))*MFI/40local real N7I=N9I(N0I)+UGIif MFI>40 or QPI(N0I)thencall FlushChildHashtable(XY,(MKI))call MZI(t)elsecall SetUnitScale(N0I,N7I,N7I,N7I)endifset t=nullset N0I=nullreturn falseendfunctionfunction UHI takes unit N0I,real KLI,real N7I returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real UZI=N7I*N9I(N0I)local real UEI=UZIcall SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveReal(XY,(MKI),(50),((UEI)*1.0))call TriggerRegisterTimerEvent(t,KLI,false)call TriggerAddCondition(t,Condition(function UDI))if KLI>3 thenset t=CreateTrigger()call TriggerRegisterTimerEvent(t,0.025,true)call TriggerAddCondition(t,Condition(function UFI))set MKI=GetHandleId(t)call SaveReal(XY,(MKI),(51),((UZI)*1.0))call SaveUnitHandle(XY,(MKI),(14),(N0I))elsecall SetUnitScale(N0I,UEI,UEI,UEI)endifset t=nullendfunctionfunction UVI takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local integer UWI=(LoadInteger(XY,(MKI),(52)))if N0I!=null thencall UnitRemoveAbility(N0I,UWI)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset N0I=nullreturn falseendfunctionfunction UXI takes unit u,integer UWI,real KLI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call QTI(u,UWI)call TriggerRegisterTimerEvent(t,KLI,false)call TriggerAddCondition(t,Condition(function UVI))call SaveUnitHandle(XY,(MKI),(14),(u))call SaveInteger(XY,(MKI),(52),(UWI))set t=nullendfunctionfunction UYI takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit u=(LoadUnitHandle(XY,(MKI),(53)))local player p=(LoadPlayerHandle(XY,(MKI),(54)))call UnitShareVision(u,p,false)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset u=nullset p=nullreturn falseendfunctionfunction ShareUnitVisionTimed_Add takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit u=GetTriggerUnit()local player p=(LoadPlayerHandle(XY,(MKI),(54)))call UnitShareVision(u,p,true)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function UYI))call SavePlayerHandle(XY,(MKI),(54),(p))call SaveUnitHandle(XY,(MKI),(53),(u))set t=nullset u=nullset p=nullreturn falseendfunctionfunction UJI takes nothing returns nothingset bj_groupCountUnits=bj_groupCountUnits+1endfunctionfunction UKI takes group g returns integerset bj_groupCountUnits=0call ForGroup(g,function UJI)return bj_groupCountUnitsendfunctionfunction ULI takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local fogmodifier QYI=(LoadFogModifierHandle(XY,(MKI),(42)))call FogModifierStop(QYI)call DestroyFogModifier(QYI)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullreturn falseendfunctionfunction UMI takes fogmodifier QYI,real KLI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call FogModifierStart(QYI)call SaveFogModifierHandle(XY,(MKI),(42),(QYI))call TriggerRegisterTimerEvent(t,KLI,false)call TriggerAddCondition(t,Condition(function ULI))set t=nullendfunctionfunction UNI takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer USI=(LoadInteger(XY,(MKI),(55)))local destructable d=M7I(USI)if d!=null thencall RemoveDestructable(d)endifcall M9I(USI)call FlushChildHashtable(XY,(MKI))call MZI(t)set d=nullset t=nullreturn falseendfunctionfunction UTI takes destructable d,real KLI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,KLI,false)call TriggerAddCondition(t,Condition(function UNI))call SaveInteger(XY,(MKI),(55),(MAI(d)))set t=nullendfunctionfunction URI takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local integer UWI=(LoadInteger(XY,(MKI),(52)))if N0I!=null and GetUnitAbilityLevel(N0I,UWI)>0 thencall UnitRemoveAbility(N0I,UWI)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset N0I=nullreturn falseendfunctionfunction UPI takes unit u,integer UWI,real KLI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,KLI,false)call TriggerAddCondition(t,Condition(function URI))call SaveUnitHandle(XY,(MKI),(14),(u))call SaveInteger(XY,(MKI),(52),(UWI))set t=nullendfunctionfunction UQI takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)call SetUnitAnimation((LoadUnitHandle(XY,(MKI),(53))),"stand")call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullreturn falseendfunctionfunction UUI takes unit u,real KLI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(53),(u))call TriggerRegisterTimerEvent(t,KLI,false)call TriggerAddCondition(t,Condition(function UQI))set t=nullendfunctionfunction I01 takes real KLI,boolean II1,real x,real y,real I11,real IO1,real I21,real I31,real I41 returns nothinglocal real I51local real I61local real I71if(IO1<=0 or I41<=0 or I31<=0)thenreturnendifset I61=2.0*KLI/I31set I51=2.0*IO1/I41set I71=I11/IO1call TerrainDeformRipple(x,y,IO1,I21,R2I(KLI*1000),1,I51,I61,I71,II1)endfunctionfunction I81 takes player KUI,unit N3I,integer SXI returns nothinglocal texttag t=CreateTextTag()call SetPlayerState(KUI,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(KUI,PLAYER_STATE_RESOURCE_GOLD)+SXI)call SetTextTagText(t,"+"+I2S(SXI),0.025)call SetTextTagPosUnit(t,N3I,0)call SetTextTagColor(t,255,220,0,255)call SetTextTagVelocity(t,0,0.03)if GetLocalPlayer()==KUI thencall SetTextTagVisibility(t,true)elsecall SetTextTagVisibility(t,false)endifcall SetTextTagFadepoint(t,2)call SetTextTagLifespan(t,3)call SetTextTagPermanent(t,false)endfunctionfunction I91 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)call FlushChildHashtable(XY,(GetHandleId((LoadUnitHandle(XY,(MKI),(26))))))call ShowUnit((LoadUnitHandle(XY,(MKI),(26))),false)call RemoveUnit((LoadUnitHandle(XY,(MKI),(26))))call FlushChildHashtable(XY,(MKI))call MZI(t)return falseendfunctionfunction IA1 takes unit u,real d returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,d,false)call TriggerAddCondition(t,Condition(function I91))call SaveUnitHandle(XY,(MKI),(26),(u))set t=nullendfunctionfunction KillUnitTimed_Expire takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)call FlushChildHashtable(XY,(GetHandleId((LoadUnitHandle(XY,(MKI),(26))))))call ShowUnit((LoadUnitHandle(XY,(MKI),(26))),false)call KillUnit((LoadUnitHandle(XY,(MKI),(26))))call FlushChildHashtable(XY,(MKI))call MZI(t)return falseendfunctionfunction HideUnitTimed_Expire takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)call FlushChildHashtable(XY,(GetHandleId((LoadUnitHandle(XY,(MKI),(26))))))call ShowUnit((LoadUnitHandle(XY,(MKI),(26))),false)call FlushChildHashtable(XY,(MKI))call MZI(t)return falseendfunctionfunction IB1 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)call RemoveUnit((LoadUnitHandle(XY,(MKI),(26))))call FlushChildHashtable(XY,(MKI))call MZI(t)return falseendfunctionfunction IC1 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)call KillUnit((LoadUnitHandle(XY,(MKI),(26))))call FlushChildHashtable(XY,(MKI))call MZI(t)return falseendfunctionfunction ID1 takes unit u,real d returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,d,false)call TriggerAddCondition(t,Condition(function IC1))call SaveUnitHandle(XY,(MKI),(26),(u))set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,d+0.01,false)call TriggerAddCondition(t,Condition(function IB1))call SaveUnitHandle(XY,(MKI),(26),(u))set t=nullendfunctionfunction IE1 takes sound QVI returns nothingif QVI!=null and AM[GetPlayerId(GetLocalPlayer())]==false thencall StartSound(QVI)endifendfunctionfunction IF1 takes sound QVI,player ROI returns nothingif GetLocalPlayer()==ROI and AM[GetPlayerId(ROI)]==false thencall StartSound(QVI)endifendfunctionfunction IG1 takes nothing returns booleanreturn IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))==falseendfunctionfunction IH1 takes nothing returns nothingcall IF1(KJ,GetOwningPlayer(GetEnumUnit()))endfunctionfunction IZ1 takes unit TLI,sound QVI,real x,real y,real r returns nothinglocal group g=MDI()set CK=TLIset KJ=QVIcall GroupEnumUnitsInRange(g,x,y,r,Condition(function IG1))call GroupRemoveUnit(g,TLI)call ForGroup(g,function IH1)call MCI(g)set g=nullendfunctionfunction IV1 takes unit N3I,item IW1 returns integerlocal integer i=0loopexitwhen i>5if UnitItemInSlot(N3I,i)==IW1 thenreturn iendifset i=i+1endloopreturn-1endfunctionfunction DelayedSetUnitPosition_Helper takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N3I=(LoadUnitHandle(XY,(MKI),(56)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))call SetUnitPosition(N3I,x,y)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset N3I=nullreturn falseendfunctionfunction IX1 takes real n1,real n2 returns integerif n1/n2-R2I(n1/n2)>=0.5 thenreturn R2I(n1/n2)+1endifreturn R2I(n1/n2)endfunctionfunction IY1 takes player p returns nothingif GetLocalPlayer()==p thencall ClearTextMessages()endifendfunctionfunction IJ1 takes unit u,real d returns nothingcall SetUnitState(u,UNIT_STATE_LIFE,RQI(GetUnitState(u,UNIT_STATE_LIFE)-d,1))endfunctionfunction IK1 takes integer IL1 returns nothinglocal unit u=CreateUnit(Player(15),IL1,0,0,0)call RemoveUnit(u)set u=nullendfunctionfunction IM1 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit u=(LoadUnitHandle(XY,(MKI),(53)))local real KLI=(LoadReal(XY,(MKI),(57)))local integer IN1=(LoadInteger(XY,(MKI),(58)))if GetTriggerEvalCount(t)/10>R2I(KLI)thencall SetUnitVertexColor(u,255,100,255,255)call FlushChildHashtable(XY,(MKI))call MZI(t)elseif QPI(u)==false thencall SetUnitVertexColor(u,255,100,255,IN1)endifset t=nullset u=nullreturn falseendfunctionfunction IS1 takes unit u,real KLI,integer IN1 returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.1,true)call TriggerAddCondition(t,Condition(function IM1))call SaveUnitHandle(XY,(MKI),(53),(u))call SaveReal(XY,(MKI),(57),((KLI)*1.0))call SaveInteger(XY,(MKI),(58),(IN1))set t=nullendfunctionfunction IT1 takes player IR1,integer IP1,unit IQ1 returns nothinglocal texttag t=CreateTextTag()local string scall SetPlayerState(IR1,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(IR1,PLAYER_STATE_RESOURCE_GOLD)+IP1)call SetTextTagText(t,"+"+I2S(IP1),0.025)call SetTextTagPosUnit(t,IQ1,0)call SetTextTagColor(t,255,220,0,255)call SetTextTagVelocity(t,0,0.03)if GetLocalPlayer()==IR1 thencall SetTextTagVisibility(t,true)set s="UI\\Feedback\\GoldCredit\\GoldCredit.mdl"elsecall SetTextTagVisibility(t,false)set s=""endifif GetUnitState(IQ1,UNIT_STATE_LIFE)>0.5 thencall DestroyEffect(AddSpecialEffectTarget(s,IQ1,"overhead"))endifcall SetTextTagFadepoint(t,2)call SetTextTagLifespan(t,3)call SetTextTagPermanent(t,false)endfunctionfunction IU1 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer O01=(LoadInteger(XY,(MKI),(59)))if UnitRemoveAbility(TMI,O01)==true or GetUnitAbilityLevel(TMI,O01)==0 thencall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TMI=nullreturn falseendfunctionfunction OI1 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer O01=(LoadInteger(XY,(MKI),(59)))call FlushChildHashtable(XY,(MKI))call MZI(t)if UnitRemoveAbility(TMI,O01)==false thenset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function IU1))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(59),(O01))endifset t=nullset TMI=nullreturn falseendfunctionfunction O11 takes unit TMI,integer O01,integer NGI,real KLI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call QTI(TMI,O01)call SetUnitAbilityLevel(TMI,O01,NGI)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerRegisterTimerEvent(t,KLI,false)call TriggerAddCondition(t,Condition(function OI1))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(59),(O01))set t=nullendfunctionfunction OO1 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer O01=(LoadInteger(XY,(MKI),(59)))local integer O21=(LoadInteger(XY,(MKI),(59)))call UnitRemoveAbility(TMI,O21)if UnitRemoveAbility(TMI,O01)==true or GetUnitAbilityLevel(TMI,O01)==0 thencall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TMI=nullreturn falseendfunctionfunction O31 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer O01=(LoadInteger(XY,(MKI),(59)))local integer O21=(LoadInteger(XY,(MKI),(60)))call FlushChildHashtable(XY,(MKI))call MZI(t)call UnitRemoveAbility(TMI,O21)if UnitRemoveAbility(TMI,O01)==false thenset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function OO1))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(59),(O01))call SaveInteger(XY,(MKI),(60),(O21))endifset t=nullset TMI=nullreturn falseendfunctionfunction O41 takes unit TMI,integer O01,integer NGI,real KLI,integer O21 returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call QTI(TMI,O01)call SetUnitAbilityLevel(TMI,O01,NGI)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerRegisterTimerEvent(t,KLI,false)call TriggerAddCondition(t,Condition(function O31))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(59),(O01))call SaveInteger(XY,(MKI),(60),(O21))set t=nullendfunctionfunction O51 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer O61=(LoadInteger(XY,(MKI),(61)))local integer O71=(LoadInteger(XY,(MKI),(62)))local unit u1=M6I(O61)local unit u2=M6I(O71)local real KLI=(LoadReal(XY,(MKI),(57)))local lightning QOI=(LoadLightningHandle(XY,(MKI),(41)))if I2R(GetTriggerEvalCount(t))*0.025>KLI thencall DestroyLightning(QOI)call M5I(O61)call M5I(O71)call FlushChildHashtable(XY,(MKI))call MZI(t)elsecall MoveLightning(QOI,true,GetUnitX(u1),GetUnitY(u1),GetUnitX(u2),GetUnitY(u2))endifset t=nullset u1=nullset u2=nullset QOI=nullreturn falseendfunctionfunction O81 takes string Q1I,unit u1,unit u2,real r,real g,real b,real a,real KLI returns nothinglocal real x1=GetUnitX(u1)local real y1=GetUnitY(u1)local real x2=GetUnitX(u2)local real y2=GetUnitY(u2)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local lightning QOI=AddLightning(Q1I,true,x1,y1,x2,y2)call SetLightningColor(QOI,r,g,b,a)call SaveLightningHandle(XY,(MKI),(41),(QOI))call SaveInteger(XY,(MKI),(61),(M8I(u1)))call SaveInteger(XY,(MKI),(62),(M8I(u2)))call SaveReal(XY,(MKI),(57),((KLI)*1.0))call TriggerRegisterTimerEvent(t,0.025,true)call TriggerAddCondition(t,Condition(function O51))set t=nullset QOI=nullendfunctionfunction O91 takes string OA1 returns nothinglocal sound OB1=CreateSound(OA1,false,false,false,10,10,"")call SetSoundVolume(OB1,0)call StartSound(OB1)call KillSoundWhenDone(OB1)set OB1=nullendfunctionfunction OC1 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local ubersplat OD1=(LoadUbersplatHandle(XY,(MKI),(131)))call DestroyUbersplat(OD1)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset OD1=nullreturn falseendfunctionfunction OE1 takes ubersplat OD1,real d returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SaveUbersplatHandle(XY,(MKI),(131),(OD1))call TriggerRegisterTimerEvent(t,d,false)call TriggerAddCondition(t,Condition(function OC1))set t=nullendfunctionfunction OF1 takes nothing returns nothinglocal real d=PAI(GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),NJ,SJ)if d<MJ thenset MJ=dset LJ=GetEnumUnit()endifendfunctionfunction OG1 takes group g,real x,real y returns unitset MJ=999999set LJ=nullset NJ=xset SJ=ycall ForGroup(g,function OF1)return LJendfunctionfunction OH1 takes integer QRI returns nothinglocal integer i=0loopexitwhen i>5call SetPlayerAbilityAvailable(BO[i],QRI,false)call SetPlayerAbilityAvailable(CO[i],QRI,false)set i=i+1endloopendfunctionfunction OZ1 takes integer id returns nothinglocal integer i=0loopexitwhen i>12call SetPlayerAbilityAvailable(Player(i),id,false)set i=i+1endloopendfunctionfunction DodgeSystem takes nothing returns nothingcall MPI(GetTriggerUnit(),4422,0.2)endfunctionfunction OV1 takes nothing returns booleanif GetSpellAbilityId()==1093678643 or GetSpellAbilityId()==1093677903 or GetSpellAbilityId()==1093681720 or GetSpellAbilityId()==1093752645 or GetSpellAbilityId()==1097425515 or GetSpellAbilityId()==1093813846 or GetSpellAbilityId()==1093684549 thencall MPI(GetTriggerUnit(),4422,0.2)endifreturn falseendfunctionfunction OY1 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))call FlushChildHashtable(XY,(MKI))call MZI(t)call SetUnitPathing(TLI,true)set t=nullset TLI=nullreturn falseendfunctionfunction OJ1 takes unit TLI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,5,false)call TriggerAddCondition(t,Condition(function OY1))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SetUnitPathing(TLI,false)set t=nullendfunctionfunction OK1 takes nothing returns nothingset ZN=CreateRegion()call RegionAddRect(ZN,G5)set WN=CreateRegion()call RegionAddRect(WN,H5)set HN=CreateRegion()call RegionAddRect(HN,O6)call RegionAddRect(HN,A6)call RegionAddRect(HN,B6)set VN=CreateRegion()call RegionAddRect(VN,C6)call RegionAddRect(VN,D6)call RegionAddRect(VN,E6)set XN=CreateRegion()call RegionAddRect(XN,F6)call RegionAddRect(XN,G6)call RegionAddRect(XN,H6)call RegionAddRect(XN,Z6)call RegionAddRect(XN,V6)call RegionAddRect(XN,W6)call RegionAddRect(XN,X6)call RegionAddRect(XN,Y6)call RegionAddRect(XN,J6)call RegionAddRect(XN,K6)call RegionAddRect(XN,L6)call RegionAddRect(XN,M6)call RegionAddRect(XN,N6)call RegionAddRect(XN,S6)call RegionAddRect(XN,T6)call RegionAddRect(XN,R6)call RegionAddRect(XN,P6)call RegionAddRect(XN,Q6)call RegionAddRect(XN,U6)call RegionAddRect(XN,I7)call RegionAddRect(XN,O7)call RegionAddRect(XN,A7)call RegionAddRect(XN,B7)call RegionAddRect(XN,C7)call RegionAddRect(XN,D7)call RegionAddRect(XN,E7)call RegionAddRect(XN,F7)call RegionAddRect(XN,G7)call RegionAddRect(XN,H7)call RegionAddRect(XN,Z7)call RegionAddRect(XN,V7)call RegionAddRect(XN,W7)call RegionAddRect(XN,X7)call RegionAddRect(XN,Y7)call RegionAddRect(XN,J7)call RegionAddRect(XN,K7)call RegionAddRect(XN,L7)call RegionAddRect(XN,M7)call RegionAddRect(XN,N7)call RegionAddRect(XN,S7)call RegionAddRect(XN,T7)call RegionAddRect(XN,R7)call RegionAddRect(XN,P7)call RegionAddRect(XN,Q7)call RegionAddRect(XN,U7)call RegionAddRect(XN,I8)call RegionAddRect(XN,O8)call RegionAddRect(XN,A8)call RegionAddRect(XN,B8)call RegionAddRect(XN,C8)call RegionAddRect(XN,D8)call RegionAddRect(XN,E8)call RegionAddRect(XN,F8)call RegionAddRect(XN,G8)call RegionAddRect(XN,H8)call RegionAddRect(XN,Z8)call RegionAddRect(XN,V8)call RegionAddRect(XN,W8)call RegionAddRect(XN,X8)call RegionAddRect(XN,Y8)call RegionAddRect(XN,J8)call RegionAddRect(XN,K8)call RegionAddRect(XN,L8)call RegionAddRect(XN,M8)call RegionAddRect(XN,N8)call RegionAddRect(XN,S8)call RegionAddRect(XN,T8)call RegionAddRect(XN,R8)call RegionAddRect(XN,P8)call RegionAddRect(XN,Q8)call RegionAddRect(XN,U8)call RegionAddRect(XN,I9)call RegionAddRect(XN,O9)call RegionAddRect(XN,A9)call RegionAddRect(XN,B9)call RegionAddRect(XN,C9)call RegionAddRect(XN,D9)call RegionAddRect(XN,E9)call RegionAddRect(XN,F9)call RegionAddRect(XN,G9)call RegionAddRect(XN,H9)call RegionAddRect(XN,Z9)call RegionAddRect(XN,V9)call RegionAddRect(XN,W9)call RegionAddRect(XN,X9)call RegionAddRect(XN,Y9)call RegionAddRect(XN,J9)call RegionAddRect(XN,K9)call RegionAddRect(XN,L9)call RegionAddRect(XN,M9)call RegionAddRect(XN,N9)call RegionAddRect(XN,S9)call RegionAddRect(XN,T9)call RegionAddRect(XN,R9)call RegionAddRect(XN,P9)set YN=CreateRegion()call RegionAddRect(YN,QB)call RegionAddRect(YN,IC)call RegionAddRect(YN,OC)call RegionAddRect(YN,AC)endfunctionfunction InitTrig_Regions takes nothing returns nothingcall OK1()endfunctionfunction OL1 takes unit OM1 returns booleanreturn GetUnitTypeId(OM1)==1848651828 or GetUnitTypeId(OM1)==1848652088 or GetUnitTypeId(OM1)==1848652099 or GetUnitTypeId(OM1)==1848652103endfunctionfunction ON1 takes integer id returns booleanreturn id==1311780941 or id==1211119431 or id==1211117657 or id==1211122232endfunctionfunction OS1 takes player p returns nothinglocal unit N0I=K1[GetPlayerId(p)]local integer i=0local item OT1loopexitwhen i>5set OT1=UnitItemInSlot(N0I,i)call SetItemDroppable(OT1,false)set i=i+1endloopset N0I=nullset OT1=nullendfunctionfunction OR1 takes player p returns nothinglocal unit N0I=K1[GetPlayerId(p)]local integer i=0local item OT1loopexitwhen i>5set OT1=UnitItemInSlot(N0I,i)call SetItemDroppable(OT1,true)set i=i+1endloopset N0I=nullset OT1=nullendfunctionfunction OP1 takes unit u returns booleanreturn GetUnitAbilityLevel(u,1097167980)>0 or GetUnitAbilityLevel(u,1113815395)>0 or GetUnitAbilityLevel(u,1113815346)>0 or GetUnitAbilityLevel(u,1110454606)>0endfunctionfunction OQ1 takes unit u returns booleanreturn(GetUnitAbilityLevel((u),(1111844210))>0)or(GetUnitAbilityLevel((u),(1110454583))>0)or(GetUnitAbilityLevel((u),(1110459730))>0)endfunctionfunction OU1 takes unit u returns booleanreturn(GetUnitAbilityLevel((u),(1110459185))>0)or(GetUnitAbilityLevel((u),(1111844210))>0)or(GetUnitAbilityLevel((u),(1113943655))>0)or(GetUnitAbilityLevel((u),(1113943649))>0)or(GetUnitAbilityLevel((u),(1110454583))>0)or(GetUnitAbilityLevel((u),(1110456120))>0)or(GetUnitAbilityLevel((u),(1110456390))>0)or(GetUnitAbilityLevel((u),(1110456389))>0)or(GetUnitAbilityLevel((u),(1110459730))>0)or(GetUnitAbilityLevel((u),(1110459982))>0)endfunctionfunction A01 takes unit u returns nothingcall UnitRemoveAbility(u,1110459185)call UnitRemoveAbility(u,1111844210)call UnitRemoveAbility(u,1113943655)call UnitRemoveAbility(u,1113943649)call UnitRemoveAbility(u,1110454583)call UnitRemoveAbility(u,1110456120)call UnitRemoveAbility(u,1110456390)call UnitRemoveAbility(u,1110456389)call UnitRemoveAbility(u,1110459730)call UnitRemoveAbility(u,1110459982)endfunctionfunction AI1 takes unit u returns booleanreturn(GetUnitAbilityLevel((u),(1110454344))>0)or(GetUnitAbilityLevel((u),(1112500344))>0)or(GetUnitAbilityLevel((u),(1112560453))>0)or(GetUnitAbilityLevel((u),(1110456633))>0)or(GetUnitAbilityLevel((u),(1112757326))>0)or(GetUnitAbilityLevel((u),(1110459206))>0)or(GetUnitAbilityLevel((u),(1110458957))>0)or(GetUnitAbilityLevel((u),(1110455885))>0)or(GetUnitAbilityLevel((u),(1110456142))>0)or(GetUnitAbilityLevel((u),(1110456403))>0)or(GetUnitAbilityLevel((u),(1110454353))>0)or(GetUnitAbilityLevel((u),(1110455382))>0)or(GetUnitAbilityLevel((u),(1110456114))>0)or(GetUnitAbilityLevel((u),(1112891758))>0)or(GetUnitAbilityLevel((u),(1110456629))>0)or(GetUnitAbilityLevel((u),(1110455113))>0)or(GetUnitAbilityLevel((u),(1110458692))>0)or(GetUnitAbilityLevel((u),(1110458693))>0)or(GetUnitAbilityLevel((u),(1110458949))>0)or(GetUnitAbilityLevel((u),(1110458950))>0)or(GetUnitAbilityLevel((u),(1110454328))>0)or(GetUnitAbilityLevel((u),(1110455362))>0)or(GetUnitAbilityLevel((u),(1110454854))>0)or(GetUnitAbilityLevel((u),(1112896368))>0)or(GetUnitAbilityLevel((u),(1112896372))>0)or(GetUnitAbilityLevel((u),(1110459460))>0)or((LoadInteger(XY,(GetHandleId((u))),((4293))))==1)==true or((LoadInteger(XY,(GetHandleId((u))),((4303))))==1)or(GetUnitAbilityLevel((u),(1110459186))>0)or(GetUnitAbilityLevel((u),(1110455891))>0)or(GetUnitAbilityLevel((u),(1110454867))>0)or(GetUnitAbilityLevel((u),(1110456133))>0)endfunctionfunction A11 takes unit u returns booleanreturn AI1(u)or OU1(u)or IsUnitPaused(u)or THI(u)endfunctionfunction AO1 takes integer id returns booleanreturn id==1093682265 or id==1093752642 or id==1093677622 or id==1093679446 or id==1095263841 or id==1093684314 or id==1093685582 or id==1093685065 or id==1093817677endfunctionfunction A21 takes unit u returns booleanreturn OQ1(u)or(GetUnitAbilityLevel((u),(1110454606))>0)or GetUnitAbilityLevel(u,1097167980)>0 or GetUnitAbilityLevel(u,1096971630)>0 or(GetUnitAbilityLevel((u),(1110455091))>0)or(GetUnitAbilityLevel((u),(1110460228))>0)endfunctionfunction A31 takes integer A41,integer A51,boolean extraColor returns nothinglocal integer x=0loopexitwhen x>15call SetPlayerState(Player(x),PLAYER_STATE_RESOURCE_LUMBER,A41)call SetPlayerState(Player(x),PLAYER_STATE_RESOURCE_FOOD_USED,A51)set x=x+1endloopendfunctionfunction A61 takes unit u returns booleanlocal integer id=GetUnitTypeId(u)return id==1848652343 or id==1966092596 or id==1966092597 or id==1966092598 or id==1966092612 or id==1966092613 or id==1966092614 or id==1966092599 or id==1966092601 or id==1966092600 or id==1966092609 or id==1966092610 or id==1966092611endfunctionfunction A71 takes unit u,boolean b returns nothingcall SetUnitInvulnerable(u,b)call SaveBoolean(XY,(GetHandleId(u)),(509),(b))endfunctionfunction A81 takes unit u returns booleanreturn(LoadBoolean(XY,(GetHandleId(u)),(509)))or GetUnitAbilityLevel(u,1098282348)>0endfunctionfunction A91 takes unit u returns booleanreturn((LoadInteger(XY,(GetHandleId((u))),((4420))))==1)or((LoadInteger(XY,(GetHandleId((u))),((4421))))==1)endfunctionfunction AA1 takes real x,real y returns locationlocal real U2Ilocal real U3Ilocal integer i=0loopexitwhen i>40set U2I=x+i*20set U3I=y+i*20if IsPointInRegion(XN,U2I,U3I)==false thenreturn Location(U2I,U3I)endifset U2I=x+i*20set U3I=y-i*20if IsPointInRegion(XN,U2I,U3I)==false thenreturn Location(U2I,U3I)endifset U2I=x-i*20set U3I=y+i*20if IsPointInRegion(XN,U2I,U3I)==false thenreturn Location(U2I,U3I)endifset U2I=x-i*20set U3I=y-i*20if IsPointInRegion(XN,U2I,U3I)==false thenreturn Location(U2I,U3I)endifset i=i+1endloopreturn Location(x,y)endfunctionfunction AB1 takes unit u returns nothingcall UnitRemoveAbility(u,1096971630)call SaveInteger(XY,(GetHandleId(u)),(790),(0))endfunctionfunction AC1 takes unit u returns nothinglocal integer MKI=GetHandleId(u)local integer AD1=(LoadInteger(XY,(MKI),(790)))call QTI(u,1096971630)set AD1=AD1+1call SaveInteger(XY,(MKI),(790),(AD1))endfunctionfunction AE1 takes unit u returns nothinglocal integer MKI=GetHandleId(u)local integer AD1=(LoadInteger(XY,(MKI),(790)))set AD1=IMaxBJ(AD1-1,0)call SaveInteger(XY,(MKI),(790),(AD1))if AD1==0 thencall AB1(u)endifendfunctionfunction AF1 takes unit u returns booleanif u==BS0 thenreturn trueendifif u==BT0 thenreturn trueendifif u==BR0 thenreturn trueendifif u==BP0 thenreturn trueendifif u==BQ0 thenreturn trueendifif u==BU0 thenreturn trueendifif u==C00 thenreturn trueendifif u==CI0 thenreturn trueendifif u==C10 thenreturn trueendifif u==CO0 thenreturn trueendifif u==C20 thenreturn trueendifif u==C30 thenreturn trueendifif u==C40 thenreturn trueendifif u==C50 thenreturn trueendifif u==C60 thenreturn trueendifif u==C70 thenreturn trueendifif u==C80 thenreturn trueendifif u==I20 thenreturn trueendifif u==I30 thenreturn trueendifif u==I40 thenreturn trueendifif u==I50 thenreturn trueendifif u==I60 thenreturn trueendifif u==I70 thenreturn trueendifif u==I80 thenreturn trueendifif u==I90 thenreturn trueendifif u==IA0 thenreturn trueendifif u==IB0 thenreturn trueendifif u==IC0 thenreturn trueendifif u==ID0 thenreturn trueendifif u==IE0 thenreturn trueendifif u==IF0 thenreturn trueendifif u==IG0 thenreturn trueendifif u==IH0 thenreturn trueendifif u==IZ0 thenreturn trueendifreturn falseendfunctionfunction AG1 takes unit u returns booleanreturn GetUnitAbilityLevel(u,1110455864)>0 or GetUnitAbilityLevel(u,1110456148)>0 or GetUnitAbilityLevel(u,1110456118)>0 or GetUnitAbilityLevel(u,1112504171)>0 or GetUnitAbilityLevel(u,1110455378)>0 or GetUnitAbilityLevel(u,1110458677)>0 or GetUnitAbilityLevel(u,1110454609)>0 or GetUnitAbilityLevel(u,1110454326)>0 or GetUnitAbilityLevel(u,1114205814)>0 or GetUnitAbilityLevel(u,1097886070)>0 or GetUnitAbilityLevel(u,1093677617)>0 or GetUnitAbilityLevel(u,1093684020)>0 or GetUnitAbilityLevel(u,1093687362)>0 or GetUnitAbilityLevel(u,1093687858)>0 or GetUnitAbilityLevel(u,1093748545)>0 or GetUnitAbilityLevel(u,1093748823)>0 or GetUnitAbilityLevel(u,1093748824)>0 or GetUnitAbilityLevel(u,1093677130)>0 or GetUnitAbilityLevel(u,1110456395)>0 or GetUnitAbilityLevel(u,1110456408)>0 or GetUnitAbilityLevel(u,1110455097)>0 or GetUnitAbilityLevel(u,1110454347)>0 or GetUnitAbilityLevel(u,1112041075)>0 or GetUnitAbilityLevel(u,1093743664)>0 or GetUnitAbilityLevel(u,1110454833)>0 or GetUnitAbilityLevel(u,1093687876)>0 or GetUnitAbilityLevel(u,1093684052)>0 or GetUnitAbilityLevel(u,1110460216)>0 or GetUnitAbilityLevel(u,1093817392)>0 or GetUnitAbilityLevel(u,1093817178)>0endfunctionfunction AH1 takes unit u,player p returns booleanreturn AG1(u)==false or IsUnitVisible(GetFilterUnit(),p)==trueendfunctionfunction AZ1 takes unit N3I returns booleanlocal integer AV1=GetUnitTypeId(N3I)return AV1==1848651828 or AV1==1848652103 or AV1==1848652099 or AV1==1848652088 or AV1==1697656907 or AV1==1697656905 or AV1==1697656908 or AV1==1697657162endfunctionfunction AW1 takes nothing returns booleanreturn GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==falseendfunctionfunction GenericCondition_BasicsWithSiege takes nothing returns booleanreturn(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 or(GetUnitTypeId(GetFilterUnit())==1970107511 or GetUnitTypeId(GetFilterUnit())==1966092370 or GetUnitTypeId(GetFilterUnit())==1700946284 or GetUnitTypeId(GetFilterUnit())==1697657398))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==falseendfunctionfunction AX1 takes nothing returns booleanreturn(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and GetUnitAbilityLevel(GetFilterUnit(),1093751362)==0endfunctionfunction GenericCondition_BasicsAndVisible takes nothing returns booleanreturn(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))endfunctionfunction GenericCondition_BasicsAndStructure takes nothing returns booleanreturn GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and QPI(GetFilterUnit())==falseendfunctionfunction GenericCondition_Structure takes nothing returns booleanreturn IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==true and GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and QPI(GetFilterUnit())==falseendfunctionfunction GenericCondition_EnemyUnitsExNoImmuneNoInvisAndStructure takes nothing returns booleanreturn T6I(GetFilterUnit())==false and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(CK))and IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit()))endfunctionfunction AY1 takes nothing returns booleanreturn T6I(GetFilterUnit())==false and IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit()))endfunctionfunction GenericCondition_EnemyUnitsExNoImmuneNoInvisAndStructureWithAncient takes nothing returns booleanreturn T6I(GetFilterUnit())==false and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(CK))and IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and QPI(GetFilterUnit())==false)endfunctionfunction GenericCondition_EnemyUnitsExNoInvisAndStructureWithAncient takes nothing returns booleanreturn IsUnitVisible(GetFilterUnit(),GetOwningPlayer(CK))and IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and QPI(GetFilterUnit())==false)endfunctionfunction AJ1 takes nothing returns booleanreturn IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitTypeId(GetFilterUnit())==1700946284 or GetUnitTypeId(GetFilterUnit())==1970107511)endfunctionfunction AK1 takes nothing returns booleanreturn IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit()))endfunctionfunction GenericCondition_EnemyUnitsVisible takes nothing returns booleanreturn(IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))endfunctionfunction GenericCondition_EnemyUnitsAndVisibleOrWW takes nothing returns booleanreturn(IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))and(IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))or AG1(GetFilterUnit()))endfunctionfunction AL1 takes nothing returns booleanreturn IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)endfunctionfunction AM1 takes nothing returns booleanreturn IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))and((GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 or(GetUnitTypeId(GetFilterUnit())==1970107511 or GetUnitTypeId(GetFilterUnit())==1966092370 or GetUnitTypeId(GetFilterUnit())==1700946284 or GetUnitTypeId(GetFilterUnit())==1697657398))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)endfunctionfunction AN1 takes nothing returns booleanreturn IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(CK))endfunctionfunction AS1 takes nothing returns booleanreturn IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(AG1(GetFilterUnit())==false or IsUnitVisible(GetFilterUnit(),GetOwningPlayer(CK))==true)endfunctionfunction AT1 takes nothing returns booleanreturn IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit()))endfunctionfunction GenericCondition_EnemyUnitsExHeroesVision takes nothing returns booleanreturn(IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(CK))endfunctionfunction AR1 takes nothing returns booleanreturn(IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==trueendfunctionfunction GenericCondition_EnemyUnitsExHeroesNoDotaInvis takes nothing returns booleanreturn((IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true)and AG1(GetFilterUnit())==falseendfunctionfunction AP1 takes nothing returns booleanreturn((IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true)and(AG1(GetFilterUnit())==false or IsUnitVisible(GetFilterUnit(),GetOwningPlayer(CK))==true)endfunctionfunction GenericCondition_EnemyUnitsExNoHeroes takes nothing returns booleanreturn(IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==falseendfunctionfunction AQ1 takes nothing returns booleanreturn(IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))and GetUnitAbilityLevel(GetFilterUnit(),1093751362)==0endfunctionfunction AU1 takes nothing returns booleanreturn T6I(GetFilterUnit())==false and IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit()))endfunctionfunction B01 takes nothing returns booleanreturn T6I(GetFilterUnit())==false and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(CK))and IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit()))endfunctionfunction GenericCondition_EnemyUnitsExNoImmuneNoInvisWithAncient takes nothing returns booleanreturn T6I(GetFilterUnit())==false and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(CK))and IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)endfunctionfunction BI1 takes nothing returns booleanreturn T6I(GetFilterUnit())==false and IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)endfunctionfunction B11 takes nothing returns booleanreturn IsUnitVisible(GetFilterUnit(),GetOwningPlayer(CK))and IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)endfunctionfunction BO1 takes nothing returns booleanreturn IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)endfunctionfunction GenericCondition_EnemyUnitsNoNeutrals takes nothing returns booleanreturn IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and GetOwningPlayer(GetFilterUnit())!=DOendfunctionfunction B21 takes nothing returns booleanreturn IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit()))endfunctionfunction B31 takes nothing returns booleanreturn IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))==false and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit()))endfunctionfunction B41 takes nothing returns booleanreturn IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))==false and(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==true and GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit()))endfunctionfunction B51 takes nothing returns booleanreturn(IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==falseendfunctionfunction B61 takes nothing returns booleanreturn T6I(GetFilterUnit())==false and(IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))endfunctionfunction GenericCondition_EnemyUnitsAndStructureWithAncientsEx takes nothing returns booleanreturn IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and QPI(GetFilterUnit())==false)endfunctionfunction B71 takes nothing returns booleanreturn IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))==false and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit()))endfunctionfunction B81 takes nothing returns booleanreturn IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))==false and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)endfunctionfunction B91 takes nothing returns booleanreturn IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))==false and NXI(GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)endfunctionfunction BA1 takes nothing returns booleanreturn IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))==false and NXI(GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)endfunctionfunction BB1 takes nothing returns booleanreturn IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))==false and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)endfunctionfunction BC1 takes nothing returns booleanreturn IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))==false and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit()))endfunctionfunction BD1 takes nothing returns booleanreturn IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))==false and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit()))endfunctionfunction GenericCondition_MyUnitsEx takes nothing returns booleanreturn GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(CK)and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit()))endfunctionfunction GenericCondition_MyUnits takes nothing returns booleanreturn GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(GetTriggerUnit())and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit()))endfunctionfunction BE1 takes nothing returns booleanreturn(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true or GetOwningPlayer(GetFilterUnit())==BO[0]or GetOwningPlayer(GetFilterUnit())==CO[0])and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))==false and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit()))endfunctionfunction BF1 takes nothing returns booleanreturn IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitIllusion(GetFilterUnit())==false and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))==false and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit()))endfunctionfunction BG1 takes nothing returns booleanreturn IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))==false and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit()))endfunctionfunction BH1 takes nothing returns booleanreturn IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))==true and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit()))endfunctionfunction BZ1 takes nothing returns booleanreturn T6I(GetFilterUnit())==false and(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))==true and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))endfunctionfunction BV1 takes nothing returns booleanreturn IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))==true and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit()))and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))endfunctionfunction BW1 takes nothing returns booleanreturn IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))==true and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit()))endfunctionfunction GenericCondition_EnemyHeroesExNoDotAInvis takes nothing returns booleanreturn IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))==true and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)or AG1(GetEnumUnit())endfunctionfunction BX1 takes nothing returns booleanreturn T6I(GetFilterUnit())==false and(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))==true and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))endfunctionfunction GenericCondition_AllUnits takes nothing returns booleanreturn(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit()))endfunctionfunction BY1 takes nothing returns booleanreturn((GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))and GetUnitAbilityLevel(GetFilterUnit(),1093751362)==0endfunctionfunction GenericCondition_AllNonNeutrals takes nothing returns booleanreturn(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and GetOwningPlayer(GetFilterUnit())!=DOendfunctionfunction BJ1 takes nothing returns booleanreturn(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)endfunctionfunction BK1 takes nothing returns booleanreturn(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit()))and GetUnitTypeId(GetFilterUnit())!=1211123027endfunctionfunction BL1 takes nothing returns booleanreturn IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and GetTriggerUnit()!=GetFilterUnit()and IsUnitIllusion(GetFilterUnit())==falseendfunctionfunction GenericCondition_AllHeroesAndIllusions takes nothing returns booleanreturn(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true or IsUnitIllusion(GetFilterUnit())==true)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit()))endfunctionfunction GenericCondition_Hero takes nothing returns booleanreturn IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==trueendfunctionfunction GenericCondition_EnemyUnitsExVisible takes nothing returns booleanreturn(IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(CK))endfunctionfunction BM1 takes nothing returns booleanreturn((IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(CK)))and GetUnitTypeId(GetFilterUnit())!=1848657461endfunctionfunction GenericCondition_EnemyUnitsExNoWW takes nothing returns booleanreturn(IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))and(IsUnitVisible(GetFilterUnit(),GetOwningPlayer(CK))or(IsUnitVisible(GetFilterUnit(),GetOwningPlayer(CK))==false and AG1(GetFilterUnit()))==false)endfunctionfunction GenericCondition_EnemyUnitsExVisibleAttackable takes nothing returns booleanreturn((IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(CK)))and OP1(GetFilterUnit())==falseendfunctionfunction GenericCondition_EnemyUnitsExVisibleAttackableNoZombie takes nothing returns booleanreturn(((IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(CK)))and OP1(GetFilterUnit())==false)and GetUnitTypeId(GetFilterUnit())!=1848657461endfunctionfunction GenericCondition_RegularUnits takes nothing returns booleanreturn(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit()))endfunctionfunction GenericCondition_RegularUnitsExVisible takes nothing returns booleanreturn((GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(CK))endfunctionfunction BN1 takes nothing returns booleanreturn T6I(GetFilterUnit())==false and((GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(CK))endfunctionfunction BS1 takes nothing returns booleanreturn GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and QPI(GetFilterUnit())==true and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==false and IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false and GetUnitTypeId(GetFilterUnit())!=1848657461endfunctionfunction GenericCondition_FloatingHeroes takes nothing returns booleanreturn GetUnitTypeId(GetFilterUnit())==1211117637 or GetUnitTypeId(GetFilterUnit())==1211117639 or GetUnitTypeId(GetFilterUnit())==1211117638 or GetUnitTypeId(GetFilterUnit())==1160786000 or GetUnitTypeId(GetFilterUnit())==1311780930 or GetUnitTypeId(GetFilterUnit())==1430468144 or GetUnitTypeId(GetFilterUnit())==1162032951 or GetUnitTypeId(GetFilterUnit())==1429221456 or GetUnitTypeId(GetFilterUnit())==1160786510 or GetUnitTypeId(GetFilterUnit())==1160786511 or GetUnitTypeId(GetFilterUnit())==1328558390 or GetUnitTypeId(GetFilterUnit())==1328558391 or GetUnitTypeId(GetFilterUnit())==1160786502 or GetUnitTypeId(GetFilterUnit())==1211122767 or GetUnitTypeId(GetFilterUnit())==1311788343 or GetUnitTypeId(GetFilterUnit())==1311788354 or GetUnitTypeId(GetFilterUnit())==1311788355 or GetUnitTypeId(GetFilterUnit())==1311788367 or GetUnitTypeId(GetFilterUnit())==1311788353 or GetUnitTypeId(GetFilterUnit())==1311788375endfunctionfunction BT1 takes nothing returns booleanreturn IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(CK))==true and SHI(GetFilterUnit())>0endfunctionfunction BR1 takes real BP1 returns integerif BP1>=4.00 thenreturn 24elseif BP1>=3.75 thenreturn 23elseif BP1>=3.5 thenreturn 22elseif BP1>=3.25 thenreturn 21elseif BP1>=3 thenreturn 20elseif BP1>=2.8 thenreturn 19elseif BP1>=2.75 thenreturn 18elseif BP1>=2.6 thenreturn 17elseif BP1>=2.5 thenreturn 16elseif BP1>=2.4 thenreturn 15elseif BP1>=2.25 thenreturn 14elseif BP1>=2.2 thenreturn 13elseif BP1>=2 thenreturn 12elseif BP1>=1.8 thenreturn 11elseif BP1>=1.75 thenreturn 10elseif BP1>=1.65 thenreturn 9elseif BP1>=1.5 thenreturn 8elseif BP1>=1.4 thenreturn 7elseif BP1>=1.25 thenreturn 6elseif BP1>=1.2 thenreturn 5elseif BP1>=1 thenreturn 4elseif BP1>=0.75 thenreturn 3elseif BP1>=0.5 thenreturn 2elseif BP1>=0.25 thenreturn 1endifreturn 1endfunctionfunction BQ1 takes unit TLI,unit TMI,real BP1 returns nothinglocal unit QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)local integer NGI=BR1(BP1)call UnitAddAbility(QHI,1093687350)call SetUnitAbilityLevel(QHI,1093687350,NGI)call IssueTargetOrder(QHI,"thunderbolt",TMI)set QHI=nullendfunctionfunction BU1 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer C01=(LoadInteger(XY,(MKI),(73)))local unit N0I=M6I(C01)local integer MFI=GetTriggerEvalCount(t)local real y=(MFI-13)*(MFI-13)if MFI<26 thenif T9I(N0I)==false thencall SetUnitFlyHeight(N0I,375-y,0)endifelsecall PauseUnit(N0I,false)if T9I(N0I)==false thencall SetUnitFlyHeight(N0I,GetUnitDefaultFlyHeight(N0I),0)endifcall TKI((LoadUnitHandle(XY,(MKI),(2))),N0I,1,(LoadReal(XY,(MKI),(20))))call BQ1((LoadUnitHandle(XY,(MKI),(2))),N0I,(LoadReal(XY,(MKI),(57))))call M5I(C01)call FlushChildHashtable(XY,(MKI))call MZI(t)endifreturn falseendfunctionfunction CI1 takes unit N0I,unit TLI,real KLI,real C11,real CO1 returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call PauseUnit(N0I,true)if T9I(N0I)==false thencall UnitAddAbility(N0I,1097691750)call UnitRemoveAbility(N0I,1097691750)endifcall DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\Impale\\ImpaleHitTarget.mdl",GetUnitX(N0I),GetUnitY(N0I)))call SaveInteger(XY,(MKI),(73),(M8I(N0I)))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(20),((C11)*1.0))call SaveReal(XY,(MKI),(57),((KLI)*1.0))call TriggerRegisterTimerEvent(t,0.02/0.52*CO1,true)call TriggerAddCondition(t,Condition(function BU1))endfunctionfunction C21 takes nothing returns nothingif IsUnitInGroup(GetEnumUnit(),HK)==false and T6I(GetEnumUnit())==false and((LoadInteger(XY,(GetHandleId((GetEnumUnit()))),((4253))))==1)==false thencall GroupAddUnit(HK,GetEnumUnit())call CI1(GetEnumUnit(),CK,UJ,QJ,IK)endifendfunctionfunction C31 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real C11=(LoadReal(XY,(MKI),(20)))local real KLI=(LoadReal(XY,(MKI),(57)))local real x1=(LoadReal(XY,(MKI),(64)))local real y1=(LoadReal(XY,(MKI),(65)))local real x2=(LoadReal(XY,(MKI),(66)))local real y2=(LoadReal(XY,(MKI),(67)))local real w=(LoadReal(XY,(MKI),(68)))local real C41=(LoadReal(XY,(MKI),(44)))local real a=Atan2(y2-y1,x2-x1)local group g=(LoadGroupHandle(XY,(MKI),(22)))local group C51=MDI()local real C61=C41*0.0625local real C71=(LoadReal(XY,(MKI),(71)))local real C81=(LoadReal(XY,(MKI),(72)))local real C91=(LoadReal(XY,(MKI),(70)))local real CA1=(LoadReal(XY,(MKI),(63)))if C61>PAI(x1,y1,x2,y2)thenset x1=x2set y1=y2elseset x1=x1+C61*Cos(a)set y1=y1+C61*Sin(a)endifset CK=TLIset QJ=C11set UJ=KLIset IK=CA1set HK=gcall GroupEnumUnitsInRange(C51,x1,y1,w,Condition(function AT1))call ForGroup(C51,function C21)call MCI(C51)if PAI(x1,y1,C71,C81)>=C91 thencall SaveReal(XY,(MKI),(71),((x1)*1.0))call SaveReal(XY,(MKI),(72),((y1)*1.0))call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\Impale\\ImpaleMissTarget.mdl",x1,y1))endifcall SaveReal(XY,(MKI),(64),((x1)*1.0))call SaveReal(XY,(MKI),(65),((y1)*1.0))if x1==x2 and y1==y2 thenif(LoadBoolean(XY,(MKI),(69)))==true thencall MCI(g)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)endifset g=nullset C51=nullset TLI=nullset t=nullreturn falseendfunctionfunction CB1 takes unit TLI,unit CC1,real C11,real KLI,real CA1,real x1,real y1,real x2,real y2,real w,group CD1,boolean CE1,real C41 returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real P3I=PAI(x1,y1,x2,y2)local integer CF1=IX1(P3I,JN)local real C91=P3I/CF1local group gcall SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(20),((C11)*1.0))call SaveReal(XY,(MKI),(57),((KLI)*1.0))call SaveReal(XY,(MKI),(63),((CA1)*1.0))call SaveReal(XY,(MKI),(64),((x1)*1.0))call SaveReal(XY,(MKI),(65),((y1)*1.0))call SaveReal(XY,(MKI),(66),((x2)*1.0))call SaveReal(XY,(MKI),(67),((y2)*1.0))call SaveReal(XY,(MKI),(68),((w)*1.0))call SaveReal(XY,(MKI),(44),((C41)*1.0))if CD1==null thenset g=MDI()if CC1!=null and IsUnitIllusion(CC1)==false thencall GroupAddUnit(g,CC1)endifcall SaveGroupHandle(XY,(MKI),(22),(g))call SaveBoolean(XY,(MKI),(69),(CE1))set g=nullelsecall SaveGroupHandle(XY,(MKI),(22),(CD1))call SaveBoolean(XY,(MKI),(69),(CE1))endifcall SaveReal(XY,(MKI),(70),((C91)*1.0))call SaveReal(XY,(MKI),(71),((x1)*1.0))call SaveReal(XY,(MKI),(72),((y1)*1.0))call TriggerRegisterTimerEvent(t,0.0625,true)call TriggerAddCondition(t,Condition(function C31))set t=nullendfunctionfunction CG1 takes unit TLI,integer NGI,integer CH1 returns nothinglocal integer iif EPI[1]==0 thenreturnendifset i=1loopexitwhen i>10call UnitRemoveAbility(TLI,EPI[i])set i=i+1endloopset i=1loopexitwhen i>10call UnitRemoveAbility(TLI,EQI[i])set i=i+1endloopset i=1loopexitwhen i>10call UnitRemoveAbility(TLI,EUI[i])set i=i+1endloopset i=1loopexitwhen i>10call UnitRemoveAbility(TLI,F0I[i])set i=i+1endloopcall UnitRemoveAbility(TLI,1110458963)if NGI==1 thencall UnitAddAbility(TLI,EPI[CH1])elseif NGI==2 thencall UnitAddAbility(TLI,EQI[CH1])elseif NGI==3 thencall UnitAddAbility(TLI,EUI[CH1])elseif NGI==4 thencall UnitAddAbility(TLI,F0I[CH1])endifendfunctionfunction CZ1 takes integer CV1 returns nothingset LN=LN+1set KN[LN]=CV1endfunctionfunction CW1 takes unit u returns nothinglocal integer i=1loopexitwhen i>LNcall UnitRemoveAbility(u,KN[i])set i=i+1endloopendfunctionfunction CY1 takes integer QRI returns booleanreturn QRI==1095331943 or QRI==1093677654 or QRI==1094938741 or QRI==1093744708 or QRI==1093750613 or QRI==1095328633 or QRI==1093751617 or QRI==1093817394endfunctionfunction CJ1 takes unit TMI returns nothingcall UnitRemoveAbility(TMI,1097167980)call UnitRemoveAbility(TMI,1112044643)call UnitRemoveAbility(TMI,1093752627)call UnitRemoveAbility(TMI,1110459471)call UnitRemoveAbility(TMI,1110454869)call CG1(TMI,0,0)endfunctionfunction CK1 takes nothing returns booleanif CY1(GetSpellAbilityId())thencall CJ1(GetSpellTargetUnit())endifreturn falseendfunctionfunction CM1 takes integer CN1 returns integerif FT0[CN1]==0 thenreturn CN1elsereturn FT0[CN1]endifendfunctionfunction CS1 takes integer id returns booleanreturn id==HF0 or id==HD0 or id==HC0 or id==HE0 or id==HB0endfunctionfunction CT1 takes unit N3I,integer PSI returns booleanlocal integer L9Ilocal item PTIset L9I=0loopexitwhen L9I>5set PTI=UnitItemInSlot(N3I,L9I)if PTI!=null and GetItemTypeId(PTI)==PSI thenset PTI=nullreturn trueendifset L9I=L9I+1endloopset PTI=nullreturn falseendfunctionfunction CR1 takes item IW1 returns integerlocal integer PSIlocal integer i=1if IW1==null thenreturn-2endifset PSI=GetItemTypeId(IW1)loopexitwhen i>FR0if FJ0[i]==PSI or FK0[i]==PSI or FM0[i]==PSI thenreturn iendifset i=i+1endloopreturn-1endfunctionfunction CP1 takes item IW1 returns integerlocal integer PSIlocal integer i=1if IW1==null thenreturn-2endifset PSI=GetItemTypeId(IW1)loopexitwhen i>FR0if FJ0[i]==PSI or FK0[i]==PSI thenreturn iendifset i=i+1endloopreturn-1endfunctionfunction CQ1 takes unit N3I returns integerlocal integer CU1if N3I==null thenreturn-2endifset CU1=GetUnitTypeId(N3I)if CU1==1214409837 or CU1==1211119192 or CU1==1211119193 or CU1==1211119191 or CU1==1211122243 thenreturn J20elseif CU1==1211117620 thenreturn J50elseif CU1==1430466872 thenreturn J60elseif CU1==1215130471 thenreturn JA0elseif CU1==1432580716 or CU1==1429221720 thenreturn K90elseif CU1==1211117640 thenreturn JC0elseif CU1==1430466609 thenreturn JD0elseif CU1==1332898670 thenreturn JE0elseif CU1==1215128178 thenreturn JZ0elseif CU1==1214931305 thenreturn JF0elseif CU1==1433168227 thenreturn J40elseif CU1==1164666213 thenreturn J30elseif CU1==1164799603 thenreturn JO0elseif CU1==1162032439 thenreturn JG0elseif CU1==1429221445 thenreturn J90elseif CU1==1160785973 thenreturn J80elseif CU1==1160786241 thenreturn JH0elseif CU1==1430467634 thenreturn J70elseif CU1==1315988077 thenreturn JR0elseif CU1==1211117652 thenreturn JW0elseif CU1==1215723364 thenreturn JX0elseif CU1==1315070563 thenreturn JY0elseif CU1==1211117633 thenreturn JK0elseif CU1==1432646245 thenreturn JL0elseif CU1==1160786000 thenreturn JM0elseif CU1==1429221451 thenreturn JN0elseif CU1==1211117649 thenreturn JS0elseif CU1==1211117653 thenreturn JT0elseif CU1==1429221446 thenreturn JP0elseif CU1==1311786311 thenreturn JQ0elseif CU1==1162032181 thenreturn JU0elseif CU1==1328558154 thenreturn K00elseif CU1==1332963428 thenreturn KI0elseif CU1==1432642913 thenreturn K10elseif CU1==1311781207 thenreturn KO0elseif CU1==1211117643 thenreturn K20elseif CU1==1332766568 thenreturn K30elseif CU1==1333027688 thenreturn K40elseif CU1==1211117650 thenreturn JB0elseif CU1==1211119433 thenreturn JB0elseif CU1==1311780930 thenreturn K50elseif CU1==1160786243 thenreturn K60elseif CU1==1160785970 thenreturn K70elseif CU1==1162032951 thenreturn K80elseif CU1==1429221456 thenreturn KA0elseif CU1==1164799855 thenreturn KB0elseif CU1==1211117646 thenreturn KC0elseif CU1==1160786510 or CU1==1160786511 thenreturn KD0elseif CU1==1211117641 thenreturn KE0elseif CU1==1211117636 thenreturn KF0elseif CU1==1430468144 thenreturn KG0elseif CU1==1311781185 thenreturn KH0elseif CU1==1311787088 thenreturn KZ0elseif CU1==1214345830 thenreturn KV0elseif CU1==1211122767 thenreturn KW0elseif CU1==1433105516 thenreturn KX0elseif CU1==1160786506 thenreturn KJ0elseif CU1==1160786520 thenreturn KY0elseif CU1==1316252014 thenreturn KK0elseif CU1==1160786504 thenreturn KL0endifreturn J10endfunctionfunction D01 takes unit N3I returns integerlocal integer CU1if N3I==null thenreturn-2endifset CU1=GetUnitTypeId(N3I)if CU1==1214409837 or CU1==1211119192 or CU1==1211119193 or CU1==1211119191 or CU1==1211122243 thenreturn 1093686348elseif CU1==1211117620 thenreturn 1093686352elseif CU1==1430466872 thenreturn 1093686354elseif CU1==1215130471 thenreturn 1093815124elseif CU1==1432580716 or CU1==1429221720 thenreturn 0elseif CU1==1211117640 thenreturn 1093686358elseif CU1==1430466609 thenreturn 1093686360elseif CU1==1332898670 thenreturn 1093686362elseif CU1==1215128178 thenreturn 1093686577elseif CU1==1214931305 thenreturn 1093686579elseif CU1==1433168227 thenreturn 1093686581elseif CU1==1164666213 thenreturn 1093686583elseif CU1==1164799603 thenreturn 1093686585elseif CU1==1162032439 thenreturn 1093686594elseif CU1==1429221445 thenreturn 1093686596elseif CU1==1160785973 thenreturn 1093686598elseif CU1==1160786241 thenreturn 1093686600elseif CU1==1430467634 thenreturn 1093686602elseif CU1==1315988077 thenreturn 1093747269elseif CU1==1211117652 thenreturn 1093747257elseif CU1==1215723364 thenreturn 1093747265elseif CU1==1315070563 thenreturn 1093747266elseif CU1==1211117633 thenreturn 1093747541elseif CU1==1432646245 thenreturn 1093747271elseif CU1==1160786000 thenreturn 1093747274elseif CU1==1429221451 thenreturn 1093747267elseif CU1==1211117649 thenreturn 1093747273elseif CU1==1211117653 thenreturn 1093747268elseif CU1==1429221446 thenreturn 1093747545elseif CU1==1311786311 thenreturn 1093747762elseif CU1==1162032181 thenreturn 1093747761elseif CU1==1328558154 thenreturn 1093747546elseif CU1==1332963428 thenreturn 1093747760elseif CU1==1432642913 thenreturn 1093747763elseif CU1==1311781207 thenreturn 1093747764elseif CU1==1211117643 thenreturn 1093748529elseif CU1==1332766568 thenreturn 1093750100elseif CU1==1333027688 thenreturn 1093750320elseif CU1==1311780930 thenreturn 1093751123elseif CU1==1160786243 thenreturn 1093752148elseif CU1==1160785970 thenreturn 1093752149elseif CU1==1162032951 thenreturn 1093752369elseif CU1==1429221456 thenreturn 1093752409elseif CU1==1164799855 thenreturn 1093752644elseif CU1==1211117646 thenreturn 1093808467elseif CU1==1160786510 or CU1==1160786511 thenreturn 1093808951elseif CU1==1211117641 thenreturn 1093809989elseif CU1==1211117636 thenreturn 1093810241elseif CU1==1430468144 thenreturn 1093814600elseif CU1==1311781185 thenreturn 1093816642elseif CU1==1311787088 thenreturn 1093816646elseif CU1==1214345830 thenreturn 1093817143elseif CU1==1211122767 thenreturn 1093817431elseif CU1==1433105516 thenreturn 1093817434elseif CU1==1160786506 thenreturn 1093817923elseif CU1==1160786520 thenreturn 1093817924elseif CU1==1316252014 thenreturn 1093818180elseif CU1==1160786504 thenreturn 1093818439endifreturn 0endfunctionfunction DI1 takes item OT1 returns booleanlocal integer i=1loopexitwhen i>LW0if OT1==LV0[i]thenreturn trueendifset i=i+1endloopreturn falseendfunctionfunction D11 takes item IW1 returns booleanlocal integer CN1=CR1(IW1)if CN1==J10 or CN1==JO0 or CN1==J20 or CN1==J30 or CN1==J40 or CN1==J50 or CN1==J60 or CN1==J70 or CN1==J80 or CN1==J90 or CN1==JA0 or CN1==JC0 or CN1==JD0 or CN1==JE0 or CN1==JF0 or CN1==JG0 or CN1==JH0 or CN1==JZ0 or CN1==JW0 or CN1==JX0 or CN1==JY0 or CN1==JK0 or CN1==JL0 or CN1==JM0 or CN1==JN0 or CN1==JS0 or CN1==JT0 or CN1==JP0 or CN1==JQ0 or CN1==JU0 or CN1==K00 or CN1==KI0 or CN1==K10 or CN1==KO0 or CN1==K20 or CN1==JR0 or CN1==K30 or CN1==K40 thenreturn trueelseif CN1==K50 or CN1==K60 or CN1==K70 or CN1==K80 or CN1==K90 or CN1==KA0 or CN1==KB0 or CN1==KC0 or CN1==KD0 or CN1==KE0 or CN1==KF0 or CN1==KG0 or CN1==KZ0 or CN1==KH0 or CN1==KV0 or CN1==KX0 or CN1==KW0 or CN1==KJ0 or CN1==KY0 or CN1==KK0 thenreturn trueendifreturn falseendfunctionfunction DO1 takes integer CN1 returns booleanreturn CN1==WD0 or CN1==Z50 or CN1==HQ0 or CN1==Z00 or CN1==ZI0 or CN1==ZO0 or CN1==Z20 or CN1==Z30 or CN1==HU0 or CN1==Z80 or CN1==Z90 or CN1==Z70endfunctionfunction D21 takes integer CN1 returns booleanreturn CN1==WQ0 or CN1==HJ0 or CN1==ZP0 or CN1==ZQ0 or CN1==WG0 or CN1==VG0 or CN1==HG0 or CN1==WM0 or CN1==HL0endfunctionfunction D31 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer PSI=(LoadInteger(XY,(MKI),(74)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local player p=(LoadPlayerHandle(XY,(MKI),(54)))local boolean D41=(LoadBoolean(XY,(MKI),(75)))local integer D51=(LoadInteger(XY,(MKI),(76)))local item D61=CreateItem(PSI,x,y)call SetItemPlayer(D61,p,true)call SetItemUserData(D61,0)if D41 thencall SetItemCharges(D61,D51)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset p=nullreturn falseendfunctionfunction D71 takes integer PSI,real x,real y,player p,boolean D41,integer D51 returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SaveInteger(XY,(MKI),(74),(PSI))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))call SavePlayerHandle(XY,(MKI),(54),(p))call SaveBoolean(XY,(MKI),(75),(D41))call SaveInteger(XY,(MKI),(76),(D51))call TriggerAddCondition(t,Condition(function D31))call TriggerRegisterTimerEvent(t,0,false)set t=nullendfunctionfunction DisableItemTriggers takes nothing returns nothingcall DisableTrigger(L30)endfunctionfunction EnableItemTriggers takes nothing returns nothingcall EnableTrigger(L30)endfunctionfunction D81 takes item IW1 returns nothingcall DisableTrigger(L30)call RemoveItem(IW1)call EnableTrigger(L30)endfunctionfunction D91 takes unit N3I,integer PSI,item DA1 returns itemlocal integer L9Ilocal item PTIset L9I=0loopexitwhen L9I>5set PTI=UnitItemInSlot(N3I,L9I)if PTI!=null and PTI!=DA1 and GetItemTypeId(PTI)==PSI thenset PTI=nullreturn UnitItemInSlot(N3I,L9I)endifset L9I=L9I+1endloopset PTI=nullreturn nullendfunctionfunction DB1 takes unit N3I,integer PSI returns itemlocal integer L9Ilocal item PTIset L9I=0loopexitwhen L9I>5set PTI=UnitItemInSlot(N3I,L9I)if(PTI!=null)and(GetItemTypeId(PTI)==PSI)thenset PTI=nullreturn UnitItemInSlot(N3I,L9I)endifset L9I=L9I+1endloopset PTI=nullreturn nullendfunctionfunction DC1 takes player p,unit N3I,integer CN1,item DA1 returns itemlocal integer L9Ilocal item PTIset L9I=0loopexitwhen L9I>5set PTI=UnitItemInSlot(N3I,L9I)if PTI!=null and PTI!=DA1 and CR1(PTI)==CN1 and(GetItemPlayer(PTI)==p or CN1==ZO0 or CN1==Z20)thenset PTI=nullreturn UnitItemInSlot(N3I,L9I)endifset L9I=L9I+1endloopset PTI=nullreturn nullendfunctionfunction DD1 takes player p,unit N3I,integer CN1 returns itemlocal integer L9Ilocal item PTIset L9I=0loopexitwhen L9I>5set PTI=UnitItemInSlot(N3I,L9I)if(PTI!=null)and(CR1(PTI)==CN1)and(GetItemPlayer(PTI)==p or CN1==ZO0 or CN1==Z20)thenset PTI=nullreturn UnitItemInSlot(N3I,L9I)endifset L9I=L9I+1endloopset PTI=nullreturn nullendfunctionfunction DE1 takes unit N3I,integer CN1 returns itemlocal integer L9Ilocal item PTIset L9I=0loopexitwhen L9I>5set PTI=UnitItemInSlot(N3I,L9I)if(PTI!=null)and(CR1(PTI)==CN1)thenset PTI=nullreturn UnitItemInSlot(N3I,L9I)endifset L9I=L9I+1endloopset PTI=nullreturn nullendfunctionfunction DF1 takes unit N3I returns integerlocal integer i=0local integer n=0local integer DG1=UnitInventorySize(N3I)-1loopexitwhen i>DG1if UnitItemInSlot(N3I,i)==null thenset n=n+1endifset i=i+1endloopreturn nendfunctionfunction DH1 takes item IW1 returns integerlocal integer PSIlocal integer i=1if IW1==null thenreturn-2endifset PSI=GetItemTypeId(IW1)loopexitwhen i>FR0if FJ0[i]==PSI or FK0[i]==PSI thenreturn iendifset i=i+1endloopreturn-1endfunctionfunction DZ1 takes item IW1 returns integerlocal integer PSIlocal integer i=1if IW1==null thenreturn-2endifset PSI=GetItemTypeId(IW1)loopexitwhen i>FR0if FM0[i]==PSI thenreturn iendifset i=i+1endloopreturn-1endfunctionfunction DV1 takes item IW1 returns integerlocal integer PSIlocal integer i=1if IW1==null thenreturn-2endifset PSI=GetItemTypeId(IW1)loopexitwhen i>FR0if FM0[i]==PSI thenreturn FK0[i]endifset i=i+1endloopreturn-1endfunctionfunction DW1 takes unit N3I returns integerlocal integer CU1local integer i=0if N3I==null thenreturn-2endifset CU1=GetUnitTypeId(N3I)loopexitwhen i>FR0if FL0[i]==CU1 thenreturn iendifset i=i+1endloopreturn-1endfunctionfunction DX1 takes item DY1 returns stringif DY1==null thenreturn"UI\\Widgets\\Console\\Undead\\undead-inventory-slotfiller.blp"endifreturn FN0[CR1(DY1)]endfunctionfunction DJ1 takes item IW1 returns booleanreturn CR1(IW1)==VR0 or CR1(IW1)==VP0 or CR1(IW1)==GB0 or CR1(IW1)==GC0endfunctionfunction DK1 takes integer CN1 returns integerif ZI0==CN1 thenreturn 4endifif ZO0==CN1 or Z20==CN1 or Z60==CN1 or HU0==CN1 or Z80==CN1 or Z70==CN1 thenreturn 2endifreturn 1endfunctionfunction DL1 takes item IW1 returns booleanreturn GetItemType(IW1)==ITEM_TYPE_POWERUP or GetItemType(IW1)==ITEM_TYPE_PURCHASABLE or GetItemType(IW1)==ITEM_TYPE_MISCELLANEOUSendfunctionfunction DM1 takes unit N3I,integer PSI returns booleanlocal item OT1local boolean DN1=falselocal boolean DS1=trueset OT1=CreateItem(PSI,GetUnitX(N3I),GetUnitY(N3I))if GetUnitAbilityLevel(N3I,1095331446)==0 thenset DN1=truecall QTI(N3I,1095331446)endifif UnitAddItem(N3I,OT1)==false thencall RemoveItem(OT1)set DS1=falseelseif GetWidgetLife(OT1)>0 thencall RemoveItem(OT1)set DS1=falseendifif DN1 thencall UnitRemoveAbility(N3I,1095331446)endifset OT1=nullreturn DS1endfunctionfunction DT1 takes unit N0I returns reallocal real DR1if NZI(GetOwningPlayer(N0I))thenset DR1=GetRectCenterX(O4)elseset DR1=GetRectCenterX(S3)endifreturn DR1endfunctionfunction DP1 takes unit N0I returns reallocal real DR1if NZI(GetOwningPlayer(N0I))thenset DR1=GetRectCenterY(O4)elseset DR1=GetRectCenterY(S3)endifreturn DR1endfunctionfunction DQ1 takes unit N0I,integer DU1,integer E01 returns itemlocal real x=DT1(N0I)local real y=DP1(N0I)local item OT1=CreateItem(DU1,x,y)local integer i=0local boolean array EI1local item E11call DisableTrigger(L30)if DU1>0 thenloopexitwhen i>(UnitInventorySize(N0I)-1)if UnitItemInSlot(N0I,i)==null and i!=E01 thenset E11=CreateItem(1227895373,x,y)call UnitAddItem(N0I,E11)set EI1[i]=trueelseset EI1[i]=falseendifif i==E01 thencall EnableTrigger(L30)call UnitAddItem(N0I,OT1)call DisableTrigger(L30)endifset i=i+1endloopset i=0loopexitwhen i>5if EI1[i]==true thencall RemoveItem(UnitItemInSlot(N0I,i))endifset i=i+1endloopendifcall EnableTrigger(L30)set FK=OT1set OT1=nullset E11=nullreturn FKendfunctionfunction EO1 takes integer NBI,integer r,integer g,integer b returns nothingset RN=RN+1set MN[RN]=rset NN[RN]=gset SN[RN]=bset TN[RN]=NBIendfunctionfunction E21 takes unit u returns nothinglocal integer id=GetUnitTypeId(u)local integer i=1local integer a=255local boolean E31=falseif id==1165451634 thenset a=R2I(2.55*(100-18+20*GetUnitAbilityLevel(u,1093677904)))endifloopexitwhen i>RN or E31if TN[i]==id thenset E31=truecall SetUnitVertexColor(u,MN[i],NN[i],SN[i],a)endifset i=i+1endloopif E31==false thencall SetUnitVertexColor(u,255,255,255,255)endifendfunctionfunction E41 takes unit u returns nothinglocal integer id=GetUnitTypeId(u)local integer i=1local boolean E31=falseloopexitwhen i>RN or E31if TN[i]==id thenset E31=truecall SetUnitVertexColor(u,MN[i],NN[i],SN[i],0)endifset i=i+1endloopif E31==false thencall SetUnitVertexColor(u,255,255,255,0)endifendfunctionfunction E51 takes player p,string E61,integer PHI returns nothinglocal string id=I2S(GetPlayerId(p))call StoreInteger(PN,id,E61,PHI)if NYI(WO)==false thencall TBI()endifif GetLocalPlayer()==WO thencall SyncStoredInteger(PN,id,E61)endifendfunctionfunction E71 takes string E81,integer PHI returns nothingcall StoreInteger(PN,"Data",E81,PHI)if NYI(WO)==false thencall TBI()endifif GetLocalPlayer()==WO thencall SyncStoredInteger(PN,"Data",E81)endifendfunctionfunction E91 takes nothing returns nothingcall FlushGameCache(InitGameCache("dr.x"))set PN=InitGameCache("dr.x")endfunctionfunction InitTrig_Traffic_Functions takes nothing returns nothingcall E91()endfunctionfunction EA1 takes string s,string EB1,string EC1 returns stringlocal string ED1=""local integer i=0local integer EE1=StringLength(s)local string EF1local integer EG1=StringLength(EB1)local boolean E31=falseloopexitwhen i+1>EE1set EF1=SubString(s,i,i+EG1)if EF1!=EB1 or E31 thenset ED1=ED1+SubString(s,i,i+1)set i=i+1elseset ED1=ED1+EC1set i=i+EG1set E31=trueendifendloopreturn ED1endfunctionfunction EH1 takes player EZ1,player EV1 returns stringlocal string s=GetObjectName(1848656696)set s=EA1(s,"$dead",C0[GetPlayerId(EZ1)]+(D30[GetPlayerId((EZ1))])+"|r")set s=EA1(s,"$killer",C0[GetPlayerId(EV1)]+(D30[GetPlayerId((EV1))])+"|r")return sendfunctionfunction EW1 takes unit u,integer d returns nothinglocal integer array blocal integer a=dlocal integer c=1local integer i=0local integer DG1if d<1 thencall UnitRemoveAbility(u,QN[0])call UnitRemoveAbility(u,QN[1])call UnitRemoveAbility(u,QN[2])call UnitRemoveAbility(u,QN[3])call UnitRemoveAbility(u,QN[4])call UnitRemoveAbility(u,QN[5])call UnitRemoveAbility(u,QN[6])call UnitRemoveAbility(u,QN[7])call UnitRemoveAbility(u,QN[8])returnendifloopexitwhen c==0set c=a/2set b[i]=a-c*2set a=cset i=i+1endloopset DG1=8set i=0loopexitwhen i>DG1if b[i]==1 thencall UnitAddAbility(u,QN[i])elsecall UnitRemoveAbility(u,QN[i])endifset i=i+1endloopendfunctionfunction EY1 takes unit u,integer d returns nothinglocal integer array blocal integer a=dlocal integer c=1local integer i=0local integer DG1if d<1 thencall UnitRemoveAbility(u,UN[0])call UnitRemoveAbility(u,UN[1])call UnitRemoveAbility(u,UN[2])call UnitRemoveAbility(u,UN[3])call UnitRemoveAbility(u,UN[4])call UnitRemoveAbility(u,UN[5])call UnitRemoveAbility(u,UN[6])call UnitRemoveAbility(u,UN[7])call UnitRemoveAbility(u,UN[8])returnendifloopexitwhen c==0set c=a/2set b[i]=a-c*2set a=cset i=i+1endloopset DG1=8set i=0loopexitwhen i>DG1if b[i]==1 thencall UnitAddAbility(u,UN[i])elsecall UnitRemoveAbility(u,UN[i])endifset i=i+1endloopendfunctionfunction EK1 takes unit u,integer d returns nothinglocal integer array blocal integer a=dlocal integer c=1local integer i=0local integer DG1if d<1 thencall UnitRemoveAbility(u,IS[0])call UnitRemoveAbility(u,IS[1])call UnitRemoveAbility(u,IS[2])call UnitRemoveAbility(u,IS[3])call UnitRemoveAbility(u,IS[4])call UnitRemoveAbility(u,IS[5])call UnitRemoveAbility(u,IS[6])call UnitRemoveAbility(u,IS[7])call UnitRemoveAbility(u,IS[8])call UnitRemoveAbility(u,IS[9])call UnitRemoveAbility(u,IS[10])returnendifloopexitwhen c==0set c=a/2set b[i]=a-c*2set a=cset i=i+1endloopset DG1=10set i=0loopexitwhen i>DG1if b[i]==1 thencall UnitAddAbility(u,IS[i])elsecall UnitRemoveAbility(u,IS[i])endifset i=i+1endloopendfunctionfunction EM1 takes unit u,integer d returns nothinglocal integer array blocal integer a=dlocal integer c=1local integer i=0local integer DG1if d<1 thencall UnitRemoveAbility(u,OS[0])call UnitRemoveAbility(u,OS[1])call UnitRemoveAbility(u,OS[2])call UnitRemoveAbility(u,OS[3])call UnitRemoveAbility(u,OS[4])call UnitRemoveAbility(u,OS[5])call UnitRemoveAbility(u,OS[6])call UnitRemoveAbility(u,OS[7])call UnitRemoveAbility(u,OS[8])returnendifloopexitwhen c==0set c=a/2set b[i]=a-c*2set a=cset i=i+1endloopset DG1=8set i=0loopexitwhen i>DG1if b[i]==1 thencall UnitAddAbility(u,OS[i])elsecall UnitRemoveAbility(u,OS[i])endifset i=i+1endloopendfunctionfunction ES1 takes unit u,integer d returns nothinglocal integer array blocal integer a=dlocal integer c=1local integer i=0local integer DG1if d<1 thencall UnitRemoveAbility(u,BS[0])call UnitRemoveAbility(u,BS[1])call UnitRemoveAbility(u,BS[2])call UnitRemoveAbility(u,BS[3])call UnitRemoveAbility(u,BS[4])call UnitRemoveAbility(u,BS[5])returnendifloopexitwhen c==0set c=a/2set b[i]=a-c*2set a=cset i=i+1endloopset DG1=iset i=0loopexitwhen i>DG1if b[i]==1 thencall UnitAddAbility(u,BS[i])elsecall UnitRemoveAbility(u,BS[i])endifset i=i+1endloopendfunctionfunction ER1 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local player p=(LoadPlayerHandle(XY,(MKI),(54)))local integer i=(LoadInteger(XY,(MKI),(77)))local string c="|c006699CC"if GetObjectName(1848657992)=="Language: English"and(DL0[(i)]!="")thenif GetTriggerEvalCount(t)==1 thenelseif GetTriggerEvalCount(t)==2 thencall DisplayTimedTextToPlayer(p,0,0,15,"Tip 1: "+c+DL0[i]+"|r")call IF1(LE,p)elseif GetTriggerEvalCount(t)==3 thencall DisplayTimedTextToPlayer(p,0,0,15,"Tip 2: "+c+DM0[i]+"|r")call IF1(LE,p)elseif GetTriggerEvalCount(t)==4 thencall DisplayTimedTextToPlayer(p,0,0,15,"Tip 3: "+c+DN0[i]+"|r")call IF1(LE,p)elseif GetTriggerEvalCount(t)==5 thencall DisplayTimedTextToPlayer(p,0,0,15,"Tip 4: "+c+DS0[i]+"|r")call IF1(LE,p)elseif GetTriggerEvalCount(t)==6 thencall DisplayTimedTextToPlayer(p,0,0,15,"Tip 5: "+c+DT0[i]+"|r")call IF1(LE,p)endifendifif GetTriggerEvalCount(t)==5 thencall MZI(t)call FlushChildHashtable(XY,(MKI))endifreturn falseendfunctionfunction EP1 takes player p,integer i returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,10,false)call TriggerRegisterTimerEvent(t,15,false)call TriggerRegisterTimerEvent(t,300,true)call TriggerAddCondition(t,Condition(function ER1))call SavePlayerHandle(XY,(MKI),(54),(p))call SaveInteger(XY,(MKI),(77),(i))set t=nullendfunctionfunction EQ1 takes unit TLI returns integerlocal integer SVI=GetUnitTypeId(TLI)local integer EU1=1865429328if SVI==1432646245 thenset EU1=1865429326elseif SVI==1164799855 or SVI==1211117641 or SVI==1211119409 or SVI==1160785973 thenset EU1=1865429327endifreturn EU1endfunctionfunction F01 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))if GetTriggerEventId()==EVENT_UNIT_DEATH thencall KillUnit(QHI)call FlushChildHashtable(XY,(MKI))call MZI(t)elsecall SetUnitX(QHI,GetUnitX(TLI))call SetUnitY(QHI,GetUnitY(TLI))endifset t=nullset TLI=nullset QHI=nullreturn falseendfunctionfunction FI1 takes unit TLI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit QHI=CreateUnit(GetOwningPlayer(TLI),EQ1(TLI),GetUnitX(TLI),GetUnitY(TLI),0)call TriggerRegisterTimerEvent(t,0.1,true)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function F01))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(19),(QHI))set t=nullendfunctionfunction F11 takes integer CU1 returns booleanlocal integer i=0loopexitwhen i>59if CU1==DS[i]thenreturn trueendifset i=i+1endloopreturn falseendfunctionfunction FO1 takes integer NGI returns integerlocal real F21=TimerGetElapsed(M)-Nlocal real A41=(R2I(F21)/60)-(1/2)local real F31=100+NGI*NGI*1.5+A41*15local integer L9Iset L9I=R2I(F31/50)set L9I=IMinBJ(L9I,59)set L9I=IMaxBJ(L9I,0)return L9Iendfunctionfunction F41 takes player p returns nothinglocal integer id=GetPlayerId(p)local unit F51=D00[id]local unit N0I=K1[id]local integer NGI=GetHeroLevel(N0I)local integer i=0loopexitwhen i>59call RemoveUnitFromStock(F51,DS[i])set i=i+1endloopif X0==true thenreturnendifif T60==false thenreturnendifcall AddUnitToStock(F51,DS[FO1(NGI)],1,1)set ES[id]=DS[FO1(NGI)]set N0I=nullset F51=nullendfunctionfunction F61 takes player p returns nothinglocal integer id=GetPlayerId(p)local unit F51=D00[id]local unit N0I=K1[id]local integer NGI=GetHeroLevel(N0I)local integer i=0if X0==true thenreturnendifif T60==false thenreturnendifif ES[id]==1747993652 thenreturnendifif ES[id]!=0 thencall RemoveUnitFromStock(F51,ES[id])endifcall AddUnitToStock(F51,DS[FO1(NGI)],1,1)set ES[id]=DS[FO1(NGI)]set N0I=nullset F51=nullendfunctionfunction F71 takes nothing returns booleanif X0==true thenreturn falseendifcall F61(BO[1])call F61(BO[2])call F61(BO[3])call F61(BO[4])call F61(BO[5])call F61(CO[1])call F61(CO[2])call F61(CO[3])call F61(CO[4])call F61(CO[5])return falseendfunctionfunction F81 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer id=(LoadInteger(XY,(MKI),(34)))local unit F51=D00[id]local unit N0I=K1[id]local integer NGI=GetHeroLevel(N0I)local integer i=0call RemoveUnitFromStock(F51,1747993652)call AddUnitToStock(F51,DS[FO1(NGI)],1,1)set ES[id]=DS[FO1(NGI)]call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset N0I=nullreturn falseendfunctionfunction F91 takes player p returns nothinglocal integer id=GetPlayerId(p)local unit F51=D00[id]local unit N0I=K1[id]local integer NGI=GetHeroLevel(N0I)local integer i=0local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call FI1(N0I)loopexitwhen i>59call RemoveUnitFromStock(F51,DS[i])set i=i+1endloopcall TriggerAddCondition(t,Condition(function F81))call TriggerRegisterTimerEvent(t,360,false)call SaveInteger(XY,(MKI),(34),(id))set ES[id]=1747993652call RemoveUnitFromStock(F51,1747993652)call AddUnitToStock(F51,1747993652,0,1)set N0I=nullset F51=nullset t=nullendfunctionfunction FB1 takes unit N0I returns nothinglocal real FC1=1local integer FD1=UnitInventorySize(N0I)local integer x=0local item ilocal integer NGI=GetUnitAbilityLevel(N0I,1093677904)if NGI>0 thenif NGI==1 thenset FC1=FC1*0.8elseif NGI==2 thenset FC1=FC1*0.7elseif NGI==3 thenset FC1=FC1*0.6elseif NGI==4 thenset FC1=FC1*0.5endifendifset NGI=GetUnitAbilityLevel(N0I,1093684568)if NGI>0 thenset FC1=FC1*(1-(0.05+0.05*NGI))endifloopexitwhen x>FD1set i=UnitItemInSlot(N0I,x)if DH1(i)==W60 thenset FC1=FC1*0.65elseif DH1(i)==HV0 or DH1(i)==X20 thenset FC1=FC1*0.75endifset x=x+1endloopset NGI=R2I((1-FC1)/0.05)if NGI>0 thencall SetPlayerAbilityAvailable(GetOwningPlayer(N0I),1093817906,false)call QTI(N0I,1093817906)call UnitMakeAbilityPermanent(N0I,true,1093817907)call SetUnitAbilityLevel(N0I,1093817907,NGI)elsecall UnitRemoveAbility(N0I,1093817906)endifset i=nullendfunctionfunction FE1 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))call FB1(N0I)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset N0I=nullreturn falseendfunctionfunction FF1 takes unit N0I returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerAddCondition(t,Condition(function FE1))call TriggerRegisterTimerEvent(t,0,false)call SaveUnitHandle(XY,(MKI),(14),(N0I))set t=nullendfunctionfunction FG1 takes nothing returns booleanif GetItemType(GetManipulatedItem())==ITEM_TYPE_PERMANENT and(DH1(GetManipulatedItem())==W60 or DH1(GetManipulatedItem())==HV0 or DH1(GetManipulatedItem())==X20)thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_PICKUP_ITEM thencall FB1(GetTriggerUnit())elsecall FF1(GetTriggerUnit())endifendifreturn falseendfunctionfunction FZ1 takes unit TLI,real FV1 returns realloopif FV1>25 thenset FV1=FV1-25elseset FV1=FV1-5endifcall SetUnitMoveSpeed(TLI,FV1)exitwhen GetUnitMoveSpeed(TLI)<522endloopreturn FV1endfunctionfunction FW1 takes unit TLI returns reallocal real FV1local integer CH1=(LoadInteger(XY,(GetHandleId(TLI)),(814)))local integer NGIlocal real b1local real r1local real b2local real r2local real FY1local real FJ1if GetUnitMoveSpeed(TLI)==522 and CH1>0 thenset FV1=GetUnitDefaultMoveSpeed(TLI)set NGI=GetUnitAbilityLevel(TLI,1093683512)set b1=FZ1(TLI,FV1)set r1=GetUnitMoveSpeed(TLI)set b2=FZ1(TLI,b1)set r2=GetUnitMoveSpeed(TLI)set FY1=(r1-r2)/(b1-b2)-1set FJ1=r1/(1+FY1)-b1set FY1=RPI(FY1,NGI*0.07*CH1+1)call SetUnitMoveSpeed(TLI,FV1)return(FV1+FJ1)*(1+FY1)elsereturn GetUnitMoveSpeed(TLI)endifendfunctionfunction FK1 takes unit TLI returns reallocal real ms=GetUnitMoveSpeed(TLI)if(LoadInteger(XY,(GetHandleId(TLI)),(814)))>0 thenset ms=FW1(TLI)endifif((LoadInteger(XY,(GetHandleId((TLI))),((4423))))==1)==true thenset ms=1000.endifreturn msendfunctionfunction FL1 takes unit TLI,real FM1,real FN1,real FS1 returns nothinglocal real x=GetUnitX(TLI)local real y=GetUnitY(TLI)local real a=Atan2(y-FN1,x-FM1)local real d=PAI(x,y,FM1,FN1)local real ms=GetUnitMoveSpeed(TLI)if TZI(TLI)==false and FS1>ms and d>10*0.005 thenset x=RCI(x+(FS1-ms)*0.005*Cos(a))set y=RGI(y+(FS1-ms)*0.005*Sin(a))call SetUnitX(TLI,x)call SetUnitY(TLI,y)endifendfunctionfunction FT1 takes nothing returns nothingset XY=InitHashtable()set M=CreateTimer()set YS=Rect(-7040,-7680,7040,7168)call SetFloatGameState(GAME_STATE_TIME_OF_DAY,6.00)call SuspendTimeOfDay(false)call SetTimeOfDayScale(0.5)call SetSkyModel("Environment\\Sky\\FoggedSky\\FoggedSky.mdl")call SetCreepCampFilterState(true)set D3="Normal Mode"call TimerStart(M,99999.00,false,null)set V3=AddWeatherEffect(bj_mapInitialPlayableArea,1380018290)set Z3=AddWeatherEffect(bj_mapInitialPlayableArea,1397645939)set WS=AddWeatherEffect(bj_mapInitialPlayableArea,1280470369)set XS=AddWeatherEffect(bj_mapInitialPlayableArea,1464822903)set BO[0]=Player(0)set BO[1]=Player(1)set BO[2]=Player(2)set BO[3]=Player(3)set BO[4]=Player(4)set BO[5]=Player(5)set CO[0]=Player(6)set CO[1]=Player(7)set CO[2]=Player(8)set CO[3]=Player(9)set CO[4]=Player(10)set CO[5]=Player(11)set DO=Player(12)set EO=Player(15)call SetUnitPathing(IZ,false)call SetUnitPathing(OZ,false)call SetUnitPathing(EZ,false)call SetUnitPathing(UH,false)call SetUnitPathing(PH,false)call A71(PH,true)call A71(UH,true)call A71(EZ,true)call A71(OZ,true)call A71(IZ,true)set U0=GetUnitLoc(PH)set II=GetUnitLoc(IZ)set BI=GetUnitLoc(EZ)set CI=GetUnitLoc(UH)set DI=GetUnitLoc(OZ)set I2=1093678663set O2[1]=IIset O2[2]=CIset O2[3]=BIset O2[4]=DIset O2[5]=U0set TI=GetRectCenter(M3)set RI=GetRectCenter(N3)set PI=GetRectCenter(L3)set QI=GetRectCenter(U3)set I1=GetRectCenter(I4)set UI=GetRectCenter(Q3)set O1=GetRectCenter(C4)set B1=GetRectCenter(B4)set A1=GetRectCenter(A4)set C1=GetRectCenter(P3)set E1=GetRectCenter(R3)set D1=GetRectCenter(T3)set F1=GetRectCenter(G4)set G1=GetRectCenter(D4)set J2=trueendfunctionfunction InitTrig_Map takes nothing returns nothingcall FT1()endfunctionfunction FR1 takes nothing returns nothingset MS=GetUnitX(RZ)set SS=GetUnitY(RZ)set TS=GetUnitX(IV)set PS=GetUnitY(IV)set QS=GetUnitX(QZ)set US=GetUnitY(QZ)set IT=GetUnitX(PZ)set OT=GetUnitY(PZ)set AT=GetUnitX(DW)set BT=GetUnitY(DW)set CT=GetUnitX(DZ)set DT=GetUnitY(DZ)set ET=GetUnitX(BZ)set FT=GetUnitY(BZ)set GT=GetUnitX(QH)set HT=GetUnitY(QH)set ZT=GetUnitX(FZ)set VT=GetUnitY(FZ)set WT=GetUnitX(OV)set XT=GetUnitY(OV)set WT=GetUnitX(OV)set XT=GetUnitY(OV)set YT=GetUnitX(EY)set JT=GetUnitY(EY)set KT=GetUnitX(TH)set LT=GetUnitY(TH)set MT=GetUnitX(DV)set ST=GetUnitY(DV)set RT=GetUnitX(CV)set PT=GetUnitY(CV)set QT=GetUnitX(AV)set UT=GetUnitY(AV)set IR=GetUnitX(EV)set OR=GetUnitY(EV)set BR=GetUnitX(GZ)set CR=GetUnitY(GZ)set DR=GetUnitX(BV)set GR=GetUnitY(BV)set HR=GetUnitX(GV)set ZR=GetUnitY(GV)set WR=GetUnitX(FV)set XR=GetUnitY(FV)set YR=GetUnitX(JV)set JR=GetUnitY(JV)set KR=GetUnitX(ZV)set LR=GetUnitY(ZV)set SR=GetUnitX(HV)set RR=GetUnitY(HV)set PR=GetUnitX(VV)set QR=GetUnitY(VV)set UR=GetUnitX(YV)set IP=GetUnitY(YV)set OP=GetUnitX(XV)set BP=GetUnitY(XV)set DP=GetUnitX(WV)set EP=GetUnitY(WV)set FP=GetUnitX(LV)set GP=GetUnitY(LV)set ZP=GetUnitX(KV)set VP=GetUnitY(KV)set WP=GetUnitX(SV)set XP=GetUnitY(SV)set YP=GetUnitX(NV)set JP=GetUnitY(NV)set KP=GetUnitX(TV)set LP=GetUnitY(TV)set MP=GetUnitX(PV)set TP=GetUnitY(PV)set RP=GetUnitX(QV)set PP=GetUnitY(QV)set QP=GetUnitX(MV)set UP=GetUnitY(MV)set IQ=GetUnitX(IW)set OQ=GetUnitY(IW)set AQ=GetUnitX(OW)set BQ=GetUnitY(OW)set CQ=GetUnitX(UV)set DQ=GetUnitY(UV)set EQ=GetUnitX(AW)set FQ=GetUnitY(AW)set GQ=GetUnitX(BW)set HQ=GetUnitY(BW)set ZQ=GetUnitX(UZ)set VQ=GetUnitY(UZ)set WQ=GetUnitX(CW)set XQ=GetUnitY(CW)set YQ=GetUnitX(FW)set JQ=GetUnitY(FW)set KQ=GetUnitX(EW)set LQ=GetUnitY(EW)call RemoveUnit(GV)call RemoveUnit(WV)call RemoveUnit(VV)call RemoveUnit(FV)call RemoveUnit(LV)call RemoveUnit(YV)call RemoveUnit(JV)call RemoveUnit(KV)call RemoveUnit(XV)call RemoveUnit(UZ)call RemoveUnit(CW)call RemoveUnit(TH)call RemoveUnit(ZV)call RemoveUnit(HV)call RemoveUnit(SV)call RemoveUnit(NV)call RemoveUnit(TV)call RemoveUnit(PV)call RemoveUnit(QV)call RemoveUnit(MV)call RemoveUnit(IW)call RemoveUnit(OW)call RemoveUnit(UV)call RemoveUnit(AW)call RemoveUnit(BW)call RemoveUnit(OV)call RemoveUnit(EY)call RemoveUnit(FZ)call RemoveUnit(QH)call RemoveUnit(BZ)call RemoveUnit(DZ)call RemoveUnit(QZ)call RemoveUnit(PZ)call RemoveUnit(RZ)call RemoveUnit(IV)call RemoveUnit(DW)call RemoveUnit(DV)call RemoveUnit(CV)call RemoveUnit(AV)call RemoveUnit(EV)call RemoveUnit(GZ)call RemoveUnit(BV)call RemoveUnit(FW)call RemoveUnit(EW)set MQ=CreateUnit(BO[0],1852206952,MS,SS,270)set NQ=CreateUnit(EO,1749236021,TS,PS,270)set SQ=CreateUnit(EO,1848652107,QS,US,270)set TQ=CreateUnit(EO,1849897784,IT,OT,270)set RQ=CreateUnit(EO,1697657397,AT,BT,270)set PQ=CreateUnit(EO,1848651862,CT,DT,270)set QQ=CreateUnit(EO,1848651863,ET,FT,270)set UQ=CreateUnit(EO,1848651826,GT,HT,270)set I00=CreateUnit(EO,1848651864,ZT,VT,270)set II0=CreateUnit(EO,1848651833,WT,XT,270)set I10=CreateUnit(EO,1848657989,YT,JT,270)set IO0=CreateUnit(BO[0],1702129516,KT,LT,270)set I20=CreateUnit(BO[0],1697656914,MT,ST,90)set I30=CreateUnit(BO[0],1697656914,RT,PT,45)set I40=CreateUnit(BO[0],1697656914,QT,UT,0)set I50=CreateUnit(BO[0],1697657137,IR,OR,90)set I60=CreateUnit(BO[0],1697657137,BR,CR,45)set I70=CreateUnit(BO[0],1697657137,DR,GR,0)set I80=CreateUnit(BO[0],1697656915,HR,ZR,90)set I90=CreateUnit(BO[0],1697656915,WR,XR,45)set IA0=CreateUnit(BO[0],1697656915,YR,JR,0)set IB0=CreateUnit(BO[0],1697657145,KR,LR,45)set IC0=CreateUnit(BO[0],1697657145,SR,RR,45)set ID0=CreateUnit(BO[0],1700884333,PR,QR,90)set IE0=CreateUnit(BO[0],1700884333,UR,IP,45)set IF0=CreateUnit(BO[0],1700884333,OP,BP,0)set IG0=CreateUnit(BO[0],1700884325,DP,EP,90)set IH0=CreateUnit(BO[0],1700884325,FP,GP,45)set IZ0=CreateUnit(BO[0],1700884325,ZP,VP,0)set IV0=CreateUnit(BO[0],1701670775,WP,XP,270)set IW0=CreateUnit(BO[0],1701670775,YP,JP,270)set IX0=CreateUnit(BO[0],1701670775,KP,LP,270)set IY0=CreateUnit(BO[0],1701670775,MP,TP,270)set IJ0=CreateUnit(BO[0],1701670775,RP,PP,270)set IK0=CreateUnit(BO[0],1701670775,QP,UP,270)set IL0=CreateUnit(BO[0],1701670775,IQ,OQ,270)set IM0=CreateUnit(BO[0],1701670775,AQ,BQ,270)set IN0=CreateUnit(BO[0],1701670775,CQ,DQ,270)set IS0=CreateUnit(BO[0],1701670775,EQ,FQ,270)set IT0=CreateUnit(BO[0],1701670775,GQ,HQ,270)set IR0=CreateUnit(BO[0],1700884343,ZQ,VQ,270)set IP0=CreateUnit(BO[0],1700884343,WQ,XQ,270)set IQ0=CreateUnit(BO[0],1701080930,YQ,JQ,270)set IU0=CreateUnit(BO[0],1701080930,KQ,LQ,270)call SetPlayerAbilityAvailable(EO,1098018609,false)call SetUnitColor(NQ,KS)call SetUnitColor(RQ,KS)call SetUnitColor(TQ,LS)call SetUnitColor(SQ,LS)call SetUnitColor(PQ,LS)call SetUnitColor(QQ,LS)call SetUnitColor(UQ,LS)call SetUnitColor(I00,LS)call SetUnitColor(II0,LS)call A71(I20,true)call A71(I30,true)call A71(I40,true)call A71(I50,true)call A71(I60,true)call A71(I70,true)call A71(I80,true)call A71(I90,true)call A71(IA0,true)call A71(IB0,true)call A71(IC0,true)call A71(IO0,true)call A71(ID0,true)call A71(IE0,true)call A71(IF0,true)call A71(IG0,true)call A71(IH0,true)call A71(IZ0,true)call A71(IR0,true)call A71(IP0,true)call A71(IQ0,true)call A71(IU0,true)call A71(IV0,true)call A71(IW0,true)call A71(IX0,true)call A71(IY0,true)call A71(IJ0,true)call A71(IK0,true)call A71(IL0,true)call A71(IM0,true)call A71(IN0,true)call A71(IS0,true)call A71(IT0,true)call AddUnitToStock(RQ,1747989059,0,0)endfunctionfunction InitTrig_Sent_Buildings takes nothing returns nothingcall FR1()endfunctionfunction FP1 takes nothing returns nothingset O10=GetUnitX(BX)set OO0=GetUnitY(BX)set O20=GetUnitX(TW)set O30=GetUnitY(TW)set O40=GetUnitX(RW)set O50=GetUnitY(RW)set O60=GetUnitX(PW)set O70=GetUnitY(PW)set O80=GetUnitX(MW)set O90=GetUnitY(MW)set OA0=GetUnitX(KW)set OB0=GetUnitY(KW)set OC0=GetUnitX(JW)set OD0=GetUnitY(JW)set OE0=GetUnitX(YW)set OF0=GetUnitY(YW)set OG0=GetUnitX(LW)set OH0=GetUnitY(LW)set OZ0=GetUnitX(SW)set OV0=GetUnitY(SW)set OW0=GetUnitX(VZ)set OX0=GetUnitY(VZ)set OY0=GetUnitX(WX)set OJ0=GetUnitY(WX)set OK0=GetUnitX(CZ)set OL0=GetUnitY(CZ)set OM0=GetUnitX(YX)set ON0=GetUnitY(YX)set OS0=GetUnitX(ZZ)set OT0=GetUnitY(ZZ)set OR0=GetUnitX(KZ)set OP0=GetUnitY(KZ)set OQ0=GetUnitX(JX)set OU0=GetUnitY(JX)set A00=GetUnitX(HZ)set AI0=GetUnitY(HZ)set A10=GetUnitX(XW)set AO0=GetUnitY(XW)set A20=GetUnitX(KX)set A30=GetUnitY(KX)set A40=GetUnitX(BY)set A50=GetUnitY(BY)set A60=GetUnitX(LX)set A70=GetUnitY(LX)set A80=GetUnitX(HX)set A90=GetUnitY(HX)set AA0=GetUnitX(WW)set AB0=GetUnitY(WW)set AC0=GetUnitX(GX)set AD0=GetUnitY(GX)set AE0=GetUnitX(AY)set AF0=GetUnitY(AY)set AG0=GetUnitX(VW)set AH0=GetUnitY(VW)set AZ0=GetUnitX(XX)set AV0=GetUnitY(XX)set AW0=GetUnitX(OY)set AX0=GetUnitY(OY)set AY0=GetUnitX(RX)set AJ0=GetUnitY(RX)set AK0=GetUnitX(NX)set AL0=GetUnitY(NX)set AM0=GetUnitX(UX)set AN0=GetUnitY(UX)set AS0=GetUnitX(ZW)set AT0=GetUnitY(ZW)set AR0=GetUnitX(QX)set AP0=GetUnitY(QX)set AQ0=GetUnitX(MX)set AU0=GetUnitY(MX)set B00=GetUnitX(SX)set BI0=GetUnitY(SX)set B10=GetUnitX(PX)set BO0=GetUnitY(PX)set B20=GetUnitX(CY)set B30=GetUnitY(CY)set B40=GetUnitX(GW)set B50=GetUnitY(GW)set B60=GetUnitX(ZX)set B70=GetUnitY(ZX)set B80=GetUnitX(HW)set B90=GetUnitY(HW)set BA0=GetUnitX(IY)set BB0=GetUnitY(IY)set BC0=GetUnitX(TX)set BD0=GetUnitY(TX)set BE0=GetUnitX(VX)set BF0=GetUnitY(VX)call RemoveUnit(RX)call RemoveUnit(NX)call RemoveUnit(UX)call RemoveUnit(ZW)call RemoveUnit(QX)call RemoveUnit(MX)call RemoveUnit(SX)call RemoveUnit(PX)call RemoveUnit(CY)call RemoveUnit(GW)call RemoveUnit(ZX)call RemoveUnit(CZ)call RemoveUnit(KZ)call RemoveUnit(XW)call RemoveUnit(YX)call RemoveUnit(JX)call RemoveUnit(KX)call RemoveUnit(ZZ)call RemoveUnit(HZ)call RemoveUnit(BY)call RemoveUnit(LX)call RemoveUnit(HX)call RemoveUnit(WW)call RemoveUnit(GX)call RemoveUnit(AY)call RemoveUnit(VW)call RemoveUnit(XX)call RemoveUnit(OY)call RemoveUnit(HW)call RemoveUnit(IY)call RemoveUnit(TX)call RemoveUnit(VX)call RemoveUnit(WX)call RemoveUnit(KW)call RemoveUnit(JW)call RemoveUnit(YW)call RemoveUnit(LW)call RemoveUnit(SW)call RemoveUnit(VZ)call RemoveUnit(PW)call RemoveUnit(RW)call RemoveUnit(BX)call RemoveUnit(TW)call RemoveUnit(MW)set BG0=CreateUnit(CO[0],1852073580,O10,OO0,270)set BH0=CreateUnit(EO,1849897781,O20,O30,270)set BZ0=CreateUnit(EO,1848652107,O40,O50,270)set BV0=CreateUnit(EO,1849897784,O60,O70,270)set BW0=CreateUnit(EO,1966092369,O80,O90,270)set BX0=CreateUnit(EO,1848651862,OA0,OB0,0)set BY0=CreateUnit(EO,1848651863,OC0,OD0,0)set BJ0=CreateUnit(EO,1848651826,OE0,OF0,0)set BK0=CreateUnit(EO,1848651864,OG0,OH0,0)set BL0=CreateUnit(EO,1848651833,OZ0,OV0,0)set BM0=CreateUnit(EO,1848657989,OW0,OX0,0)set BN0=CreateUnit(CO[0],1970172012,OY0,OJ0,220)set BS0=CreateUnit(CO[0],1966092365,OK0,OL0,270)set BT0=CreateUnit(CO[0],1966092365,OM0,ON0,270)set BR0=CreateUnit(CO[0],1966092365,OS0,OT0,270)set BP0=CreateUnit(CO[0],1966092356,OR0,OP0,270)set BQ0=CreateUnit(CO[0],1966092356,OQ0,OU0,270)set BU0=CreateUnit(CO[0],1966092356,A00,AI0,270)set C00=CreateUnit(CO[0],1966092366,A10,AO0,270)set CI0=CreateUnit(CO[0],1966092366,A20,A30,270)set C10=CreateUnit(CO[0],1966092366,A40,A50,270)set CO0=CreateUnit(CO[0],1966092372,A60,A70,270)set C20=CreateUnit(CO[0],1966092372,A80,A90,270)set C30=CreateUnit(CO[0],1970496880,AA0,AB0,270)set C40=CreateUnit(CO[0],1970496880,AC0,AD0,270)set C50=CreateUnit(CO[0],1970496880,AE0,AF0,270)set C60=CreateUnit(CO[0],1970564964,AG0,AH0,270)set C70=CreateUnit(CO[0],1970564964,AZ0,AV0,270)set C80=CreateUnit(CO[0],1970564964,AW0,AX0,270)set C90=CreateUnit(CO[0],1970956647,AY0,AJ0,270)set CA0=CreateUnit(CO[0],1970956647,AK0,AL0,270)set CB0=CreateUnit(CO[0],1970956647,AM0,AN0,270)set CC0=CreateUnit(CO[0],1970956647,AS0,AT0,270)set CD0=CreateUnit(CO[0],1970956647,AR0,AP0,270)set CE0=CreateUnit(CO[0],1970956647,AQ0,AU0,270)set CF0=CreateUnit(CO[0],1970956647,B00,BI0,270)set CG0=CreateUnit(CO[0],1970956647,B10,BO0,270)set CH0=CreateUnit(CO[0],1970956647,B20,B30,270)set CZ0=CreateUnit(CO[0],1970956647,B40,B50,270)set CV0=CreateUnit(CO[0],1970956647,B60,B70,270)set CW0=CreateUnit(CO[0],1970495856,B80,B90,270)set CX0=CreateUnit(CO[0],1970495856,BA0,BB0,270)set CY0=CreateUnit(CO[0],1969385326,BC0,BD0,270)set CJ0=CreateUnit(CO[0],1969385326,BE0,BF0,270)call SetUnitColor(BH0,O00)call SetUnitColor(BV0,OI0)call SetUnitColor(BZ0,OI0)call SetUnitColor(BX0,OI0)call SetUnitColor(BY0,OI0)call SetUnitColor(BJ0,OI0)call SetUnitColor(BK0,OI0)call SetUnitColor(BL0,OI0)call A71(BS0,true)call A71(BT0,true)call A71(BR0,true)call A71(BP0,true)call A71(BQ0,true)call A71(BU0,true)call A71(C00,true)call A71(CI0,true)call A71(C10,true)call A71(CO0,true)call A71(C20,true)call A71(BN0,true)call A71(C30,true)call A71(C40,true)call A71(C50,true)call A71(C60,true)call A71(C70,true)call A71(C80,true)call A71(CW0,true)call A71(CX0,true)call A71(CY0,true)call A71(CJ0,true)call A71(C90,true)call A71(CA0,true)call A71(CB0,true)call A71(CC0,true)call A71(CD0,true)call A71(CE0,true)call A71(CF0,true)call A71(CG0,true)call A71(CH0,true)call A71(CZ0,true)call A71(CV0,true)call AddUnitToStock(BW0,1747989059,0,0)endfunctionfunction InitTrig_Scourge_Buildings takes nothing returns nothingcall FP1()endfunctionfunction FQ1 takes nothing returns nothinglocal real FU1=GetUnitX(LZ)local real G01=GetUnitY(LZ)local real GI1=GetUnitX(TZ)local real G11=GetUnitY(TZ)local real GO1=GetUnitX(SZ)local real G21=GetUnitY(SZ)local real G31=GetUnitX(MZ)local real G41=GetUnitY(MZ)local real G51=GetUnitX(NZ)local real G61=GetUnitY(NZ)local real G71=GetUnitX(UW)local real G81=GetUnitY(UW)local real G91=GetUnitX(QW)local real GA1=GetUnitY(QW)local real GB1=GetUnitX(AX)local real GC1=GetUnitY(AX)local real GD1=GetUnitX(IX)local real GE1=GetUnitY(IX)local real GF1=GetUnitX(OX)local real GG1=GetUnitY(OX)local integer GH1=25call RemoveUnit(LZ)call RemoveUnit(TZ)call RemoveUnit(SZ)call RemoveUnit(MZ)call RemoveUnit(NZ)call RemoveUnit(UW)call RemoveUnit(QW)call RemoveUnit(AX)call RemoveUnit(IX)call RemoveUnit(OX)set CK0=CreateUnit(Player(1),1852010352,FU1,G01,270)call UnitAddAbility(CK0,1093743665)call ClearSelectionForPlayer(Player(1))call SelectUnitAddForPlayer(CK0,Player(1))if GetLocalPlayer()==Player(1)thencall SetUnitVertexColor(CK0,255,255,255,255)elsecall SetUnitVertexColor(CK0,255,255,255,GH1)endifset CL0=CreateUnit(Player(2),1852010352,GI1,G11,270)call UnitAddAbility(CL0,1093743665)call ClearSelectionForPlayer(Player(2))call SelectUnitAddForPlayer(CL0,Player(2))if GetLocalPlayer()==Player(2)thencall SetUnitVertexColor(CL0,255,255,255,255)elsecall SetUnitVertexColor(CL0,255,255,255,GH1)endifset CM0=CreateUnit(Player(3),1852010352,GO1,G21,270)call UnitAddAbility(CM0,1093743665)call ClearSelectionForPlayer(Player(3))call SelectUnitAddForPlayer(CM0,Player(3))if GetLocalPlayer()==Player(3)thencall SetUnitVertexColor(CM0,255,255,255,255)elsecall SetUnitVertexColor(CM0,255,255,255,GH1)endifset CN0=CreateUnit(Player(4),1852010352,G31,G41,270)call UnitAddAbility(CN0,1093743665)call ClearSelectionForPlayer(Player(4))call SelectUnitAddForPlayer(CN0,Player(4))if GetLocalPlayer()==Player(4)thencall SetUnitVertexColor(CN0,255,255,255,255)elsecall SetUnitVertexColor(CN0,255,255,255,GH1)endifset CS0=CreateUnit(Player(5),1852010352,G51,G61,270)call UnitAddAbility(CS0,1093743665)call ClearSelectionForPlayer(Player(5))call SelectUnitAddForPlayer(CS0,Player(5))if GetLocalPlayer()==Player(5)thencall SetUnitVertexColor(CS0,255,255,255,255)elsecall SetUnitVertexColor(CS0,255,255,255,GH1)endifset CT0=CreateUnit(Player(7),1852010352,G71,G81,270)call UnitAddAbility(CT0,1093752649)call ClearSelectionForPlayer(Player(7))call SelectUnitAddForPlayer(CT0,Player(7))if GetLocalPlayer()==Player(7)thencall SetUnitVertexColor(CT0,255,255,255,255)elsecall SetUnitVertexColor(CT0,255,255,255,GH1)endifset CR0=CreateUnit(Player(8),1852010352,G91,GA1,270)call UnitAddAbility(CR0,1093752649)call ClearSelectionForPlayer(Player(8))call SelectUnitAddForPlayer(CR0,Player(8))if GetLocalPlayer()==Player(8)thencall SetUnitVertexColor(CR0,255,255,255,255)elsecall SetUnitVertexColor(CR0,255,255,255,GH1)endifset CP0=CreateUnit(Player(9),1852010352,GB1,GC1,270)call UnitAddAbility(CP0,1093752649)call ClearSelectionForPlayer(Player(9))call SelectUnitAddForPlayer(CP0,Player(9))if GetLocalPlayer()==Player(9)thencall SetUnitVertexColor(CP0,255,255,255,255)elsecall SetUnitVertexColor(CP0,255,255,255,GH1)endifset CQ0=CreateUnit(Player(10),1852010352,GD1,GE1,270)call UnitAddAbility(CQ0,1093752649)call ClearSelectionForPlayer(Player(10))call SelectUnitAddForPlayer(CQ0,Player(10))if GetLocalPlayer()==Player(10)thencall SetUnitVertexColor(CQ0,255,255,255,255)elsecall SetUnitVertexColor(CQ0,255,255,255,GH1)endifset CU0=CreateUnit(Player(11),1852010352,GF1,GG1,270)call UnitAddAbility(CU0,1093752649)call ClearSelectionForPlayer(Player(11))call SelectUnitAddForPlayer(CU0,Player(11))if GetLocalPlayer()==Player(11)thencall SetUnitVertexColor(CU0,255,255,255,255)elsecall SetUnitVertexColor(CU0,255,255,255,GH1)endifset D00[1]=CK0set D00[2]=CL0set D00[3]=CM0set D00[4]=CN0set D00[5]=CS0set D00[7]=CT0set D00[8]=CR0set D00[9]=CP0set D00[10]=CQ0set D00[11]=CU0set DI0[1]=GetUnitX(CK0)set DI0[2]=GetUnitX(CL0)set DI0[3]=GetUnitX(CM0)set DI0[4]=GetUnitX(CN0)set DI0[5]=GetUnitX(CS0)set DI0[7]=GetUnitX(CT0)set DI0[8]=GetUnitX(CR0)set DI0[9]=GetUnitX(CP0)set DI0[10]=GetUnitX(CQ0)set DI0[11]=GetUnitX(CU0)set D10[1]=GetUnitY(CK0)set D10[2]=GetUnitY(CL0)set D10[3]=GetUnitY(CM0)set D10[4]=GetUnitY(CN0)set D10[5]=GetUnitY(CS0)set D10[7]=GetUnitY(CT0)set D10[8]=GetUnitY(CR0)set D10[9]=GetUnitY(CP0)set D10[10]=GetUnitY(CQ0)set D10[11]=GetUnitY(CU0)endfunctionfunction InitTrig_Circle_of_Power takes nothing returns nothingcall FQ1()endfunctionfunction GZ1 takes nothing returns nothingset D40[GetPlayerId(BO[1])]=0set D50[GetPlayerId(BO[1])]=66set D60[GetPlayerId(BO[1])]=255set D40[GetPlayerId(BO[2])]=48set D50[GetPlayerId(BO[2])]=230set D60[GetPlayerId(BO[2])]=185set D40[GetPlayerId(BO[3])]=50set D50[GetPlayerId(BO[3])]=0set D60[GetPlayerId(BO[3])]=129set D40[GetPlayerId(BO[4])]=255set D50[GetPlayerId(BO[4])]=252set D60[GetPlayerId(BO[4])]=1set D40[GetPlayerId(BO[5])]=255set D50[GetPlayerId(BO[5])]=50set D60[GetPlayerId(BO[5])]=0set D40[GetPlayerId(CO[1])]=220set D50[GetPlayerId(CO[1])]=50set D60[GetPlayerId(CO[1])]=50set D40[GetPlayerId(CO[2])]=50set D50[GetPlayerId(CO[2])]=50set D60[GetPlayerId(CO[2])]=50set D40[GetPlayerId(CO[3])]=75set D50[GetPlayerId(CO[3])]=150set D60[GetPlayerId(CO[3])]=190set D40[GetPlayerId(CO[4])]=16set D50[GetPlayerId(CO[4])]=60set D60[GetPlayerId(CO[4])]=18set D40[GetPlayerId(CO[5])]=68set D50[GetPlayerId(CO[5])]=42set D60[GetPlayerId(CO[5])]=4endfunctionfunction GV1 takes nothing returns nothinglocal integer SIIlocal integer S1Ilocal integer iset C0[GetPlayerId(BO[0])]="|c00ff0303"set C0[GetPlayerId(BO[1])]="|c000042ff"set C0[GetPlayerId(BO[2])]="|c001ce6b9"set C0[GetPlayerId(BO[3])]="|c00540081"set C0[GetPlayerId(BO[4])]="|c00fffc01"set C0[GetPlayerId(BO[5])]="|c00ff8000"set C0[GetPlayerId(CO[0])]="|c0020c000"set C0[GetPlayerId(CO[1])]="|c00e55bb0"set C0[GetPlayerId(CO[2])]="|c00959697"set C0[GetPlayerId(CO[3])]="|c007ebff1"set C0[GetPlayerId(CO[4])]="|c00106246"set C0[GetPlayerId(CO[5])]="|c004e2a04"call SetPlayerColor(BO[0],PLAYER_COLOR_RED)call SetPlayerColor(BO[1],PLAYER_COLOR_BLUE)call SetPlayerColor(BO[2],PLAYER_COLOR_CYAN)call SetPlayerColor(BO[3],PLAYER_COLOR_PURPLE)call SetPlayerColor(BO[4],PLAYER_COLOR_YELLOW)call SetPlayerColor(BO[5],PLAYER_COLOR_ORANGE)call SetPlayerColor(CO[0],PLAYER_COLOR_GREEN)call SetPlayerColor(CO[1],PLAYER_COLOR_PINK)call SetPlayerColor(CO[2],PLAYER_COLOR_LIGHT_GRAY)call SetPlayerColor(CO[3],PLAYER_COLOR_LIGHT_BLUE)call SetPlayerColor(CO[4],PLAYER_COLOR_AQUA)call SetPlayerColor(CO[5],PLAYER_COLOR_BROWN)set SII=1set S1I=5loopif GetPlayerSlotState(BO[SII])==PLAYER_SLOT_STATE_EMPTY thencall SetPlayerName(BO[SII],GetObjectName(1848656968)+" "+I2S(SII))endifif GetPlayerSlotState(CO[SII])==PLAYER_SLOT_STATE_EMPTY thencall SetPlayerName(CO[SII],GetObjectName(1848656968)+" "+I2S(5+SII))endifset SII=SII+1exitwhen SII>S1Iendloopendfunctionfunction GW1 takes nothing returns nothinglocal integer ilocal integer GH1=125call SetUnitOwner(CK0,BO[1],false)call SetUnitOwner(CL0,BO[2],false)call SetUnitOwner(CM0,BO[3],false)call SetUnitOwner(CN0,BO[4],false)call SetUnitOwner(CS0,BO[5],false)call SetUnitOwner(CT0,CO[1],false)call SetUnitOwner(CR0,CO[2],false)call SetUnitOwner(CP0,CO[3],false)call SetUnitOwner(CQ0,CO[4],false)call SetUnitOwner(CU0,CO[5],false)set D00[GetPlayerId(BO[1])]=CK0set D00[GetPlayerId(BO[2])]=CL0set D00[GetPlayerId(BO[3])]=CM0set D00[GetPlayerId(BO[4])]=CN0set D00[GetPlayerId(BO[5])]=CS0set D00[GetPlayerId(CO[1])]=CT0set D00[GetPlayerId(CO[2])]=CR0set D00[GetPlayerId(CO[3])]=CP0set D00[GetPlayerId(CO[4])]=CQ0set D00[GetPlayerId(CO[5])]=CU0set i=1if GetLocalPlayer()==Player(i)thencall SetUnitVertexColor(D00[GetPlayerId(Player(i))],255,255,255,255)elsecall SetUnitVertexColor(D00[GetPlayerId(Player(i))],255,255,255,GH1)endifset i=2if GetLocalPlayer()==Player(i)thencall SetUnitVertexColor(D00[GetPlayerId(Player(i))],255,255,255,255)elsecall SetUnitVertexColor(D00[GetPlayerId(Player(i))],255,255,255,GH1)endifset i=3if GetLocalPlayer()==Player(i)thencall SetUnitVertexColor(D00[GetPlayerId(Player(i))],255,255,255,255)elsecall SetUnitVertexColor(D00[GetPlayerId(Player(i))],255,255,255,GH1)endifset i=4if GetLocalPlayer()==Player(i)thencall SetUnitVertexColor(D00[GetPlayerId(Player(i))],255,255,255,255)elsecall SetUnitVertexColor(D00[GetPlayerId(Player(i))],255,255,255,GH1)endifset i=5if GetLocalPlayer()==Player(i)thencall SetUnitVertexColor(D00[GetPlayerId(Player(i))],255,255,255,255)elsecall SetUnitVertexColor(D00[GetPlayerId(Player(i))],255,255,255,GH1)endifset i=7if GetLocalPlayer()==Player(i)thencall SetUnitVertexColor(D00[GetPlayerId(Player(i))],255,255,255,255)elsecall SetUnitVertexColor(D00[GetPlayerId(Player(i))],255,255,255,GH1)endifset i=8if GetLocalPlayer()==Player(i)thencall SetUnitVertexColor(D00[GetPlayerId(Player(i))],255,255,255,255)elsecall SetUnitVertexColor(D00[GetPlayerId(Player(i))],255,255,255,GH1)endifset i=9if GetLocalPlayer()==Player(i)thencall SetUnitVertexColor(D00[GetPlayerId(Player(i))],255,255,255,255)elsecall SetUnitVertexColor(D00[GetPlayerId(Player(i))],255,255,255,GH1)endifset i=10if GetLocalPlayer()==Player(i)thencall SetUnitVertexColor(D00[GetPlayerId(Player(i))],255,255,255,255)elsecall SetUnitVertexColor(D00[GetPlayerId(Player(i))],255,255,255,GH1)endifset i=11if GetLocalPlayer()==Player(i)thencall SetUnitVertexColor(D00[GetPlayerId(Player(i))],255,255,255,255)elsecall SetUnitVertexColor(D00[GetPlayerId(Player(i))],255,255,255,GH1)endifset DI0[GetPlayerId(BO[1])]=GetUnitX(D00[GetPlayerId(BO[1])])set DI0[GetPlayerId(BO[2])]=GetUnitX(D00[GetPlayerId(BO[2])])set DI0[GetPlayerId(BO[3])]=GetUnitX(D00[GetPlayerId(BO[3])])set DI0[GetPlayerId(BO[4])]=GetUnitX(D00[GetPlayerId(BO[4])])set DI0[GetPlayerId(BO[5])]=GetUnitX(D00[GetPlayerId(BO[5])])set DI0[GetPlayerId(CO[1])]=GetUnitX(D00[GetPlayerId(CO[1])])set DI0[GetPlayerId(CO[2])]=GetUnitX(D00[GetPlayerId(CO[2])])set DI0[GetPlayerId(CO[3])]=GetUnitX(D00[GetPlayerId(CO[3])])set DI0[GetPlayerId(CO[4])]=GetUnitX(D00[GetPlayerId(CO[4])])set DI0[GetPlayerId(CO[5])]=GetUnitX(D00[GetPlayerId(CO[5])])set D10[GetPlayerId(BO[1])]=GetUnitY(D00[GetPlayerId(BO[1])])set D10[GetPlayerId(BO[2])]=GetUnitY(D00[GetPlayerId(BO[2])])set D10[GetPlayerId(BO[3])]=GetUnitY(D00[GetPlayerId(BO[3])])set D10[GetPlayerId(BO[4])]=GetUnitY(D00[GetPlayerId(BO[4])])set D10[GetPlayerId(BO[5])]=GetUnitY(D00[GetPlayerId(BO[5])])set D10[GetPlayerId(CO[1])]=GetUnitY(D00[GetPlayerId(CO[1])])set D10[GetPlayerId(CO[2])]=GetUnitY(D00[GetPlayerId(CO[2])])set D10[GetPlayerId(CO[3])]=GetUnitY(D00[GetPlayerId(CO[3])])set D10[GetPlayerId(CO[4])]=GetUnitY(D00[GetPlayerId(CO[4])])set D10[GetPlayerId(CO[5])]=GetUnitY(D00[GetPlayerId(CO[5])])endfunctionfunction GX1 takes unit R7I returns booleanlocal integer ID=GetUnitTypeId(R7I)if ID==1848651862 or ID==1848651863 or ID==1848651826 or ID==1848651864 or ID==1849897784 or ID==1848652107 or ID==1848651833 thenreturn trueendifreturn falseendfunctionfunction GY1 takes nothing returns nothingif(GetOwningPlayer(GetEnumUnit())==Player(0))thencall SetUnitOwner(GetEnumUnit(),BO[0],false)if GX1(GetEnumUnit())==false thencall SetUnitColor(GetEnumUnit(),ConvertPlayerColor(0))endifelsecall SetUnitOwner(GetEnumUnit(),CO[0],false)if GX1(GetEnumUnit())==false thencall SetUnitColor(GetEnumUnit(),ConvertPlayerColor(6))endifendifendfunctionfunction GJ1 takes nothing returns nothinglocal group GK1=MDI()call GroupEnumUnitsOfPlayer(GK1,Player(0),Condition(function LWI))call ForGroup(GK1,function GY1)call GroupClear(GK1)call GroupEnumUnitsOfPlayer(GK1,Player(6),Condition(function LWI))call ForGroup(GK1,function GY1)call MCI(GK1)endfunctionfunction GL1 takes player p returns nothinglocal integer i=0local string GM1=GetPlayerName(p)local integer EE1=StringLength(GM1)local integer GN1=EE1loopexitwhen i==EE1if SubString(GM1,i,i+1)=="("and SubString(GM1,i-1,i)==" "thenset GN1=i-1call SetPlayerName(p,SubString(GM1,0,GN1))set i=EE1elseset i=i+1endifendloopendfunctionfunction GS1 takes nothing returns nothinglocal integer GT1local integer GR1local integer SIIlocal integer S1Ilocal integer x=0local integer y=0local integer ilocal trigger tlocal location GP1=GetRectCenter(N4)local location GQ1=GetRectCenter(S4)if GetPlayerState(BO[0],PLAYER_STATE_OBSERVER)!=0 or GetPlayerState(CO[0],PLAYER_STATE_OBSERVER)!=0 thenset C2=trueset BO[0]=Player(13)set CO[0]=Player(14)set DO0=Player(0)set D20=Player(6)call SetAllyColorFilterState(0)loopexitwhen x>5call SetPlayerAlliance(Player(0),BO[x],ConvertAllianceType(0),true)call SetPlayerAlliance(Player(0),BO[x],ConvertAllianceType(4),true)call SetPlayerAlliance(Player(0),CO[x],ConvertAllianceType(0),false)call SetPlayerAlliance(Player(0),CO[x],ConvertAllianceType(4),false)set x=x+1endloopendifcall ForceAddPlayer(OO,BO[0])call ForceAddPlayer(OO,BO[1])call ForceAddPlayer(OO,BO[2])call ForceAddPlayer(OO,BO[3])call ForceAddPlayer(OO,BO[4])call ForceAddPlayer(OO,BO[5])call ForceAddPlayer(AO,CO[0])call ForceAddPlayer(AO,CO[1])call ForceAddPlayer(AO,CO[2])call ForceAddPlayer(AO,CO[3])call ForceAddPlayer(AO,CO[4])call ForceAddPlayer(AO,CO[5])call ForceAddPlayer(P2,BO[1])call ForceAddPlayer(P2,BO[2])call ForceAddPlayer(P2,BO[3])call ForceAddPlayer(P2,BO[4])call ForceAddPlayer(P2,BO[5])call ForceAddPlayer(P2,CO[1])call ForceAddPlayer(P2,CO[2])call ForceAddPlayer(P2,CO[3])call ForceAddPlayer(P2,CO[4])call ForceAddPlayer(P2,CO[5])if C2 thencall ForceAddPlayer(P2,Player(0))call ForceAddPlayer(P2,Player(6))endifset x=0set y=0loopexitwhen x>5loopexitwhen y>5if(x!=y)thencall SetPlayerAlliance(BO[x],BO[y],ConvertAllianceType(0),true)call SetPlayerAlliance(BO[x],BO[y],ConvertAllianceType(1),true)call SetPlayerAlliance(BO[x],BO[y],ConvertAllianceType(2),true)call SetPlayerAlliance(BO[x],BO[y],ConvertAllianceType(3),true)call SetPlayerAlliance(BO[x],BO[y],ConvertAllianceType(4),true)call SetPlayerAlliance(BO[x],BO[y],ConvertAllianceType(5),true)call SetPlayerAlliance(BO[x],BO[y],ConvertAllianceType(6),false)call SetPlayerAlliance(BO[x],BO[y],ConvertAllianceType(7),false)call SetPlayerAlliance(CO[x],CO[y],ConvertAllianceType(0),true)call SetPlayerAlliance(CO[x],CO[y],ConvertAllianceType(1),true)call SetPlayerAlliance(CO[x],CO[y],ConvertAllianceType(2),true)call SetPlayerAlliance(CO[x],CO[y],ConvertAllianceType(3),true)call SetPlayerAlliance(CO[x],CO[y],ConvertAllianceType(4),true)call SetPlayerAlliance(CO[x],CO[y],ConvertAllianceType(5),true)call SetPlayerAlliance(CO[x],CO[y],ConvertAllianceType(6),false)call SetPlayerAlliance(CO[x],CO[y],ConvertAllianceType(7),false)call SetPlayerAlliance(BO[x],CO[y],ConvertAllianceType(0),false)call SetPlayerAlliance(BO[x],CO[y],ConvertAllianceType(1),false)call SetPlayerAlliance(BO[x],CO[y],ConvertAllianceType(2),false)call SetPlayerAlliance(BO[x],CO[y],ConvertAllianceType(3),false)call SetPlayerAlliance(BO[x],CO[y],ConvertAllianceType(4),false)call SetPlayerAlliance(BO[x],CO[y],ConvertAllianceType(5),false)call SetPlayerAlliance(BO[x],CO[y],ConvertAllianceType(6),false)call SetPlayerAlliance(BO[x],CO[y],ConvertAllianceType(7),false)call SetPlayerAlliance(CO[x],BO[y],ConvertAllianceType(0),false)call SetPlayerAlliance(CO[x],BO[y],ConvertAllianceType(1),false)call SetPlayerAlliance(CO[x],BO[y],ConvertAllianceType(2),false)call SetPlayerAlliance(CO[x],BO[y],ConvertAllianceType(3),false)call SetPlayerAlliance(CO[x],BO[y],ConvertAllianceType(4),false)call SetPlayerAlliance(CO[x],BO[y],ConvertAllianceType(5),false)call SetPlayerAlliance(CO[x],BO[y],ConvertAllianceType(6),false)call SetPlayerAlliance(CO[x],BO[y],ConvertAllianceType(7),false)endifset y=y+1endloopset y=0set x=x+1endloopcall SetPlayerTeam(BO[0],0)call SetPlayerTeam(BO[1],0)call SetPlayerTeam(BO[2],0)call SetPlayerTeam(BO[3],0)call SetPlayerTeam(BO[4],0)call SetPlayerTeam(BO[5],0)call SetPlayerTeam(CO[0],1)call SetPlayerTeam(CO[1],1)call SetPlayerTeam(CO[2],1)call SetPlayerTeam(CO[3],1)call SetPlayerTeam(CO[4],1)call SetPlayerTeam(CO[5],1)call SetPlayerName(BO[0],GetObjectName(1848652622))call SetPlayerName(CO[0],GetObjectName(1848652623))call SetPlayerName(DO,GetObjectName(1848657208))call GW1()if(BO[0]!=Player(0)or CO[0]!=Player(6))thencall GJ1()endifcall GV1()set GR1=NTI(OO)set GT1=NTI(AO)set SII=1set S1I=5loopexitwhen SII>S1Iif(NYI(BO[SII]))thencall SetPlayerState(BO[SII],PLAYER_STATE_RESOURCE_GOLD,(4375/GR1))call SetPlayerState(BO[SII],PLAYER_STATE_RESOURCE_LUMBER,0)endifif(NYI(CO[SII]))thencall SetPlayerState(CO[SII],PLAYER_STATE_RESOURCE_GOLD,(4375/GT1))call SetPlayerState(CO[SII],PLAYER_STATE_RESOURCE_LUMBER,0)endifset SII=SII+1endloopcall SetPlayerHandicapXP(BO[1],1)call SetPlayerHandicapXP(BO[2],1)call SetPlayerHandicapXP(BO[3],1)call SetPlayerHandicapXP(BO[4],1)call SetPlayerHandicapXP(BO[5],1)call SetPlayerHandicapXP(CO[1],1)call SetPlayerHandicapXP(CO[2],1)call SetPlayerHandicapXP(CO[3],1)call SetPlayerHandicapXP(CO[4],1)call SetPlayerHandicapXP(CO[5],1)call SetPlayerState(BO[0],PLAYER_STATE_GIVES_BOUNTY,1)call SetPlayerState(BO[1],PLAYER_STATE_GIVES_BOUNTY,1)call SetPlayerState(BO[2],PLAYER_STATE_GIVES_BOUNTY,1)call SetPlayerState(BO[3],PLAYER_STATE_GIVES_BOUNTY,1)call SetPlayerState(BO[4],PLAYER_STATE_GIVES_BOUNTY,1)call SetPlayerState(BO[5],PLAYER_STATE_GIVES_BOUNTY,1)call SetPlayerState(CO[0],PLAYER_STATE_GIVES_BOUNTY,1)call SetPlayerState(CO[1],PLAYER_STATE_GIVES_BOUNTY,1)call SetPlayerState(CO[2],PLAYER_STATE_GIVES_BOUNTY,1)call SetPlayerState(CO[3],PLAYER_STATE_GIVES_BOUNTY,1)call SetPlayerState(CO[4],PLAYER_STATE_GIVES_BOUNTY,1)call SetPlayerState(CO[5],PLAYER_STATE_GIVES_BOUNTY,1)call TBI()call GZ1()call GL1(BO[1])call GL1(BO[2])call GL1(BO[3])call GL1(BO[4])call GL1(BO[5])call GL1(CO[1])call GL1(CO[2])call GL1(CO[3])call GL1(CO[4])call GL1(CO[5])set x=1loopexitwhen x>5if NYI(BO[x])thencall CreateUnitAtLoc(BO[x],1848651843,GP1,bj_UNIT_FACING)endifif NYI(CO[x])thencall CreateUnitAtLoc(CO[x],1848651843,GQ1,bj_UNIT_FACING)endifset x=x+1endloopcall RemoveLocation(GP1)call RemoveLocation(GQ1)set i=0loopset D30[i]=GetPlayerName(Player(i))set i=i+1exitwhen i==16endloopset GP1=nullset GQ1=nullendfunctionfunction InitTrig_Player takes nothing returns nothingcall GS1()endfunctionfunction GU1 takes nothing returns nothinglocal integer i=1set D90=1set D70[1]=1215723364set DK0[1]=1747989338set D80[1]=1848654165set DJ0[1]="ReplaceableTextures\\CommandButtons\\BTNAvengingWatcher.blp"call NAI(D70[1],"stand 4")call N5I(D70[1],1.35,DK0[1])set DL0[i]="Cheap items such as Bracers, Bottle and Magic Stick help give Vengeful Spirit what she needs to use Magic Missile and Swap safely and frequently."set DM0[i]="By getting Magic Missile first, Vengeful Spirit should take advantage of this powerful stun by moving around the map instead of simply farming in a lane."set DN0[i]="It sometimes a good idea to save the Command Aura for later in the game when it will give your team more damage."set DS0[i]="Wave of Terror is used to provide sight, giving you vision over an area or providing an opportunity to use Swap."set DT0[i]="Swap will allow you to isolate a key hero on their team, sometimes your sacrifice is needed to win the battle and maybe even the game."set i=i+1set D70[2]=1215128178set DK0[2]=1747989552set D80[2]=1848654145set DJ0[2]="ReplaceableTextures\\CommandButtons\\BTNAvatar.blp"call NAI(D70[2],"attack slam alternate")call N5I(D70[2],1.3,DK0[2])set DL0[i]="When using Arc lightning, try to kill creeps and harass your opponent at the same time"set DM0[i]="When ganking, you can use Lightning Bolt to ensure you will not lose sight of the target quickly."set DN0[i]="Lightning Bolt has a mini-stun that can be used against channeling spells and teleporting heroes."set DS0[i]="Static Field is extremely powerful throughout the game: Use your spells as frequently as possible during fights."set DT0[i]="Both Lightning Bolt and Wrath of the Thundergod reveal invisible units. Wrath will not damage invisible units."set i=i+1set D70[3]=1164799855set DK0[3]=1747989553set D80[3]=1848654137set DJ0[3]="ReplaceableTextures\\CommandButtons\\BTNDryad.blp"call NAI(D70[3],"stand 4")call N5I(D70[3],1,DK0[3])set DL0[i]="Enchant can be used on neutral creeps, meaning Enchantress can fight and use neutral creeps to engage enemy heroes effectively."set DM0[i]="Nature's Attendants heals in an area AOE, so make sure you're far from creeps if you only want to heal yourself."set DN0[i]="Untouchable is great against physical attacks, but it does not help you survive huge burst damage nukes."set DS0[i]="Impetus deals negligible damage at short range; switch to normal attacks if your target gets close to save mana."set DT0[i]="Impetus deals pure damage, making it a great tool against heroes with a lot of resistance because it is not reduced."set i=i+1set D70[4]=1328558160set DK0[4]=1747989554set D80[4]=1848654136set DJ0[4]="ReplaceableTextures\\CommandButtons\\BTNSeaElemental.blp"call NAI(D70[4],"stand 2")call N5I(D70[4],1,DK0[4])set DL0[i]="Waveform is extremely powerful: Used for damage, chasing, escaping, it even allows you to dodge some spells by casting it at the right time."set DM0[i]="Morph allows you to manipulate your Agility and Strength. Using the Strength Morph ('F') can act as a heal to help you survive between spells."set DN0[i]="Use Morph Replicate to take the location of your Replicated unit, making it great for a quick escape or simply as a free teleport."set DS0[i]="Replicate is usually cast on the strongest ally or enemy to a fight. Certain hero passives or items will retain their effects, so Replicate those heroes."set DT0[i]="Eye of Skadi and Linken's Sphere are two examples of Statistic-increasing items which give Morphling a lot of versatility and the ability to cast spells often."set i=i+1set D70[5]=1214931305set DK0[5]=1747989555set D80[5]=1848654167set DJ0[5]="ReplaceableTextures\\CommandButtons\\BTNJaina.blp"call NAI(D70[5],"stand victory")call N5I(D70[5],1,DK0[5])set DL0[i]="CM is a fragile support hero: Items like Bracers and Phase Boots will help her survive and deal with her low movement speed and armor."set DM0[i]="A few points of Brilliance Aura early on provides your team with massive amounts of extra mana."set DN0[i]="Enemies hit by Frostbite can still cast spells, so don't take them lightly. "set DS0[i]="Frostbite on non-hero units will last 10 seconds. This can be useful for killing neutral creeps that are level 5 or lower as well."set DT0[i]="There are two items that can help you with the perfect Freezing Field: Placement with Kelen's Dagger and the spell immunity of Black King Bar."set i=i+1set D70[6]=1211117617set DK0[6]=1747989556set D80[6]=1848654134set DJ0[6]="ReplaceableTextures\\CommandButtons\\BTNFelGuardBlue.tga"call NAI(D70[6],"spell")call N5I(D70[6],1,DK0[6])set DL0[i]="Storm Bolt is a skill Sven should usually get early because of its damage and stun. "set DM0[i]="Take advantage of Storm Bolt's area of effect by hitting additional enemy creeps and heroes whenever possible. "set DN0[i]="Try to be near your allies when you cast Warcry."set DS0[i]="Only items that increase Strength will give you additional damage from effect of God's Strength."set DT0[i]="Casting God's Strength before engaging in fights or casting Storm Bolt will allow you to get additional attacks on your opponent."set i=i+1set D70[7]=1212363833set DK0[7]=1747989557set D80[7]=1848654160set DJ0[7]="ReplaceableTextures\\CommandButtons\\BTNSeaWitch.blp"call NAI(D70[7],"spell")call N5I(D70[7],1,DK0[7])set DL0[i]="Opponents can attack and cast spells while Ensnared. However, it will work on magic immune units and reveal invisible heroes until the duration expires."set DM0[i]="Mirror Image can be used defensively to avoid certain spells and dispel debuffs or channeling spells."set DN0[i]="Items that provide attribute bonuses improve your Image's power."set DS0[i]="Enemies caught by Song of the Siren are invulnerable while asleep. Save your attacks and spells for after the spell expires."set DT0[i]="Use Song of the Siren to isolate a magic immune or Cycloned hero (since they will not be affected), or to demolish buildings while enemies are asleep."set i=i+1set D70[8]=1333027688set DK0[8]=1747989558set D80[8]=1848654148set DJ0[8]="ReplaceableTextures\\CommandButtons\\BTNTauren.blp"call NAI(D70[8],"attack slam")call N5I(D70[8],1.1,DK0[8])set DL0[i]="Although he's a strength hero, Earthshaker (ES) actually plays more like a caster. Damage items are not very useful, but mana items can be nice."set DM0[i]="A good cast of Fissure can isolate an opponent and cut off their escape. Practice often to achieve devastating results."set DN0[i]="Kelen's Dagger is an incredible item on ES, it allows you to quickly position yourself for the perfect Fissure or Echoslam."set DS0[i]="The timing of your spells is important, by spacing them out properly you can keep a group of heroes disabled for several seconds."set DT0[i]="Due to Raigor's ability to split up an enemy team and keep them stunned, he is great for initiating fights."set i=i+1set D70[9]=1212365106set DK0[9]=1747989559set D80[9]=1848654168set DJ0[9]="ReplaceableTextures\\CommandButtons\\BTNSatyrTrickster.blp"call NAI(D70[9],"stand 4")call N5I(D70[9],1,DK0[9])set DL0[i]="Getting at least one level of Blink Strike and Smoke Screen help you survive to level 6 when you can learn Permanent Invisibility."set DM0[i]="Attacking or using your spells makes you visible: Consider the fade time of Permanent Invisibility before placing yourself at risk."set DN0[i]="Try to position Smoke Screen slightly behind enemies so that they spend more time in the cloud if they retreat."set DS0[i]="Wraith Bands and later a Yasha or a Diffusal Blade will provide Rikimaru with cheap damage and chasing power for dispatching fragile heroes quickly."set DT0[i]="Be careful of items that render you visible, such as Dust of Appearance, Sentry Wards or a Gem of True Sight."set i=i+1set D70[10]=1311781199set DK0[10]=1747989560set D80[10]=1848654169set DJ0[10]="ReplaceableTextures\\CommandButtons\\BTNDruidOfTheClaw.blp"call NAI(D70[10],"spell slam")call N5I(D70[10],1,DK0[10])call N5I(1848652083,1.1,DK0[10])call N5I(1848652084,1.2,DK0[10])call N5I(1848652085,1.3,DK0[10])call N5I(1848651828,1,DK0[10])call N5I(1848652088,1.1,DK0[10])call N5I(1848652099,1.2,DK0[10])call N5I(1848652103,1.3,DK0[10])set DL0[i]="Spirit Bear is great to have in the lane and allowing Syllabear to fight neutral creeps because of its high HP and damage. "set DM0[i]="Leveling Spirit Bear also gets various bonuses that make it very powerful for fighting heroes and towers so it is usually the first thing to max out."set DN0[i]="Your Spirit Bear might be able to handle a lot of damage, but if it dies you will also take damage (100 X its level). If you die, it dies as well."set DS0[i]="Give items to your bear instead of Syllabear since it is usually engaging the enemy for you. Remember that stat-increasing items do not benefit the bear."set DT0[i]="True Form gives Syllabear massive HP in his melee form, and Rabid and Battle Cry give both him and his Bear huge damage temporarily."set i=i+1set D70[11]=1211117620set DK0[11]=1747989561set D80[11]=1848654170set DJ0[11]="ReplaceableTextures\\CommandButtons\\BTNSorceress.blp"call NAI(D70[11],"stand victory")call N5I(D70[11],1.2,DK0[11])set DL0[i]="Light Strike Array is usually a good skill to get at level 1 because it provides you with a stun."set DM0[i]="Target the ground in their direction instead of clicking on enemies to maximize Dragon Slave's long range."set DN0[i]="Cheap items will help Lina do her job: Bracers, Bottle, Phase Boots. A Point booster provides a nice HP/mana bonus for its cost."set DS0[i]="Fiery Soul can help you maneuver better during a fight."set DT0[i]="Try to stun as many heroes as possible during team fights"set i=i+1set D70[12]=1315070563set DK0[12]=1747989569set D80[12]=1848656181set DJ0[12]="ReplaceableTextures\\CommandButtons\\BTNChaosBlademaster.blp"call NAI(D70[12],"stand victory")call N5I(D70[12],1,DK0[12])set DL0[i]="Blade Fury is your most important skill early game for getting hero kills and avoiding magic damage."set DM0[i]="Avoid follow-command (right-clicking) heroes with Blade Fury and instead click the ground near the opponent."set DN0[i]="Isolate enemy heroes before using Omnislash to prevent Juggernaut from attacking multiple targets and doing less damage."set DS0[i]="Increasing your attack speed will give you 'extra attacks' during Omnislash, which are treated like a normal attack (in terms of damage and orb effects)."set DT0[i]="Protect the 1-HP Healing Ward in battles and it can prolong and save the lives of your entire team."set i=i+1set D70[13]=1311781185set DK0[13]=1747989570set D80[13]=1848654135set DJ0[13]="ReplaceableTextures\\CommandButtons\\BTNSpellBreaker.blp"call NAI(D70[13],"stand ready")call N5I(D70[13],1,DK0[13])set DL0[i]="Glaives of Wisdom is useful to get early because it is useful for killing creeps and harassing your opponent manually ('W' and then the target)."set DM0[i]="Curse of the Silent will cause an enemy to lose HP/mana if they do not choose to use their spells, or cannot use their spells (disabled, silenced, cooldown)."set DN0[i]="Last Word will prevent enemies from using multiple spells on you and your team at the same time provided you get close enough."set DS0[i]="Global Silence can be used for initiating on enemies or saving allies early on. Try to pay attention to your teammates and enemies, even those not nearby."set DT0[i]="Global Silence will also give your allies the opportunity in team battles to use their spells without repercussions - making it a powerful control spell."set i=i+1set D70[14]=1214344551set DK0[14]=1747989571set D80[14]=1848654150set DJ0[14]="ReplaceableTextures\\CommandButtons\\BTNTreant.blp"call NAI(D70[14],"stand 3")call N5I(D70[14],0.72,DK0[14])set DL0[i]="Thanks to his high base damage and survivability, Rooftrellen can usually obtain high-tier damage or caster items depending on the needs of the team."set DM0[i]="Living armor adds significant defensive bonuses to an allied unit. It can even be cast on buildings to make them more resilient and provide regeneration."set DN0[i]="Nature's Guise is more than an escape tool, it can be used offensively as well. Use it to position allies and yourself near trees before surprising the enemy."set DS0[i]="Use Eyes in the Forest whenever you can to gain vision of key locations such as the rune spots, neutral creep camps and Roshan."set DT0[i]="Enemies under the effect of Overgrowth can still use spells and items, so make sure your team acts quickly while enemies remain immobilized."set i=i+1set D70[15]=1328558389set DK0[15]=1747990352set D80[15]=1848657731set DJ0[15]="ReplaceableTextures\\CommandButtons\\BTNHeroTaurenChieftain.blp"call NAI(D70[15],"stand victory")call N5I(D70[15],1.1,DK0[15])set DL0[i]=""set DM0[i]=""set DN0[i]=""set DS0[i]=""set DT0[i]=""set i=i+1set D70[16]=1214409837set DK0[16]=1747989573set D80[16]=1848654151set DJ0[16]="ReplaceableTextures\\CommandButtons\\BTNHeroArchMage.blp"call NAI(D70[16],"stand victory")call N5I(D70[16],1.2,DK0[16])call N5I(1211119192,1.5,DK0[16])call N5I(1211119193,1.5,DK0[16])call N5I(1211119191,1.5,DK0[16])set DL0[i]="Chakra Magic is an amazing support skill that you should cast on allies as often as possible if they have powerful spells."set DM0[i]="Illuminate can be useful for earning gold or clearing creeps quickly, but channeling the blast can leave you vulnerable. "set DN0[i]="Mana Leak gives you the offensive: An enemy that moves loses his resources to cast spells, but if he does not, you can punish him with spells and attacks."set DS0[i]="When in your Spirit Form, use Blinding Light to push enemies aside, and Recall for saving or calling on the assistance of an ally."set DT0[i]="Keeper of the Light usually needs to stay back in fights and make use of the long range of his spells as a support hero when pushing and defending."set i=i+1set D70[17]=1215657064set DK0[17]=1747989574set D80[17]=1848654166set DJ0[17]="ReplaceableTextures\\CommandButtons\\BTNFurbolgTracker.blp"call NAI(D70[17],"attack spell")call N5I(D70[17],1.2,DK0[17])set DL0[i]="Get Fury Swipes and Overpower early. Fury Swipes is a very powerful orb effect on Ursa, replacing it with another is not advised."set DM0[i]="Ursa is a very effective hero to fight neutral creeps with: Vladimir's Offering is a recommended item choice."set DN0[i]="Thanks to Enrage, Ursa usually purchases items that increase HP or Strength over Agility and Damage items."set DS0[i]="It is a good idea to fight the two ancient camps when you need a quick boost in experience and gold. They are marked red in your minimap."set DT0[i]="Certain items like Kelen's Dagger and Lothar's Edge will help both close the distance on enemies and take them by surprise."set i=i+1set D70[18]=1215130471set DK0[18]=1747989575set D80[18]=1848656177set DJ0[18]="ReplaceableTextures\\CommandButtons\\BTNOgreMagi.blp"call NAI(D70[18],"sleep")call N5I(D70[18],1.4,DK0[18])set DL0[i]="Buying a few Clarity Potions, Ring of Basilius or Bottle in the beginning of the game will help you cast a few more spells."set DM0[i]="Fireblast provides a disable, Ignite provides a slow. Both deal damage, usually making them good skills early."set DN0[i]="Ogre Magi has a lot of survivability but he does need the ability to use his spells: An Arcane Ring might be the only item you will need all game."set DS0[i]="Use Bloodlust to help teammates chase and escape enemies and on the hero capable of dealing the most damage before major battles."set DT0[i]="Focus heroes that need to be shut down quickly with Fireblast: Hopefully they are repeatedly damaged and disabled by the effect of Multicast."set i=i+1set D70[19]=1316252014set DK0[19]=1747989576set D80[19]=1848656193set DJ0[19]="ReplaceableTextures\\CommandButtons\\BTNHeroTinker.blp"call NAI(D70[19],"stand 2")call N5I(D70[19],1,DK0[19])set DL0[i]="Laser and Missile give Tinker massive burst damage, so it is usually a good idea to get these two skills before Rearm, your ultimate."set DM0[i]="Laser is not reduced by magic resistance or armor; you deal the number in the description exactly."set DN0[i]="You can use the active effects of items indefinitely with Rearm, which makes Boots of Travel a very powerful item for Tinker."set DS0[i]="March of the Machines can be very useful for killing creeps quickly, its large area of effect makes it useful for pushing and team fights."set DT0[i]="Level 1 of Rearm is generally enough until much later when you have the mana pool to support levels 2 and 3."set i=i+1set D70[20]=1164799603set DK0[20]=1747989577set D80[20]=1848656180set DJ0[20]="ReplaceableTextures\\CommandButtons\\BTNFurion.blp"call NAI(D70[20],"spell")call N5I(D70[20],1.2,DK0[20])set DL0[i]="Get Force of Nature early if you plan on leaving the lane to kill neutral creeps. Start with a Ring of Basilius to provide you with mana and armor."set DM0[i]="Invest points in Teleportation, it gives you the mobility to be anywhere in the map: Cancel the spell if you change your mind by clicking 'S'."set DN0[i]="Sprout can be extremely useful offensively and defensively so get at least one point in it. Higher levels increase the duration but also the mana cost."set DS0[i]="Teleportation shows allies and enemies where you intend to go, so if you want to surprise enemies, teleport where they cannot see."set DT0[i]="Wrath of Nature is a great farming tool but also a powerful nuke on enemy heroes: Hit other units nearby to deal more damage to the intended target."set i=i+1set D70[21]=1332179560set DK0[21]=1747989578set D80[21]=1848656179set DJ0[21]="ReplaceableTextures\\CommandButtons\\BTNHellScream.blp"call NAI(D70[21],"stand victory")call N5I(D70[21],1,DK0[21])set DL0[i]="Get Spirit Lance and Doppelwalk first because Juxtapose is better when your illusions have more health and damage."set DM0[i]="Beware of the high mana costs of your spells early game, especially for Doppelwalk, which can be an escape mechanism."set DN0[i]="Keep your opponents guessing by controlling your illusions created by Doppelwalk and Juxtapose."set DS0[i]="Your illusions are amazing for pushing later on. Focus creeps and heroes first because illusions will not create new ones when attacking buildings."set DT0[i]="Diffusal Blade and Manta Style are good choices of because they make his images much stronger by adding Agility directly."set i=i+1set D70[22]=1432580716set DK0[22]=1747989579set D80[22]=1848656183set DJ0[22]="ReplaceableTextures\\CommandButtons\\BTNMountainGiant.blp"call NAI(D70[22],"spell")call N5I(D70[22],0.5,DK0[22])set DL0[i]="Buy items that give you at least 3 Intelligence or 39 mana in the beginning of the game so that you can use both of your spells at level 2."set DM0[i]="Avalanche and Toss should be the two spells you level first because they make you a force to be reckoned with early game."set DN0[i]="You can sometimes kill a hero outright by casting Avalanche on him, and then Tossing him on the Avalanche area of effect before the animation ends."set DS0[i]="To ensure that you Toss your desired target, isolate him by making him the only one in the area of effect. Kelen's Dagger can help you with placement."set DT0[i]="Tiny deals most of his damage through Avalanche and Toss, so the reduced attack speed from Grow is less important than the bonuses given."set i=i+1set D70[23]=1211117643set DK0[23]=1747989580set D80[23]=1848656185set DJ0[23]="ReplaceableTextures\\CommandButtons\\BTNGoblinSapper.blp"call NAI(D70[23],"stand 2")call N5I(D70[23],1,DK0[23])set DL0[i]=""set DM0[i]=""set DN0[i]=""set DS0[i]=""set DT0[i]=""set i=i+1set D70[24]=1211117633set DK0[24]=1747989581set D80[24]=1848656194set DJ0[24]="ReplaceableTextures\\CommandButtons\\BTNHeroFarseer.blp"call NAI(D70[24],"spell chain lightning")call N5I(D70[24],1,DK0[24])set DL0[i]="Chen can take control of high level neutral creeps with Holy Persuasion, making him extremely powerful at low levels even without items."set DM0[i]="Neutrals with special abilities usually are more useful, try to find out what has a disable or slow as this will be much better for attacking heroes with."set DN0[i]="When preparing to attack from the forest, start with Penitence to slow enemies. Engage enemies from the side or from behind to catch them off guard."set DS0[i]="Chen excels as a support hero, items that contribute to teammates such as Mekansm usually benefit the team more than damage items."set DT0[i]="Hand of God is really useful early on for helping allies across the map. Later, it can be used to assist with pushing or defending."set i=i+1set D70[25]=1160785973set DK0[25]=1747989582set D80[25]=1848656453set DJ0[25]="ReplaceableTextures\\CommandButtons\\BTNHuntress.blp"call NAI(D70[25],"spell")call N5I(D70[25],1,DK0[25])set DL0[i]="The level of Lucent Beam determines the damage of Eclipse, making it the most important spell to get first. "set DM0[i]="Moon Glaives can be useful early if you plan to kill neutral creeps. Lifesteal items like Helm of the Dominator can help you survive against neutral creeps."set DN0[i]="Try to cast Eclipse on enemy heroes when other units are not present to maximize the damage dealt to a single target. "set DS0[i]="Later on with some attack speed, Lunar Blessing and Moon Glaives provide you with both massive damage and pushing power."set DT0[i]="You should also consider items that allow you to land Eclipse successfully and increase your carry potential in battles, such as a Black King Bar."set i=i+1set D70[26]=1433631084set DK0[26]=1747989583set D80[26]=1848656452set DJ0[26]="ReplaceableTextures\\CommandButtons\\BTNRifleman.blp"call NAI(D70[26],"spell")call N5I(D70[26],1.1,DK0[26])set DL0[i]="Headshot will provide you with bonus damage and a short stun, making it useful for killing creeps and harassing with his incredible attack animation."set DM0[i]="Sniper usually needs to find a combination of damage, attack speed and survivability that allow him to deal significant damage but survive to do so."set DN0[i]="Sniper is very fragile so he needs to maintain his range. Getting Take Aim and/or Shrapnel can help provide means of staying out of harm's way."set DS0[i]="Shrapenl can also be used for slowing opponents, pushing or defending against large waves of creeps."set DT0[i]="Try to use Assassinate to heavily damage an enemy before the fight even begins to give your team an advantage."set i=i+1set D70[27]=1311781174set DK0[27]=1747989584set D80[27]=1848656184set DJ0[27]="ReplaceableTextures\\CommandButtons\\BTNForestTroll.blp"call NAI(D70[27],"stand 3")call N5I(D70[27],1.25,DK0[27])call N5I(1311781442,1.25,DK0[27])call N5I(1311781175,1.25,DK0[27])set DL0[i]="Berserker's Rage gives Troll the option of melee combat, which gives him many powerful offensive bonuses at the cost of losing his ranged ability."set DM0[i]="roll Warlord generally does not have to worry about attack speed thanks to his set of skills, go for damage or survivability items instead."set DN0[i]="Blind will prevent your opponents from landing all their attacks, making it harder from them to harass you or kill your creeps for gold."set DS0[i]="Play defensively and fight neutral creeps too. Switch to melee form and it will allow you to have an easier time."set DT0[i]="In team battles, it is vital that you cast Blind on the enemy hero that deals the most damage as this will greatly reduce their damage output."set i=i+1set D70[28]=1332898670set DK0[28]=1747989815set D80[28]=1848654132set DJ0[28]="ReplaceableTextures\\CommandButtons\\BTNShadowHunter.blp"call NAI(D70[28],"stand victory")call N5I(D70[28],1,DK0[28])set DL0[i]="At least one level of Shackles is advised early on for immobilizing opponents. Remember that it is channeling so it can be interrupted or broken by yourself."set DM0[i]="Rhasta needs survivability and the mana to use his spells: Bracers, Null Talismans, Point Booster are examples of items that will help out a lot."set DN0[i]="Forked Lightning is your primary nuke and finisher due to its range and ability to hit multiple targets, so it more effective to get it earlier than later."set DS0[i]="Use Shackles and Voodoo on enemy heroes when casting Mass Serpent Ward. You can even surround an enemy completely with the right timing."set DT0[i]="Mass Serpent Wards can clear creeps quickly and deal a lot of damage over time to buildings, making them really useful for pushing and defending."set i=i+1set D70[29]=1328558406set DK0[29]=1747993417set D80[29]=1848658771set DJ0[29]="ReplaceableTextures\\CommandButtons\\BTNWispHero.blp"call NAI(D70[29],"stand 3")call N5I(D70[29],1.30,DK0[29])set DL0[i]=""set DM0[i]=""set DN0[i]=""set DS0[i]=""set DT0[i]=""set i=i+1set D70[30]=1315988077set DK0[30]=1747989811set D80[30]=1848656207set DJ0[30]="ReplaceableTextures\\CommandButtons\\BTNPandarenBrewmaster.blp"call NAI(D70[30],"stand ready")call N5I(D70[30],1,DK0[30])set DL0[i]="Thunder Clap is a great skill early game but you may need to invest in regeneration items such as a Bottle, Magic Stick, Ring of Basilius or Void Stone."set DM0[i]="Drunken Haze works not only as a slow, but the miss chance reduces the damage severely for enemy heroes."set DN0[i]="Primal Split is not only for escaping: Once you master your three Pandas, Earth, Storm and Fire, you can use them offensively as well."set DS0[i]="In Primal Split form, Mangix has two useful disables that can be used against enemies: Storm's Cyclone and Earth's Hurl Boulder."set DT0[i]="Mangix usually initiates for the team, so survivability items are helpful, investing in a Kelen's Dagger to help land Thunder Clap is often a good idea."set i=i+1set D70[31]=1211117616set DK0[31]=1747989592set D80[31]=1848656206set DJ0[31]="ReplaceableTextures\\CommandButtons\\BTNCentaurKhan.blp"call NAI(D70[31],"stand 3")call N5I(D70[31],1.75,DK0[31])set DL0[i]="Return should be leveled if Centaur plans to fight neutral creeps, otherwise Double Edge is more useful in the lane."set DM0[i]="Thanks to a high strength gain and the bonus strength from your ultimate, Centaur is a great at heading into battle first and receiving damage."set DN0[i]="A Hood of Defiance can prove to be just as useful as a Vanguard depending on whether the other team has a lot of magical spells."set DS0[i]="Avoid putting yourself at risk after using Double Edge. You can use it to commit suicide if you are about to die to deny opponents experience and gold."set DT0[i]="Kelen's Dagger is a great way of initiating on opponents and dealing with his slow casting animation of Stomp."set i=i+1set D70[32]=1315007329set DK0[32]=1747989810set D80[32]=1848656205set DJ0[32]="ReplaceableTextures\\CommandButtons\\BTNakama.blp"call NAI(D70[32],"stand var4")call N5I(D70[32],1.2,DK0[32])set DL0[i]="Shuriken Toss, Wind Walk and Track are much more useful than Jinada early on."set DM0[i]="You're going to need mana regen: Bottle, Ring Of Basillius and Void Stone are examples of good options. "set DN0[i]="Use Wind Walk cautiously: If you wait until the cooldown is complete before breaking out of invisibility, you can cast it again immediately afterward."set DS0[i]="Shuriken Toss and Wind Walk deal a lot of damage quickly: Search the map often for low HP heroes to hunt. "set DT0[i]="Use Track on a nearby enemy hero to allow you and your allies to outrun them. Also cast it on nearly dead heroes for bonus gold."set i=i+1set D70[33]=1215063922set DK0[33]=1747989590set D80[33]=1848656209set DJ0[33]="ReplaceableTextures\\CommandButtons\\BTNTheCaptain.blp"call NAI(D70[33],"stand victory")call N5I(D70[33],1.35,DK0[33])call N5I(1211117638,1,DK0[33])call N5I(1211117639,1,DK0[33])call N5I(1211117637,1,DK0[33])call EO1(1211117639,255,255,200)call EO1(1211117638,255,255,200)call EO1(1211117639,255,200,200)set DL0[i]="Breath Fire is a strong nuke and farming ability. However, against difficult opponents, Dragon's Blood is very useful."set DM0[i]="Dragon Tail is the longest duration level 1 stun in the game. One point is usually sufficient until later on."set DN0[i]="Thanks to the defensive bonuses on Dragon's Blood, he can often focus on other damage items instead of increasing armor and regeneration."set DS0[i]="Level 1 of Elder Dragon Form has a special passive called Corrosive Attack, which deals significant damage over time against towers."set DT0[i]="The ranged splash damage and slow of his Level 3 ultimate makes him extremely powerful; getting to level 16 is very important for DK."set i=i+1set D70[34]=1164207469set DK0[34]=1747989588set D80[34]=1848656210set DJ0[34]="ReplaceableTextures\\CommandButtons\\BTNHeroDemonHunter.blp"call NAI(D70[34],"stand channel")call N5I(D70[34],1,DK0[34])set DL0[i]="Blink is very versatile, allowing you to chase, escape and even avoid certain spells. It is definitely worth at least one point in the beginning."set DM0[i]="You can also use Mana Break to prevent enemy heroes from casting spells on you, but be careful since it forces you to get in melee range to attack."set DN0[i]="Spell Shield might be useful for reducing magic damage, but it does not prevent you from being disabled or status effects (slow, poison, etc.)."set DS0[i]="Offensive items without orb effects such as a Battlefury, Monkey King Bar or Butterfly are usually desired over items that would override your Mana Break."set DT0[i]="Sometimes survivability is just as important as damage, items such as Linken's Sphere or Manta Style offer a good mix of both offense and defense."set i=i+1set D70[35]=1315074670set DK0[35]=1747989813set D80[35]=1848656204set DJ0[35]="ReplaceableTextures\\CommandButtons\\BTNBansheeRanger.tga"call NAI(D70[35],"spell")call N5I(D70[35],1,DK0[35])set DL0[i]="Frost Arrows make Drow an excellent chaser early game and allow her to harass opponents safely by manually casting them (clicking 'R' and the target)."set DM0[i]="An early level of Silence is great for preventing opponents from using multiple spells on you or your allies."set DN0[i]="Trueshot Aura and Marksmanship provide Traxex with plenty of damage even with just a few Wraith Bands and Power Treads."set DS0[i]="Lothar's Edge provides damage and an escape mechanism, the latter of which can help Traxex survive."set DT0[i]="Stay out of danger in major battles, only close in on your enemies when you are chasing and finishing off heroes near the end."set i=i+1set D70[36]=1214345830set DK0[36]=1747989594set D80[36]=1848656211set DJ0[36]="ReplaceableTextures\\CommandButtons\\BTNArthas.blp"call NAI(D70[36],"stand victory")call N5I(D70[36],1.1,DK0[36])set DL0[i]="Omniknight is a powerful support hero, items that provide mana such as Arcane Ring help make sure that you can use all your spells."set DM0[i]="Purification can be used offensively and defensively: The unit you cast it on will deal damage around it, making it a powerful heal and nuke."set DN0[i]="Degen Aura is a very strong passive slow that is useful both to chase down enemy heroes and help you and your allies escape as well."set DS0[i]="Repel is used to remove buffs from allies and enemies, and to prevent heroes with spells from being interrupted or damage dealers from being disabled."set DT0[i]="Guardian Angel makes a team nearly impervious to physical damage and provides 25/sec HP regeneration, use this time wisely to survive or attack."set i=i+1set D70[37]=1211117636set DK0[37]=1747989587set D80[37]=1848656203set DJ0[37]="ReplaceableTextures\\CommandButtons\\BTNBeastMaster.blp"call NAI(D70[37],"spell slam")call N5I(D70[37],1,DK0[37])set DL0[i]="Endurance Aura is usually more useful later in the game when your team is fighting together, so get your other skills first."set DM0[i]="Call of the Wild is very powerful: The boar gives damage and slow, while the hawk can provide vision over runes, neutral creeps and other key locations."set DN0[i]="Wild Axes are more useful early game and against heroes with less armor. Destroy trees with Wild Axes to surprise your opponents and for escaping."set DS0[i]="Try casting Wild Axes behind the target to compensate for their movement. You can also manipulate their return path by moving Rexxar."set DT0[i]="Find opportunities to use Roar whenever it is available. It is useful on heroes who have an escape mechanism or are immune to magic."set i=i+1set D70[38]=1160786000set DK0[38]=1747989586set D80[38]=1848656202set DJ0[38]="ReplaceableTextures\\CommandButtons\\BTNChimaera.blp"call NAI(D70[38],"stand 3")call N5I(D70[38],1,DK0[38])set DL0[i]="Dual Breath and Ice Path help to make Jakiro a strong offensive and defensive support hero. "set DM0[i]="Jakiro can cast his spells immediately by clicking the nearby ground in the desired direction, sometimes this is more effective than clicking on the target."set DN0[i]="A level of Liquid Fire early on can be useful for deterring physical attacks "set DS0[i]="Macropyre is a slow but powerful spell, combine it with other spells (yours or a teammate) to make sure the opponent is standing in the area of effect."set DT0[i]="It is often a good idea to purchase useful support items like Mekansm or Shiva's Guard, two items that also increase his low armor significantly."set i=i+1set D70[39]=1311781193set DK0[39]=1747989812set D80[39]=1848656201set DJ0[39]="ReplaceableTextures\\CommandButtons\\BTNHeroAlchemist.blp"call NAI(D70[39],"stand 2")call N5I(D70[39],1,DK0[39])call N5I(1311781194,1,DK0[39])call N5I(1311781192,1,DK0[39])call N5I(1311781204,1,DK0[39])set DL0[i]=""set DM0[i]=""set DN0[i]=""set DS0[i]=""set DT0[i]=""set i=i+1set D70[40]=1311781206set DK0[40]=1747989591set D80[40]=1848656200set DJ0[40]="ReplaceableTextures\\CommandButtons\\BTNPriestessOfTheMoon.blp"call NAI(D70[40],"stand ready")call N5I(D70[40],1,DK0[40])set DL0[i]="PotM can be extremely efficient and gank with just a few Wraith Bands, Boots of Speed and a Bottle."set DM0[i]="Getting one level of Leap is usually sufficient early on until Starfall and Elune's Arrow are fully leveled."set DN0[i]="Land your Elune's Arrow by coordinating with allies and predicting enemy movements. You can even hit invisible or faraway targets with practice."set DS0[i]="Starfall hits a second time for half damage to one random enemy within 200 range, get close if you can to deal bonus damage"set DT0[i]="Moonlight Shadow can be used to initiate or escape but sometimes it can be learned later when PotM can use it without compromising her mana pool."set i=i+1set D70[41]=1211117651set DK0[41]=1747989585set D80[41]=1848656212set DJ0[41]="ReplaceableTextures\\CommandButtons\\BTNStorm.blp"call NAI(D70[41],"spell")call N5I(D70[41],1,DK0[41])set DL0[i]="Do not get Overload at level 1 since you do not have any spells to activate its effect with."set DM0[i]="Choosing which ability to max first can be difficult, but generally at least one point in all three skills is a good idea."set DN0[i]="You have to wait 1 second after casting Static Remnant before it begins detecting nearby units for its explosion effect."set DS0[i]="In addition to chasing and escaping, Lightning Ball can be used to dodge many spells with the right timing."set DT0[i]="An item like Bloodstone is useful on Storm Spirit because the percentage-based mana cost of Lightning Ball makes regeneration an important asset."set i=i+1set D70[42]=1211117649set DK0[42]=1747989593set D80[42]=1848656199set DJ0[42]="ReplaceableTextures\\CommandButtons\\BTNHeadHunterBerserker.blp"call NAI(D70[42],"stand alternate 3")call N5I(D70[42],1.15,DK0[42])set DL0[i]="A level of Burning Spears early on is great for harassing enemy heroes. Use it manually by clicking 'R' then the desired target to avoid drawing focus fire."set DM0[i]="Berserker's Blood makes you stronger as you take damage. The bonuses stop when you have 51% HP, so there is little point in taking additional damage."set DN0[i]="Life Break deals damage based on the remaining health of the target, making it strongest at the beginning of a fight. "set DS0[i]="Inner Vitality heals more when you have less than 40% of your life, but avoid making the mistake of casting it too late in battles."set DT0[i]="Survivability while in low health is important for Huskar: Consider items such as Armlet of Mordiggan, Black King Bar, or Heart of Tarrasque."set i=i+1set D70[43]=1160786265set DK0[43]=1747989816set D80[43]=1848656198set DJ0[43]="ReplaceableTextures\\CommandButtons\\BTNAssassin.blp"call NAI(D70[43],"stand victory")call N5I(D70[43],1.2,DK0[43])set DL0[i]="Refraction is a great way of surviving in a lane, just be careful not to get hit by creeps too much."set DM0[i]="Meld starts cooling down when you click the spell, so you can hit him twice with it if you can predict your enemy's movements."set DN0[i]="Traps can be used for vision, most effectively in cramped areas like the end of ramps or at the rune powerup spots."set DS0[i]="You can farm extremely fast by positioning yourself so that the Psi Blades splash on multiple creeps at once."set DT0[i]="Placing a trap or two before engaging a fight can be a good idea, to cut off possible escape and/or chase routes."set i=i+1set D70[44]=1311780930set DK0[44]=1747989808set D80[44]=1848656197set DJ0[44]="ReplaceableTextures\\CommandButtons\\BTNFaerieDragon.blp"call NAI(D70[44],"attack spell")call N5I(D70[44],1.1,DK0[44])set DL0[i]="Illusory Orb and Jaunt are used to travel short distances quickly, but if you wait too long to Jaunt, you will lose the opportunity."set DM0[i]="Puck is very fragile early game, some Bracers or Null Talismans and a level of Phase Shift can help you survive."set DN0[i]="Using Phase Shift manually instead of Autocast will prevent stray attacks from triggering it on Autocast. In general you will have better control of its use."set DS0[i]="Waning Rift deals damage and silences, but forces you to be close enough. Use Illusory Orb or Dream Coil to help you land the spell on enemies."set DT0[i]="Puck is a great initiator in fights who offers control of the battle with his spells, allowing allies to join the battle and use their spells or attacks safely."set i=i+1set D70[45]=1211117652set DK0[45]=1747989809set D80[45]=1848656213set DJ0[45]="ReplaceableTextures\\CommandButtons\\BTNClockWerkGoblin.blp"call NAI(D70[45],"Birth")call N5I(D70[45],1.5,DK0[45])set DL0[i]="You can use Rocket Flare for harassing and killing creeps early on. With the right timing, you can even fire at enemies across the map."set DM0[i]="Power Cogs can be used to trap an enemy, push them away while draining mana, or as an escape mechanism since Rattletrap destroys Cogs in only 1 hit."set DN0[i]="Battery Assault adds a lot of damage and the stuns help you with chasing, use it when no other units are nearby for best results."set DS0[i]="Hookshot's long range and high speed lets you reach enemies from out of sight. Follow up with your other spells quickly so your target cannot escape."set DT0[i]="Rocket Flare also gives vision where it lands, making it very useful for scouting areas such as rune spots, neutral creeps, the enemy base."set i=i+1set D70[46]=1211119187set DK0[46]=1747990100set D80[46]=1848657221set DJ0[46]="ReplaceableTextures\\CommandButtons\\BTNProudmoore.blp"call NAI(D70[46],"stand victory")call N5I(D70[46],1.1,DK0[46])set DL0[i]="Tidebringer is extremely useful early game: Use the bonus damage for killing creeps and the cleave effect to harass opponents at the same time."set DM0[i]="The bubble animation from Torrent can only be seen by your team so try to use this to your advantage."set DN0[i]="An ally's assistance or X Marks the Spot is a great way of making sure Torrent and Ghost Ship hit your opponent."set DS0[i]="Escaping enemy heroes is easy by casting X Marks the Spot on them. It also prevents them from getting away."set DT0[i]="The Ghost Ship will crash 1000 range from where you stand when you cast it. Keep your distance when you use it."set i=i+1set D70[47]=1311786311set DK0[47]=1747990337set D80[47]=1848657224set DJ0[47]="ReplaceableTextures\\CommandButtons\\BTNSylvanusWindrunner.blp"call NAI(D70[47],"stand victory")call N5I(D70[47],1.2,DK0[47])set DL0[i]="Powershot deals significant damage, making it ideal to max first. Be sure not to fire through creeps if you want to deal maximum damage to your target."set DM0[i]="An early level of Windrunner can provide you with a quick getaway and chasing tool."set DN0[i]="Shackleshot can either be used on your intended target to bind him to a nearby unit, or to bind the designated target located BEHIND the unit that you fired it at."set DS0[i]="Focus Fire is also a powerful spell to use on buildings and Roshan."set DT0[i]="As long as you do not attack another target, the effect of Focus Fire will stay on. Use your spells and active items to help you fire at your target."set i=i+1set D70[48]=1160786510set DK0[48]=1747993411set D80[48]=1848658766set DJ0[48]="ReplaceableTextures\\CommandButtons\\BTNFlyingMachine.blp"call NAI(D70[48],"stand 3")call N5I(D70[48],1.10,DK0[48])call N5I(1160786511,1.10,DK0[48])set DL0[i]=""set DM0[i]=""set DN0[i]=""set DS0[i]=""set DT0[i]=""set i=i+1set D70[49]=1160786506set DK0[49]=1747993412set D80[49]=1848658770set DJ0[49]="ReplaceableTextures\\CommandButtons\\BTNThrall.blp"call NAI(D70[49],"stand 3")call N5I(D70[49],1.10,DK0[49])set DL0[i]=""set DM0[i]=""set DN0[i]=""set DS0[i]=""set DT0[i]=""set i=i+1set D70[50]=1160786505set DK0[50]=1747993401set D80[50]=1848658763set DJ0[50]="ReplaceableTextures\\CommandButtons\\BTNTuskaarBrown.blp"call NAI(D70[50],"stand 3")call N5I(D70[50],1.00,DK0[50])set DL0[i]=""set DM0[i]=""set DN0[i]=""set DS0[i]=""set DT0[i]=""set i=i+1set D70[51]=1160786502set DK0[51]=1747993400set D80[51]=1848658765set DJ0[51]="ReplaceableTextures\\CommandButtons\\BTNPhoenix.blp"call NAI(D70[51],"stand 3")call N5I(D70[51],1.05,DK0[51])set DL0[i]=""set DM0[i]=""set DN0[i]=""set DS0[i]=""set DT0[i]=""set i=i+1set D70[52]=1211117624set DK0[52]=1747989589set D80[52]=1848656195set DJ0[52]="ReplaceableTextures\\CommandButtons\\BTNRazorback.blp"call NAI(D70[52],"stand")call N5I(D70[52],1.65,DK0[52])set DL0[i]="Rigwarl is a known for punishing heroes that attack him and surviving for long times but he still needs armor, regeneration and hit points."set DM0[i]="Quill spray doesn't initially deal much damage, but the stacking effect makes it very powerful over time in battles."set DN0[i]="Sometimes one level of Goo can be enough to slow down an enemy hero early game."set DS0[i]="Rigwarl needs a fair amount of mana early-game, Ring of Basilius, Magic Stick or Bottle can boost his early offensive power immensely."set DT0[i]="You can mitigate a lot of damage if you turn your hero at the right times thanks to your passive Bristleback. Play mind games on your opponent."set i=i+1set D70[53]=1160786520set DK0[53]=1747993428set D80[53]=1848659019set DJ0[53]="ReplaceableTextures\\CommandButtons\\BTNMedivh.blp"call NAI(D70[53],"stand 3")call N5I(D70[53],1.15,DK0[53])set DL0[i]=""set DM0[i]=""set DN0[i]=""set DS0[i]=""set DT0[i]=""set i=i+1set D70[54]=1311788336set DK0[54]=1747993671set D80[54]=1848659249set DJ0[54]="ReplaceableTextures\\CommandButtons\\BTNFireBrewmaster.blp"call NAI(D70[54],"stand 3")call N5I(D70[54],1,DK0[54])set DL0[i]=""set DM0[i]=""set DN0[i]=""set DS0[i]=""set DT0[i]=""set i=i+1set D70[55]=1160786507set DK0[55]=1747993409set D80[55]=1848658762set DJ0[55]="ReplaceableTextures\\CommandButtons\\BTNGarithos.blp"call NAI(D70[55],"stand 3")call N5I(D70[55],1.3,DK0[55])set DL0[i]=""set DM0[i]=""set DN0[i]=""set DS0[i]=""set DT0[i]=""set i=i+1set D70[56]=1211122767set DK0[56]=1747993672set D80[56]=1848659254set DJ0[56]="ReplaceableTextures\\CommandButtons\\BTNDragonHawk.blp"call NAI(D70[56],"stand 3")call N5I(D70[56],1.1,DK0[56])set DL0[i]=""set DM0[i]=""set DN0[i]=""set DS0[i]=""set DT0[i]=""set i=i+1set D70[57]=1160786738set DK0[57]=1747993922set D80[57]=1848659269set DJ0[57]="ReplaceableTextures\\CommandButtons\\BTNJunkGolem.blp"call NAI(D70[57],"stand 3")call N5I(D70[57],1,DK0[57])set DL0[i]=""set DM0[i]=""set DN0[i]=""set DS0[i]=""set DT0[i]=""set i=i+1set D70[58]=1311788373set DK0[58]=1747993931set D80[58]=1848659286set DJ0[58]="ReplaceableTextures\\CommandButtons\\BTNEarthBrewmaster.blp"call NAI(D70[58],"stand 3")call N5I(D70[58],1,DK0[58])set DL0[i]=""set DM0[i]=""set DN0[i]=""set DS0[i]=""set DT0[i]=""set i=i+1set D70[59]=1311788356set DK0[59]=1747993936set D80[59]=1848659271set DJ0[59]="ReplaceableTextures\\CommandButtons\\BTNPriest.blp"call NAI(D70[59],"stand victory")call N5I(D70[59],1.25,DK0[59])set DL0[i]=""set DM0[i]=""set DN0[i]=""set DS0[i]=""set DT0[i]=""set i=i+1set DA0=59set i=60set DB0=60set D70[60]=1165451634set DK0[60]=1747989834set D80[60]=1848656437set DJ0[60]="ReplaceableTextures\\CommandButtons\\BTNHeroWarden.blp"call NAI(D70[60],"spell slam")call N5I(D70[60],1,DK0[60])set DL0[i]="Stifling Dagger is used for creep-killing and slowing opponents; prevent enemies from escaping by using it with Blink Strike."set DM0[i]="Try to Blink Strike to a nearby allied or enemy unit to make a quick escape when caught in a defensive situation. "set DN0[i]="Be cautious when entering battles with Blink Strike, you could be caught outnumbered or disabled without your escape mechanism."set DS0[i]="Blur can sometimes allow you to surprise opponents if they aren't paying attention."set DT0[i]="Items like Battlefury are useful, but getting a Black King Bar or a Satanic afterward will help you survive long enough to deal damage."set i=i+1set D70[61]=1211117654set DK0[61]=1747989835set D80[61]=1848656438set DJ0[61]="ReplaceableTextures\\CommandButtons\\BTNNagaSeaWitch.blp"call NAI(D70[61],"stand ready")call N5I(D70[61],1,DK0[61])call N5I(1211119684,1,DK0[61])call N5I(1211119683,1,DK0[61])call N5I(1211119668,1,DK0[61])call N5I(1211119682,1,DK0[61])set DL0[i]="Mystic Snake is a smart choice to have early game: Its damage and mana drain makes it great for harassing and offsetting its own mana cost."set DM0[i]="Mana Shield will increase your survivability drastically. Use it wisely or it can also leave you with no mana for your other spells."set DN0[i]="Using Split Shot allows you to attack multiple units, but the extra arrows from Split Shot do not gain the properties of orb effects."set DS0[i]="Stone Gaze is an ultimate that is used to slow opponents and remove their buffs, making it easy to escape or attack the purged enemies."set DT0[i]="Items that increase statistics and regeneration like Linkens Sphere will always be a good choice because of Mana Shield."set i=i+1set D70[62]=1432646245set DK0[62]=1747989836set D80[62]=1848656439set DJ0[62]="ReplaceableTextures\\CommandButtons\\BTNTichondrius.blp"call NAI(D70[62],"spell slam")call N5I(D70[62],1,DK0[62])set DL0[i]="Night Stalker may be passive during the day, but at night his spells make him much more powerful and great for hunting heroes down."set DM0[i]="Void is your primary source of damage early game and can be used to interrupt spells and teleports with its mini-stun."set DN0[i]="While Hunter in the Night does nothing during the day, get it so that during nighttime it will give you massive movement and attack speed."set DS0[i]="Use Crippling Fear when you are hunting heroes so that they cannot disable or slow you while you are chasing them."set DT0[i]="Since Darkness will pause time when activated, casting it at night whenever it is on cooldown will extend the total nighttime."set i=i+1set D70[63]=1313026096set DK0[63]=1747989837set D80[63]=1848656688set DJ0[63]="ReplaceableTextures\\CommandButtons\\BTNSkeletonArcher.blp"call NAI(D70[63],"stand victory")call N5I(D70[63],1.8,DK0[63])call EO1(D70[63],100,125,100)set DL0[i]="Skeleton King is a hero who is known for his ability to reincarnate if focused upon and dealing a lot of damage if he is ignored by opponents. "set DM0[i]="Hellfire Blast is a great spell for the early laning phase and a few levels of Attribute Bonus can give you stat points for additional stuns."set DN0[i]="Critical Strike is generally preferred over Vampiric Aura because its lifesteal is not very effective earlier when Leoric needs more damage."set DS0[i]="Make sure you have enough mana for Hellfire Blasts and especially Reincarnation. Buying a Magic Stick and/or a Bottle can pay off nicely."set DT0[i]="Get cheaper damage items like Armlet of Mordiggan and Desolator. A Black King Bar will allow you to dish out damage without being disabled."set i=i+1set D70[64]=1430467634set DK0[64]=1747989838set D80[64]=1848656470set DJ0[64]="ReplaceableTextures\\CommandButtons\\BTNDoomGuard.blp"call NAI(D70[64],"stand victory")call N5I(D70[64],1.1,DK0[64])set DL0[i]="Lucifer can obtain gold very quickly thanks to Devour, so getting regeneration items like Perseverance will help him to cast spells and survive in the lane."set DM0[i]="Devour deals 20 damage per second, so consume creeps with low HP remaining so you can finish digesting the enemy quickly."set DN0[i]="Use the command -ma to find your opponents' level for potential LVL? Death targets. Its mini-stun will also interrupt channeling spells and teleports."set DS0[i]="Doom is usually used in conjunction with LVL? Death for killing enemy heroes; you can also use it on heroes to silence their spells."set DT0[i]="When chasing or escaping with Scorched Earth, cast it in front of you so that you will experience the movement speed bonuses for a longer period of time."set i=i+1set D70[65]=1429221424set DK0[65]=1747989839set D80[65]=1848656469set DJ0[65]="ReplaceableTextures\\CommandButtons\\BTNHeroCryptLord.tga"call NAI(D70[65],"spell throw")call N5I(D70[65],0.8,DK0[65])set DL0[i]="Effective use of Impale and Mana Burn early game requires you to purchase some Null Talismans or Bracers and Bottle."set DM0[i]="Mana Burn is a devastating spell to have in the lane, force opponents to play defensively by preventing them from casting spells."set DN0[i]="Unlike other Agility heroes, Anub'arak is a caster. Getting items like Dagon can be more useful than purchasing damage items."set DS0[i]="Vendetta is a good initiating spell for surprising opponents. Cast it far away so that they cannot hear its sound effect upon activation."set DT0[i]="Be careful when using Vendetta against multiple opponents and going near towers where they can see you while you are invisible."set i=i+1set D70[66]=1430468913set DK0[66]=1747989840set D80[66]=1848656689set DJ0[66]="ReplaceableTextures\\CommandButtons\\BTNNagaMyrmidon.tga"call NAI(D70[66],"spell")call N5I(D70[66],1,DK0[66])call EO1(D70[66],175,75,200)set DL0[i]="Slithereen Crush requires good positioning, so do your best to stand next to the hero you are trying to stun."set DM0[i]="Sprint is a great spell for both chasing and escaping but be careful when using it because you will take bonus damage."set DN0[i]="In addition to lowering armor, Amplify Damage provides vision of enemies, even heroes that have the ability to become invisible."set DS0[i]="Bash is usually more effective later in the game when you have more items like Armlet of Mordiggan."set DT0[i]="Slardar's role in battles is to initiate with Slithereen Crush and focus an enemy with Bash and Amplify Damage. Pick off escapees with Sprint."set i=i+1set D70[67]=1430466609set DK0[67]=1747989841set D80[67]=1848656690set DJ0[67]="ReplaceableTextures\\CommandButtons\\BTNBlueDemoness.tga"call NAI(D70[67],"spell slam")call N5I(D70[67],1.3,DK0[67])set DL0[i]="Blink provides you with an escape mechanism and spell dodge but on higher levels it becomes a powerful chasing tool as well."set DM0[i]="Scream of Pain is used for killing creeps and harassing opponents, making it more useful than Shadow Strike early game."set DN0[i]="Try to hit as many targets as possible with Sonic Wave by targeting the ground instead of on an enemy hero directly."set DS0[i]="Shadow Strike does decent damage but its primary use is for the slow it provides for chasing and outrunning opponents."set DT0[i]="Her spell reliance, mobility and survivability allows her to buy expensive Intelligence items such as a Guinsoo's Scythe of Vyse."set i=i+1set D70[68]=1160785972set DK0[68]=1747989842set D80[68]=1848656471set DJ0[68]="ReplaceableTextures\\CommandButtons\\BTNSkeletonMage.blp"call NAI(D70[68],"stand victory")call N5I(D70[68],1,DK0[68])set DL0[i]="Searing Arrows provide damage for last hitting creeps and harassing enemy heroes by using it manually by clicking 'R' followed by the designated target."set DM0[i]="Wind Walk is commonly used for chasing and escaping but the invisibility and movement speed can help you avoid specific spells with the right timing."set DN0[i]="Cast Death Pact on enemy or neutral creeps instead of allied units whenever possible because it will give you the gold for killing the unit."set DS0[i]="Regeneration items like Orchid Malevolence or a Linkens Sphere will allow liberal use of his abilities in battle and help him against spellcasters and nukers."set DT0[i]="Strafe is usually gotten later, but combined with Searing Arrows, Clinkz can deal a lot of damage quickly, powerful against enemy heroes and buildings."set i=i+1set D70[69]=1162032181set DK0[69]=1747989843set D80[69]=1848656467set DJ0[69]="ReplaceableTextures\\CommandButtons\\BTNFacelessOne.blp"call NAI(D70[69],"spell slam")call N5I(D70[69],1.3,DK0[69])call EO1(D70[69],0,255,150)set DL0[i]="Time Walk is your escaping and chasing skill, but it will allow you to avoid spells and damage since you are invulnerable during the animation."set DM0[i]="Get Backtrack early game if you need to play defensively, while Time Lock will allow you to be a little more aggressive."set DN0[i]="Since Darkterror is so fragile, enter battles by using Time Walk and then cast Chronosphere to prevent yourself from being disabled or killed otherwise."set DS0[i]="Chronosphere affects all units that are not controlled by you, including both allies and enemies. Avoid hitting teammates or it could cost them their lives."set DT0[i]="Items such as Power Treads and Butterfly will give both damage and attack speed, which is useful if Void wants to repetitively stun with Time Lock."set i=i+1set D70[70]=1162032951set DK0[70]=1747989844set D80[70]=1848656466set DJ0[70]="ReplaceableTextures\\CommandButtons\\BTNNetherDragon.blp"call NAI(D70[70],"spell slam")call N5I(D70[70],1.2,DK0[70])call EO1(D70[70],75,255,25)set DL0[i]="Poison Attack allows you to harass an opponent and permanently chase them thanks to a 0 cooldown starting at level 3."set DM0[i]="Prevent creeps and towers from attacking you by casting Poison Attack manually by clicking 'C' and then the designated target."set DN0[i]="Neurotoxin will add bonus damage, useful early for getting the last hit on creeps and also for dealing damage to heroes as well."set DS0[i]="Early HP and movement speed items like Phase Boots or a Point/Vitality Booster can really make a difference."set DT0[i]="Sometimes it is wise to invest in a Lothar's Edge or Kelen's Dagger to provide you with the ability to get in and out of combat safely."set i=i+1set D70[71]=1160785970set DK0[71]=1747989845set D80[71]=1848656473set DJ0[71]="ReplaceableTextures\\CommandButtons\\BTNRevenant.blp"call NAI(D70[71],"spell")call N5I(D70[71],1,DK0[71])set DL0[i]="Use your attack range to help gauge how far opponents need to be for Plasma Field to deal the most damage."set DM0[i]="Unstable Current will slow opponents who cast spells on you and could be useful to help prevent yourself from being killed."set DN0[i]="Static Link is powerful if you can stay within the range of opponents - getting Unstable Current can sometimes help with that."set DS0[i]="Storm Seeker strikes the target with the lowest health, so use it after creeps have died or when chasing a solitary target."set DT0[i]="Consider increasing your HP along with damage when purchasing items."set i=i+1set D70[72]=1429221443set DK0[72]=1747989846set D80[72]=1848656465set DJ0[72]="ReplaceableTextures\\CommandButtons\\BTNGhoul.blp"call NAI(D70[72],"victory")call N5I(D70[72],1.5,DK0[72])call EO1(D70[72],100,100,100)set DL0[i]="Open Wounds is a powerful slow that nearly stops enemies in their tracks; it also lets you and your allies heal for attacking that unit.Open Wounds is a powerful slow that nearly stops enemies in their tracks; it also lets you and your allies heal for attacking that unit."set DM0[i]="Feast deals percentage-based damage, which is useful against heroes with high HP and lets Naix fight neutral creeps with ease."set DN0[i]="Rage can be used to avoid spells and to prevent opponents from disabling you while you are attacking them or trying to escape from them."set DS0[i]="Infest can be used for escaping, surprising your opponents, to neutral, or to just gain significant health quickly when necessary."set DT0[i]="Thanks to your physical damage and ability to steal life, Armlet of Mordiggan or Desolator are both solid choices for high-tier items."set i=i+1set D70[73]=1211117640set DK0[73]=1747989847set D80[73]=1848656468set DJ0[73]="ReplaceableTextures\\CommandButtons\\BTNPugna.BLP"call NAI(D70[73],"stand ready")call N5I(D70[73],1,DK0[73])set DL0[i]="Nether Blast gives you an incredible skill for killing creeps, harassing heroes and pushing. Use it to score the killing blow to a tower."set DM0[i]="Decrepify can be used on opponents either to increase spell damage from you and your allies or to prevent them from attacking."set DN0[i]="Nether Ward will drain mana and punish opponents for using spells. Just remember to cast it where opponents cannot destroy it easily."set DS0[i]="Aghanim's Scepter, Linkens Sphere and Bloodstone are examples of items that offer survivability while improving his spellcasting abilities."set DT0[i]="Life Drain deals a lot of damage unless opponents disable you or run away. With an Aghanim's Scepter, its cooldown becomes 0."set i=i+1set D70[74]=1332109682set DK0[74]=1747989848set D80[74]=1848656464set DJ0[74]="ReplaceableTextures\\CommandButtons\\BTNSeaGiantGreen.blp"call NAI(D70[74],"attack slam")call N5I(D70[74],1,DK0[74])set DL0[i]="Be sure to attack enemies slowed by Gush, the armor reduction means that your hits will deal more damage than normal."set DM0[i]="Anchor Smash is an offensive damage spell that lets you hurt multiple units, good for killing neutral creeps and useful in team battles."set DN0[i]="Kraken Shell gives you some protection against physical damage as well as a debuff removal against certain spells."set DS0[i]="In fights, Tidehunter should be in the middle of the action drawing focus fire and dealing damage because of his skill set and high survivability."set DT0[i]="Ravage has a large area of effect but Kelen's Dagger will allow you to initiate without being disabled and use it in an optimal spot."set i=i+1set D70[75]=1332963428set DK0[75]=1747989849set D80[75]=1848656463set DJ0[75]="ReplaceableTextures\\CommandButtons\\BTNVoidWalker.blp"call NAI(D70[75],"spell")call N5I(D70[75],1.5,DK0[75])call EO1(D70[75],150,0,150)set DL0[i]="High costs and cooldowns give Atropos limited ability use: Cast spells intelligently and get items like Null Talismans and/or Magic Stick for your mana pool."set DM0[i]="Brain Sap is a powerful nuke and heal and deals exact unreduced damage so get it early and always try to use it on enemy heroes when using the spell."set DN0[i]="Use Nightmare to help teammates to aim their spells and remove an opponent from battles temporarily while you fight their allies."set DS0[i]="Enfeeble is usually a skill to get after Brain Sap and Nightmare to use on enemy heroes with high damage to reduce their damage capabilities severely."set DT0[i]="Fiend's Grip will work on Magic Immune units such as those under the active effect of Black King Bar, holding them in place but dealing no damage."set i=i+1set D70[76]=1429221445set DK0[76]=1747989850set D80[76]=1848656440set DJ0[76]="ReplaceableTextures\\CommandButtons\\BTNGhostOfKelThuzad.blp"call NAI(D70[76],"stand victory")call N5I(D70[76],1.3,DK0[76])set DL0[i]="Death Pulse lets you kill creeps and harass heroes simultaneously, great for pushing and healing allied units because of its low cooldown."set DM0[i]="Sadist will provide you with some early regeneration for killing creeps, while Heartstopper Aura becomes effective as the game goes on."set DN0[i]="Reaper's Scythe is known for its ability to kill heroes outright, allowing you to bring down even high-HP Strength heroes with ease."set DS0[i]="Your ultimate can also be used to stun opponents in certain situations, such as interrupting channeling spells and teleports."set DT0[i]="Items like Bloodstone or Heart of Tarrasque allow you to survive long enough in team battles to make your spells more effective."set i=i+1set D70[77]=1429221446set DK0[77]=1747990064set D80[77]=1848656693set DJ0[77]="ReplaceableTextures\\CommandButtons\\BTNAbomination.blp"call NAI(D70[77],"stand 3")call N5I(D70[77],1.0,DK0[77])set DL0[i]="Pudge can known for his ability to isolate enemies with Meat Hook and using Rot and Dismember afterward, killing them outright. "set DM0[i]="Early regeneration and movement speed items such as Bottle and Phase Boots help provide Pudge with the means to cast spells and chase his opponents."set DN0[i]="Use Meat Hook from a location where you are not obstructed by any allied or enemy units other than your target to ensure a better chance of landing it."set DS0[i]="A Hood of Defiance will improve your magic resistance to reduce damage from using Rot and getting hit by spells; The massive regeneration is also good."set DT0[i]="Use your spells defensively: Rot can be used to commit suicide if necessary and Meat Hook can be used to rescue an ally from one or more enemies."set i=i+1set D70[78]=1328558154set DK0[78]=1747990065set D80[78]=1848656691set DJ0[78]="ReplaceableTextures\\CommandButtons\\BTNSpiritWalker.blp"call NAI(D70[78],"stand ready")call N5I(D70[78],1.2,DK0[78])set DL0[i]="Empowering Haste is a smart skill to level first, it gives Barathrum movement speed and significant damage for killing creeps and heroes."set DM0[i]="A level of Greater Bash early game can be useful as an extra disable, since the 17% chance is the same for all levels.A level of Greater Bash early game can be useful as an extra disable, since the 17% chance is the same for all levels."set DN0[i]="Get Strength Power Treads because the attack and movement speed benefits your other skills and the boost in HP helps you survive."set DS0[i]="Charge of Darkness gives Barathrum spell immunity after 12 seconds and provides vision of the target for you and your allies."set DT0[i]="Nether Strike puts you from the opposite side of where you were facing, push opponents backwards and into your allies."set i=i+1set D70[79]=1432510828set DK0[79]=1747990066set D80[79]=1848656472set DJ0[79]="ReplaceableTextures\\CommandButtons\\BTNNerubianQueen.blp"call NAI(D70[79],"attack")call N5I(D70[79],1.0,DK0[79])call EO1(D70[79],255,200,200)set DL0[i]="Take care of Weaver's HP/damage problems with Bracers or Wraith Bands and get regeneration so he can use his spells freely."set DM0[i]="An early level of Watchers can be used to provide vision over the rune powerups. Patrol them to increase their area of detection."set DN0[i]="Shukuchi is used for harassing and chasing opponents offensively, and escaping and avoiding certain projectile spells defensively."set DS0[i]="If your Geminate Attack is not working, make sure that you input an attack command ('A' or right-click) and are not simply auto-attacking."set DT0[i]="Use Time Lapse after taking a lot of recent damage to heal yourself, allowing you to pull off some dangerous moves like diving into towers."set i=i+1set D70[80]=1315334514set DK0[80]=1747990067set D80[80]=1848656462set DJ0[80]="ReplaceableTextures\\CommandButtons\\BTNShade.blp"call NAI(D70[80],"stand channel")call N5I(D70[80],1.15,DK0[80])call EO1(D70[80],0,0,0)set DL0[i]="Necromastery is important because of its massive damage gain and because your ultimate deals damage based on the number of souls."set DM0[i]="Shadow Raze gives you three powerful nuke spells that should be maxed out first. Gauge the distance correctly and hit multiple times."set DN0[i]="Requiem of Souls deals more damage the closer you are: Placement items like Lothar's Edge and Kelen's Dagger can help you land it."set DS0[i]="After maxing your other two spells, Presence of the Dark Lord will be useful by then, good for pushing and dealing more physical damage."set DT0[i]="If you die, remember to fill up on souls again before major fights when you respawn or you will be much less effective in battles."set i=i+1set D70[81]=1429221451set DK0[81]=1747990068set D80[81]=1848656692set DJ0[81]="ReplaceableTextures\\CommandButtons\\BTNArachnathidGreen.blp"call NAI(D70[81],"attack 3")call N5I(D70[81],1,DK0[81])set DL0[i]="Burrowstrike is both versatile and powerful: It deals damage, stuns and provides you with a useful escape or chasing mechanism."set DM0[i]="Using Sandstorm at the right time will dodge certain projectile spells and can protect you temporarily if it is necessary."set DN0[i]="Getting Kelen's Dagger will give him increased mobility and reach, and also the ability to Blink into battle right after channeling Epicenter."set DS0[i]="While you cannot move while Epicenter is channeling, once the pulses begin you can freely move around (mostly to chase your opponent)."set DT0[i]="Caustic Finale might be an orb effect but it is extremely useful for killing multiple units quickly for fighting neutrals, pushing and defending."set i=i+1set D70[82]=1332766568set DK0[82]=1747990069set D80[82]=1848656461set DJ0[82]="ReplaceableTextures\\CommandButtons\\BTNChaosGrom.blp"call NAI(D70[82],"stand victory")call N5I(D70[82],1,DK0[82])set DL0[i]="Counter Helix gives Axe the flexibility to both lane and jungle. A Stout Shield will help reduce the damage from taking attacks in order to activate Helix."set DM0[i]="A Vanguard or a Hood of Defiance offers survivability and regeneration, which are usually more useful to Axe than increasing his attack speed or damage."set DN0[i]="Berserker's Call is used to initiate fights and draw focus fire. Using it when there are more enemy units increases the chance of activating Counter Helix."set DS0[i]="Monitor your opponent's HP for the perfect Culling Blade opportunity to finish them off. However, if your enemy has too much HP, it will hardly do anything."set DT0[i]="Kelen's Dagger and/or Phase Boots can help you enter the fight first and get close enough for a Berserker's Call."set i=i+1set D70[83]=1215722344set DK0[83]=1747990070set D80[83]=1848656474set DJ0[83]="ReplaceableTextures\\CommandButtons\\BTNShaman.blp"call NAI(D70[83],"stand victory")call N5I(D70[83],1.25,DK0[83])call EO1(D70[83],250,150,150)set DL0[i]="Getting Blood Bath will allow you to take a few hits as you are killing creeps because you will recover your health immediately afterwards."set DM0[i]="An early level of Bloodrage can be useful for silencing enemies temporarily and for dealing a little bit of damage."set DN0[i]="Phase Boots and HP can be just as useful as damage items because they increase his survivability for chasing enemies and other longer battles."set DS0[i]="Use Rupture when your enemy has to either run away or to prevent them from moving, such as when an ally is about to use a powerful spell."set DT0[i]="Both allies and enemies gain the massive damage increase and are silenced from Bloodrage, which can be disastrous if used incorrectly."set i=i+1set D70[84]=1432642913set DK0[84]=1747990071set D80[84]=1848656460set DJ0[84]="ReplaceableTextures\\CommandButtons\\BTNHeroDeathKnight.blp"call NAI(D70[84],"stand ready")call N5I(D70[84],1,DK0[84])set DL0[i]="Abbadon's spells can save allies while dealing damage, so support and regeneration items like Vladmir's Offering can be more useful than damage items."set DM0[i]="Death Coil can be used both as a nuke and a heal, just remember that it deals damage to you unless you are using Aphotic Shield or Borrowed Time."set DN0[i]="Aphotic Shield prevents damage but can also be used to remove certain debuffs, such as removing the stun duration effect on an ally."set DS0[i]="Frostmourne is usually gotten later but it is very useful for chasing and helping your allies outrun your opponents."set DT0[i]="Borrowed Time can be cast manually as well. If you know you are going to receive a lot of damage sometimes it can be wiser to use it then."set i=i+1set D70[85]=1160786242set DK0[85]=1747990072set D80[85]=1848656441set DJ0[85]="ReplaceableTextures\\CommandButtons\\BTNvengeanceincarnate.blp"call NAI(D70[85],"stand ready")call N5I(D70[85],0.8,DK0[85])set DL0[i]="Spectral Dagger is your utility spell. You can use it for chasing people down, scouting dangerous areas and escaping. "set DM0[i]="You also walk through units, trees, even cliffs while you are walking on Spectral Dagger's black path, making it very handy when used properly."set DN0[i]="Desolate is great for dealing target to isolated targets but Dispersion helps you to survive in the lane: Chose whatever combination suits you best."set DS0[i]="Haunt lets you jump into a fight directly from anywhere in the map; just make sure that you pay attention to the actions of your team."set DT0[i]="Getting HP will allow you to withstand and dish out more Dispersion damage, which is extremely powerful in team fights."set i=i+1set D70[86]=1160786241set DK0[86]=1747990073set D80[86]=1848656459set DJ0[86]="ReplaceableTextures\\CommandButtons\\BTNWitchDoctor.blp"call NAI(D70[86],"stand victory")call N5I(D70[86],1.25,DK0[86])set DL0[i]="Paralyzing Cask is your initiating spell for your other skills and can effectively keep two nearby units stun-locked at higher levels."set DM0[i]="Maledict drastically reduces the damage needed to kill opponents and is an important spell to land in every fight."set DN0[i]="An early level of Voodoo Restoration can provide a relatively cheap heal if you are forced to play defensively."set DS0[i]="Damaging your opponent immediately after using Maledict is wise because it will deal more bonus damage overall at the 3 ticks."set DT0[i]="Death Ward is a powerful channeling spell if not interrupted. A Black King Bar will help to prevent enemies from disabling you."set i=i+1set D70[87]=1429221456set DK0[87]=1747990081set D80[87]=1848656449set DJ0[87]="ReplaceableTextures\\CommandButtons\\BTNDestroyer.blp"call NAI(D70[87],"stand alternate 2")call N5I(D70[87],0.85,DK0[87])set DL0[i]="Getting Intelligence and mana items is extremely important for Harbringer as the power of Arcane Orb and Sanity's Eclipse rely on this."set DM0[i]="Use Astral Imprisonment to control your opponents' mana, for escaping/chasing, or on yourself and allies to avoid spells."set DN0[i]="Cast Arcane Orb manually early on because you will have a greater chance of activating Essence Aura to use it endlessly."set DS0[i]="Guinsoo's Scythe of Vyse is a great choice because it offers Intelligence, balanced stats and provides Harbringer with a powerful disable."set DT0[i]="Use Sanity's Eclipse early in fights so that you drain casters with high Intelligence of their mana and cripple their ability to cast spells."set i=i+1set D70[88]=1160786243set DK0[88]=1747990083set D80[88]=1848656450set DJ0[88]="ReplaceableTextures\\CommandButtons\\BTNGuldan.blp"call NAI(D70[88],"spell")call N5I(D70[88],1.5,DK0[88])set DL0[i]="Shadow Word is either a heal or damage over time, definitely the most powerful early game spell to have."set DM0[i]="The affordable Mekansm is a good support item for Warlock, who is not a hero who is reliant on gold and items to be effective."set DN0[i]="Rain of Chaos creates a powerful Infernal that can take on heroes and is also great for killing creeps and pushing buildings."set DS0[i]="Fatal Bonds can deal huge damage if you and your teammates have other area of effect (AoE) spells that would hurt multiple linked units."set DT0[i]="The stun when using Rain of Chaos along with its huge casting range (1200) is great for interrupting spells and initiating battles."set i=i+1set D70[89]=1211117641set DK0[89]=1747990084set D80[89]=1848656458set DJ0[89]="ReplaceableTextures\\CommandButtons\\BTNKoboldGeomancer.blp"call NAI(D70[89],"spell")call N5I(D70[89],1.4,DK0[89])call N5I(1211117642,1.4,DK0[89])set DL0[i]="Vladmir's Offering and/or Mekansm provides valuable auras and useful heals that can help support your team and keep your Meepos alive."set DM0[i]="Poof is both a teleport and damage spell and is great against neutrals. Poof to yourself to deal double the damage (from departure and arrival).Poof is both a teleport and damage spell and is great against neutrals. Poof to yourself to deal double the damage (from departure and arrival)."set DN0[i]="Geomancer is an advanced hero: Be sure to monitor their individual health because if one dies, they all will."set DS0[i]="Strength Power Treads are suggested since clones will receive all of the Strength from footwear along with a 2.5 bonus (12.5 total)."set DT0[i]="Time Earthbind with each of your clones. With 4 Meepos and Level 4 Earthbind, you can almost permanently immobilize them."set i=i+1set D70[90]=1311781207set DK0[90]=1747990085set D80[90]=1848656457set DJ0[90]="ReplaceableTextures\\CommandButtons\\BTNDarkTrollShadowPriest.blp"call NAI(D70[90],"spell")call N5I(D70[90],1.2,DK0[90])set DL0[i]="An early level of both Shadow Wave and Shallow Grave provides a lot of support before getting Poison Touch to level 3 for its added stun."set DM0[i]="Try to use Shadow Wave to heal and damage opponents at the same time. Surround an enemy with multiple allied units for more damage."set DN0[i]="In addition to slowing and damaging opponents, Poison Touch will allow you to interrupt channeling spells and teleports"set DS0[i]="Dazzle generally does not need many items and can sometimes focus on increasing his spell use with regeneration and support items like Mekansm."set DT0[i]="Weave is a powerful spell, try to hit both allies and enemies with it, and it can also be used to provide vision before major battles occur."set i=i+1set D70[91]=1311780946set DK0[91]=1747990086set D80[91]=1848656451set DJ0[91]="ReplaceableTextures\\CommandButtons\\BTNPitLord.blp"call NAI(D70[91],"stand channel")call N5I(D70[91],0.95,DK0[91])set DL0[i]="Firestorm will be your main ability for killing creeps but it can deal a lot of damage to heroes if you combine it with disables or slows."set DM0[i]="The Pit of Malice is a useful disable that lasts for 10 seconds so it will both ensnare opponents and deter opponents from entering the circle."set DN0[i]="Expulsion is usually used after some creeps have died so the spell lasts longer and will deal damage and mini-stun enemies."set DS0[i]="Pit Lord is played more as a caster, increase his team presence and spell use by obtaining expensive Intelligence items like Shiva's Guard."set DT0[i]="Dark Rift is a great spell for transporting multiple allies to surprise opponents, and more importantly to defend and attack the base."set i=i+1set D70[92]=1211117650set DK0[92]=1747990087set D80[92]=1848656456set DJ0[92]="ReplaceableTextures\\CommandButtons\\BTNZombie.blp"call NAI(D70[92],"stand")call N5I(D70[92],2,DK0[92])call N5I(1211119433,1.3,DK0[92])set DL0[i]="Decay is used to deal damage and make opponents more vulnerable, while increasing the survivability of Dirge temporarily."set DM0[i]="Make sure Dirge is a presence who can cast his spells in fights by buying regeneration items like Vladmir's Offering and Void Stone."set DN0[i]="Soul Rip is a powerful heal or nuke but remember that it will have almost no effect without nearby units. Cast it in crowds."set DS0[i]="Use Tombstone when engaging the enemy because the zombies have a slowing capability and may also help block your opponents."set DT0[i]="Tombstone Zombies become extremely powerful when your opponents have low health and attack and move much faster."set i=i+1set D70[93]=1211117646set DK0[93]=1747990088set D80[93]=1848656455set DJ0[93]="ReplaceableTextures\\CommandButtons\\BTNDranaiMage.blp"call NAI(D70[93],"spell")call N5I(D70[93],1.15,DK0[93])set DL0[i]="Ion shell is great for killing creeps and dealing damage to heroes, but it will not damage an enemy target if you cast it on them directly."set DM0[i]="A level of Surge early game can help you and allies escape and chase enemies, and works nicely to help you close in on opponents with Ion Shell."set DN0[i]="Vacuum is an extremely powerful skill that can be used for initiating and combining with other spells. It can also interrupt channeling and teleport spells."set DS0[i]="Make sure they are standing closer to the edge of your targeting circle when casting Vacuum to pull your opponents further."set DT0[i]="Use Wall of Replica where multiple heroes will touch it; try using it with Vacuum. Get your allies to run through the wall too."set i=i+1set D70[94]=1211117653set DK0[94]=1747990082set D80[94]=1848656454set DJ0[94]="ReplaceableTextures\\CommandButtons\\BTNHeroBloodElfPrince.blp"call NAI(D70[94],"spell")call N5I(D70[94],1.25,DK0[94])set DL0[i]="Having at least one level in Quas, Wex and Exort will give you a larger repertoire of spells. Type -invokelist to obtain a full list of combinations."set DM0[i]="Ghost Walk (QQW) can be used to get yourself out of a tight situation, and also for slowing opponents so that your allies can chase/escape."set DN0[i]="Sunstrike (EEE) is a global-ranged nuke that deals damage based on the level of Exort. When using it, you have to factor in the 1.7 casting time."set DS0[i]="Forge Spirit (EEQ) and Cold Snap (QQQ) can be effective for pushing towers and against heroes with low armor. "set DT0[i]="EMP (WWW) and Tornado (WWQ) can completely drain off heroes with low mana pools and have a impressive casting range."set i=i+1set D70[95]=1433105516set DK0[95]=1747989572set D80[95]=1848656182set DJ0[95]="ReplaceableTextures\\CommandButtons\\BTNSpell_Shadow_SummonVoidWalker.blp"call NAI(D70[95],"stand")call N5I(D70[95],1.5,DK0[95])set DL0[i]="Conversion allows Enigma to neutral creep effectively. Target the highest level creep possible and move your low HP Eidolons out of the way to save them."set DM0[i]="In the lane, Conversion can be used on allied creeps to deny your opponents of experience and gold, and for making sure you last hit enemy creeps."set DN0[i]="The multiple stuns on higher levels of Malefice make it useful for preventing an opponent from channeling spells or help you chase/escape them."set DS0[i]="Use Midnight Pulse in conjunction with Black Hole to deal massive damage to enemies. Just make sure that you cast it before Black Hole."set DT0[i]="Kelen's Dagger is great for Black Hole placement, and a Black King Bar will prevent most spells from stopping the channeling effect of the spell."set i=i+1set D70[96]=1328558390set DK0[96]=1747990354set D80[96]=1848657721set DJ0[96]="ReplaceableTextures\\CommandButtons\\BTNTrollBatRider.blp"call NAI(D70[96],"stand")call N5I(D70[96],1.2,DK0[96])call N5I(1328558391,1.2,DK0[96])set DL0[i]=""set DM0[i]=""set DN0[i]=""set DS0[i]=""set DT0[i]=""set i=i+1set D70[97]=1311787088set DK0[97]=1747993136set D80[97]=1848658002set DJ0[97]="ReplaceableTextures\\CommandButtons\\BTNIcyGhost.blp"call NAI(D70[97],"stand")call N5I(D70[97],1.17,DK0[97])call N5I(1311787088,1.2,DK0[97])set DL0[i]=""set DM0[i]=""set DN0[i]=""set DS0[i]=""set DT0[i]=""set i=i+1set D70[98]=1211119409set DK0[98]=1747990322set D80[98]=1848657222set DJ0[98]="ReplaceableTextures\\CommandButtons\\BTNMurgulShadowCaster.blp"call NAI(D70[98],"stand 3")call N5I(D70[98],1.25,DK0[98])set DL0[i]=""set DM0[i]=""set DN0[i]=""set DS0[i]=""set DT0[i]=""set i=i+1set D70[99]=1164277353set DK0[99]=1747989814set D80[99]=1848656214set DJ0[99]="ReplaceableTextures\\CommandButtons\\BTNEvilIllidan.blp"call NAI(D70[99],"spell channel")call N5I(D70[99],1,DK0[99])call N5I(1164277357,1,DK0[99])call N5I(1160786518,1,DK0[99])call N5I(1160786519,1,DK0[99])call N5I(1160786517,1,DK0[99])set DL0[i]="Get Soul Steal if you need healing in the lane."set DM0[i]="Purchase statistic-increasing items like Wraith Bands and later items like Sange and Yasha to benefit both Terrorblade and his images."set DN0[i]="It might be difficult to escape due to the trail you leave behind when walking, you may have to use an image to act as a block or decoy."set DS0[i]="Sunder can turn fights around when you have low health but be careful of disables and high damage spells when trying to swap."set DT0[i]="Creating ranged images in Metamorphosis will allow you to deal damage safely in fights as well as push down buildings very quickly."set i=i+1set D70[100]=1164666213set DK0[100]=1747989817set D80[100]=1848656215set DJ0[100]="ReplaceableTextures\\CommandButtons\\BTNKeeperGhostBlue.blp"call NAI(D70[100],"stand victory")call N5I(D70[100],1,DK0[100])set DL0[i]="Split Earth is a very useful disable while Lightning Storm is taken because of its low cooldown. Both are powerful spells that hit multiple targets."set DM0[i]="By using Lightning Storm to finish low-health creeps with nearby opponents, you can get gold and harass enemy heroes at the same time."set DN0[i]="Diabolic Edict is one of the most powerful spells for destroying buildings. Eliminate the creeps first so that you only have one target."set DS0[i]="Turn off Pulse Nova when you have finished using it because the spell will continue until you have exhausted your entire mana pool."set DT0[i]="Items like Bloodstone or Aghanim's Scepter will allow Leshrac to use his spells more liberally and survive in the midst of battle."set i=i+1set D70[101]=1160786504set DK0[101]=1747993410set D80[101]=1848658764set DJ0[101]="ReplaceableTextures\\CommandButtons\\BTNArchimonde.blp"call NAI(D70[101],"stand 3")call N5I(D70[101],1.25,DK0[101])set DL0[i]=""set DM0[i]=""set DN0[i]=""set DS0[i]=""set DT0[i]=""set i=i+1set D70[102]=1433168227set DK0[102]=1747989825set D80[102]=1848656216set DJ0[102]="ReplaceableTextures\\CommandButtons\\BTNLichVersion2.blp"call NAI(D70[102],"stand channel")call N5I(D70[102],1.3,DK0[51])set DL0[i]="Dark Ritual is useful for denying allied creeps and provides you with mana to use spells without buying regeneration items."set DM0[i]="Frost Nova is a very powerful spell that allows you to be aggressive. Attack the enemy a few extra times while they are slowed."set DN0[i]="Chain Frost is most effective when used against 2-3 nearby targets (ideally heroes), but will not bounce when used on a lone unit."set DS0[i]="Frost Armor should be cast on multiple teammates when you have the mana for it later on; it works nicely against melee units."set DT0[i]="The first target of your Chain Frost can interrupt channeling and teleport spells if absolutely necessary."set i=i+1set D70[103]=1430468406set DK0[103]=1747989826set D80[103]=1848656217set DJ0[103]="ReplaceableTextures\\CommandButtons\\BTNBanshee.blp"call NAI(D70[103],"spell wail")call N5I(D70[103],1.35,DK0[103])set DL0[i]="Carrion Swarm is your primary nuke and first skill to max. Make use of its range by casting it on the ground instead of on a unit directly."set DM0[i]="An early level of Silence can help prevent you and your allies from being attacked by multiple spells."set DN0[i]="The ghosts of Exorcism will attack whatever you attack, so if you want to direct all attention to a single unit simply focus them and stay nearby."set DS0[i]="Exorcism also makes Krobelus extremely effective for quickly destroying enemy buildings, so be sure to push the enemy base when you can"set DT0[i]="The effect of Exorcism stops if you die in combat: Invest in items that improve your survivability, such as a Bloodstone or a Heart of Tarrasque."set i=i+1set D70[104]=1430466872set DK0[104]=1747989827set D80[104]=1848656218set DJ0[104]="ReplaceableTextures\\CommandButtons\\BTNLion.BLP"call NAI(D70[104],"spell callstorm")call N5I(D70[104],1.3,DK0[104])call EO1(D70[104],50,100,255)set DL0[i]="With plenty of damage and disables, Lion is quite a force to be reckoned with cheap utility items such as Bottle and Phase Boots."set DM0[i]="Impale gives Lion the ability to disable multiple targets and deals decent damage, so it is definitely the most versatile of his three skills for the early game."set DN0[i]="Mana Drain only works on units with mana: Using Mana Drain on enemy heroes will reduce their spell use while replenishing mana."set DS0[i]="Avoid wasting Finger of Death on low-health enemy heroes when a few extra attacks or using another spell like Impale will deal enough damage."set DT0[i]="Wait until the duration of your first disable wears off before using another one for maximum disable time when using Impale and Voodoo."set i=i+1set D70[105]=1162032439set DK0[105]=1747989828set D80[105]=1848656432set DJ0[105]="ReplaceableTextures\\CommandButtons\\BTNHydralisk.blp"call NAI(D70[105],"attack")call N5I(D70[105],1.0,DK0[105])call EO1(D70[105],150,200,255)set DL0[i]="Venomous Gale is a spell that hits multiple opponents and slows them, making it very useful for getting early kills."set DM0[i]="At least one level of Poison Sting is recommended early game for its slow effect."set DN0[i]="Bottle and Magic Stick will help deal with his low HP/mana, while Phase Boots are a cheap way to improve his chasing capabilities."set DS0[i]="Wards are very useful for pushing a lane and killing neutral and enemy creeps, but you can also use it to provide vision."set DT0[i]="Poison Nova deals a lot of damage but you have to combine it with other spells and attacks because it does not deal fatal damage (stops at 1 HP)."set i=i+1set D70[106]=1430466865set DK0[106]=1747989829set D80[106]=1848656178set DJ0[106]="ReplaceableTextures\\CommandButtons\\BTNBlueMagnataur.tga"call NAI(D70[106],"stand channel")call N5I(D70[106],1,DK0[106])call EO1(D70[106],150,150,100)set DL0[i]="Bottle and Perseverance help with early regeneration,. while purchasing Kelen's Dagger later will help you to land Reverse Polarity."set DM0[i]="A few Attribute Bonus points can help you cast more spells. Save Mighty Swing for later levels when you have more damage."set DN0[i]="By targeting the ground where you want to fire Shockwave, you can hit both creeps and opponents and make use of its long range."set DS0[i]="Magnus should cast Empower on himself and other allies with high damage before initiating team battles with his ultimate."set DT0[i]="The cleave of Battlefury stacks directly with Mighty Swing, making it a good damage item especially if you already have a Perseverance."set i=i+1set D70[107]=1430468144set DK0[107]=1747989830set D80[107]=1848656433set DJ0[107]="ReplaceableTextures\\CommandButtons\\BTNSpiritWyvern.blp"call NAI(D70[107],"stand victory")call N5I(D70[107],1,DK0[107])call EO1(D70[107],150,150,150)set DL0[i]=""set DM0[i]=""set DN0[i]=""set DS0[i]=""set DT0[i]=""set i=i+1set D70[108]=1429221441set DK0[108]=1747989831set D80[108]=1848656434set DJ0[108]="ReplaceableTextures\\CommandButtons\\BTNChaosWarlord.blp"call NAI(D70[108],"stand victory")call N5I(D70[108],1.05,DK0[108])set DL0[i]="Chaos Bolt and Blink Strike are active abilities that are more useful in the lane and for killing opponents than Critical Strike."set DM0[i]="Chaos Bolt is a disable that switches between average and extremely powerful, the sooner you have max out this spell, the better."set DN0[i]="His high natural movement speed (325 - the highest in the game) and Blink Strike make him very difficult for opponents to outrun or chase him."set DS0[i]="If you Blink Strike and then use Chaos Bolt, you can spend more time hitting opponents and less time waiting for his slow casting animation. "set DT0[i]="Make Nessaj and Phantasm stronger by buying Strength items like Armlet of Mordiggan (when activated) and Heart of Tarrasque."set i=i+1set D70[109]=1311788343set DK0[109]=1747993687set D80[109]=1848659256set DJ0[109]="ReplaceableTextures\\CommandButtons\\BTNFrostWyrm.blp"call NAI(D70[109],"stand victory")call N5I(D70[109],0.9,DK0[109])set DL0[i]=""set DM0[i]=""set DN0[i]=""set DS0[i]=""set DT0[i]=""set i=i+1set D70[110]=1311788363set DK0[110]=1747993926set D80[110]=1848659276set DJ0[110]="ReplaceableTextures\\CommandButtons\\BTNGnollWarden.blp"call NAI(D70[110],"stand victory")call N5I(D70[110],1.1,DK0[110])set DL0[i]=""set DM0[i]=""set DN0[i]=""set DS0[i]=""set DT0[i]=""set i=i+1set D70[111]=1429221432set DK0[111]=1747989832set D80[111]=1848656435set DJ0[111]="ReplaceableTextures\\CommandButtons\\BTNKiljaedin.blp"call NAI(D70[111],"spell")call N5I(D70[111],1.2,DK0[111])call N5I(1160786229,1,DK0[111])call EO1(D70[111],255,75,255)set DL0[i]="If you want to neutral creeps, start with Summon Wolves and a Ring of Basilius, which can be used to make Vladmir's Offering later."set DM0[i]="Spirit Wolves gain invisibility at level 4, making them difficult to kill and easy to harass heroes with in the lane."set DN0[i]="Feral Heart make you and your wolves stronger overall, while Howl is an offensive spell used before engaging the enemy."set DS0[i]="Shapeshift makes you incredibly powerful and gives you max movement speed. Avoid being blocked by your wolves when chasing."set DT0[i]="A Black King Bar will prevent enemies from disabling you, making you very fearsome and almost unstoppable when attacking heroes."set i=i+1set D70[112]=1429221430set DK0[112]=1747989833set D80[112]=1848656436set DJ0[112]="ReplaceableTextures\\CommandButtons\\BTNSpiderBlack.blp"call NAI(D70[112],"walk")call N5I(D70[112],1.36,DK0[112])set DL0[i]="At least one level in Spin Web early game will increase your survivability greatly. Remember that attacking/using spells will cause you to break invisibility."set DM0[i]="Spawn Spiderlings is both a nuke and pushing spell, so getting items like a Ring of Basilius will provide you with both mana and armor for pushing."set DN0[i]="Incapacitating Bite makes it very difficult for enemies to get away from you, great for chasing and slowing opponents temporarily for your allies."set DS0[i]="Try to space out your webs with least 2 seconds of walking distance so that you can benefit from its bonuses on as much ground as possible."set DT0[i]="With the damage and lifesteal from Insatiable Hunger, sometimes it is best to get items that will prevent you from being disabled, such as a Black King Bar."set i=i+1set DC0=112set DD0[1]=1315074670set DD0[2]=1164207469set DD0[3]=1311781174set DD0[4]=1315070563set DD0[5]=1315007329set DD0[6]=1328558160set DD0[7]=1433631084set DD0[8]=1160785973set DD0[9]=1311781199set DD0[10]=1212365106set DD0[11]=1215723364set DD0[12]=1212363833set DD0[13]=1215657064set DD0[14]=1332179560set DD0[15]=1429221430set DD0[16]=1162032439set DD0[17]=1164277353set DD0[18]=1432510828set DD0[19]=1160785972set DD0[20]=1162032951set DD0[21]=1215722344set DD0[22]=1315334514set DD0[23]=1160785970set DD0[24]=1162032181set DD0[25]=1165451634set DD0[26]=1429221424set DD0[27]=1211117654set DD0[28]=1160786242set DD0[29]=1311781206set DD0[30]=1211117641set DD0[31]=1160786265set DD0[32]=1211119409set DD0[33]=1160786510set DD0[34]=1311788336set DD0[35]=1311788363set DE0=35set DF0[1]=1315988077set DF0[2]=1215063922set DF0[3]=1214345830set DF0[4]=1211117616set DF0[5]=1211117617set DF0[6]=1214344551set DF0[7]=1211117624set DF0[8]=1432580716set DF0[9]=1333027688set DF0[10]=1313026096set DF0[11]=1432646245set DF0[12]=1430466865set DF0[13]=1332109682set DF0[14]=1429221446set DF0[15]=1429221451set DF0[16]=1328558154set DF0[17]=1432642913set DF0[18]=1332766568set DF0[19]=1429221441set DF0[20]=1429221443set DF0[21]=1430468913set DF0[22]=1430467634set DF0[23]=1429221432set DF0[24]=1211117636set DF0[25]=1311781193set DF0[26]=1211117649set DF0[27]=1311780946set DF0[28]=1211117652set DF0[29]=1211119187set DF0[30]=1211117650set DF0[31]=1328558389set DF0[32]=1160786505set DF0[33]=1160786502set DF0[34]=1328558406set DF0[35]=1160786738set DF0[36]=1160786507set DF0[37]=1311788373set DG0=37set DH0[1]=1332898670set DH0[2]=1164799855set DH0[3]=1164799603set DH0[4]=1211117620set DH0[5]=1214931305set DH0[6]=1433105516set DH0[7]=1215128178set DH0[8]=1211117643set DH0[9]=1316252014set DH0[10]=1215130471set DH0[11]=1214409837set DH0[12]=1311781185set DH0[13]=1211117633set DH0[14]=1433168227set DH0[15]=1164666213set DH0[16]=1430468406set DH0[17]=1430466872set DH0[18]=1430466609set DH0[19]=1430468144set DH0[20]=1211117640set DH0[21]=1332963428set DH0[22]=1429221445set DH0[23]=1160786241set DH0[24]=1429221456set DH0[25]=1160786000set DH0[26]=1160786243set DH0[27]=1311781207set DH0[28]=1211117646set DH0[29]=1311786311set DH0[30]=1211117651set DH0[31]=1311780930set DH0[32]=1211117653set DH0[33]=1328558390set DH0[34]=D70[97]set DH0[35]=1160786504set DH0[36]=1160786506set DH0[37]=1160786520set DH0[38]=1211122767set DH0[39]=1311788343set DH0[40]=1311788356set DZ0=40set DV0[1]=1332898670set DV0[2]=1164799855set DV0[3]=1164799603set DV0[4]=1211117620set DV0[5]=1214931305set DV0[6]=1433105516set DV0[7]=1215128178set DV0[8]=1211117643set DV0[9]=1316252014set DV0[10]=1315074670set DV0[11]=1214409837set DV0[12]=1311781185set DV0[13]=1211117633set DV0[14]=1433168227set DV0[15]=1164666213set DV0[16]=1430468406set DV0[17]=1430466872set DV0[18]=1430466609set DV0[19]=1430468144set DV0[20]=1211117640set DV0[21]=1332963428set DV0[22]=1429221445set DV0[23]=1160786241set DV0[24]=1429221456set DV0[25]=1160786000set DV0[26]=1160786243set DV0[27]=1311781207set DV0[28]=1311786311set DV0[29]=1211117651set DV0[30]=1311780930set DV0[31]=1211117653set DV0[32]=1311781174set DV0[33]=1328558160set DV0[34]=1433631084set DV0[35]=1160785973set DV0[36]=1311781199set DV0[37]=1160786265set DV0[38]=1215723364set DV0[39]=1162032439set DV0[40]=1432510828set DV0[41]=1160785972set DV0[42]=1162032951set DV0[43]=1315334514set DV0[44]=1160785970set DV0[45]=1211117654set DV0[46]=1311781206set DV0[47]=1211117649set DV0[48]=1328558390set DV0[49]=D70[97]set DV0[50]=1328558406set DV0[51]=1160786504set DV0[52]=1160786510set DV0[53]=1160786506set DV0[54]=1160786502set DV0[55]=1160786520set DV0[56]=1211122767set DV0[57]=1311788363set DV0[58]=1311788343set DV0[59]=1311788356set DW0=59set DX0[1]=1215130471set DX0[2]=1211117646set DX0[3]=1164207469set DX0[4]=1315070563set DX0[5]=1315007329set DX0[6]=1212363833set DX0[7]=1215657064set DX0[8]=1332179560set DX0[9]=1429221430set DX0[10]=1164277353set DX0[11]=1215722344set DX0[12]=1162032181set DX0[13]=1165451634set DX0[14]=1429221424set DX0[15]=1160786242set DX0[16]=1211117641set DX0[17]=1212365106set DX0[18]=1315988077set DX0[19]=1215063922set DX0[20]=1214345830set DX0[21]=1211117616set DX0[22]=1211117617set DX0[23]=1214344551set DX0[24]=1211117624set DX0[25]=1432580716set DX0[26]=1333027688set DX0[27]=1313026096set DX0[28]=1432646245set DX0[29]=1430466865set DX0[30]=1332109682set DX0[31]=1429221446set DX0[32]=1429221451set DX0[33]=1328558154set DX0[34]=1432642913set DX0[35]=1332766568set DX0[36]=1429221441set DX0[37]=1429221443set DX0[38]=1430468913set DX0[39]=1430467634set DX0[40]=1429221432set DX0[41]=1211117636set DX0[42]=1311781193set DX0[43]=1311780946set DX0[44]=1211117652set DX0[45]=1211119187set DX0[46]=1211117650set DX0[47]=1328558389set DX0[48]=1211119409set DX0[49]=1160786505set DX0[50]=1311788336set DX0[51]=1160786738set DX0[52]=1160786507set DX0[53]=1311788373set DY0=53call S4I()endfunctionfunction InitTrig_Hero takes nothing returns nothingcall GU1()endfunctionfunction H01 takes nothing returns nothingcall NAI(1702061422,"stand 4")call NAI(1697656918,"stand 4")call NAI(1701081721,"spell")call NAI(1697656919,"spell")call NAI(1969711215,"stand victory")call NAI(1966092337,"stand victory")call NAI(1970169187,"stand channel")call NAI(1966092338,"stand channel")call N5I(1848651853,0.4,1848651853)call N5I(1697657426,0.5,1697657426)call N5I(1697657428,1.2,1697657428)call N5I(1697657427,0.5,1697657427)call N5I(1697657648,0.5,1697657648)call N5I(1848659027,1,1848659027)endfunctionfunction InitTrig_Unit takes nothing returns nothingcall H01()endfunctionfunction HI1 takes nothing returns nothinglocal trigger t=CreateTrigger()local player NJI=Player(15)local real H11=GetUnitX(EX)local real HO1=GetUnitY(EX)local real H21=GetUnitX(YZ)local real H31=GetUnitY(YZ)local real H41=GetUnitX(CX)local real H51=GetUnitY(CX)local real H61=GetUnitX(ZY)local real H71=GetUnitY(ZY)local real H81=GetUnitX(XZ)local real H91=GetUnitY(XZ)local real HA1=GetUnitX(JZ)local real HB1=GetUnitY(JZ)local real HC1=GetUnitX(RH)local real HD1=GetUnitY(RH)local real HE1=GetUnitX(WY)local real HF1=GetUnitY(WY)local real HG1=GetUnitX(AZ)local real HH1=GetUnitY(AZ)local real HZ1=GetUnitX(DX)local real HV1=GetUnitY(DX)local real HW1=GetUnitX(DY)local real HX1=GetUnitY(DY)local real HY1=GetUnitX(VY)local real HJ1=GetUnitY(VY)call RemoveUnit(EX)call RemoveUnit(JZ)call RemoveUnit(YZ)call RemoveUnit(XZ)call RemoveUnit(CX)call RemoveUnit(RH)call RemoveUnit(AZ)call RemoveUnit(DX)call RemoveUnit(DY)call RemoveUnit(ZY)call RemoveUnit(WY)call RemoveUnit(VY)set DR0=CreateUnit(NJI,1848651832,H81,H91,270)set DP0=CreateUnit(NJI,1848657738,HA1,HB1,270)set DQ0=CreateUnit(NJI,1848652100,HC1,HD1,270)set DU0=CreateUnit(NJI,1848659016,HE1,HF1,270)set E00=CreateUnit(NJI,1848652110,H11,HO1,270)set EI0=CreateUnit(NJI,1848651831,H21,H31,270)set E10=CreateUnit(NJI,1848651829,H41,H51,270)set EO0=CreateUnit(NJI,1848659017,H61,H71,270)set E20=CreateUnit(NJI,1848652098,HG1,HH1,270)set E30=CreateUnit(NJI,1848652112,HZ1,HV1,270)set E40=CreateUnit(NJI,1848657739,HW1,HX1,270)set E50=CreateUnit(NJI,1848659018,HY1,HJ1,270)call SetUnitColor(DR0,ConvertPlayerColor(1))call SetUnitColor(DP0,ConvertPlayerColor(1))call SetUnitColor(DQ0,ConvertPlayerColor(9))call SetUnitColor(DU0,ConvertPlayerColor(9))call SetUnitColor(E00,ConvertPlayerColor(6))call SetUnitColor(EI0,ConvertPlayerColor(6))call SetUnitColor(E10,ConvertPlayerColor(10))call SetUnitColor(EO0,ConvertPlayerColor(10))call SetUnitColor(E20,ConvertPlayerColor(0))call SetUnitColor(E30,ConvertPlayerColor(0))call SetUnitColor(E40,ConvertPlayerColor(11))call SetUnitColor(E50,ConvertPlayerColor(11))set t=nullendfunctionfunction InitTrig_Tavern takes nothing returns nothingcall HI1()endfunctionfunction HK1 takes integer id returns booleanreturn id==1211117642 or id==1311788365endfunctionfunction HL1 takes integer id returns booleanlocal integer i=0loopexitwhen i>E90if E80[i]==id thenreturn trueendifset i=i+1endloopreturn falseendfunctionfunction HM1 takes nothing returns nothingset E90=E90+1set E80[E90]=1093753431set E90=E90+1set E80[E90]=1093681718set E90=E90+1set E80[E90]=1093684023set E90=E90+1set E80[E90]=1093686327set E90=E90+1set E80[E90]=1093686328set E90=E90+1set E80[E90]=1093742918set E90=E90+1set E80[E90]=1093742920set E90=E90+1set E80[E90]=1093742919set E90=E90+1set E80[E90]=1093742916set E90=E90+1set E80[E90]=1093686067set E90=E90+1set E80[E90]=1093742917set E90=E90+1set E80[E90]=1093743959set E90=E90+1set E80[E90]=1093814353set E90=E90+1set E80[E90]=1093808945set E90=E90+1set E80[E90]=1093814351set E90=E90+1set E80[E90]=1093677647set E90=E90+1set E80[E90]=1093679193set E90=E90+1set E80[E90]=1093679194set E90=E90+1set E80[E90]=1093679408set E90=E90+1set E80[E90]=1093679410set E90=E90+1set E80[E90]=1095331943set E90=E90+1set E80[E90]=1095332962set E90=E90+1set E80[E90]=1093683254set E90=E90+1set E80[E90]=1093751108set E90=E90+1set E80[E90]=1093751863set E90=E90+1set E80[E90]=1093744973set E90=E90+1set E80[E90]=1093747011set E90=E90+1set E80[E90]=1094936696set E90=E90+1set E80[E90]=1093810265set E90=E90+1set E80[E90]=1095328363set E90=E90+1set E80[E90]=1093748055set E90=E90+1set E80[E90]=1093677367set E90=E90+1set E80[E90]=1093683801set E90=E90+1set E80[E90]=1093682767set E90=E90+1set E80[E90]=1093683255set E90=E90+1set E80[E90]=1093681720set E90=E90+1set E80[E90]=1093752645set E90=E90+1set E80[E90]=1095333995set E90=E90+1set E80[E90]=1093753417set E90=E90+1set E80[E90]=1093681995set E90=E90+1set E80[E90]=1093683788set E90=E90+1set E80[E90]=1093748303set E90=E90+1set E80[E90]=1095328865set E90=E90+1set E80[E90]=1093683266set E90=E90+1set E80[E90]=1093682227set E90=E90+1set E80[E90]=1093682246set E90=E90+1set E80[E90]=1093682756set E90=E90+1set E80[E90]=1093743191set E90=E90+1set E80[E90]=1093743681set E90=E90+1set E80[E90]=1093748292set E90=E90+1set E80[E90]=1093749071set E90=E90+1set E80[E90]=1093677655set E90=E90+1set E80[E90]=1093809721set E90=E90+1set E80[E90]=1093815111set E90=E90+1set E80[E90]=1093748304set E90=E90+1set E80[E90]=1093686329set E90=E90+1set E80[E90]=1093751096set E90=E90+1set E80[E90]=1093750095set E90=E90+1set E80[E90]=1093810244set E90=E90+1set E80[E90]=1097163124set E90=E90+1set E80[E90]=1093684016set E90=E90+1set E80[E90]=1095331948set E90=E90+1set E80[E90]=1093683796set E90=E90+1set E80[E90]=1095331954set E90=E90+1set E80[E90]=1093677656set E90=E90+1set E80[E90]=1093751349set E90=E90+1set E80[E90]=1095332727set E90=E90+1set E80[E90]=1093808182set E90=E90+1set E80[E90]=1093753416set E90=E90+1set E80[E90]=1093813569set E90=E90+1set E80[E90]=1093815092set E90=E90+1set E80[E90]=1093815095set E90=E90+1set E80[E90]=1093815089set E90=E90+1set E80[E90]=1093817925endfunctionfunction HN1 takes integer id returns booleanreturn id==1093808454 or id==1093808455 or id==1093808456 or id==1093751609 or id==1093809217 or id==1093809218 or id==1093751609 or id==1093678667 or id==1093752391 or id==1093810257 or id==1093752646 or id==1093686328 or id==1093686327 or id==1093808206 or id==1093753394 or id==1093753395 or id==1093808181 or id==1093743681 or id==1093809721 or id==1093815111 or id==1093815881 or id==1093810008 or id==1093810265 or id==1093809221 or id==1093753416 or id==1093752655 or id==1093748305 or id==1093686341 or id==1093814863 or id==1093813848 or id==1093684560 or id==1093815109 or id==1093815112 or id==1093815097 or id==1093814860 or id==1093815857 or id==1093815618 or id==1093816114 or id==1093816121 or id==1093817416 or id==1093817419 or id==1093815369 or id==1093747504 or id==1093818443endfunctionfunction HS1 takes nothing returns nothingset E70=E70+1set E60[E70]=1093683254set E70=E70+1set E60[E70]=1093677362set E70=E70+1set E60[E70]=1093678667set E70=E70+1set E60[E70]=1093683513set E70=E70+1set E60[E70]=1093683265set E70=E70+1set E60[E70]=1093684021set E70=E70+1set E60[E70]=1093685337set E70=E70+1set E60[E70]=1093748303set E70=E70+1set E60[E70]=1093818442set E70=E70+1set E60[E70]=1093686081set E70=E70+1set E60[E70]=1093686327set E70=E70+1set E60[E70]=1093686328set E70=E70+1set E60[E70]=1093743681set E70=E70+1set E60[E70]=1093681733set E70=E70+1set E60[E70]=1093808472set E70=E70+1set E60[E70]=1093808471set E70=E70+1set E60[E70]=1093808470set E70=E70+1set E60[E70]=1097754673set E70=E70+1set E60[E70]=1093750618set E70=E70+1set E60[E70]=1093743428set E70=E70+1set E60[E70]=1093677622set E70=E70+1set E60[E70]=1093751096endfunctionfunction HT1 takes nothing returns nothingset T2[1]=1095331188set T2[2]=1095328865set T2[3]=1095660653set T2[4]=1093817908set T2[5]=1095333995set T2[6]=1093681995set T2[7]=1093677367set T2[8]=1093681720set T2[9]=1093683266set T2[10]=1093682227set T2[10]=1093682246set T2[11]=1093677655set T2[12]=1095331954set T2[13]=1095331948set T2[14]=1093682767set T2[15]=1093683255set T2[16]=1093683254set T2[17]=1093677656set T2[18]=1095332727set T2[19]=1093682008set T2[20]=1093681718set T2[21]=1097163124set T2[22]=1093679180set T2[23]=1095328633set T2[24]=1093678426set T2[25]=1095328363set T2[26]=1093682265set T2[27]=1093684314set T2[28]=1093685065set T2[29]=1093684056set T2[30]=1093684055set T2[31]=1093677622set T2[32]=1093681972set T2[33]=1093677362set T2[34]=1093678667set T2[35]=1093677652set T2[36]=1095263841set T2[37]=1093679446set T2[38]=1093678425set T2[39]=1093683513set T2[40]=1093683265set T2[41]=1093684021set T2[42]=1093685337set T2[43]=1093685582set T2[44]=1093818442set T2[45]=1093685840set T2[46]=1093743191set T2[47]=1093686081set T2[48]=1093686327set T2[49]=1093686328set T2[50]=1093743681set T2[51]=1093681733set T2[52]=1093808472set T2[53]=1093808471set T2[54]=1093808470set T2[55]=1093684560set T2[56]=1093743428set T2[57]=1093683801set T2[58]=1093743959set T2[59]=1093748303set T2[60]=1093748292set T2[61]=1093750618set T2[62]=1093750095set T2[63]=1093749071set T2[64]=1093751096set T2[65]=1093751361set T2[66]=1093751126set T2[67]=1093752645set T2[68]=1093752642set T2[69]=1093815111set T2[70]=1093815859set T2[71]=1093817677set T2[72]=1093817925set R2=72endfunctionfunction HR1 takes nothing returns booleancall HT1()call HS1()call HM1()return falseendfunctionfunction HQ1 takes nothing returns nothingcall CreateQuestBJ(0,"TRIGSTR_50004","TRIGSTR_50005","ReplaceableTextures\\CommandButtons\\BTNSpy.blp")call CreateQuestBJ(0,"TRIGSTR_50006","TRIGSTR_50007","ReplaceableTextures\\CommandButtons\\BTNTome.blp")call CreateQuestBJ(0,"TRIGSTR_50008","TRIGSTR_50009","ReplaceableTextures\\CommandButtons\\BTNAmbush.blp")call CreateQuestBJ(2,"TRIGSTR_50010","TRIGSTR_50011","ReplaceableTextures\\CommandButtons\\BTNScrollOfHaste.blp")call CreateQuestBJ(2,"TRIGSTR_50012","TRIGSTR_50013","ReplaceableTextures\\CommandButtons\\BTNBansheeMaster.blp")call CreateQuestBJ(2,"TRIGSTR_50014","TRIGSTR_50015","ReplaceableTextures\\CommandButtons\\BTNCarrionScarabs.blp")endfunctionfunction Z01 takes nothing returns booleanlocal string sif IsUnitIllusion(GetTriggerUnit())==false and HK1(GetUnitTypeId(GetTriggerUnit()))==false thenset s=GetUnitName(GetTriggerUnit())+" "+GetObjectName(1848657986)+" "+GetObjectName(GetLearnedSkill())+" ("+GetObjectName(1848657987)+" "+I2S(GetUnitAbilityLevel(GetTriggerUnit(),GetLearnedSkill()))+")"call DisplayTimedTextToPlayer(DO0,0,0,3,s)call DisplayTimedTextToPlayer(D20,0,0,3,s)endifreturn falseendfunctionfunction ZI1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function Z01))set t=nullendfunctionfunction Z11 takes nothing returns nothingcall PDI(bj_FORCE_ALL_PLAYERS,25.00,(D30[GetPlayerId((GetTriggerPlayer()))])+"|c00ff0303 "+GetObjectName(1848652356)+"|r")endfunctionfunction ZO1 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local player Z21=(LoadPlayerHandle(XY,(MKI),(78)))local integer SII=1local integer Z31local integer SXI=GetPlayerState(Z21,PLAYER_STATE_RESOURCE_GOLD)if R10[GetPlayerId(Z21)]==false and ZL==true thenif GetTriggerEvalCount(t)==4 thenif IsPlayerAlly(GetLocalPlayer(),Z21)==true thencall DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,6,GetObjectName(1848658483))call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,6,GetObjectName(1848658503))endifendifreturn falseendifif SXI>20 thencall SetPlayerState(Z21,PLAYER_STATE_RESOURCE_GOLD,0)set EW0[GetPlayerId(Z21)]=0if NZI(Z21)thenset Z31=NNI(OO)elseset Z31=NNI(AO)endifif NZI(Z21)thenloopexitwhen SII>5if NYI(BO[SII])thencall SetPlayerState(BO[SII],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(BO[SII],PLAYER_STATE_RESOURCE_GOLD)+SXI/Z31)endifset SII=SII+1endloopelseloopexitwhen SII>5if NYI(CO[SII])thencall SetPlayerState(CO[SII],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(CO[SII],PLAYER_STATE_RESOURCE_GOLD)+SXI/Z31)endifset SII=SII+1endloopendifendifreturn falseendfunctionfunction Z41 takes player Z21 returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SavePlayerHandle(XY,(MKI),(78),(Z21))call TriggerRegisterTimerEvent(t,2,true)call TriggerAddCondition(t,Condition(function ZO1))set t=nullendfunctionfunction Z51 takes player p returns nothinglocal multiboarditem LSI=MultiboardGetItem(M0,NW0[GetPlayerId(p)],NV0[GetPlayerId(p)])call MultiboardSetItemValue(LSI,"|c00333333"+(D30[GetPlayerId((p))])+"|r")call MultiboardReleaseItem(LSI)endfunctionfunction Z61 takes nothing returns nothinglocal integer GR1=NNI(OO)local integer GT1=NNI(AO)local integer SIIlocal integer S1Ilocal string F21local string D80local unit N0I=K1[GetPlayerId(GetTriggerPlayer())]if N0I==null thenset D80=GetObjectName(1848657239)elseset D80=GetUnitName(N0I)endifif(Z0<10)thenset F21=I2S(H0)+":0"+I2S(Z0)elseset F21=I2S(H0)+":"+I2S(Z0)endifif Q2==false thenset K3[GetPlayerId(GetTriggerPlayer())]="|c00555555"+F21+"|r"call PDI(bj_FORCE_ALL_PLAYERS,25.00,C0[GetPlayerId(GetTriggerPlayer())]+(D30[GetPlayerId((GetTriggerPlayer()))])+" ("+D80+")|r|c00ff0303 "+GetObjectName(1848652356)+"|r")if(NZI(GetTriggerPlayer())==true)thenset SII=1set S1I=5loopexitwhen SII>S1Iif(BO[SII]!=GetTriggerPlayer())thenif(NYI(BO[SII])==true)thencall SetPlayerAllianceStateBJ(GetTriggerPlayer(),BO[SII],4)endifendifset SII=SII+1endloopelseset SII=1set S1I=5loopexitwhen SII>S1Iif(CO[SII]!=GetTriggerPlayer())thenif(NYI(CO[SII])==true)thencall SetPlayerAllianceStateBJ(GetTriggerPlayer(),CO[SII],4)endifendifset SII=SII+1endloopendifif NZI(GetTriggerPlayer())or NWI(GetTriggerPlayer())thenset EB0=EB0+1endifcall E71("C"+"K"+I2S(A[GetPlayerId(GetTriggerPlayer())])+"D"+I2S(B[GetPlayerId(GetTriggerPlayer())])+"N"+I2S((LoadInteger(XY,(400+GetPlayerId(GetTriggerPlayer())),(79)))),GetPlayerId(GetTriggerPlayer()))set TG0=GetTriggerPlayer()call ExecuteFunc("Z71")if ZL thencall OS1(GetTriggerPlayer())endifset EA0[GetPlayerId(GetTriggerPlayer())]=truecall Z51(GetTriggerPlayer())call Z41(GetTriggerPlayer())if EB0==2 and C2==false and FL==true thencall DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,60," ")call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,60," ")call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,60,"|c006699CC"+GetObjectName(1848657495)+"|r")endifif EB0==3 thenset TE0=truecall ExecuteFunc("Z81")set TE0=falseendifelseset K3[GetPlayerId(GetTriggerPlayer())]="|c00555555End|r"call ExecuteFunc("Z91")endifendfunctionfunction ZB1 takes unit N0I returns nothingif GetUnitTypeId(N0I)!=1211117642 and GetUnitTypeId(N0I)!=1211117641 thenif GetOwningPlayer(N0I)==GetLocalPlayer()thencall DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,1," ")call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,1,"|c006699CC"+GetObjectName(1848657746))call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,1," ")endifcall IF1(KE,GetOwningPlayer(N0I))endifcall SetUnitInvulnerable(N0I,false)call UnitRemoveAbility(N0I,1093681498)call UnitRemoveAbility(N0I,1093679434)call UnitRemoveAbility(N0I,1093684052)call UnitRemoveAbility(N0I,1093684823)call UnitRemoveAbility(N0I,1093684821)call UnitRemoveAbility(N0I,1093685079)call UnitRemoveAbility(N0I,1093685078)call UnitRemoveAbility(N0I,1093685080)call UnitRemoveAbility(N0I,1093685081)call UnitRemoveAbility(N0I,1093685296)call UnitRemoveAbility(N0I,1093744459)call UnitRemoveAbility(N0I,1093685334)call UnitRemoveAbility(N0I,1093685583)call UnitRemoveAbility(N0I,1093685827)call UnitRemoveAbility(N0I,1093685830)call UnitRemoveAbility(N0I,BN)call UnitRemoveAbility(N0I,CN)call UnitRemoveAbility(N0I,DN)call UnitRemoveAbility(N0I,EN)call UnitRemoveAbility(N0I,1093684821)call UnitRemoveAbility(N0I,1093684823)call UnitRemoveAbility(N0I,MK0)call UnitRemoveAbility(N0I,1093683509)call UnitRemoveAbility(N0I,1093681977)call UnitRemoveAbility(N0I,1093683528)call UnitRemoveAbility(N0I,1110455863)call UnitRemoveAbility(N0I,1110456396)call UnitRemoveAbility(N0I,1093686098)call UnitRemoveAbility(N0I,1093687119)call UnitRemoveAbility(N0I,1093687122)call UnitRemoveAbility(N0I,1093747534)call UnitRemoveAbility(N0I,1093686856)call UnitRemoveAbility(N0I,1093686858)call UnitRemoveAbility(N0I,1093742649)call UnitRemoveAbility(N0I,1093686871)call UnitRemoveAbility(N0I,1093687373)call UnitRemoveAbility(N0I,1093742927)call UnitRemoveAbility(N0I,1093742930)call UnitRemoveAbility(N0I,1093743671)call UnitRemoveAbility(N0I,1093743672)call UnitRemoveAbility(N0I,1093742933)call UnitRemoveAbility(N0I,1093743673)call UnitRemoveAbility(N0I,1093743153)call UnitRemoveAbility(N0I,1093743158)call UnitRemoveAbility(N0I,1093744441)call UnitRemoveAbility(N0I,1097167980)call UnitRemoveAbility(N0I,GN[0])call UnitRemoveAbility(N0I,GN[1])call UnitRemoveAbility(N0I,GN[2])call UnitRemoveAbility(N0I,GN[3])call UnitRemoveAbility(N0I,GN[4])call UnitRemoveAbility(N0I,GN[5])call UnitRemoveAbility(N0I,1093748533)call UnitRemoveAbility(N0I,1093748531)call UnitRemoveAbility(N0I,1093748534)call UnitRemoveAbility(N0I,1093748532)call SaveBoolean(XY,(GetHandleId(N0I)),(80),(false))call SetUnitPathing(N0I,true)call PauseUnit(N0I,false)call SetUnitFlyHeight(N0I,GetUnitDefaultFlyHeight(N0I),0)call SetUnitScale(N0I,N9I(N0I)*ILI,N9I(N0I)*ILI,N9I(N0I)*ILI)call UnitRemoveAbility(N0I,1093747521)call UnitRemoveAbility(N0I,1093747513)call UnitRemoveAbility(N0I,1093747522)call UnitRemoveAbility(N0I,1093747523)call UnitRemoveAbility(N0I,1093748545)call UnitRemoveAbility(N0I,1093752627)call UnitRemoveAbility(N0I,1110459471)call UnitRemoveAbility(N0I,1093752136)call UnitRemoveAbility(N0I,1093752137)call UnitRemoveAbility(N0I,1093753396)call UnitRemoveAbility(N0I,1093753409)call UnitRemoveAbility(N0I,1093753410)call UnitRemoveAbility(N0I,1093753401)call UnitRemoveAbility(N0I,1110459478)call UnitRemoveAbility(N0I,1093809718)call UnitRemoveAbility(N0I,1093809717)call UnitRemoveAbility(N0I,1093809228)call UnitRemoveAbility(N0I,1110459716)call UnitRemoveAbility(N0I,1093808975)call UnitRemoveAbility(N0I,1110459705)call ES1(N0I,0)if GetUnitTypeId(N0I)==1160786510 or GetUnitTypeId(N0I)==1160786511 thencall UnitRemoveAbility(N0I,1093808951)call UnitAddAbility(N0I,1093808706)call UnitRemoveAbility(N0I,1093808706)if DB1(N0I,FK0[KD0])!=null thencall UnitAddAbility(N0I,1093808951)endifendifif GetUnitTypeId(N0I)==1311788373 or GetUnitTypeId(N0I)==1311788375 thencall UnitAddAbility(N0I,1093816658)call UnitRemoveAbility(N0I,1093816658)endifif GetUnitTypeId(N0I)==1211123020 or GetUnitTypeId(N0I)==1211123023 thencall UnitAddAbility(N0I,1093817176)call UnitRemoveAbility(N0I,1093817176)endifif GetUnitTypeId(N0I)==1211123026 thencall UnitAddAbility(N0I,1093817942)call UnitRemoveAbility(N0I,1093817942)endifcall UnitRemoveAbility(N0I,1093818188)call UnitRemoveAbility(N0I,1093808966)call UnitRemoveAbility(N0I,1093818187)call UnitRemoveAbility(N0I,1093818186)call UnitRemoveAbility(N0I,1093817137)call AB1(N0I)set CK=N0Icall ExecuteFunc("ZC1")endfunctionfunction ZE1 takes nothing returns booleanif GetPlayerAlliance(GetOwningPlayer(GetFilterUnit()),ED0,ALLIANCE_SHARED_CONTROL)==true and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false thenset EC0=EC0+1endifreturn falseendfunctionfunction ZF1 takes unit u,player p,real x,real y,boolean ZG1 returns nothinglocal group g=MDI()set EC0=0set ED0=pcall GroupEnumUnitsSelected(g,p,Condition(function ZE1))if EC0==0 and GetLocalPlayer()==p thenif ZG1==false thencall ClearSelection()call SelectUnit(u,true)endifcall PanCameraToTimed(x,y,0)endifset EC0=0call MCI(g)set g=nullendfunctionfunction ZH1 takes unit IQ1 returns booleanreturn GetUnitTypeId(IQ1)==1211117641 or GetUnitTypeId(IQ1)==1211117642endfunctionfunction ZZ1 takes unit ZV1 returns nothinglocal integer ZW1if DB1(ZV1,FK0[WG0])!=null and GetUnitTypeId(ZV1)!=1211117642 thenset ZW1=R2I(GetItemCharges(DB1(ZV1,FK0[WG0]))*0.67)if GetItemCharges(DB1(ZV1,FK0[WG0]))==1 thenset ZW1=0endifcall SetItemCharges(DB1(ZV1,FK0[WG0]),ZW1)call AddHeroXP(ZV1,GetHeroXP(LY0[GetPlayerId(GetOwningPlayer(ZV1))]),true)call RemoveUnit(LY0[GetPlayerId(GetOwningPlayer(ZV1))])endifendfunctionfunction ZX1 takes unit ZY1 returns nothinglocal integer MKI=GetHandleId(GetOwningPlayer(ZY1))local unit ZJ1=(LoadUnitHandle(XY,(MKI),(699)))local unit ZK1=(LoadUnitHandle(XY,(MKI),(700)))local unit ZL1=(LoadUnitHandle(XY,(MKI),(701)))local unit ZM1=(LoadUnitHandle(XY,(MKI),(702)))local unit ZN1=(LoadUnitHandle(XY,(MKI),(703)))local unit ZS1set ZS1=ZJ1if ZS1!=null thencall RemoveUnit(ZS1)endifset ZS1=ZK1if ZS1!=null thencall RemoveUnit(ZS1)endifset ZS1=ZL1if ZS1!=null thencall RemoveUnit(ZS1)endifset ZS1=ZM1if ZS1!=null thencall RemoveUnit(ZS1)endifset ZS1=ZN1if ZS1!=null thencall RemoveUnit(ZS1)endifendfunctionfunction ZT1 takes nothing returns booleancall MZI(GetTriggeringTrigger())set N90=falsereturn falseendfunctionfunction ZR1 takes unit ZP1 returns nothinglocal integer MKI=GetHandleId(GetOwningPlayer(ZP1))local unit ZJ1=(LoadUnitHandle(XY,(MKI),(699)))local unit ZK1=(LoadUnitHandle(XY,(MKI),(700)))local unit ZL1=(LoadUnitHandle(XY,(MKI),(701)))local unit ZM1=(LoadUnitHandle(XY,(MKI),(702)))local unit ZN1=(LoadUnitHandle(XY,(MKI),(703)))local unit ZS1local real x=GetUnitX(ZJ1)local real y=GetUnitY(ZJ1)local trigger tif N90==false thenif NZI(GetOwningPlayer(ZJ1))thenset x=GetRectCenterX(O4)set y=GetRectCenterY(O4)elseset x=GetRectCenterX(S3)set y=GetRectCenterY(S3)endifelseset t=CreateTrigger()call TriggerRegisterTimerEvent(t,2,false)call TriggerAddCondition(t,Condition(function ZT1))endifset ZS1=ZJ1if ZS1!=null and ZP1!=ZS1 thencall ReviveHero(ZS1,x,y,false)call SetUnitX(ZS1,x)call SetUnitY(ZS1,y)call ZB1(ZS1)call SetUnitPathing(ZS1,true)call SetUnitState(ZS1,UNIT_STATE_MANA,10000)endifset ZS1=ZK1if ZS1!=null and ZP1!=ZS1 thencall ReviveHero(ZS1,x,y,false)call SetUnitX(ZS1,x)call SetUnitY(ZS1,y)call ZB1(ZS1)call SetUnitPathing(ZS1,true)call SetUnitState(ZS1,UNIT_STATE_MANA,10000)endifset ZS1=ZL1if ZS1!=null and ZP1!=ZS1 thencall ReviveHero(ZS1,x,y,false)call SetUnitX(ZS1,x)call SetUnitY(ZS1,y)call ZB1(ZS1)call SetUnitPathing(ZS1,true)call SetUnitState(ZS1,UNIT_STATE_MANA,10000)endifset ZS1=ZM1if ZS1!=null and ZP1!=ZS1 thencall ReviveHero(ZS1,x,y,false)call SetUnitX(ZS1,x)call SetUnitY(ZS1,y)call ZB1(ZS1)call SetUnitPathing(ZS1,true)call SetUnitState(ZS1,UNIT_STATE_MANA,10000)endifset ZS1=ZN1if ZS1!=null and ZP1!=ZS1 thencall ReviveHero(ZS1,x,y,false)call SetUnitX(ZS1,x)call SetUnitY(ZS1,y)call ZB1(ZS1)call SetUnitPathing(ZS1,true)call SetUnitState(ZS1,UNIT_STATE_MANA,10000)endifendfunctionfunction ZQ1 takes nothing returns nothinglocal unit R7I=GetTriggerUnit()local player NJI=GetOwningPlayer(R7I)local real xlocal real ylocal integer ZW1set HS[GetPlayerId((NJI))]=falseset DJ[GetPlayerId(GetOwningPlayer((R7I)))]=falseif NZI(GetOwningPlayer(R7I))thenset x=GetRectCenterX(O4)set y=GetRectCenterY(O4)elseset x=GetRectCenterX(S3)set y=GetRectCenterY(S3)endifif LO0 thenset ZS[GetPlayerId(NJI)]=R2I(TimerGetRemaining(F0[GetPlayerId(NJI)])*0.25)set VS[GetPlayerId(NJI)]=(TimerGetElapsed(M))+TimerGetRemaining(F0[GetPlayerId(NJI)])elseset ZS[GetPlayerId(NJI)]=0endifcall TimerStart(F0[GetPlayerId(NJI)],0.0,false,null)if ZH1(R7I)thencall ZR1(R7I)elsecall ZF1(R7I,NJI,x,y,false)endifcall SetUnitX(R7I,x)call SetUnitY(R7I,y)call ZB1(R7I)call SetUnitPathing(R7I,true)if DB1(R7I,FK0[WG0])!=null and GetUnitTypeId(R7I)!=1211117642 thenset ZW1=(R2I(((GetItemCharges(DB1(R7I,FK0[WG0]))*0.67)*1.0)))if GetItemCharges(DB1(R7I,FK0[WG0]))==1 thenset ZW1=0endifcall SetItemCharges(DB1(R7I,FK0[WG0]),ZW1)call AddHeroXP(R7I,GetHeroXP(LY0[GetPlayerId(GetOwningPlayer(R7I))]),true)call RemoveUnit(LY0[GetPlayerId(GetOwningPlayer(R7I))])endifendfunctionfunction V01 takes unit N0I returns nothinglocal integer VI1=GetUnitPointValue(N0I)local unit V11if(VI1==34)thencall ExecuteFunc("VO1")call ExecuteFunc("V21")call ExecuteFunc("V31")elseif(VI1==37)thencall ExecuteFunc("V41")call ExecuteFunc("V51")call ExecuteFunc("V61")call ExecuteFunc("V71")elseif(VI1==38)thencall ExecuteFunc("V81")call ExecuteFunc("V91")call ExecuteFunc("VA1")call ExecuteFunc("VB1")elseif(VI1==32)thencall ExecuteFunc("VC1")call ExecuteFunc("VD1")call ExecuteFunc("VE1")elseif(VI1==52)thencall ExecuteFunc("VF1")call ExecuteFunc("VG1")call ExecuteFunc("VH1")call ExecuteFunc("VZ1")elseif(VI1==31)thencall ExecuteFunc("VV1")call ExecuteFunc("VW1")call ExecuteFunc("VX1")elseif(VI1==24)thencall ExecuteFunc("VY1")call ExecuteFunc("VJ1")call ExecuteFunc("VK1")call ExecuteFunc("VL1")elseif(VI1==5)thencall ExecuteFunc("VM1")call ExecuteFunc("VN1")call ExecuteFunc("VS1")elseif(VI1==8)thencall ExecuteFunc("VT1")call ExecuteFunc("VR1")call ExecuteFunc("VP1")call ExecuteFunc("VQ1")call ExecuteFunc("VU1")elseif(VI1==3)thencall ExecuteFunc("W01")call ExecuteFunc("WI1")call ExecuteFunc("W11")call ExecuteFunc("WO1")elseif(VI1==95)thencall ExecuteFunc("W21")call ExecuteFunc("W31")call ExecuteFunc("W41")call ExecuteFunc("W51")elseif(VI1==20)thencall ExecuteFunc("W61")call ExecuteFunc("W71")call ExecuteFunc("W81")call ExecuteFunc("W91")elseif(VI1==12)thencall ExecuteFunc("WA1")call ExecuteFunc("WB1")call ExecuteFunc("WC1")elseif(VI1==16)thencall ExecuteFunc("WD1")call ExecuteFunc("WE1")call ExecuteFunc("WF1")call ExecuteFunc("WG1")call ExecuteFunc("WH1")call ExecuteFunc("WZ1")call ExecuteFunc("WV1")elseif(VI1==25)thencall ExecuteFunc("WW1")call ExecuteFunc("WX1")elseif(VI1==4)thencall ExecuteFunc("WY1")call ExecuteFunc("WJ1")call ExecuteFunc("WK1")call ExecuteFunc("WL1")call ExecuteFunc("WM1")call SetUnitPathing(N0I,false)call DisableTrigger(L30)set TB0=trueset V11=CreateUnit(GetOwningPlayer(N0I),GetUnitTypeId(N0I),GetUnitX(N0I),GetUnitY(N0I),GetUnitFacing(N0I))call SaveBoolean(XY,(GetHandleId(V11)),(85),(true))set K1[GetPlayerId(GetOwningPlayer(N0I))]=V11call SetUnitPathing(V11,false)call SetUnitPosition(V11,GetUnitX(N0I),GetUnitY(N0I))if X0 thencall SetHeroXP(V11,GetHeroXP(N0I),false)call UnitAddItem(V11,UnitItemInSlot(N0I,0))call UnitAddItem(V11,UnitItemInSlot(N0I,1))call UnitAddItem(V11,UnitItemInSlot(N0I,2))call UnitAddItem(V11,UnitItemInSlot(N0I,3))call UnitAddItem(V11,UnitItemInSlot(N0I,4))call UnitAddItem(V11,UnitItemInSlot(N0I,5))endifcall RKI(N0I)call EnableTrigger(L30)call SetUnitPathing(V11,true)call ClearSelectionForPlayer(GetOwningPlayer(V11))call SelectUnitAddForPlayer(V11,GetOwningPlayer(V11))elseif(VI1==7)thencall ExecuteFunc("WN1")call ExecuteFunc("WS1")call ExecuteFunc("WT1")elseif(VI1==18)thencall ExecuteFunc("WR1")call ExecuteFunc("WP1")elseif(VI1==36)thencall ExecuteFunc("WQ1")elseif(VI1==21)thencall ExecuteFunc("WU1")call ExecuteFunc("X01")call ExecuteFunc("XI1")call ExecuteFunc("X11")elseif(VI1==14)thencall ExecuteFunc("XO1")call ExecuteFunc("X21")call ExecuteFunc("X31")call ExecuteFunc("X41")call ExecuteFunc("X51")elseif(VI1==13)thencall ExecuteFunc("X61")call ExecuteFunc("X71")call ExecuteFunc("GS")call ExecuteFunc("X81")elseif(VI1==26)thencall ExecuteFunc("X91")call ExecuteFunc("XA1")call ExecuteFunc("XB1")elseif(VI1==9)thencall ExecuteFunc("XC1")call ExecuteFunc("XD1")call ExecuteFunc("XE1")call ExecuteFunc("XF1")elseif(VI1==10)thencall ExecuteFunc("XG1")call ExecuteFunc("XH1")call ExecuteFunc("XZ1")call ExecuteFunc("XV1")call ExecuteFunc("XW1")call ExecuteFunc("XX1")call ExecuteFunc("XY1")call ExecuteFunc("XJ1")elseif(VI1==23)thencall ExecuteFunc("XK1")call ExecuteFunc("XL1")call ExecuteFunc("XM1")call ExecuteFunc("XN1")elseif(VI1==19)thencall ExecuteFunc("XS1")call ExecuteFunc("XT1")call ExecuteFunc("XR1")call ExecuteFunc("XP1")elseif(VI1==22)thencall ExecuteFunc("XQ1")call ExecuteFunc("XU1")call ExecuteFunc("Y01")call ExecuteFunc("YI1")elseif(VI1==17)thencall ExecuteFunc("Y11")call ExecuteFunc("YO1")call ExecuteFunc("Y21")elseif(VI1==1)thencall ExecuteFunc("Y31")call ExecuteFunc("Y41")call ExecuteFunc("Y51")call ExecuteFunc("Y61")elseif(VI1==2)thencall ExecuteFunc("Y71")call ExecuteFunc("Y81")call ExecuteFunc("Y91")call ExecuteFunc("YA1")elseif(VI1==27)thencall ExecuteFunc("YB1")call ExecuteFunc("YC1")call ExecuteFunc("YD1")call ExecuteFunc("YE1")call ExecuteFunc("YF1")elseif(VI1==82)thencall ExecuteFunc("YG1")call ExecuteFunc("YH1")call ExecuteFunc("YZ1")call ExecuteFunc("YV1")elseif(VI1==75)thencall ExecuteFunc("YW1")call ExecuteFunc("YX1")call ExecuteFunc("YY1")elseif(VI1==83)thencall ExecuteFunc("YJ1")call ExecuteFunc("YK1")call ExecuteFunc("YL1")call ExecuteFunc("YM1")elseif(VI1==112)thencall ExecuteFunc("YN1")call ExecuteFunc("YS1")call ExecuteFunc("YT1")elseif(VI1==108)thencall ExecuteFunc("YR1")call ExecuteFunc("YP1")call ExecuteFunc("YQ1")elseif(VI1==69)thencall ExecuteFunc("YU1")call ExecuteFunc("J01")call ExecuteFunc("JI1")call ExecuteFunc("J11")call ExecuteFunc("JO1")elseif(VI1==100)thencall ExecuteFunc("J21")call ExecuteFunc("J31")call ExecuteFunc("J41")call ExecuteFunc("J51")elseif(VI1==102)thencall ExecuteFunc("J61")call ExecuteFunc("J71")call ExecuteFunc("J81")elseif(VI1==64)thencall ExecuteFunc("J91")call ExecuteFunc("JA1")call ExecuteFunc("JB1")call ExecuteFunc("JC1")elseif(VI1==106)thencall ExecuteFunc("JD1")call ExecuteFunc("JE1")call ExecuteFunc("JF1")elseif(VI1==61)thencall ExecuteFunc("JG1")call ExecuteFunc("JH1")call ExecuteFunc("JZ1")elseif(VI1==76)thencall ExecuteFunc("JV1")call ExecuteFunc("JW1")call ExecuteFunc("JX1")call ExecuteFunc("JY1")elseif(VI1==80)thencall ExecuteFunc("JJ1")call ExecuteFunc("JK1")call ExecuteFunc("JL1")call ExecuteFunc("JM1")call ExecuteFunc("NL")elseif(VI1==62)thencall ExecuteFunc("JN1")call ExecuteFunc("JS1")call ExecuteFunc("JT1")call ExecuteFunc("JR1")elseif(VI1==60)thencall ExecuteFunc("JP1")call ExecuteFunc("JQ1")call ExecuteFunc("JU1")elseif(VI1==77)thencall ExecuteFunc("K01")call ExecuteFunc("KI1")call ExecuteFunc("K11")call ExecuteFunc("KO1")elseif(VI1==73)thencall ExecuteFunc("NW")call ExecuteFunc("K21")call ExecuteFunc("K31")elseif(VI1==81)thencall ExecuteFunc("K41")call ExecuteFunc("K51")call ExecuteFunc("K61")elseif(VI1==66)thencall ExecuteFunc("K71")call ExecuteFunc("K81")elseif(VI1==78)thencall ExecuteFunc("K91")call ExecuteFunc("KA1")call ExecuteFunc("KB1")call ExecuteFunc("KC1")elseif(VI1==99)thencall ExecuteFunc("KD1")call ExecuteFunc("KE1")call ExecuteFunc("KF1")call ExecuteFunc("KG1")call ExecuteFunc("KH1")call ExecuteFunc("KZ1")elseif(VI1==74)thencall ExecuteFunc("KV1")call ExecuteFunc("KW1")call ExecuteFunc("KX1")call ExecuteFunc("KY1")elseif(VI1==105)thencall ExecuteFunc("KJ1")call ExecuteFunc("KK1")call ExecuteFunc("KL1")elseif(VI1==70)thencall ExecuteFunc("KM1")call ExecuteFunc("KN1")call ExecuteFunc("KS1")elseif(VI1==107)thencall ExecuteFunc("KT1")call ExecuteFunc("KR1")call ExecuteFunc("KP1")call ExecuteFunc("KQ1")elseif(VI1==79)thencall ExecuteFunc("KU1")call ExecuteFunc("L01")call ExecuteFunc("LI1")call ExecuteFunc("L11")elseif(VI1==68)thencall ExecuteFunc("LO1")call ExecuteFunc("L21")elseif(VI1==84)thencall ExecuteFunc("L31")call ExecuteFunc("L41")call ExecuteFunc("L51")call ExecuteFunc("L61")elseif(VI1==85)thencall ExecuteFunc("L71")call ExecuteFunc("L81")call ExecuteFunc("L91")call ExecuteFunc("LA1")call ExecuteFunc("LB1")elseif(VI1==86)thencall ExecuteFunc("LC1")call ExecuteFunc("LD1")call ExecuteFunc("LE1")call ExecuteFunc("LF1")elseif(VI1==87)thencall ExecuteFunc("LG1")call ExecuteFunc("LH1")call ExecuteFunc("LZ1")call ExecuteFunc("LV1")elseif(VI1==33)thencall ExecuteFunc("LW1")call ExecuteFunc("LX1")call ExecuteFunc("LY1")elseif(VI1==39)thencall ExecuteFunc("LJ1")call ExecuteFunc("LK1")call ExecuteFunc("LL1")elseif(VI1==88)thencall ExecuteFunc("LM1")call ExecuteFunc("LN1")call ExecuteFunc("LS1")call ExecuteFunc("LT1")elseif(VI1==40)thencall ExecuteFunc("LR1")call ExecuteFunc("LP1")call ExecuteFunc("LQ1")call ExecuteFunc("LU1")elseif VI1==89 thencall ExecuteFunc("M01")call ExecuteFunc("MI1")elseif VI1==90 thencall ExecuteFunc("M11")call ExecuteFunc("MO1")call ExecuteFunc("M21")call ExecuteFunc("M31")elseif VI1==71 thencall ExecuteFunc("M41")call ExecuteFunc("M51")call ExecuteFunc("M61")call ExecuteFunc("M71")elseif VI1==93 thencall ExecuteFunc("M81")call ExecuteFunc("M91")call ExecuteFunc("MA1")call ExecuteFunc("MB1")elseif VI1==42 thencall ExecuteFunc("MC1")call ExecuteFunc("MD1")call ExecuteFunc("ME1")call ExecuteFunc("MF1")elseif VI1==91 thencall ExecuteFunc("MG1")call ExecuteFunc("MH1")call ExecuteFunc("MZ1")call ExecuteFunc("MV1")call ExecuteFunc("MW1")call ExecuteFunc("MX1")call ExecuteFunc("MY1")call ExecuteFunc("MJ1")elseif VI1==92 thencall ExecuteFunc("MK1")call ExecuteFunc("ML1")call ExecuteFunc("MM1")call ExecuteFunc("MN1")elseif VI1==41 thencall ExecuteFunc("MS1")call ExecuteFunc("MT1")call ExecuteFunc("MR1")call ExecuteFunc("MP1")call ExecuteFunc("MQ1")elseif VI1==43 thencall ExecuteFunc("MU1")call ExecuteFunc("N01")call ExecuteFunc("NI1")call ExecuteFunc("N11")elseif VI1==44 thencall ExecuteFunc("NO1")call ExecuteFunc("N21")call ExecuteFunc("N31")call ExecuteFunc("N41")elseif VI1==72 thencall ExecuteFunc("N51")call ExecuteFunc("N61")call ExecuteFunc("N71")call ExecuteFunc("N81")elseif VI1==94 thencall ExecuteFunc("N91")elseif VI1==6 thencall ExecuteFunc("NA1")call ExecuteFunc("NB1")call ExecuteFunc("NC1")elseif VI1==104 thencall ExecuteFunc("ND1")call ExecuteFunc("NE1")elseif VI1==65 thencall ExecuteFunc("NF1")call ExecuteFunc("NG1")call ExecuteFunc("NH1")call ExecuteFunc("NZ1")elseif VI1==111 thencall ExecuteFunc("NV1")call ExecuteFunc("NW1")call ExecuteFunc("NX1")elseif VI1==63 thencall ExecuteFunc("NY1")call ExecuteFunc("NJ1")call ExecuteFunc("NK1")call ExecuteFunc("NL1")elseif VI1==45 thencall ExecuteFunc("NM1")call ExecuteFunc("NN1")call ExecuteFunc("NS1")call ExecuteFunc("NT1")elseif VI1==46 thencall ExecuteFunc("NR1")call ExecuteFunc("NP1")call ExecuteFunc("NQ1")call ExecuteFunc("NU1")elseif VI1==47 thencall ExecuteFunc("S01")call ExecuteFunc("SI1")call ExecuteFunc("S11")call ExecuteFunc("SO1")elseif VI1==11 thencall ExecuteFunc("S21")call ExecuteFunc("S31")elseif VI1==96 thencall ExecuteFunc("S41")call ExecuteFunc("S51")call ExecuteFunc("S61")call ExecuteFunc("S71")elseif VI1==15 thencall ExecuteFunc("S81")call ExecuteFunc("S91")call ExecuteFunc("SA1")call ExecuteFunc("SB1")elseif VI1==97 thencall ExecuteFunc("SC1")call ExecuteFunc("SD1")call ExecuteFunc("SE1")call ExecuteFunc("SF1")call ExecuteFunc("SG1")elseif VI1==98 thencall ExecuteFunc("SH1")call ExecuteFunc("SZ1")call ExecuteFunc("SV1")call ExecuteFunc("SW1")call ExecuteFunc("SX1")elseif VI1==67 thencall ExecuteFunc("SY1")elseif VI1==28 thencall ExecuteFunc("SJ1")call ExecuteFunc("SK1")elseif VI1==51 thencall ExecuteFunc("SL1")call ExecuteFunc("SM1")call ExecuteFunc("SN1")call ExecuteFunc("SS1")call ExecuteFunc("ST1")call ExecuteFunc("SR1")call ExecuteFunc("SP1")elseif VI1==100 thenelseif VI1==101 thencall ExecuteFunc("SQ1")call ExecuteFunc("SU1")call ExecuteFunc("T01")call ExecuteFunc("TI1")elseif VI1==48 thencall ExecuteFunc("T11")call ExecuteFunc("TO1")call ExecuteFunc("T21")call ExecuteFunc("T31")elseif VI1==49 thencall ExecuteFunc("T41")call ExecuteFunc("T51")call ExecuteFunc("T61")call ExecuteFunc("T71")elseif VI1==29 thencall ExecuteFunc("T81")call ExecuteFunc("T91")call ExecuteFunc("TA1")call ExecuteFunc("TB1")elseif VI1==50 thencall ExecuteFunc("TC1")call ExecuteFunc("TD1")call ExecuteFunc("TE1")call ExecuteFunc("TF1")elseif VI1==30 thencall ExecuteFunc("TG1")call ExecuteFunc("TH1")elseif VI1==53 thencall ExecuteFunc("TZ1")call ExecuteFunc("TV1")call ExecuteFunc("TW1")call ExecuteFunc("TX1")elseif VI1==103 thencall ExecuteFunc("TY1")elseif VI1==54 thencall ExecuteFunc("TJ1")call ExecuteFunc("TK1")call ExecuteFunc("TL1")call ExecuteFunc("TM1")call ExecuteFunc("TN1")elseif VI1==55 thencall ExecuteFunc("TS1")call ExecuteFunc("TT1")call ExecuteFunc("TR1")call ExecuteFunc("TP1")elseif VI1==56 thencall ExecuteFunc("TQ1")call ExecuteFunc("TU1")call ExecuteFunc("R01")call ExecuteFunc("RI1")elseif VI1==57 thencall ExecuteFunc("R11")call ExecuteFunc("RO1")call ExecuteFunc("R21")call ExecuteFunc("R31")elseif VI1==109 thencall ExecuteFunc("R41")call ExecuteFunc("R51")call ExecuteFunc("R61")call ExecuteFunc("R71")call ExecuteFunc("R81")call ExecuteFunc("R91")elseif VI1==110 thencall ExecuteFunc("RA1")call ExecuteFunc("RB1")call ExecuteFunc("RC1")call ExecuteFunc("RD1")call ExecuteFunc("RE1")elseif VI1==35 thencall ExecuteFunc("RF1")call ExecuteFunc("RG1")call ExecuteFunc("RH1")elseif VI1==58 thencall ExecuteFunc("RZ1")call ExecuteFunc("RV1")call ExecuteFunc("RW1")call ExecuteFunc("RX1")call ExecuteFunc("RY1")set CK=N0Icall ExecuteFunc("RJ1")elseif VI1==59 thencall ExecuteFunc("RK1")call ExecuteFunc("RL1")call ExecuteFunc("RM1")call ExecuteFunc("RN1")endifendfunctionfunction RS1 takes player KUI,string LVI returns nothingif IsPlayerInForce(GetLocalPlayer(),KQI(KUI))thencall DisplayTimedTextToPlayer(GetLocalPlayer(),0,U2,40,C0[GetPlayerId(KUI)]+(D30[GetPlayerId((KUI))])+"|r "+LVI)endifendfunctionfunction Main_AllHasHero takes nothing returns booleanreturn K1[GetPlayerId(BO[1])]!=null and K1[GetPlayerId(BO[2])]!=null and K1[GetPlayerId(BO[3])]!=null and K1[GetPlayerId(BO[4])]!=null and K1[GetPlayerId(BO[5])]!=null and K1[GetPlayerId(CO[1])]!=null and K1[GetPlayerId(CO[2])]!=null and K1[GetPlayerId(CO[3])]!=null and K1[GetPlayerId(CO[4])]!=null and K1[GetPlayerId(CO[5])]!=nullendfunctionfunction RT1 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()set AN=truecall MZI(t)call DestroyFogModifier(CreateFogModifierRadius(BO[0],FOG_OF_WAR_MASKED,RN0,RS0,700,false,false))call DestroyFogModifier(CreateFogModifierRadius(CO[0],FOG_OF_WAR_MASKED,RN0,RS0,700,false,false))set t=nullreturn falseendfunctionfunction RR1 takes unit u returns booleanreturn GetUnitTypeId(u)!=1211117645 and GetUnitTypeId(u)!=1311788365 and GetUnitTypeId(u)!=1211119431 and GetUnitTypeId(u)!=1211117657 and GetUnitTypeId(u)!=1211117642 and GetUnitTypeId(u)!=1211122232 and GetUnitTypeId(u)!=1211123027endfunctionfunction RP1 takes nothing returns booleanreturn IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==true and IsUnitIllusion(GetTriggerUnit())==false and HaveSavedBoolean(XY,GetHandleId(GetTriggerUnit()),85)==false and RR1(GetTriggerUnit())endfunctionfunction RQ1 takes nothing returns booleanreturn GetUnitTypeId(GetFilterUnit())==1848651843endfunctionfunction RU1 takes nothing returns nothingcall RemoveUnit(GetEnumUnit())endfunctionfunction P01 takes player NJI returns nothinglocal group GK1=MDI()local boolexpr PI1=Condition(function RQ1)call GroupEnumUnitsOfPlayer(GK1,NJI,PI1)call ForGroup(GK1,function RU1)call MCI(GK1)endfunctionfunction P11 takes nothing returns nothingcall P01(BO[1])call P01(BO[2])call P01(BO[3])call P01(BO[4])call P01(BO[5])call P01(CO[1])call P01(CO[2])call P01(CO[3])call P01(CO[4])call P01(CO[5])endfunctionfunction PO1 takes nothing returns booleanreturn GetUnitTypeId(GetFilterUnit())==1852010352endfunctionfunction P21 takes nothing returns nothingif UL0 thencall UnitRemoveAbility(D00[GetPlayerId(GetOwningPlayer(GetEnumUnit()))],1093743686)call UnitRemoveAbility(D00[GetPlayerId(GetOwningPlayer(GetEnumUnit()))],1093743685)call UnitRemoveAbility(D00[GetPlayerId(GetOwningPlayer(GetEnumUnit()))],1093743688)endifif GetUnitAbilityLevel(GetEnumUnit(),1093683508)==0 thencall UnitAddAbility(GetEnumUnit(),1093683508)endifendfunctionfunction P31 takes player p returns nothinglocal group g=MDI()call GroupEnumUnitsOfPlayer(g,p,Condition(function PO1))call ForGroup(g,function P21)call MCI(g)set g=nullendfunctionfunction DelayedHeroTech_Helper takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer NBI=(LoadInteger(XY,(MKI),(86)))call NPI(NBI)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullreturn falseendfunctionfunction P41 takes unit N0I,player p returns stringlocal string s=GetObjectName(1848656962)set s=EA1(s,"$hero",GetUnitName(N0I))set s=EA1(s,"$p",(D30[GetPlayerId((p))]))return sendfunctionfunction P51 takes nothing returns nothinglocal unit R7I=GetTriggerUnit()local player NJI=GetOwningPlayer(R7I)local real xlocal real ylocal region r=CreateRegion()local player P61=NJIlocal item OT1local unit N0I=R7Ilocal trigger tif X0==false thencall F61(GetOwningPlayer(R7I))endifif GetObjectName(1848657992)=="Language: English"and(DL0[(GetUnitPointValue(R7I))]!="")thencall DisplayTimedTextToPlayer(NJI,0,0,4,"A |c006699CC-tips|r command is available if you would like some pointers for this hero")endifif RM0[GetPlayerId(NJI)]==true thencall EP1(NJI,GetUnitPointValue(R7I))endifif AN==false and(K1[GetPlayerId(BO[1])]!=null and K1[GetPlayerId(BO[2])]!=null and K1[GetPlayerId(BO[3])]!=null and K1[GetPlayerId(BO[4])]!=null and K1[GetPlayerId(BO[5])]!=null and K1[GetPlayerId(CO[1])]!=null and K1[GetPlayerId(CO[2])]!=null and K1[GetPlayerId(CO[3])]!=null and K1[GetPlayerId(CO[4])]!=null and K1[GetPlayerId(CO[5])]!=null)thenset t=CreateTrigger()call TriggerRegisterTimerEvent(t,7,false)call TriggerAddCondition(t,Condition(function RT1))set t=nullendifset DJ[GetPlayerId(GetOwningPlayer((R7I)))]=falsecall RegionAddRect(r,RA)if B3 and G3==false thenset E3[GetPlayerId(NJI)]=trueset NJI=(LoadPlayerHandle(XY,(2000),(550+GetPlayerId(NJI))))call SetUnitOwner(R7I,NJI,true)endifcall SetPlayerAbilityAvailable(GetOwningPlayer(R7I),1093817427,false)if NZI(GetOwningPlayer(R7I))thenif IsUnitInRegion(r,R7I)thenset x=GetRandomReal(GetRectMinX(O4),GetRectMaxX(O4))set y=GetRandomReal(GetRectMinY(O4),GetRectMaxY(O4))elseset x=GetUnitX(R7I)set y=GetUnitY(R7I)endifelseif IsUnitInRegion(r,R7I)thenset x=GetRandomReal(GetRectMinX(S3),GetRectMaxX(S3))set y=GetRandomReal(GetRectMinY(S3),GetRectMaxY(S3))elseset x=GetUnitX(R7I)set y=GetUnitY(R7I)endifendifset C3[GetPlayerId(NJI)]=trueif(not B3 or G3)thenif Q80==false and UM==false thencall PanCameraToTimedForPlayer(NJI,x,y,0)endifif GetUnitTypeId(R7I)!=1311788365 thencall ClearSelectionForPlayer(NJI)endifcall SelectUnitAddForPlayer(R7I,NJI)endifcall SetUnitX(R7I,x)call SetUnitY(R7I,y)if GetUnitTypeId(R7I)!=1311788365 thenset K1[GetPlayerId(NJI)]=R7Iendifcall E51(NJI,"9",GetUnitTypeId(R7I))if B3 and G3==false thencall S0I(P61)elsecall S0I(NJI)endifcall SaveBoolean(XY,(GetHandleId(R7I)),(85),(true))if not F2 thenset R[GetUnitPointValue(R7I)]=truecall NPI(GetUnitTypeId(R7I))endifif X0 thenif NZI(NJI)thenset T1[0]=T1[0]+1elseset T1[1]=T1[1]+1endifset IO[GetPlayerId(NJI)]=IO[GetPlayerId(NJI)]+1if IO[GetPlayerId(GetOwningPlayer(R7I))]>1 and R7I!=U1[GetPlayerId(GetOwningPlayer(R7I))]thencall ZZ1(U1[GetPlayerId(GetOwningPlayer(R7I))])call DisableTrigger(L30)call SetHeroXP(R7I,GetHeroXP(U1[GetPlayerId(GetOwningPlayer(R7I))]),false)call UnitAddItem(R7I,UnitItemInSlot(U1[GetPlayerId(GetOwningPlayer(R7I))],0))call UnitAddItem(R7I,UnitItemInSlot(U1[GetPlayerId(GetOwningPlayer(R7I))],1))call UnitAddItem(R7I,UnitItemInSlot(U1[GetPlayerId(GetOwningPlayer(R7I))],2))call UnitAddItem(R7I,UnitItemInSlot(U1[GetPlayerId(GetOwningPlayer(R7I))],3))call UnitAddItem(R7I,UnitItemInSlot(U1[GetPlayerId(GetOwningPlayer(R7I))],4))call UnitAddItem(R7I,UnitItemInSlot(U1[GetPlayerId(GetOwningPlayer(R7I))],5))call EnableTrigger(L30)if ZH1(U1[GetPlayerId(GetOwningPlayer(R7I))])thencall ZX1(U1[GetPlayerId(GetOwningPlayer(R7I))])elsecall RKI(U1[GetPlayerId(GetOwningPlayer(R7I))])endifendifendifif NJI!=BO[0]and NJI!=CO[0]thenif B3 thenif TimerGetElapsed(M)>60 thencall RS1(NJI,GetObjectName(1848652357)+" "+GetUnitName(R7I))elseif S0[GetPlayerId(P61)]==true thencall RS1(NJI,P41(R7I,P61))elsecall SetPlayerState(P61,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(P61,PLAYER_STATE_RESOURCE_GOLD)+250)call RS1(NJI,GetObjectName(1848656945)+" "+GetUnitName(R7I)+" "+GetObjectName(1848656944)+" "+(D30[GetPlayerId((P61))]))endifelseif Y2==false or NJI==WO thenif(D0[GetPlayerId(GetOwningPlayer(R7I))]==true and Y2==false)thencall RS1(NJI,GetObjectName(1848656949)+" "+GetUnitName(R7I)+".")elseif((S0[GetPlayerId(NJI)]==true and X0==false)or Y0 or J0 or N2)thencall RS1(NJI,GetObjectName(1848656947)+" "+GetUnitName(R7I)+".")elsecall RS1(NJI,GetObjectName(1848656946)+" "+GetUnitName(R7I)+".")endifendifendifif LK thenif B3 thencall P01(P61)elsecall P01(NJI)endifendifif(Q80 or UM)and LK thencall P01(NJI)endifcall P31(NJI)if(GetUnitTypeId(R7I)==1160785973)thencall DisplayTimedTextToPlayer(NJI,0,U2,60.00," ")call DisplayTimedTextToPlayer(NJI,0,U2,60.00,"|c00ff0303"+GetObjectName(1848653384)+GetObjectName(1848656706)+" "+GetObjectName(1848653381)+"|r")elseif GetUnitTypeId(R7I)==1328558154 or GetUnitTypeId(R7I)==1311781174 or GetUnitTypeId(R7I)==1430468913 or GetUnitTypeId(R7I)==1162032181 thencall DisplayTimedTextToPlayer(NJI,0,U2,10.00," ")call DisplayTimedTextToPlayer(NJI,0,U2,10.00,"|c00ff0303"+GetObjectName(1848657715)+"|r")endifif(GetUnitTypeId(R7I)==1160786242)thencall DisplayTimedTextToPlayer(NJI,0,U2,30.00," ")call DisplayTimedTextToPlayer(NJI,0,U2,30.00,"|c00ff0303"+GetObjectName(1848653392)+" "+GetObjectName(1848653397)+"|r")endifif(S0[GetPlayerId(NJI)]==false)thenif(J2)thencall SetPlayerState(NJI,PLAYER_STATE_RESOURCE_GOLD,175+GetPlayerState(NJI,PLAYER_STATE_RESOURCE_GOLD))endifendifif HaveSavedBoolean(XY,600+GetUnitPointValue(R7I),87)==false thencall SaveBoolean(XY,(600+GetUnitPointValue(R7I)),(87),(true))call V01(R7I)endifset CK=R7Icall ExecuteFunc("P71")if RA0[GetPlayerId(GetLocalPlayer())]==false thencall SetPlayerName(NJI,(D30[GetPlayerId((NJI))])+" ("+MNI(K1[GetPlayerId(NJI)])+")")endifcall RemoveRegion(r)endfunctionfunction P91 takes nothing returns booleanreturn IsUnitType(GetSoldUnit(),UNIT_TYPE_HERO)==trueendfunctionfunction PA1 takes nothing returns nothinglocal unit N0I=GetSoldUnit()local player NJI=GetOwningPlayer(N0I)call S0I(NJI)endfunctionfunction PC1 takes nothing returns booleanlocal integer SXI=1if R0 thenset SXI=2endifcall SetPlayerState(BO[1],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(BO[1],PLAYER_STATE_RESOURCE_GOLD)+SXI)call SetPlayerState(BO[2],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(BO[2],PLAYER_STATE_RESOURCE_GOLD)+SXI)call SetPlayerState(BO[3],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(BO[3],PLAYER_STATE_RESOURCE_GOLD)+SXI)call SetPlayerState(BO[4],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(BO[4],PLAYER_STATE_RESOURCE_GOLD)+SXI)call SetPlayerState(BO[5],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(BO[5],PLAYER_STATE_RESOURCE_GOLD)+SXI)call SetPlayerState(CO[1],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(CO[1],PLAYER_STATE_RESOURCE_GOLD)+SXI)call SetPlayerState(CO[2],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(CO[2],PLAYER_STATE_RESOURCE_GOLD)+SXI)call SetPlayerState(CO[3],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(CO[3],PLAYER_STATE_RESOURCE_GOLD)+SXI)call SetPlayerState(CO[4],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(CO[4],PLAYER_STATE_RESOURCE_GOLD)+SXI)call SetPlayerState(CO[5],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(CO[5],PLAYER_STATE_RESOURCE_GOLD)+SXI)return falseendfunctionfunction PE1 takes nothing returns nothinglocal integer P1I=R2I(TimerGetElapsed(M)-N)local integer A41=P1I/60-1/2local integer A51=ModuloInteger(P1I,60)if IL thencall A31(A41,A51,false)elseif QK==false thenset P1I=R2I(16-TimerGetElapsed(M))set A41=P1I/60-1/2set A51=ModuloInteger(P1I,60)call A31(A41,A51,true)endifendfunctionfunction PG1 takes nothing returns booleanif IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==true and(LoadInteger(EH0,(GetSpellAbilityId()),(GetUnitAbilityLevel(GetTriggerUnit(),GetSpellAbilityId()))))>0 thencall TimerStart(EZ0[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))],(LoadInteger(EH0,(GetSpellAbilityId()),(GetUnitAbilityLevel(GetTriggerUnit(),GetSpellAbilityId())))),false,null)endifif GetSpellAbilityId()==1093677655 thencall TimerStart(EZ0[GetPlayerId((GetOwningPlayer(GetTriggerUnit())))],0,false,null)endifreturn falseendfunctionfunction PH1 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer icall Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function PG1))set i=0loopexitwhen(i>13)set EZ0[i]=CreateTimer()set i=i+1endloopset EH0=InitHashtable()call SaveInteger(EH0,(1093742923),(1),(60))call SaveInteger(EH0,(1093742923),(2),(50))call SaveInteger(EH0,(1093742923),(3),(40))call SaveInteger(EH0,(1093685042),(1),(80))call SaveInteger(EH0,(1093685042),(2),(75))call SaveInteger(EH0,(1093685042),(3),(70))call SaveInteger(EH0,(1093810233),(1),(45))call SaveInteger(EH0,(1093810233),(2),(45))call SaveInteger(EH0,(1093810233),(3),(45))call SaveInteger(EH0,(1093682248),(1),(150))call SaveInteger(EH0,(1093682248),(2),(130))call SaveInteger(EH0,(1093682248),(3),(110))call SaveInteger(EH0,(1093750594),(1),(150))call SaveInteger(EH0,(1093750594),(2),(130))call SaveInteger(EH0,(1093750594),(3),(110))call SaveInteger(EH0,(1093682514),(1),(150))call SaveInteger(EH0,(1093682514),(2),(150))call SaveInteger(EH0,(1093682514),(3),(150))call SaveInteger(EH0,(1093817144),(1),(150))call SaveInteger(EH0,(1093817144),(2),(150))call SaveInteger(EH0,(1093817144),(3),(150))call SaveInteger(EH0,(1093684561),(1),(140))call SaveInteger(EH0,(1093684561),(2),(120))call SaveInteger(EH0,(1093684561),(3),(100))call SaveInteger(EH0,(1093747254),(1),(140))call SaveInteger(EH0,(1093747254),(2),(120))call SaveInteger(EH0,(1093747254),(3),(100))call SaveInteger(EH0,(1093752648),(1),(80))call SaveInteger(EH0,(1093752648),(2),(80))call SaveInteger(EH0,(1093752648),(3),(80))call SaveInteger(EH0,(1093746993),(1),(100))call SaveInteger(EH0,(1093746993),(2),(100))call SaveInteger(EH0,(1093746993),(3),(100))call SaveInteger(EH0,(1093678938),(1),(70))call SaveInteger(EH0,(1093678938),(2),(70))call SaveInteger(EH0,(1093678938),(3),(70))call SaveInteger(EH0,(1095656306),(1),(45))call SaveInteger(EH0,(1095656306),(2),(45))call SaveInteger(EH0,(1095656306),(3),(45))call SaveInteger(EH0,(1093687864),(1),(70))call SaveInteger(EH0,(1093687864),(2),(55))call SaveInteger(EH0,(1093687864),(3),(40))call SaveInteger(EH0,(1093747542),(1),(12))call SaveInteger(EH0,(1093747542),(2),(12))call SaveInteger(EH0,(1093747542),(3),(12))call SaveInteger(EH0,(1093677895),(1),(115))call SaveInteger(EH0,(1093677895),(2),(115))call SaveInteger(EH0,(1093677895),(3),(115))call SaveInteger(EH0,(1093810508),(1),(120))call SaveInteger(EH0,(1093810508),(2),(110))call SaveInteger(EH0,(1093810508),(3),(100))call SaveInteger(EH0,(1093685586),(1),(45))call SaveInteger(EH0,(1093685586),(2),(30))call SaveInteger(EH0,(1093685586),(3),(15))call SaveInteger(EH0,(1093747251),(1),(4))call SaveInteger(EH0,(1093747251),(2),(4))call SaveInteger(EH0,(1093747251),(3),(4))call SaveInteger(EH0,(1093678674),(1),(140))call SaveInteger(EH0,(1093678674),(2),(120))call SaveInteger(EH0,(1093678674),(3),(100))call SaveInteger(EH0,(1093747252),(1),(120))call SaveInteger(EH0,(1093747252),(2),(100))call SaveInteger(EH0,(1093747252),(3),(80))call SaveInteger(EH0,(1093682996),(1),(80))call SaveInteger(EH0,(1093682996),(2),(70))call SaveInteger(EH0,(1093682996),(3),(60))call SaveInteger(EH0,(1093747768),(1),(20))call SaveInteger(EH0,(1093747768),(2),(20))call SaveInteger(EH0,(1093747768),(3),(20))call SaveInteger(EH0,(1093810505),(1),(150))call SaveInteger(EH0,(1093810505),(2),(150))call SaveInteger(EH0,(1093810505),(3),(150))call SaveInteger(EH0,(1093682482),(1),(75))call SaveInteger(EH0,(1093682482),(2),(65))call SaveInteger(EH0,(1093682482),(3),(55))call SaveInteger(EH0,(1093750098),(1),(6))call SaveInteger(EH0,(1093750098),(2),(6))call SaveInteger(EH0,(1093750098),(3),(6))call SaveInteger(EH0,(1093677903),(1),(140))call SaveInteger(EH0,(1093677903),(2),(140))call SaveInteger(EH0,(1093677903),(3),(140))call SaveInteger(EH0,(1093685847),(1),(20))call SaveInteger(EH0,(1093685847),(2),(20))call SaveInteger(EH0,(1093685847),(3),(20))call SaveInteger(EH0,(1093684565),(1),(100))call SaveInteger(EH0,(1093684565),(2),(100))call SaveInteger(EH0,(1093684565),(3),(100))call SaveInteger(EH0,(1093681458),(1),(100))call SaveInteger(EH0,(1093681458),(2),(100))call SaveInteger(EH0,(1093681458),(3),(100))call SaveInteger(EH0,(1093686103),(1),(100))call SaveInteger(EH0,(1093686103),(2),(100))call SaveInteger(EH0,(1093686103),(3),(100))call SaveInteger(EH0,(1093679411),(1),(100))call SaveInteger(EH0,(1093679411),(2),(70))call SaveInteger(EH0,(1093679411),(3),(40))call SaveInteger(EH0,(1093677899),(1),(180))call SaveInteger(EH0,(1093677899),(2),(150))call SaveInteger(EH0,(1093677899),(3),(120))call SaveInteger(EH0,(1093747248),(1),(180))call SaveInteger(EH0,(1093747248),(2),(150))call SaveInteger(EH0,(1093747248),(3),(120))call SaveInteger(EH0,(1093685808),(1),(130))call SaveInteger(EH0,(1093685808),(2),(130))call SaveInteger(EH0,(1093685808),(3),(130))call SaveInteger(EH0,(1093682764),(1),(30))call SaveInteger(EH0,(1093682764),(2),(30))call SaveInteger(EH0,(1093682764),(3),(30))call SaveInteger(EH0,(1093747544),(1),(30))call SaveInteger(EH0,(1093747544),(2),(30))call SaveInteger(EH0,(1093747544),(3),(30))call SaveInteger(EH0,(1093677876),(1),(10))call SaveInteger(EH0,(1093677876),(2),(10))call SaveInteger(EH0,(1093677876),(3),(10))call SaveInteger(EH0,(1093743946),(1),(75))call SaveInteger(EH0,(1093743946),(2),(75))call SaveInteger(EH0,(1093743946),(3),(75))call SaveInteger(EH0,(1093818181),(1),(70))call SaveInteger(EH0,(1093818181),(2),(70))call SaveInteger(EH0,(1093818181),(3),(70))call SaveInteger(EH0,(1093678160),(1),(20))call SaveInteger(EH0,(1093678160),(2),(15))call SaveInteger(EH0,(1093678160),(3),(10))call SaveInteger(EH0,(1093684529),(1),(130))call SaveInteger(EH0,(1093684529),(2),(120))call SaveInteger(EH0,(1093684529),(3),(110))call SaveInteger(EH0,(1093747032),(1),(70))call SaveInteger(EH0,(1093747032),(2),(70))call SaveInteger(EH0,(1093747032),(3),(70))call SaveInteger(EH0,(1093678388),(1),(160))call SaveInteger(EH0,(1093678388),(2),(150))call SaveInteger(EH0,(1093678388),(3),(140))call SaveInteger(EH0,(1093677141),(1),(160))call SaveInteger(EH0,(1093677141),(2),(150))call SaveInteger(EH0,(1093677141),(3),(140))call SaveInteger(EH0,(1093683000),(1),(80))call SaveInteger(EH0,(1093683000),(2),(80))call SaveInteger(EH0,(1093683000),(3),(80))call SaveInteger(EH0,(1093678933),(1),(180))call SaveInteger(EH0,(1093678933),(2),(120))call SaveInteger(EH0,(1093678933),(3),(60))call SaveInteger(EH0,(1093684053),(1),(140))call SaveInteger(EH0,(1093684053),(2),(120))call SaveInteger(EH0,(1093684053),(3),(100))call SaveInteger(EH0,(1093748042),(1),(30))call SaveInteger(EH0,(1093748042),(2),(30))call SaveInteger(EH0,(1093748042),(3),(30))call SaveInteger(EH0,(1093681716),(1),(10))call SaveInteger(EH0,(1093681716),(2),(7))call SaveInteger(EH0,(1093681716),(3),(5))call SaveInteger(EH0,(1093749070),(1),(60))call SaveInteger(EH0,(1093749070),(2),(60))call SaveInteger(EH0,(1093749070),(3),(60))call SaveInteger(EH0,(1093683761),(1),(120))call SaveInteger(EH0,(1093683761),(2),(100))call SaveInteger(EH0,(1093683761),(3),(80))call SaveInteger(EH0,(1093747767),(1),(60))call SaveInteger(EH0,(1093747767),(2),(60))call SaveInteger(EH0,(1093747767),(3),(60))call SaveInteger(EH0,(1093750089),(1),(40))call SaveInteger(EH0,(1093750089),(2),(40))call SaveInteger(EH0,(1093750089),(3),(40))call SaveInteger(EH0,(1093816645),(1),(40))call SaveInteger(EH0,(1093816645),(2),(40))call SaveInteger(EH0,(1093816645),(3),(40))call SaveInteger(EH0,(1093747023),(1),(80))call SaveInteger(EH0,(1093747023),(2),(70))call SaveInteger(EH0,(1093747023),(3),(60))call SaveInteger(EH0,(1093752150),(1),(80))call SaveInteger(EH0,(1093752150),(2),(70))call SaveInteger(EH0,(1093752150),(3),(60))call SaveInteger(EH0,(1093750341),(1),(180))call SaveInteger(EH0,(1093750341),(2),(160))call SaveInteger(EH0,(1093750341),(3),(140))call SaveInteger(EH0,(1093814599),(1),(180))call SaveInteger(EH0,(1093814599),(2),(160))call SaveInteger(EH0,(1093814599),(3),(140))call SaveInteger(EH0,(1093747028),(1),(90))call SaveInteger(EH0,(1093747028),(2),(90))call SaveInteger(EH0,(1093747028),(3),(90))call SaveInteger(EH0,(1093685840),(1),(11))call SaveInteger(EH0,(1093685840),(2),(9))call SaveInteger(EH0,(1093685840),(3),(7))call SaveInteger(EH0,(1093684291),(1),(25))call SaveInteger(EH0,(1093684291),(2),(25))call SaveInteger(EH0,(1093684291),(3),(25))call SaveInteger(EH0,(1093683534),(1),(45))call SaveInteger(EH0,(1093683534),(2),(45))call SaveInteger(EH0,(1093683534),(3),(45))call SaveInteger(EH0,(1093747031),(1),(10))call SaveInteger(EH0,(1093747031),(2),(10))call SaveInteger(EH0,(1093747031),(3),(10))call SaveInteger(EH0,(1093684296),(1),(70))call SaveInteger(EH0,(1093684296),(2),(60))call SaveInteger(EH0,(1093684296),(3),(50))call SaveInteger(EH0,(1093678161),(1),(45))call SaveInteger(EH0,(1093678161),(2),(40))call SaveInteger(EH0,(1093678161),(3),(35))call SaveInteger(EH0,(1093687121),(1),(45))call SaveInteger(EH0,(1093687121),(2),(45))call SaveInteger(EH0,(1093687121),(3),(45))call SaveInteger(EH0,(1093679445),(1),(70))call SaveInteger(EH0,(1093679445),(2),(60))call SaveInteger(EH0,(1093679445),(3),(50))call SaveInteger(EH0,(1093682004),(1),(60))call SaveInteger(EH0,(1093682004),(2),(50))call SaveInteger(EH0,(1093682004),(3),(40))call SaveInteger(EH0,(1093810506),(1),(120))call SaveInteger(EH0,(1093810506),(2),(110))call SaveInteger(EH0,(1093810506),(3),(100))call SaveInteger(EH0,(1093678929),(1),(120))call SaveInteger(EH0,(1093678929),(2),(80))call SaveInteger(EH0,(1093678929),(3),(40))call SaveInteger(EH0,(1093683257),(1),(120))call SaveInteger(EH0,(1093683257),(2),(120))call SaveInteger(EH0,(1093683257),(3),(120))call SaveInteger(EH0,(1093677363),(1),(140))call SaveInteger(EH0,(1093677363),(2),(120))call SaveInteger(EH0,(1093677363),(3),(100))call SaveInteger(EH0,(1093681462),(1),(140))call SaveInteger(EH0,(1093681462),(2),(120))call SaveInteger(EH0,(1093681462),(3),(60))call SaveInteger(EH0,(1093679152),(1),(80))call SaveInteger(EH0,(1093679152),(2),(50))call SaveInteger(EH0,(1093679152),(3),(30))call SaveInteger(EH0,(1093677906),(1),(150))call SaveInteger(EH0,(1093677906),(2),(120))call SaveInteger(EH0,(1093677906),(3),(90))call SaveInteger(EH0,(1093681494),(1),(150))call SaveInteger(EH0,(1093681494),(2),(120))call SaveInteger(EH0,(1093681494),(3),(90))call SaveInteger(EH0,(1093686072),(1),(85))call SaveInteger(EH0,(1093686072),(2),(85))call SaveInteger(EH0,(1093686072),(3),(85))call SaveInteger(EH0,(1093751120),(1),(85))call SaveInteger(EH0,(1093751120),(2),(85))call SaveInteger(EH0,(1093751120),(3),(85))call SaveInteger(EH0,(1093684308),(1),(160))call SaveInteger(EH0,(1093684308),(2),(140))call SaveInteger(EH0,(1093684308),(3),(120))call SaveInteger(EH0,(1093747539),(1),(30))call SaveInteger(EH0,(1093747539),(2),(30))call SaveInteger(EH0,(1093747539),(3),(30))call SaveInteger(EH0,(1093742932),(1),(80))call SaveInteger(EH0,(1093742932),(2),(70))call SaveInteger(EH0,(1093742932),(3),(60))call SaveInteger(EH0,(1093752632),(1),(90))call SaveInteger(EH0,(1093752632),(2),(75))call SaveInteger(EH0,(1093752632),(3),(60))call SaveInteger(EH0,(1093752633),(1),(90))call SaveInteger(EH0,(1093752633),(2),(75))call SaveInteger(EH0,(1093752633),(3),(60))call SaveInteger(EH0,(1093810503),(1),(90))call SaveInteger(EH0,(1093810503),(2),(90))call SaveInteger(EH0,(1093810503),(3),(90))call SaveInteger(EH0,(1093810504),(1),(90))call SaveInteger(EH0,(1093810504),(2),(90))call SaveInteger(EH0,(1093810504),(3),(90))call SaveInteger(EH0,(1093684275),(1),(130))call SaveInteger(EH0,(1093684275),(2),(130))call SaveInteger(EH0,(1093684275),(3),(130))call SaveInteger(EH0,(1093816643),(1),(130))call SaveInteger(EH0,(1093816643),(2),(130))call SaveInteger(EH0,(1093816643),(3),(130))call SaveInteger(EH0,(1093677392),(1),(70))call SaveInteger(EH0,(1093677392),(2),(60))call SaveInteger(EH0,(1093677392),(3),(50))call SaveInteger(EH0,(1093679450),(1),(70))call SaveInteger(EH0,(1093679450),(2),(60))call SaveInteger(EH0,(1093679450),(3),(50))call SaveInteger(EH0,(1093743184),(1),(60))call SaveInteger(EH0,(1093743184),(2),(60))call SaveInteger(EH0,(1093743184),(3),(60))call SaveInteger(EH0,(1093747766),(1),(15))call SaveInteger(EH0,(1093747766),(2),(15))call SaveInteger(EH0,(1093747766),(3),(15))call SaveInteger(EH0,(1093744975),(1),(90))call SaveInteger(EH0,(1093744975),(2),(70))call SaveInteger(EH0,(1093744975),(3),(50))call SaveInteger(EH0,(1093681483),(1),(10))call SaveInteger(EH0,(1093681483),(2),(10))call SaveInteger(EH0,(1093681483),(3),(10))call SaveInteger(EH0,(1093748313),(1),(10))call SaveInteger(EH0,(1093748313),(2),(10))call SaveInteger(EH0,(1093748313),(3),(10))call SaveInteger(EH0,(1093686854),(1),(22))call SaveInteger(EH0,(1093686854),(2),(17))call SaveInteger(EH0,(1093686854),(3),(12))call SaveInteger(EH0,(1093686854),(4),(5))call SaveInteger(EH0,(1093747253),(1),(16))call SaveInteger(EH0,(1093747253),(2),(8))call SaveInteger(EH0,(1093747253),(3),(4))call SaveInteger(EH0,(1093747253),(4),(2))call SaveInteger(EH0,(1093678923),(1),(6))call SaveInteger(EH0,(1093678923),(2),(6))call SaveInteger(EH0,(1093678923),(3),(6))call SaveInteger(EH0,(1093742673),(1),(40))call SaveInteger(EH0,(1093742673),(2),(40))call SaveInteger(EH0,(1093742673),(3),(40))call SaveInteger(EH0,(1093747778),(1),(40))call SaveInteger(EH0,(1093747778),(2),(40))call SaveInteger(EH0,(1093747778),(3),(40))call SaveInteger(EH0,(1093677128),(1),(110))call SaveInteger(EH0,(1093677128),(2),(110))call SaveInteger(EH0,(1093677128),(3),(110))call SaveInteger(EH0,(1093681457),(1),(110))call SaveInteger(EH0,(1093681457),(2),(110))call SaveInteger(EH0,(1093681457),(3),(110))call SaveInteger(EH0,(1093685045),(1),(60))call SaveInteger(EH0,(1093685045),(2),(60))call SaveInteger(EH0,(1093685045),(3),(60))call SaveInteger(EH0,(1093747249),(1),(60))call SaveInteger(EH0,(1093747249),(2),(60))call SaveInteger(EH0,(1093747249),(3),(60))call SaveInteger(EH0,(1093684820),(1),(80))call SaveInteger(EH0,(1093684820),(2),(80))call SaveInteger(EH0,(1093684820),(3),(80))call SaveInteger(EH0,(1093684824),(1),(80))call SaveInteger(EH0,(1093684824),(2),(80))call SaveInteger(EH0,(1093684824),(3),(80))call SaveInteger(EH0,(1093677649),(1),(100))call SaveInteger(EH0,(1093677649),(2),(100))call SaveInteger(EH0,(1093677649),(3),(100))call SaveInteger(EH0,(1093747769),(1),(100))call SaveInteger(EH0,(1093747769),(2),(100))call SaveInteger(EH0,(1093747769),(3),(100))call SaveInteger(EH0,(1093685579),(1),(100))call SaveInteger(EH0,(1093685579),(2),(100))call SaveInteger(EH0,(1093685579),(3),(100))call SaveInteger(EH0,(1093678899),(1),(115))call SaveInteger(EH0,(1093678899),(2),(115))call SaveInteger(EH0,(1093678899),(3),(115))call SaveInteger(EH0,(1093677898),(1),(115))call SaveInteger(EH0,(1093677898),(2),(115))call SaveInteger(EH0,(1093677898),(3),(115))call SaveInteger(EH0,(1093678154),(1),(115))call SaveInteger(EH0,(1093678154),(2),(115))call SaveInteger(EH0,(1093678154),(3),(115))call SaveInteger(EH0,(1093678157),(1),(115))call SaveInteger(EH0,(1093678157),(2),(115))call SaveInteger(EH0,(1093678157),(3),(115))call SaveInteger(EH0,(1093678158),(1),(115))call SaveInteger(EH0,(1093678158),(2),(115))call SaveInteger(EH0,(1093678158),(3),(115))call SaveInteger(EH0,(1093679413),(1),(160))call SaveInteger(EH0,(1093679413),(2),(100))call SaveInteger(EH0,(1093679413),(3),(40))call SaveInteger(EH0,(1093679447),(1),(100))call SaveInteger(EH0,(1093679447),(2),(60))call SaveInteger(EH0,(1093679447),(3),(20))call SaveInteger(EH0,(1093747288),(1),(200))call SaveInteger(EH0,(1093747288),(2),(190))call SaveInteger(EH0,(1093747288),(3),(180))call SaveInteger(EH0,(1093678420),(1),(145))call SaveInteger(EH0,(1093678420),(2),(115))call SaveInteger(EH0,(1093678420),(3),(60))call SaveInteger(EH0,(1093679176),(1),(145))call SaveInteger(EH0,(1093679176),(2),(115))call SaveInteger(EH0,(1093679176),(3),(60))call SaveInteger(EH0,(1093678647),(1),(100))call SaveInteger(EH0,(1093678647),(2),(85))call SaveInteger(EH0,(1093678647),(3),(70))call SaveInteger(EH0,(1093679184),(1),(70))call SaveInteger(EH0,(1093679184),(2),(70))call SaveInteger(EH0,(1093679184),(3),(70))call SaveInteger(EH0,(1093681987),(1),(22))call SaveInteger(EH0,(1093681987),(2),(22))call SaveInteger(EH0,(1093681987),(3),(22))call SaveInteger(EH0,(1093685067),(1),(160))call SaveInteger(EH0,(1093685067),(2),(160))call SaveInteger(EH0,(1093685067),(3),(160))call SaveInteger(EH0,(1093752407),(1),(160))call SaveInteger(EH0,(1093752407),(2),(160))call SaveInteger(EH0,(1093752407),(3),(160))call SaveInteger(EH0,(1093810258),(1),(135))call SaveInteger(EH0,(1093810258),(2),(135))call SaveInteger(EH0,(1093810258),(3),(135))call SaveInteger(EH0,(1093810259),(1),(40))call SaveInteger(EH0,(1093810259),(2),(40))call SaveInteger(EH0,(1093810259),(3),(40))call SaveInteger(EH0,(1395667000),(1),(165))call SaveInteger(EH0,(1395667000),(2),(165))call SaveInteger(EH0,(1395667000),(3),(165))call SaveInteger(EH0,(1395667029),(1),(165))call SaveInteger(EH0,(1395667029),(2),(165))call SaveInteger(EH0,(1395667029),(3),(165))call SaveInteger(EH0,(1093751874),(1),(90))call SaveInteger(EH0,(1093751874),(2),(75))call SaveInteger(EH0,(1093751874),(3),(60))call SaveInteger(EH0,(1093752118),(1),(85))call SaveInteger(EH0,(1093752118),(2),(85))call SaveInteger(EH0,(1093752118),(3),(85))call SaveInteger(EH0,(1093817912),(1),(85))call SaveInteger(EH0,(1093817912),(2),(85))call SaveInteger(EH0,(1093817912),(3),(85))call SaveInteger(EH0,(1093751861),(1),(55))call SaveInteger(EH0,(1093751861),(2),(50))call SaveInteger(EH0,(1093751861),(3),(45))call SaveInteger(EH0,(1093808949),(1),(55))call SaveInteger(EH0,(1093808949),(2),(50))call SaveInteger(EH0,(1093808949),(3),(45))call SaveInteger(EH0,(1093751617),(1),(50))call SaveInteger(EH0,(1093751617),(2),(50))call SaveInteger(EH0,(1093751617),(3),(50))call SaveInteger(EH0,(1093751371),(1),(110))call SaveInteger(EH0,(1093751371),(2),(110))call SaveInteger(EH0,(1093751371),(3),(110))call SaveInteger(EH0,(1093753169),(1),(25))call SaveInteger(EH0,(1093753169),(2),(20))call SaveInteger(EH0,(1093753169),(3),(15))call SaveInteger(EH0,(1093809992),(1),(20))call SaveInteger(EH0,(1093809992),(2),(18))call SaveInteger(EH0,(1093809992),(3),(16))call SaveInteger(EH0,(1093817913),(1),(5))call SaveInteger(EH0,(1093817913),(2),(5))call SaveInteger(EH0,(1093817913),(3),(5))call SaveInteger(EH0,(1093812807),(1),(60))call SaveInteger(EH0,(1093812807),(2),(40))call SaveInteger(EH0,(1093812807),(3),(20))call SaveInteger(EH0,(1093813065),(1),(50))call SaveInteger(EH0,(1093813065),(2),(50))call SaveInteger(EH0,(1093813065),(3),(50))call SaveInteger(EH0,(1093813557),(1),(8))call SaveInteger(EH0,(1093813557),(2),(8))call SaveInteger(EH0,(1093813557),(3),(8))call SaveInteger(EH0,(1093815600),(1),(65))call SaveInteger(EH0,(1093815600),(2),(60))call SaveInteger(EH0,(1093815600),(3),(55))call SaveInteger(EH0,(1093687856),(1),(90))call SaveInteger(EH0,(1093687856),(2),(80))call SaveInteger(EH0,(1093687856),(3),(70))call SaveInteger(EH0,(1093816118),(1),(90))call SaveInteger(EH0,(1093816118),(2),(75))call SaveInteger(EH0,(1093816118),(3),(60))call SaveInteger(EH0,(1093817417),(1),(80))call SaveInteger(EH0,(1093817417),(2),(80))call SaveInteger(EH0,(1093817417),(3),(80))call SaveInteger(EH0,(1093817414),(1),(20))call SaveInteger(EH0,(1093817414),(2),(20))call SaveInteger(EH0,(1093817414),(3),(20))endfunctionfunction PZ1 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer id=(LoadInteger(XY,(MKI),(758)))set EV0[id]=GetPlayerState(Player(id),PLAYER_STATE_RESOURCE_GOLD)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullreturn falseendfunctionfunction PV1 takes nothing returns booleanlocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer id=GetPlayerId(GetOwningPlayer(GetTriggerUnit()))call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function PZ1))call SaveInteger(XY,(MKI),(758),(id))set t=nullreturn falseendfunctionfunction PW1 takes nothing returns booleanlocal player plocal integer ilocal integer idlocal integer PX1set i=1loopexitwhen i>5set p=BO[i]set id=GetPlayerId(p)set PX1=GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)if VS[id]<(TimerGetElapsed(M))thenset EV0[id]=PX1elseif PX1>EV0[id]thencall SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,EV0[id])elseset EV0[id]=PX1endifset p=CO[i]set id=GetPlayerId(p)set PX1=GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)if VS[id]<(TimerGetElapsed(M))thenset EV0[id]=PX1elseif PX1>EV0[id]thencall SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,EV0[id])elseset EV0[id]=PX1endifset i=i+1endloopreturn falseendfunctionfunction PY1 takes nothing returns booleanlocal player plocal integer ilocal integer idlocal integer PX1set i=1loopexitwhen i>5set p=BO[i]set id=GetPlayerId(p)set PX1=GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)if PX1<EW0[id]thenset EW0[id]=PX1endifset p=CO[i]set id=GetPlayerId(p)set PX1=GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)if PX1<EW0[id]thenset EW0[id]=PX1endifset i=i+1endloopreturn falseendfunctionfunction PL1 takes integer TLI,integer TMI returns booleanlocal integer i=EK0-1local real PM1=0local real MXI=(TimerGetElapsed(M))local integer MFI=0loopexitwhen i==EK0 or PM1>EL0 or MFI>200if i==0 thenset i=8000-1endifset MFI=MFI+1set PM1=MXI-EX0[i]if EY0[i]==TLI and EJ0[i]==TMI and PM1<EL0 thenset EY0[i]=0set EJ0[i]=0return trueendifset i=i-1endloopreturn falseendfunctionfunction PN1 takes integer TLI,integer TMI returns booleanlocal integer i=EK0-1local real PM1=0local real MXI=(TimerGetElapsed(M))local integer MFI=0loopexitwhen i==EK0 or PM1>EL0 or MFI>200if i==0 thenset i=8000-1endifset MFI=MFI+1set PM1=MXI-EX0[i]if EY0[i]==TLI and EJ0[i]==TMI and PM1<EL0 thenreturn trueendifset i=i-1endloopreturn falseendfunctionfunction PS1 takes nothing returns nothinglocal integer TLI=GetPlayerId(GetOwningPlayer(GetEventDamageSource()))local integer TMI=GetPlayerId(GetOwningPlayer(GetTriggerUnit()))local real TSI=GetEventDamage()set EX0[EK0]=(TimerGetElapsed(M))set EY0[EK0]=TLIset EJ0[EK0]=TMIset EK0=EK0+1if EK0==8000 thenset EK0=1endifendfunctionfunction PT1 takes unit IQ1,unit PR1 returns stringlocal integer i=1local integer PP1=GetPlayerId(GetOwningPlayer(IQ1))local integer PQ1=GetPlayerId(GetOwningPlayer(PR1))local integer USIlocal string PU1=" "+GetObjectName(1848658521)+" "local boolean Q01=falseloopexitwhen i>5if NZI(GetOwningPlayer(PR1))thenset USI=GetPlayerId(BO[i])elseset USI=GetPlayerId(CO[i])endifif PQ1!=USI and PL1(USI,PP1)thenset D[USI]=D[USI]+1call E71("Assist"+I2S(USI),PP1)if Q01 thenset PU1=PU1+"/"+C0[USI]+(D30[GetPlayerId((Player(USI)))])+"|r"elseset PU1=PU1+C0[USI]+(D30[GetPlayerId((Player(USI)))])+"|r"endifset Q01=trueendifset i=i+1endloopif Q01 thenreturn PU1endifreturn" "endfunctionfunction QI1 takes unit IQ1,unit PR1 returns stringlocal integer i=1local integer PP1=GetPlayerId(GetOwningPlayer(IQ1))local integer PQ1=GetPlayerId(GetOwningPlayer(PR1))local integer USIlocal string PU1=""local boolean Q01=falseloopexitwhen i>5if NZI(GetOwningPlayer(PR1))thenset USI=GetPlayerId(BO[i])elseset USI=GetPlayerId(CO[i])endifif PQ1!=USI and PN1(USI,PP1)thenif Q01 thenset PU1=PU1+"/"+C0[USI]+(D30[GetPlayerId((Player(USI)))])+"|r"elseset PU1=PU1+C0[USI]+(D30[GetPlayerId((Player(USI)))])+"|r"endifset Q01=trueendifset i=i+1endloopif Q01 thenreturn PU1endifreturn" "endfunctionfunction Q11 takes unit IQ1,unit PR1 returns integerlocal integer i=1local integer PP1=GetPlayerId(GetOwningPlayer(IQ1))local integer PQ1=GetPlayerId(GetOwningPlayer(PR1))local integer USIlocal integer MFI=0loopexitwhen i>5if NZI(GetOwningPlayer(PR1))thenset USI=GetPlayerId(BO[i])elseset USI=GetPlayerId(CO[i])endifif PQ1!=USI and PN1(USI,PP1)thenset MFI=MFI+1endifset i=i+1endloopreturn MFIendfunctionfunction QO1 takes unit IQ1,unit PR1 returns booleanlocal integer i=1local integer PP1=GetPlayerId(GetOwningPlayer(IQ1))local integer PQ1=GetPlayerId(GetOwningPlayer(PR1))local integer USIlocal string PU1=" Assists: "local boolean Q01=falselocal integer x=1set EM0[1]=nullset EM0[2]=nullset EM0[3]=nullset EM0[4]=nullset EM0[5]=nullloopexitwhen i>5if NZI(GetOwningPlayer(PR1))thenset USI=GetPlayerId(BO[i])elseset USI=GetPlayerId(CO[i])endifif PQ1!=USI and PN1(USI,PP1)thenset EM0[x]=Player(USI)set x=x+1set Q01=trueendifset i=i+1endloopreturn Q01endfunctionfunction Q21 takes unit IQ1,unit PR1,real SXI returns nothinglocal integer i=1local integer MFI=0call QO1(IQ1,PR1)loopexitwhen i>5if EM0[i]!=null thenset MFI=MFI+1endifset i=i+1endloopset i=1loopexitwhen i>5if EM0[i]!=null thenset EW0[GetPlayerId(EM0[i])]=EW0[GetPlayerId(EM0[i])]+R2I(SXI/MFI)set EV0[GetPlayerId(EM0[i])]=EV0[GetPlayerId(EM0[i])]+R2I(SXI/MFI)call IT1(EM0[i],R2I(SXI/MFI),K1[GetPlayerId(EM0[i])])endifset i=i+1endloopendfunctionfunction Q31 takes nothing returns nothingendfunctionfunction Q41 takes nothing returns nothinglocal integer id=GetUnitTypeId(GetTriggerUnit())if GetOwningPlayer(GetTriggerUnit())==DO thenset C[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=C[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1elseif(id==1969711215)thenif(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))thenset B[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=B[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1elseset A[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=A[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1endifelseif(id==1970169187)thenif(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))thenset B[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=B[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1elseset A[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=A[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1endifelseif(id==1702061422)thenif(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))thenset B[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=B[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1elseset A[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=A[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1endifelseif(id==1701081721)thenif(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))thenset B[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=B[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1elseset A[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=A[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1endifelseif(id==1966092337)thenif(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))thenset B[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=B[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1elseset A[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=A[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1endifelseif(id==1966092338)thenif(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))thenset B[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=B[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1elseset A[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=A[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1endifelseif(id==1697656918)thenif(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))thenset B[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=B[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1elseset A[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=A[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1endifelseif(id==1697656919)thenif(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))thenset B[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=B[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1elseset A[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=A[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1endifelseif(id==1700946284)thenif(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))thenset B[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=B[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1elseset A[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=A[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1endifelseif(id==1697657398)thenif(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))thenset B[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=B[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1elseset A[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=A[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1endifelseif(id==1970107511)thenif(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))thenset B[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=B[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1elseset A[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=A[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1endifelseif(id==1966092370)thenif(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))thenset B[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=B[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1elseset A[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=A[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1endifendifcall Q31()endfunctionfunction Q61 takes integer i returns nothinglocal integer x=1local integer y=1set EN0[i]=nullset ES0[i]=0set ET0[i]=falseloopexitwhen y>ER0if ES0[y]!=0 thenset EP0[x]=EN0[y]set EQ0[x]=ES0[y]set EU0[x]=ET0[y]set EN0[y]=nullset ES0[y]=0set ET0[y]=falseset x=x+1endifset y=y+1endloopset ER0=x-1set x=1loopexitwhen x>ER0set EN0[x]=EP0[x]set ES0[x]=EQ0[x]set ET0[x]=EU0[x]set x=x+1endloopendfunctionfunction Q71 takes unit IQ1 returns booleanreturn GetUnitTypeId(IQ1)==1211117641 or GetUnitTypeId(IQ1)==1211117642endfunctionfunction Q81 takes unit IQ1 returns booleanlocal integer MKI=GetHandleId(GetOwningPlayer(IQ1))local unit ZJ1=(LoadUnitHandle(XY,(MKI),(699)))local unit ZK1=(LoadUnitHandle(XY,(MKI),(700)))local unit ZL1=(LoadUnitHandle(XY,(MKI),(701)))local unit ZM1=(LoadUnitHandle(XY,(MKI),(702)))local unit ZN1=(LoadUnitHandle(XY,(MKI),(703)))if GetUnitAbilityLevel(ZJ1,1093685078)!=0 or GetUnitAbilityLevel(ZK1,1093685078)!=0 or GetUnitAbilityLevel(ZL1,1093685078)!=0 or GetUnitAbilityLevel(ZM1,1093685078)!=0 or GetUnitAbilityLevel(ZN1,1093685078)!=0 thenreturn trueendifreturn falseendfunctionfunction Q91 takes unit IQ1 returns booleanlocal integer i=0local integer MKI=GetHandleId(GetOwningPlayer(IQ1))local unit ZY1=(LoadUnitHandle(XY,(MKI),(699)))loopexitwhen i>5if GetItemTypeId(UnitItemInSlot(ZY1,i))==FK0[VG0]and GetItemCharges(UnitItemInSlot(ZY1,i))>0 thenreturn trueendifset i=i+1endloopreturn falseendfunctionfunction QA1 takes unit IQ1,location QB1 returns nothinglocal integer MKI=GetHandleId(GetOwningPlayer(IQ1))local unit ZJ1=(LoadUnitHandle(XY,(MKI),(699)))local unit ZK1=(LoadUnitHandle(XY,(MKI),(700)))local unit ZL1=(LoadUnitHandle(XY,(MKI),(701)))local unit ZM1=(LoadUnitHandle(XY,(MKI),(702)))local unit ZN1=(LoadUnitHandle(XY,(MKI),(703)))if ZJ1!=null thencall ReviveHeroLoc(ZJ1,QB1,true)call ZB1(ZJ1)endifif ZK1!=null thencall ReviveHeroLoc(ZK1,QB1,true)call ZB1(ZK1)endifif ZL1!=null thencall ReviveHeroLoc(ZL1,QB1,true)call ZB1(ZL1)endifif ZM1!=null thencall ReviveHeroLoc(ZM1,QB1,true)call ZB1(ZM1)endifif ZN1!=null thencall ReviveHeroLoc(ZN1,QB1,true)call ZB1(ZN1)endifendfunctionfunction CustomHeroRevive_GetTime takes nothing returns realreturn TimerGetElapsed(M)endfunctionfunction QC1 takes unit N0I,real F21,boolean QD1 returns nothingset ER0=ER0+1set EN0[ER0]=N0Iset ES0[ER0]=(TimerGetElapsed(M))+F21set ET0[ER0]=QD1endfunctionfunction QE1 takes integer i returns nothinglocal unit IQ1=EN0[i]local boolean QD1=ET0[i]local player QF1=GetOwningPlayer(IQ1)local location QB1if NWI(QF1)thenset QB1=GetRectCenter(S3)elseset QB1=GetRectCenter(O4)endifif Q2==false and QPI(IQ1)thencall ZF1(IQ1,QF1,GetLocationX(QB1),GetLocationY(QB1),true)if Q71(IQ1)==false or GetUnitAbilityLevel(IQ1,1093684567)==0 thencall ReviveHeroLoc(IQ1,QB1,true)elsecall QA1(IQ1,QB1)endifcall SetUnitState(IQ1,UNIT_STATE_MANA,GetUnitState(IQ1,UNIT_STATE_MAX_MANA))endifcall RemoveLocation(QB1)call Q61(i)set IQ1=nullset QF1=nullset QB1=nullendfunctionfunction QG1 takes nothing returns booleanlocal real MXI=(TimerGetElapsed(M))local integer iset i=1loopexitwhen i>ER0if ES0[i]<MXI and ES0[i]!=0 thencall QE1(i)endifif ES0[i]!=0 and QPI(EN0[i])==false thencall Q61(i)endifset i=i+1endloopreturn falseendfunctionfunction QZ1 takes unit IQ1,integer QV1 returns nothinglocal unit QW1=(LoadUnitHandle(XY,(GetHandleId(IQ1)),(788)))local integer QX1=(LoadInteger(XY,(GetHandleId(QW1)),(787)))call SaveInteger(XY,(GetHandleId(QW1)),(787),(IMaxBJ(QX1-QV1,0)))set QW1=nullendfunctionfunction QY1 takes unit QJ1,unit QK1 returns nothingif P8I(QJ1,QK1)>1300 or(QPI(QJ1)and GetUnitTypeId(QJ1)==1211117643)thenif IsPlayerAlly(GetOwningPlayer(QJ1),GetOwningPlayer(QK1))==false thencall AddHeroXP(QJ1,TFI(QK1),true)endifendifendfunctionfunction QL1 takes nothing returns nothingif DB1(GetEnumUnit(),FK0[WG0])!=null thencall SetItemCharges(DB1(GetEnumUnit(),FK0[WG0]),GetItemCharges(DB1(GetEnumUnit(),FK0[WG0]))+1)endifendfunctionfunction QM1 takes nothing returns booleanif(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitIllusion(GetFilterUnit())==false thenif IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(F00))and DB1(GetFilterUnit(),FK0[WG0])!=null thenreturn trueendifendifreturn falseendfunctionfunction QN1 takes nothing returns booleanlocal item ilocal integer D51if F10==0 and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitIllusion(GetFilterUnit())==false and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(FI0))thenif DB1(GetFilterUnit(),FK0[WQ0])!=null thenset F10=F10+1set D51=GetItemCharges(DB1(GetFilterUnit(),FK0[WQ0]))if D51==0 thenset D51=2elseset D51=D51+1endifcall SetItemCharges(DB1(GetFilterUnit(),FK0[WQ0]),D51)endifendifreturn falseendfunctionfunction AncientJangoo_FindNearbyHeroes takes nothing returns booleanlocal item ilocal integer D51if FO0==0 and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitIllusion(GetFilterUnit())==false and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(FI0))thenif DB1(GetFilterUnit(),FK0[HJ0])!=null thenset FO0=FO0+1set D51=GetItemCharges(DB1(GetFilterUnit(),FK0[HJ0]))set D51=IMinBJ(D51+1,5)call SetItemCharges(DB1(GetFilterUnit(),FK0[HJ0]),D51)endifendifreturn falseendfunctionfunction QS1 takes unit u,unit QT1 returns nothinglocal group g=MDI()set F00=ucall GroupEnumUnitsInRange(g,GetUnitX(u),GetUnitY(u),1625,Condition(function QM1))if IsUnitAlly(u,GetOwningPlayer(QT1))==false thencall GroupAddUnit(g,QT1)endifcall ForGroup(g,function QL1)call MCI(g)set g=nullendfunctionfunction QR1 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit QP1=(LoadUnitHandle(XY,(MKI),(335)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real xlocal real ylocal real aif GetTriggerEventId()==EVENT_WIDGET_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)if GetTriggerUnit()!=QP1 thencall KillUnit(QP1)endifelseset a=GetUnitFacing(TMI)*bj_RADTODEGset x=GetUnitX(TMI)+75set y=GetUnitY(TMI)+75call SetUnitX(QP1,x)call SetUnitY(QP1,y)call IssueTargetOrder(QP1,"attack",TMI)endifset t=nullset QP1=nullset TMI=nullreturn falseendfunctionfunction QQ1 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local unit QP1if GetSummoningUnit()==QHI thencall FlushChildHashtable(XY,(MKI))call MZI(t)set QP1=GetSummonedUnit()set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterDeathEvent(t,QP1)call TriggerRegisterDeathEvent(t,TMI)call TriggerRegisterTimerEvent(t,0.05,true)call TriggerAddCondition(t,Condition(function QR1))call SaveUnitHandle(XY,(MKI),(335),(QP1))call SaveUnitHandle(XY,(MKI),(17),(TMI))call UnitAddAbility(QP1,1097625443)call SetUnitPosition(QP1,GetUnitX(TMI)+100,GetUnitY(TMI)+100)call IssueTargetOrder(QP1,"attack",TMI)call SetUnitMoveSpeed(QP1,522)endifset t=nullset TMI=nullset TLI=nullset QHI=nullreturn falseendfunctionfunction QU1 takes unit TLI,unit QT1 returns nothinglocal unit TMI=QT1local unit QHIlocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)if T7I(TMI)thenset TMI=(K1[GetPlayerId(GetOwningPlayer((TMI)))])endifset QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call Q9I(t,EVENT_PLAYER_UNIT_SUMMON)call TriggerAddCondition(t,Condition(function QQ1))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(19),(QHI))call QTI(QHI,1093813559)call IssueTargetOrderById(QHI,852274,TMI)set t=nullset TMI=nullset QHI=nullendfunctionfunction UI1 takes nothing returns booleanif(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitIllusion(GetFilterUnit())==false thenif IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(F00))==false and DB1(GetFilterUnit(),FK0[HL0])!=null thenendifendifreturn falseendfunctionfunction U11 takes unit u returns nothinglocal group g=MDI()set F00=ucall GroupEnumUnitsInRange(g,GetUnitX(u),GetUnitY(u),1625,Condition(function UI1))call MCI(g)set g=nullendfunctionfunction UO1 takes unit u returns nothinglocal group g=MDI()set F10=0set FI0=ucall GroupEnumUnitsInRange(g,GetUnitX(u),GetUnitY(u),1425,Condition(function QN1))call MCI(g)set F10=0set g=nullendfunctionfunction U21 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer U31=(LoadInteger(XY,(MKI),(88)))local integer i=1local player plocal string LNIloopexitwhen i>5if U31==0 thenset p=BO[i]set LNI=C0[GetPlayerId(BO[0])]+GetObjectName(1848652622)+"|r "+GetObjectName(1848652624)+" "+C0[GetPlayerId(BO[0])]+GetObjectName(1848652625)+"|r"elseset p=CO[i]set LNI=C0[GetPlayerId(CO[0])]+GetObjectName(1848652623)+"|r "+GetObjectName(1848652624)+" "+C0[GetPlayerId(CO[0])]+GetObjectName(1848652625)+"|r"endifcall DisplayTimedTextToPlayer(p,0,0,10,LNI)call IF1(JD,p)set i=i+1endloopcall FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullreturn falseendfunctionfunction U41 takes integer U31 returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,1.5,false)call TriggerAddCondition(t,Condition(function U21))call SaveInteger(XY,(MKI),(88),(U31))set t=nullendfunctionfunction U51 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer U61=(LoadInteger(XY,(MKI),(89)))local string LNI=(LoadStr(XY,(MKI),(90)))if U61==1 thencall IE1(HC)elseif U61==2 thencall IE1(AE)elseif U61==3 thencall IE1(ME)elseif U61==4 thencall IE1(NE)endifcall PDI(P2,10.00,LNI)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullreturn falseendfunctionfunction U71 takes string LNI,integer U61 returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,1.5,false)call TriggerAddCondition(t,Condition(function U51))call SaveStr(XY,(MKI),(90),(LNI))call SaveInteger(XY,(MKI),(89),(U61))set t=nullendfunctionfunction U81 takes player IR1,integer IP1 returns nothinglocal integer SII=1local integer Z31if NZI(IR1)thenset Z31=NNI(OO)elseset Z31=NNI(AO)endifif NZI(IR1)thenloopexitwhen SII>5if NYI(BO[SII])thenset EW0[GetPlayerId(BO[SII])]=EW0[GetPlayerId(BO[SII])]+IP1/Z31set EV0[GetPlayerId(BO[SII])]=EV0[GetPlayerId(BO[SII])]+IP1/Z31call IT1(BO[SII],IP1/Z31,K1[GetPlayerId(BO[SII])])endifset SII=SII+1endloopelseloopexitwhen SII>5if NYI(CO[SII])thenset EW0[GetPlayerId(CO[SII])]=EW0[GetPlayerId(CO[SII])]+IP1/Z31set EV0[GetPlayerId(CO[SII])]=EV0[GetPlayerId(CO[SII])]+IP1/Z31call IT1(CO[SII],IP1/Z31,K1[GetPlayerId(CO[SII])])endifset SII=SII+1endloopendifendfunctionfunction U91 takes unit IQ1,integer QV1 returns nothinglocal player QF1=GetOwningPlayer(IQ1)call SetPlayerState(QF1,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(QF1,PLAYER_STATE_RESOURCE_GOLD)-QV1)endfunctionfunction UA1 takes nothing returns booleanif GetUnitTypeId(GetFilterUnit())==1865429043 thencall KillUnit(GetFilterUnit())return trueendifreturn falseendfunctionfunction UB1 takes nothing returns nothinglocal boolexpr PI1=Condition(function UA1)local group GK1=MDI()call GroupEnumUnitsInRect(GK1,bj_mapInitialPlayableArea,PI1)call MCI(GK1)endfunctionfunction UC1 takes player NVI returns booleanif NVI==DO thenreturn trueendifreturn falseendfunctionfunction UD1 takes nothing returns booleanif IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==true and GetUnitTypeId(GetTriggerUnit())!=1311788365 thenif GetUnitTypeId(GetTriggerUnit())==1211117642 and Q91(GetTriggerUnit())thenreturn falseendifreturn trueendifreturn falseendfunctionfunction UE1 takes player QF1,player IR1,unit PR1 returns booleanreturn PR1==null or GetKillingUnit()==null or(NZI(QF1)and NZI(IR1))or(NWI(QF1)and NWI(IR1))endfunctionfunction UF1 takes nothing returns nothingif HK1(GetUnitTypeId(GetEnumUnit()))==false thenset F60=F60+1if GetOwningPlayer(GetKillingUnit())!=GetOwningPlayer(GetEnumUnit())thenset F70=F70+1endifendifendfunctionfunction UG1 takes nothing returns nothingif(GetUnitTypeId((GetEnumUnit()))==1211117642)==false and HK1(GetUnitTypeId(GetFilterUnit()))==false thencall AddHeroXP(GetEnumUnit(),F30,true)set F40[GetPlayerId(GetOwningPlayer(GetEnumUnit()))]=F40[GetPlayerId(GetOwningPlayer(GetEnumUnit()))]+F30if GetOwningPlayer(GetKillingUnit())!=GetOwningPlayer(GetEnumUnit())thenset F50[GetPlayerId(GetOwningPlayer(GetEnumUnit()))]=F50[GetPlayerId(GetOwningPlayer(GetEnumUnit()))]+F20set EW0[GetPlayerId(GetOwningPlayer(GetEnumUnit()))]=EW0[GetPlayerId(GetOwningPlayer(GetEnumUnit()))]+F20set EV0[GetPlayerId(GetOwningPlayer(GetEnumUnit()))]=EV0[GetPlayerId(GetOwningPlayer(GetEnumUnit()))]+F20call IT1(GetOwningPlayer(GetEnumUnit()),F20,GetEnumUnit())endifendifendfunctionfunction UH1 takes nothing returns booleanlocal integer NGIlocal integer UZ1=0local integer UV1=0local group gif IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==true and IsUnitIllusion(GetTriggerUnit())==false and(GetUnitTypeId((GetTriggerUnit()))==1211117642)==false and HK1(GetUnitTypeId(GetTriggerUnit()))==false thenset NGI=GetHeroLevel(GetTriggerUnit())set F30=0set F20=0set g=MDI()set F60=0set F70=0call GroupEnumUnitsInRange(g,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),1300+25,Condition(function BH1))call ForGroup(g,function UF1)if F60==1 thenset UZ1=20*NGI+120elseif F60==2 thenset UZ1=15*NGI+90elseif F60==3 thenset UZ1=7*NGI+30elseif F60==4 thenset UZ1=5*NGI+20elseif F60==5 thenset UZ1=4*NGI+15endifif F70==1 thenset UV1=12*NGI+125elseif F70==2 thenset UV1=10*NGI+40elseif F70==3 thenset UV1=6*NGIelseif F70==4 thenset UV1=6*NGIelseif F70==5 thenset UV1=6*NGIendifif R0 thenendifset F30=UZ1set F20=UV1call ForGroup(g,function UG1)call MCI(g)set g=nullendifreturn falseendfunctionfunction UW1 takes nothing returns nothinglocal boolean UX1=falselocal unit IQ1=GetDyingUnit()local unit PR1=GetKillingUnit()local player IR1=GetOwningPlayer(PR1)local player QF1=GetOwningPlayer(IQ1)local location QB1local integer IP1=0local integer QV1=0local boolean UY1=falselocal string UJ1=""local string UK1=""local string UL1=""local string MidTextlocal integer xlocal string UM1local string UN1local string US1local string UT1local boolean QD1=falselocal real UR1=1local real UP1=1local real UQ1=1local real UU1=1local real I0O=0local real IIO=1local trigger tlocal integer I1Olocal integer IOOlocal integer idlocal integer I2O=GetPlayerState(QF1,PLAYER_STATE_RESOURCE_GOLD)local integer I3O=I2O-EW0[GetPlayerId(QF1)]local unit I4Olocal unit I5Olocal boolean I6O=((LoadInteger(XY,(GetHandleId((IQ1))),((4418))))==1)if IsPlayerAlly(IR1,QF1)==false and UC1(IR1)==false thencall UH1()endifif I6O thenset HS[GetPlayerId((QF1))]=trueendifif PR1==null and GetUnitTypeId(IQ1)==1315988077 thenset PR1=X9Iset IR1=GetOwningPlayer(PR1)endifif IsPlayerAlly(IR1,QF1)==true and((LoadInteger(XY,(GetHandleId((PR1))),((4328))))==1)==true and YQI!=null thenset PR1=YQIset IR1=GetOwningPlayer(PR1)endifif((LoadInteger(XY,(GetHandleId((IQ1))),((4333))))==1)thenset PR1=HZIset IR1=GetOwningPlayer(PR1)endifset IOO=Q11(IQ1,PR1)if PR1!=null thenset id=GetUnitTypeId(PR1)call QY1(K1[GetPlayerId(GetOwningPlayer(PR1))],IQ1)endifif UE1(QF1,IR1,PR1)==false and IOO==1 and NXI(IR1)==false and IR1!=DO thencall QO1(IQ1,PR1)set IR1=EM0[1]set PR1=K1[GetPlayerId(IR1)]endifif NZI(GetOwningPlayer(IQ1))thenif GetOwningPlayer(IQ1)!=BO[1]thenendifif GetOwningPlayer(IQ1)!=BO[2]thenendifif GetOwningPlayer(IQ1)!=BO[3]thenendifif GetOwningPlayer(IQ1)!=BO[4]thenendifif GetOwningPlayer(IQ1)!=BO[5]thenendifelseif GetOwningPlayer(IQ1)!=CO[1]thenendifif GetOwningPlayer(IQ1)!=CO[2]thenendifif GetOwningPlayer(IQ1)!=CO[3]thenendifif GetOwningPlayer(IQ1)!=CO[4]thenendifif GetOwningPlayer(IQ1)!=CO[5]thenendifendifset DJ[GetPlayerId(GetOwningPlayer((IQ1)))]=trueif GetUnitAbilityLevel(IQ1,1093685078)!=0 or(Q71(IQ1)and Q81(IQ1))thenset QD1=truecall UnitRemoveAbility(IQ1,1093685078)set XO=IQ1set A2=PR1if IsUnitType(PR1,UNIT_TYPE_STRUCTURE)==false thenendifendifif IR1==null thenset IR1=QF1endifif L0 and GetUnitTypeId(IQ1)!=1211117642 thenset K2=UnitRemoveItemFromSlot(IQ1,GetRandomInt(0,5))if GetItemTypeId(K2)==1227894859 thencall CreateItem(1227894855,GetItemX(K2),GetItemY(K2))call RemoveItem(K2)endifendifif NZI(QF1)thenif NZI(IR1)thenset UX1=trueif(IR1==QF1)thencall PDI(P2,10.00,(C0[GetPlayerId(QF1)]+(D30[GetPlayerId((QF1))])+"|r "+GetObjectName(1848652626)))elsecall PDI(P2,10.00,EH1(QF1,IR1))endifelseif NWI(IR1)thenset UY1=trueset O[GetPlayerId(BO[0])]=O[GetPlayerId(BO[0])]+1set I[GetPlayerId(CO[0])]=I[GetPlayerId(CO[0])]+1set I0[2]=I0[2]+1set I0[1]=0if IR1!=CO[0]thenset I[GetPlayerId(IR1)]=I[GetPlayerId(IR1)]+1set P[GetPlayerId(IR1)]=P[GetPlayerId(IR1)]+1endifendifendifif NWI(QF1)thenif NWI(IR1)thenset UX1=trueif(IR1==QF1)thencall PDI(P2,10.00,(C0[GetPlayerId(QF1)]+(D30[GetPlayerId((QF1))])+"|r "+GetObjectName(1848652626)))elsecall PDI(P2,10.00,EH1(QF1,IR1))endifelseif NZI(IR1)thenset UY1=trueset O[GetPlayerId(CO[0])]=O[GetPlayerId(CO[0])]+1set I[GetPlayerId(BO[0])]=I[GetPlayerId(BO[0])]+1set I0[1]=I0[1]+1set I0[2]=0if IR1!=BO[0]thenset I[GetPlayerId(IR1)]=I[GetPlayerId(IR1)]+1set P[GetPlayerId(IR1)]=P[GetPlayerId(IR1)]+1endifendifendifif IR1==DO thenset UY1=falseif GetUnitTypeId(PR1)==1848651852 thencall PDI(P2,10.00,(C0[GetPlayerId(QF1)]+(D30[GetPlayerId((QF1))])+"|r "+GetObjectName(1848652628)))elsecall PDI(P2,10.00,(C0[GetPlayerId(QF1)]+(D30[GetPlayerId((QF1))])+"|r "+GetObjectName(1848652629)))endifset UX1=trueendifif FN thencall QWI(WC,GetUnitX(IQ1),GetUnitY(IQ1))endifcall E71("Hero"+I2S(GetPlayerId(QF1)),GetPlayerId(IR1))set x=P[GetPlayerId(QF1)]if x>2 and UX1==false thenif x==3 thenset IP1=125set UJ1="|c0000ff40"+GetObjectName(1848652876)+"|r"elseif x==4 thenset IP1=250set UJ1="|c00400080"+GetObjectName(1848652878)+"|r"elseif x==5 thenset IP1=375set UJ1="|c00ff0080"+GetObjectName(1848652877)+"|r"elseif x==6 thenset IP1=500set UJ1="|c00ff8000"+GetObjectName(1848652874)+"|r"elseif x==7 thenset IP1=625set UJ1="|c00808000"+GetObjectName(1848652873)+"|r"elseif x==8 thenset IP1=750set UJ1="|c00ff80ff"+GetObjectName(1848652630)+"|r"elseif x==9 thenset IP1=875set UJ1="|c00ff0000"+GetObjectName(1848652631)+"|r"elseset IP1=1000set UJ1="|c00ff8000"+GetObjectName(1848652632)+"|r"endifendifset x=P[GetPlayerId(IR1)]if x>H[GetPlayerId(IR1)]thenset H[GetPlayerId(IR1)]=xendifset I4O=PR1if IsUnitType(I4O,UNIT_TYPE_HERO)==false thenset I4O=K1[GetPlayerId(GetOwningPlayer(I4O))]endifif x>2 and GetUnitTypeId(I4O)!=1429221446 and RL0[GetPlayerId(GetOwningPlayer(I4O))]==0 thenendifset I5O=IQ1if IsUnitType(I5O,UNIT_TYPE_HERO)==false thenset I5O=K1[GetPlayerId(GetOwningPlayer(I5O))]endifif UX1==false and UY1==true thenendifif x>2 and UX1==false thenif x==3 thencall IE1(RC)set UK1=" "+GetObjectName(1848652875)+" |c0000ff40"+GetObjectName(1848652876)+"|r"+GetObjectName(1848652857)elseif x==4 thencall IE1(GC)set UK1=" "+GetObjectName(1848652872)+" |c00400080"+GetObjectName(1848652878)+"|r"+GetObjectName(1848652857)elseif x==5 thencall IE1(QC)set UK1=" "+GetObjectName(1848652871)+" |c00ff0080"+GetObjectName(1848652877)+"|r"+GetObjectName(1848652857)elseif x==6 thencall IE1(EE)set UK1=" "+GetObjectName(1848652872)+" |c00ff8000"+GetObjectName(1848652874)+"|r"+GetObjectName(1848652865)elseif x==7 thencall IE1(HE)set UK1=" "+GetObjectName(1848652872)+" |c00808000"+GetObjectName(1848652873)+"|r"+GetObjectName(1848652865)elseif x==8 thencall IE1(OD)set UK1=" "+GetObjectName(1848652871)+" |c00ff80ff"+GetObjectName(1848652630)+"|r"+GetObjectName(1848652865)elseif x==9 thencall IE1(XC)set UK1=" "+GetObjectName(1848652872)+" |c00ff0000"+GetObjectName(1848652631)+"|r"+GetObjectName(1848652866)elsecall IE1(JC)set UK1=" "+GetObjectName(1848652872)+" |c00ff8000"+GetObjectName(1848652632)+"|r. "+GetObjectName(1848652870)+GetObjectName(1848652866)endifendifif UX1==false thenset IP1=IP1+100+GetHeroLevel(IQ1)*9+100set UM1=C0[GetPlayerId(QF1)]+(D30[GetPlayerId((QF1))])+"|r"set UN1=C0[GetPlayerId(IR1)]+(D30[GetPlayerId((IR1))])+"|r"set UT1="|c00FFDC00"+I2S(IP1)+"|r"if IR1==BO[0]or IR1==CO[0]thenif IOO==0 thenif IR1==BO[0]thenset US1=UN1+" "+GetObjectName(1848652850)+" "+UM1+GetObjectName(1848652851)+GetObjectName(1848652857)+" "+UT1+" "+GetObjectName(1848652852)+"."call U81(IR1,IP1)elseif IR1==CO[0]thenset US1=UN1+" "+GetObjectName(1848652850)+" "+UM1+GetObjectName(1848652851)+GetObjectName(1848652857)+" "+UT1+" "+GetObjectName(1848652852)+"."call U81(IR1,IP1)endifelseif IOO>1 thenset US1=UN1+" "+GetObjectName(1848652850)+" "+UM1+GetObjectName(1848652851)+GetObjectName(1848652857)+" "+UT1+" "+GetObjectName(1848652852)+"."call Q21(IQ1,PR1,IP1)endifelseif UJ1==""and UK1==""thenset US1=UN1+" "+GetObjectName(1848652850)+" "+UM1+GetObjectName(1848652851)+" "+GetObjectName(1848652867)+" "+UT1+" "+GetObjectName(1848652853)+GetObjectName(1848652857)elseif UJ1==""and UK1!=""thenset US1=UN1+" "+GetObjectName(1848652850)+" "+UM1+GetObjectName(1848652851)+" "+GetObjectName(1848652867)+" "+UT1+" "+GetObjectName(1848652853)+GetObjectName(1848652857)elseif UJ1!=""and UK1==""thenset US1=UN1+" "+GetObjectName(1848652856)+" "+UM1+GetObjectName(1848652855)+" "+UJ1+" "+GetObjectName(1848652854)+" "+UT1+" "+GetObjectName(1848652853)+GetObjectName(1848652857)elseif UJ1!=""and UK1!=""thenset US1=UN1+" "+GetObjectName(1848652856)+" "+UM1+GetObjectName(1848652855)+" "+UJ1+" "+GetObjectName(1848652854)+" "+UT1+" "+GetObjectName(1848652853)+GetObjectName(1848652857)endifif UY1 thenset UL1=PT1(IQ1,PR1)endifcall PDI(P2,10,US1+UL1)if UK1!=""thencall PDI(P2,10,UN1+UK1)endifset EW0[GetPlayerId(IR1)]=EW0[GetPlayerId(IR1)]+IP1set EV0[GetPlayerId(IR1)]=EV0[GetPlayerId(IR1)]+IP1call IT1(IR1,IP1,IQ1)set Y[GetPlayerId(IR1)]=Y[GetPlayerId(IR1)]+IP1if I0[1]>4 thencall U41(0)endifif I0[2]>4 thencall U41(1)endifendifset QV1=GetHeroLevel(IQ1)*30if DB1(IQ1,FK0[WG0])!=null thenif GetItemCharges(DB1(IQ1,FK0[WG0]))>0 thenset I0O=-1*(4*GetItemCharges(DB1(IQ1,FK0[WG0])))set QV1=IMaxBJ(R2I(QV1-25*GetItemCharges(DB1(IQ1,FK0[WG0]))),0)endifendifif QV1>I3O thenset QV1=I3Oendifcall QS1(IQ1,I4O)call UO1(IQ1)call U11(IQ1)if QD1==false thenset G[GetPlayerId(QF1)]=G[GetPlayerId(QF1)]+QV1call U91(IQ1,QV1)call QZ1(IQ1,QV1)endifcall SaveInteger(XY,(400+GetPlayerId(IR1)),(450+GetPlayerId(QF1)),((LoadInteger(XY,(400+GetPlayerId(IR1)),(450+GetPlayerId(QF1))))+1))call SaveInteger(XY,(400+GetPlayerId(QF1)),(500+GetPlayerId(IR1)),((LoadInteger(XY,(400+GetPlayerId(QF1)),(500+GetPlayerId(IR1))))+1))call StartTimerBJ(E0[GetPlayerId(IR1)],false,18)if UX1==false and IR1!=BO[0]and IR1!=CO[0]and IR1!=DO thenset Q[GetPlayerId(IR1)]=Q[GetPlayerId(IR1)]+1if Q[GetPlayerId(IR1)]==2 thenset Z[GetPlayerId(IR1)]=Z[GetPlayerId(IR1)]+1call U71(C0[GetPlayerId(IR1)]+(D30[GetPlayerId((IR1))])+"|r "+GetObjectName(1848652868)+" |c000000ff"+GetObjectName(1848652883)+"|r"+GetObjectName(1848652857),1)endifif Q[GetPlayerId(IR1)]==3 thenset V[GetPlayerId(IR1)]=V[GetPlayerId(IR1)]+1call U71(C0[GetPlayerId(IR1)]+(D30[GetPlayerId((IR1))])+"|r "+GetObjectName(1848652868)+" |c0000ff40"+GetObjectName(1848652869)+"|r"+GetObjectName(1848652866),2)endifif Q[GetPlayerId(IR1)]==4 thenset V[GetPlayerId(IR1)]=V[GetPlayerId(IR1)]+1call U71(C0[GetPlayerId(IR1)]+(D30[GetPlayerId((IR1))])+"|r "+GetObjectName(1848652868)+" |c0000FFFF"+GetObjectName(1848657994)+"|r"+GetObjectName(1848652866),3)endifif Q[GetPlayerId(IR1)]>4 thenset V[GetPlayerId(IR1)]=V[GetPlayerId(IR1)]+1call U71(C0[GetPlayerId(IR1)]+(D30[GetPlayerId((IR1))])+"|r "+GetObjectName(1848652875)+" |c0000AAFF"+GetObjectName(1848657995)+"|r"+GetObjectName(1848652866),4)endifendifif(UX1==false)thenset P[GetPlayerId(QF1)]=0endifset P[0]=0set P[6]=0set O[GetPlayerId(QF1)]=O[GetPlayerId(QF1)]+1if QD1 thenset UR1=0.4endifif UX1==true and GetUnitTypeId(IQ1)==1211117643 thenset UU1=0.5endifset I1O=R2I(GetHeroLevel(IQ1)*4*UR1*UP1*UQ1*UU1)+R2I(I0O)if INI==true thenset I1O=R2I(I1O*0.5)endifset I1O=I1O+ZS[GetPlayerId(QF1)]if(((LoadInteger(XY,(GetHandleId((IQ1))),((4333))))==1)==true)thenset I1O=R2I(I1O*1.3)endifif GetUnitAbilityLevel(IQ1,1093684567)==1 or GetUnitAbilityLevel(IQ1,1093809987)==1 thenset IIO=0.9endifif GetUnitAbilityLevel(IQ1,1093684567)==2 or GetUnitAbilityLevel(IQ1,1093809987)==2 thenset IIO=0.8endifif GetUnitAbilityLevel(IQ1,1093684567)==3 or GetUnitAbilityLevel(IQ1,1093809987)==3 thenset IIO=0.7endifset I1O=R2I(I1O*IIO)if GL thenset W[GetPlayerId(QF1)]=0call TimerStart(F0[GetPlayerId(QF1)],1.00,false,null)elseset W[GetPlayerId(QF1)]=W[GetPlayerId(QF1)]+I1Ocall TimerStart(F0[GetPlayerId(QF1)],I1O,false,null)endifcall TriggerExecute(UG)if X0==false thencall QC1(IQ1,I1O,QD1)elseif(NZI(QF1))thenset W0[0]=W0[0]+1endifif NWI(QF1)thenset W0[1]=W0[1]+1endifset U1[GetPlayerId(QF1)]=IQ1if GetUnitTypeId(IQ1)==1211117642 thenset U1[GetPlayerId(QF1)]=(LoadUnitHandle(XY,(GetHandleId(GetOwningPlayer(IQ1))),(699)))endifif W0[0]==HL thencall TriggerExecute(NK)endifif W0[1]==HL thencall TriggerExecute(MK)endifif(GetUnitTypeId(IQ1)==1429221430)thencall ExecuteFunc("UB1")elseif GetUnitTypeId(IQ1)==1429221432 or GetUnitTypeId(IQ1)==1160786229 thenset JK=IQ1call ExecuteFunc("I7O")elseif GetUnitTypeId(IQ1)==1432580716 thenset JK=IQ1call ExecuteFunc("I8O")endifendifendfunctionfunction IAO takes integer LCI,integer IBO returns nothingset F90[F80]=LCIset FA0[F80]=IBOset F80=F80+1endfunctionfunction IDO takes unit TLI returns integerlocal integer i=0local integer LCI=GetUnitTypeId(TLI)loopexitwhen i>F80if F90[i]==LCI thenreturn FA0[i]endifset i=i+1endloopreturn-1endfunctionfunction IEO takes unit TLI returns integerlocal integer IFO=IDO(TLI)if IFO==-1 thenif IsUnitType(TLI,UNIT_TYPE_HERO)==true thenset IFO=TFI(TLI)elseset IFO=NFI(GetUnitLevel(TLI))endifendifif IsUnitType(TLI,UNIT_TYPE_SUMMONED)==true thenset IFO=R2I(IFO*0.5)endifreturn IFOendfunctionfunction IGO takes nothing returns nothingcall AddHeroXP(GetEnumUnit(),FB0,true)endfunctionfunction IHO takes nothing returns booleanlocal unit TMI=GetFilterUnit()local unit IZO=GetDyingUnit()local integer LCI=GetUnitTypeId(TMI)if(GetOwningPlayer((IZO))==DO)==false or IsUnitType(IZO,UNIT_TYPE_ANCIENT)==true thenif IsUnitEnemy(TMI,GetOwningPlayer(IZO))==false thenreturn falseendifendifif IsUnitType(TMI,UNIT_TYPE_HERO)==false or QPI(TMI)thenreturn falseendifif ON1(LCI)thenreturn falseendifif PAI(FC0,FD0,GetUnitX(TMI),GetUnitY(TMI))>1300+25 thenreturn falseendifreturn trueendfunctionfunction IVO takes nothing returns booleanlocal unit IWO=GetKillingUnit()local unit IZO=GetDyingUnit()local integer IFO=IEO(IZO)local integer MFIlocal group glocal group g2local real x=GetUnitX(IZO)local real y=GetUnitY(IZO)local player pif IsUnitIllusion(IZO)or GetUnitAbilityLevel(IZO,1097625443)>0 or IFO==0 thenreturn falseendifif IWO==null or IsPlayerAlly(GetOwningPlayer(IWO),GetOwningPlayer(IZO))==true or(GetOwningPlayer((IWO))==DO)thenreturn falseendifset g=MDI()set g2=MDI()set FC0=xset FD0=yset p=BO[1]call GroupEnumUnitsOfPlayer(g,p,Condition(function IHO))call GroupAddGroup(g,g2)set p=BO[2]call GroupEnumUnitsOfPlayer(g,p,Condition(function IHO))call GroupAddGroup(g,g2)set p=BO[3]call GroupEnumUnitsOfPlayer(g,p,Condition(function IHO))call GroupAddGroup(g,g2)set p=BO[4]call GroupEnumUnitsOfPlayer(g,p,Condition(function IHO))call GroupAddGroup(g,g2)set p=BO[5]call GroupEnumUnitsOfPlayer(g,p,Condition(function IHO))call GroupAddGroup(g,g2)set p=CO[1]call GroupEnumUnitsOfPlayer(g,p,Condition(function IHO))call GroupAddGroup(g,g2)set p=CO[2]call GroupEnumUnitsOfPlayer(g,p,Condition(function IHO))call GroupAddGroup(g,g2)set p=CO[3]call GroupEnumUnitsOfPlayer(g,p,Condition(function IHO))call GroupAddGroup(g,g2)set p=CO[4]call GroupEnumUnitsOfPlayer(g,p,Condition(function IHO))call GroupAddGroup(g,g2)set p=CO[5]call GroupEnumUnitsOfPlayer(g,p,Condition(function IHO))call GroupAddGroup(g,g2)set MFI=CountUnitsInGroup(g2)if MFI>0 thenset FB0=IFO/MFIcall ForGroup(g2,function IGO)endifcall MCI(g)call MCI(g2)set g=nullset g2=nullset IWO=nullset IZO=nullreturn falseendfunctionfunction IYO takes nothing returns booleanlocal unit QP1=GetSummonedUnit()local integer xif IsUnitIllusion(QP1)==true thenset x=P[GetPlayerId(GetOwningPlayer(QP1))]if x>2 and RL0[GetPlayerId(GetOwningPlayer(QP1))]==0 thencall QTI(QP1,1093815114)elsecall UnitRemoveAbility(QP1,1093815114)endifendifset QP1=nullreturn falseendfunctionfunction IKO takes nothing returns nothinglocal trigger t=GetTriggeringTrigger()local player IR1=GetOwningPlayer(GetKillingUnit())local player QF1=GetOwningPlayer(GetTriggerUnit())local string LNIlocal integer IOO=Q11(GetTriggerUnit(),GetKillingUnit())if IR1==BO[0]or IR1==CO[0]thencall Q21(GetTriggerUnit(),GetKillingUnit(),200)set LNI=QI1(GetTriggerUnit(),GetKillingUnit())+" "+GetObjectName(1848652887)+" |c00ff0303"+GetObjectName(1848652889)+GetObjectName(1848652857)+"|r "if IOO>1 thenset LNI=LNI+"(+200 "+GetObjectName(1848652852)+")"elseset LNI=LNI+"(+200 "+GetObjectName(1848652853)+")"endifelseset LNI=C0[GetPlayerId(IR1)]+(D30[GetPlayerId((IR1))])+"|r "+GetObjectName(1848652887)+" |c00ff0303"+GetObjectName(1848652889)+GetObjectName(1848652857)+"|r "set LNI=LNI+"(+200 "+GetObjectName(1848652853)+")"call IT1(IR1,200,K1[GetPlayerId(IR1)])set EW0[GetPlayerId(IR1)]=EW0[GetPlayerId(IR1)]+200set EV0[GetPlayerId(IR1)]=EV0[GetPlayerId(IR1)]+200endifcall PDI(P2,10,LNI)call IE1(ZC)call MZI(t)set t=nullendfunctionfunction ILO takes nothing returns booleanif GetOwningPlayer(GetKillingUnit())!=DO and GetKillingUnit()!=null and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==true and IsPlayerEnemy(GetOwningPlayer(GetTriggerUnit()),GetOwningPlayer(GetKillingUnit()))==true thenif GetOwningPlayer(GetKillingUnit())==BO[0]or GetOwningPlayer(GetKillingUnit())==CO[0]thenif Q11(GetTriggerUnit(),GetKillingUnit())>0 thencall IKO()endifelsecall IKO()endifendifreturn falseendfunctionfunction INO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer MFI=(LoadInteger(XY,(MKI),(34)))if GetTriggerEventId()!=EVENT_UNIT_DAMAGED thenset MFI=MFI+1call SaveInteger(XY,(MKI),(34),(MFI))endifif MFI>4 or(GetTriggerEventId()==EVENT_UNIT_DAMAGED and GetEventDamage()>0)thencall FlushChildHashtable(XY,(MKI))call MZI(t)endifcall SetUnitState(TLI,UNIT_STATE_LIFE,GetUnitState(TLI,UNIT_STATE_LIFE)+0.2*GetUnitState(TLI,UNIT_STATE_MAX_LIFE))call SetUnitState(TLI,UNIT_STATE_MANA,GetUnitState(TLI,UNIT_STATE_MANA)+0.2*GetUnitState(TLI,UNIT_STATE_MAX_MANA))set t=nullset TLI=nullreturn falseendfunctionfunction ISO takes unit TLI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,1.0,true)call TriggerAddCondition(t,Condition(function INO))call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DAMAGED)call SaveUnitHandle(XY,(MKI),(2),(TLI))set t=nullendfunctionfunction ITO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit ulocal region rif GetTriggerEventId()==EVENT_UNIT_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseset u=(LoadUnitHandle(XY,(MKI),(53)))set r=CreateRegion()call RegionAddRect(r,PA)call RegionAddRect(r,QA)call RegionAddRect(r,PB)if IsUnitInRegion(r,u)==false thenif(LoadBoolean(XY,(MKI),(91)))==true thencall SaveBoolean(XY,(MKI),(91),(false))elsecall SetUnitX(u,GetRectCenterX(P4))call SetUnitY(u,GetRectCenterY(P4))call SaveBoolean(XY,(MKI),(91),(true))endifendifcall RemoveRegion(r)set u=nullset r=nullendifset t=nullreturn falseendfunctionfunction IRO takes unit u returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_DEATH)call TriggerRegisterTimerEvent(t,10,true)call TriggerAddCondition(t,Condition(function ITO))call SaveUnitHandle(XY,(MKI),(53),(u))call SaveBoolean(XY,(MKI),(91),(true))set t=nullendfunctionfunction IPO takes nothing returns booleanlocal item OT1local integer MFI=GetTriggerEvalCount(GetTriggeringTrigger())if MFI==FZ0 thencall MZI(GetTriggeringTrigger())endifif MFI==FZ0-180 or MFI==FZ0-60 thenif FE0!=null thenset OT1=DB1(FE0,FK0[VG0])if OT1!=null thenif MFI==FZ0-180 thenif NZI(GetOwningPlayer(FE0))thencall PDI(OO,15,GetObjectName(1848657209)+" |c00ff0303"+GetObjectName(1848657207)+"|r")elsecall PDI(AO,15,GetObjectName(1848657209)+" |c00ff0303"+GetObjectName(1848657207)+"|r")endifelseif NZI(GetOwningPlayer(FE0))thencall PDI(OO,15,GetObjectName(1848657209)+" |c00ff0303"+GetObjectName(1848656984)+"|r")elsecall PDI(AO,15,GetObjectName(1848657209)+" |c00ff0303"+GetObjectName(1848656984)+"|r")endifendifendifendifendifset OT1=nullreturn falseendfunctionfunction IQO takes nothing returns nothinglocal trigger t=CreateTrigger()call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function IPO))call TriggerEvaluate(t)set t=nullendfunctionfunction IUO takes nothing returns booleanset FG0=GetTriggerEvalCount(GetTriggeringTrigger())if N0!=null and GetUnitState(N0,UNIT_STATE_LIFE)>1 thencall SetPlayerTechResearched(GetOwningPlayer(N0),1378889798,FG0)if GetUnitAbilityLevel(N0,1093743666)==0 thencall UnitAddAbility(N0,1093743666)endifcall SetUnitAbilityLevel(N0,1093743666,FG0+1)endifreturn falseendfunctionfunction O0O takes nothing returns nothinglocal integer i=1local unit N0Iset FE0=nullloopexitwhen i>5set N0I=K1[GetPlayerId(BO[i])]if N0I!=null and DB1(N0I,FK0[VG0])!=null thencall DisableTrigger(L30)call E71("AegisOff",GetPlayerId(GetOwningPlayer(N0I)))call RemoveItem(DB1(N0I,FK0[VG0]))call ISO(N0I)call EnableTrigger(L30)endifset N0I=K1[GetPlayerId(CO[i])]if N0I!=null and DB1(N0I,FK0[VG0])!=null thencall DisableTrigger(L30)call E71("AegisOff",GetPlayerId(GetOwningPlayer(N0I)))call RemoveItem(DB1(N0I,FK0[VG0]))call ISO(N0I)call EnableTrigger(L30)endifset i=i+1endloopset N0I=nullendfunctionfunction OIO takes string O1O,string OOO returns stringlocal string s=GetObjectName(1848656705)set s=EA1(s,"$team",O1O)set s=EA1(s,"$team",OOO)return sendfunctionfunction O2O takes nothing returns booleanreturn GetUnitTypeId(GetDyingUnit())==1848651852endfunctionfunction IsHero takes nothing returns booleanreturn IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==trueendfunctionfunction O3O takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local location O4Olocal real N7Iif GetTriggerEvalCount(t)==FH0 or TK0 thenset TK0=falseset O4O=GetRectCenter(P4)call O0O()set FW0=FW0+1set N0=CreateUnitAtLoc(Player(12),1848651852,O4O,bj_UNIT_FACING)call SetUnitAcquireRange(N0,150)call IRO(N0)call UnitAddAbility(N0,1093743666)call SetPlayerTechResearched(GetOwningPlayer(N0),1378889798,FG0)call SetUnitAbilityLevel(N0,1093743666,FG0+1)call RemoveLocation(O4O)if FW0>1 thencall UnitRemoveAbility(N0,1093684018)call UnitAddAbility(N0,1093685558)call UnitAddItem(N0,CreateItem(FK0[Z50],0,0))endifcall UnitAddItem(N0,CreateItem(FK0[VG0],0,0))call MZI(t)elseif GetTriggerEvalCount(t)==FZ0 thencall O0O()endifset t=nullreturn falseendfunctionfunction O5O takes nothing returns nothinglocal trigger t=CreateTrigger()call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function O3O))set TK0=falseset FH0=GetRandomInt(480,660)call IQO()set FF0=falseif(NZI(GetOwningPlayer(GetKillingUnit())))thencall E71("Roshan",0)call PDI(bj_FORCE_ALL_PLAYERS,10.00,OIO("|c00ff0000"+GetObjectName(1848653365)+"|r",GetObjectName(1848653365)))call AdjustPlayerStateBJ(200,BO[1],PLAYER_STATE_RESOURCE_GOLD)call AdjustPlayerStateBJ(200,BO[2],PLAYER_STATE_RESOURCE_GOLD)call AdjustPlayerStateBJ(200,BO[3],PLAYER_STATE_RESOURCE_GOLD)call AdjustPlayerStateBJ(200,BO[4],PLAYER_STATE_RESOURCE_GOLD)call AdjustPlayerStateBJ(200,BO[5],PLAYER_STATE_RESOURCE_GOLD)endifif(NWI(GetOwningPlayer(GetKillingUnit())))thencall E71("Roshan",1)call PDI(bj_FORCE_ALL_PLAYERS,10.00,OIO("|c00004000"+GetObjectName(1848653379)+"|r",GetObjectName(1848653379)))call AdjustPlayerStateBJ(200,CO[1],PLAYER_STATE_RESOURCE_GOLD)call AdjustPlayerStateBJ(200,CO[2],PLAYER_STATE_RESOURCE_GOLD)call AdjustPlayerStateBJ(200,CO[3],PLAYER_STATE_RESOURCE_GOLD)call AdjustPlayerStateBJ(200,CO[4],PLAYER_STATE_RESOURCE_GOLD)call AdjustPlayerStateBJ(200,CO[5],PLAYER_STATE_RESOURCE_GOLD)endifset t=nullendfunctionfunction O7O takes nothing returns nothinglocal texttag t=CreateTextTag()local unit u=GetTriggerUnit()local player p=GetOwningPlayer(GetKillingUnit())call SetTextTagText(t,"$",0.027)call SetTextTagPosUnit(t,u,0)call SetTextTagColorBJ(t,D40[GetPlayerId(p)],D50[GetPlayerId(p)],D60[GetPlayerId(p)],15)call SetTextTagVelocity(t,0,0.035)call SetTextTagFadepoint(t,3)call SetTextTagLifespan(t,1.5)call SetTextTagPermanent(t,false)call SetTextTagVisibility(t,false)if GetLocalPlayer()==DO0 or GetLocalPlayer()==D20 thencall SetTextTagVisibility(t,true)endifset t=nullset u=nullset p=nullendfunctionfunction O8O takes unit u,player p returns nothinglocal texttag t=CreateTextTag()call SetTextTagText(t,"!",0.03)call SetTextTagPosUnit(t,u,0)call SetTextTagColorBJ(t,D40[GetPlayerId(p)],D50[GetPlayerId(p)],D60[GetPlayerId(p)],15)call SetTextTagVelocity(t,0,0.035)call SetTextTagFadepoint(t,3)call SetTextTagLifespan(t,1.5)call SetTextTagPermanent(t,false)call SetTextTagVisibility(t,false)if R60[GetPlayerId(GetLocalPlayer())]==true or(C2 and(GetLocalPlayer()==DO0 or GetLocalPlayer()==D20))thencall SetTextTagVisibility(t,true)endifset t=nullendfunctionfunction O9O takes nothing returns nothingif IsUnitType(GetEnumUnit(),UNIT_TYPE_MELEE_ATTACKER)==true thencall AddHeroXP(GetEnumUnit(),PJ/TJ,true)elsecall AddHeroXP(GetEnumUnit(),RJ/TJ,true)endifendfunctionfunction OAO takes nothing returns nothinglocal group g=MDI()local integer OBOlocal integer OCO=36local integer ODO=36call GroupEnumUnitsInRange(g,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),1300+25,Condition(function BH1))set OBO=UKI(g)set TJ=OBOset RJ=OCOset PJ=ODOcall ForGroup(g,function O9O)call MCI(g)call O8O(GetDyingUnit(),GetOwningPlayer(GetKillingUnit()))set g=nullendfunctionfunction OEO takes nothing returns booleanif IsUnitAlly(GetKillingUnit(),GetOwningPlayer(GetTriggerUnit()))==true thencall OAO()elseif C2 and NXI(GetOwningPlayer(GetKillingUnit()))thencall O7O()endifendifreturn falseendfunctionfunction OGO takes player EZ1,player EV1 returns stringlocal string s=GetObjectName(1848656208)set s=EA1(s,"$dead",(D30[GetPlayerId((EZ1))]))return sendfunctionfunction OHO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))call SetTerrainPathable(x,y,PATHING_TYPE_WALKABILITY,false)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullreturn falseendfunctionfunction OZO takes unit TLI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)call SetTerrainPathable(x,y,PATHING_TYPE_WALKABILITY,true)call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function OHO))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))set TLI=nullset t=nullendfunctionfunction OVO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit OWO=(LoadUnitHandle(XY,(MKI),(2)))local integer MFI=GetTriggerEvalCount(t)local integer OXOlocal integer i=1local integer idlocal real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local integer OYO=140if T3I(OWO)thenset OYO=180endifset OXO=OYO-MFIloopexitwhen i>5if IsPlayerAlly(GetOwningPlayer(OWO),BO[0])thenset id=GetPlayerId(BO[i])elseset id=GetPlayerId(CO[i])endifset i=i+1if OXO==0 thencall LeaderboardDisplay(FX0[id],false)if IsPlayerAlly(BO[0],Player(id))thenset FY0[GetPlayerId(BO[0])]=falseendifif IsPlayerAlly(CO[0],Player(id))thenset FY0[GetPlayerId(CO[0])]=falseendifelseif QPI(K1[id])==false thencall PlayerSetLeaderboard(Player(id),FX0[id])call LeaderboardDisplay(FX0[id],true)call LeaderboardSetLabel(FX0[id],"    "+GetObjectName(1848659034)+" "+I2S(OXO))endifendifendloopif OXO==2 thencall SetUnitPosition(OWO,x,y)endifif OXO==0 thencall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset OWO=nullreturn falseendfunctionfunction OJO takes player KUI,integer SXI returns nothinglocal texttag tif SXI>0 thenset t=CreateTextTag()call SetPlayerState(KUI,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(KUI,PLAYER_STATE_RESOURCE_GOLD)+SXI)call SetTextTagText(t,"+"+I2S(SXI),0.025)call SetTextTagPosUnit(t,K1[GetPlayerId(KUI)],0)call SetTextTagColor(t,255,220,0,255)call SetTextTagVelocity(t,0,0.03)if GetLocalPlayer()==KUI thencall SetTextTagVisibility(t,true)elsecall SetTextTagVisibility(t,false)endifcall SetTextTagFadepoint(t,2)call SetTextTagLifespan(t,3)call SetTextTagPermanent(t,false)endifendfunctionfunction OKO takes nothing returns booleanlocal real xlocal real ylocal unit OWO=GetTriggerUnit()local integer i=1local integer SJI=175local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)if T3I(OWO)==false thenset SJI=150endifcall E71("Courier"+I2S(GetPlayerId(GetOwningPlayer(GetTriggerUnit()))),GetPlayerId(GetOwningPlayer(GetKillingUnit())))call PDI(P2,10.00,OGO(GetOwningPlayer(GetTriggerUnit()),GetOwningPlayer(GetKillingUnit())))call PingMinimapEx(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),6,255,0,0,false)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function OVO))call SaveUnitHandle(XY,(MKI),(2),(OWO))if IsPlayerAlly(GetOwningPlayer(OWO),BO[0])and FY0[GetPlayerId(BO[0])]==false thenset FY0[GetPlayerId(BO[0])]=trueloopexitwhen i>5call OJO(CO[i],SJI)set i=i+1endloopendifset i=1if IsPlayerAlly(GetOwningPlayer(OWO),CO[0])and FY0[GetPlayerId(CO[0])]==false thenset FY0[GetPlayerId(CO[0])]=trueloopexitwhen i>5call OJO(BO[i],SJI)set i=i+1endloopendifif NZI(GetOwningPlayer(OWO))thenset x=GetRectCenterX(O4)set y=GetRectCenterY(O4)elseset x=GetRectCenterX(S3)set y=GetRectCenterY(S3)endifcall SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))if IsTerrainPathable(GetUnitX(OWO),GetUnitY(OWO),PATHING_TYPE_WALKABILITY)thencall OZO(OWO)endifset t=nullreturn falseendfunctionfunction OLO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real x=MSlocal real y=SSif NWI(GetOwningPlayer(TLI))thenset x=O10set y=OO0endifif QPI(TLI)==false thenif PAI(GetUnitX(TLI),GetUnitY(TLI),x,y)<800 thencall QTI(TLI,1098282348)elsecall UnitRemoveAbility(TLI,1098282348)endifendifset t=nullset TLI=nullreturn falseendfunctionfunction OMO takes unit OWO returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SetPlayerAbilityAvailable(GetOwningPlayer(OWO),1093810510,false)call SetPlayerAbilityAvailable(GetOwningPlayer(OWO),1093818445,false)call UnitMakeAbilityPermanent(OWO,true,1093810509)call TriggerRegisterDeathEvent(t,OWO)call TriggerAddCondition(t,Condition(function OKO))set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.5,true)call TriggerAddCondition(t,Condition(function OLO))call SaveUnitHandle(XY,(MKI),(2),(OWO))set t=nullendfunctionfunction ONO takes nothing returns nothingif T4I(GetTriggerUnit())and IsUnitIllusion(GetTriggerUnit())==false thencall E71("Courier"+I2S(GetPlayerId(GetOwningPlayer(GetTriggerUnit()))),GetPlayerId(GetOwningPlayer(GetKillingUnit())))call PDI(P2,10.00,OGO(GetOwningPlayer(GetTriggerUnit()),GetOwningPlayer(GetKillingUnit())))call PingMinimapEx(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),6,255,0,0,false)endifendfunctionfunction OSO takes nothing returns booleancall MZI(GetTriggeringTrigger())set FY0[GetPlayerId(BO[0])]=falseset FY0[GetPlayerId(CO[0])]=falseset FX0[GetPlayerId(BO[1])]=CreateLeaderboard()set FX0[GetPlayerId(BO[2])]=CreateLeaderboard()set FX0[GetPlayerId(BO[3])]=CreateLeaderboard()set FX0[GetPlayerId(BO[4])]=CreateLeaderboard()set FX0[GetPlayerId(BO[5])]=CreateLeaderboard()set FX0[GetPlayerId(CO[1])]=CreateLeaderboard()set FX0[GetPlayerId(CO[2])]=CreateLeaderboard()set FX0[GetPlayerId(CO[3])]=CreateLeaderboard()set FX0[GetPlayerId(CO[4])]=CreateLeaderboard()set FX0[GetPlayerId(CO[5])]=CreateLeaderboard()call PlayerSetLeaderboard(BO[1],FX0[GetPlayerId(BO[1])])call PlayerSetLeaderboard(BO[2],FX0[GetPlayerId(BO[2])])call PlayerSetLeaderboard(BO[3],FX0[GetPlayerId(BO[3])])call PlayerSetLeaderboard(BO[4],FX0[GetPlayerId(BO[4])])call PlayerSetLeaderboard(BO[5],FX0[GetPlayerId(BO[5])])call PlayerSetLeaderboard(CO[1],FX0[GetPlayerId(CO[1])])call PlayerSetLeaderboard(CO[2],FX0[GetPlayerId(CO[2])])call PlayerSetLeaderboard(CO[3],FX0[GetPlayerId(CO[3])])call PlayerSetLeaderboard(CO[4],FX0[GetPlayerId(CO[4])])call PlayerSetLeaderboard(CO[5],FX0[GetPlayerId(CO[5])])call LeaderboardDisplay(FX0[GetPlayerId(BO[1])],false)call LeaderboardDisplay(FX0[GetPlayerId(BO[2])],false)call LeaderboardDisplay(FX0[GetPlayerId(BO[3])],false)call LeaderboardDisplay(FX0[GetPlayerId(BO[4])],false)call LeaderboardDisplay(FX0[GetPlayerId(BO[5])],false)call LeaderboardDisplay(FX0[GetPlayerId(CO[1])],false)call LeaderboardDisplay(FX0[GetPlayerId(CO[2])],false)call LeaderboardDisplay(FX0[GetPlayerId(CO[3])],false)call LeaderboardDisplay(FX0[GetPlayerId(CO[4])],false)call LeaderboardDisplay(FX0[GetPlayerId(CO[5])],false)call LeaderboardSetLabelBJ(FX0[GetPlayerId(BO[1])]," ")call LeaderboardSetLabelBJ(FX0[GetPlayerId(BO[2])]," ")call LeaderboardSetLabelBJ(FX0[GetPlayerId(BO[3])]," ")call LeaderboardSetLabelBJ(FX0[GetPlayerId(BO[4])]," ")call LeaderboardSetLabelBJ(FX0[GetPlayerId(BO[5])]," ")call LeaderboardSetLabelBJ(FX0[GetPlayerId(CO[1])]," ")call LeaderboardSetLabelBJ(FX0[GetPlayerId(CO[2])]," ")call LeaderboardSetLabelBJ(FX0[GetPlayerId(CO[3])]," ")call LeaderboardSetLabelBJ(FX0[GetPlayerId(CO[4])]," ")call LeaderboardSetLabelBJ(FX0[GetPlayerId(CO[5])]," ")return falseendfunctionfunction ORO takes nothing returns nothinglocal integer id=GetUnitTypeId(GetTriggerUnit())if id==1697656914 or id==1697657137 or id==1697656915 or id==1697657145 or id==1966092365 or id==1966092356 or id==1966092366 or id==1966092372 thenif IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit()))thenset X[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=X[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1call PDI(P2,10,C0[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+(D30[GetPlayerId((GetOwningPlayer(GetKillingUnit())))])+"|r "+GetObjectName(1848652880)+".")elsecall PDI(P2,10,C0[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+(D30[GetPlayerId((GetOwningPlayer(GetKillingUnit())))])+"|r "+GetObjectName(1848657230)+".")endifendifendfunctionfunction OUO takes integer i returns booleanreturn i==1227894838 or i==1227894840 or i==1227894858 or i==1227894859 or i==1227894839endfunctionfunction A0O takes nothing returns nothingif GetWidgetLife(GetEnumItem())>0 and OUO(GetItemTypeId(GetEnumItem()))thenset FK=GetEnumItem()endifendfunctionfunction AIO takes nothing returns integerlocal integer i=GetRandomInt(1,5)loopexitwhen i!=YN0set i=GetRandomInt(1,5)endloopset YN0=ireturn iendfunctionfunction A1O takes nothing returns booleanlocal boolean AOO=falselocal boolean A2O=falselocal real xlocal real ylocal real x1local real y1local real x2local real y2local integer A3Oif GetRandomInt(1,2)==1 thenset x=GetLocationX(F1)set y=GetLocationY(F1)elseset x=GetLocationX(G1)set y=GetLocationY(G1)endifset x1=GetLocationX(F1)set y1=GetLocationY(F1)set x2=GetLocationX(G1)set y2=GetLocationY(G1)set FK=nullcall EnumItemsInRect(G4,Condition(function LWI),function A0O)if FK==null thenset AOO=trueendifset FK=nullcall EnumItemsInRect(D4,Condition(function LWI),function A0O)if FK==null thenset A2O=trueendifif DL==false or GetTriggerEvalCount(GetTriggeringTrigger())<20 thenif AOO and A2O thenset A3O=AIO()if A3O==1 thencall CreateItem(1227894839,x,y)elseif A3O==2 thencall CreateItem(1227894838,x,y)elseif A3O==3 thencall CreateItem(1227894859,x,y)elseif A3O==4 thencall CreateItem(1227894840,x,y)elseif A3O==5 thencall CreateItem(1227894858,x,y)endifendifelseif AOO thenset A3O=AIO()if A3O==1 thencall CreateItem(1227894839,x1,y1)elseif A3O==2 thencall CreateItem(1227894838,x1,y1)elseif A3O==3 thencall CreateItem(1227894859,x1,y1)elseif A3O==4 thencall CreateItem(1227894840,x1,y1)elseif A3O==5 thencall CreateItem(1227894858,x1,y1)endifendifif A2O thenset A3O=AIO()if A3O==1 thencall CreateItem(1227894839,x2,y2)elseif A3O==2 thencall CreateItem(1227894838,x2,y2)elseif A3O==3 thencall CreateItem(1227894859,x2,y2)elseif A3O==4 thencall CreateItem(1227894840,x2,y2)elseif A3O==5 thencall CreateItem(1227894858,x2,y2)endifendifendifreturn falseendfunctionfunction A5O takes nothing returns nothingset JI0=JI0+1set YS0[JI0]=GS0set YT0[JI0]=H40set J00[JI0]=ZA0set JI0=JI0+1set YS0[JI0]=GR0set YT0[JI0]=GF0set YR0[JI0]=X90set J00[JI0]=ZB0set JI0=JI0+1set YS0[JI0]=G50set YT0[JI0]=GF0set YR0[JI0]=XA0set J00[JI0]=ZC0set JI0=JI0+1set YS0[JI0]=GT0set YT0[JI0]=H00set J00[JI0]=ZD0set JI0=JI0+1set YS0[JI0]=FU0set YT0[JI0]=XB0set J00[JI0]=ZF0set JI0=JI0+1set YS0[JI0]=FU0set YT0[JI0]=GI0set YR0[JI0]=G00set J00[JI0]=ZG0set JI0=JI0+1set YS0[JI0]=FU0set YT0[JI0]=GO0set YR0[JI0]=G00set J00[JI0]=ZH0set JI0=JI0+1set YS0[JI0]=FU0set YT0[JI0]=GP0set YR0[JI0]=G00set J00[JI0]=ZZ0set JI0=JI0+1set YS0[JI0]=G00set YT0[JI0]=XD0set J00[JI0]=ZV0set JI0=JI0+1set YS0[JI0]=GN0set YT0[JI0]=GP0set YR0[JI0]=H00set J00[JI0]=ZX0set JI0=JI0+1set YS0[JI0]=G10set YT0[JI0]=GA0set YR0[JI0]=XE0set J00[JI0]=ZY0set JI0=JI0+1set YS0[JI0]=G10set YT0[JI0]=GU0set YR0[JI0]=XF0set J00[JI0]=ZJ0set JI0=JI0+1set YS0[JI0]=G10set YT0[JI0]=GZ0set YR0[JI0]=XG0set J00[JI0]=ZK0set JI0=JI0+1set YS0[JI0]=G20set YT0[JI0]=GI0set YR0[JI0]=XH0set J00[JI0]=ZL0set JI0=JI0+1set YS0[JI0]=GJ0set YT0[JI0]=GO0set YR0[JI0]=XZ0set J00[JI0]=ZM0set JI0=JI0+1set YS0[JI0]=H50set YT0[JI0]=GO0set YR0[JI0]=XV0set J00[JI0]=ZN0set JI0=JI0+1set YS0[JI0]=G40set YT0[JI0]=G50set YR0[JI0]=GP0set J00[JI0]=ZT0set JI0=JI0+1set YS0[JI0]=GX0set YT0[JI0]=G00set YR0[JI0]=XW0set J00[JI0]=ZR0set JI0=JI0+1set YS0[JI0]=G20set YT0[JI0]=G20set YR0[JI0]=GP0set YP0[JI0]=XX0set J00[JI0]=ZP0set JI0=JI0+1set YS0[JI0]=ZP0set YT0[JI0]=XX0set J00[JI0]=ZQ0set JI0=JI0+1set YS0[JI0]=ZU0set YT0[JI0]=XX0set J00[JI0]=ZQ0set JI0=JI0+1set YS0[JI0]=GD0set YT0[JI0]=GV0set J00[JI0]=VI0set JI0=JI0+1set YS0[JI0]=GV0set YT0[JI0]=XY0set J00[JI0]=VO0set JI0=JI0+1set YS0[JI0]=H00set YT0[JI0]=HI0set YR0[JI0]=H40set YP0[JI0]=XJ0set J00[JI0]=V20set JI0=JI0+1set YS0[JI0]=GM0set YT0[JI0]=G90set YR0[JI0]=H30set J00[JI0]=V30set JI0=JI0+1set YS0[JI0]=ZB0set YT0[JI0]=ZC0set YR0[JI0]=XK0set J00[JI0]=V40set JI0=JI0+1set YS0[JI0]=ZM0set YT0[JI0]=ZL0set J00[JI0]=V50set JI0=JI0+1set YS0[JI0]=GX0set YT0[JI0]=GX0set YR0[JI0]=XM0set J00[JI0]=V60set JI0=JI0+1set YS0[JI0]=ZA0set YT0[JI0]=G40set YR0[JI0]=G60set J00[JI0]=V70set JI0=JI0+1set YS0[JI0]=G30set YT0[JI0]=G40set YR0[JI0]=XN0set J00[JI0]=V80set JI0=JI0+1set YS0[JI0]=GX0set YT0[JI0]=GJ0set YR0[JI0]=XS0set J00[JI0]=V90set JI0=JI0+1set YS0[JI0]=ZL0set YT0[JI0]=H20set YR0[JI0]=XT0set J00[JI0]=VZ0set JI0=JI0+1set YS0[JI0]=G60set YT0[JI0]=X40set J00[JI0]=VV0set JI0=JI0+1set YS0[JI0]=HI0set YT0[JI0]=ZK0set YR0[JI0]=XP0set J00[JI0]=VW0set JI0=JI0+1set YS0[JI0]=VW0set YT0[JI0]=XP0set J00[JI0]=VX0set JI0=JI0+1set YS0[JI0]=VX0set YT0[JI0]=XP0set J00[JI0]=VY0set JI0=JI0+1set YS0[JI0]=VY0set YT0[JI0]=XP0set J00[JI0]=VJ0set JI0=JI0+1set YS0[JI0]=VJ0set YT0[JI0]=XP0set J00[JI0]=VK0set JI0=JI0+1set YS0[JI0]=HI0set YT0[JI0]=GO0set YR0[JI0]=XQ0set J00[JI0]=VL0set JI0=JI0+1set YS0[JI0]=VL0set YT0[JI0]=XQ0set J00[JI0]=VM0set JI0=JI0+1set YS0[JI0]=VM0set YT0[JI0]=XQ0set J00[JI0]=VN0set JI0=JI0+1set YS0[JI0]=H20set YT0[JI0]=ZA0set YR0[JI0]=XU0set J00[JI0]=VS0set JI0=JI0+1set YS0[JI0]=G70set YT0[JI0]=GQ0set J00[JI0]=VR0set JI0=JI0+1set YS0[JI0]=V80set YT0[JI0]=G70set YR0[JI0]=Y00set J00[JI0]=VQ0set JI0=JI0+1set YS0[JI0]=G70set YT0[JI0]=H50set YR0[JI0]=H50set J00[JI0]=VU0set JI0=JI0+1set YS0[JI0]=GQ0set YT0[JI0]=YI0set J00[JI0]=WI0set JI0=JI0+1set YS0[JI0]=GW0set YT0[JI0]=H30set YR0[JI0]=Y10set J00[JI0]=WO0set JI0=JI0+1set YS0[JI0]=GW0set YT0[JI0]=VI0set YR0[JI0]=YO0set J00[JI0]=W30set JI0=JI0+1set YS0[JI0]=GW0set YT0[JI0]=V10set YR0[JI0]=YO0set J00[JI0]=W30set JI0=JI0+1set YS0[JI0]=H20set YT0[JI0]=H20set YR0[JI0]=GM0set YP0[JI0]=FP0set J00[JI0]=W40set JI0=JI0+1set YS0[JI0]=H20set YT0[JI0]=H20set YR0[JI0]=GM0set YP0[JI0]=FQ0set J00[JI0]=W40set JI0=JI0+1set YS0[JI0]=G80set YT0[JI0]=GN0set YR0[JI0]=HV0set J00[JI0]=W60set JI0=JI0+1set YS0[JI0]=H00set YT0[JI0]=G50set YR0[JI0]=YW0set J00[JI0]=X10set JI0=JI0+1set YS0[JI0]=GM0set YT0[JI0]=GJ0set YR0[JI0]=G20set YP0[JI0]=HI0set J00[JI0]=J10set JI0=JI0+1set YS0[JI0]=ZA0set YT0[JI0]=ZX0set YR0[JI0]=Y40set J00[JI0]=W70set JI0=JI0+1set YS0[JI0]=H20set YT0[JI0]=GY0set YR0[JI0]=H40set J00[JI0]=W80set JI0=JI0+1set YS0[JI0]=H30set YT0[JI0]=GS0set YR0[JI0]=H10set J00[JI0]=W90set JI0=JI0+1set YS0[JI0]=H30set YT0[JI0]=GS0set YR0[JI0]=HO0set J00[JI0]=W90set JI0=JI0+1set YS0[JI0]=G90set YT0[JI0]=GT0set YR0[JI0]=Y50set J00[JI0]=WB0set JI0=JI0+1set YS0[JI0]=GE0set YT0[JI0]=ZR0set YR0[JI0]=YF0set J00[JI0]=WC0set JI0=JI0+1set YS0[JI0]=Z40set YR0[JI0]=Y60set J00[JI0]=WD0set JI0=JI0+1set YS0[JI0]=GR0set YT0[JI0]=ZD0set YR0[JI0]=GV0set YP0[JI0]=Y70set J00[JI0]=WE0set JI0=JI0+1set YS0[JI0]=GR0set YT0[JI0]=ZE0set YR0[JI0]=GV0set YP0[JI0]=Y70set J00[JI0]=WE0set JI0=JI0+1set YS0[JI0]=GE0set YT0[JI0]=GL0set YR0[JI0]=G50set YP0[JI0]=Y80set J00[JI0]=WF0set JI0=JI0+1set YS0[JI0]=V30set YT0[JI0]=ZA0set J00[JI0]=WG0set JI0=JI0+1set YS0[JI0]=GR0set YT0[JI0]=GR0set YR0[JI0]=GS0set YP0[JI0]=GK0set J00[JI0]=WH0set JI0=JI0+1set YS0[JI0]=G00set YT0[JI0]=GD0set YR0[JI0]=G30set YP0[JI0]=Y90set J00[JI0]=WX0set JI0=JI0+1set YS0[JI0]=GY0set YT0[JI0]=GL0set YR0[JI0]=YA0set J00[JI0]=WY0set JI0=JI0+1set YS0[JI0]=ZX0set YT0[JI0]=ZX0set YR0[JI0]=YY0set J00[JI0]=WK0set JI0=JI0+1set YS0[JI0]=FU0set YT0[JI0]=G30set YR0[JI0]=G30set J00[JI0]=WL0set JI0=JI0+1set YS0[JI0]=HG0set YT0[JI0]=GF0set YR0[JI0]=GF0set YP0[JI0]=GF0set YQ0[JI0]=YB0set J00[JI0]=WM0set JI0=JI0+1set YS0[JI0]=HI0set YT0[JI0]=GR0set YR0[JI0]=YC0set J00[JI0]=WN0set JI0=JI0+1set YS0[JI0]=WH0set YT0[JI0]=ZB0set YR0[JI0]=YD0set J00[JI0]=WS0set JI0=JI0+1set YS0[JI0]=H10set YT0[JI0]=GU0set YR0[JI0]=GU0set J00[JI0]=WT0set JI0=JI0+1set YS0[JI0]=HO0set YT0[JI0]=GU0set YR0[JI0]=GU0set J00[JI0]=WT0set JI0=JI0+1set YS0[JI0]=H00set YT0[JI0]=GA0set YR0[JI0]=GA0set YP0[JI0]=YG0set J00[JI0]=WQ0set JI0=JI0+1set YS0[JI0]=H00set YT0[JI0]=GR0set YR0[JI0]=YH0set J00[JI0]=X00set JI0=JI0+1set YS0[JI0]=G80set YT0[JI0]=WP0set J00[JI0]=HW0set JI0=JI0+1set YS0[JI0]=FU0set YT0[JI0]=G90set J00[JI0]=XI0set JI0=JI0+1set YS0[JI0]=GP0set YT0[JI0]=ZY0set YR0[JI0]=YV0set J00[JI0]=HJ0set JI0=JI0+1set YS0[JI0]=HJ0set YT0[JI0]=YV0set J00[JI0]=HJ0set JI0=JI0+1set YS0[JI0]=HK0set YT0[JI0]=YV0set J00[JI0]=HJ0set JI0=JI0+1set YS0[JI0]=GD0set YT0[JI0]=ZK0set YR0[JI0]=YX0set J00[JI0]=XO0set JI0=JI0+1set YS0[JI0]=FU0set YT0[JI0]=GT0set YR0[JI0]=GR0set J00[JI0]=HM0set JI0=JI0+1set YS0[JI0]=HI0set YT0[JI0]=HI0set YR0[JI0]=H30set J00[JI0]=HS0set JI0=JI0+1set YS0[JI0]=ZM0set YT0[JI0]=HV0set J00[JI0]=X20set JI0=JI0+1set YS0[JI0]=ZN0set YT0[JI0]=GQ0set J00[JI0]=X30set JI0=JI0+1set YS0[JI0]=ZJ0set YT0[JI0]=ZD0set J00[JI0]=HR0set JI0=JI0+1set YS0[JI0]=ZJ0set YT0[JI0]=ZE0set J00[JI0]=HP0set JI0=JI0+1set YS0[JI0]=X60set YT0[JI0]=X60set YR0[JI0]=X60set YP0[JI0]=X60set YQ0[JI0]=X60set YU0[JI0]=X60set J00[JI0]=X70endfunctionfunction InitTrig_Recipe_Definitions takes nothing returns nothingcall A5O()endfunctionfunction A6O takes nothing returns nothingset FR0=FR0+1set FJ0[FR0]=1227899226set FK0[FR0]=1227895089set FL0[FR0]=0set FM0[FR0]=1227900249set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JO0=FR0set FR0=FR0+1set FJ0[FR0]=1227894854set FK0[FR0]=1227894852set FL0[FR0]=0set FM0[FR0]=1227900250set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set J20=FR0set FR0=FR0+1set FJ0[FR0]=1227895096set FK0[FR0]=1227894841set FL0[FR0]=0set FM0[FR0]=1227900464set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set J30=FR0set FR0=FR0+1set FJ0[FR0]=1227895097set FK0[FR0]=1227894837set FL0[FR0]=0set FM0[FR0]=1227900470set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set J40=FR0set FR0=FR0+1set FJ0[FR0]=1227895105set FK0[FR0]=1227894855set FL0[FR0]=0set FM0[FR0]=1227900465set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set J50=FR0set FR0=FR0+1set FJ0[FR0]=1227895106set FK0[FR0]=1227894836set FL0[FR0]=0set FM0[FR0]=1227900466set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set J60=FR0set FR0=FR0+1set FJ0[FR0]=1227895112set FK0[FR0]=1227894835set FL0[FR0]=0set FM0[FR0]=1227900467set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set J70=FR0set FR0=FR0+1set FJ0[FR0]=1227895113set FK0[FR0]=1227894834set FL0[FR0]=0set FM0[FR0]=1227900469set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set J80=FR0set FR0=FR0+1set FJ0[FR0]=1227895371set FK0[FR0]=1227894833set FL0[FR0]=0set FM0[FR0]=1227900468set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set J90=FR0set FR0=FR0+1set FJ0[FR0]=1227895372set FK0[FR0]=1227894857set FL0[FR0]=0set FM0[FR0]=1227900485set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JA0=FR0set FR0=FR0+1set FJ0[FR0]=1227899442set FK0[FR0]=1227894856set FL0[FR0]=0set FM0[FR0]=1227900473set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JC0=FR0set FR0=FR0+1set FJ0[FR0]=1227899443set FK0[FR0]=1227894864set FL0[FR0]=0set FM0[FR0]=1227900481set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JD0=FR0set FR0=FR0+1set FJ0[FR0]=1227899444set FK0[FR0]=1227894869set FL0[FR0]=0set FM0[FR0]=1227900471set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JE0=FR0set FR0=FR0+1set FJ0[FR0]=1227899447set FK0[FR0]=1227894832set FL0[FR0]=0set FM0[FR0]=1227900484set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JF0=FR0set FR0=FR0+1set FJ0[FR0]=1227899446set FK0[FR0]=1227895094set FL0[FR0]=0set FM0[FR0]=1227900483set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JG0=FR0set FR0=FR0+1set FJ0[FR0]=1227899445set FK0[FR0]=1227895095set FL0[FR0]=0set FM0[FR0]=1227900482set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JH0=FR0set FR0=FR0+1set FJ0[FR0]=1227899449set FK0[FR0]=1227894863set FL0[FR0]=0set FM0[FR0]=1227900472set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JZ0=FR0set FR0=FR0+1set FJ0[FR0]=1227901493set FK0[FR0]=1227901268set FL0[FR0]=0set FM0[FR0]=1227901258set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JV0=FR0set FR0=FR0+1set FJ0[FR0]=1227901270set FK0[FR0]=1227901269set FL0[FR0]=0set FM0[FR0]=1227901241set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JW0=FR0set FR0=FR0+1set FJ0[FR0]=1227901271set FK0[FR0]=1227901267set FL0[FR0]=0set FM0[FR0]=1227901257set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JX0=FR0set FR0=FR0+1set FJ0[FR0]=1227901272set FK0[FR0]=1227901266set FL0[FR0]=0set FM0[FR0]=1227901249set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JY0=FR0set FR0=FR0+1set FJ0[FR0]=1227901273set FK0[FR0]=1227901265set FL0[FR0]=0set FM0[FR0]=1227901256set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JJ0=FR0set FR0=FR0+1set FJ0[FR0]=1227901274set FK0[FR0]=1227901259set FL0[FR0]=0set FM0[FR0]=1227901255set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JK0=FR0set FR0=FR0+1set FJ0[FR0]=1227901488set FK0[FR0]=1227901260set FL0[FR0]=0set FM0[FR0]=1227901254set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JL0=FR0set FR0=FR0+1set FJ0[FR0]=1227901489set FK0[FR0]=1227901261set FL0[FR0]=0set FM0[FR0]=1227901253set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JM0=FR0set FR0=FR0+1set FJ0[FR0]=1227901490set FK0[FR0]=1227901264set FL0[FR0]=0set FM0[FR0]=1227901252set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JN0=FR0set FR0=FR0+1set FJ0[FR0]=1227901491set FK0[FR0]=1227901263set FL0[FR0]=0set FM0[FR0]=1227901251set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JS0=FR0set FR0=FR0+1set FJ0[FR0]=1227901492set FK0[FR0]=1227901262set FL0[FR0]=0set FM0[FR0]=1227901250set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JT0=FR0set FR0=FR0+1set FJ0[FR0]=1227901238set FK0[FR0]=1227901239set FL0[FR0]=0set FM0[FR0]=1227901240set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JR0=FR0set FR0=FR0+1set FJ0[FR0]=1227901530set FK0[FR0]=1227901523set FL0[FR0]=0set FM0[FR0]=1227901522set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JP0=FR0set FR0=FR0+1set FJ0[FR0]=1227901744set FK0[FR0]=1227901524set FL0[FR0]=0set FM0[FR0]=1227901516set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JQ0=FR0set FR0=FR0+1set FJ0[FR0]=1227901745set FK0[FR0]=1227901525set FL0[FR0]=0set FM0[FR0]=1227901517set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JU0=FR0set FR0=FR0+1set FJ0[FR0]=1227901746set FK0[FR0]=1227901527set FL0[FR0]=0set FM0[FR0]=1227901518set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set K00=FR0set FR0=FR0+1set FJ0[FR0]=1227901747set FK0[FR0]=1227901526set FL0[FR0]=0set FM0[FR0]=1227901521set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KI0=FR0set FR0=FR0+1set FJ0[FR0]=1227901748set FK0[FR0]=1227901529set FL0[FR0]=0set FM0[FR0]=1227901520set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set K10=FR0set FR0=FR0+1set FJ0[FR0]=1227901749set FK0[FR0]=1227901528set FL0[FR0]=0set FM0[FR0]=1227901519set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KO0=FR0set FR0=FR0+1set FJ0[FR0]=1227901769set FK0[FR0]=1227901768set FL0[FR0]=0set FM0[FR0]=1227901770set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set K20=FR0set FR0=FR0+1set FJ0[FR0]=1227902004set FK0[FR0]=1227902005set FL0[FR0]=0set FM0[FR0]=1227902008set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JB0=FR0set FR0=FR0+1set FJ0[FR0]=1227902003set FK0[FR0]=1227902000set FL0[FR0]=0set FM0[FR0]=1227902009set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set K30=FR0set FR0=FR0+1set FJ0[FR0]=1227902002set FK0[FR0]=1227902007set FL0[FR0]=0set FM0[FR0]=1227902017set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set K40=FR0set FR0=FR0+1set FJ0[FR0]=1227902037set FK0[FR0]=1227902038set FL0[FR0]=0set FM0[FR0]=1227902039set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set K50=FR0set FR0=FR0+1set FJ0[FR0]=1227902257set FK0[FR0]=1227902256set FL0[FR0]=0set FM0[FR0]=1227902258set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set K60=FR0set FR0=FR0+1set FJ0[FR0]=1227902261set FK0[FR0]=1227902260set FL0[FR0]=0set FM0[FR0]=1227902259set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set K70=FR0set FR0=FR0+1set FJ0[FR0]=1227902262set FK0[FR0]=1227902263set FL0[FR0]=0set FM0[FR0]=1227902264set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set K80=FR0set FR0=FR0+1set FJ0[FR0]=1227902278set FK0[FR0]=1227902279set FL0[FR0]=0set FM0[FR0]=1227902280set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set K90=FR0set FR0=FR0+1set FJ0[FR0]=1227902285set FK0[FR0]=1227902284set FL0[FR0]=0set FM0[FR0]=1227902286set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KA0=FR0set FR0=FR0+1set FJ0[FR0]=1227902287set FK0[FR0]=1227902288set FL0[FR0]=0set FM0[FR0]=1227902289set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KB0=FR0set FR0=FR0+1set FJ0[FR0]=1227902545set FK0[FR0]=1227902546set FL0[FR0]=0set FM0[FR0]=1227902547set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KC0=FR0set FR0=FR0+1set FJ0[FR0]=1227902548set FK0[FR0]=1227902549set FL0[FR0]=0set FM0[FR0]=1227902550set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KD0=FR0set FR0=FR0+1set FJ0[FR0]=1227902551set FK0[FR0]=1227902552set FL0[FR0]=0set FM0[FR0]=1227902553set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KE0=FR0set FR0=FR0+1set FJ0[FR0]=1227902554set FK0[FR0]=1227902768set FL0[FR0]=0set FM0[FR0]=1227902769set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KF0=FR0set FR0=FR0+1set FJ0[FR0]=1227902802set FK0[FR0]=1227902803set FL0[FR0]=0set FM0[FR0]=1227902804set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KG0=FR0set FR0=FR0+1set FJ0[FR0]=1227903047set FK0[FR0]=1227903048set FL0[FR0]=0set FM0[FR0]=1227903049set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KH0=FR0set FR0=FR0+1set FJ0[FR0]=1227903050set FK0[FR0]=1227903051set FL0[FR0]=0set FM0[FR0]=1227903052set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KZ0=FR0set FR0=FR0+1set FJ0[FR0]=1227903056set FK0[FR0]=1227903057set FL0[FR0]=0set FM0[FR0]=1227903058set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KV0=FR0set FR0=FR0+1set FJ0[FR0]=1227903059set FK0[FR0]=1227903060set FL0[FR0]=0set FM0[FR0]=1227903061set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KW0=FR0set FR0=FR0+1set FJ0[FR0]=1227903062set FK0[FR0]=1227903063set FL0[FR0]=0set FM0[FR0]=1227903064set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KX0=FR0set FR0=FR0+1set FJ0[FR0]=1227903280set FK0[FR0]=1227903282set FL0[FR0]=0set FM0[FR0]=1227903284set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KJ0=FR0set FR0=FR0+1set FJ0[FR0]=1227903281set FK0[FR0]=1227903283set FL0[FR0]=0set FM0[FR0]=1227903285set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KY0=FR0set FR0=FR0+1set FJ0[FR0]=1227903308set FK0[FR0]=1227903309set FL0[FR0]=0set FM0[FR0]=1227903310set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KK0=FR0set FR0=FR0+1set FJ0[FR0]=1227903311set FK0[FR0]=1227903312set FL0[FR0]=0set FM0[FR0]=1227903313set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KL0=FR0endfunctionfunction InitTrig_Aghanims_Scepter_Definitions takes nothing returns nothingcall A6O()endfunctionfunction A7O takes unit TLI returns nothinglocal real xlocal real yif NZI(GetOwningPlayer(TLI))thenset x=GetRectCenterX(O4)set y=GetRectCenterY(O4)elseset x=GetRectCenterX(S3)set y=GetRectCenterY(S3)endifcall IssuePointOrder(TLI,"move",x,y)endfunctionfunction A8O takes nothing returns nothinglocal item OT1=GetEnumItem()if GetWidgetLife(OT1)>0 and GetItemPlayer(OT1)==KU0 and L10==0 and IsItemVisible(OT1)==true thenset L10=L10+1call UnitAddItem(L00,OT1)endifset OT1=nullendfunctionfunction A9O takes nothing returns nothinglocal item OT1=GetEnumItem()if GetWidgetLife(OT1)>0 and GetItemPlayer(OT1)==KU0 and IsItemVisible(OT1)==true thencall UnitAddItem(LI0,OT1)endifset OT1=nullendfunctionfunction AAO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit OWO=(LoadUnitHandle(XY,(MKI),(92)))local player p=(LoadPlayerHandle(XY,(MKI),(54)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local rect r=Rect(x-300,y-300,x+300,y+300)if GetTriggerEventId()==EVENT_WIDGET_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)set KU0=pset L00=TLIset LI0=OWOcall EnumItemsInRect(r,Condition(function LWI),function A9O)elseif GetTriggerEvalCount(t)>9 thencall FlushChildHashtable(XY,(MKI))call MZI(t)set KU0=pset L00=TLIset LI0=OWOcall EnumItemsInRect(r,Condition(function LWI),function A9O)elseset KU0=pset L00=TLIset L10=0call EnumItemsInRect(r,Condition(function LWI),function A8O)endifendifcall RemoveRect(r)set t=nullset TLI=nullset OWO=nullset r=nullreturn falseendfunctionfunction ABO takes unit OWO,unit TLI returns nothinglocal player p=GetOwningPlayer(TLI)local integer ilocal item OT1local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real x=GetUnitX(OWO)local real y=GetUnitY(OWO)local integer CN1if IsTerrainPathable(x,y,PATHING_TYPE_WALKABILITY)thenset x=GetUnitX(TLI)set y=GetUnitY(TLI)endifcall TriggerRegisterDeathEvent(t,TLI)call TriggerRegisterTimerEvent(t,0.01,true)call TriggerAddCondition(t,Condition(function AAO))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(92),(OWO))call SavePlayerHandle(XY,(MKI),(54),(p))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))set i=0loopexitwhen i>5set OT1=UnitItemInSlot(OWO,i)set CN1=CR1(OT1)if OT1!=null and GetItemPlayer(OT1)==p and DI1(OT1)==false and(CN1!=HB0 and CN1!=HC0 and CN1!=HD0 and CN1!=HE0 and CN1!=HF0)thencall UnitRemoveItem(OWO,OT1)call SetItemPosition(OT1,x,y)endifset i=i+1endloopset t=nullset OT1=nullendfunctionfunction ACO takes unit OM1 returns booleanlocal integer ADO=GetUnitCurrentOrder(OM1)return(ADO==0)or(ADO==851973)or(ADO==851975)or(ADO==851987)or(ADO==851993)endfunctionfunction AEO takes trigger t returns nothinglocal integer MKI=GetHandleId(t)local unit OWO=(LoadUnitHandle(XY,(MKI),(92)))local unit N0I=(LoadUnitHandle(XY,(MKI),(2)))local real xlocal real ylocal real AFOlocal real AGOlocal real AHOlocal real AZOlocal real AVOlocal real P3Ilocal real AWOlocal real AXO=GetUnitX(N0I)local real AYO=GetUnitY(N0I)if(ACO(N0I)==false)thenset x=GetUnitX(N0I)set y=GetUnitY(N0I)set AZO=(LoadReal(XY,(MKI),(677)))set AVO=(LoadReal(XY,(MKI),(678)))call SaveReal(XY,(MKI),(677),((x)*1.0))call SaveReal(XY,(MKI),(678),((y)*1.0))set AHO=Atan2(y-AVO,x-AZO)set AFO=SquareRoot((x-AZO)*(x-AZO)+(y-AVO)*(y-AVO))/0.2set AGO=GetUnitMoveSpeed(OWO)set P3I=PAI(GetUnitX(N0I),GetUnitY(N0I),GetUnitX(OWO),GetUnitY(OWO))set AWO=RAbsBJ(AHO*bj_RADTODEG-GetUnitFacing(OWO))if(P3I<AGO-AFO and AGO>AFO)or(P3I<RMaxBJ(AGO,AFO)and AWO>=90)thenelseset AXO=x+AFO*Cos(AHO)set AYO=y+AFO*Sin(AHO)endifendifcall SaveInteger(XY,(MKI),(679),(1))call IssuePointOrder(OWO,"move",AXO,AYO)set OWO=nullset N0I=nullset t=nullendfunctionfunction AJO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit OWO=(LoadUnitHandle(XY,(MKI),(92)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real xlocal real ylocal integer ilocal player p=GetOwningPlayer(TLI)local item OT1if GetTriggerEventId()==EVENT_WIDGET_DEATH thenif GetTriggerUnit()==TLI thencall A7O(OWO)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER or GetTriggerEventId()==EVENT_UNIT_ISSUED_TARGET_ORDER or GetTriggerEventId()==EVENT_UNIT_ISSUED_POINT_ORDER thenif(LoadInteger(XY,(MKI),(679)))==1 thencall SaveInteger(XY,(MKI),(679),(0))elseif GetIssuedOrderId()!=852100 and GetIssuedOrderId()!=852090 thencall MZI(t)endifelseif P8I(OWO,TLI)<150 thencall FlushChildHashtable(XY,(MKI))call MZI(t)call ABO(OWO,TLI)call A7O(OWO)elsecall AEO(t)endifendifset t=nullset OWO=nullset TLI=nullset OT1=nullreturn falseendfunctionfunction AKO takes unit N0I,boolean ALO returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit OWO=GetSellingUnit()local integer AMO=(LoadInteger(XY,(GetHandleId(OWO)),(8000)))if N0I!=null thenif N0I!=(LoadUnitHandle(XY,(GetHandleId(OWO)),(8002+AMO)))and ALO thenset AMO=AMO+1call SaveInteger(XY,(GetHandleId(OWO)),(8000),(AMO))call SaveUnitHandle(XY,(GetHandleId(OWO)),(8002+AMO),(N0I))endifcall SaveReal(XY,(MKI),(677),((GetUnitX(N0I))*1.0))call SaveReal(XY,(MKI),(678),((GetUnitY(N0I))*1.0))call IssueTargetOrder(OWO,"move",N0I)call TriggerRegisterDeathEvent(t,OWO)call TriggerRegisterDeathEvent(t,N0I)call TriggerRegisterUnitEvent(t,OWO,EVENT_UNIT_ISSUED_ORDER)call TriggerRegisterUnitEvent(t,OWO,EVENT_UNIT_ISSUED_TARGET_ORDER)call TriggerRegisterUnitEvent(t,OWO,EVENT_UNIT_ISSUED_POINT_ORDER)call TriggerRegisterTimerEvent(t,0.2,true)call TriggerAddCondition(t,Condition(function AJO))call SaveUnitHandle(XY,(MKI),(2),(N0I))call SaveUnitHandle(XY,(MKI),(92),(OWO))endifset t=nullset OWO=nullendfunctionfunction ANO takes nothing returns nothinglocal item OT1=GetEnumItem()local unit u=LJ0local player p=GetOwningPlayer(u)local integer id=GetPlayerId(p)if GetWidgetLife(OT1)>0 and GetItemPlayer(OT1)==p and IsItemVisible(OT1)==true thencall SetItemPosition(OT1,DI0[id],D10[id])call UnitAddItem(L20,OT1)endifset OT1=nullset u=nullset p=nullendfunctionfunction ASO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit u=(LoadUnitHandle(XY,(MKI),(53)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))set LJ0=uset L20=TLIif NZI(GetOwningPlayer(LJ0))thencall EnumItemsInRect(G5,Condition(function LWI),function ANO)elsecall EnumItemsInRect(H5,Condition(function LWI),function ANO)endifif GetTriggerEvalCount(t)==3 thencall KillUnit(u)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset u=nullreturn falseendfunctionfunction ATO takes unit N0I returns nothinglocal unit u=GetSoldUnit()local integer i=0local item OT1local integer id=GetPlayerId(GetOwningPlayer(u))local region r=CreateRegion()local trigger tlocal integer MKIlocal unit TLI=GetSellingUnit()if NZI(GetOwningPlayer(u))thencall RegionAddRect(r,G5)elsecall RegionAddRect(r,H5)endifif IsUnitInRegion(r,TLI)thenset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.05,true)call TriggerAddCondition(t,Condition(function ASO))call SaveUnitHandle(XY,(MKI),(53),(u))call SaveUnitHandle(XY,(MKI),(2),(TLI))loopexitwhen i>5set OT1=UnitItemInSlot(TLI,i)if CS1(CR1(OT1))==false and CR1(OT1)!=VG0 and DI1(OT1)==false thencall UnitRemoveItemFromSlot(TLI,i)if IsUnitInRegion(r,TLI)and IsPlayerAlly(GetItemPlayer(OT1),GetOwningPlayer(TLI))==true thenset id=GetPlayerId(GetItemPlayer(OT1))call SetItemPosition(OT1,DI0[id],D10[id])endifendifset i=i+1endloopendifcall RemoveRegion(r)set u=nullset r=nullendfunctionfunction ARO takes unit u returns stringlocal string s=GetObjectName(1848657487)set s=EA1(s,"$hero",C0[GetPlayerId(GetOwningPlayer(u))]+GetUnitName(u)+"|r")return sendfunctionfunction APO takes unit TLI returns booleanif GetOwningPlayer(TLI)!=GetLocalPlayer()thencall DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,15,ARO(K1[GetPlayerId(GetOwningPlayer(TLI))]))endifreturn falseendfunctionfunction AQO takes nothing returns nothingif GetUnitTypeId(GetSoldUnit())==1747990581 thenif K1[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]!=null and QPI(K1[GetPlayerId(GetOwningPlayer(GetSoldUnit()))])==false thencall AKO(K1[GetPlayerId(GetOwningPlayer(GetSoldUnit()))],true)endifcall KillUnit(GetSoldUnit())elseif GetUnitTypeId(GetSoldUnit())==1747993174 thenif K1[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]!=null thencall ATO(K1[GetPlayerId(GetOwningPlayer(GetSoldUnit()))])endifcall KillUnit(GetSoldUnit())elseif GetUnitTypeId(GetSoldUnit())==1747993669 thenif K1[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]!=null thencall AKO((LoadUnitHandle(XY,(GetHandleId(GetSellingUnit())),(8002+(LoadInteger(XY,(GetHandleId(GetSellingUnit())),(8000)))-1))),false)endifcall KillUnit(GetSoldUnit())elseif F11(GetUnitTypeId(GetSoldUnit()))thenif K1[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]!=null thenif QPI(K1[GetPlayerId(GetOwningPlayer(GetSoldUnit()))])==true and GetOwningPlayer(GetSoldUnit())==GetOwningPlayer(GetSellingUnit())and((LoadInteger(XY,(GetHandleId((K1[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]))),((4304))))==1)==false and(HS[GetPlayerId((GetOwningPlayer(GetSoldUnit())))]==false)thencall APO(K1[GetPlayerId(GetOwningPlayer(GetSoldUnit()))])set LO0=truecall ReviveHero(K1[GetPlayerId(GetOwningPlayer(GetSoldUnit()))],GetUnitX(GetSoldUnit()),GetUnitY(GetSoldUnit()),true)set LO0=falsecall SetUnitState(K1[GetPlayerId(GetOwningPlayer(GetSoldUnit()))],UNIT_STATE_MANA,10000)set EW0[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]=IMaxBJ(0,EW0[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]-FS[FO1(GetHeroLevel(K1[GetPlayerId(GetOwningPlayer(GetSellingUnit()))]))])call F91(GetOwningPlayer(GetSoldUnit()))elsecall SetPlayerState(GetOwningPlayer(GetSoldUnit()),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(GetOwningPlayer(GetSoldUnit()),PLAYER_STATE_RESOURCE_GOLD)+FS[FO1(GetHeroLevel(K1[GetPlayerId(GetOwningPlayer(GetSellingUnit()))]))])if(HS[GetPlayerId((GetOwningPlayer(GetSoldUnit())))]==false)==false thencall R1I(GetOwningPlayer(GetSoldUnit()),GetObjectName(1848659508))endifendifendifcall KillUnit(GetSoldUnit())endifendfunctionfunction B0O takes player KUI,unit N3I,integer BIO,integer i0,integer i1,integer i2,integer i3,integer i4,integer i5 returns nothinglocal item OT1call DisableTrigger(LG0)if i0>0 thenset OT1=UnitItemInSlot(N3I,0)call D81(OT1)endifif i1>0 thenset OT1=UnitItemInSlot(N3I,1)call D81(OT1)endifif i2>0 thenset OT1=UnitItemInSlot(N3I,2)call D81(OT1)endifif i3>0 thenset OT1=UnitItemInSlot(N3I,3)call D81(OT1)endifif i4>0 thenset OT1=UnitItemInSlot(N3I,4)call D81(OT1)endifif i5>0 thenset OT1=UnitItemInSlot(N3I,5)call D81(OT1)endifset OT1=UnitAddItemById(N3I,FK0[BIO])call SetItemPlayer(OT1,KUI,true)call SetItemUserData(OT1,0)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl",N3I,"origin"))if CR1(OT1)==WG0 thencall SetItemCharges(OT1,8)endifcall EnableTrigger(LG0)if IsPlayerAlly(GetLocalPlayer(),KUI)==true thenif BIO==V40 thencall DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,4,C0[GetPlayerId(KUI)]+(D30[GetPlayerId((KUI))])+"|r |c00ffff00"+GetObjectName(1848659032)+"|r")elseif BIO==VR0 thencall DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,4,C0[GetPlayerId(KUI)]+(D30[GetPlayerId((KUI))])+"|r |c00ffff00"+GetObjectName(1848659033)+"|r")endifendifset OT1=nullendfunctionfunction B1O takes player p,unit N3I,integer CN1 returns booleanlocal integer ilocal integer xlocal integer ylocal integer array BOOlocal boolean array B2Olocal integer array B3Olocal boolean array B4Olocal boolean array E31local integer array DR1local player KUIlocal integer B5O=1local integer klocal player array B6Olocal integer mlocal item B7Olocal item B8Olocal item B9Olocal item BAOlocal item BBOlocal item BCOlocal player BDOlocal player BEOlocal player BFOlocal player BGOlocal player BHOlocal player BZOlocal integer BVOlocal integer BWOlocal integer BXOlocal integer BYOlocal integer BJOlocal integer BKOlocal integer BLOlocal integer BMOlocal integer BNOlocal integer BSOlocal integer BTOlocal integer BROlocal boolean BPO=falselocal boolean BQO=trueset B7O=UnitItemInSlot(N3I,0)set B8O=UnitItemInSlot(N3I,1)set B9O=UnitItemInSlot(N3I,2)set BAO=UnitItemInSlot(N3I,3)set BBO=UnitItemInSlot(N3I,4)set BCO=UnitItemInSlot(N3I,5)set BDO=GetItemPlayer(B7O)set BEO=GetItemPlayer(B8O)set BFO=GetItemPlayer(B9O)set BGO=GetItemPlayer(BAO)set BHO=GetItemPlayer(BBO)set BZO=GetItemPlayer(BCO)set BVO=GetItemUserData(B7O)set BWO=GetItemUserData(B8O)set BXO=GetItemUserData(B9O)set BYO=GetItemUserData(BAO)set BJO=GetItemUserData(BBO)set BKO=GetItemUserData(BCO)set BLO=CR1(B7O)set BMO=CR1(B8O)set BNO=CR1(B9O)set BSO=CR1(BAO)set BTO=CR1(BBO)set BRO=CR1(BCO)if(GetPlayerSlotState((p))==PLAYER_SLOT_STATE_LEFT)thenset B5O=5set BPO=trueendifset B6O[1]=pif BPO thenset k=2set m=1loopexitwhen k>B5Oif NZI(p)thenif p!=BO[m]thenset B6O[k]=BO[m]set k=k+1endifelseif p!=CO[m]thenset B6O[k]=CO[m]set k=k+1endifendifset m=m+1endloopendifset k=1loopexitwhen k>B5Oset KUI=B6O[k]set i=0if B7O!=null and BVO==1 and(BDO==KUI or EL or(GetPlayerSlotState((BDO))==PLAYER_SLOT_STATE_LEFT)==true)thenset BOO[i+1]=BLOelseset BOO[i+1]=0endifset i=1if B8O!=null and BWO==1 and(BEO==KUI or EL or(GetPlayerSlotState((BEO))==PLAYER_SLOT_STATE_LEFT)==true)thenset BOO[i+1]=BMOelseset BOO[i+1]=0endifset i=2if B9O!=null and BXO==1 and(BFO==KUI or EL or(GetPlayerSlotState((BFO))==PLAYER_SLOT_STATE_LEFT)==true)thenset BOO[i+1]=BNOelseset BOO[i+1]=0endifset i=3if BAO!=null and BYO==1 and(BGO==KUI or EL or(GetPlayerSlotState((BGO))==PLAYER_SLOT_STATE_LEFT)==true)thenset BOO[i+1]=BSOelseset BOO[i+1]=0endifset i=4if BBO!=null and BJO==1 and(BHO==KUI or EL or(GetPlayerSlotState((BHO))==PLAYER_SLOT_STATE_LEFT)==true)thenset BOO[i+1]=BTOelseset BOO[i+1]=0endifset i=5if BCO!=null and BKO==1 and(BZO==KUI or EL or(GetPlayerSlotState((BZO))==PLAYER_SLOT_STATE_LEFT)==true)thenset BOO[i+1]=BROelseset BOO[i+1]=0endifset BOO[0]=CN1set i=1loopexitwhen i>(JI0)set B3O[0]=YS0[i]set B3O[1]=YT0[i]set B3O[2]=YR0[i]set B3O[3]=YP0[i]set B3O[4]=YQ0[i]if BQO thenset B4O[0]=trueset B4O[1]=trueset B4O[2]=trueset B4O[3]=trueset B4O[4]=trueset B4O[5]=trueset B4O[6]=trueset B2O[0]=trueset B2O[1]=trueset B2O[2]=trueset B2O[3]=trueset B2O[4]=trueset B2O[5]=trueset B2O[6]=trueset DR1[0]=0set DR1[1]=0set DR1[2]=0set DR1[3]=0set DR1[4]=0set DR1[5]=0set DR1[6]=0set BQO=falseendifset E31[0]=falseset E31[1]=falseset E31[2]=falseset E31[3]=falseset E31[4]=falseset x=0loopexitwhen x==5if B3O[x]==0 thenset E31[x]=trueelseset y=0loopexitwhen y==7if BOO[y]==B3O[x]and B2O[y]and B4O[x]thenset B2O[y]=falseset B4O[x]=falseset E31[x]=trueset DR1[y]=1set y=7set BQO=trueelseset y=y+1endifendloopendifif E31[x]==true thenset x=x+1elseset x=5endifendloopif E31[0]and E31[1]and E31[2]and E31[3]and E31[4]thencall B0O(KUI,N3I,J00[i],DR1[1],DR1[2],DR1[3],DR1[4],DR1[5],DR1[6])set i=JI0+2elseset i=i+1endifendloopset WK=DR1[0]==1if i==(JI0+2)thenset B7O=nullset B8O=nullset B9O=nullset BAO=nullset BBO=nullset BCO=nullreturn trueendifset k=k+1endloopset B7O=nullset B8O=nullset B9O=nullset BAO=nullset BBO=nullset BCO=nullreturn falseendfunctionfunction BUO takes player KUI,unit N3I,integer CN1 returns booleanlocal integer i=1local boolean DR1set WK=falseset DR1=B1O(KUI,N3I,CN1)return DR1endfunctionfunction C0O takes nothing returns booleanif IsUnitAlly(GetFilterUnit(),GetOwningPlayer(CK))==true and GetUnitAbilityLevel(GetFilterUnit(),1097625443)==0 and UnitInventorySize(GetFilterUnit())>1 and GetUnitTypeId(GetFilterUnit())!=1852010352 and GetPlayerAlliance(GetOwningPlayer(GetFilterUnit()),GetOwningPlayer(CK),ALLIANCE_SHARED_CONTROL)and GetOwningPlayer(CK)!=GetOwningPlayer(GetFilterUnit())and IsUnitIllusion(GetFilterUnit())==false and QPI(GetFilterUnit())==false thenif T4I(GetFilterUnit())==true thenset TJ=TJ+1set DK=GetFilterUnit()endifendifreturn falseendfunctionfunction CIO takes nothing returns booleanif IsUnitAlly(GetFilterUnit(),GetOwningPlayer(CK))==true and GetUnitAbilityLevel(GetFilterUnit(),1097625443)==0 and UnitInventorySize(GetFilterUnit())>1 and GetUnitTypeId(GetFilterUnit())!=1852010352 and IsUnitIllusion(GetFilterUnit())==false and QPI(GetFilterUnit())==false thenif GetOwningPlayer(CK)==GetOwningPlayer(GetFilterUnit())thenif IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true thenif GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 thenset DK=GetFilterUnit()endifelseif IsUnitType(DK,UNIT_TYPE_HERO)==false thenset DK=GetFilterUnit()endifendifendifreturn falseendfunctionfunction C1O takes unit N3I,integer COO returns unitlocal group g=MDI()set CK=N3Iset DK=nullcall GroupEnumUnitsInRange(g,GetUnitX(EK),GetUnitY(EK),1300+COO,Condition(function CIO))if DK==null thenset TJ=0call MCI(g)set g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(EK),GetUnitY(EK),1100+COO,Condition(function C0O))if TJ>1 thenset DK=nullendifendifcall MCI(g)set g=nullreturn DKendfunctionfunction C2O takes player KUI,unit N3I,unit C3O,integer CN1,real x,real y,integer D51,integer C4O returns nothinglocal unit C5Olocal item D61set EK=C3Oif GetUnitPointValue(N3I)==200 thenset C5O=C1O(N3I,0)if C5O==null thenset C5O=C1O(N3I,300)endifelseset C5O=N3Iendifif C5O==null or BUO(KUI,C5O,CM1(CN1))==false or WK==false thenif D21(CM1(CN1))thenif DF1(C5O)==0 or C5O==null thencall D71(FJ0[CN1],x,y,KUI,true,D51)elseset D61=UnitAddItemById(C5O,FK0[CN1])call SetItemCharges(D61,D51)call SetItemPlayer(D61,KUI,true)call SetItemUserData(D61,C4O)endifelseif DO1(CM1(CN1))thenif C5O==null or(DF1(C5O)==0 and DB1(C5O,FK0[CN1])==null)thencall D71(FJ0[CN1],x,y,KUI,true,DK1(CN1))elseset D61=CreateItem(FJ0[CN1],x,y)call SetItemPlayer(D61,KUI,true)call SetItemUserData(D61,C4O)call SetItemCharges(D61,DK1(CN1))call UnitAddItem(C5O,D61)endifelseif DF1(C5O)==0 or C5O==null thencall D71(FJ0[CN1],x,y,KUI,false,0)elseset D61=UnitAddItemById(C5O,FK0[CN1])call SetItemPlayer(D61,KUI,true)call SetItemUserData(D61,0)endifendifelseif IsUnitType(C5O,UNIT_TYPE_HERO)==true thenif C4O==0 thencall E71("PUI_"+I2S(GetPlayerId(GetOwningPlayer(C5O))),FK0[CM1(CN1)])endifendifendifset C5O=nullset D61=nullendfunctionfunction C6O takes player p,integer CN1 returns nothinglocal integer i=GetPlayerId(p)if CN1==HQ0 thenset E[i]=E[i]+1elseif CN1==Z00 thenset E[i]=E[i]+1elseif CN1==ZI0 thenset E[i]=E[i]+3elseif CN1==ZO0 thenset E[i]=E[i]+2set F[i]=F[i]+2elseif CN1==Z20 thenset E[i]=E[i]+2set F[i]=F[i]+2elseif CN1==Z30 thenset E[i]=E[i]+1elseif CN1==Z70 thenset E[i]=E[i]+2elseif CN1==HU0 thenset E[i]=E[i]+2elseif CN1==Z80 thenset E[i]=E[i]+2endifendfunctionfunction C7O takes unit C8O,unit C9O returns booleanlocal integer CN1if GetUnitTypeId(C9O)==1311788365 thenreturn trueendifif(C8O==BW0 or C8O==BH0)and IsUnitAlly(C9O,CO[0])thenreturn falseelseif(C8O==RQ or C8O==NQ)and IsUnitAlly(C9O,BO[0])thenreturn falseendifset CN1=DW1(C9O)if CN1==ZO0 or CN1==GB0 or CN1==Z90 thenreturn trueendifreturn falseendfunctionfunction CAO takes unit C3O,unit CBO returns realif C3O==NQ or C3O==SQ or C3O==TQ or C3O==RQ or C3O==PQ or C3O==QQ or C3O==UQ or C3O==I00 or C3O==II0 or C3O==I10 thenreturn DI0[GetPlayerId(GetOwningPlayer(CBO))]elseif C3O==BH0 or C3O==BZ0 or C3O==BV0 or C3O==BW0 or C3O==BX0 or C3O==BY0 or C3O==BJ0 or C3O==BK0 or C3O==BL0 or C3O==BM0 thenreturn DI0[GetPlayerId(GetOwningPlayer(CBO))]elseif C3O==FY or C3O==WZ thenreturn-7133.0elseif C3O==GY or C3O==HY thenreturn 7207.0endifreturn GetUnitX(CBO)endfunctionfunction CCO takes unit C3O,unit CBO returns realif C3O==NQ or C3O==SQ or C3O==TQ or C3O==RQ or C3O==PQ or C3O==QQ or C3O==UQ or C3O==I00 or C3O==II0 or C3O==I10 thenreturn D10[GetPlayerId(GetOwningPlayer(CBO))]elseif C3O==BH0 or C3O==BZ0 or C3O==BV0 or C3O==BW0 or C3O==BX0 or C3O==BY0 or C3O==BJ0 or C3O==BK0 or C3O==BL0 or C3O==BM0 thenreturn D10[GetPlayerId(GetOwningPlayer(CBO))]elseif C3O==FY or C3O==WZ thenreturn 4317.0elseif C3O==GY or C3O==HY thenreturn-4243.0endifreturn GetUnitY(CBO)endfunctionfunction CDO takes unit C3O,unit CBO returns realif C3O==NQ or C3O==SQ or C3O==TQ or C3O==RQ or C3O==PQ or C3O==QQ or C3O==UQ or C3O==I00 or C3O==II0 or C3O==I10 thenreturn GetRectCenterX(O4)elseif C3O==BH0 or C3O==BZ0 or C3O==BV0 or C3O==BW0 or C3O==BX0 or C3O==BY0 or C3O==BJ0 or C3O==BK0 or C3O==BL0 or C3O==BM0 thenreturn GetRectCenterX(S3)endifreturn GetUnitX(CBO)endfunctionfunction CEO takes unit C3O,unit CBO returns realif C3O==NQ or C3O==SQ or C3O==TQ or C3O==RQ or C3O==PQ or C3O==QQ or C3O==UQ or C3O==I00 or C3O==II0 or C3O==I10 thenreturn GetRectCenterY(O4)elseif C3O==BH0 or C3O==BZ0 or C3O==BV0 or C3O==BW0 or C3O==BX0 or C3O==BY0 or C3O==BJ0 or C3O==BK0 or C3O==BL0 or C3O==BM0 thenreturn GetRectCenterY(S3)endifreturn GetUnitY(CBO)endfunctionfunction UnitItem_Delayed_Expire takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local player p=(LoadPlayerHandle(XY,(MKI),(54)))local unit u=(LoadUnitHandle(XY,(MKI),(53)))local unit s=(LoadUnitHandle(XY,(MKI),(94)))local integer CN1=(LoadInteger(XY,(MKI),(93)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local integer D51=(LoadInteger(XY,(MKI),(76)))call C2O(p,u,s,CM1(CN1),x,y,D51,0)call ShowUnit(u,false)call UnitApplyTimedLife(u,1112820806,2)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset p=nullset u=nullreturn falseendfunctionfunction CFO takes nothing returns nothinglocal unit u=GetSoldUnit()local player p=GetOwningPlayer(u)local integer CN1=DW1(u)local real xlocal real yif C7O(GetSellingUnit(),u)thencall R1I(p,GetObjectName(1848652359))if IsUnitAlly(u,BO[0])thenset p=CO[0]elseset p=BO[0]endifset x=CDO(GetSellingUnit(),u)set y=CEO(GetSellingUnit(),u)call D71(FJ0[DW1(u)],x,y,p,true,DK1(DW1(u)))elsecall C6O(p,CM1(CN1))if FK0[CN1]==0 thencall R1I(p,GetObjectName(1848652360))elseset x=CAO(GetSellingUnit(),u)set y=CCO(GetSellingUnit(),u)if CN1==Z70 thencall C2O(p,u,GetSellingUnit(),CM1(CN1),x,y,2,0)elsecall C2O(p,u,GetSellingUnit(),CM1(CN1),x,y,0,0)endifendifendifcall UnitAddAbility(u,1097625443)call ShowUnit(u,false)call UnitApplyTimedLife(u,1112820806,2)set u=nullset p=nullendfunctionfunction CGO takes nothing returns booleanif JS==false thenif GetUnitPointValue(GetSoldUnit())>=200 thencall CFO()if IsPlayerAlly(GetLocalPlayer(),GetOwningPlayer(GetSoldUnit()))or(C2 and(GetLocalPlayer()==DO0 or GetLocalPlayer()==D20))thenif GetUnitTypeId(GetSoldUnit())==1747989062 thencall PingMinimapEx(GetUnitX(GetSoldUnit()),GetUnitY(GetSoldUnit()),3,255,255,255,false)call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,20,C0[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]+(D30[GetPlayerId((GetOwningPlayer(GetSoldUnit())))])+"|r |c00ffff00"+GetObjectName(1848658005)+"|r")elseif GetUnitTypeId(GetSoldUnit())==1747989329 thencall PingMinimapEx(GetUnitX(GetSoldUnit()),GetUnitY(GetSoldUnit()),3,255,255,255,false)call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,20,C0[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]+(D30[GetPlayerId((GetOwningPlayer(GetSoldUnit())))])+"|r |c00ffff00"+GetObjectName(1848658759)+"|r")elseif GetUnitTypeId(GetSoldUnit())==1747990326 thencall DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,4,C0[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]+(D30[GetPlayerId((GetOwningPlayer(GetSoldUnit())))])+"|r |c00ffff00"+GetObjectName(1848658767)+"|r")elseif GetUnitTypeId(GetSoldUnit())==1747989059 thencall PingMinimapEx(GetUnitX(GetSoldUnit()),GetUnitY(GetSoldUnit()),3,255,255,255,false)call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,4,C0[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]+(D30[GetPlayerId((GetOwningPlayer(GetSoldUnit())))])+"|r |c00ffff00"+GetObjectName(1848658768)+"|r")elseif GetUnitTypeId(GetSoldUnit())==1747989060 thencall PingMinimapEx(GetUnitX(GetSoldUnit()),GetUnitY(GetSoldUnit()),3,255,255,255,false)call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,4,C0[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]+(D30[GetPlayerId((GetOwningPlayer(GetSoldUnit())))])+"|r |c00ffff00"+GetObjectName(1848658769)+"|r")elseif GetUnitTypeId(GetSoldUnit())==1747993153 thencall PingMinimapEx(GetUnitX(GetSoldUnit()),GetUnitY(GetSoldUnit()),3,255,255,255,false)call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,4,C0[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]+(D30[GetPlayerId((GetOwningPlayer(GetSoldUnit())))])+"|r |c00ffff00"+GetObjectName(1848658772)+"|r")elseif GetUnitTypeId(GetSoldUnit())==1747988807 thencall PingMinimapEx(GetUnitX(GetSoldUnit()),GetUnitY(GetSoldUnit()),3,255,255,255,false)call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,4,C0[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]+(D30[GetPlayerId((GetOwningPlayer(GetSoldUnit())))])+"|r |c00ffff00"+GetObjectName(1848659010)+"|r")elseif GetUnitTypeId(GetSoldUnit())==1747993651 thencall PingMinimapEx(GetUnitX(GetSoldUnit()),GetUnitY(GetSoldUnit()),3,255,255,255,false)call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,4,C0[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]+(D30[GetPlayerId((GetOwningPlayer(GetSoldUnit())))])+"|r |c00ffff00"+GetObjectName(1848659024)+"|r")endifendifelsecall AQO()endifelseendifreturn falseendfunctionfunction CZO takes unit u returns booleanlocal integer id=GetUnitTypeId(u)return id==1164277353 or id==1164277357 or id==1160786518 or id==1160786519 or id==1160786517endfunctionfunction CVO takes unit N0I,item OT1 returns nothinglocal unit u=N0Ilocal integer CU1=GetUnitTypeId(u)local integer CN1=CP1(OT1)if IsUnitType(u,UNIT_TYPE_MELEE_ATTACKER)==true or IsUnitType(u,UNIT_TYPE_HERO)==false thenif CN1==W50 thenset VK=GetItemPlayer(OT1)call D81(OT1)set FK=UnitAddItemById(u,FK0[W40])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==HZ0 thenset VK=GetItemPlayer(OT1)call D81(OT1)set FK=UnitAddItemById(u,FK0[HH0])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==HO0 thenset VK=GetItemPlayer(OT1)call D81(OT1)set FK=UnitAddItemById(u,FK0[H10])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==WR0 thenset VK=GetItemPlayer(OT1)call D81(OT1)set FK=UnitAddItemById(u,FK0[WT0])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==WA0 thenset VK=GetItemPlayer(OT1)call D81(OT1)set FK=UnitAddItemById(u,FK0[W90])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==FQ0 thenset VK=GetItemPlayer(OT1)call D81(OT1)set FK=UnitAddItemById(u,FK0[FP0])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==VZ0 thenif CZO(u)==false thenset VK=GetItemPlayer(OT1)call D81(OT1)set FK=UnitAddItemById(u,FK0[VH0])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)endifelseif CN1==VH0 thenif CZO(u)==true thenset VK=GetItemPlayer(OT1)call D81(OT1)set FK=UnitAddItemById(u,FK0[VZ0])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)endifelseif CN1==HY0 thenset VK=GetItemPlayer(OT1)call D81(OT1)set FK=UnitAddItemById(u,FK0[HX0])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)endifelseif CN1==W40 thenset VK=GetItemPlayer(OT1)call D81(OT1)set FK=UnitAddItemById(u,FK0[W50])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==HH0 thenset VK=GetItemPlayer(OT1)call D81(OT1)set FK=UnitAddItemById(u,FK0[HZ0])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==H10 thenset VK=GetItemPlayer(OT1)call D81(OT1)set FK=UnitAddItemById(u,FK0[HO0])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==WT0 thenset VK=GetItemPlayer(OT1)call D81(OT1)set FK=UnitAddItemById(u,FK0[WR0])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==W90 thenset VK=GetItemPlayer(OT1)call D81(OT1)set FK=UnitAddItemById(u,FK0[WA0])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==FP0 thenset VK=GetItemPlayer(OT1)call D81(OT1)set FK=UnitAddItemById(u,FK0[FQ0])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==VH0 thenset VK=GetItemPlayer(OT1)call D81(OT1)set FK=UnitAddItemById(u,FK0[VZ0])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==HX0 thenset VK=GetItemPlayer(OT1)call D81(OT1)set FK=UnitAddItemById(u,FK0[HY0])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)endifendifset u=nullendfunctionfunction CWO takes unit N0I,item OT1 returns nothinglocal unit u=N0Ilocal integer CU1=GetUnitTypeId(u)local integer CN1=CP1(OT1)if IsUnitType(u,UNIT_TYPE_MELEE_ATTACKER)==false or IsUnitType(u,UNIT_TYPE_HERO)==false thenif CN1==W50 thenset VK=GetItemPlayer(OT1)call RemoveItem(OT1)set FK=UnitAddItemById(u,FK0[W40])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==HZ0 thenset VK=GetItemPlayer(OT1)call RemoveItem(OT1)set FK=UnitAddItemById(u,FK0[HH0])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==HO0 thenset VK=GetItemPlayer(OT1)call RemoveItem(OT1)set FK=UnitAddItemById(u,FK0[H10])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==WR0 thenset VK=GetItemPlayer(OT1)call RemoveItem(OT1)set FK=UnitAddItemById(u,FK0[WT0])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==WA0 thenset VK=GetItemPlayer(OT1)call RemoveItem(OT1)set FK=UnitAddItemById(u,FK0[W90])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==FQ0 thenset VK=GetItemPlayer(OT1)call RemoveItem(OT1)set FK=UnitAddItemById(u,FK0[FP0])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==VZ0 thenif CZO(u)==false thenset VK=GetItemPlayer(OT1)call RemoveItem(OT1)set FK=UnitAddItemById(u,FK0[VH0])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)endifelseif CN1==HY0 thenset VK=GetItemPlayer(OT1)call RemoveItem(OT1)set FK=UnitAddItemById(u,FK0[HX0])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)endifelseif CN1==W40 thenset VK=GetItemPlayer(OT1)call RemoveItem(OT1)set FK=UnitAddItemById(u,FK0[W50])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==HH0 thenset VK=GetItemPlayer(OT1)call RemoveItem(OT1)set FK=UnitAddItemById(u,FK0[HZ0])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==H10 thenset VK=GetItemPlayer(OT1)call RemoveItem(OT1)set FK=UnitAddItemById(u,FK0[HO0])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==WT0 thenset VK=GetItemPlayer(OT1)call RemoveItem(OT1)set FK=UnitAddItemById(u,FK0[WR0])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==W90 thenset VK=GetItemPlayer(OT1)call RemoveItem(OT1)set FK=UnitAddItemById(u,FK0[WA0])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==FP0 thenset VK=GetItemPlayer(OT1)call RemoveItem(OT1)set FK=UnitAddItemById(u,FK0[FQ0])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==VH0 thenset VK=GetItemPlayer(OT1)call RemoveItem(OT1)set FK=UnitAddItemById(u,FK0[VZ0])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==HX0 thenset VK=GetItemPlayer(OT1)call RemoveItem(OT1)set FK=UnitAddItemById(u,FK0[HY0])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)endifendifset u=nullendfunctionfunction CXO takes unit N0I returns nothinglocal integer i=0local item OT1call DisableTrigger(L30)loopexitwhen i>5set OT1=UnitItemInSlot(N0I,i)if OT1!=null thencall CWO(N0I,OT1)endifset i=i+1endloopcall EnableTrigger(L30)set OT1=nullendfunctionfunction CYO takes unit N0I,item OT1 returns booleanlocal unit u=N0Ilocal integer CU1=GetUnitTypeId(u)local integer CN1=CR1(OT1)local real xlocal real ylocal boolean CJO=trueset x=GetUnitX(u)set y=GetUnitY(u)if CN1==H60 thencall DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\ReplenishMana\\SpiritTouchTarget.mdl",u,"overhead"))call TQI(GetOwningPlayer(u),"Abilities\\Spells\\Human\\Heal\\HealTarget.wav")set VK=GetItemPlayer(OT1)call D81(OT1)set FK=UnitAddItemById(u,FK0[HA0])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)endifif CN1==ZP0 and GetItemCharges(OT1)==0 thenset VK=GetItemPlayer(OT1)call D81(OT1)set FK=UnitAddItemById(u,FK0[ZU0])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)endifif CN1==HJ0 and GetItemCharges(OT1)==0 thenset VK=GetItemPlayer(OT1)call D81(OT1)set FK=UnitAddItemById(u,FK0[HK0])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)endifcall DisableTrigger(L30)if(CN1==ZH0 or CN1==ZG0 or CN1==ZZ0)and(D91(u,FK0[ZH0],OT1)!=null or D91(u,FK0[ZG0],OT1)!=null or D91(u,FK0[ZZ0],OT1)!=null)thencall R1I(GetOwningPlayer(u),GetObjectName(1848652364))set VK=GetItemPlayer(OT1)call RemoveItem(OT1)set FK=CreateItem(FJ0[CN1],x,y)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)endifif(CN1==HH0)and(D91(u,FK0[HH0],OT1)!=null or D91(u,FK0[HZ0],OT1)!=null)thencall R1I(GetOwningPlayer(u),GetObjectName(1848657996))set VK=GetItemPlayer(OT1)call RemoveItem(OT1)set FK=CreateItem(FJ0[CN1],x,y)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)set CJO=falseendifif CJO and(CN1==HZ0)and(D91(u,FK0[HH0],OT1)!=null or D91(u,FK0[HZ0],OT1)!=null)thencall R1I(GetOwningPlayer(u),GetObjectName(1848657996))set VK=GetItemPlayer(OT1)call RemoveItem(OT1)set FK=CreateItem(FJ0[CN1],x,y)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)set CJO=falseendifif(CN1==WV0 or CN1==WZ0 or CN1==WX0 or CN1==WW0)and(D91(u,FK0[WV0],OT1)!=null or D91(u,FK0[WZ0],OT1)!=null or D91(u,FK0[WX0],OT1)!=null or D91(u,FK0[WW0],OT1)!=null)thencall R1I(GetOwningPlayer(u),GetObjectName(1848652355))set VK=GetItemPlayer(OT1)call RemoveItem(OT1)set FK=CreateItem(FJ0[CN1],x,y)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)endifif(CN1==VR0 and IsPlayerEnemy(GetItemPlayer(OT1),GetOwningPlayer(u)))thenset VK=GetItemPlayer(OT1)call D81(OT1)set FK=UnitAddItemById(u,FK0[VP0])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)endifif(CN1==VG0)and(T3I(u)or OL1(u))thenif T3I(u)thencall R1I(GetOwningPlayer(u),GetObjectName(1848652363))endifset VK=GetItemPlayer(OT1)set TJ=GetItemCharges(OT1)call RemoveItem(OT1)if CN1==VG0 thenset FK=CreateItem(FJ0[CN1],GetRectCenterX(P4),GetRectCenterY(P4))endifcall SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)if CN1==VG0 thencall SetItemCharges(FK,TJ)endifendifif OL1(u)and CN1==HM0 thenset VK=GetItemPlayer(OT1)call RemoveItem(OT1)set FK=UnitAddItemById(u,FK0[HN0])call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)endifif CJO and(CN1==HH0 or CN1==HZ0)and(CU1==1211119187)thencall R1I(GetOwningPlayer(u),GetObjectName(1848652362))set VK=GetItemPlayer(OT1)call RemoveItem(OT1)set FK=CreateItem(FJ0[CN1],x,y)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)set CJO=falseendifif(CN1==V90 or CN1==VA0 or CN1==VB0 or CN1==VC0 or CN1==VD0 or CN1==VE0)and CU1==1429221443 thencall DisplayTimedTextToPlayer(GetOwningPlayer(u),0,U2,10,"|c00ff0303"+GetObjectName(1848652368)+"|r")endifcall EnableTrigger(L30)if CJO thencall CVO(N0I,OT1)endifset u=nullset OT1=nullreturn falseendfunctionfunction CKO takes integer CN1 returns booleanreturn CN1==V10 or CN1==WW0 or CN1==WX0 or CN1==WJ0 or CN1==VI0 or CN1==WZ0 or CN1==WV0 or CN1==WY0 or CN1==GB0 or CN1==GC0 or CN1==ZV0 or CN1==ZW0endfunctionfunction CLO takes integer CN1 returns booleanreturn CN1==GB0 or CN1==GC0endfunctionfunction CMO takes unit N0I,item OT1 returns booleanlocal integer DU1=0local item IW1=OT1local integer CN1=DH1(IW1)local integer CNO=0local boolean DR1=falselocal integer CSO=DZ1(IW1)local boolean CTO=falseif IsUnitType(N0I,UNIT_TYPE_HERO)==true thenif CN1==V10 thenset CNO=VI0endifif CN1==ZW0 thenset CNO=ZV0endifif CN1==WW0 thenset CNO=WZ0endifif CN1==WX0 thenset CNO=WV0endifif CN1==WJ0 thenset CNO=WY0endifif CN1==GC0 thenset CNO=GB0endifif CSO==GC0 thenset CNO=GB0set CTO=trueendifif CNO!=0 thenset VK=GetItemPlayer(IW1)call D81(IW1)if CTO thenset FK=UnitAddItemById(N0I,FM0[CNO])elseset FK=UnitAddItemById(N0I,FK0[CNO])endifcall SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)set DR1=trueendifelseif CN1==VI0 thenset CNO=V10endifif CN1==ZV0 thenset CNO=ZW0endifif CN1==WZ0 thenset CNO=WW0endifif CN1==WV0 thenset CNO=WX0endifif CN1==WY0 thenset CNO=WJ0endifif CN1==GB0 thenset CNO=GC0endifif CSO==GB0 thenset CNO=GC0set CTO=trueendifif CNO!=0 thenset VK=GetItemPlayer(IW1)call D81(IW1)if CTO thenset FK=UnitAddItemById(N0I,FM0[CNO])elseset FK=UnitAddItemById(N0I,FK0[CNO])endifcall SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)set DR1=trueendifendifset IW1=nullreturn DR1endfunctionfunction CRO takes unit N0I,item OT1 returns booleanif CKO(DH1(OT1))or CLO(DZ1(OT1))thenreturn CMO(N0I,OT1)endifreturn falseendfunctionfunction ModeTT_ItemHack_End takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer id=(LoadInteger(XY,(MKI),(34)))set OEI[id]=falsecall FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullreturn falseendfunctionfunction CPO takes unit u returns nothinglocal integer id=GetPlayerId(GetOwningPlayer(u))set OEI[id]=trueendfunctionfunction CQO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit OM1=(LoadUnitHandle(XY,(MKI),(26)))local integer CUO=(LoadInteger(XY,(MKI),(97)))local integer CN1=(LoadInteger(XY,(MKI),(93)))local boolean D0O=(LoadBoolean(XY,(MKI),(95)))local item OT1local player p=GetOwningPlayer(OM1)local player DIOlocal integer D51local boolean D41=falselocal item D61local integer D1Olocal integer DOOlocal integer newChargeslocal item D2Olocal integer targetCountlocal item D3Olocal boolean D4O=falsecall DisableTrigger(LG0)if D0O thenset D3O=nullset DIO=(LoadPlayerHandle(XY,(MKI),(54)))set D51=(LoadInteger(XY,(MKI),(76)))elseset OT1=(LoadItemHandle(XY,(MKI),(96)))set D3O=OT1set DIO=GetItemPlayer(OT1)set D51=GetItemCharges(OT1)endifif D0O==false and OT1==null thencall FlushChildHashtable(XY,(MKI))call MZI(t)call EnableTrigger(LG0)set t=nullset OM1=nullset p=nullreturn falseendifif CUO==1 thenif p!=DIO and GetUnitTypeId(OM1)==1852010352 thenif DO1(CM1(CN1))or D21(CM1(CN1))thenset D41=trueendifif IsPlayerEnemy(p,DIO)thencall D71(FJ0[CN1],DI0[GetPlayerId(p)],D10[GetPlayerId(p)],DIO,D41,D51)elsecall D71(FJ0[CN1],DI0[GetPlayerId(DIO)],D10[GetPlayerId(DIO)],DIO,D41,D51)endifcall R1I(p,GetObjectName(1848656978))if D0O==false thenset D4O=truecall D81(OT1)endifelseif EL==false and D0O==false and GetItemType(OT1)==ITEM_TYPE_CAMPAIGN and DV1(OT1)!=0 and(p==DIO or(GetPlayerSlotState((DIO))==PLAYER_SLOT_STATE_LEFT))thenif D21(CN1)or DO1(CN1)thenset D41=trueelseset D41=falseendifif(GetPlayerSlotState((DIO))==PLAYER_SLOT_STATE_LEFT)and CS1(CN1)thenelsecall D81(OT1)set D4O=trueset D61=UnitAddItemById(OM1,FK0[CN1])set D3O=D61call SetItemPlayer(D61,DIO,false)call SetItemUserData(D61,0)if D41 thencall SetItemCharges(D61,D51)endifendifelseif EL==false and D0O==false and GetItemType(OT1)==ITEM_TYPE_PERMANENT and p!=DIO and FM0[CR1(OT1)]!=0 and(GetPlayerSlotState((DIO))==PLAYER_SLOT_STATE_LEFT)==false thenif D21(CN1)or DO1(CN1)thenset D41=trueelseset D41=falseendifcall D81(OT1)set D4O=trueset D61=UnitAddItemById(OM1,FM0[CN1])set D3O=D61call SetItemPlayer(D61,DIO,false)call SetItemUserData(D61,0)if D41 thencall SetItemCharges(D61,D51)endifelseif D0O==false and GetItemType(OT1)==ITEM_TYPE_PERMANENT and D11(OT1)and IsUnitType(OM1,UNIT_TYPE_HERO)==true thenset D1O=CQ1(OM1)set DOO=D01(OM1)if DOO!=0 thencall UnitAddAbility(OM1,DOO)call UnitMakeAbilityPermanent(OM1,true,DOO)call SetPlayerAbilityAvailable(p,DOO,false)if GetUnitTypeId(OM1)==1211117653 thenset CK=OM1call ExecuteFunc("D5O")elseif GetUnitTypeId(OM1)==1215130471 thenset CK=OM1call ExecuteFunc("D6O")endifendifif CN1!=D1O thencall D81(OT1)set D61=UnitAddItemById(OM1,FK0[D1O])set D3O=D61call SetItemPlayer(D61,DIO,false)call SetItemUserData(D61,1)endifelseif D0O==false and GetItemType(OT1)==ITEM_TYPE_ARTIFACT thencall DisableTrigger(L30)set D2O=DC1(DIO,OM1,CN1,OT1)if D2O==null thenelsecall SetItemCharges(D2O,D51+GetItemCharges(D2O))call D81(OT1)set D3O=nullendifcall EnableTrigger(L30)elseif D0O and DO1(CM1(CN1))thencall DisableTrigger(L30)if DF1(OM1)==0 and DD1(DIO,OM1,CN1)==null thencall R1I(p,GetObjectName(1848652367))call D71(FJ0[(CN1)],(((LoadReal(XY,(MKI),(6))))*1.0),(((LoadReal(XY,(MKI),(7))))*1.0),(DIO),(true),(D51))elseset D2O=DD1(DIO,OM1,CN1)if D2O==null thencall DisableTrigger(L30)set D61=UnitAddItemById(OM1,FK0[CN1])set D3O=D61call SetItemPlayer(D61,DIO,false)call SetItemUserData(D61,1)call SetItemCharges(D61,D51)elsecall SetItemCharges(D2O,D51+GetItemCharges(D2O))endifendifcall EnableTrigger(L30)elseif D0O==true thencall C2O(DIO,OM1,null,CN1,(LoadReal(XY,(MKI),(6))),(LoadReal(XY,(MKI),(7))),D51,1)elseif D0O==false and(GetItemType(OT1)==ITEM_TYPE_PERMANENT or GetItemType(OT1)==ITEM_TYPE_CAMPAIGN)thencall SetItemUserData(OT1,1)set D4O=BUO(DIO,OM1,0)endifif D4O==false and D3O!=null and DL1(D3O)==false thenset D4O=CRO(OM1,D3O)endifif D4O==false and D3O!=null and DL1(D3O)==false thencall CYO(OM1,D3O)endifelseif GetWidgetLife(OT1)>0 thenset D1O=CQ1(OM1)set DOO=D01(OM1)if DB1(OM1,FK0[D1O])==null and GetUnitAbilityLevel(OM1,DOO)>0 thencall UnitRemoveAbility(OM1,DOO)if GetUnitTypeId(OM1)==1215130471 thenset CK=OM1call ExecuteFunc("D7O")endifendifif IsItemOwned(OT1)==false thenif GetItemType(OT1)==ITEM_TYPE_ARTIFACT or D21(CN1)or DO1(CN1)thenset D41=trueendifcall D71(FJ0[CN1],GetItemX(OT1),GetItemY(OT1),DIO,D41,D51)call D81(OT1)endifendifendifcall FlushChildHashtable(XY,(MKI))call MZI(t)call EnableTrigger(LG0)set t=nullset OT1=nullset OM1=nullset p=nullset DIO=nullset D61=nullset D2O=nullset D3O=nullreturn falseendfunctionfunction D8O takes nothing returns booleancall EnableTrigger(L30)call MZI(GetTriggeringTrigger())return falseendfunctionfunction DelayTrigger takes nothing returns nothinglocal trigger t=CreateTrigger()call DisableTrigger(L30)call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function D8O))set t=nullendfunctionfunction D9O takes nothing returns booleanlocal item OT1local integer CUOlocal unit OM1=GetTriggerUnit()local trigger tlocal integer MKIlocal integer D1Olocal integer DOOlocal integer idset id=GetPlayerId(GetOwningPlayer(OM1))if(IsUnitType(OM1,UNIT_TYPE_HERO)==true or OL1(OM1))and IsUnitIllusion(OM1)==false and GetUnitTypeId(OM1)!=1311788365 thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_PICKUP_ITEM thenif GetItemTypeId(GetManipulatedItem())==FK0[H50]thenset L50=L50+1set KM0[id]=KM0[id]+1elseif GetItemTypeId(GetManipulatedItem())==FK0[GG0]thenset L60=L60+1set KN0[id]=KN0[id]+1elseif GetItemTypeId(GetManipulatedItem())==FK0[WG0]thenset L70=L70+1set KS0[id]=KS0[id]+1elseif GetItemTypeId(GetManipulatedItem())==FK0[ZN0]or GetItemTypeId(GetManipulatedItem())==FK0[X30]thenset L80=L80+1set KT0[id]=KT0[id]+1elseif GetItemTypeId(GetManipulatedItem())==FK0[WO0]thenset L90=L90+1set LK0[id]=LK0[id]+1elseif GetItemTypeId(GetManipulatedItem())==FK0[VS0]thenset L40=L40+1set KR0[id]=KR0[id]+1call DM1(OM1,1227901005)elseif GetItemTypeId(GetManipulatedItem())==FK0[V50]thenset LA0=LA0+1set KP0[id]=KP0[id]+1elseif GetItemTypeId(GetManipulatedItem())==FK0[ZM0]thenset LB0=LB0+1set KQ0[id]=KQ0[id]+1elseif GetItemTypeId(GetManipulatedItem())==FK0[X20]thenset LC0=LC0+1set LE0[id]=LE0[id]+1elseif GetItemTypeId(GetManipulatedItem())==FK0[HM0]thenset LD0=LD0+1set LL0[id]=LL0[id]+1endifelseif GetTriggerEventId()==EVENT_PLAYER_UNIT_DROP_ITEM thenif GetItemTypeId(GetManipulatedItem())==FK0[H50]thenset KM0[id]=KM0[id]-1set L50=L50-1elseif GetItemTypeId(GetManipulatedItem())==FK0[GG0]and GetUnitTypeId(OM1)!=1311788365 thenset KN0[id]=KN0[id]-1set L60=L60-1elseif GetItemTypeId(GetManipulatedItem())==FK0[HM0]thenset LL0[id]=LL0[id]-1set LD0=LD0-1elseif GetItemTypeId(GetManipulatedItem())==FK0[WG0]thenset KS0[id]=KS0[id]-1set L70=L70-1elseif GetItemTypeId(GetManipulatedItem())==FK0[ZN0]or GetItemTypeId(GetManipulatedItem())==FK0[X30]thenset L80=L80-1set KT0[id]=KT0[id]-1if KT0[id]<1 or D91(OM1,FK0[ZN0],GetManipulatedItem())==null or D91(OM1,FK0[X30],GetManipulatedItem())==null thencall UnitRemoveAbility(OM1,1093744436)endifelseif GetItemTypeId(GetManipulatedItem())==FK0[WO0]and GetUnitTypeId(OM1)!=1311788365 thenset LK0[id]=LK0[id]-1set L90=L90-1elseif GetItemTypeId(GetManipulatedItem())==FK0[VS0]or GetItemTypeId(GetManipulatedItem())==FM0[VS0]thenset L40=IMaxBJ(L40-1,0)set KR0[id]=IMaxBJ(KR0[id]-1,0)call UnitRemoveAbility(OM1,1110458953)endifendifendifif GetTriggerEventId()==EVENT_PLAYER_UNIT_PAWN_ITEM thenset OT1=GetSoldItem()call SetItemUserData(OT1,-2)set D1O=CQ1(OM1)set DOO=D01(OM1)if D91(OM1,FK0[D1O],OT1)==null and GetUnitAbilityLevel(OM1,DOO)>0 thencall UnitRemoveAbility(OM1,DOO)if GetUnitTypeId(OM1)==1215130471 thenset CK=OM1call ExecuteFunc("D7O")endifendifif O7I==true thencall CPO(OM1)endifelseif GetItemTypeId(GetManipulatedItem())!=1227894853 and GetItemTypeId(GetManipulatedItem())!=1227895373 thenset OT1=GetManipulatedItem()if IsUnitIllusion(OM1)or GetItemUserData(OT1)==-2 thenset OT1=nullset OM1=nullset t=nullreturn falseendifif GetTriggerEventId()==EVENT_PLAYER_UNIT_PICKUP_ITEM thenset CUO=1elseset CUO=2endifif(CUO==1 or(CUO==2 and DL1(OT1)==false and GetWidgetLife(OT1)>0))and GetUnitTypeId(OM1)!=1211117642 thenset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function CQO))call SaveUnitHandle(XY,(MKI),(26),(OM1))call SaveInteger(XY,(MKI),(97),(CUO))call SaveInteger(XY,(MKI),(93),(CR1(OT1)))if DL1(OT1)thencall SaveBoolean(XY,(MKI),(95),(true))call SavePlayerHandle(XY,(MKI),(54),(GetItemPlayer(OT1)))call SaveInteger(XY,(MKI),(76),(GetItemCharges(OT1)))call SaveReal(XY,(MKI),(6),((GetItemX(OT1))*1.0))call SaveReal(XY,(MKI),(7),((GetItemY(OT1))*1.0))elsecall SaveBoolean(XY,(MKI),(95),(false))call SaveItemHandle(XY,(MKI),(96),(OT1))call SaveInteger(XY,(MKI),(76),(GetItemCharges(OT1)))call SetItemUserData(OT1,0)endifelseendifendifset OT1=nullset OM1=nullset t=nullreturn falseendfunctionfunction DBO takes nothing returns booleanif GetSpellAbilityId()==1093751369 or GetSpellAbilityId()==1093681733 thenif QPI(GetTriggerUnit())==false thencall CXO(GetTriggerUnit())endifendifreturn falseendfunctionfunction RestrictedItems_UpdateMeleeRange_All2 takes nothing returns nothingcall CXO(CK)endfunctionfunction DDO takes unit N0I,integer DEO,boolean DFO returns nothinglocal string DGOlocal string slocal player p=GetOwningPlayer(N0I)local real d=2local string DHO="Use"if DFO thenset DHO="Store"endifif DEO==1227894838 thenset DGO="|c00ff0000"+GetObjectName(1848658513)+"|r"call E71("Rune"+DHO+"1",GetPlayerId(p))elseif DEO==1227894840 thenset DGO="|c0000ff00"+GetObjectName(1848658510)+"|r"call E71("Rune"+DHO+"2",GetPlayerId(p))elseif DEO==1227894859 thenset DGO="|c000000ff"+GetObjectName(1848658739)+"|r"call E71("Rune"+DHO+"3",GetPlayerId(p))elseif DEO==1227894839 thenset DGO="|c00afaf00"+GetObjectName(1848658738)+"|r"call E71("Rune"+DHO+"4",GetPlayerId(p))elseif DEO==1227894858 thenset DGO="|c00652DC1"+GetObjectName(1848658740)+"|r"call E71("Rune"+DHO+"5",GetPlayerId(p))endifif DFO thenset s=C0[GetPlayerId(p)]+GetUnitName(N0I)+"|r "+GetObjectName(1848657749)+"|r "+DGO+" "+GetObjectName(1848657751)set d=1elseif LF0 thenset s=C0[GetPlayerId(p)]+GetUnitName(N0I)+"|r "+GetObjectName(1848657750)+"|r "+DGO+" "+GetObjectName(1848657751)elseset s=C0[GetPlayerId(p)]+GetUnitName(N0I)+"|r "+GetObjectName(1848657748)+"|r "+DGO+" "+GetObjectName(1848657751)endifendifif(IsPlayerAlly(GetLocalPlayer(),p)and GetLocalPlayer()!=p)or TGI(GetLocalPlayer())thencall DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,d,s)endifendfunctionfunction DZO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))if GetUnitAbilityLevel(N0I,1110454611)==0 thencall UnitRemoveAbility(N0I,1110454611)call UnitRemoveAbility(N0I,1110455361)call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetUnitState(N0I,UNIT_STATE_LIFE)==GetUnitState(N0I,UNIT_STATE_MAX_LIFE)and GetUnitState(N0I,UNIT_STATE_MANA)==GetUnitState(N0I,UNIT_STATE_MAX_MANA)thencall UnitRemoveAbility(N0I,1110454611)call UnitRemoveAbility(N0I,1110455361)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset N0I=nullreturn falseendfunctionfunction DVO takes unit N0I,item OT1 returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.1,true)call TriggerAddCondition(t,Condition(function DZO))call SaveUnitHandle(XY,(MKI),(14),(N0I))set t=nullendfunctionfunction DWO takes unit N0I,item OT1 returns nothinglocal unit u=N0Ilocal real x=GetUnitX(u)local real y=GetUnitY(u)local unit QHI=CreateUnit(GetOwningPlayer(u),1697656901,x,y,0)if IsUnitType(u,UNIT_TYPE_MELEE_ATTACKER)==true thencall UnitAddAbility(QHI,1093818446)elsecall UnitAddAbility(QHI,1093683026)endifcall IssueTargetOrderById(QHI,852274,u)call IssueTargetOrderById(QHI,852274,u)set u=nullset QHI=nullendfunctionfunction DXO takes unit N0I,item OT1 returns nothingif GetItemTypeId(OT1)==1227894839 or GetItemTypeId(OT1)==1227894838 or GetItemTypeId(OT1)==1227894840 or GetItemTypeId(OT1)==1227894859 or GetItemTypeId(OT1)==1227894858 thencall DDO(N0I,GetItemTypeId(OT1),false)endifif GetItemTypeId(OT1)==1227894839 thencall DWO(N0I,OT1)elseif GetItemTypeId(OT1)==1227894858 thenif GetUnitAbilityLevel(N0I,1110456665)>0 thencall UnitRemoveAbility(N0I,1110456665)call UnitRemoveAbility(N0I,1110454609)call DisableTrigger(GetTriggeringTrigger())call UnitAddItemById(N0I,1227894858)call EnableTrigger(GetTriggeringTrigger())endifelseif GetItemTypeId(OT1)==1227894840 thencall DVO(N0I,OT1)endifendfunctionfunction DYO takes unit N0I,item OT1 returns nothinglocal integer QRIlocal integer NGIcall UnitRemoveAbility(N0I,1093810003)call UnitRemoveAbility(N0I,1093810001)call UnitRemoveAbility(N0I,1093810002)call UnitRemoveAbility(N0I,1093810004)if GetUnitAbilityLevel(N0I,1093810246)>0 thencall UnitRemoveAbility(N0I,1093810246)call UnitAddAbility(N0I,1093810246)endifif GetUnitTypeId(N0I)==1164207469 thenset QRI=1093684057elseif GetUnitTypeId(N0I)==1429221446 thenset QRI=1093678660elseif GetUnitTypeId(N0I)==1162032951 thenset QRI=1093684557elseif GetUnitTypeId(N0I)==1332179560 thenset QRI=1093687627elseif GetUnitTypeId(N0I)==1211117642 or GetUnitTypeId(N0I)==1211117641 thenset QRI=1093816641elseif GetUnitTypeId(N0I)==1430468144 thenset QRI=1093817427elseset N0I=nullreturnendifset NGI=GetUnitAbilityLevel(N0I,QRI)if NGI>0 thencall UnitRemoveAbility(N0I,QRI)call UnitAddAbility(N0I,QRI)call SetUnitAbilityLevel(N0I,QRI,NGI)endifendfunctionfunction DJO takes item OT1,unit TLI,boolean DKO returns nothinglocal integer CN1=CR1(OT1)local integer MKI=GetHandleId(TLI)local string s=""if(CN1==GB0 and D91(TLI,GB0,OT1)==null)or(CN1==GC0 and D91(TLI,GC0,OT1)==null)thenif IsPlayerAlly(GetLocalPlayer(),GetOwningPlayer(TLI))==true or TGI(GetLocalPlayer())thenset s="Abilities\\Spells\\Human\\MagicSentry\\MagicSentryCaster.mdl"endifif DKO thenif DF1(TLI)>0 or GetItemType(OT1)==ITEM_TYPE_PERMANENT or GetItemType(OT1)==ITEM_TYPE_CAMPAIGN thenif GetUnitAbilityLevel(TLI,1093809729)==0 and GetUnitAbilityLevel(TLI,1093809730)==0 thenif s=="Abilities\\Spells\\Human\\MagicSentry\\MagicSentryCaster.mdl" thencall QTI(TLI,1093809729)elsecall QTI(TLI,1093809730)endifendifendifelseif not(GetUnitAbilityLevel(TLI,1093809729)==0 and GetUnitAbilityLevel(TLI,1093809730)==0)thencall UnitRemoveAbility(TLI,1093809730)call UnitRemoveAbility(TLI,1093809729)call RemoveSavedHandle(XY,(MKI),(670))endifendifendifendfunctionfunction DLO takes nothing returns booleanlocal unit N0I=GetTriggerUnit()local item OT1=GetManipulatedItem()local integer id=GetItemTypeId(OT1)if OT1==null or IsUnitIllusion(N0I)==true or IsUnitType(N0I,UNIT_TYPE_HERO)==false or HK1(GetUnitTypeId(N0I))or GetItemTypeId(OT1)==1227894853 or GetItemTypeId(OT1)==1227895373 thenset N0I=nullset OT1=nullreturn falseendifif(GetTriggerEventId()==EVENT_PLAYER_UNIT_DROP_ITEM and GetItemType(OT1)!=ITEM_TYPE_PURCHASABLE)or GetTriggerEventId()==EVENT_PLAYER_UNIT_PAWN_ITEM thencall DJO(OT1,N0I,false)call E71("DRI_"+I2S(GetPlayerId(GetOwningPlayer(N0I))),FK0[CM1(CR1(OT1))])elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_PICKUP_ITEM thencall DJO(OT1,N0I,true)call E71("PUI_"+I2S(GetPlayerId(GetOwningPlayer(N0I))),FK0[CM1(CR1(OT1))])endifset N0I=nullset OT1=nullreturn falseendfunctionfunction DNO takes nothing returns booleanlocal integer iif LW0>0 and LZ0[1]<1 thenset i=2loopexitwhen i>LW0set LZ0[i-1]=LZ0[i]set LV0[i-1]=LV0[i]set i=i+1endloopset LW0=LW0-1endifset i=1loopexitwhen i>LW0if LZ0[i]>=1 thenset LZ0[i]=LZ0[i]-1if LZ0[i]<1 thencall SetItemDroppable(LV0[i],true)endifendifset i=i+1endloopreturn falseendfunctionfunction DSO takes item OT1 returns nothingset LW0=LW0+1set LV0[LW0]=OT1set LZ0[LW0]=(FS0[(DH1(OT1))])call SetItemDroppable(OT1,false)endfunctionfunction DTO takes nothing returns booleanif GetUnitTypeId(GetTriggerUnit())!=1697656901 and(FS0[(DH1(GetManipulatedItem()))])>0 thencall DSO(GetManipulatedItem())endifreturn falseendfunctionfunction DRO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit u=(LoadUnitHandle(XY,(MKI),(26)))local integer DPO=(LoadInteger(XY,(MKI),(98)))local item OT1=UnitItemInSlot(u,DPO)if OT1!=null and CS1(CR1(OT1))==false and GetWidgetLife(OT1)>0 and DI1(OT1)==false thencall SetItemDroppable(OT1,true)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset OT1=nullreturn falseendfunctionfunction DQO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit u=(LoadUnitHandle(XY,(MKI),(26)))local integer DPO=(LoadInteger(XY,(MKI),(98)))local item OT1=UnitItemInSlot(u,DPO)call FlushChildHashtable(XY,(MKI))call MZI(t)if(u!=null and GetUnitTypeId(u)>1 and IsUnitType(u,UNIT_TYPE_DEAD)==false)and(OT1!=null and GetWidgetLife(OT1)>0)thenset t=CreateTrigger()set MKI=GetHandleId(t)call SetItemDroppable(OT1,false)call SaveInteger(XY,(MKI),(98),(DPO))call SaveUnitHandle(XY,(MKI),(26),(u))call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_ISSUED_POINT_ORDER)call TriggerAddCondition(t,Condition(function DRO))endifset OT1=nullset u=nullset t=nullreturn falseendfunctionfunction DUO takes nothing returns nothinglocal integer DPOlocal unit u=GetTriggerUnit()local trigger tlocal integer MKIlocal item OT1if GetIssuedOrderId()==852008 thenset DPO=0elseif GetIssuedOrderId()==852009 thenset DPO=1elseif GetIssuedOrderId()==852010 thenset DPO=2elseif GetIssuedOrderId()==852011 thenset DPO=3elseif GetIssuedOrderId()==852012 thenset DPO=4elseif GetIssuedOrderId()==852013 thenset DPO=5endifset OT1=UnitItemInSlot(u,DPO)if OT1!=null and GetWidgetLife(OT1)>0 thenset t=CreateTrigger()set MKI=GetHandleId(t)call SaveInteger(XY,(MKI),(98),(DPO))call SaveUnitHandle(XY,(MKI),(26),(u))call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function DQO))endifset OT1=nullset u=nullset t=nullendfunctionfunction ItemCooldown_CheckOrderID takes nothing returns booleanif GetIssuedOrderId()==852008 or GetIssuedOrderId()==852009 or GetIssuedOrderId()==852010 or GetIssuedOrderId()==852011 or GetIssuedOrderId()==852012 or GetIssuedOrderId()==852013 thencall DUO()endifreturn falseendfunctionfunction EIO takes nothing returns nothinglocal unit u=GetTriggerUnit()local item OT1local integer i=0local real x=GetUnitX(u)local real y=GetUnitY(u)local integer CN1local item D61call DisableTrigger(L30)loopexitwhen i>5set OT1=UnitItemInSlot(u,i)set CN1=CR1(OT1)if CN1==ZA0 thenset VK=GetItemPlayer(OT1)call RemoveItem(OT1)set D61=CreateItem(FJ0[GS0],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)set D61=CreateItem(FJ0[H40],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)elseif CN1==ZD0 or CN1==ZE0 thenset VK=GetItemPlayer(OT1)call RemoveItem(OT1)set D61=CreateItem(FJ0[GT0],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)set D61=CreateItem(FJ0[H00],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)elseif CN1==WY0 thenset VK=GetItemPlayer(OT1)call RemoveItem(OT1)set D61=CreateItem(FJ0[GL0],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)set D61=CreateItem(FJ0[GY0],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)set D61=CreateItem(FJ0[YA0],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)elseif CN1==WJ0 thenset VK=GetItemPlayer(OT1)call RemoveItem(OT1)set D61=CreateItem(FJ0[GL0],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)set D61=CreateItem(FJ0[GY0],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)set D61=CreateItem(FJ0[YA0],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)elseif CN1==WC0 thenset VK=GetItemPlayer(OT1)call RemoveItem(OT1)set D61=CreateItem(FJ0[GE0],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)set D61=CreateItem(FJ0[ZR0],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)set D61=CreateItem(FJ0[YF0],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)elseif CN1==XI0 thenset VK=GetItemPlayer(OT1)call RemoveItem(OT1)set D61=CreateItem(FJ0[FU0],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)set D61=CreateItem(FJ0[G90],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)elseif CN1==VI0 thenset VK=GetItemPlayer(OT1)call RemoveItem(OT1)set D61=CreateItem(FJ0[GD0],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)set D61=CreateItem(FJ0[GV0],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)elseif CN1==V10 thenset VK=GetItemPlayer(OT1)call RemoveItem(OT1)set D61=CreateItem(FJ0[GD0],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)set D61=CreateItem(FJ0[GV0],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)elseif CN1==VH0 thenset VK=GetItemPlayer(OT1)call RemoveItem(OT1)set D61=CreateItem(FJ0[ZL0],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)set D61=CreateItem(FJ0[H20],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)set D61=CreateItem(FJ0[XT0],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)elseif CN1==VZ0 thenset VK=GetItemPlayer(OT1)call RemoveItem(OT1)set D61=CreateItem(FJ0[ZL0],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)set D61=CreateItem(FJ0[H20],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)set D61=CreateItem(FJ0[XT0],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)elseif CN1==HW0 thenset VK=GetItemPlayer(OT1)call RemoveItem(OT1)set D61=CreateItem(FJ0[G80],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)set D61=CreateItem(FJ0[WP0],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)elseif CN1==V50 thenset VK=GetItemPlayer(OT1)call RemoveItem(OT1)set D61=CreateItem(FJ0[ZM0],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)set D61=CreateItem(FJ0[ZL0],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)elseif CN1==HR0 or CN1==HP0 thenset VK=GetItemPlayer(OT1)call RemoveItem(OT1)set D61=CreateItem(FJ0[ZJ0],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)set D61=CreateItem(FJ0[ZD0],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)elseif CN1==X30 thenset VK=GetItemPlayer(OT1)call RemoveItem(OT1)set D61=CreateItem(FJ0[GQ0],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)set D61=CreateItem(FJ0[ZN0],x,y)call SetItemPlayer(D61,VK,false)call SetItemUserData(D61,1)endifset i=i+1endloopcall EnableTrigger(L30)set u=nullset OT1=nullset D61=nullendfunctionfunction E1O takes nothing returns booleanif GetSpellAbilityId()==1093684021 or GetSpellAbilityId()==1093751366 thencall EIO()endifreturn falseendfunctionfunction E2O takes integer CN1 returns booleanreturn CN1!=VR0 and CN1!=WG0 and CN1!=GB0 and CN1!=VG0endfunctionfunction E3O takes nothing returns nothingif GetTriggerEventId()==EVENT_PLAYER_UNIT_PICKUP_ITEM thencall SetItemPawnable(GetManipulatedItem(),false)elsecall SetItemPawnable(GetManipulatedItem(),true)endifendfunctionfunction E4O takes nothing returns booleanif GetItemType(GetManipulatedItem())==ITEM_TYPE_PERMANENT and E2O(DH1(GetManipulatedItem()))and T4I(GetTriggerUnit())thencall E3O()endifreturn falseendfunctionfunction E6O takes nothing returns nothinglocal integer x=1local player ploopexitwhen x>16if DB1(K1[x],FK0[WG0])!=null thencall RemoveUnit(LY0[GetPlayerId(GetOwningPlayer(K1[x]))])endifset x=x+1endloopendfunctionfunction Bloodstone_ItemCondition takes nothing returns booleanreturn GetItemTypeId(GetManipulatedItem())==FK0[WG0]and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==trueendfunctionfunction E7O takes nothing returns booleanreturn IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==true and HK1(GetUnitTypeId(GetFilterUnit()))==false and DB1(GetTriggerUnit(),FK0[WG0])!=nullendfunctionfunction E8O takes nothing returns booleanreturn IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))==false and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),1093678162)!=1 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1endfunctionfunction E9O takes nothing returns nothingcall SetUnitState(GetEnumUnit(),UNIT_STATE_LIFE,GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)+JO)call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\BloodstoneHealTarget.mdx",GetEnumUnit(),"origin"))endfunctionfunction Bloodstone_RegisterUnit takes nothing returns nothingcall MPI(GetEnumUnit(),4254,40)endfunctionfunction EAO takes nothing returns nothinglocal group g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),1700,Condition(function E8O))set JO=500+30*GetItemCharges(DB1(GetTriggerUnit(),FK0[WG0]))call ForGroup(g,function E9O)call MCI(g)set g=nullendfunctionfunction EBO takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local unit QHI=CreateUnit(GetOwningPlayer(N0I),1211117645,GetUnitX(N0I),GetUnitY(N0I),GetUnitFacing(N0I))set LY0[GetPlayerId(GetOwningPlayer(N0I))]=QHIcall EAO()endfunctionfunction EDO takes unit u returns nothinglocal integer EEO=GetItemCharges(DB1(u,FK0[WG0]))if EEO>0 thencall SetUnitState(u,UNIT_STATE_MANA,GetUnitState(u,UNIT_STATE_MANA)+EEO)endifendfunctionfunction EFO takes nothing returns booleanlocal integer i=1local unit N0Ilocal integer idif L70>0 thenloopexitwhen i>5set id=GetPlayerId(BO[i])set N0I=K1[id]if KS0[id]>0 and N0I!=null and GetUnitTypeId(N0I)>1 and IsUnitType(N0I,UNIT_TYPE_DEAD)==false thencall EDO(N0I)endifset id=GetPlayerId(CO[i])set N0I=K1[id]if KS0[id]>0 and N0I!=null and GetUnitTypeId(N0I)>1 and IsUnitType(N0I,UNIT_TYPE_DEAD)==false thencall EDO(N0I)endifset i=i+1endloopendifset N0I=nullreturn falseendfunctionfunction EHO takes unit EZO,unit TLI returns nothinglocal string fx=""if IsPlayerEnemy(GetLocalPlayer(),GetOwningPlayer(TLI))and TGI(GetLocalPlayer())==false thenset fx="war3mapImported\\WardMark_T2.mdx"endifcall AddSpecialEffectTarget(fx,EZO,"origin")endfunctionfunction EVO takes nothing returns booleanreturn trueendfunctionfunction EWO takes unit N0I,unit EZO returns nothinglocal integer EXOlocal item EYOif GetUnitTypeId(EZO)==1865429044 thenset EXO=FK0[ZO0]elseset EXO=FK0[Z20]endifcall DisableTrigger(L30)set EYO=DB1(N0I,EXO)if EYO==null thenset VK=GetOwningPlayer(N0I)set FK=CreateItem(EXO,0,0)call UnitAddItem(N0I,FK)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elsecall SetItemCharges(EYO,GetItemCharges(EYO)+1)endifcall EnableTrigger(L30)endfunctionfunction EJO takes nothing returns nothinglocal unit EZO=GetSummonedUnit()local unit N0I=GetSummoningUnit()if GetUnitTypeId(GetSummonedUnit())==1865429044 thenendifif GetUnitTypeId(GetSummonedUnit())==1865429044 or GetUnitTypeId(GetSummonedUnit())==1868921189 thenif IsUnitInRegion(TX0,EZO)thencall EWO(N0I,EZO)call RemoveUnit(EZO)elseif T4I(N0I)thencall EWO(N0I,EZO)call R1I(GetOwningPlayer(EZO),"Couriers cannot place wards")call RemoveUnit(EZO)elsecall EHO(GetSummonedUnit(),GetSummoningUnit())if GetUnitTypeId(GetSummonedUnit())==1868921189 thencall QJI(GetOwningPlayer(GetSummonedUnit()),12,GetUnitX(GetSummonedUnit()),GetUnitY(GetSummonedUnit()),150)endifendifelseif GetUnitTypeId(EZO)==1869836340 or GetUnitTypeId(EZO)==1865429048 or GetUnitTypeId(EZO)==1865429049 or GetUnitTypeId(EZO)==1865429315 or GetUnitTypeId(EZO)==1865429316 or GetUnitTypeId(EZO)==1865429317 thencall SelectUnitAddForPlayer(EZO,GetOwningPlayer(EZO))elseif GetUnitTypeId(EZO)==1865429040 or GetUnitTypeId(EZO)==1865429041 or GetUnitTypeId(EZO)==1865429057 or GetUnitTypeId(EZO)==1865429080 thencall SelectUnitAddForPlayer(EZO,GetOwningPlayer(EZO))endifendfunctionfunction ELO takes nothing returns nothinglocal unit u=GetEnumUnit()local integer i=0local player p=GetOwningPlayer(GetTriggerUnit())local item OT1local integer id=GetPlayerId(p)loopexitwhen i>5set OT1=UnitItemInSlot(u,i)if OT1!=null and GetItemPlayer(OT1)==p thencall UnitRemoveItem(u,OT1)call SetItemPosition(OT1,DI0[id],D10[id])endifset i=i+1endloopset u=nullset OT1=nullendfunctionfunction EMO takes nothing returns nothinglocal item OT1=GetEnumItem()local unit u=LJ0local player p=GetOwningPlayer(u)local integer id=GetPlayerId(p)if GetWidgetLife(OT1)>0 and GetItemPlayer(OT1)==p and IsItemVisible(OT1)==true thencall SetItemPosition(OT1,DI0[id],D10[id])call UnitAddItem(D00[id],OT1)endifset OT1=nullset u=nullset p=nullendfunctionfunction ENO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit u=(LoadUnitHandle(XY,(MKI),(53)))set LJ0=uif NZI(GetOwningPlayer(LJ0))thencall EnumItemsInRect(G5,Condition(function LWI),function EMO)elsecall EnumItemsInRect(H5,Condition(function LWI),function EMO)endifif GetTriggerEvalCount(t)==2 thencall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset u=nullreturn falseendfunctionfunction ESO takes nothing returns booleanreturn T4I(GetFilterUnit())endfunctionfunction ETO takes nothing returns nothinglocal unit u=GetTriggerUnit()local integer i=0local group g=MDI()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call GroupEnumUnitsInRange(g,GetUnitX(u),GetUnitY(u),1300,Condition(function ESO))call ForGroup(g,function ELO)call MCI(g)call TriggerRegisterTimerEvent(t,0.1,true)call TriggerAddCondition(t,Condition(function ENO))call SaveUnitHandle(XY,(MKI),(53),(u))set u=nullset g=nullendfunctionfunction ERO takes nothing returns nothingif GetSpellAbilityId()==1093743684 thencall ETO()endifendfunctionfunction EPO takes nothing returns nothinglocal unit u=GetTriggerUnit()local integer i=0local item OT1local integer id=GetPlayerId(GetOwningPlayer(u))local region r=CreateRegion()if NZI(GetOwningPlayer(u))thencall RegionAddRect(r,G5)elsecall RegionAddRect(r,H5)endifloopexitwhen i>5set OT1=UnitItemInSlot(u,i)if CS1(CR1(OT1))==false and CR1(OT1)!=VG0 and DI1(OT1)==false thencall UnitRemoveItemFromSlot(u,i)if(GetUnitTypeId(u)==1852010352 or IsUnitInRegion(r,u))and IsPlayerAlly(GetItemPlayer(OT1),GetOwningPlayer(u))==true thenset id=GetPlayerId(GetItemPlayer(OT1))call SetItemPosition(OT1,DI0[id],D10[id])endifendifset i=i+1endloopcall RemoveRegion(r)set u=nullset r=nullendfunctionfunction EQO takes nothing returns nothingif GetSpellAbilityId()==1093743416 or GetSpellAbilityId()==1093743683 thencall EPO()endifendfunctionfunction EUO takes unit TLI returns booleanlocal integer MKI=GetHandleId(TLI)local integer i=0local real F21=(TimerGetElapsed(M))local real F0O=13loopexitwhen i>0if(LoadReal(XY,(MKI),(730+i)))<F21-F0O thenreturn falseendifset i=i+1endloopreturn trueendfunctionfunction FIO takes unit TLI returns nothinglocal integer MKI=GetHandleId(TLI)local integer F1O=(LoadInteger(XY,(MKI),(729)))call SaveReal(XY,(MKI),(730+F1O),(((TimerGetElapsed(M)))*1.0))set F1O=F1O+1if F1O==1 thenset F1O=0endifcall SaveInteger(XY,(MKI),(729),(F1O))endfunctionfunction FOO takes unit N0I returns nothinglocal integer i=0local item F2Olocal integer CN1local boolean F3O=falseif EUO(N0I)thenset F3O=trueendifloopexitwhen i>5set F2O=UnitItemInSlot(N0I,i)set CN1=DH1(F2O)if CN1==HM0 and F3O==true thencall DisableTrigger(L30)set VK=GetItemPlayer(F2O)call RemoveItem(F2O)set FK=DQ1(N0I,FK0[HN0],i)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)call EnableTrigger(L30)endifif CN1==HN0 and F3O==false thencall DisableTrigger(L30)set VK=GetItemPlayer(F2O)call RemoveItem(F2O)set FK=DQ1(N0I,FK0[HM0],i)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)call EnableTrigger(L30)endifset i=i+1endloopset N0I=nullset F2O=nullendfunctionfunction F4O takes unit N0I returns nothinglocal integer i=0local item F5Olocal integer CN1local boolean F6O=falselocal real RJI=4if IsUnitType(N0I,UNIT_TYPE_MELEE_ATTACKER)==false thenset RJI=6endifif(LoadReal(XY,(GetHandleId(N0I)),(785)))+RJI>(TimerGetElapsed(M))thenset F6O=trueendifloopexitwhen i>5set F5O=UnitItemInSlot(N0I,i)set CN1=DH1(F5O)if CN1==WO0 and F6O==true thencall DisableTrigger(L30)set VK=GetItemPlayer(F5O)call RemoveItem(F5O)set FK=DQ1(N0I,FK0[W20],i)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)call EnableTrigger(L30)endifif CN1==W20 and F6O==false thencall DisableTrigger(L30)set VK=GetItemPlayer(F5O)call RemoveItem(F5O)set FK=DQ1(N0I,FK0[WO0],i)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)call EnableTrigger(L30)endifset i=i+1endloopset N0I=nullset F5O=nullendfunctionfunction F7O takes nothing returns nothingif GetEventDamage()>2 and(NXI(GetOwningPlayer(GetEventDamageSource()))or GetUnitTypeId(GetEventDamageSource())==1848651852)thenif N20[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]==false thencall SaveReal(XY,(GetHandleId(GetTriggerUnit())),(785),(((TimerGetElapsed(M)))*1.0))if GetEventDamage()>20 thenendifendifendifendfunctionfunction F8O takes unit N0I returns nothinglocal integer i=0local item F9Olocal integer CN1local boolean FAO=falseif(LoadReal(XY,(GetHandleId(N0I)),(785)))+3>(TimerGetElapsed(M))thenset FAO=trueendifloopexitwhen i>5set F9O=UnitItemInSlot(N0I,i)set CN1=DH1(F9O)if CN1==GG0 and FAO==true thencall DisableTrigger(L30)set VK=GetItemPlayer(F9O)call RemoveItem(F9O)set FK=DQ1(N0I,FK0[GH0],i)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)call EnableTrigger(L30)endifif CN1==GH0 and FAO==false thencall DisableTrigger(L30)set VK=GetItemPlayer(F9O)call RemoveItem(F9O)set FK=DQ1(N0I,FK0[GG0],i)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)call EnableTrigger(L30)endifset i=i+1endloopset N0I=nullset F9O=nullendfunctionfunction FBO takes nothing returns nothinglocal unit N0I=GetEnumUnit()local integer id=GetPlayerId(GetOwningPlayer(N0I))if KN0[id]>0 and N0I!=null and GetUnitTypeId(N0I)>1 and IsUnitType(N0I,UNIT_TYPE_DEAD)==false thencall F8O(N0I)endifif LK0[id]>0 and N0I!=null and GetUnitTypeId(N0I)>1 and IsUnitType(N0I,UNIT_TYPE_DEAD)==false thencall F4O(N0I)endifif LL0[id]>0 and N0I!=null and GetUnitTypeId(N0I)>1 and IsUnitType(N0I,UNIT_TYPE_DEAD)==false thencall FOO(N0I)endifset N0I=nullendfunctionfunction FCO takes nothing returns booleanreturn IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and GetUnitTypeId(GetFilterUnit())!=1211117642 and GetUnitTypeId(GetFilterUnit())!=1211122232endfunctionfunction FDO takes nothing returns booleanlocal integer i=1local unit N0Ilocal integer idlocal group gif L60>0 or L90>0 or LD0>0 thenset g=MDI()call GroupEnumUnitsInRange(g,0,0,9999,Condition(function FCO))loopexitwhen i>5set id=GetPlayerId(BO[i])set N0I=K1[id]call GroupAddUnit(g,N0I)set id=GetPlayerId(CO[i])set N0I=K1[id]call GroupAddUnit(g,N0I)set i=i+1endloopcall ForGroup(g,function FBO)call MCI(g)set g=nullendifset N0I=nullreturn falseendfunctionfunction FFO takes nothing returns nothinglocal unit N0I=GetFilterUnit()local integer i=0local item OT1local integer CN1loopexitwhen i>5set OT1=UnitItemInSlot(N0I,i)set CN1=CR1(OT1)if(CN1==H70 or CN1==H80 or CN1==H90)and GetItemUserData(OT1)>0 thencall DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\ReplenishMana\\SpiritTouchTarget.mdl",N0I,"overhead"))call TQI(GetOwningPlayer(N0I),"Abilities\\Spells\\Human\\Heal\\HealTarget.wav")set VK=GetItemPlayer(OT1)call D81(OT1)set FK=DQ1(N0I,FK0[HA0],i)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)call UnitRemoveAbility(N0I,1110460233)endifset i=i+1endloopset N0I=nullset OT1=nullendfunctionfunction FGO takes nothing returns booleanif UnitInventorySize(GetFilterUnit())>0 and NZI(GetOwningPlayer(GetFilterUnit()))and IsUnitIllusion(GetFilterUnit())==false and QPI(GetFilterUnit())==false thencall FFO()endifreturn falseendfunctionfunction FHO takes nothing returns booleanif UnitInventorySize(GetFilterUnit())>0 and NWI(GetOwningPlayer(GetFilterUnit()))and IsUnitIllusion(GetFilterUnit())==false and QPI(GetFilterUnit())==false thencall FFO()endifreturn falseendfunctionfunction FZO takes nothing returns booleanlocal group g=MDI()call GroupEnumUnitsInRange(g,MS,SS,750,Condition(function FGO))call MCI(g)set g=MDI()call GroupEnumUnitsInRange(g,O10,OO0,750,Condition(function FHO))call MCI(g)set g=nullreturn falseendfunctionfunction FWO takes unit FXO returns booleanlocal unit FYO=K1[GetPlayerId(GetOwningPlayer(FXO))]if((GetUnitX(FYO)-GetUnitX(FXO))*(GetUnitX(FYO)-GetUnitX(FXO))+(GetUnitY(FYO)-GetUnitY(FXO))*(GetUnitY(FYO)-GetUnitY(FXO))>=855625)thenreturn trueendifreturn falseendfunctionfunction FJO takes nothing returns nothinglocal unit FKO=GetAttacker()local integer FD1=UnitInventorySize(FKO)local integer x=0local item iloopexitwhen x>FD1set i=UnitItemInSlot(FKO,x)if DH1(i)==H50 thenif GetRandomReal(0,1)<=0.2 and AG1(FKO)==false thenif OL1(FKO)thenif FWO(FKO)==false thenif GetUnitAbilityLevel(GetTriggerUnit(),1093678162)==0 thencall TKI(FKO,GetTriggerUnit(),2,40)endifendifelseif GetUnitAbilityLevel(GetTriggerUnit(),1093678162)==0 thencall TKI(FKO,GetTriggerUnit(),2,40)endifendifendifendifset x=x+1endloopset x=0set FKO=GetAttacker()set FD1=UnitInventorySize(FKO)loopexitwhen x>FD1set i=UnitItemInSlot(FKO,x)if DH1(i)==HM0 or DH1(i)==HN0 thencall FIO(FKO)endifset x=x+1endloopset x=0set FKO=GetTriggerUnit()set FD1=UnitInventorySize(FKO)loopexitwhen x>FD1set i=UnitItemInSlot(FKO,x)if DH1(i)==HM0 or DH1(i)==HN0 thencall FIO(FKO)endifset x=x+1endloopset i=nullset FKO=nullendfunctionfunction FMO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real FNO=(LoadReal(XY,(GetHandleId(TLI)),(692)))if GetTriggerEventId()==EVENT_WIDGET_DEATH or FNO<(TimerGetElapsed(M))thencall UnitRemoveAbility(TLI,1093809717)call UnitRemoveAbility(TLI,1110456398)call UnitRemoveAbility(TLI,1093809731)call SaveReal(XY,(GetHandleId(TLI)),(692),((0)*1.0))endifcall FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullreturn falseendfunctionfunction FSO takes unit TLI returns nothinglocal trigger tlocal integer MKIlocal real FNO=(LoadReal(XY,(GetHandleId(TLI)),(692)))call SaveReal(XY,(GetHandleId(TLI)),(692),(((TimerGetElapsed(M))+LN0)*1.0))set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,LN0+0.01,false)call TriggerRegisterDeathEvent(t,TLI)call TriggerAddCondition(t,Condition(function FMO))call SaveUnitHandle(XY,(MKI),(2),(TLI))call QTI(TLI,1093809717)call QTI(TLI,1093809731)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093809717,false)set t=nullendfunctionfunction FTO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))if GetTriggerEventId()!=EVENT_UNIT_DAMAGED thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetEventDamageSource()==TLI and GetEventDamage()>0 thencall FlushChildHashtable(XY,(MKI))call MZI(t)if A61(TMI)==false thencall FSO(TMI)endifendifendifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction FRO takes nothing returns nothinglocal unit TLI=GetAttacker()local unit TMI=GetTriggerUnit()local trigger tlocal integer MKIif((LoadInteger(XY,(GetHandleId((TLI))),((4309))))==1)==false thencall MPI(TLI,4309,0.2)if GetRandomReal(0,100)<LM0 thenset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,2.5,false)call TriggerAddCondition(t,Condition(function FTO))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))endifendifset TLI=nullset TMI=nullendfunctionfunction FPO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real FNO=(LoadReal(XY,(GetHandleId(TLI)),(693)))if GetTriggerEventId()==EVENT_WIDGET_DEATH or FNO<(TimerGetElapsed(M))thencall UnitRemoveAbility(TLI,1093809718)call UnitRemoveAbility(TLI,1110454857)call UnitRemoveAbility(TLI,1093809731)call SaveReal(XY,(GetHandleId(TLI)),(693),((0)*1.0))endifcall FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullreturn falseendfunctionfunction FQO takes unit TLI returns nothinglocal trigger tlocal integer MKIlocal real FNO=(LoadReal(XY,(GetHandleId(TLI)),(693)))call SaveReal(XY,(GetHandleId(TLI)),(693),(((TimerGetElapsed(M))+LT0)*1.0))set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,LT0+0.01,false)call TriggerRegisterDeathEvent(t,TLI)call TriggerAddCondition(t,Condition(function FPO))call SaveUnitHandle(XY,(MKI),(2),(TLI))call QTI(TLI,1093809718)call QTI(TLI,1093809731)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093809718,false)set t=nullendfunctionfunction FUO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))if GetTriggerEventId()!=EVENT_UNIT_DAMAGED thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetEventDamageSource()==TLI and GetEventDamage()>0 thencall FlushChildHashtable(XY,(MKI))call MZI(t)if A61(TMI)==false thencall FQO(TMI)endifendifendifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction G0O takes nothing returns nothinglocal unit TLI=GetAttacker()local unit TMI=GetTriggerUnit()local trigger tlocal integer MKIif((LoadInteger(XY,(GetHandleId((TLI))),((4309))))==1)==false thencall MPI(TLI,4309,0.2)if GetRandomReal(0,100)<LS0 thenset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,2.5,false)call TriggerAddCondition(t,Condition(function FUO))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))endifendifset TLI=nullset TMI=nullendfunctionfunction GIO takes nothing returns nothinglocal unit FKO=GetAttacker()local integer G1O=25local integer id=GetPlayerId(GetOwningPlayer(GetAttacker()))local integer MKI=GetHandleId(FKO)local real MXI=(TimerGetElapsed(M))local real GOO=(LoadReal(XY,(MKI),(101)))local boolean G2O=(LoadBoolean(XY,(MKI),(99)))local boolean G3O=(LoadBoolean(XY,(MKI),(100)))local boolean G4O=MXI<GOOlocal boolean G5O=falseif IsUnitType(FKO,UNIT_TYPE_MELEE_ATTACKER)==false thenset G1O=10endifif GetRandomInt(0,100)<G1O thenset G5O=trueendifif GetUnitAbilityLevel(FKO,1093683786)>0 or GetUnitAbilityLevel(FKO,1093679153)>0 or GetUnitAbilityLevel(FKO,1093682997)>0 or GetUnitAbilityLevel(FKO,1093679429)>0 thencall UnitRemoveAbility(FKO,1093744436)set FKO=nullreturnendifif G2O and G4O==false and G3O==false thencall SaveReal(XY,(MKI),(101),((MXI+2)*1.0))if G5O==false thencall SaveBoolean(XY,(MKI),(100),(true))endifelseif G4O or G3O thencall UnitRemoveAbility(FKO,1093744436)call SaveBoolean(XY,(MKI),(99),(false))call SaveBoolean(XY,(MKI),(100),(false))endifif G5O thencall QTI(FKO,1093744436)call UnitMakeAbilityPermanent(FKO,true,1093744437)call SaveBoolean(XY,(MKI),(99),(true))endifset FKO=nullendfunctionfunction G7O takes unit u returns unitif IsUnitType(u,UNIT_TYPE_HERO)or GetUnitAbilityLevel(u,1093678162)==0 thenreturn uelsereturn K1[GetPlayerId(GetOwningPlayer(u))]endifendfunctionfunction G8O takes nothing returns booleanif IsUnitType(GetKillingUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitAlly(GetDyingUnit(),GetOwningPlayer(GetKillingUnit()))==false thenif GetUnitTypeId(GetTriggerUnit())==1848651850 thencall TKI(GetDyingUnit(),G7O(GetKillingUnit()),3,400)elseif GetUnitTypeId(GetTriggerUnit())==1848651841 thencall TKI(GetDyingUnit(),G7O(GetKillingUnit()),3,500)elseif GetUnitTypeId(GetTriggerUnit())==1848651830 thencall TKI(GetDyingUnit(),G7O(GetKillingUnit()),3,600)endifendifreturn falseendfunctionfunction GAO takes nothing returns booleanlocal unit N0I=GetTriggerUnit()local integer NGI=1if DB1(N0I,FK0[HN0])!=null thenset NGI=2endifif D91(N0I,FK0[FU0],GetManipulatedItem())!=null thenset NGI=3endifif D91(N0I,FK0[WL0],GetManipulatedItem())!=null thenset NGI=4endifif D91(N0I,FK0[ZG0],GetManipulatedItem())!=null or D91(N0I,FK0[ZH0],GetManipulatedItem())!=null or D91(N0I,FK0[ZZ0],GetManipulatedItem())!=null thenset NGI=5endifif D91(N0I,FK0[XI0],GetManipulatedItem())!=null thenset NGI=6endifif D91(N0I,FK0[HM0],GetManipulatedItem())!=null thenset NGI=7endifif D91(N0I,FK0[ZF0],GetManipulatedItem())!=null thenset NGI=8endifif D91(N0I,FK0[V20],GetManipulatedItem())!=null thencall UnitAddAbility(N0I,1093686832)call SetUnitAbilityLevel(N0I,1093686832,NGI)call UnitMakeAbilityPermanent(N0I,true,1093686832)elsecall UnitRemoveAbility(N0I,1093686832)endifset N0I=nullreturn falseendfunctionfunction GBO takes nothing returns booleanlocal unit N0I=GetTriggerUnit()local integer NGI=1if DB1(N0I,FK0[HN0])!=null thenset NGI=2endifif DB1(N0I,FK0[FU0])!=null thenset NGI=3endifif DB1(N0I,FK0[WL0])!=null thenset NGI=4endifif DB1(N0I,FK0[ZG0])!=null or DB1(N0I,FK0[ZH0])!=null or DB1(N0I,FK0[ZZ0])!=null thenset NGI=5endifif DB1(N0I,FK0[XI0])!=null thenset NGI=6endifif D91(N0I,FK0[HM0],GetManipulatedItem())!=null thenset NGI=7endifif DB1(N0I,FK0[ZF0])!=null thenset NGI=8endifif DB1(N0I,FK0[V20])!=null thencall UnitAddAbility(N0I,1093686832)call SetUnitAbilityLevel(N0I,1093686832,NGI)call UnitMakeAbilityPermanent(N0I,true,1093686832)endifset N0I=nullreturn falseendfunctionfunction GDO takes nothing returns nothinglocal unit N0I=GetTriggerUnit()if GetTriggerEventId()==EVENT_PLAYER_UNIT_DROP_ITEM thenif DH1(GetManipulatedItem())==WV0 or DH1(GetManipulatedItem())==WX0 thencall UnitRemoveAbility(N0I,1093816644)endifif DH1(GetManipulatedItem())==W30 thencall UnitRemoveAbility(N0I,1093747287)endifif DH1(GetManipulatedItem())==WG0 thencall UnitRemoveAbility(N0I,1093682995)call UnitRemoveAbility(N0I,1093679437)call UnitRemoveAbility(N0I,1093686616)call UnitRemoveAbility(N0I,1093815116)endifif DH1(GetManipulatedItem())==WZ0 or DH1(GetManipulatedItem())==WW0 thencall UnitRemoveAbility(N0I,1093816644)call UnitRemoveAbility(N0I,1093686339)call UnitRemoveAbility(N0I,1093686603)endifendifif GetTriggerEventId()==EVENT_PLAYER_UNIT_PICKUP_ITEM thenif DH1(GetManipulatedItem())==WV0 or DH1(GetManipulatedItem())==WX0 thencall UnitAddAbility(N0I,1093816644)call UnitMakeAbilityPermanent(N0I,true,1093816644)endifif DH1(GetManipulatedItem())==W30 thencall UnitAddAbility(N0I,1093747287)call UnitMakeAbilityPermanent(N0I,true,1093747287)endifif DH1(GetManipulatedItem())==WG0 thencall QTI(N0I,1093682995)call QTI(N0I,1093679437)call QTI(N0I,1093686616)call QTI(N0I,1093815116)endifif DH1(GetManipulatedItem())==WZ0 or DH1(GetManipulatedItem())==WW0 thencall UnitAddAbility(N0I,1093816644)call UnitMakeAbilityPermanent(N0I,true,1093816644)call UnitAddAbility(N0I,1093686339)call UnitMakeAbilityPermanent(N0I,true,1093686339)call UnitAddAbility(N0I,1093686603)call UnitMakeAbilityPermanent(N0I,true,1093686603)endifendifset N0I=nullendfunctionfunction GEO takes nothing returns booleanif GetItemType(GetManipulatedItem())==ITEM_TYPE_PERMANENT and(DH1(GetManipulatedItem())==WZ0 or DH1(GetManipulatedItem())==WV0 or DH1(GetManipulatedItem())==WW0 or DH1(GetManipulatedItem())==WX0 or DH1(GetManipulatedItem())==W30 or DH1(GetManipulatedItem())==WG0)thencall GDO()endifreturn falseendfunctionfunction GGO takes unit u,integer d returns nothinglocal integer array blocal integer a=dlocal integer c=1local integer i=0local integer DG1if d<1 thencall UnitRemoveAbility(u,LP0[0])call UnitRemoveAbility(u,LP0[1])call UnitRemoveAbility(u,LP0[2])call UnitRemoveAbility(u,LP0[3])call UnitRemoveAbility(u,LP0[4])returnendifloopexitwhen c==0set c=a/2set b[i]=a-c*2set a=cset i=i+1endloopset DG1=4set i=0loopexitwhen i>DG1if b[i]==1 thencall QTI(u,LP0[i])elsecall UnitRemoveAbility(u,LP0[i])endifset i=i+1endloopendfunctionfunction GHO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local item OT1=(LoadItemHandle(XY,(MKI),(96)))local integer MFI=(LoadInteger(XY,(MKI),(34)))local real GZO=GetUnitState(N0I,UNIT_STATE_MAX_LIFE)-GetUnitState(N0I,UNIT_STATE_LIFE)if GetTriggerEventId()==EVENT_UNIT_DROP_ITEM and GetManipulatedItem()==OT1 thencall SaveInteger(XY,(GetHandleId((N0I))),((4298)),(2))call GGO(N0I,0)call SetUnitState(N0I,UNIT_STATE_LIFE,RQI(GetUnitState(N0I,UNIT_STATE_MAX_LIFE)-GZO,1))call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEventId()!=EVENT_UNIT_DROP_ITEM and MFI<25 thencall SaveInteger(XY,(GetHandleId((N0I))),((4298)),(1))set MFI=MFI+1call GGO(N0I,MFI)call SetUnitState(N0I,UNIT_STATE_LIFE,RQI(GetUnitState(N0I,UNIT_STATE_MAX_LIFE)-GZO,1))call SaveInteger(XY,(MKI),(34),(MFI))elsecall SaveInteger(XY,(GetHandleId((N0I))),((4298)),(2))endifset t=nullset N0I=nullset OT1=nullreturn falseendfunctionfunction GVO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local item OT1=(LoadItemHandle(XY,(MKI),(96)))if GetTriggerEventId()==EVENT_UNIT_DROP_ITEM and GetManipulatedItem()==OT1 thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEventId()!=EVENT_UNIT_DROP_ITEM thenif((LoadInteger(XY,(GetHandleId((N0I))),((4310))))==1)==false thencall SetUnitState(N0I,UNIT_STATE_LIFE,RQI(GetUnitState(N0I,UNIT_STATE_LIFE)-LR0*0.1,1))endifendifset t=nullset N0I=nullset OT1=nullreturn falseendfunctionfunction GWO takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.1,true)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_DROP_ITEM)call TriggerAddCondition(t,Condition(function GVO))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveItemHandle(XY,(MKI),(96),(GetManipulatedItem()))call TriggerEvaluate(t)set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.7/25,true)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_DROP_ITEM)call TriggerAddCondition(t,Condition(function GHO))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveItemHandle(XY,(MKI),(96),(GetManipulatedItem()))call SaveInteger(XY,(MKI),(34),(0))set t=nullset N0I=nullendfunctionfunction GXO takes nothing returns booleanif GetItemType(GetManipulatedItem())==ITEM_TYPE_PERMANENT and(DH1(GetManipulatedItem())==WZ0 or DH1(GetManipulatedItem())==WW0)thencall GWO()endifreturn falseendfunctionfunction GJO takes nothing returns nothinglocal unit TLI=LQ0local unit TMI=GetEnumUnit()if((LoadInteger(XY,(GetHandleId((TMI))),((4341))))==1)==false thencall MPI(TMI,4341,0.99)set LU0=truecall TKI(TLI,TMI,1,50)set LU0=falsecall PKI("Abilities\\Spells\\Items\\HealingSalve\\HealingSalveTarget.mdl",TMI,"origin",0.9)endifset TLI=nullset TMI=nullendfunctionfunction GKO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local item OT1=(LoadItemHandle(XY,(MKI),(96)))local group gif N0I==null or(GetTriggerEventId()==EVENT_UNIT_DROP_ITEM and GetManipulatedItem()==OT1)thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEventId()!=EVENT_UNIT_DROP_ITEM thenif QPI(N0I)==false thenset g=MDI()set CK=N0Iset LQ0=N0Icall GroupEnumUnitsInRange(g,GetUnitX(N0I),GetUnitY(N0I),725,Condition(function AT1))call ForGroup(g,function GJO)call MCI(g)set g=nullendifendifset t=nullset N0I=nullset OT1=nullreturn falseendfunctionfunction GLO takes unit N0I returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,1,true)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_DROP_ITEM)call TriggerAddCondition(t,Condition(function GKO))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveItemHandle(XY,(MKI),(96),(GetManipulatedItem()))set t=nullendfunctionfunction GMO takes nothing returns booleanif GetTriggerEventId()==EVENT_PLAYER_UNIT_PICKUP_ITEM and GetItemType(GetManipulatedItem())==ITEM_TYPE_PERMANENT and DH1(GetManipulatedItem())==WI0 thencall GLO(GetTriggerUnit())endifif GetTriggerEventId()==EVENT_PLAYER_UNIT_SUMMON and UnitInventorySize(GetSummonedUnit())>0 and DB1(GetSummonedUnit(),FK0[WI0])!=null thencall GLO(GetSummonedUnit())endifreturn falseendfunctionfunction GSO takes unit u returns booleanlocal item GTO=CreateItem(1227901771,GetUnitX(u),GetUnitY(u))local boolean DR1=UnitAddItem(u,GTO)if DR1==false thencall RemoveItem(GTO)endifreturn DR1endfunctionfunction GRO takes unit N0I,item OT1,integer E01 returns itemlocal real x=DT1(N0I)local real y=DP1(N0I)local integer i=0local boolean array EI1local item E11loopexitwhen i>(UnitInventorySize(N0I)-1)if UnitItemInSlot(N0I,i)==null and i!=E01 thenset E11=CreateItem(1227895373,x,y)call UnitAddItem(N0I,E11)set EI1[i]=trueelseset EI1[i]=falseendifif i==E01 thencall UnitAddItem(N0I,OT1)endifset i=i+1endloopset i=0loopexitwhen i>5if EI1[i]==true thencall RemoveItem(UnitItemInSlot(N0I,i))endifset i=i+1endloopset FK=OT1set E11=nullreturn FKendfunctionfunction GPO takes unit N0I,integer GQO returns nothinglocal integer i=0local item GUOlocal integer CN1local unit QHIlocal item H0Oif QPI(N0I)thenreturnendifcall DisableTrigger(L30)if KR0[GetPlayerId(GetOwningPlayer(N0I))]>0 and GQO==VS0 thencall DM1(N0I,1227901005)endifloopexitwhen i>5set GUO=UnitItemInSlot(N0I,i)set CN1=DH1(GUO)if CN1==VT0 or CN1==VS0 thenset VK=GetItemPlayer(GUO)call RemoveItem(GUO)set QHI=CreateUnit(GetOwningPlayer(N0I),1697656901,GetUnitX(N0I),GetUnitY(N0I),0)call UnitAddAbility(QHI,1095331446)set H0O=UnitAddItemById(QHI,FK0[GQO])call UnitResetCooldown(QHI)call UnitUseItem(QHI,H0O)set FK=GRO(N0I,H0O,i)call SetItemPlayer(H0O,VK,false)call SetItemUserData(H0O,1)call UnitRemoveAbility(QHI,1095331446)set QHI=nullset H0O=nullendifset GUO=nullset i=i+1endloopcall EnableTrigger(L30)endfunctionfunction HIO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local integer i=0local item GUOlocal integer CN1local unit QHIlocal item H0Oif GetTriggerEventId()==EVENT_UNIT_DEATH thencall SaveBoolean(XY,(GetHandleId(N0I)),(102),(false))call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GSO(N0I)==false thencall TriggerRegisterTimerEvent(t,5.5,false)elsecall SaveBoolean(XY,(GetHandleId(N0I)),(102),(false))call GPO(N0I,VS0)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset N0I=nullreturn falseendfunctionfunction H1O takes unit N0I returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer i=0local item GUOlocal integer CN1local unit QHIlocal item H0Ocall SaveBoolean(XY,(GetHandleId(N0I)),(102),(true))call TriggerRegisterTimerEvent(t,M00,false)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function HIO))call SaveUnitHandle(XY,(MKI),(14),(N0I))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\DispelMagic\\DispelMagicTarget.mdl",N0I,"origin"))call GPO(N0I,VT0)set t=nullendfunctionfunction HOO takes nothing returns booleanlocal integer i=1local unit N0Ilocal integer idif Q2 thenreturn falseendifif L40>0 thenloopexitwhen i>5set id=GetPlayerId(BO[i])set N0I=K1[id]if KR0[id]>0 and N0I!=null and GetUnitTypeId(N0I)>1 and IsUnitType(N0I,UNIT_TYPE_DEAD)==false and(LoadBoolean(XY,(GetHandleId(N0I)),(102)))==false and MBI(N0I)==false and(LoadBoolean(XY,(GetHandleId(N0I)),(129)))==false thencall H1O(N0I)endifset id=GetPlayerId(CO[i])set N0I=K1[id]if KR0[id]>0 and N0I!=null and GetUnitTypeId(N0I)>1 and IsUnitType(N0I,UNIT_TYPE_DEAD)==false and(LoadBoolean(XY,(GetHandleId(N0I)),(102)))==false and MBI(N0I)==false and(LoadBoolean(XY,(GetHandleId(N0I)),(129)))==false thencall H1O(N0I)endifset i=i+1endloopendifset N0I=nullreturn falseendfunctionfunction H2O takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))if GetTriggerEventId()==EVENT_WIDGET_DEATH or GetUnitAbilityLevel(TMI,1110458953)==0 thencall H1O(TLI)if GetTriggerEventId()!=EVENT_WIDGET_DEATH thencall DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\DispelMagic\\DispelMagicTarget.mdl",TMI,"origin"))endifcall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEvalCount(t)>=R2I(M00/0.1)thencall SaveBoolean(XY,(GetHandleId(TLI)),(102),(false))call GPO(TLI,VS0)call UnitRemoveAbility(TMI,1110458953)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction H3O takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()call DM1(TMI,1227901005)call TriggerRegisterTimerEvent(t,0.1,true)call TriggerRegisterDeathEvent(t,TMI)call TriggerAddCondition(t,Condition(function H2O))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("effects\\Linkens_Main.mdx",TMI,"chest")))call SaveBoolean(XY,(GetHandleId(TLI)),(102),(true))call UnitRemoveAbility(TLI,1110458953)call GPO(TLI,VT0)set t=nullset TLI=nullset TMI=nullendfunctionfunction H4O takes nothing returns booleanif GetSpellAbilityId()==1093817925 and IsUnitIllusion(GetSpellTargetUnit())==false thencall H3O()endifreturn falseendfunctionfunction H6O takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))if TLI!=TMI thencall TKI(TLI,TMI,1,50)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction H7O takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local unit QHIif TMI==null thenset TMI=TLIendifset QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call UnitAddAbility(QHI,1093743446)call IssueTargetOrder(QHI,"cyclone",TMI)call TriggerRegisterTimerEvent(t,2.51,true)call TriggerRegisterDeathEvent(t,TMI)call TriggerAddCondition(t,Condition(function H6O))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))set t=nullset TLI=nullset TMI=nullendfunctionfunction H8O takes nothing returns booleanif GetSpellAbilityId()==1093751863 thenif GetTriggerUnit()==GetSpellTargetUnit()or T6I(GetSpellTargetUnit())==false thenif MBI(GetSpellTargetUnit())==false or GetTriggerUnit()==GetSpellTargetUnit()thencall H7O()endifendifendifreturn falseendfunctionfunction HAO takes integer DU1 returns integerif DU1==1227894838 thenreturn HD0elseif DU1==1227894840 thenreturn HE0elseif DU1==1227894858 thenreturn HB0elseif DU1==1227894859 thenreturn HC0elseif DU1==1227894839 thenreturn HF0endifreturn-1endfunctionfunction HBO takes nothing returns booleanif GetSpellAbilityId()==1093683254 thencall SaveUnitHandle(XY,(GetHandleId(GetTriggerUnit())),(103),(null))call SaveInteger(XY,(GetHandleId(GetTriggerUnit())),(104),(0))if(DB1(GetTriggerUnit(),FK0[H70])!=null or DB1(GetTriggerUnit(),FM0[H70])!=null)and(GetUnitTypeId(GetSpellTargetUnit())==1852206952 or GetUnitTypeId(GetSpellTargetUnit())==1852073580)thencall SaveUnitHandle(XY,(GetHandleId(GetTriggerUnit())),(103),(GetSpellTargetUnit()))elseif OUO(GetItemTypeId(GetSpellTargetItem()))thencall DDO(GetTriggerUnit(),GetItemTypeId(GetSpellTargetItem()),true)call SaveInteger(XY,(GetHandleId(GetTriggerUnit())),(104),(GetItemTypeId(GetSpellTargetItem())))call D81(GetSpellTargetItem())endifendifreturn falseendfunctionfunction HCO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit u=(LoadUnitHandle(XY,(MKI),(26)))local integer DPO=(LoadInteger(XY,(MKI),(98)))local item OT1=UnitItemInSlot(u,DPO)local integer HDO=(LoadInteger(XY,(MKI),(105)))local item H0Olocal integer E01if OT1!=null and CS1(CR1(OT1))and GetHandleId(OT1)==HDO and QPI(u)==false and QPI(u)==false thenset H0O=CreateItem((LoadInteger(XY,(GetHandleId(OT1)),(GetHandleId(u)))),GetUnitX(u),GetUnitY(u))call FlushChildHashtable(XY,(GetHandleId(OT1)))set E01=IV1(u,OT1)set VK=GetItemPlayer(OT1)call D81(OT1)set FK=DQ1(u,FK0[HA0],E01)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)call FlushChildHashtable(XY,(MKI))call MZI(t)call UnitAddItem(u,H0O)call UnitRemoveAbility(u,1110460233)endifset t=nullset u=nullset OT1=nullset H0O=nullreturn falseendfunctionfunction HEO takes unit u,item H0O returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer DPO=IV1(u,H0O)call SaveInteger(XY,(MKI),(98),(DPO))call SaveInteger(XY,(MKI),(105),(GetHandleId(H0O)))call SaveUnitHandle(XY,(MKI),(26),(u))call TriggerRegisterTimerEvent(t,120,true)call TriggerAddCondition(t,Condition(function HCO))set t=nullendfunctionfunction HFO takes nothing returns nothinglocal unit u=GetTriggerUnit()local item OT1=GetManipulatedItem()local integer CN1=CR1(OT1)local unit HGOlocal integer HHOlocal boolean TargetFroglocal integer E01local item H0Olocal integer HZOif CN1==H70 thenset E01=IV1(u,OT1)set HGO=(LoadUnitHandle(XY,(GetHandleId(u)),(103)))set HHO=(LoadInteger(XY,(GetHandleId(u)),(104)))if GetUnitTypeId(HGO)==1852206952 or GetUnitTypeId(HGO)==1852073580 thencall DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\ReplenishMana\\SpiritTouchTarget.mdl",u,"overhead"))call TQI(GetOwningPlayer(u),"Abilities\\Spells\\Human\\Heal\\HealTarget.wav")set VK=GetItemPlayer(OT1)call D81(OT1)set FK=DQ1(u,FK0[HA0],E01)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)call UnitRemoveAbility(u,1110460233)elseif OUO(HHO)thenset HZO=HAO(HHO)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\ReplenishMana\\SpiritTouchTarget.mdl",u,"overhead"))set VK=GetItemPlayer(OT1)call D81(OT1)call DisableTrigger(L30)if GetOwningPlayer(u)==VK thenset FK=DQ1(u,FK0[HZO],E01)elseset FK=DQ1(u,FM0[HZO],E01)endifcall EnableTrigger(L30)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)set H0O=UnitItemInSlot(u,E01)call SaveInteger(XY,(GetHandleId(H0O)),(GetHandleId(u)),(HHO))call HEO(u,H0O)call UnitRemoveAbility(u,1110460233)endifelseif CN1==HA0 thenset E01=IV1(u,OT1)set VK=GetItemPlayer(OT1)call D81(OT1)set FK=DQ1(u,FK0[H90],E01)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)call UnitRemoveAbility(u,1110460233)elseif CN1==H90 thenset E01=IV1(u,OT1)set VK=GetItemPlayer(OT1)call D81(OT1)set FK=DQ1(u,FK0[H80],E01)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)call UnitRemoveAbility(u,1110460233)elseif CN1==H80 thenset E01=IV1(u,OT1)set VK=GetItemPlayer(OT1)call D81(OT1)set FK=DQ1(u,FK0[H70],E01)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,0)elseif CS1(CN1)thenif(LoadInteger(XY,(GetHandleId(OT1)),(GetHandleId(u))))>0 thenset LF0=trueset E01=IV1(u,OT1)set H0O=CreateItem((LoadInteger(XY,(GetHandleId(OT1)),(GetHandleId(u)))),GetUnitX(u),GetUnitY(u))call FlushChildHashtable(XY,(GetHandleId(OT1)))set VK=GetItemPlayer(OT1)call D81(OT1)set FK=DQ1(u,FK0[HA0],E01)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)call UnitAddItem(u,H0O)set LF0=falsecall UnitRemoveAbility(u,1110460233)endifendifset u=nullset OT1=nullset HGO=nullset H0O=nullendfunctionfunction HVO takes nothing returns booleanif GetIssuedOrderId()==851971 thenif GetOrderTargetItem()!=null and OUO(GetItemTypeId(GetOrderTargetItem()))thencall R6I(GetTriggerUnit())call R1I(GetOwningPlayer(GetTriggerUnit()),GetObjectName(1848659029))endifendifreturn falseendfunctionfunction HWO takes unit HXO returns nothinglocal trigger t=CreateTrigger()call TriggerRegisterUnitEvent(t,HXO,EVENT_UNIT_ISSUED_TARGET_ORDER)call TriggerAddCondition(t,Condition(function HVO))set t=nullendfunctionfunction HYO takes player p returns integerlocal integer r=GetRandomInt(1,6)if NZI(p)thenif r==1 thenreturn 1848651849elseif r==2 thenreturn 1848652338elseif r==3 thenreturn 1848652337elseif r==4 thenreturn 1848658777elseif r==5 thenreturn 1848658778elsereturn 1848659013endifelseif r==1 thenreturn 1848652339elseif r==2 thenreturn 1848652340elseif r==3 thenreturn 1848652341elseif r==4 thenreturn 1848658992elseif r==5 thenreturn 1848658993elsereturn 1848659252endifendifreturn 0endfunctionfunction HJO takes player p returns integerif GetRandomInt(1,3)==1 thenreturn 1697657426elseif NZI(p)thenreturn 1697657160elsereturn 1697657178endifreturn 0endfunctionfunction HKO takes nothing returns nothinglocal unit HLO=CreateUnit(GetOwningPlayer(GetTriggerUnit()),HYO(GetOwningPlayer(GetTriggerUnit())),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetUnitFacing(GetTriggerUnit()))local real x=GetUnitX(GetTriggerUnit())local real y=GetUnitY(GetTriggerUnit())local real a=GetUnitFacing(GetTriggerUnit())call OMO(HLO)call SetUnitPosition(HLO,x+25*Cos(a*bj_DEGTORAD),y+25*Sin(a*bj_DEGTORAD))if FM[GetPlayerId(GetOwningPlayer(HLO))]==false thencall UnitRemoveType(HLO,UNIT_TYPE_PEON)elsecall UnitAddType(HLO,UNIT_TYPE_PEON)endifendfunctionfunction HMO takes nothing returns nothinglocal unit HLO=CreateUnit(GetOwningPlayer(GetTriggerUnit()),HJO(GetOwningPlayer(GetTriggerUnit())),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetUnitFacing(GetTriggerUnit()))call OMO(HLO)if FM[GetPlayerId(GetOwningPlayer(HLO))]==false thencall UnitRemoveType(HLO,UNIT_TYPE_PEON)elsecall UnitAddType(HLO,UNIT_TYPE_PEON)endifcall HWO(HLO)endfunctionfunction HNO takes nothing returns booleanif GetSpellAbilityId()==1093681718 thencall HKO()endifif GetSpellAbilityId()==1093683796 thencall HMO()endifreturn falseendfunctionfunction HSO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit HLO=(LoadUnitHandle(XY,(MKI),(124)))local integer HTO=(LoadInteger(XY,(MKI),(125)))local integer HRO=(LoadInteger(XY,(MKI),(106)))local integer HPO=(LoadInteger(XY,(MKI),(107)))local integer HQO=(LoadInteger(XY,(MKI),(108)))local integer HUO=(LoadInteger(XY,(MKI),(109)))local integer Z0O=(LoadInteger(XY,(MKI),(110)))local integer ZIO=(LoadInteger(XY,(MKI),(111)))local player p0=(LoadPlayerHandle(XY,(MKI),(118)))local player p1=(LoadPlayerHandle(XY,(MKI),(119)))local player p2=(LoadPlayerHandle(XY,(MKI),(120)))local player p3=(LoadPlayerHandle(XY,(MKI),(121)))local player p4=(LoadPlayerHandle(XY,(MKI),(122)))local player p5=(LoadPlayerHandle(XY,(MKI),(123)))local integer Z1O=(LoadInteger(XY,(MKI),(112)))local integer ZOO=(LoadInteger(XY,(MKI),(113)))local integer Z2O=(LoadInteger(XY,(MKI),(114)))local integer Z3O=(LoadInteger(XY,(MKI),(115)))local integer Z4O=(LoadInteger(XY,(MKI),(116)))local integer Z5O=(LoadInteger(XY,(MKI),(117)))call DisableTrigger(L30)if GetTriggerEvalCount(t)==1 thencall UnitAddAbility(HLO,HTO)if FM[GetPlayerId(GetOwningPlayer(HLO))]==false thencall UnitRemoveType(HLO,UNIT_TYPE_PEON)elsecall UnitAddType(HLO,UNIT_TYPE_PEON)endifelseif HRO>0 thenset FK=CreateItem(HRO,GetUnitX(HLO),GetUnitY(HLO))call UnitAddItem(HLO,FK)call SetItemPlayer(FK,p0,false)call SetItemUserData(FK,1)endifif Z1O>0 thencall SetItemCharges(FK,Z1O)endifif HPO>0 thenset FK=CreateItem(HPO,GetUnitX(HLO),GetUnitY(HLO))call UnitAddItem(HLO,FK)call SetItemPlayer(FK,p1,false)call SetItemUserData(FK,1)endifif ZOO>0 thencall SetItemCharges(FK,ZOO)endifif HQO>0 thenset FK=CreateItem(HQO,GetUnitX(HLO),GetUnitY(HLO))call UnitAddItem(HLO,FK)call SetItemPlayer(FK,p2,false)call SetItemUserData(FK,1)endifif Z2O>0 thencall SetItemCharges(FK,Z2O)endifif HUO>0 thenset FK=CreateItem(HUO,GetUnitX(HLO),GetUnitY(HLO))call UnitAddItem(HLO,FK)call SetItemPlayer(FK,p3,false)call SetItemUserData(FK,1)endifif Z3O>0 thencall SetItemCharges(FK,Z3O)endifif Z0O>0 thenset FK=CreateItem(Z0O,GetUnitX(HLO),GetUnitY(HLO))call UnitAddItem(HLO,FK)call SetItemPlayer(FK,p4,false)call SetItemUserData(FK,1)endifif Z4O>0 thencall SetItemCharges(FK,Z4O)endifif ZIO>0 thenset FK=CreateItem(ZIO,GetUnitX(HLO),GetUnitY(HLO))call UnitAddItem(HLO,FK)call SetItemPlayer(FK,p5,false)call SetItemUserData(FK,1)endifif Z5O>0 thencall SetItemCharges(FK,Z5O)endifif FM[GetPlayerId(GetOwningPlayer(HLO))]==false thencall UnitRemoveType(HLO,UNIT_TYPE_PEON)elsecall UnitAddType(HLO,UNIT_TYPE_PEON)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)endifcall EnableTrigger(L30)set t=nullset HLO=nullset p0=nullset p1=nullset p2=nullset p3=nullset p4=nullset p5=nullreturn falseendfunctionfunction Z6O takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit Z7O=(LoadUnitHandle(XY,(MKI),(2)))local integer Z8O=GetUnitTypeId(Z7O)local real x=GetUnitX(Z7O)local real y=GetUnitY(Z7O)local item Z9Olocal item ZAOlocal item ZBOlocal item ZCOlocal item ZDOlocal item ZEOlocal player p0local player p1local player p2local player p3local player p4local player p5local integer HROlocal integer HPOlocal integer HQOlocal integer HUOlocal integer Z0Olocal integer ZIOlocal integer Z1O=-1local integer ZOO=-1local integer Z2O=-1local integer Z3O=-1local integer Z4O=-1local integer Z5O=-1local integer HTOlocal item OT1call FlushChildHashtable(XY,(MKI))call MZI(t)if Z7O==null or QPI(Z7O)thenreturn falseendifset t=CreateTrigger()set MKI=GetHandleId(t)set Z9O=UnitItemInSlot(Z7O,0)set ZAO=UnitItemInSlot(Z7O,1)set ZBO=UnitItemInSlot(Z7O,2)set ZCO=UnitItemInSlot(Z7O,3)set ZDO=UnitItemInSlot(Z7O,4)set ZEO=UnitItemInSlot(Z7O,5)set HRO=GetItemTypeId(Z9O)set HPO=GetItemTypeId(ZAO)set HQO=GetItemTypeId(ZBO)set HUO=GetItemTypeId(ZCO)set Z0O=GetItemTypeId(ZDO)set ZIO=GetItemTypeId(ZEO)set p0=GetItemPlayer(Z9O)set p1=GetItemPlayer(ZAO)set p2=GetItemPlayer(ZBO)set p3=GetItemPlayer(ZCO)set p4=GetItemPlayer(ZDO)set p5=GetItemPlayer(ZEO)set OT1=Z9Oif GetItemType(OT1)==ITEM_TYPE_ARTIFACT or D21(CR1(OT1))or DO1(CR1(OT1))thenset Z1O=GetItemCharges(OT1)endifset OT1=ZAOif GetItemType(OT1)==ITEM_TYPE_ARTIFACT or D21(CR1(OT1))or DO1(CR1(OT1))thenset ZOO=GetItemCharges(OT1)endifset OT1=ZBOif GetItemType(OT1)==ITEM_TYPE_ARTIFACT or D21(CR1(OT1))or DO1(CR1(OT1))thenset Z2O=GetItemCharges(OT1)endifset OT1=ZCOif GetItemType(OT1)==ITEM_TYPE_ARTIFACT or D21(CR1(OT1))or DO1(CR1(OT1))thenset Z3O=GetItemCharges(OT1)endifset OT1=ZDOif GetItemType(OT1)==ITEM_TYPE_ARTIFACT or D21(CR1(OT1))or DO1(CR1(OT1))thenset Z4O=GetItemCharges(OT1)endifset OT1=ZEOif GetItemType(OT1)==ITEM_TYPE_ARTIFACT or D21(CR1(OT1))or DO1(CR1(OT1))thenset Z5O=GetItemCharges(OT1)endifcall D81(Z9O)call D81(ZAO)call D81(ZBO)call D81(ZCO)call D81(ZDO)call D81(ZEO)if Z8O==1848651849 thenset HTO=1395667001elseif Z8O==1848652338 thenset HTO=1395667030elseif Z8O==1848652337 thenset HTO=1395667011elseif Z8O==1848652339 thenset HTO=1395667013elseif Z8O==1848652340 thenset HTO=1395667010elseif Z8O==1848652341 thenset HTO=1395667014elseif Z8O==1848658777 thenset HTO=1395667031elseif Z8O==1848658778 thenset HTO=1395667033elseif Z8O==1848658992 thenset HTO=1395667032elseif Z8O==1848658993 thenset HTO=1395667012elseif Z8O==1848659013 thenset HTO=1395667270elseif Z8O==1848659252 thenset HTO=1395667253endifif GetRandomInt(1,10)==1 thenset HTO=1395667015endifif GetRandomInt(1,10)<3 thenset HTO=1395667254endifif Z8O==1848651853 thenset HTO=1395667020elseif Z8O==1848659027 thenset HTO=1395667020elseif Z8O==1848658006 thenset HTO=1395667014endifif Z8O==1697657160 thenset HTO=1395667250elseif Z8O==1697657178 thenset HTO=1395667248elseif Z8O==1697657426 thenset HTO=1395667252elseif Z8O==1697657428 thenset HTO=1395667249elseif Z8O==1697657427 thenset HTO=1395667255elseif Z8O==1697657648 thenset HTO=1395667251endifcall SavePlayerHandle(XY,(MKI),(118),(p0))call SavePlayerHandle(XY,(MKI),(119),(p1))call SavePlayerHandle(XY,(MKI),(120),(p2))call SavePlayerHandle(XY,(MKI),(121),(p3))call SavePlayerHandle(XY,(MKI),(122),(p4))call SavePlayerHandle(XY,(MKI),(123),(p5))call SaveInteger(XY,(MKI),(106),(HRO))call SaveInteger(XY,(MKI),(107),(HPO))call SaveInteger(XY,(MKI),(108),(HQO))call SaveInteger(XY,(MKI),(109),(HUO))call SaveInteger(XY,(MKI),(110),(Z0O))call SaveInteger(XY,(MKI),(111),(ZIO))call SaveInteger(XY,(MKI),(112),(Z1O))call SaveInteger(XY,(MKI),(113),(ZOO))call SaveInteger(XY,(MKI),(114),(Z2O))call SaveInteger(XY,(MKI),(115),(Z3O))call SaveInteger(XY,(MKI),(116),(Z4O))call SaveInteger(XY,(MKI),(117),(Z5O))call SaveUnitHandle(XY,(MKI),(124),(Z7O))call SaveInteger(XY,(MKI),(125),(HTO))call TriggerRegisterTimerEvent(t,0.05,true)call TriggerAddCondition(t,Condition(function HSO))set t=nullset Z7O=nullset Z9O=nullset ZAO=nullset ZBO=nullset ZCO=nullset ZDO=nullset ZEO=nullset p0=nullset p1=nullset p2=nullset p3=nullset p4=nullset p5=nullreturn falseendfunctionfunction ZFO takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.05,false)call TriggerAddCondition(t,Condition(function Z6O))call SaveUnitHandle(XY,(MKI),(2),(GetTriggerUnit()))set t=nullendfunctionfunction ZGO takes nothing returns booleanif GetSpellAbilityId()==1093685076 thencall ZFO()endifreturn falseendfunctionfunction ZHO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit HLO=(LoadUnitHandle(XY,(MKI),(124)))local integer HTO=(LoadInteger(XY,(MKI),(125)))local integer HRO=(LoadInteger(XY,(MKI),(106)))local integer HPO=(LoadInteger(XY,(MKI),(107)))local integer HQO=(LoadInteger(XY,(MKI),(108)))local integer HUO=(LoadInteger(XY,(MKI),(109)))local integer Z0O=(LoadInteger(XY,(MKI),(110)))local integer ZIO=(LoadInteger(XY,(MKI),(111)))local player p0=(LoadPlayerHandle(XY,(MKI),(118)))local player p1=(LoadPlayerHandle(XY,(MKI),(119)))local player p2=(LoadPlayerHandle(XY,(MKI),(120)))local player p3=(LoadPlayerHandle(XY,(MKI),(121)))local player p4=(LoadPlayerHandle(XY,(MKI),(122)))local player p5=(LoadPlayerHandle(XY,(MKI),(123)))local integer Z1O=(LoadInteger(XY,(MKI),(112)))local integer ZOO=(LoadInteger(XY,(MKI),(113)))local integer Z2O=(LoadInteger(XY,(MKI),(114)))local integer Z3O=(LoadInteger(XY,(MKI),(115)))local integer Z4O=(LoadInteger(XY,(MKI),(116)))local integer Z5O=(LoadInteger(XY,(MKI),(117)))call DisableTrigger(L30)if GetTriggerEvalCount(t)==1 thencall UnitAddAbility(HLO,HTO)if FM[GetPlayerId(GetOwningPlayer(HLO))]==false thencall UnitRemoveType(HLO,UNIT_TYPE_PEON)elsecall UnitAddType(HLO,UNIT_TYPE_PEON)endifelseif HRO>0 thenset FK=CreateItem(HRO,GetUnitX(HLO),GetUnitY(HLO))call UnitAddItem(HLO,FK)call SetItemPlayer(FK,p0,false)call SetItemUserData(FK,1)endifif Z1O>0 thencall SetItemCharges(FK,Z1O)endifif HPO>0 thenset FK=CreateItem(HPO,GetUnitX(HLO),GetUnitY(HLO))call UnitAddItem(HLO,FK)call SetItemPlayer(FK,p1,false)call SetItemUserData(FK,1)endifif ZOO>0 thencall SetItemCharges(FK,ZOO)endifif HQO>0 thenset FK=CreateItem(HQO,GetUnitX(HLO),GetUnitY(HLO))call UnitAddItem(HLO,FK)call SetItemPlayer(FK,p2,false)call SetItemUserData(FK,1)endifif Z2O>0 thencall SetItemCharges(FK,Z2O)endifif HUO>0 thenset FK=CreateItem(HUO,GetUnitX(HLO),GetUnitY(HLO))call UnitAddItem(HLO,FK)call SetItemPlayer(FK,p3,false)call SetItemUserData(FK,1)endifif Z3O>0 thencall SetItemCharges(FK,Z3O)endifif Z0O>0 thenset FK=CreateItem(Z0O,GetUnitX(HLO),GetUnitY(HLO))call UnitAddItem(HLO,FK)call SetItemPlayer(FK,p4,false)call SetItemUserData(FK,1)endifif Z4O>0 thencall SetItemCharges(FK,Z4O)endifif ZIO>0 thenset FK=CreateItem(ZIO,GetUnitX(HLO),GetUnitY(HLO))call UnitAddItem(HLO,FK)call SetItemPlayer(FK,p5,false)call SetItemUserData(FK,1)endifif Z5O>0 thencall SetItemCharges(FK,Z5O)endifif FM[GetPlayerId(GetOwningPlayer(HLO))]==false thencall UnitRemoveType(HLO,UNIT_TYPE_PEON)elsecall UnitAddType(HLO,UNIT_TYPE_PEON)endifcall SetUnitFlyHeight(HLO,240,0)call FlushChildHashtable(XY,(MKI))call MZI(t)endifcall EnableTrigger(L30)set t=nullset HLO=nullset p0=nullset p1=nullset p2=nullset p3=nullset p4=nullset p5=nullreturn falseendfunctionfunction ZZO takes unit Z7O returns nothinglocal integer Z8O=GetUnitTypeId(Z7O)local real x=GetUnitX(Z7O)local real y=GetUnitY(Z7O)local item Z9Olocal item ZAOlocal item ZBOlocal item ZCOlocal item ZDOlocal item ZEOlocal player p0local player p1local player p2local player p3local player p4local player p5local integer HROlocal integer HPOlocal integer HQOlocal integer HUOlocal integer Z0Olocal integer ZIOlocal integer Z1O=-1local integer ZOO=-1local integer Z2O=-1local integer Z3O=-1local integer Z4O=-1local integer Z5O=-1local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer HTOlocal item OT1local integer ilocal item ZVOset i=0loopexitwhen i>5set ZVO=UnitItemInSlot(Z7O,i)if CR1(ZVO)==GB0 thencall UnitRemoveItem(Z7O,ZVO)endifset i=i+1endloopset Z9O=UnitItemInSlot(Z7O,0)set ZAO=UnitItemInSlot(Z7O,1)set ZBO=UnitItemInSlot(Z7O,2)set ZCO=UnitItemInSlot(Z7O,3)set ZDO=UnitItemInSlot(Z7O,4)set ZEO=UnitItemInSlot(Z7O,5)set HRO=GetItemTypeId(Z9O)set HPO=GetItemTypeId(ZAO)set HQO=GetItemTypeId(ZBO)set HUO=GetItemTypeId(ZCO)set Z0O=GetItemTypeId(ZDO)set ZIO=GetItemTypeId(ZEO)set p0=GetItemPlayer(Z9O)set p1=GetItemPlayer(ZAO)set p2=GetItemPlayer(ZBO)set p3=GetItemPlayer(ZCO)set p4=GetItemPlayer(ZDO)set p5=GetItemPlayer(ZEO)set OT1=Z9Oif GetItemType(OT1)==ITEM_TYPE_ARTIFACT or D21(CR1(OT1))or DO1(CR1(OT1))thenset Z1O=GetItemCharges(OT1)endifset OT1=ZAOif GetItemType(OT1)==ITEM_TYPE_ARTIFACT or D21(CR1(OT1))or DO1(CR1(OT1))thenset ZOO=GetItemCharges(OT1)endifset OT1=ZBOif GetItemType(OT1)==ITEM_TYPE_ARTIFACT or D21(CR1(OT1))or DO1(CR1(OT1))thenset Z2O=GetItemCharges(OT1)endifset OT1=ZCOif GetItemType(OT1)==ITEM_TYPE_ARTIFACT or D21(CR1(OT1))or DO1(CR1(OT1))thenset Z3O=GetItemCharges(OT1)endifset OT1=ZDOif GetItemType(OT1)==ITEM_TYPE_ARTIFACT or D21(CR1(OT1))or DO1(CR1(OT1))thenset Z4O=GetItemCharges(OT1)endifset OT1=ZEOif GetItemType(OT1)==ITEM_TYPE_ARTIFACT or D21(CR1(OT1))or DO1(CR1(OT1))thenset Z5O=GetItemCharges(OT1)endifcall D81(Z9O)call D81(ZAO)call D81(ZBO)call D81(ZCO)call D81(ZDO)call D81(ZEO)if NZI(GetOwningPlayer(Z7O))thenset HTO=1395667017elseset HTO=1395667018endifif GetRandomInt(1,3)==1 thenset HTO=1395667034endifcall SavePlayerHandle(XY,(MKI),(118),(p0))call SavePlayerHandle(XY,(MKI),(119),(p1))call SavePlayerHandle(XY,(MKI),(120),(p2))call SavePlayerHandle(XY,(MKI),(121),(p3))call SavePlayerHandle(XY,(MKI),(122),(p4))call SavePlayerHandle(XY,(MKI),(123),(p5))call SaveInteger(XY,(MKI),(106),(HRO))call SaveInteger(XY,(MKI),(107),(HPO))call SaveInteger(XY,(MKI),(108),(HQO))call SaveInteger(XY,(MKI),(109),(HUO))call SaveInteger(XY,(MKI),(110),(Z0O))call SaveInteger(XY,(MKI),(111),(ZIO))call SaveInteger(XY,(MKI),(112),(Z1O))call SaveInteger(XY,(MKI),(113),(ZOO))call SaveInteger(XY,(MKI),(114),(Z2O))call SaveInteger(XY,(MKI),(115),(Z3O))call SaveInteger(XY,(MKI),(116),(Z4O))call SaveInteger(XY,(MKI),(117),(Z5O))call SaveUnitHandle(XY,(MKI),(124),(Z7O))call SaveInteger(XY,(MKI),(125),(HTO))call TriggerRegisterTimerEvent(t,0.05,true)call TriggerAddCondition(t,Condition(function ZHO))set t=nullset Z7O=nullset Z9O=nullset ZAO=nullset ZBO=nullset ZCO=nullset ZDO=nullset ZEO=nullset p0=nullset p1=nullset p2=nullset p3=nullset p4=nullset p5=nullendfunctionfunction ZWO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local item ZXO=PNI(TLI,FK0[Y60])if ZXO==null thenset ZXO=PNI(TLI,FM0[Y60])endifif ZXO!=null thencall RemoveItem(ZXO)call ZZO(TLI)elsecall R1I(GetOwningPlayer(TLI),GetObjectName(1848652369))endifcall FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullreturn falseendfunctionfunction ZYO takes unit TLI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call HWO(TLI)call TriggerRegisterTimerEvent(t,0.05,false)call TriggerAddCondition(t,Condition(function ZWO))call SaveUnitHandle(XY,(MKI),(2),(TLI))set t=nullendfunctionfunction ZJO takes nothing returns booleanif GetSpellAbilityId()==1093683012 thencall ZYO(GetTriggerUnit())endifreturn falseendfunctionfunction ZKO takes nothing returns booleanlocal unit N0I=GetTriggerUnit()local item OT1=GetManipulatedItem()local integer id=GetItemTypeId(OT1)local integer iif(id==FK0[Z30]or id==FK0[ZF0])and IsUnitType(N0I,UNIT_TYPE_HERO)==true thenset MI0[GetPlayerId(GetOwningPlayer(N0I))]=GetItemX(OT1)set M10[GetPlayerId(GetOwningPlayer(N0I))]=GetItemY(OT1)endifcall DXO(N0I,OT1)call DYO(N0I,OT1)if(GetItemTypeId(OT1)==FK0[WZ0]or GetItemTypeId(OT1)==FK0[WV0])and T4I(N0I)thencall UnitRemoveItem(N0I,OT1)elseif GetItemTypeId(OT1)==FK0[WM0]and IsUnitType(N0I,UNIT_TYPE_HERO)==true thenset i=(LoadInteger(XY,(GetHandleId(N0I)),(750)))if i>0 thenif(LoadBoolean(XY,(GetHandleId(N0I)),(751)))==false thencall SaveBoolean(XY,(GetHandleId(N0I)),(751),(true))call SetItemCharges(OT1,i)endifendifelseif GetItemTypeId(OT1)==FK0[VG0]and GetUnitTypeId(N0I)!=1848651852 and FF0==false thenset FE0=N0Iset FF0=truecall E71("AegisOn",GetPlayerId(GetOwningPlayer(N0I)))call PDI(bj_FORCE_ALL_PLAYERS,10.00,C0[GetPlayerId(GetOwningPlayer(N0I))]+GetUnitName(N0I)+"|r "+GetObjectName(1848657233))elseif GetItemTypeId(OT1)==FK0[Y60]and T2I(N0I)thencall ZYO(N0I)elseif GetItemTypeId(OT1)==FK0[KB0]and GetUnitTypeId(N0I)==1164799855 thencall SetPlayerTechResearched(GetOwningPlayer(N0I),1378889802,1)elseif GetItemTypeId(OT1)==FK0[KE0]and GetUnitTypeId(N0I)==1211117641 thenset CK=N0Icall ExecuteFunc("ZLO")elseif GetItemTypeId(OT1)==FK0[K90]and GetUnitTypeId(N0I)==1432580716 thencall UnitAddAbility(N0I,1093815106)call UnitRemoveAbility(N0I,1093815106)call AddUnitAnimationProperties(N0I,"upgrade",true)call SetPlayerTechResearched(GetOwningPlayer(N0I),1378889803,1)endifset N0I=nullset OT1=nullreturn falseendfunctionfunction ZNO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer MFI=(LoadInteger(XY,(MKI),(34)))if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT thenif GetSpellAbilityId()==1097163124 thencall SaveInteger(XY,(MKI),(34),(16))endifelseif QPI(TLI)or GetTriggerEventId()==EVENT_UNIT_DEATH or MFI==0 thencall UnitRemoveAbility(TLI,1093685334)call UnitRemoveAbility(TLI,1110456140)call SaveInteger(XY,(GetHandleId((TLI))),((4255)),(2))call FlushChildHashtable(XY,(MKI))call MZI(t)elsecall SetUnitState(TLI,UNIT_STATE_LIFE,GetUnitState(TLI,UNIT_STATE_LIFE)+115/16)call SaveInteger(XY,(MKI),(34),(MFI-1))endifreturn falseendfunctionfunction ZSO takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SaveInteger(XY,(GetHandleId((TLI))),((4255)),(1))call QTI(TLI,1093685334)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(34),(16))call TriggerRegisterTimerEvent(t,1,true)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function ZNO))call TriggerEvaluate(t)set TLI=nullset t=nullendfunctionfunction Tango_AddSingleTango takes nothing returns nothingcall UnitAddItemById(GetSpellTargetUnit(),1227903286)endfunctionfunction ZTO takes nothing returns nothingif GetSpellAbilityId()==1097163124 or GetSpellAbilityId()==1093817927 thenif((LoadInteger(XY,(GetHandleId((GetTriggerUnit()))),((4255))))==1)==false and GetSpellTargetDestructable()!=null thencall ZSO()elseif GetSpellTargetUnit()!=null thencall UnitAddItemById(GetSpellTargetUnit(),1227903286)endifendifendfunctionfunction ZRO takes integer id,real x,real y returns nothingif IsPointInRegion(M80,x,y)==false thenset M50=M50+1set MO0[M50]=Player(id)set M20[M50]=xset M30[M50]=yset M40[M50]=(TimerGetElapsed(M))endifendfunctionfunction ZPO takes integer id,real x,real y returns integerlocal real F21=(TimerGetElapsed(M))local integer i=0local integer MFI=0if IsPointInRegion(M80,x,y)==true thenreturn MFIendifloopexitwhen i>M50if(F21<M40[i]+M60)and(PAI(x,y,M20[i],M30[i])<M70*2+50)and IsPlayerAlly(Player(id),MO0[i])==true thenset MFI=MFI+1endifset i=i+1endloopreturn MFIendfunctionfunction ZQO takes integer L9I returns integerif L9I==GetPlayerId(BO[1])thenreturn 1747993161elseif L9I==GetPlayerId(BO[2])thenreturn 1747993163elseif L9I==GetPlayerId(BO[3])thenreturn 1747993159elseif L9I==GetPlayerId(BO[4])thenreturn 1747993158elseif L9I==GetPlayerId(BO[5])thenreturn 1747993164elseif L9I==GetPlayerId(CO[1])thenreturn 1747993160elseif L9I==GetPlayerId(CO[2])thenreturn 1747993162elseif L9I==GetPlayerId(CO[3])thenreturn 1747993165elseif L9I==GetPlayerId(CO[4])thenreturn 1747992885elseif L9I==GetPlayerId(CO[5])thenreturn 1747993166endifreturn 1747993166endfunctionfunction ZUO takes integer L9I returns integerreturn 1747992920endfunctionfunction V0O takes integer L9I returns stringif L9I==GetPlayerId(BO[1])thenreturn"war3mapImported\\TeleportTarget_Blue.mdx"elseif L9I==GetPlayerId(BO[2])thenreturn"war3mapImported\\TeleportTarget_Teal.mdx"elseif L9I==GetPlayerId(BO[3])thenreturn"war3mapImported\\TeleportTarget_Purple.mdx"elseif L9I==GetPlayerId(BO[4])thenreturn"war3mapImported\\TeleportTarget_Yellow.mdx"elseif L9I==GetPlayerId(BO[5])thenreturn"war3mapImported\\TeleportTarget_Orange.mdx"elseif L9I==GetPlayerId(CO[1])thenreturn"war3mapImported\\TeleportTarget_Pink.mdx"elseif L9I==GetPlayerId(CO[2])thenreturn"war3mapImported\\TeleportTarget_Gray.mdx"elseif L9I==GetPlayerId(CO[3])thenreturn"war3mapImported\\TeleportTarget_LightBlue.mdx"elseif L9I==GetPlayerId(CO[4])thenreturn"war3mapImported\\TeleportTarget_DarkGreen.mdx"elseif L9I==GetPlayerId(CO[5])thenreturn"war3mapImported\\TeleportTarget_Brown.mdx"endifreturn"Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl"endfunctionfunction VIO takes integer L9I returns stringreturn"Abilities\\Spells\\Human\\MassTeleport\\MassTeleportCaster.mdl"endfunctionfunction V1O takes nothing returns booleanlocal real dif IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>0 and GetUnitAbilityLevel(GetFilterUnit(),1098085732)==0 and IsUnitAlly(GetFilterUnit(),GetOwningPlayer(DK))==true and GetUnitTypeId(GetFilterUnit())!=1966092371 and GetUnitTypeId(GetFilterUnit())!=1852010352 and GetUnitTypeId(GetFilterUnit())!=1701670775 and GetUnitTypeId(GetFilterUnit())!=1970956647 and IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false thenset d=PAI(UJ,IK,GetUnitX(GetFilterUnit()),GetUnitY(GetFilterUnit()))if d<QJ thenset QJ=dset CK=GetFilterUnit()endifendifreturn falseendfunctionfunction VOO takes unit N3I,real x,real y returns unitlocal group g=MDI()set CK=nullset DK=N3Iset QJ=99999set UJ=xset IK=ycall GroupEnumUnitsInRange(g,x,y,99999,Condition(function V1O))call MCI(g)set g=nullreturn CKendfunctionfunction V2O takes unit u returns booleanlocal integer id=GetUnitTypeId(u)return id==1848657480 or id==1848657462 or id==1848657481 or id==1848657482endfunctionfunction V3O takes unit u returns booleanlocal integer id=GetUnitTypeId(u)return id==1966092370 or id==1970107511 or id==1697657398 or id==1700946284endfunctionfunction V4O takes nothing returns booleanlocal real dif(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 or V3O(GetFilterUnit())or GetUnitTypeId(GetFilterUnit())==1852206952 or GetUnitTypeId(GetFilterUnit())==1852073580 or V2O(GetFilterUnit()))and QPI(GetFilterUnit())==false and GetUnitAbilityLevel(GetFilterUnit(),1098085732)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==false and IsUnitAlly(GetFilterUnit(),GetOwningPlayer(DK))==true and GetOwningPlayer(GetFilterUnit())!=EO and IsUnitIllusion(GetFilterUnit())==false and IsUnitType(GetFilterUnit(),UNIT_TYPE_FLYING)==false and GetUnitTypeId(GetFilterUnit())!=1848657461 thenset d=PAI(UJ,IK,GetUnitX(GetFilterUnit()),GetUnitY(GetFilterUnit()))if d<QJ thenset QJ=dset CK=GetFilterUnit()endifendifreturn falseendfunctionfunction V5O takes nothing returns booleanlocal real dif(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 or V3O(GetFilterUnit())or GetUnitTypeId(GetFilterUnit())==1852206952 or GetUnitTypeId(GetFilterUnit())==1852073580 or V2O(GetFilterUnit()))and QPI(GetFilterUnit())==false and GetUnitAbilityLevel(GetFilterUnit(),1098085732)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==false and IsUnitAlly(GetFilterUnit(),GetOwningPlayer(DK))==true and GetOwningPlayer(GetFilterUnit())!=EO and IsUnitIllusion(GetFilterUnit())==false and IsUnitType(GetFilterUnit(),UNIT_TYPE_FLYING)==false and GetUnitTypeId(GetFilterUnit())!=1848657461 thenset d=PAI(UJ,IK,GetUnitX(GetFilterUnit()),GetUnitY(GetFilterUnit()))if d<QJ and d<325 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==true thenset QJ=dset CK=GetFilterUnit()endifendifreturn falseendfunctionfunction V6O takes unit N3I,real x,real y returns unitlocal group g=MDI()set CK=nullset DK=N3Iset QJ=99999set UJ=xset IK=ycall GroupEnumUnitsInRange(g,x,y,99999,Condition(function V5O))if CK==null thencall GroupEnumUnitsInRange(g,x,y,99999,Condition(function V4O))endifcall MCI(g)set g=nullreturn CKendfunctionfunction V7O takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local unit V8O=(LoadUnitHandle(XY,(MKI),(448)))local unit V9O=(LoadUnitHandle(XY,(MKI),(447)))local ubersplat OD1=(LoadUbersplatHandle(XY,(MKI),(131)))local integer MFI=(LoadInteger(XY,(MKI),(34)))local real BP1=(LoadReal(XY,(MKI),(57)))local real F21=(LoadReal(XY,(MKI),(442)))local integer id=GetPlayerId(GetOwningPlayer(N0I))local boolean VAO=falselocal integer i=0local integer D51if GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST thenif GetSpellAbilityId()==1093751349 thenset VAO=trueendifelseset MFI=MFI+1call SaveInteger(XY,(MKI),(34),(MFI))if MFI==1 thenif BP1>3 thencall SetUnitAnimationByIndex(V8O,1)call SetUnitAnimationByIndex(V9O,1)endifelseif MFI==2 thenset VAO=trueelseendifendifif VAO thencall SaveInteger(XY,(GetHandleId((N0I))),((4256)),(2))call KillUnit(V8O)call KillUnit(V9O)call DestroyUbersplat(OD1)call FlushChildHashtable(XY,(MKI))call MZI(t)if MFI==2 thencall DestroyEffect(AddSpecialEffect(VIO(id),GetUnitX(N0I),GetUnitY(N0I)))call DestroyEffect(AddSpecialEffect(V0O(id),x,y))call SetUnitX(N0I,x)call SetUnitY(N0I,y)call PauseUnit(N0I,true)call PauseUnit(N0I,false)call QEI(x,y,240)set CK=N0Icall ExecuteFunc("VBO")endifendifset t=nullset N0I=nullset V8O=nullset V9O=nullset OD1=nullreturn falseendfunctionfunction VCO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local unit V8O=(LoadUnitHandle(XY,(MKI),(448)))local unit V9O=(LoadUnitHandle(XY,(MKI),(447)))local ubersplat OD1=(LoadUbersplatHandle(XY,(MKI),(131)))local integer MFI=(LoadInteger(XY,(MKI),(34)))local real BP1=(LoadReal(XY,(MKI),(57)))local real F21=(LoadReal(XY,(MKI),(442)))local integer id=GetPlayerId(GetOwningPlayer(N0I))local boolean VAO=falselocal integer i=0local integer D51if GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST thenif GetSpellAbilityId()==1093808945 thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(177))))call SaveInteger(XY,(GetHandleId((N0I))),((4256)),(2))call KillUnit(V8O)call KillUnit(V9O)call DestroyUbersplat(OD1)call FlushChildHashtable(XY,(MKI))call MZI(t)call UnitRemoveType(TMI,UNIT_TYPE_PEON)endifelseif GetTriggerEventId()==EVENT_UNIT_DEATH thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(177))))call UnitRemoveType(TMI,UNIT_TYPE_PEON)call SaveInteger(XY,(GetHandleId((N0I))),((4256)),(2))call KillUnit(V8O)call KillUnit(V9O)call DestroyUbersplat(OD1)call FlushChildHashtable(XY,(MKI))call MZI(t)elsecall DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(177))))call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl",GetUnitX(N0I),GetUnitY(N0I)))call SaveInteger(XY,(GetHandleId((N0I))),((4256)),(2))call KillUnit(V8O)call KillUnit(V9O)call DestroyUbersplat(OD1)call FlushChildHashtable(XY,(MKI))call MZI(t)call UnitRemoveType(TMI,UNIT_TYPE_PEON)call QEI(GetUnitX(TMI)-1,GetUnitY(TMI)-1,240)call SetUnitX(N0I,GetUnitX(TMI)-1)call SetUnitY(N0I,GetUnitY(TMI)-1)call PauseUnit(N0I,true)call PauseUnit(N0I,false)set CK=N0Icall ExecuteFunc("VBO")call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl",GetUnitX(N0I),GetUnitY(N0I)))endifset t=nullset N0I=nullset V8O=nullset V9O=nullset OD1=nullset TMI=nullreturn falseendfunctionfunction VDO takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local location llocal real xlocal real ylocal real alocal trigger tlocal integer MKIlocal unit V8Olocal unit V9Olocal ubersplat OD1local integer id=GetPlayerId(GetOwningPlayer(N0I))local integer MFIlocal real VEOset t=CreateTrigger()set MKI=GetHandleId(t)call SaveInteger(XY,(GetHandleId((N0I))),((4256)),(1))if TMI==null thenset l=GetSpellTargetLoc()set x=GetLocationX(l)set y=GetLocationY(l)if x==MI0[id]and y==M10[id]thenif NZI(GetOwningPlayer(N0I))thenset x=GetUnitX(MQ)set y=GetUnitY(MQ)elseset x=GetUnitX(BG0)set y=GetUnitY(BG0)endifendifset TMI=VOO(N0I,x,y)call RemoveLocation(l)elseset x=GetUnitX(TMI)set y=GetUnitY(TMI)endifif PAI(x,y,GetUnitX(TMI),GetUnitY(TMI))>M70 thenset a=Atan2(y-GetUnitY(TMI),x-GetUnitX(TMI))set x=GetUnitX(TMI)+M70*Cos(a)set y=GetUnitY(TMI)+M70*Sin(a)elseif PAI(x,y,GetUnitX(TMI),GetUnitY(TMI))<50 thenset a=Atan2(y-GetUnitY(TMI),x-GetUnitX(TMI))set x=GetUnitX(TMI)+120*Cos(a)set y=GetUnitY(TMI)+120*Sin(a)endifif IsPointInRegion(XN,x,y)==true thenset a=Atan2(y-GetUnitY(TMI),x-GetUnitX(TMI))set x=GetUnitX(TMI)+200*Cos(a)set y=GetUnitY(TMI)+200*Sin(a)endifset x=RCI(x)set y=RGI(y)if(IsUnitAlly(N0I,GetLocalPlayer())and GetLocalPlayer()!=GetOwningPlayer(N0I))or(C2 and(GetLocalPlayer()==DO0 or GetLocalPlayer()==D20))thencall PingMinimapEx(x,y,3,255,255,255,false)endifset V9O=CreateUnit(GetOwningPlayer(N0I),ZQO(id),x,y,0)set V8O=CreateUnit(GetOwningPlayer(N0I),ZUO(id),GetUnitX(N0I),GetUnitY(N0I),0)set OD1=CreateUbersplat(GetUnitX(N0I),GetUnitY(N0I),"SCTP",255,255,255,255,false,false)if IsUnitVisible(N0I,GetLocalPlayer())==true thencall SetUbersplatRenderAlways(OD1,true)elsecall SetUbersplatRenderAlways(OD1,false)endifset MFI=ZPO(GetPlayerId(GetOwningPlayer(N0I)),x,y)set VEO=3if MFI>0 thenset VEO=4.5+0.5*MFIendifcall ZRO(GetPlayerId(GetOwningPlayer(N0I)),x,y)if MFI>0 thencall SetUnitAnimationByIndex(V8O,2)call SetUnitAnimationByIndex(V9O,2)endifcall TriggerRegisterTimerEvent(t,VEO-3,false)call TriggerRegisterTimerEvent(t,VEO,false)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_SPELL_ENDCAST)call TriggerAddCondition(t,Condition(function V7O))call QJI(GetOwningPlayer(N0I),VEO,x,y,200)call SaveUnitHandle(XY,(MKI),(447),(V9O))call SaveUnitHandle(XY,(MKI),(448),(V8O))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))call SaveReal(XY,(MKI),(442),(((TimerGetElapsed(M)))*1.0))call SaveReal(XY,(MKI),(57),((VEO)*1.0))call SaveUbersplatHandle(XY,(MKI),(131),(OD1))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveInteger(XY,(MKI),(34),(0))call IZ1(N0I,XF,x,y,2400)set N0I=nullset TMI=nullset V8O=nullset V9O=nullset l=nullset t=nullset OD1=nullendfunctionfunction VFO takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local location llocal real xlocal real ylocal real alocal trigger tlocal integer MKIlocal unit V8Olocal unit V9Olocal ubersplat OD1local integer id=GetPlayerId(GetOwningPlayer(N0I))local integer MFIlocal real VEOset t=CreateTrigger()set MKI=GetHandleId(t)if TMI==null thenset l=GetSpellTargetLoc()set x=GetLocationX(l)set y=GetLocationY(l)if x==MI0[id]and y==M10[id]thenif NZI(GetOwningPlayer(N0I))thenset x=GetUnitX(MQ)set y=GetUnitY(MQ)elseset x=GetUnitX(BG0)set y=GetUnitY(BG0)endifendifset TMI=V6O(N0I,x,y)call RemoveLocation(l)endifcall SaveInteger(XY,(GetHandleId((N0I))),((4256)),(1))set x=GetUnitX(TMI)set y=GetUnitY(TMI)if(IsUnitAlly(N0I,GetLocalPlayer())and GetLocalPlayer()!=GetOwningPlayer(N0I))or(C2 and(GetLocalPlayer()==DO0 or GetLocalPlayer()==D20))thencall PingMinimapEx(x,y,3,255,255,255,false)endifset OD1=CreateUbersplat(GetUnitX(N0I),GetUnitY(N0I),"SCTP",255,255,255,255,false,false)if IsUnitVisible(N0I,GetLocalPlayer())==true thencall SetUbersplatRenderAlways(OD1,true)elsecall SetUbersplatRenderAlways(OD1,false)endifset VEO=3call UnitAddType(TMI,UNIT_TYPE_PEON)call TriggerRegisterTimerEvent(t,VEO,false)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_SPELL_ENDCAST)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function VCO))call QJI(GetOwningPlayer(N0I),VEO,x,y,200)call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))call SaveReal(XY,(MKI),(442),(((TimerGetElapsed(M)))*1.0))call SaveReal(XY,(MKI),(57),((VEO)*1.0))call SaveUbersplatHandle(XY,(MKI),(131),(OD1))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(34),(0))call SaveEffectHandle(XY,(MKI),(175),(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTo.mdl",N0I,"origin")))call SaveEffectHandle(XY,(MKI),(176),(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportCaster.mdl",N0I,"origin")))call SaveEffectHandle(XY,(MKI),(177),(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTo.mdl",TMI,"origin")))call IZ1(N0I,XF,x,y,2400)set N0I=nullset TMI=nullset V8O=nullset V9O=nullset l=nullset t=nullset OD1=nullendfunctionfunction VGO takes nothing returns nothingif GetSpellAbilityId()==1093751349 and T4I(GetTriggerUnit())==false thencall VDO()endifif GetSpellAbilityId()==1093808945 thencall VFO()endifendfunctionfunction VHO takes nothing returns nothingif M90==(LoadInteger(XY,(GetHandleId(GetEnumUnit())),(784)))thencall KillUnit(GetEnumUnit())endifendfunctionfunction VZO takes unit u returns booleanlocal integer i=GetUnitTypeId(u)return i==1848651848 or i==1848651847 or i==1848651851 or i==1848651850 or i==1848651841 or i==1848651830endfunctionfunction VVO takes nothing returns booleanreturn VZO(GetFilterUnit())endfunctionfunction VWO takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit VXOlocal unit VYOlocal integer VJOlocal integer VKOlocal group g=MDI()local real a=GetUnitFacing(TLI)*bj_DEGTORADlocal real x1=GetUnitX(TLI)+50*Cos(a)local real y1=GetUnitY(TLI)+50*Sin(a)local real x2=GetUnitX(TLI)+50*Cos(a)local real y2=GetUnitY(TLI)+50*Sin(a)if GetSpellAbilityId()==1093683266 thenset VJO=1848651848set VKO=1848651850elseif GetSpellAbilityId()==1093682227 thenset VJO=1848651847set VKO=1848651841elseif GetSpellAbilityId()==1093682246 thenset VJO=1848651851set VKO=1848651830endifset M90=GetUnitTypeId(TLI)call GroupEnumUnitsOfPlayer(g,GetOwningPlayer(GetTriggerUnit()),Condition(function VVO))call ForGroup(g,function VHO)call MCI(g)set VXO=CreateUnit(GetOwningPlayer(TLI),VJO,x1,y1,GetUnitFacing(TLI))call SaveInteger(XY,(GetHandleId(VXO)),(784),(M90))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\RaiseSkeletonWarrior\\RaiseSkeleton.mdl",VXO,"origin"))call UnitApplyTimedLife(VXO,1112820806,40)set VYO=CreateUnit(GetOwningPlayer(TLI),VKO,x2,y2,GetUnitFacing(TLI))call SaveInteger(XY,(GetHandleId(VYO)),(784),(M90))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\RaiseSkeletonWarrior\\RaiseSkeleton.mdl",VYO,"origin"))call UnitApplyTimedLife(VYO,1112820806,40)set g=nullset VXO=nullset VYO=nullset TLI=nullendfunctionfunction VLO takes nothing returns nothingif GetSpellAbilityId()==1093683266 or GetSpellAbilityId()==1093682227 or GetSpellAbilityId()==1093682246 thencall VWO()endifendfunctionfunction VMO takes nothing returns nothingif GetSpellAbilityId()==1093748304 thencall PKI("Abilities\\Spells\\Items\\VampiricPotion\\VampPotionCaster.mdl",GetTriggerUnit(),"origin",3.5)call O11(GetTriggerUnit(),1093747534,1,3.5)endifendfunctionfunction VNO takes nothing returns booleanreturn((LoadInteger(XY,(GetHandleId((GetFilterUnit()))),((4323))))==1)endfunctionfunction VSO takes nothing returns nothinglocal group glocal unit uif GetSpellAbilityId()==1093817908 and VZO(GetSpellTargetUnit())==false thenset g=MDI()call GroupEnumUnitsOfPlayer(g,GetOwningPlayer(GetTriggerUnit()),Condition(function VNO))set u=FirstOfGroup(g)call MCI(g)if u!=null thencall KillUnit(u)endifcall SetUnitOwner(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()),true)call SaveInteger(XY,(GetHandleId((GetSpellTargetUnit()))),((4323)),(1))call UnitAddAbility(GetSpellTargetUnit(),1097167976)call UnitAddAbility(GetSpellTargetUnit(),1094939243)call PBI(GetSpellTargetUnit())endifendfunctionfunction VTO takes integer i returns integerif i==MA0 thenreturn MH0endifif i==MB0 thenreturn MZ0endifif i==MC0 thenreturn MV0endifif i==MD0 thenreturn MW0endifif i==ME0 thenreturn MX0endifif i==MF0 thenreturn MY0endifif i==MG0 thenreturn MJ0endifreturn 0endfunctionfunction VRO takes integer i returns integerif i==MA0 thenreturn 10endifif i==MB0 thenreturn 9endifif i==MC0 thenreturn 8endifif i==MD0 thenreturn 7endifif i==ME0 thenreturn 6endifif i==MF0 thenreturn 5endifif i==MG0 thenreturn 4endifreturn 0endfunctionfunction VPO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))if QPI(N0I)==false and N0I!=null thencall SetUnitScale(N0I,N9I(N0I)*ILI,N9I(N0I)*ILI,N9I(N0I)*ILI)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset N0I=nullreturn falseendfunctionfunction VQO takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local unit QHI=CreateUnit(GetOwningPlayer(N0I),1697656901,GetUnitX(N0I),GetUnitY(N0I),0)local trigger t=CreateTrigger()local real BP1=VRO(GetSpellAbilityId())call UXI(N0I,MK0,BP1)call UnitMakeAbilityPermanent(N0I,true,MK0)call SetPlayerAbilityAvailable(GetOwningPlayer(N0I),MK0,false)call UnitAddAbility(QHI,VTO(GetSpellAbilityId()))call IssueTargetOrder(QHI,"antimagicshell",N0I)call CG1(N0I,0,0)call UnitRemoveAbility(N0I,1112044643)call UnitRemoveAbility(N0I,1110454869)if T4I(N0I)thencall UHI(N0I,BP1,3)elsecall UHI(N0I,BP1,1.4)endifcall TriggerRegisterTimerEvent(t,BP1+7,false)call TriggerAddCondition(t,Condition(function VPO))call SaveUnitHandle(XY,(GetHandleId(t)),(14),(N0I))set t=nullset N0I=nullset QHI=nullendfunctionfunction VUO takes nothing returns nothingif VTO(GetSpellAbilityId())>0 thencall VQO()endifendfunctionfunction W0O takes nothing returns nothingif((LoadInteger(XY,(GetHandleId((GetEnumUnit()))),((4258))))==1)==true thencall R1I(GetOwningPlayer(GetEnumUnit()),GetObjectName(1848652365)+" "+GetUnitName(GetEnumUnit())+" "+GetObjectName(1848652371))elseif IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)==true thencall MPI(GetEnumUnit(),4258,25)endifcall SetUnitState(GetEnumUnit(),UNIT_STATE_LIFE,GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)+250)endifendfunctionfunction WIO takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local group g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),775,Condition(function BB1))call ForGroup(g,function W0O)call MCI(g)set TLI=nullset g=nullendfunctionfunction W1O takes nothing returns nothingif GetSpellAbilityId()==1093681995 thencall WIO()endifendfunctionfunction WOO takes nothing returns nothingif((LoadInteger(XY,(GetHandleId((GetEnumUnit()))),((4278))))==1)==true thencall R1I(GetOwningPlayer(GetEnumUnit()),GetObjectName(1848652365))elseif IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)==true thencall MPI(GetEnumUnit(),4278,50)endifif GetUnitAbilityLevel(GetEnumUnit(),1110458964)==0 and GetUnitAbilityLevel(GetEnumUnit(),1110458965)==0 thencall IssueTargetOrder(ML0,"antimagicshell",GetEnumUnit())endifendifendfunctionfunction W2O takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local group g=MDI()set ML0=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TLI),GetUnitY(TLI),0)call UnitAddAbility(ML0,1093748054)call GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),925,Condition(function BE1))call ForGroup(g,function WOO)call MCI(g)set TLI=nullset g=nullendfunctionfunction W3O takes nothing returns nothingif GetSpellAbilityId()==1093748055 thencall W2O()endifendfunctionfunction W4O takes nothing returns nothingif GetSpellAbilityId()==1093677655 thencall UnitResetCooldown(GetTriggerUnit())endifendfunctionfunction W5O takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer TRI=(LoadInteger(XY,(MKI),(30)))local unit TMI=M6I(TRI)local real TSI=(LoadReal(XY,(MKI),(20)))if GetTriggerEventId()!=EVENT_UNIT_DAMAGED or GetUnitAbilityLevel(GetTriggerUnit(),1110455089)==0 thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)set YBI=truecall TKI(TLI,TMI,1,TSI)set YBI=falseif TSI>0 thencall Q5I("+"+I2S(R2I(TSI)),1,TMI,0.023,255,0,0,216)endifelseif GetEventDamage()>1 thencall SaveReal(XY,(MKI),(20),((TSI+GetEventDamage()*0.3)*1.0))endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction W6O takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))call FlushChildHashtable(XY,(MKI))call MZI(t)set t=CreateTrigger()set MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(30),(M8I(TMI)))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Silence\\SilenceTarget.mdl",TMI,"overhead")))call SaveReal(XY,(MKI),(20),((0)*1.0))call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,5,false)call TriggerAddCondition(t,Condition(function W5O))set t=nullreturn falseendfunctionfunction W7O takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function W6O))call SaveUnitHandle(XY,(MKI),(17),(GetSpellTargetUnit()))call SaveUnitHandle(XY,(MKI),(2),(GetTriggerUnit()))set t=nullendfunctionfunction W8O takes nothing returns nothingif GetSpellAbilityId()==1093682756 and MBI(GetSpellTargetUnit())==false thencall W7O()endifendfunctionfunction W9O takes unit u,real d returns booleanif IsUnitType(u,UNIT_TYPE_HERO)or GetUnitAbilityLevel(u,1093678162)>0 thenreturn d>5endifreturn trueendfunctionfunction WAO takes nothing returns nothinglocal unit QHIif MN0>0 thenset MN0=MN0-1set QHI=CreateUnit(GetOwningPlayer(MM0),1697656901,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),0)call UnitAddAbility(QHI,1093684022)call IssueTargetOrder(QHI,"forkedlightning",GetEnumUnit())endifset QHI=nullendfunctionfunction WBO takes nothing returns nothinglocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit QHIlocal unit TLIlocal group gif GetTriggerEventId()!=EVENT_UNIT_DAMAGED thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)elsecall MPI(GetTriggerUnit(),4257,1)set TLI=(LoadUnitHandle(XY,(MKI),(2)))set QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),0)call UnitAddAbility(QHI,1093684022)set MM0=TLIset CK=TLIset g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),925,Condition(function AT1))set MN0=5if P8I(GetTriggerUnit(),GetEventDamageSource())<900 thenset MN0=MN0-1call IssueTargetOrder(QHI,"forkedlightning",GetEventDamageSource())endifcall GroupRemoveUnit(g,GetEventDamageSource())call ForGroup(g,function WAO)call MCI(g)endifset t=nullset g=nullset QHI=nullset TLI=nullendfunctionfunction WCO takes nothing returns booleanif(GetTriggerEventId()==EVENT_UNIT_DAMAGED and W9O(GetEventDamageSource(),GetEventDamage())and GetRandomInt(1,100)<21 and((LoadInteger(XY,(GetHandleId((GetTriggerUnit()))),((4257))))==1)==false)or GetTriggerEventId()!=EVENT_UNIT_DAMAGED thencall WBO()endifreturn falseendfunctionfunction WDO takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)if TMI==null thenset TMI=TLIendifcall MPI(TMI,4279,15)call TriggerRegisterTimerEvent(t,15,false)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function WCO))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\LightningShield\\LightningShieldTarget.mdl",TMI,"origin")))call SaveUnitHandle(XY,(MKI),(2),(TLI))set t=nullset TLI=nullset TMI=nullendfunctionfunction WEO takes nothing returns nothingif GetSpellAbilityId()==1093683788 and((LoadInteger(XY,(GetHandleId((GetSpellTargetUnit()))),((4279))))==1)==false thencall WDO()endifendfunctionfunction WFO takes nothing returns nothinglocal unit WGO=GetTriggerUnit()local item ZXO=PNI(WGO,FK0[Y60])if ZXO==null thenset ZXO=PNI(WGO,FM0[Y60])endifif ZXO!=null thencall D81(ZXO)call UnitRemoveAbility(WGO,1093686866)call UnitAddAbility(WGO,1093686869)call SetUnitState(WGO,UNIT_STATE_MANA,400)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl",WGO,"origin"))elsecall R1I(GetOwningPlayer(WGO),GetObjectName(1848652369))endifset WGO=nullendfunctionfunction WHO takes nothing returns nothingif GetSpellAbilityId()==1093686866 thencall WFO()endifendfunctionfunction WZO takes nothing returns nothinglocal unit TMI=GetEnumUnit()local group WVO=MS0local unit TLI=MT0if IsUnitInGroup(TMI,WVO)==false thencall GroupAddUnit(WVO,TMI)call IssueTargetOrder(MR0,"slow",TMI)set YBI=truecall TKI(TLI,TMI,1,200)set YBI=falsecall DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl",TMI,"origin"))endifset TMI=nullset WVO=nullset TLI=nullendfunctionfunction WWO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local group WVO=(LoadGroupHandle(XY,(MKI),(133)))local real dlocal real xlocal real x0=GetUnitX(TLI)local real ylocal real y0=GetUnitY(TLI)local group g=MDI()local integer MFI=GetTriggerEvalCount(t)local integer icall SetUnitX(QHI,GetUnitX(TLI))call SetUnitY(QHI,GetUnitY(TLI))set MS0=WVOset MT0=TLIset MR0=(LoadUnitHandle(XY,(MKI),(132)))if GetTriggerEvalCount(t)>37 thencall KillUnit(QHI)call MCI(WVO)call FlushChildHashtable(XY,(MKI))call MZI(t)elseset d=MFI*21set i=0loopexitwhen i>36set x=x0+d*Cos(360*i/36*bj_DEGTORAD)set y=y0+d*Sin(360*i/36*bj_DEGTORAD)set CK=TLIcall GroupEnumUnitsInRange(g,x,y,150,Condition(function AN1))call ForGroup(g,function WZO)set i=i+1endloopendifcall MCI(g)set t=nullset QHI=nullset WVO=nullset TLI=nullset g=nullreturn falseendfunctionfunction WXO takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local real x=GetUnitX(N0I)local real y=GetUnitY(N0I)local group WVO=MDI()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit QHI=CreateUnit(GetOwningPlayer(N0I),1747990833,x,y,0)local unit WYO=CreateUnit(GetOwningPlayer(N0I),1697656901,GetUnitX(N0I),GetUnitY(N0I),0)call UnitAddAbility(WYO,1093686320)call SaveGroupHandle(XY,(MKI),(133),(WVO))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveUnitHandle(XY,(MKI),(132),(WYO))call SaveUnitHandle(XY,(MKI),(2),(N0I))call TriggerRegisterTimerEvent(t,0.06,true)call TriggerAddCondition(t,Condition(function WWO))set t=nullset WVO=nullset QHI=nullset WYO=nullset N0I=nullendfunctionfunction WJO takes nothing returns nothingif GetSpellAbilityId()==1093686329 thencall WXO()endifendfunctionfunction WKO takes unit TLI,integer WLO returns nothinglocal integer MKI=GetHandleId(TLI)call SaveInteger(XY,(MKI),(750),(WLO))endfunctionfunction WMO takes nothing returns nothinglocal integer i=0local integer D51=0local boolean WNO=falseif GetSpellAbilityId()==1093683801 thenloopexitwhen i>5if DH1(UnitItemInSlot(GetTriggerUnit(),i))==HG0 or DH1(UnitItemInSlot(GetTriggerUnit(),i))==WM0 thenset D51=GetItemCharges(UnitItemInSlot(GetTriggerUnit(),i))if D51>0 thencall SetItemCharges(UnitItemInSlot(GetTriggerUnit(),i),0)call WKO(GetTriggerUnit(),0)if WNO==false thenset WNO=truecall SetUnitState(GetTriggerUnit(),UNIT_STATE_MANA,GetUnitState(GetTriggerUnit(),UNIT_STATE_MANA)+15*D51)call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+15*D51)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIre\\AIreTarget.mdl",GetTriggerUnit(),"origin"))endifendifreturnendifset i=i+1endloopendifendfunctionfunction WSO takes integer id returns booleanlocal integer i=1loopexitwhen i>E70if id==E60[i]thenreturn falseendifset i=i+1endloopreturn trueendfunctionfunction WTO takes unit WRO,unit TLI returns nothingif IsUnitVisible(WRO,GetOwningPlayer(TLI))==false and GetRandomInt(1,100)<10 thencall PlaySoundOnUnitBJ(IF,100,TLI)endifendfunctionfunction WPO takes nothing returns nothinglocal unit N0I=GetEnumUnit()local integer i=0loopexitwhen i>5if IsUnitVisible(GetTriggerUnit(),GetOwningPlayer(GetEnumUnit()))==true thenif DH1(UnitItemInSlot(N0I,i))==HG0 or DH1(UnitItemInSlot(N0I,i))==WM0 thenif DH1(UnitItemInSlot(N0I,i))==WM0 thenif GetItemCharges(UnitItemInSlot(N0I,i))==15 thencall WTO(GetTriggerUnit(),N0I)endifcall WKO(N0I,RSI(GetItemCharges(UnitItemInSlot(N0I,i))+1,15))call SetItemCharges(UnitItemInSlot(N0I,i),RSI(GetItemCharges(UnitItemInSlot(N0I,i))+1,15))elseif GetItemCharges(UnitItemInSlot(N0I,i))==10 thencall WTO(GetTriggerUnit(),N0I)endifcall WKO(N0I,RSI(GetItemCharges(UnitItemInSlot(N0I,i))+1,10))call SetItemCharges(UnitItemInSlot(N0I,i),RSI(GetItemCharges(UnitItemInSlot(N0I,i))+1,10))endifcall DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\ReplenishMana\\SpiritTouchTarget.mdl",N0I,"chest"))set i=5endifendifset i=i+1endloopset N0I=nullendfunctionfunction WQO takes nothing returns nothinglocal group g=MDI()local unit TLI=GetTriggerUnit()local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)call GroupEnumUnitsInRange(g,x,y,1225,Condition(function BH1))call ForGroup(g,function WPO)call MCI(g)set g=nullset TLI=nullendfunctionfunction WUO takes nothing returns nothingif WSO(GetSpellAbilityId())==true and SEI(GetSpellAbilityId())==true and GetUnitAbilityLevel(GetTriggerUnit(),1093678162)==0 and HN1(GetSpellAbilityId())==false thencall WQO()endifendfunctionfunction X0O takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit XIO=(LoadUnitHandle(XY,(MKI),(134)))if GetTriggerEventId()!=EVENT_UNIT_DEATH thencall UnitRemoveAbility(XIO,1093744466)call UnitRemoveAbility(XIO,1093809222)endifcall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset XIO=nullreturn falseendfunctionfunction X1O takes nothing returns booleanreturn IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>0.5 and IsUnitAlly(GetFilterUnit(),MP0)==true and GetOwningPlayer(GetFilterUnit())!=EO and GetUnitTypeId(GetFilterUnit())!=1852010352 and GetUnitTypeId(GetFilterUnit())!=1848657482 and GetUnitTypeId(GetFilterUnit())!=1848657481 and GetUnitTypeId(GetFilterUnit())!=1848657462 and GetUnitTypeId(GetFilterUnit())!=1848657480endfunctionfunction XOO takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit XIO=GetEnumUnit()local string scall UnitAddAbility(XIO,1093744466)call UnitAddAbility(XIO,1093809222)if NZI(MP0)thenset s="effects\\GlyphSent.mdx"elseset s="effects\\GlyphScourge.mdx"endifcall SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget(s,XIO,"origin")))call SaveUnitHandle(XY,(MKI),(134),(XIO))call TriggerRegisterUnitEvent(t,XIO,EVENT_UNIT_DEATH)call TriggerRegisterTimerEvent(t,N00,false)call TriggerAddCondition(t,Condition(function X0O))set t=nullset XIO=nullendfunctionfunction X2O takes unit X3O,player p returns nothinglocal integer iif NZI(p)thenset i=1if X3O!=D00[i]thencall IssueImmediateOrder(D00[i],"coldarrows")endifset i=2if X3O!=D00[i]thencall IssueImmediateOrder(D00[i],"coldarrows")endifset i=3if X3O!=D00[i]thencall IssueImmediateOrder(D00[i],"coldarrows")endifset i=4if X3O!=D00[i]thencall IssueImmediateOrder(D00[i],"coldarrows")endifset i=5if X3O!=D00[i]thencall IssueImmediateOrder(D00[i],"coldarrows")endifelseset i=7if X3O!=D00[i]thencall IssueImmediateOrder(D00[i],"coldarrows")endifset i=8if X3O!=D00[i]thencall IssueImmediateOrder(D00[i],"coldarrows")endifset i=9if X3O!=D00[i]thencall IssueImmediateOrder(D00[i],"coldarrows")endifset i=10if X3O!=D00[i]thencall IssueImmediateOrder(D00[i],"coldarrows")endifset i=11if X3O!=D00[i]thencall IssueImmediateOrder(D00[i],"coldarrows")endifendifendfunctionfunction X4O takes nothing returns nothinglocal group glocal unit X3O=GetTriggerUnit()local player p=GetOwningPlayer(X3O)if(NZI(p)and MQ0==false)or(NZI(p)==false and MU0==false)thenset g=MDI()set MP0=pcall GroupEnumUnitsInRange(g,0,0,12000,Condition(function X1O))call ForGroup(g,function XOO)call MCI(g)if NZI(p)thenset MQ0=truecall X2O(X3O,p)set MQ0=falseelseset MU0=truecall X2O(X3O,p)set MU0=falseendifendifset g=nullset X3O=nullset p=nullendfunctionfunction X5O takes nothing returns nothingif GetSpellAbilityId()==1093743665 or GetSpellAbilityId()==1093752649 thencall X4O()endifendfunctionfunction X6O takes nothing returns nothingif GetSpellAbilityId()==1093743191 and GetUnitAbilityLevel(GetTriggerUnit(),1114665832)>0 thencall UnitRemoveAbility(GetTriggerUnit(),1114665832)endifendfunctionfunction X7O takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)if GetTriggerEventId()!=EVENT_UNIT_DAMAGED thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)elseif TAI(GetEventDamage())and IsUnitAlly(GetEventDamageSource(),GetOwningPlayer(GetTriggerUnit()))==false and IsUnitType(GetEventDamageSource(),UNIT_TYPE_STRUCTURE)==false and NI0==false thenif IsUnitType(GetEventDamageSource(),UNIT_TYPE_HERO)or GetUnitAbilityLevel(GetEventDamageSource(),1093678162)==0 thencall DisableTrigger(t)set NI0=truecall TKI(GetTriggerUnit(),GetEventDamageSource(),3,GetEventDamage())set NI0=falsecall EnableTrigger(t)elsecall DisableTrigger(t)set NI0=truecall TKI(GetTriggerUnit(),K1[GetPlayerId(GetOwningPlayer(GetEventDamageSource()))],3,GetEventDamage())set NI0=falsecall EnableTrigger(t)endifendifendifset t=nullreturn falseendfunctionfunction X8O takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,4.5,false)call TriggerAddCondition(t,Condition(function X7O))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\SpikeBarrier\\SpikeBarrier.mdl",TLI,"chest")))set t=nullset TLI=nullendfunctionfunction X9O takes nothing returns nothingif GetSpellAbilityId()==1093743959 thencall X8O()endifendfunctionfunction XAO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real a=(LoadReal(XY,(MKI),(137)))local real d=(LoadReal(XY,(MKI),(138)))local real x=RCI(GetUnitX(TMI)+d/10*Cos(a*bj_DEGTORAD))local real y=RGI(GetUnitY(TMI)+d/10*Sin(a*bj_DEGTORAD))if GetTriggerEvalCount(t)==11 or GetTriggerEventId()==EVENT_UNIT_DEATH or((LoadInteger(XY,(GetHandleId((TMI))),((4260))))==1)==true thencall FlushChildHashtable(XY,(MKI))call MZI(t)elsecall DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\FlakCannons\\FlakTarget.mdl",x,y))if((LoadInteger(XY,(GetHandleId((TMI))),((4306))))==1)==false and((LoadInteger(XY,(GetHandleId((TMI))),((4324))))==1)==false and GetUnitAbilityLevel(TMI,1110456406)==0 and GetUnitAbilityLevel(TMI,1110459975)==0 thencall QEI(x,y,150)call SetUnitX(TMI,x)call SetUnitY(TMI,y)endifendifset TMI=nullset t=nullreturn falseendfunctionfunction XBO takes nothing returns nothinglocal unit TMI=GetSpellTargetUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real xlocal real ylocal real dlocal real alocal integer i=-1local boolean XCO=falseif GetSpellTargetItem()!=null thenset TMI=GetTriggerUnit()endifcall MPI(TMI,4414,3)set a=GetUnitFacing(TMI)loopexitwhen XCO or i==23set i=i+1set x=RCI(GetUnitX(TMI)+(600-i*25)*Cos(a*bj_DEGTORAD))set y=RGI(GetUnitY(TMI)+(600-i*25)*Sin(a*bj_DEGTORAD))if(IsPointInRegion(XN,((x)*1.0),((y)*1.0)))==false thenset XCO=trueendifendloopset d=PAI(x,y,GetUnitX(TMI),GetUnitY(TMI))call TriggerRegisterTimerEvent(t,0.04,true)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function XAO))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveReal(XY,(MKI),(137),((a)*1.0))call SaveReal(XY,(MKI),(138),((d)*1.0))set TMI=nullset t=nullendfunctionfunction XDO takes nothing returns nothingif GetSpellAbilityId()==1093744973 and GetUnitTypeId(GetSpellTargetUnit())!=1848651852 thenif IsUnitEnemy(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))==true or(LoadBoolean(XY,(GetHandleId(GetOwningPlayer(GetSpellTargetUnit()))),(139)))==false thencall XBO()endifendifendfunctionfunction XEO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if GetTriggerEvalCount(t)>30 or GetTriggerEventId()==EVENT_UNIT_DEATH thencall UnitRemoveAbility(TLI,1093751107)call UnitRemoveAbility(TLI,1110459225)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset TLI=nullset t=nullreturn falseendfunctionfunction XFO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer BP1=(LoadInteger(XY,(MKI),(34)))if GetTriggerEvalCount(t)>BP1/0.1 or GetTriggerEventId()==EVENT_UNIT_DEATH or((LoadInteger(XY,(GetHandleId((TLI))),((4256))))==1)thencall UnitRemoveAbility(TLI,1097167980)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset TLI=nullset t=nullreturn falseendfunctionfunction XGO takes unit u,integer BP1 returns nothinglocal unit TLI=ulocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call UnitAddAbility(TLI,1097167980)call UnitMakeAbilityPermanent(TLI,true,1097167980)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1097167980,false)call TriggerRegisterTimerEvent(t,0.1,true)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function XFO))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(34),(BP1))set TLI=nullset t=nullendfunctionfunction EtherBlast_AddToEnemies takes nothing returns nothingcall XGO(GetEnumUnit(),3)endfunctionfunction EtherBlast_DamageEnemies takes nothing returns nothingcall TKI(GetTriggerUnit(),GetEnumUnit(),1,N10)endfunctionfunction XHO takes nothing returns nothinglocal integer MKI=GetHandleId(GetTriggeringTrigger())local unit TLI=CKlocal unit TMI=DKlocal real TSI=(LoadReal(XY,(MKI),(20)))local trigger tlocal integer BP1=3if TLI==TMI thenset BP1=4endifif IsPlayerAlly(GetOwningPlayer(TMI),GetOwningPlayer(TLI))==true and TLI!=TMI thencall XGO(TMI,4)elseif TLI!=TMI thenset t=CreateTrigger()set MKI=GetHandleId(t)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093751107,false)call UnitAddAbility(TMI,1093751107)call UnitMakeAbilityPermanent(TMI,true,1093751107)call TriggerRegisterTimerEvent(t,0.1,true)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function XEO))call SaveUnitHandle(XY,(MKI),(2),(TMI))call XGO(TMI,BP1)call Q5I("+"+I2S(R2I(TSI)),2,TMI,0.027,3,216,120,216)set YBI=truecall TKI(TLI,TMI,1,TSI)set YBI=falseendifcall XGO(TLI,BP1)set TLI=nullset TMI=nullendfunctionfunction XZO takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger t2=U6I(TLI,TMI,1747993171,"XHO",1000,false)local integer XVO=GetHandleId(t2)local integer XWO=MUI(TLI)local real XXOif XWO==2 thenset XXO=GetHeroAgi(TLI,true)elseif XWO==3 thenset XXO=GetHeroStr(TLI,true)elseif XWO==1 thenset XXO=GetHeroInt(TLI,true)endifcall SaveReal(XY,(XVO),(20),((XXO*2.0+75)*1.0))set TLI=nullset TMI=nullset t2=nullendfunctionfunction XYO takes nothing returns nothingif GetSpellAbilityId()==1093751108 and(IsPlayerAlly(GetOwningPlayer(GetSpellTargetUnit()),GetOwningPlayer(GetTriggerUnit()))==true or MBI(GetSpellTargetUnit())==false)thencall XZO()endifendfunctionfunction XJO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if GetTriggerEvalCount(t)>40 or GetTriggerEventId()==EVENT_UNIT_DEATH or T6I(TLI)or((LoadInteger(XY,(GetHandleId((TLI))),((4256))))==1)thencall UnitRemoveAbility(TLI,1097167980)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset TLI=nullset t=nullreturn falseendfunctionfunction XKO takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger tlocal integer MKIif T4I(TLI)==false thenset t=CreateTrigger()set MKI=GetHandleId(t)call UnitAddAbility(TLI,1097167980)call UnitMakeAbilityPermanent(TLI,true,1097167980)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1097167980,false)call TriggerRegisterTimerEvent(t,0.1,true)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function XJO))call SaveUnitHandle(XY,(MKI),(2),(TLI))endifset TLI=nullset t=nullendfunctionfunction XLO takes nothing returns nothingif GetSpellAbilityId()==1093747011 and T6I(GetTriggerUnit())==false thencall XKO()endifendfunctionfunction XMO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real XNO=(LoadReal(XY,(MKI),(529)))local real XSO=(LoadReal(XY,(MKI),(530)))local real XTO=GetUnitState(TLI,UNIT_STATE_MANA)local real XRO=GetUnitState(TLI,UNIT_STATE_MAX_MANA)local real XPO=(LoadReal(XY,(MKI),(668)))local real XQO=GetUnitStatePercent(TLI,UNIT_STATE_MANA,UNIT_STATE_MAX_MANA)local real XUO=(XPO-XQO)/100if GetTriggerEventId()==EVENT_UNIT_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEvalCount(t)==20*10 thencall FlushChildHashtable(XY,(MKI))call MZI(t)if XNO<150 thencall SetUnitState(TLI,UNIT_STATE_MANA,XTO-(150-XNO-XSO))endifelseif XUO>0 thenset XNO=XNO+XUO*XROif XSO>0 thenif XUO*XRO>XSO thencall SetUnitState(TLI,UNIT_STATE_MANA,XTO+XSO)set XSO=0elseif XSO>(XRO-XTO)thenset XSO=XSO-(XRO-XTO)call SetUnitState(TLI,UNIT_STATE_MANA,XRO)elseset XSO=XSO-XUO*XROcall SetUnitState(TLI,UNIT_STATE_MANA,XTO+XUO*XRO)endifendifendifendifset XPO=XQOcall SaveReal(XY,(MKI),(668),((XPO)*1.0))call SaveReal(XY,(MKI),(529),((XNO)*1.0))call SaveReal(XY,(MKI),(530),((XSO)*1.0))endifset t=nullset TLI=nullreturn falseendfunctionfunction Y0O takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local real YIO=GetUnitState(TLI,UNIT_STATE_LIFE)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real XTO=GetUnitState(TLI,UNIT_STATE_MANA)if YIO>151 thencall SetUnitState(TLI,UNIT_STATE_LIFE,YIO-150)elsecall SetUnitState(TLI,UNIT_STATE_LIFE,1)endifcall PKI("Abilities\\Spells\\Orc\\SpiritLink\\SpiritLinkZapTarget.mdl",TLI,"origin",2)call SetUnitState(TLI,UNIT_STATE_MANA,XTO+150)call TriggerRegisterTimerEvent(t,0.05,true)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function XMO))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(242),((GetUnitState(TLI,UNIT_STATE_MANA))*1.0))call SaveReal(XY,(MKI),(529),((0)*1.0))call SaveReal(XY,(MKI),(668),((GetUnitStatePercent(TLI,UNIT_STATE_MANA,UNIT_STATE_MAX_MANA))*1.0))if(XTO+150)>GetUnitState(TLI,UNIT_STATE_MAX_MANA)thencall SaveReal(XY,(MKI),(530),(((XTO+150)-GetUnitState(TLI,UNIT_STATE_MAX_MANA))*1.0))endifset TLI=nullendfunctionfunction Y1O takes nothing returns nothingif GetSpellAbilityId()==1093751096 thencall Y0O()endifendfunctionfunction YOO takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local real xlocal real yif NZI(GetOwningPlayer(TLI))thenset x=GetRectCenterX(O4)set y=GetRectCenterY(O4)elseset x=GetRectCenterX(S3)set y=GetRectCenterY(S3)endifcall IssuePointOrder(TLI,"move",x,y)set TLI=nullendfunctionfunction Y2O takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local real xlocal real yif NZI(GetOwningPlayer(TLI))thenset x=-4533set y=1158elseset x=3190set y=-35endifcall IssuePointOrder(TLI,"move",x,y)set TLI=nullendfunctionfunction Y3O takes nothing returns nothingif GetSpellAbilityId()==1093747027 thencall YOO()elseif GetSpellAbilityId()==1093815123 thencall Y2O()endifendfunctionfunction Y4O takes nothing returns nothinglocal unit N0I=GetTriggerUnit()call SaveBoolean(XY,(GetHandleId(N0I)),(129),(true))set N0I=nullendfunctionfunction Y5O takes nothing returns nothingif(GetSpellAbilityId()==1093681720 or GetSpellAbilityId()==1093752645)and MBI(GetTriggerUnit())==true thencall Y4O()endifendfunctionfunction Y6O takes integer id returns booleanreturn id==1969711215 or id==1970169187 or id==1702061422 or id==1701081721 or id==1966092337 or id==1966092338 or id==1697656918 or id==1697656919 or id==1700946284 or id==1697657398 or id==1970107511 or id==1966092370endfunctionfunction Y7O takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))if GetTriggerEventId()==EVENT_UNIT_DEATH or GetTriggerEvalCount(t)>8 thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetUnitState(TMI,UNIT_STATE_LIFE)>(150.0/8.0+0.5)thencall SetUnitState(TMI,UNIT_STATE_LIFE,GetUnitState(TMI,UNIT_STATE_LIFE)-150.0/8.0)elseset N20[GetPlayerId(GetOwningPlayer(TMI))]=trueset YBI=truecall TKI(TLI,TMI,1,50)set N20[GetPlayerId(GetOwningPlayer(TMI))]=falseset YBI=falseendifendifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction Y8O takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))if GetTriggerEventId()==EVENT_UNIT_DEATH or(GetTriggerEventId()==EVENT_UNIT_DAMAGED and(Y6O(GetUnitTypeId(GetEventDamageSource()))==false and(GetOwningPlayer(GetEventDamageSource())!=DO or GetUnitTypeId(GetEventDamageSource())==1848651852)and GetEventDamage()>0)or NO0==true)thencall UnitRemoveAbility(TMI,1110459207)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TMI=nullreturn falseendfunctionfunction Y9O takes nothing returns nothinglocal trigger tlocal integer MKIlocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local unit QHIlocal integer i=0local boolean E31=falselocal boolean XCO=falselocal integer D51if TMI==null thenset TMI=GetTriggerUnit()endifset QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)loopexitwhen i>5 or XCOif DH1(UnitItemInSlot(TLI,i))==WQ0 thenset D51=GetItemCharges(UnitItemInSlot(TLI,i))if D51>0 thenset E31=trueset D51=D51-1elseset XCO=trueset E31=falseendifendifset i=i+1endloopif E31==true thenset t=CreateTrigger()set MKI=GetHandleId(t)if IsUnitAlly(TMI,GetOwningPlayer(TLI))==true thencall UnitAddAbility(QHI,1093750093)call IssueTargetOrderById(QHI,852609,TMI)call SaveUnitHandle(XY,(MKI),(17),(TMI))call TriggerRegisterTimerEvent(t,N30,false)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function Y8O))elsecall SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("war3mapImported\\Urn_Enemy.mdx",TMI,"overhead")))call TriggerRegisterTimerEvent(t,1,true)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function Y7O))endifendifset TLI=nullset QHI=nullset TMI=nullset t=nullendfunctionfunction YAO takes nothing returns nothingif GetSpellAbilityId()==1093750095 thencall Y9O()endifendfunctionfunction YBO takes nothing returns nothinglocal integer i=0loopexitwhen i>16set N20[i]=falseset i=i+1endloopendfunctionfunction YCO takes nothing returns nothingif A61(GetEnumUnit())==false thencall SetPlayerAbilityAvailable(GetOwningPlayer(GetEnumUnit()),1093753432,false)call O41(GetEnumUnit(),1093753432,1,N40,1110459480)endifendfunctionfunction YDO takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local integer i=0local boolean E31=falselocal boolean XCO=falselocal integer D51local group gset g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),925,Condition(function B91))call ForGroup(g,function YCO)call MCI(g)set g=nullset TLI=nullendfunctionfunction YEO takes nothing returns nothingif GetSpellAbilityId()==1093753431 thencall YDO()endifendfunctionfunction YFO takes unit u returns booleanlocal integer NBI=GetUnitTypeId(u)return NBI==1211122232 or NBI==1848657482 or NBI==1848657481 or NBI==1848657462 or NBI==1848657480 or NBI==1966092371endfunctionfunction YGO takes unit u returns booleanlocal integer id=GetUnitTypeId(u)return TXI(id)endfunctionfunction YHO takes nothing returns booleanreturn IsUnitEnemy(GetFilterUnit(),N50)and QPI(GetFilterUnit())==false and(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true or IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==true or YGO(GetFilterUnit()))and YFO(GetFilterUnit())==falseendfunctionfunction YZO takes unit TLI returns booleanlocal group g=MDI()local boolean E31set N50=GetOwningPlayer(TLI)call GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),1050,Condition(function YHO))set E31=FirstOfGroup(g)!=nullcall MCI(g)return E31endfunctionfunction YVO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local group glocal integer MFIlocal boolean YWOif GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED thenif GetAttacker()==TLI thencall UnitRemoveAbility(TLI,1093808204)call UnitRemoveAbility(TLI,1093808211)call UnitRemoveAbility(TLI,1110459698)call UnitRemoveAbility(TLI,1110456665)call E21(TLI)if((LoadInteger(XY,(GetHandleId((TLI))),((4302))))==1)==false thencall UnitSetUsesAltIcon(TLI,false)endifcall SaveInteger(XY,(GetHandleId((TLI))),((4420)),(2))call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)endifelseset YWO=(LoadBoolean(XY,(MKI),(671)))set MFI=(LoadInteger(XY,(MKI),(34)))set MFI=MFI+1call SaveInteger(XY,(MKI),(34),(MFI))set g=MDI()set N50=GetOwningPlayer(TLI)call GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),1050,Condition(function YHO))if GetUnitAbilityLevel(TLI,1110456665)>0 thencall SaveBoolean(XY,(MKI),(671),(true))elseif YWO thencall SaveBoolean(XY,(MKI),(671),(false))call UnitRemoveAbility(TLI,1093808204)call QTI(TLI,1093808204)endifif MFI>350 or FirstOfGroup(g)!=null thencall UnitRemoveAbility(TLI,1093808204)call UnitRemoveAbility(TLI,1093808211)call UnitRemoveAbility(TLI,1110459698)call UnitRemoveAbility(TLI,1110456665)call E21(TLI)if((LoadInteger(XY,(GetHandleId((TLI))),((4302))))==1)==false and((LoadInteger(XY,(GetHandleId((TLI))),((4421))))==1)==false thencall UnitSetUsesAltIcon(TLI,false)endifcall SaveInteger(XY,(GetHandleId((TLI))),((4420)),(2))call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)endifcall MCI(g)endifset t=nullset TLI=nullset g=nullreturn falseendfunctionfunction YXO takes nothing returns nothinglocal unit TLI=GetEnumUnit()local trigger tlocal integer MKIif NXI(GetOwningPlayer(TLI))and YZO(TLI)==false thenif IsPlayerAlly(GetLocalPlayer(),GetOwningPlayer(TLI))==false and TGI(GetLocalPlayer())==false thencall UnitSetUsesAltIcon(TLI,true)call E41(TLI)endifcall QTI(TLI,1093808204)call UnitMakeAbilityPermanent(TLI,true,1093808204)if A61(TLI)==false thencall QTI(TLI,1093808211)call UnitMakeAbilityPermanent(TLI,true,1093808211)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093808211,false)endifset t=CreateTrigger()set MKI=GetHandleId(t)call SaveInteger(XY,(MKI),(34),(0))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveBoolean(XY,(MKI),(671),(false))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("war3mapImported\\SmokeOfDeceit.mdx",TLI,"chest")))call SaveInteger(XY,(GetHandleId((TLI))),((4420)),(1))call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerRegisterTimerEvent(t,.1,true)call TriggerAddCondition(t,Condition(function YVO))set t=nullendifset TLI=nullendfunctionfunction YYO takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local group g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),1225,Condition(function B81))call ForGroup(g,function YXO)call MCI(g)set TLI=nullset g=nullendfunctionfunction YJO takes nothing returns nothingif GetSpellAbilityId()==1093808182 thencall YYO()endifendfunctionfunction InitTrig_Smoke_of_Deceit takes nothing returns nothingcall SetAltMinimapIcon("war3mapImported\\black.blp")endfunctionfunction YKO takes nothing returns nothingif A61(GetEnumUnit())==false thencall SetPlayerAbilityAvailable(GetOwningPlayer(GetEnumUnit()),1093810246,false)call O41(GetEnumUnit(),1093810246,1,N60,1110459729)endifendfunctionfunction YLO takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local group g=MDI()local real x=GetSpellTargetX()local real y=GetSpellTargetY()call GroupEnumUnitsInRange(g,x,y,600+25,Condition(function AK1))call ForGroup(g,function YKO)call MCI(g)call DestroyEffect(AddSpecialEffect("war3mapImported\\DarkLightningNova.mdx",x,y))set TLI=nullset g=nullendfunctionfunction YMO takes nothing returns nothingif GetSpellAbilityId()==1093810244 thencall YLO()endifendfunctionfunction YNO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local real YSO=(LoadReal(XY,(GetHandleId(TMI)),(745)))if GetTriggerEventId()==EVENT_WIDGET_DEATH or(TimerGetElapsed(M))>YSO thencall UnitRemoveAbility(TMI,1110459989)call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetUnitAbilityLevel(TMI,1110459989)==0 thencall IssueTargetOrder(QHI,"curse",TMI)endifset t=nullset TMI=nullset QHI=nullreturn falseendfunctionfunction CripplingStaff takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local unit QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)local real d=N70local trigger tlocal integer MKIif T6I(TMI)==false thencall QTI(QHI,1093814861)call IssueTargetOrder(QHI,"curse",TMI)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093813571,false)call O41(TMI,1093813571,1,d,1110459957)elsecall QTI(QHI,1093814861)call SetUnitAbilityLevel(QHI,1093814861,2)call IssueTargetOrder(QHI,"curse",TMI)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093813571,false)call O41(TMI,1093813571,1,d,1110459957)endifset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.01,true)call TriggerRegisterDeathEvent(t,TMI)call TriggerAddCondition(t,Condition(function YNO))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveReal(XY,(GetHandleId(TMI)),(745),(((TimerGetElapsed(M))+d)*1.0))set TLI=nullset TMI=nullset QHI=nullset t=nullendfunctionfunction YTO takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call UnitAddAbility(QHI,1093815091)call IssueTargetOrder(QHI,"slow",TMI)set TLI=nullset TMI=nullset QHI=nullendfunctionfunction YRO takes nothing returns nothingif GetSpellAbilityId()==1093813569 and MBI(GetSpellTargetUnit())==false thencall YTO()endifendfunctionfunction YPO takes unit TLI returns nothingif IsUnitIllusion(TLI)or LL0[GetPlayerId(GetOwningPlayer(TLI))]<=0 or(IsUnitType(TLI,UNIT_TYPE_HERO)==false and OL1(TLI)==false)thenreturnelseif CT1(TLI,FK0[HM0])==true or CT1(TLI,FK0[HN0])==true thencall FIO(TLI)endifendfunctionfunction YQO takes nothing returns booleancall YPO(GetAttacker())call YPO(GetTriggerUnit())return falseendfunctionfunction YUO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer MFI=(LoadInteger(XY,(MKI),(34)))if GetTriggerEventId()==EVENT_WIDGET_DEATH or MFI==20 or(GetTriggerEventId()==EVENT_UNIT_DAMAGED and GetEventDamage()>20)thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEventId()!=EVENT_UNIT_DAMAGED thenset MFI=MFI+1call SaveInteger(XY,(MKI),(34),(MFI))call SetUnitState(TLI,UNIT_STATE_LIFE,GetUnitState(TLI,UNIT_STATE_LIFE)+12.5)endifset t=nullset TLI=nullreturn falseendfunctionfunction J0O takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,1,true)call TriggerRegisterDeathEvent(t,TLI)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function YUO))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(34),(0))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("war3mapImported\\TranquilBootsHeal.mdx",TLI,"origin")))set TLI=nullset t=nullendfunctionfunction JIO takes nothing returns nothingif GetSpellAbilityId()==1093815089 thencall J0O()endifendfunctionfunction J1O takes nothing returns booleanlocal unit QP1=GetSummonedUnit()local integer i=0local item F2Olocal integer CN1if IsUnitIllusion(QP1)==true thenloopexitwhen i>5set F2O=UnitItemInSlot(QP1,i)set CN1=DH1(F2O)if CN1==HM0 thencall DisableTrigger(L30)set VK=GetItemPlayer(F2O)call RemoveItem(F2O)set FK=DQ1(QP1,FK0[HN0],i)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)call EnableTrigger(L30)endifset i=i+1endloopendifset QP1=nullreturn falseendfunctionfunction J2O takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local unit QHIif GetUnitX(TLI)!=x or GetUnitY(TLI)!=y or(GetUnitAbilityLevel(TLI,1110460237)==0 and GetTriggerEvalCount(t)>R2I(0.3/.05))or GetTriggerEvalCount(t)>R2I(N80/.05)thencall FlushChildHashtable(XY,(MKI))call MZI(t)call SaveInteger(XY,(GetHandleId((TLI))),((4337)),(2))call UnitRemoveAbility(TLI,1110460236)call UnitRemoveAbility(TLI,1110460237)call UnitRemoveAbility(TLI,1093816883)elseif GetTriggerEvalCount(t)==R2I(0.3/.05)thenset QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TLI),GetUnitY(TLI),0)call UnitAddAbility(QHI,1093816882)call IssueTargetOrder(QHI,"invisibility",TLI)call SaveInteger(XY,(GetHandleId((TLI))),((4337)),(2))set QHI=nullendifset t=nullset TLI=nullreturn falseendfunctionfunction J3O takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local integer J4O=(LoadInteger(XY,(MKI),(375)))local integer id=GetUnitCurrentOrder(TLI)if GetUnitX(TLI)!=x or GetUnitY(TLI)!=y thencall IssueImmediateOrder(TLI,"holdposition")call SaveReal(XY,(J4O),(6),((GetUnitX(TLI))*1.0))call SaveReal(XY,(J4O),(7),((GetUnitY(TLI))*1.0))elseif id==0 or id==851973 or id==851983 or id==851971 thencall IssueImmediateOrder(TLI,"holdposition")endifcall FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullreturn falseendfunctionfunction J5O takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local trigger t2=CreateTrigger()local integer XVO=GetHandleId(t2)local string J6O="Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayTarget.mdl"if GetLocalPlayer()!=GetOwningPlayer(TLI)thenset J6O=""endifcall QTI(TLI,1093816883)call SaveInteger(XY,(GetHandleId((TLI))),((4337)),(1))call DestroyEffect(AddSpecialEffectTarget(J6O,TLI,"chest"))call DestroyEffect(AddSpecialEffectTarget(J6O,TLI,"hand left"))call DestroyEffect(AddSpecialEffectTarget(J6O,TLI,"hand right"))call TriggerRegisterTimerEvent(t,0.05,true)call TriggerAddCondition(t,Condition(function J2O))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(6),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(7),((GetUnitY(TLI))*1.0))call TriggerRegisterTimerEvent(t2,0.01,false)call TriggerAddCondition(t2,Condition(function J3O))call SaveUnitHandle(XY,(XVO),(2),(TLI))call SaveReal(XY,(XVO),(6),((GetUnitX(TLI))*1.0))call SaveReal(XY,(XVO),(7),((GetUnitY(TLI))*1.0))call SaveInteger(XY,(XVO),(375),(MKI))set TLI=nullset t=nullendfunctionfunction J7O takes nothing returns nothingif GetSpellAbilityId()==1093816881 and((LoadInteger(XY,(GetHandleId((GetTriggerUnit()))),((4337))))==1)==false thencall J5O()endifendfunctionfunction J8O takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if GetUnitAbilityLevel(TLI,1113875828)==0 thencall UnitRemoveAbility(TLI,1093817162)call UnitRemoveAbility(TLI,1110460242)call FlushChildHashtable(XY,(MKI))call MZI(t)elseif AG1(TLI)==true thenif GetUnitAbilityLevel(TLI,1110460242)==0 thencall QTI(TLI,1093817162)endifelseif GetUnitAbilityLevel(TLI,1110460242)>0 thencall UnitRemoveAbility(TLI,1093817162)call UnitRemoveAbility(TLI,1110460242)endifendifendifset TLI=nullset t=nullreturn falseendfunctionfunction J9O takes nothing returns nothinglocal unit TLI=GetEnumUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.02,true)call TriggerRegisterDeathEvent(t,TLI)call TriggerAddCondition(t,Condition(function J8O))call SaveUnitHandle(XY,(MKI),(2),(TLI))set t=nullset TLI=nullendfunctionfunction JAO takes nothing returns nothinglocal group g=MDI()local unit TLI=GetTriggerUnit()call GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),1050+25,Condition(function BH1))call ForGroup(g,function J9O)call MCI(g)set g=nullset TLI=nullendfunctionfunction JBO takes nothing returns nothingif GetSpellAbilityId()==1095332962 thencall JAO()endifendfunctionfunction JCO takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer JDO=0local integer JEO=0local item D61local integer JFOlocal integer KLIlocal unit JGOif GetSpellAbilityId()==1093818185 thenset JFO=1868921189set KLI=60*4set JDO=1227896136set JEO=Z20elseif GetSpellAbilityId()==1093818184 thenset JFO=1865429044set KLI=60*7set JDO=1227896135set JEO=ZO0endifif(JDO!=0)thenif TMI!=null thenif DF1(TMI)>0 thencall DisableTrigger(L30)set D61=UnitAddItemById(TMI,JDO)call SetItemPlayer(D61,GetOwningPlayer(TMI),false)call SetItemUserData(D61,1)call SetItemCharges(D61,1)call EnableTrigger(L30)elsecall D71(FJ0[JEO],GetUnitX(TMI),GetUnitY(TMI),GetOwningPlayer(TMI),true,1)endifelseset JGO=CreateUnit(GetOwningPlayer(TLI),JFO,GetSpellTargetX(),GetSpellTargetY(),0)call UnitApplyTimedLife(JGO,1112820804,KLI)call QTI(JGO,1093687362)call QZI(GetOwningPlayer(TLI),UF,GetSpellTargetX(),GetSpellTargetY())if IsUnitInRegion(TX0,JGO)thencall EWO(TLI,JGO)call RemoveUnit(JGO)elsecall EHO(JGO,TLI)if GetUnitTypeId(JGO)==1868921189 thencall QJI(GetOwningPlayer(JGO),12,GetUnitX(JGO),GetUnitY(JGO),150)endifendifendifendifset TLI=nullset D61=nullendfunctionfunction JHO takes nothing returns nothingif IsUnitAlly(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))==false thencall TKI(GetTriggerUnit(),GetSpellTargetUnit(),2,100)endifendfunctionfunction JZO takes nothing returns nothingif GetSpellAbilityId()==1093748292 thenif GetUnitTypeId(GetSpellTargetUnit())==1865429044 or GetUnitTypeId(GetSpellTargetUnit())==1868921189 thencall JHO()endifendifendfunctionfunction JVO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))call SetItemCharges(DB1(TLI,FK0[WG0]),GetItemCharges(DB1(TLI,FK0[WG0]))+1)call FlushChildHashtable(XY,(MKI))call MZI(t)if GetUnitTypeId(TLI)==1315988077 thenset X9I=TLIendifcall KillUnit(TLI)set TLI=nullset t=nullreturn falseendfunctionfunction JWO takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(2),(TLI))call TriggerAddCondition(t,Condition(function JVO))call TriggerRegisterTimerEvent(t,0.01,false)set t=nullset TLI=nullendfunctionfunction JXO takes nothing returns nothingif GetSpellAbilityId()==1093817419 thencall JWO()endifendfunctionfunction JYO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local unit QHIif GetUnitX(TLI)!=x or GetUnitY(TLI)!=y or(GetUnitAbilityLevel(TLI,1110460216)==0 and GetTriggerEvalCount(t)>R2I(1.5/.05))thencall FlushChildHashtable(XY,(MKI))call MZI(t)call SaveInteger(XY,(GetHandleId((TLI))),((4330)),(2))call UnitRemoveAbility(TLI,1110460214)call UnitRemoveAbility(TLI,1110460216)elseif GetTriggerEvalCount(t)==R2I(1.5/.05)thenset QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TLI),GetUnitY(TLI),0)call UnitAddAbility(QHI,1093815861)call IssueTargetOrder(QHI,"invisibility",TLI)call SaveInteger(XY,(GetHandleId((TLI))),((4330)),(2))set QHI=nullendifset t=nullset TLI=nullreturn falseendfunctionfunction JJO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local integer J4O=(LoadInteger(XY,(MKI),(375)))local integer id=GetUnitCurrentOrder(TLI)if GetUnitX(TLI)!=x or GetUnitY(TLI)!=y thencall IssueImmediateOrder(TLI,"holdposition")call SaveReal(XY,(J4O),(6),((GetUnitX(TLI))*1.0))call SaveReal(XY,(J4O),(7),((GetUnitY(TLI))*1.0))elseif id==0 or id==851973 or id==851983 or id==851971 thencall IssueImmediateOrder(TLI,"holdposition")endifcall FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullreturn falseendfunctionfunction JKO takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local trigger t2=CreateTrigger()local integer XVO=GetHandleId(t2)local string J6O="Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayTarget.mdl"if GetLocalPlayer()!=GetOwningPlayer(TLI)thenset J6O=""endifcall SaveInteger(XY,(GetHandleId((TLI))),((4330)),(1))call DestroyEffect(AddSpecialEffectTarget(J6O,TLI,"chest"))call DestroyEffect(AddSpecialEffectTarget(J6O,TLI,"hand left"))call DestroyEffect(AddSpecialEffectTarget(J6O,TLI,"hand right"))call TriggerRegisterTimerEvent(t,0.05,true)call TriggerAddCondition(t,Condition(function JYO))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(6),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(7),((GetUnitY(TLI))*1.0))call TriggerRegisterTimerEvent(t2,0.01,false)call TriggerAddCondition(t2,Condition(function JJO))call SaveUnitHandle(XY,(XVO),(2),(TLI))call SaveReal(XY,(XVO),(6),((GetUnitX(TLI))*1.0))call SaveReal(XY,(XVO),(7),((GetUnitY(TLI))*1.0))call SaveInteger(XY,(XVO),(375),(MKI))set TLI=nullset t=nullendfunctionfunction JLO takes nothing returns nothingif GetSpellAbilityId()==1093815857 and((LoadInteger(XY,(GetHandleId((GetTriggerUnit()))),((4330))))==1)==false thencall JKO()endifendfunctionfunction JMO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer JNO=(LoadInteger(XY,(MKI),(34)))if(GetTriggerEventId()==EVENT_WIDGET_DEATH or GetTriggerEvalCount(t)>=JNO or T6I(TMI)==true)thencall AE1(TMI)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TMI=nullreturn falseendfunctionfunction JSO takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local unit QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)local integer NGI=2local real BP1=4.5local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)if IsUnitType(TMI,UNIT_TYPE_MELEE_ATTACKER)==true thenset NGI=1set BP1=3endifcall AC1(TMI)call TriggerRegisterTimerEvent(t,0.1,true)call TriggerRegisterDeathEvent(t,TMI)call TriggerAddCondition(t,Condition(function JMO))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(34),(R2I(BP1*10)))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("Abilities\\Spells\\Other\\TalkToMe\\TalkToMe.mdl",TMI,"overhead")))set TLI=nullset TMI=nullset QHI=nullendfunctionfunction JTO takes nothing returns nothingif GetSpellAbilityId()==1093815092 and MBI(GetSpellTargetUnit())==false thencall JSO()endifendfunctionfunction JRO takes integer NGI,unit TLI,unit TMI returns nothingset YBI=truecall TKI(TLI,TMI,1,300+100*NGI)set YBI=falseendfunctionfunction JPO takes nothing returns nothinglocal integer JQO=0if GetSpellAbilityId()==1093677647 thenset JQO=1endifif GetSpellAbilityId()==1093679193 thenset JQO=2endifif GetSpellAbilityId()==1093679194 thenset JQO=3endifif GetSpellAbilityId()==1093679408 thenset JQO=4endifif GetSpellAbilityId()==1093679410 thenset JQO=5endifif JQO>0 and MBI(GetSpellTargetUnit())==false thencall JRO(JQO,GetTriggerUnit(),GetSpellTargetUnit())endifendfunctionfunction JUO takes nothing returns nothingif GetSpellAbilityId()==1093814353 thencall QU1(GetTriggerUnit(),GetSpellTargetUnit())endifendfunctionfunction K0O takes unit TLI,integer SVI,real x,real y returns nothinglocal unit KIO=CreateUnit(GetOwningPlayer(TLI),SVI,x,y,0)call UnitApplyTimedLife(KIO,1112820806,15)set KIO=nullendfunctionfunction K1O takes nothing returns nothinglocal unit KIOlocal real xlocal real yif GetSpellAbilityId()==1093753420 thenset x=GetDestructableX(GetSpellTargetDestructable())set y=GetDestructableY(GetSpellTargetDestructable())call K0O(GetTriggerUnit(),1848659021,x,y)elseif GetSpellAbilityId()==1093753421 thenset x=GetDestructableX(GetSpellTargetDestructable())set y=GetDestructableY(GetSpellTargetDestructable())call K0O(GetTriggerUnit(),1848659022,x,y)endifset KIO=nullendfunctionfunction KOO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))call UnitRemoveAbility(TLI,1093753418)call UnitRemoveAbility(TMI,1093753418)call DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction K2O takes nothing returns nothinglocal trigger tlocal integer MKIset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,7,false)call TriggerAddCondition(t,Condition(function KOO))call SaveUnitHandle(XY,(MKI),(2),(GetTriggerUnit()))call SaveUnitHandle(XY,(MKI),(17),(GetSpellTargetUnit()))call SaveEffectHandle(XY,(MKI),(175),(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\Cripple\\CrippleTarget.mdl",GetSpellTargetUnit(),"chest")))call SaveEffectHandle(XY,(MKI),(176),(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\Cripple\\CrippleTarget.mdl",GetTriggerUnit(),"chest")))call UnitAddAbility(GetTriggerUnit(),1093753418)call UnitAddAbility(GetSpellTargetUnit(),1093753418)call UnitMakeAbilityPermanent(GetTriggerUnit(),true,1093753418)call UnitMakeAbilityPermanent(GetSpellTargetUnit(),true,1093753418)set t=nullendfunctionfunction K3O takes nothing returns nothingif GetSpellAbilityId()==1093753417 thencall K2O()endifendfunctionfunction K4O takes nothing returns nothinglocal unit N3I=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local unit QHIif GetSpellTargetUnit()==null thenif GetSpellAbilityId()==1095331948 thenset QHI=CreateUnit(GetOwningPlayer(N3I),1697656901,GetUnitX(N3I),GetUnitY(N3I),0)call UnitAddAbility(QHI,1093752641)call IssueTargetOrderById(QHI,852609,N3I)set QHI=nullelseif GetSpellAbilityId()==1095331954 thenset QHI=CreateUnit(GetOwningPlayer(N3I),1697656901,GetUnitX(N3I),GetUnitY(N3I),0)call UnitAddAbility(QHI,1095331954)call IssueTargetOrderById(QHI,852609,N3I)set QHI=nullendifendifset N3I=nullset TMI=nullendfunctionfunction K5O takes nothing returns nothingif GetSpellAbilityId()==1095331948 or GetSpellAbilityId()==1095331954 thencall K4O()endifendfunctionfunction K6O takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=(LoadInteger(XY,(MKI),(34)))if(GetTriggerEventId()==EVENT_UNIT_DEATH and GetKillingUnit()==TLI)or(GetTriggerEventId()==EVENT_UNIT_DAMAGED and GetUnitAbilityLevel(TMI,1110459731)>0)thencall DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Transmute\\PileofGold.mdl",GetUnitX(TMI),GetUnitY(TMI)))call AddHeroXP(TLI,R2I(NFI(NGI)*2.5),true)call I81(GetOwningPlayer(TLI),TMI,190)set EW0[GetPlayerId(GetOwningPlayer(TLI))]=EW0[GetPlayerId(GetOwningPlayer(TLI))]+190set EV0[GetPlayerId(GetOwningPlayer(TLI))]=EV0[GetPlayerId(GetOwningPlayer(TLI))]+190call FlushChildHashtable(XY,(MKI))call MZI(t)call KillUnit(TMI)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction K7O takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitLevel(TMI)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(34),(NGI))call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function K6O))set t=nullset TLI=nullset TMI=nullendfunctionfunction K8O takes nothing returns nothingif GetSpellAbilityId()==1093810265 and VZO(GetSpellTargetUnit())==false thencall K7O()endifendfunctionfunction K9O takes nothing returns nothingcall SetUnitState(GetEnumUnit(),UNIT_STATE_MANA,GetUnitState(GetEnumUnit(),UNIT_STATE_MANA)+135)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIma\\AImaTarget.mdl",GetEnumUnit(),"origin"))endfunctionfunction KAO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local group g=MDI()set CK=TLIcall GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),25+600,Condition(function BC1))call ForGroup(g,function K9O)call MCI(g)call FlushChildHashtable(XY,(MKI))call MZI(t)set g=nullset TLI=nullset t=nullreturn falseendfunctionfunction KBO takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local group glocal trigger tif GetSpellAbilityId()==1093684023 thenif GetUnitTypeId(TLI)!=1211117642 thenset t=CreateTrigger()call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function KAO))call SaveUnitHandle(XY,(GetHandleId(t)),(2),(TLI))set t=nullelseif GetUnitTypeId(TLI)==1211117642 thencall SetUnitState(TLI,UNIT_STATE_MANA,GetUnitState(TLI,UNIT_STATE_MANA)+25)endifendifset TLI=nullendfunctionfunction KCO takes nothing returns booleanif GetUnitTypeId(GetTriggerUnit())==1697656901 thenreturn falseendifcall HBO()call HNO()call ZGO()call ZTO()call VGO()call VLO()call VSO()call VUO()call W1O()call VMO()call W4O()call W8O()call WEO()call WJO()call WHO()call WUO()call WMO()call EQO()call ERO()call X5O()call X6O()call X9O()call XDO()call XLO()call Y3O()call ZJO()call W3O()call Y5O()call YAO()call Y1O()call XYO()call KBO()call K8O()call K5O()call K3O()call K1O()call YEO()call YJO()call YMO()call YRO()call JUO()call JPO()call JIO()call JTO()call JLO()call JXO()call J7O()call JBO()call JZO()call JCO()if GetSpellAbilityId()==1093815095 and MBI(GetSpellTargetUnit())==false thencall DestroyEffect(AddSpecialEffectTarget("war3mapImported\\LevelerStunFX.mdx",GetSpellTargetUnit(),"head"))endifreturn falseendfunctionfunction KEO takes unit N0I returns nothingcall SetUnitState(N0I,UNIT_STATE_LIFE,GetUnitState(N0I,UNIT_STATE_MAX_LIFE))call SetUnitState(N0I,UNIT_STATE_MANA,GetUnitState(N0I,UNIT_STATE_MAX_MANA))endfunctionfunction KFO takes unit N0I,real x,real y returns nothinglocal integer MKI=GetHandleId(GetOwningPlayer(N0I))local unit ZK1=(LoadUnitHandle(XY,(MKI),(700)))local unit ZL1=(LoadUnitHandle(XY,(MKI),(701)))local unit ZM1=(LoadUnitHandle(XY,(MKI),(702)))local unit ZN1=(LoadUnitHandle(XY,(MKI),(703)))set N90=trueif ZK1!=null thencall ReviveHero(ZK1,x,y,true)call KEO(ZK1)call ZB1(ZK1)call SetUnitX(ZK1,x)call SetUnitY(ZK1,y)endifif ZL1!=null thencall ReviveHero(ZL1,x,y,true)call KEO(ZL1)call ZB1(ZL1)call SetUnitX(ZL1,x)call SetUnitY(ZL1,y)endifif ZM1!=null thencall ReviveHero(ZM1,x,y,true)call KEO(ZM1)call ZB1(ZM1)call SetUnitX(ZM1,x)call SetUnitY(ZM1,y)endifif ZN1!=null thencall ReviveHero(ZN1,x,y,true)call KEO(ZN1)call ZB1(ZN1)call SetUnitX(ZN1,x)call SetUnitY(ZN1,y)endifset ZK1=nullset ZL1=nullset ZM1=nullset ZN1=nullendfunctionfunction KGO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))call KEO(N0I)call ZB1(N0I)call ClearSelectionForPlayer(GetOwningPlayer(N0I))call SelectUnitAddForPlayer(N0I,GetOwningPlayer(N0I))if GetUnitTypeId(N0I)==1211117641 thencall KFO(N0I,GetUnitX(N0I),GetUnitY(N0I))endifcall FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset N0I=nullreturn falseendfunctionfunction KHO takes unit N0I,real x,real y returns nothinglocal integer MKI=GetHandleId(GetOwningPlayer(N0I))local unit ZK1=(LoadUnitHandle(XY,(MKI),(700)))local unit ZL1=(LoadUnitHandle(XY,(MKI),(701)))local unit ZM1=(LoadUnitHandle(XY,(MKI),(702)))local unit ZN1=(LoadUnitHandle(XY,(MKI),(703)))call DisableTrigger(AG)if ZK1!=null thencall SetUnitX(ZK1,x)call SetUnitY(ZK1,y)call KillUnit(ZK1)endifif ZL1!=null thencall SetUnitX(ZL1,x)call SetUnitY(ZL1,y)call KillUnit(ZL1)endifif ZM1!=null thencall SetUnitX(ZM1,x)call SetUnitY(ZM1,y)call KillUnit(ZM1)endifif ZN1!=null thencall SetUnitX(ZN1,x)call SetUnitY(ZN1,y)call KillUnit(ZN1)endifcall EnableTrigger(AG)set ZK1=nullset ZL1=nullset ZM1=nullendfunctionfunction KZO takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local real xlocal real ylocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call E71("AegisOff",GetPlayerId(GetOwningPlayer(N0I)))if GetUnitTypeId(N0I)==1211117641 thencall KHO(N0I,GetUnitX(N0I),GetUnitY(N0I))endifset FE0=nullcall TriggerRegisterTimerEvent(t,5,false)call TriggerAddCondition(t,Condition(function KGO))call SaveUnitHandle(XY,(MKI),(14),(N0I))call MPI(N0I,4304,5)set t=nullset N0I=nullendfunctionfunction KVO takes nothing returns nothingif DH1(GetManipulatedItem())==VG0 thencall KZO()endifendfunctionfunction KWO takes nothing returns nothinglocal unit N3I=GetTriggerUnit()local item IW1=GetManipulatedItem()local integer CN1=DH1(IW1)local integer E01call DisableTrigger(L30)if GetUnitTypeId(N3I)!=1211117642 thenif CN1==ZG0 thenset E01=IV1(N3I,IW1)set VK=GetItemPlayer(GetManipulatedItem())call RemoveItem(IW1)call DisableTrigger(L30)set FK=DQ1(N3I,FK0[ZH0],E01)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==ZH0 thenset E01=IV1(N3I,IW1)set VK=GetItemPlayer(GetManipulatedItem())call RemoveItem(IW1)call DisableTrigger(L30)set FK=DQ1(N3I,FK0[ZZ0],E01)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==ZZ0 thenset E01=IV1(N3I,IW1)set VK=GetItemPlayer(GetManipulatedItem())call RemoveItem(IW1)call DisableTrigger(L30)set FK=DQ1(N3I,FK0[ZG0],E01)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)endifendifcall EnableTrigger(L30)set N3I=nullset IW1=nullendfunctionfunction KXO takes nothing returns nothinglocal unit N3I=GetTriggerUnit()local item IW1=GetManipulatedItem()local integer CN1=DH1(IW1)local integer E01call DisableTrigger(L30)if CN1==ZD0 thenset E01=IV1(N3I,IW1)set VK=GetItemPlayer(GetManipulatedItem())call RemoveItem(IW1)set FK=DQ1(N3I,FK0[ZE0],E01)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==ZE0 thenset E01=IV1(N3I,IW1)set VK=GetItemPlayer(GetManipulatedItem())call RemoveItem(IW1)set FK=DQ1(N3I,FK0[ZD0],E01)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)endifif CN1==HR0 thenset E01=IV1(N3I,IW1)set VK=GetItemPlayer(GetManipulatedItem())call RemoveItem(IW1)set FK=DQ1(N3I,FK0[HP0],E01)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==HP0 thenset E01=IV1(N3I,IW1)set VK=GetItemPlayer(GetManipulatedItem())call RemoveItem(IW1)set FK=DQ1(N3I,FK0[HR0],E01)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)endifif CN1==VU0 thenset E01=IV1(N3I,IW1)set VK=GetItemPlayer(GetManipulatedItem())call RemoveItem(IW1)set FK=DQ1(N3I,FK0[W00],E01)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==W00 thenset E01=IV1(N3I,IW1)set VK=GetItemPlayer(GetManipulatedItem())call RemoveItem(IW1)set FK=DQ1(N3I,FK0[VU0],E01)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)endifcall EnableTrigger(L30)set N3I=nullset IW1=nullendfunctionfunction KYO takes nothing returns nothinglocal unit N3I=GetTriggerUnit()local item IW1=GetManipulatedItem()local integer CN1=DH1(IW1)local integer E01call DisableTrigger(L30)if CN1==WI0 thenset E01=IV1(N3I,IW1)set VK=GetItemPlayer(GetManipulatedItem())call RemoveItem(IW1)set FK=DQ1(N3I,FK0[W10],E01)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==W10 thenset E01=IV1(N3I,IW1)set VK=GetItemPlayer(GetManipulatedItem())call RemoveItem(IW1)set FK=DQ1(N3I,FK0[WI0],E01)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)endifcall EnableTrigger(L30)set N3I=nullset IW1=nullendfunctionfunction KJO takes nothing returns nothinglocal unit N3I=GetTriggerUnit()local item IW1=GetManipulatedItem()local integer CN1=DH1(IW1)local integer E01call DisableTrigger(L30)if CN1==ZP0 and GetItemCharges(IW1)==0 thenset E01=IV1(N3I,IW1)set VK=GetItemPlayer(GetManipulatedItem())call RemoveItem(IW1)set FK=DQ1(N3I,FK0[ZU0],E01)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==ZQ0 and GetItemCharges(IW1)==0 thenset E01=IV1(N3I,IW1)set VK=GetItemPlayer(GetManipulatedItem())call RemoveItem(IW1)set FK=DQ1(N3I,FK0[V00],E01)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)elseif CN1==HJ0 and GetItemCharges(IW1)==0 thenset E01=IV1(N3I,IW1)set VK=GetItemPlayer(GetManipulatedItem())call RemoveItem(IW1)set FK=DQ1(N3I,FK0[HK0],E01)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)endifcall EnableTrigger(L30)set N3I=nullset IW1=nullendfunctionfunction KKO takes nothing returns nothinglocal unit N3I=GetTriggerUnit()local item IW1=GetManipulatedItem()local integer CN1=DH1(IW1)local integer E01call DisableTrigger(L30)if CN1==V90 thenset E01=IV1(N3I,IW1)set VK=GetItemPlayer(GetManipulatedItem())call RemoveItem(IW1)set FK=DQ1(N3I,FK0[VA0],E01)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)call DSO(FK)elseif CN1==VA0 thenset E01=IV1(N3I,IW1)set VK=GetItemPlayer(GetManipulatedItem())call RemoveItem(IW1)set FK=DQ1(N3I,FK0[VB0],E01)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)call DSO(FK)elseif CN1==VB0 thenset E01=IV1(N3I,IW1)set VK=GetItemPlayer(GetManipulatedItem())call RemoveItem(IW1)set FK=DQ1(N3I,FK0[VC0],E01)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)call DSO(FK)elseif CN1==VC0 thenset E01=IV1(N3I,IW1)set VK=GetItemPlayer(GetManipulatedItem())call RemoveItem(IW1)set FK=DQ1(N3I,FK0[VD0],E01)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)call DSO(FK)elseif CN1==VD0 thenset E01=IV1(N3I,IW1)set VK=GetItemPlayer(GetManipulatedItem())call RemoveItem(IW1)set FK=DQ1(N3I,FK0[VE0],E01)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)call DSO(FK)elseif CN1==VE0 thenset E01=IV1(N3I,IW1)set VK=GetItemPlayer(GetManipulatedItem())call RemoveItem(IW1)set FK=DQ1(N3I,FK0[VF0],E01)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)call DSO(FK)endifcall EnableTrigger(L30)set N3I=nullset IW1=nullendfunctionfunction KLO takes nothing returns booleanlocal integer E01local real GZOcall DisableTrigger(L30)if DH1(GetManipulatedItem())==WV0 thenset E01=IV1(GetTriggerUnit(),GetManipulatedItem())set VK=GetItemPlayer(GetManipulatedItem())call RemoveItem(GetManipulatedItem())set FK=DQ1(GetTriggerUnit(),FK0[WZ0],E01)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)endifif DH1(GetManipulatedItem())==WZ0 thenset E01=IV1(GetTriggerUnit(),GetManipulatedItem())set VK=GetItemPlayer(GetManipulatedItem())call RemoveItem(GetManipulatedItem())set FK=DQ1(GetTriggerUnit(),FK0[WV0],E01)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)endifcall EnableTrigger(L30)return falseendfunctionfunction PerseveranceDisassemble takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local player p=GetItemPlayer(GetManipulatedItem())local item D61call DisableTrigger(L30)call RemoveItem(GetManipulatedItem())set D61=UnitAddItemById(N0I,FK0[GS0])call SetItemPlayer(D61,p,false)call SetItemUserData(D61,1)set D61=UnitAddItemById(N0I,FK0[H40])call SetItemPlayer(D61,p,false)call SetItemUserData(D61,1)call EnableTrigger(L30)set N0I=nullset p=nullset D61=nullendfunctionfunction KMO takes nothing returns nothingif GetItemTypeId(GetManipulatedItem())==FK0[ZA0]thencall R1I(GetOwningPlayer(GetTriggerUnit()),GetObjectName(1848657713))endifendfunctionfunction KNO takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if GSO(TLI)thencall DM1(TLI,1227901005)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)call SaveBoolean(XY,(GetHandleId(TLI)),(129),(false))set t=nullset TLI=nullreturn falseendfunctionfunction KSO takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local item IW1=GetManipulatedItem()local integer CN1=DH1(IW1)local trigger tif(CN1==VH0 or CN1==VZ0)and(LoadBoolean(XY,(GetHandleId(TLI)),(129)))==true thenset t=CreateTrigger()call TriggerRegisterTimerEvent(t,0.41,false)call TriggerAddCondition(t,Condition(function KNO))call SaveUnitHandle(XY,(GetHandleId(t)),(2),(TLI))set t=nullendifset TLI=nullset IW1=nullendfunctionfunction KTO takes nothing returns booleanlocal real xlocal real ylocal real acall KXO()call KYO()call KWO()call HFO()call KVO()call KLO()call KMO()call KKO()call KJO()call KSO()return falseendfunctionfunction KPO takes nothing returns booleanreturn GetOwningPlayer(GetTriggerUnit())==DOendfunctionfunction KQO takes nothing returns nothingcall SaveInteger(XY,(400+GetPlayerId(GetOwningPlayer(GetKillingUnit()))),(79),((LoadInteger(XY,(400+GetPlayerId(GetOwningPlayer(GetKillingUnit()))),(79)))+1))endfunctionfunction L0O takes nothing returns nothinglocal location O4O=GetRectCenter(P4)set N0=CreateUnitAtLoc(Player(12),1848651852,O4O,bj_UNIT_FACING)call SetUnitAcquireRange(N0,150)call IRO(N0)call RemoveLocation(O4O)call UnitAddItem(N0,CreateItem(FK0[VG0],0,0))call UnitAddAbility(N0,1093743666)set O4O=GetRectCenter(H4)call RemoveUnit(CreateUnitAtLoc(DO,1966092337,O4O,0))call RemoveLocation(O4O)set O4O=GetRectCenter(Z4)call RemoveUnit(CreateUnitAtLoc(DO,1966092337,O4O,0))call RemoveLocation(O4O)set O4O=GetRectCenter(V4)call RemoveUnit(CreateUnitAtLoc(DO,1966092337,O4O,0))call RemoveLocation(O4O)set O4O=GetRectCenter(W4)call RemoveUnit(CreateUnitAtLoc(DO,1966092337,O4O,0))call RemoveLocation(O4O)set O4O=GetRectCenter(X4)call RemoveUnit(CreateUnitAtLoc(DO,1966092337,O4O,0))call RemoveLocation(O4O)set O4O=GetRectCenter(Y4)call RemoveUnit(CreateUnitAtLoc(DO,1966092337,O4O,0))call RemoveLocation(O4O)set O4O=GetRectCenter(J4)call RemoveUnit(CreateUnitAtLoc(DO,1966092337,O4O,0))call RemoveLocation(O4O)set O4O=GetRectCenter(K4)call RemoveUnit(CreateUnitAtLoc(DO,1966092337,O4O,0))call RemoveLocation(O4O)set O4O=GetRectCenter(L4)call RemoveUnit(CreateUnitAtLoc(DO,1966092337,O4O,0))call RemoveLocation(O4O)set O4O=GetRectCenter(M4)call RemoveUnit(CreateUnitAtLoc(DO,1966092337,O4O,0))call RemoveLocation(O4O)set O4O=GetRectCenter(V5)call RemoveUnit(CreateUnitAtLoc(DO,1966092337,O4O,0))call RemoveLocation(O4O)set O4O=GetRectCenter(X5)call RemoveUnit(CreateUnitAtLoc(DO,1966092337,O4O,0))call RemoveLocation(O4O)endfunctionfunction InitTrig_Spawn_Roshan takes nothing returns nothingcall L0O()endfunctionfunction LIO takes nothing returns booleanif GetOwningPlayer(GetTriggerUnit())==BO[0]thencall IssuePointOrderLoc(GetTriggerUnit(),"attack",U0)elseif GetOwningPlayer(GetTriggerUnit())==CO[0]thencall IssuePointOrderLoc(GetTriggerUnit(),"attack",II)endifreturn falseendfunctionfunction LOO takes nothing returns nothingset SI=SI+1endfunctionfunction L3O takes nothing returns nothingset NI=NI+1endfunctionfunction L5O takes nothing returns booleanif GetOwningPlayer(GetTriggerUnit())==BO[0]thencall IssuePointOrderLoc(GetTriggerUnit(),"attack",BI)endifreturn falseendfunctionfunction L8O takes nothing returns booleanif GetOwningPlayer(GetTriggerUnit())==CO[0]thencall IssuePointOrderLoc(GetTriggerUnit(),"attack",BI)endifreturn falseendfunctionfunction LAO takes nothing returns booleanif GetOwningPlayer(GetTriggerUnit())==BO[0]thencall IssuePointOrderLoc(GetTriggerUnit(),"attack",CI)endifreturn falseendfunctionfunction LCO takes nothing returns booleanif GetOwningPlayer(GetTriggerUnit())==CO[0]thencall IssuePointOrderLoc(GetTriggerUnit(),"attack",CI)endifreturn falseendfunctionfunction LEO takes nothing returns booleanif GetOwningPlayer(GetTriggerUnit())==BO[0]thencall IssuePointOrderLoc(GetTriggerUnit(),"attack",DI)endifreturn falseendfunctionfunction LGO takes nothing returns booleanif GetOwningPlayer(GetTriggerUnit())==CO[0]thencall IssuePointOrderLoc(GetTriggerUnit(),"attack",DI)endifreturn falseendfunctionfunction LZO takes nothing returns nothingcall O41(GetEnumUnit(),1093817905,1,15,1110460466)endfunctionfunction LVO takes nothing returns nothingcall O41(GetEnumUnit(),1093817904,1,15,1110460465)endfunctionfunction LWO takes group g returns nothingif(TimerGetElapsed(M))<7*60 thencall ForGroup(g,function LZO)endifendfunctionfunction LXO takes group g returns nothingif(TimerGetElapsed(M))<7*60 thencall ForGroup(g,function LVO)endifendfunctionfunction LYO takes nothing returns nothinglocal integer i=1local integer idloopexitwhen i>5set id=GetPlayerId(BO[i])call E71("CSK"+I2S(id),A[id])call E71("CSD"+I2S(id),B[id])call E71("NK"+I2S(id),(LoadInteger(XY,(400+id),(79))))set id=GetPlayerId(CO[i])call E71("CSK"+I2S(id),A[id])call E71("CSD"+I2S(id),B[id])call E71("NK"+I2S(id),(LoadInteger(XY,(400+id),(79))))set i=i+1endloopendfunctionfunction LJO takes boolean LKO returns nothinglocal unit ulocal string LLO="stand work alternate"local string LMO="stand work"local string LNO="stand alternate"local string LSO="stand"set u=ID0if QPI(u)==false thenif LKO thencall SetUnitAnimation(u,LLO)elsecall SetUnitAnimation(u,LNO)endifendifset u=IE0if QPI(u)==false thenif LKO thencall SetUnitAnimation(u,LLO)elsecall SetUnitAnimation(u,LNO)endifendifset u=IF0if QPI(u)==false thenif LKO thencall SetUnitAnimation(u,LLO)elsecall SetUnitAnimation(u,LNO)endifendifset u=IG0if QPI(u)==false thenif LKO thencall SetUnitAnimation(u,LLO)elsecall SetUnitAnimation(u,LNO)endifendifset u=IH0if QPI(u)==false thenif LKO thencall SetUnitAnimation(u,LLO)elsecall SetUnitAnimation(u,LNO)endifendifset u=IZ0if QPI(u)==false thenif LKO thencall SetUnitAnimation(u,LLO)elsecall SetUnitAnimation(u,LNO)endifendifset u=C30if QPI(u)==false thenif LKO thencall SetUnitAnimation(u,LMO)elsecall SetUnitAnimation(u,LSO)endifendifset u=C40if QPI(u)==false thenif LKO thencall SetUnitAnimation(u,LMO)elsecall SetUnitAnimation(u,LSO)endifendifset u=C50if QPI(u)==false thenif LKO thencall SetUnitAnimation(u,LMO)elsecall SetUnitAnimation(u,LSO)endifendifset u=C60if QPI(u)==false thenif LKO thencall SetUnitAnimation(u,LMO)elsecall SetUnitAnimation(u,LSO)endifendifset u=C70if QPI(u)==false thenif LKO thencall SetUnitAnimation(u,LMO)elsecall SetUnitAnimation(u,LSO)endifendifset u=C80if QPI(u)==false thenif LKO thencall SetUnitAnimation(u,LMO)elsecall SetUnitAnimation(u,LSO)endifendifendfunctionfunction LTO takes nothing returns booleancall LJO(true)return falseendfunctionfunction Trig_Spawn_Conditions takes nothing returns booleanreturn trueif(I6I)thenreturn I7Iendifif(IBI)thenreturn ICIendifif(E2)thenreturn D2endifif Q80 thenreturn Q90endifif(N2)thenreturn I3endifif(K0)thenreturn RP0endifif(UL0)thenreturn UM0endifif(IN)thenreturn PI0endifreturn O0endfunctionfunction LRO takes group LPO,integer LQO returns nothinglocal unit uloopset u=FirstOfGroup(LPO)exitwhen(u==null)call GroupRemoveUnit(LPO,u)call SetUnitAbilityLevel(u,I2,LQO)endloopendfunctionfunction LUO takes nothing returns nothinglocal boolean M0O=ModuloInteger(GetTriggerExecCount(EG),7)==0if TY0 thenreturnendifcall LJO(false)if M0O thencall LYO()endifif GetTriggerExecCount(EG)==1 and IHI==false thencall UnitResetCooldown(D00[1])call UnitResetCooldown(D00[2])call UnitResetCooldown(D00[3])call UnitResetCooldown(D00[4])call UnitResetCooldown(D00[5])call UnitResetCooldown(D00[7])call UnitResetCooldown(D00[8])call UnitResetCooldown(D00[9])call UnitResetCooldown(D00[10])call UnitResetCooldown(D00[11])call A71(I20,false)call A71(I30,false)call A71(I40,false)call A71(BS0,false)call A71(BT0,false)call A71(BR0,false)elseif GetTriggerExecCount(EG)==1 and IHI==true thencall A71(I30,false)call A71(BT0,false)endifif GetTriggerExecCount(EG)==1 thencall EnableTrigger(EF0)endifif IHI==false and IYI==false thenif(HI)thencall CreateNUnitsAtLoc(NI,1969711215,CO[0],RI,bj_UNIT_FACING)elsecall CreateNUnitsAtLoc(NI,1966092337,CO[0],RI,bj_UNIT_FACING)endifcall LWO(bj_lastCreatedGroup)call LRO(bj_lastCreatedGroup,2)endifif IXI==false thenif(ZI)thencall CreateNUnitsAtLoc(NI,1969711215,CO[0],TI,bj_UNIT_FACING)elsecall CreateNUnitsAtLoc(NI,1966092337,CO[0],TI,bj_UNIT_FACING)endifcall LRO(bj_lastCreatedGroup,3)endifif IHI==false and IVI==false thenif(VI)thencall CreateNUnitsAtLoc(NI,1969711215,CO[0],PI,bj_UNIT_FACING)elsecall CreateNUnitsAtLoc(NI,1966092337,CO[0],PI,bj_UNIT_FACING)endifcall LXO(bj_lastCreatedGroup)call LRO(bj_lastCreatedGroup,4)endifif IHI==false and IYI==false thenif(EI)thencall CreateNUnitsAtLoc(SI,1970169187,CO[0],I1,bj_UNIT_FACING)elsecall CreateNUnitsAtLoc(SI,1966092338,CO[0],I1,bj_UNIT_FACING)endifcall LWO(bj_lastCreatedGroup)call LRO(bj_lastCreatedGroup,2)endifif IXI==false thenif(FI)thencall CreateNUnitsAtLoc(SI,1970169187,CO[0],QI,bj_UNIT_FACING)elsecall CreateNUnitsAtLoc(SI,1966092338,CO[0],QI,bj_UNIT_FACING)endifcall LRO(bj_lastCreatedGroup,3)endifif IHI==false and IVI==false thenif(GI)thencall CreateNUnitsAtLoc(SI,1970169187,CO[0],UI,bj_UNIT_FACING)elsecall CreateNUnitsAtLoc(SI,1966092338,CO[0],UI,bj_UNIT_FACING)endifcall LXO(bj_lastCreatedGroup)call LRO(bj_lastCreatedGroup,4)endifif M0O==true thenif IHI==false and IYI==false thenif(EI)thencall CreateNUnitsAtLoc(SI,1970107511,CO[0],I1,bj_UNIT_FACING)elsecall CreateNUnitsAtLoc(SI,1966092370,CO[0],I1,bj_UNIT_FACING)endifcall LRO(bj_lastCreatedGroup,2)endifif IXI==false thenif(FI)thencall CreateNUnitsAtLoc(SI,1970107511,CO[0],QI,bj_UNIT_FACING)elsecall CreateNUnitsAtLoc(SI,1966092370,CO[0],QI,bj_UNIT_FACING)endifcall LRO(bj_lastCreatedGroup,3)endifif IHI==false and IVI==false thenif(GI)thencall CreateNUnitsAtLoc(SI,1970107511,CO[0],UI,bj_UNIT_FACING)elsecall CreateNUnitsAtLoc(SI,1966092370,CO[0],UI,bj_UNIT_FACING)endifcall LRO(bj_lastCreatedGroup,4)endifendifif IHI==false and IYI==false thenif(JI)thencall CreateNUnitsAtLoc(NI,1702061422,BO[0],B1,bj_UNIT_FACING)elsecall CreateNUnitsAtLoc(NI,1697656918,BO[0],B1,bj_UNIT_FACING)endifcall LXO(bj_lastCreatedGroup)call LRO(bj_lastCreatedGroup,2)endifif IXI==false thenif(KI)thencall CreateNUnitsAtLoc(NI,1702061422,BO[0],O1,bj_UNIT_FACING)elsecall CreateNUnitsAtLoc(NI,1697656918,BO[0],O1,bj_UNIT_FACING)endifcall LRO(bj_lastCreatedGroup,3)endifif IHI==false and IVI==false thenif(LI)thencall CreateNUnitsAtLoc(NI,1702061422,BO[0],A1,bj_UNIT_FACING)elsecall CreateNUnitsAtLoc(NI,1697656918,BO[0],A1,bj_UNIT_FACING)endifcall LWO(bj_lastCreatedGroup)call LRO(bj_lastCreatedGroup,4)endifif IHI==false and IYI==false thenif(WI)thencall CreateNUnitsAtLoc(SI,1701081721,BO[0],E1,bj_UNIT_FACING)elsecall CreateNUnitsAtLoc(SI,1697656919,BO[0],E1,bj_UNIT_FACING)endifcall LXO(bj_lastCreatedGroup)call LRO(bj_lastCreatedGroup,2)endifif IXI==false thenif(XI)thencall CreateNUnitsAtLoc(SI,1701081721,BO[0],C1,bj_UNIT_FACING)elsecall CreateNUnitsAtLoc(SI,1697656919,BO[0],C1,bj_UNIT_FACING)endifcall LRO(bj_lastCreatedGroup,3)endifif IHI==false and IVI==false thenif(YI)thencall CreateNUnitsAtLoc(SI,1701081721,BO[0],D1,bj_UNIT_FACING)elsecall CreateNUnitsAtLoc(SI,1697656919,BO[0],D1,bj_UNIT_FACING)endifcall LWO(bj_lastCreatedGroup)call LRO(bj_lastCreatedGroup,4)endifif M0O==true thenif IHI==false and IYI==false thenif(WI)thencall CreateNUnitsAtLoc(SI,1700946284,BO[0],E1,bj_UNIT_FACING)elsecall CreateNUnitsAtLoc(SI,1697657398,BO[0],E1,bj_UNIT_FACING)endifcall LRO(bj_lastCreatedGroup,2)endifif IXI==false thenif(XI)thencall CreateNUnitsAtLoc(SI,1700946284,BO[0],C1,bj_UNIT_FACING)elsecall CreateNUnitsAtLoc(SI,1697657398,BO[0],C1,bj_UNIT_FACING)endifcall LRO(bj_lastCreatedGroup,3)endifif IHI==false and IVI==false thenif(YI)thencall CreateNUnitsAtLoc(SI,1700946284,BO[0],D1,bj_UNIT_FACING)elsecall CreateNUnitsAtLoc(SI,1697657398,BO[0],D1,bj_UNIT_FACING)endifcall LRO(bj_lastCreatedGroup,4)endifendifendfunctionfunction M1O takes nothing returns nothingset EI=falsecall DisableTrigger(FG)call E71("Rax"+I2S(0)+I2S(0)+I2S(1),GetPlayerId(GetOwningPlayer(GetKillingUnit())))endfunctionfunction M2O takes nothing returns nothingset FI=falsecall DisableTrigger(GG)call E71("Rax"+I2S(0)+I2S(1)+I2S(1),GetPlayerId(GetOwningPlayer(GetKillingUnit())))endfunctionfunction M4O takes nothing returns nothingset GI=falsecall DisableTrigger(HG)call E71("Rax"+I2S(0)+I2S(2)+I2S(1),GetPlayerId(GetOwningPlayer(GetKillingUnit())))endfunctionfunction M6O takes nothing returns nothingset HI=falsecall DisableTrigger(ZG)call E71("Rax"+I2S(0)+I2S(0)+I2S(0),GetPlayerId(GetOwningPlayer(GetKillingUnit())))endfunctionfunction M8O takes nothing returns nothingset ZI=falsecall DisableTrigger(VG)call E71("Rax"+I2S(0)+I2S(1)+I2S(0),GetPlayerId(GetOwningPlayer(GetKillingUnit())))endfunctionfunction MAO takes nothing returns nothingset VI=falsecall DisableTrigger(WG)call E71("Rax"+I2S(0)+I2S(2)+I2S(0),GetPlayerId(GetOwningPlayer(GetKillingUnit())))endfunctionfunction MCO takes nothing returns nothingset WI=falsecall DisableTrigger(XG)call E71("Rax"+I2S(1)+I2S(0)+I2S(1),GetPlayerId(GetOwningPlayer(GetKillingUnit())))endfunctionfunction MEO takes nothing returns nothingset XI=falsecall DisableTrigger(YG)call E71("Rax"+I2S(1)+I2S(1)+I2S(1),GetPlayerId(GetOwningPlayer(GetKillingUnit())))endfunctionfunction MGO takes nothing returns nothingset YI=falsecall DisableTrigger(JG)call E71("Rax"+I2S(1)+I2S(2)+I2S(1),GetPlayerId(GetOwningPlayer(GetKillingUnit())))endfunctionfunction MZO takes nothing returns nothingset JI=falsecall DisableTrigger(KG)call E71("Rax"+I2S(1)+I2S(0)+I2S(0),GetPlayerId(GetOwningPlayer(GetKillingUnit())))endfunctionfunction MWO takes nothing returns nothingset KI=falsecall DisableTrigger(LG)call E71("Rax"+I2S(1)+I2S(1)+I2S(0),GetPlayerId(GetOwningPlayer(GetKillingUnit())))endfunctionfunction MYO takes nothing returns nothingset LI=falsecall DisableTrigger(MG)call E71("Rax"+I2S(1)+I2S(2)+I2S(0),GetPlayerId(GetOwningPlayer(GetKillingUnit())))endfunctionfunction MKO takes nothing returns booleanlocal real MLO=GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)/GetUnitState(GetTriggerUnit(),UNIT_STATE_MAX_LIFE)if MLO<0.75 and NH0==false thenset NH0=truecall E71("Tree",75)endifif MLO<0.50 and NG0==false thenset NG0=truecall E71("Tree",50)endifif MLO<0.25 and NF0==false thenset NF0=truecall E71("Tree",25)endifif MLO<0.10 and NE0==false thenset NE0=truecall E71("Tree",10)endifreturn falseendfunctionfunction MMO takes nothing returns booleanlocal real MLO=GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)/GetUnitState(GetTriggerUnit(),UNIT_STATE_MAX_LIFE)if MLO<0.75 and ND0==false thenset ND0=truecall E71("Throne",75)endifif MLO<0.50 and NC0==false thenset NC0=truecall E71("Throne",50)endifif MLO<0.25 and NB0==false thenset NB0=truecall E71("Throne",25)endifif MLO<0.10 and NA0==false thenset NA0=truecall E71("Throne",10)endifreturn falseendfunctionfunction MSO takes nothing returns booleanif(JI or KI or LI or WI or XI or YI)thenreturn falseendifreturn trueendfunctionfunction MTO takes nothing returns nothingcall PDI(bj_FORCE_ALL_PLAYERS,20.00,GetObjectName(1848652879)+" "+GetObjectName(1848656695))call SetPlayerTechResearchedSwap(1378889796,(GetPlayerTechCountSimple(1378889796,BO[0])+30),BO[0])call SetPlayerTechResearchedSwap(1378889795,(GetPlayerTechCountSimple(1378889795,BO[0])+30),BO[0])call DisableTrigger(NG)endfunctionfunction MPO takes nothing returns booleanif(HI or ZI or VI or EI or FI or GI)thenreturn falseendifreturn trueendfunctionfunction MQO takes nothing returns nothingcall PDI(bj_FORCE_ALL_PLAYERS,20.00,GetObjectName(1848652888)+" "+GetObjectName(1848656697))call SetPlayerTechResearchedSwap(1378889785,(GetPlayerTechCountSimple(1378889785,CO[0])+30),CO[0])call SetPlayerTechResearchedSwap(1378889794,(GetPlayerTechCountSimple(1378889794,CO[0])+30),CO[0])call DisableTrigger(SG)endfunctionfunction N0O takes nothing returns nothingcall SetPlayerTechResearchedSwap(1378889783,(GetPlayerTechCountSimple(1378889783,BO[0])+1),BO[0])call SetPlayerTechResearchedSwap(1378889795,(GetPlayerTechCountSimple(1378889795,BO[0])+1),BO[0])call SetPlayerTechResearchedSwap(1378889784,(GetPlayerTechCountSimple(1378889784,BO[0])+1),BO[0])call SetPlayerTechResearchedSwap(1378889796,(GetPlayerTechCountSimple(1378889796,BO[0])+1),BO[0])call SetPlayerTechResearchedSwap(1378889785,(GetPlayerTechCountSimple(1378889785,CO[0])+1),CO[0])call SetPlayerTechResearchedSwap(1378889779,(GetPlayerTechCountSimple(1378889779,CO[0])+1),CO[0])call SetPlayerTechResearchedSwap(1378889793,(GetPlayerTechCountSimple(1378889793,CO[0])+1),CO[0])call SetPlayerTechResearchedSwap(1378889794,(GetPlayerTechCountSimple(1378889794,CO[0])+1),CO[0])endfunctionfunction N1O takes nothing returns nothinglocal location O4O=GetRectCenter(Y5)call RemoveUnit(CreateUnitAtLoc(DO,1851941999,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1851942003,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1852273524,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1848652342,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1852270450,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1851941995,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1851946861,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1852794733,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1852796263,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1852207203,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1852207221,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1853060200,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1853060204,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1853055348,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1853320295,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1852534636,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1852534626,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1852534644,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1852010091,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1852007790,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1852272243,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1852208226,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1852207976,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1852270641,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1852860012,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1852798821,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1852798818,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1852666477,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1852666482,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1852666476,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1852077170,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1852077175,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1848659011,O4O,bj_UNIT_FACING))call RemoveUnit(CreateUnitAtLoc(DO,1848659012,O4O,bj_UNIT_FACING))call RemoveLocation(O4O)endfunctionfunction N2O takes integer N3O,integer N4O,integer N5O returns integerlocal integer N6O=NZ0[N3O]local integer N7O=GetRandomInt(N4O,N5O)loopexitwhen N6O!=N7Oset N7O=GetRandomInt(N4O,N5O)endloopset NZ0[N3O]=N7Oreturn N7Oendfunctionfunction N8O takes real x,real y returns nothingcall SetUnitPosition(CreateUnit(DO,1848658007,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1848658008,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1848658007,x,y,0),x,y)endfunctionfunction N9O takes real x,real y returns nothingcall SetUnitPosition(CreateUnit(DO,1852466993,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1852466993,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1852467041,x,y,0),x,y)endfunctionfunction NAO takes real x,real y returns nothingcall SetUnitPosition(CreateUnit(DO,1851941999,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1851941999,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1851942003,x,y,0),x,y)endfunctionfunction NBO takes real x,real y returns nothingcall SetUnitPosition(CreateUnit(DO,1851941995,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1851941995,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1851946861,x,y,0),x,y)endfunctionfunction NCO takes real x,real y returns nothingcall SetUnitPosition(CreateUnit(DO,1852273524,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1852273524,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1852270450,x,y,0),x,y)endfunctionfunction AncientLizards_AI takes nothing returns booleancall MZI(GetTriggeringTrigger())call IssueTargetOrder(GetTriggerUnit(),"unholyfrenzy",GetTriggerUnit())return falseendfunctionfunction NDO takes real x,real y returns nothinglocal unit uset u=CreateUnit(DO,1848659011,x,y,0)call SetUnitPosition(u,x,y)call SetUnitPosition(CreateUnit(DO,1848659012,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1848659012,x,y,0),x,y)set u=nullendfunctionfunction NEO takes real x,real y returns nothingcall SetUnitPosition(CreateUnit(DO,1852794733,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1852794733,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1852796263,x,y,0),x,y)endfunctionfunction NFO takes real x,real y returns nothingcall SetUnitPosition(CreateUnit(DO,1852207203,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1852207221,x,y,0),x,y)endfunctionfunction NGO takes real x,real y returns nothingcall SetUnitPosition(CreateUnit(DO,1853060200,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1853060204,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1853055348,x,y,0),x,y)endfunctionfunction NHO takes real x,real y returns nothingcall SetUnitPosition(CreateUnit(DO,1853060204,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1853060204,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1853055348,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1853055348,x,y,0),x,y)endfunctionfunction NZO takes real x,real y returns nothingcall SetUnitPosition(CreateUnit(DO,1853320295,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1853320295,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1848651859,x,y,0),x,y)endfunctionfunction NVO takes real x,real y returns nothingcall SetUnitPosition(CreateUnit(DO,1848652342,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1848652342,x,y,0),x,y)endfunctionfunction NWO takes real x,real y returns nothingcall SetUnitPosition(CreateUnit(DO,1852534636,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1852534626,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1852534626,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1852534626,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1852534644,x,y,0),x,y)endfunctionfunction NXO takes real x,real y returns nothingcall SetUnitPosition(CreateUnit(DO,1852208226,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1852208226,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1852207976,x,y,0),x,y)endfunctionfunction NYO takes real x,real y returns nothingcall SetUnitPosition(CreateUnit(DO,1852007790,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1852010091,x,y,0),x,y)endfunctionfunction NJO takes real x,real y returns nothingcall SetUnitPosition(CreateUnit(DO,1852272243,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1852272243,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1852272243,x,y,0),x,y)endfunctionfunction NKO takes real x,real y returns nothingcall SetUnitPosition(CreateUnit(DO,1852208226,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1852208226,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1852534636,x,y,0),x,y)endfunctionfunction NLO takes real x,real y returns nothingcall SetUnitPosition(CreateUnit(DO,1852270641,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1852860012,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1852860012,x,y,0),x,y)endfunctionfunction NMO takes real x,real y returns nothingcall SetUnitPosition(CreateUnit(DO,1852798821,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1852798818,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1852798818,x,y,0),x,y)endfunctionfunction NNO takes real x,real y returns nothingcall SetUnitPosition(CreateUnit(DO,1852077170,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1852077170,x,y,0),x,y)call SetUnitPosition(CreateUnit(DO,1852077175,x,y,0),x,y)endfunctionfunction NSO takes real x,real y returns nothinglocal integer L9I=N2O(3,1,5)if L9I==1 thencall NFO(x,y)elseif L9I==2 thencall NGO(x,y)elseif L9I==3 thencall NMO(x,y)elseif L9I==4 thencall NNO(x,y)elseif L9I==5 thencall NYO(x,y)endifendfunctionfunction NTO takes real x,real y returns nothinglocal integer L9I=N2O(12,1,5)if L9I==1 thencall NFO(x,y)elseif L9I==2 thencall NGO(x,y)elseif L9I==3 thencall NMO(x,y)elseif L9I==4 thencall NNO(x,y)elseif L9I==5 thencall NYO(x,y)endifendfunctionfunction NRO takes real x,real y returns nothinglocal integer L9I=N2O(4,1,5)if L9I==1 thencall NFO(x,y)elseif L9I==2 thencall NGO(x,y)elseif L9I==3 thencall NMO(x,y)elseif L9I==4 thencall NNO(x,y)elseif L9I==5 thencall NYO(x,y)endifendfunctionfunction NPO takes real x,real y returns nothinglocal integer L9I=N2O(9,1,5)if L9I==1 thencall NFO(x,y)elseif L9I==2 thencall NGO(x,y)elseif L9I==3 thencall NMO(x,y)elseif L9I==4 thencall NNO(x,y)elseif L9I==5 thencall NYO(x,y)endifendfunctionfunction NQO takes real x,real y returns nothinglocal integer L9I=N2O(6,1,6)if L9I==1 thencall NLO(x,y)elseif L9I==2 thencall NKO(x,y)elseif L9I==3 thencall NJO(x,y)elseif L9I==4 thencall NWO(x,y)elseif L9I==5 thencall NXO(x,y)elseif L9I==6 thencall N8O(x,y)endifendfunctionfunction NUO takes real x,real y returns nothinglocal integer L9I=N2O(5,1,6)if L9I==1 thencall NLO(x,y)elseif L9I==2 thencall NKO(x,y)elseif L9I==3 thencall NJO(x,y)elseif L9I==4 thencall NWO(x,y)elseif L9I==5 thencall NXO(x,y)elseif L9I==6 thencall N8O(x,y)endifendfunctionfunction S0O takes real x,real y returns nothinglocal integer L9I=N2O(7,1,5)if L9I==1 thencall NVO(x,y)elseif L9I==2 thencall NEO(x,y)elseif L9I==3 thencall NHO(x,y)elseif L9I==4 thencall NZO(x,y)elseif L9I==5 thencall NYO(x,y)endifendfunctionfunction SIO takes real x,real y returns nothinglocal integer L9I=N2O(8,1,5)if L9I==1 thencall NVO(x,y)elseif L9I==2 thencall NEO(x,y)elseif L9I==3 thencall NHO(x,y)elseif L9I==4 thencall NZO(x,y)elseif L9I==5 thencall NYO(x,y)endifendfunctionfunction S1O takes real x,real y returns nothinglocal integer L9I=N2O(10,1,5)if L9I==1 thencall NVO(x,y)elseif L9I==2 thencall NEO(x,y)elseif L9I==3 thencall NHO(x,y)elseif L9I==4 thencall NZO(x,y)elseif L9I==5 thencall NYO(x,y)endifendfunctionfunction SOO takes real x,real y returns nothinglocal integer L9I=N2O(11,1,5)if L9I==1 thencall NVO(x,y)elseif L9I==2 thencall NEO(x,y)elseif L9I==3 thencall NHO(x,y)elseif L9I==4 thencall NZO(x,y)elseif L9I==5 thencall NYO(x,y)endifendfunctionfunction S2O takes real x,real y returns nothinglocal integer L9I=N2O(1,1,5)if L9I==1 thencall N9O(x,y)elseif L9I==2 thencall NAO(x,y)elseif L9I==3 thencall NBO(x,y)elseif L9I==4 thencall NCO(x,y)elseif L9I==5 thencall NDO(x,y)endifendfunctionfunction S3O takes real x,real y returns nothinglocal integer L9I=N2O(2,1,5)if L9I==1 thencall N9O(x,y)elseif L9I==2 thencall NAO(x,y)elseif L9I==3 thencall NBO(x,y)elseif L9I==4 thencall NCO(x,y)elseif L9I==5 thencall NDO(x,y)endifendfunctionfunction S4O takes nothing returns nothingif GetUnitAbilityLevel(GetEnumUnit(),1093685300)!=0 thencall GroupRemoveUnit(B2,GetEnumUnit())endifif GetUnitTypeId(GetEnumUnit())==1865429043 thencall GroupRemoveUnit(B2,GetEnumUnit())endifif GetUnitTypeId(GetEnumUnit())==1865429336 thencall GroupRemoveUnit(B2,GetEnumUnit())endifif QPI(GetEnumUnit())==true thencall GroupRemoveUnit(B2,GetEnumUnit())endifif T4I(GetEnumUnit())==true thencall GroupRemoveUnit(B2,GetEnumUnit())endifendfunctionfunction S5O takes group g returns booleanset B2=gcall ForGroup(g,function S4O)return FirstOfGroup(g)==nullendfunctionfunction S6O takes nothing returns booleanlocal group glocal rect r1local rect r2if IZI==false thenreturn falseendifset r1=Q4set r2=H4set g=MDI()call GroupEnumUnitsInRect(g,r1,Condition(function LWI))if S5O(g)thencall S2O(GetRectCenterX(r2),GetRectCenterY(r2))endifcall MCI(g)set r1=U4set r2=Z4set g=MDI()call GroupEnumUnitsInRect(g,r1,Condition(function LWI))if S5O(g)thencall S3O(GetRectCenterX(r2),GetRectCenterY(r2))endifcall MCI(g)set r1=I5set r2=V4set g=MDI()call GroupEnumUnitsInRect(g,r1,Condition(function LWI))if S5O(g)thencall NSO(GetRectCenterX(r2),GetRectCenterY(r2))endifcall MCI(g)set r1=O5set r2=W4set g=MDI()call GroupEnumUnitsInRect(g,r1,Condition(function LWI))if S5O(g)thencall NRO(GetRectCenterX(r2),GetRectCenterY(r2))endifcall MCI(g)set r1=A5set r2=X4set g=MDI()call GroupEnumUnitsInRect(g,r1,Condition(function LWI))if S5O(g)thencall NUO(GetRectCenterX(r2),GetRectCenterY(r2))endifcall MCI(g)set r1=B5set r2=Y4set g=MDI()call GroupEnumUnitsInRect(g,r1,Condition(function LWI))if S5O(g)thencall NQO(GetRectCenterX(r2),GetRectCenterY(r2))endifcall MCI(g)set r1=C5set r2=J4set g=MDI()call GroupEnumUnitsInRect(g,r1,Condition(function LWI))if S5O(g)thencall S0O(GetRectCenterX(r2),GetRectCenterY(r2))endifcall MCI(g)set r1=E5set r2=K4set g=MDI()call GroupEnumUnitsInRect(g,r1,Condition(function LWI))if S5O(g)thencall SIO(GetRectCenterX(r2),GetRectCenterY(r2))endifcall MCI(g)set r1=D5set r2=L4set g=MDI()call GroupEnumUnitsInRect(g,r1,Condition(function LWI))if S5O(g)thencall NPO(GetRectCenterX(r2),GetRectCenterY(r2))endifcall MCI(g)set r1=F5set r2=M4set g=MDI()call GroupEnumUnitsInRect(g,r1,Condition(function LWI))if S5O(g)thencall S1O(GetRectCenterX(r2),GetRectCenterY(r2))endifcall MCI(g)set r1=Z5set r2=V5set g=MDI()call GroupEnumUnitsInRect(g,r1,Condition(function LWI))if S5O(g)thencall SOO(GetRectCenterX(r2),GetRectCenterY(r2))endifcall MCI(g)set r1=W5set r2=X5set g=MDI()call GroupEnumUnitsInRect(g,r1,Condition(function LWI))if S5O(g)thencall NTO(GetRectCenterX(r2),GetRectCenterY(r2))endifcall MCI(g)set r1=nullset r2=nullset g=nullreturn falseendfunctionfunction S8O takes nothing returns nothinglocal integer S7I=GetRandomInt(1,9)local location lif IHI thenset S7I=GetRandomInt(1,3)if S7I==1 thenset S7I=2endifif S7I==2 thenset S7I=5endifif S7I==3 thenset S7I=8endifendifif(S7I==1)thenset l=GetRectCenter(TA)call CreateNUnitsAtLoc(1,1848651827,BO[0],l,bj_UNIT_FACING)call PDI(bj_FORCE_ALL_PLAYERS,10.00,GetObjectName(1848653105))call LRO(bj_lastCreatedGroup,4)endifif(S7I==2)thenset l=GetRectCenter(SA)call CreateNUnitsAtLoc(1,1848651827,BO[0],l,bj_UNIT_FACING)call PDI(bj_FORCE_ALL_PLAYERS,10.00,GetObjectName(1848653106))call LRO(bj_lastCreatedGroup,2)endifif(S7I==3)thenset l=GetRectCenter(NA)call CreateNUnitsAtLoc(1,1848651827,BO[0],l,bj_UNIT_FACING)call PDI(bj_FORCE_ALL_PLAYERS,10.00,GetObjectName(1848653107))call LRO(bj_lastCreatedGroup,3)endifif(S7I==4)thenset l=GetRectCenter(TA)call CreateNUnitsAtLoc(1,1848651845,BO[0],l,bj_UNIT_FACING)call PDI(bj_FORCE_ALL_PLAYERS,10.00,GetObjectName(1848653112))call LRO(bj_lastCreatedGroup,4)endifif(S7I==5)thenset l=GetRectCenter(SA)call CreateNUnitsAtLoc(1,1848651845,BO[0],l,bj_UNIT_FACING)call PDI(bj_FORCE_ALL_PLAYERS,10.00,GetObjectName(1848652890))call LRO(bj_lastCreatedGroup,2)endifif(S7I==6)thenset l=GetRectCenter(NA)call CreateNUnitsAtLoc(1,1848651845,BO[0],l,bj_UNIT_FACING)call PDI(bj_FORCE_ALL_PLAYERS,10.00,GetObjectName(1848653111))call LRO(bj_lastCreatedGroup,3)endifif(S7I==7)and IHI==false thenset l=GetRectCenter(TA)call CreateNUnitsAtLoc(1,1848651844,BO[0],l,bj_UNIT_FACING)call PDI(bj_FORCE_ALL_PLAYERS,10.00,GetObjectName(1848653110))call LRO(bj_lastCreatedGroup,4)endifif(S7I==8)and IHI==false thenset l=GetRectCenter(SA)call CreateNUnitsAtLoc(1,1848651844,BO[0],l,bj_UNIT_FACING)call PDI(bj_FORCE_ALL_PLAYERS,10.00,GetObjectName(1848652884))call LRO(bj_lastCreatedGroup,2)endifif(S7I==9)thenset l=GetRectCenter(NA)call CreateNUnitsAtLoc(1,1848651844,BO[0],l,bj_UNIT_FACING)call PDI(bj_FORCE_ALL_PLAYERS,10.00,GetObjectName(1848653123))call LRO(bj_lastCreatedGroup,3)endifif(S7I==1)thenset l=GetRectCenter(LA)call CreateNUnitsAtLoc(1,1848651827,CO[0],l,bj_UNIT_FACING)call PDI(bj_FORCE_ALL_PLAYERS,10.00,GetObjectName(1848656708))call LRO(bj_lastCreatedGroup,4)endifif(S7I==2)thenset l=GetRectCenter(KA)call CreateNUnitsAtLoc(1,1848651827,CO[0],l,bj_UNIT_FACING)call PDI(bj_FORCE_ALL_PLAYERS,10.00,GetObjectName(1848656709))call LRO(bj_lastCreatedGroup,2)endifif(S7I==3)thenset l=GetRectCenter(MA)call CreateNUnitsAtLoc(1,1848651827,CO[0],l,bj_UNIT_FACING)call PDI(bj_FORCE_ALL_PLAYERS,10.00,GetObjectName(1848656707))call LRO(bj_lastCreatedGroup,3)endifif(S7I==4)thenset l=GetRectCenter(LA)call CreateNUnitsAtLoc(1,1848651845,CO[0],l,bj_UNIT_FACING)call PDI(bj_FORCE_ALL_PLAYERS,10.00,GetObjectName(1848656711))call LRO(bj_lastCreatedGroup,4)endifif(S7I==5)thenset l=GetRectCenter(KA)call CreateNUnitsAtLoc(1,1848651845,CO[0],l,bj_UNIT_FACING)call PDI(bj_FORCE_ALL_PLAYERS,10.00,GetObjectName(1848656712))call LRO(bj_lastCreatedGroup,2)endifif(S7I==6)thenset l=GetRectCenter(MA)call CreateNUnitsAtLoc(1,1848651845,CO[0],l,bj_UNIT_FACING)call PDI(bj_FORCE_ALL_PLAYERS,10.00,GetObjectName(1848656710))call LRO(bj_lastCreatedGroup,3)endifif(S7I==7)thenset l=GetRectCenter(LA)call CreateNUnitsAtLoc(1,1848651844,CO[0],l,bj_UNIT_FACING)call PDI(bj_FORCE_ALL_PLAYERS,10.00,GetObjectName(1848656714))call LRO(bj_lastCreatedGroup,4)endifif(S7I==8)thenset l=GetRectCenter(KA)call CreateNUnitsAtLoc(1,1848651844,CO[0],l,bj_UNIT_FACING)call PDI(bj_FORCE_ALL_PLAYERS,10.00,GetObjectName(1848656715))call LRO(bj_lastCreatedGroup,2)endifif(S7I==9)thenset l=GetRectCenter(MA)call CreateNUnitsAtLoc(1,1848651844,CO[0],l,bj_UNIT_FACING)call PDI(bj_FORCE_ALL_PLAYERS,10.00,GetObjectName(1848656713))call LRO(bj_lastCreatedGroup,3)endifendfunctionfunction SAO takes nothing returns nothinglocal integer SIIlocal integer S1Ilocal integer SBOlocal integer SCOlocal integer ilocal player pset NX0=NX0+1set NK0=0set NL0=0set i=0loopexitwhen i>5set p=BO[i]if NKI(p)thenset NK0=NK0+1endifset p=CO[i]if NKI(p)thenset NL0=NL0+1endifset i=i+1endloopif TM==false thenset L1=NK0set M1=NL0endifset SII=1set S1I=5set SBO=1loopexitwhen SII>S1Iset p=BO[SII]if NKI(p)thenset N1[SBO]=pset SBO=SBO+1endifset SII=SII+1endloopset SII=1set S1I=5set SBO=1loopexitwhen SII>S1Iset p=CO[SII]if NKI(p)thenset S1[SBO]=pset SBO=SBO+1endifset SII=SII+1endloopif NX0==1 thenset M0=CreateMultiboardBJ(7+6,3+NL0+NK0," ")call MultiboardMinimize(M0,true)endifcall LLI(M0,2,1,"CD")call LLI(M0,3,1,"|c00838B8BL|r")call LLI(M0,4,1,NM0+"K|r")call LLI(M0,5,1,NS0+"D|r")call LLI(M0,6,1,NT0+"A|r")call LLI(M0,1,2,GetObjectName(1848656971))call LLI(M0,4,2,NM0+"0|r")call LLI(M0,5,2,NS0+"0|r")call LLI(M0,1,3+NK0,GetObjectName(1848656975))call LLI(M0,4,3+NK0,NM0+"0|r")call LLI(M0,5,3+NK0,NS0+"0|r")call M0I(M0,1,2,(SCI(SubString(C0[GetPlayerId((BO[0]))],4,6)))/255.0*100,(SCI(SubString(C0[GetPlayerId((BO[0]))],6,8)))/255.0*100,(SCI(SubString(C0[GetPlayerId((BO[0]))],8,10)))/255.0*100,0)call M0I(M0,1,3+NK0,(SCI(SubString(C0[GetPlayerId((CO[0]))],4,6)))/255.0*100,(SCI(SubString(C0[GetPlayerId((CO[0]))],6,8)))/255.0*100,(SCI(SubString(C0[GetPlayerId((CO[0]))],8,10)))/255.0*100,0)set SII=1set S1I=3+NL0+NK0loopexitwhen SII>S1Icall M3I(M0,1,SII,10.8)call M3I(M0,2,SII,2)call M3I(M0,3,SII,2)call M3I(M0,4,SII,1.3)call M3I(M0,5,SII,1.3)call M3I(M0,6,SII,1.3)call M3I(M0,7,SII,2.5)call M3I(M0,8,SII,0.01)call M3I(M0,9,SII,0.01)call M3I(M0,10,SII,0.01)call M3I(M0,11,SII,0.01)call M3I(M0,12,SII,0.01)call M3I(M0,13,SII,0.01)set SII=SII+1endloopset SII=1set S1I=7+6loopexitwhen SII>S1Iset SBO=1set SCO=3+NL0+NK0loopexitwhen SBO>SCOcall LPI(M0,SII,SBO,true,false)set SBO=SBO+1endloopset SII=SII+1endloopset SII=1set S1I=NK0loopexitwhen SII>S1Icall LPI(M0,1,SII+2,true,true)call M0I(M0,7,SII+2,255,204,0,0)set NV0[GetPlayerId(N1[SII])]=1-1set NW0[GetPlayerId(N1[SII])]=SII+2-1call LLI(M0,1,SII+2,(D30[GetPlayerId((N1[SII]))]))if NYI(N1[SII])thencall M0I(M0,1,SII+2,(SCI(SubString(C0[GetPlayerId((N1[SII]))],4,6)))/255.0*100,(SCI(SubString(C0[GetPlayerId((N1[SII]))],6,8)))/255.0*100,(SCI(SubString(C0[GetPlayerId((N1[SII]))],8,10)))/255.0*100,0)call M0I(M0,2,SII+2,(SCI(SubString(C0[GetPlayerId((N1[SII]))],4,6)))/255.0*100,(SCI(SubString(C0[GetPlayerId((N1[SII]))],6,8)))/255.0*100,(SCI(SubString(C0[GetPlayerId((N1[SII]))],8,10)))/255.0*100,0)elsecall LLI(M0,1,SII+2,"|c00333333"+(D30[GetPlayerId((N1[SII]))])+"|r")endifcall LLI(M0,4,(SII+2),NM0+"0|r")call LLI(M0,5,(SII+2),NS0+"0|r")call LLI(M0,6,(SII+2),NT0+"0|r")set SII=SII+1endloopset SII=1set S1I=NL0loopexitwhen SII>S1Icall LPI(M0,1,SII+3+NK0,true,true)call M0I(M0,7,SII+3+NK0,255,204,0,0)set NV0[GetPlayerId(S1[SII])]=1-1set NW0[GetPlayerId(S1[SII])]=SII+3+NK0-1call LLI(M0,1,SII+3+NK0,(D30[GetPlayerId((S1[SII]))]))if NYI(S1[SII])thencall M0I(M0,1,SII+3+NK0,(SCI(SubString(C0[GetPlayerId((S1[SII]))],4,6)))/255.0*100,(SCI(SubString(C0[GetPlayerId((S1[SII]))],6,8)))/255.0*100,(SCI(SubString(C0[GetPlayerId((S1[SII]))],8,10)))/255.0*100,0)call M0I(M0,2,SII+3+NK0,(SCI(SubString(C0[GetPlayerId((S1[SII]))],4,6)))/255.0*100,(SCI(SubString(C0[GetPlayerId((S1[SII]))],6,8)))/255.0*100,(SCI(SubString(C0[GetPlayerId((S1[SII]))],8,10)))/255.0*100,0)elsecall LLI(M0,1,SII+3+NK0,"|c00333333"+(D30[GetPlayerId((S1[SII]))])+"|r")endifcall LLI(M0,4,(SII+3+NK0),NM0+"0|r")call LLI(M0,5,(SII+3+NK0),NS0+"0|r")call LLI(M0,6,(SII+3+NK0),NT0+"0|r")set SII=SII+1endloopset NY0=1set NJ0=3+NL0+NK0-2if C2 and(GetLocalPlayer()==DO0 or GetLocalPlayer()==D20)and NX0==1 thencall MultiboardDisplay(M0,false)endifcall LPI(M0,7,1,false,true)call LTI(M0,7,1,"UI\\Feedback\\Resources\\ResourceGold.blp")call Q31()if NX0>1 thencall TriggerExecute(UG)endifendfunctionfunction SDO takes nothing returns nothinglocal integer SIIlocal integer S1Icall LLI(M0,4,2,NM0+I2S(I[GetPlayerId(BO[0])])+"|r")call LLI(M0,5,2,NS0+I2S(O[GetPlayerId(BO[0])])+"|r")call LLI(M0,4,3+NK0,NM0+I2S(I[GetPlayerId(CO[0])])+"|r")call LLI(M0,5,3+NK0,NS0+I2S(O[GetPlayerId(CO[0])])+"|r")set SII=1set S1I=NK0loopexitwhen SII>S1Icall LLI(M0,4,(SII+2),NM0+I2S(I[GetPlayerId(N1[SII])])+"|r")call LLI(M0,5,(SII+2),NS0+I2S(O[GetPlayerId(N1[SII])])+"|r")call LLI(M0,6,(SII+2),NT0+I2S(D[GetPlayerId(N1[SII])])+"|r")set SII=SII+1endloopset SII=1set S1I=NL0loopexitwhen SII>S1Icall LLI(M0,4,(SII+3+NK0),NM0+I2S(I[GetPlayerId(S1[SII])])+"|r")call LLI(M0,5,(SII+3+NK0),NS0+I2S(O[GetPlayerId(S1[SII])])+"|r")call LLI(M0,6,(SII+3+NK0),NT0+I2S(D[GetPlayerId(S1[SII])])+"|r")set SII=SII+1endloopendfunctionfunction SFO takes nothing returns booleanif(GetUnitTypeId(GetTriggerUnit())==1697656914)thenreturn trueendifif(GetUnitTypeId(GetTriggerUnit())==1697657137)thenreturn trueendifif(GetUnitTypeId(GetTriggerUnit())==1697656915)thenreturn trueendifif(GetUnitTypeId(GetTriggerUnit())==1697657145)thenreturn trueendifreturn falseendfunctionfunction SGO takes nothing returns nothingset G0[1]=(G0[1]+1)endfunctionfunction SZO takes nothing returns booleanif(GetUnitTypeId(GetTriggerUnit())==1966092365)thenreturn trueendifif(GetUnitTypeId(GetTriggerUnit())==1966092356)thenreturn trueendifif(GetUnitTypeId(GetTriggerUnit())==1966092366)thenreturn trueendifif(GetUnitTypeId(GetTriggerUnit())==1966092372)thenreturn trueendifreturn falseendfunctionfunction SVO takes nothing returns nothingset G0[2]=(G0[2]+1)endfunctionfunction SXO takes integer a returns integerlocal integer i=0local integer x=0local string s=I2S(a)loopexitwhen i>StringLength(s)if SubString(s,i,i+1)=="1"thenset x=x+1endifset i=i+1endloopreturn xendfunctionfunction SYO takes player NJI,integer SJO returns stringif IsPlayerAlly(GetLocalPlayer(),NJI)==true thenreturn DX1(UnitItemInSlot(K1[GetPlayerId(NJI)],SJO-1))elsereturn"UI\\Widgets\\Console\\Undead\\undead-inventory-slotfiller.blp"endifendfunctionfunction SKO takes nothing returns nothinglocal integer SIIlocal integer S1Ilocal string F21local real P1Ilocal string s1=" "local integer rlocal integer ilocal integer array time_1alocal string array color_1alocal integer index_1a=0local integer array time_1blocal string array color_1blocal integer index_1b=0local integer x=0local integer idlocal string SLOlocal string SMOlocal string SNOlocal string SSOlocal string STOlocal string s2=" "local string slocal real SROlocal string spacerlocal integer SPO=0local string SQO=""local string SUO=""local integer T0O=0local integer TIO=0local string T1O=""if M0==null thenreturnendifset i=1loopexitwhen i>5set r=R2I(TimerGetRemaining(F0[GetPlayerId(BO[i])]))if r>0 thenset SPO=SPO+SXO(r)if T0O==0 thenif r<10 thenset SQO=C0[GetPlayerId(BO[i])]+"0"+I2S(r)+" |r"elseset SQO=C0[GetPlayerId(BO[i])]+I2S(r)+" |r"endifelseif r<10 thenset SQO=SQO+NR0+"| |r"+C0[GetPlayerId(BO[i])]+"0"+I2S(r)+" |r"elseset SQO=SQO+NR0+"| |r"+C0[GetPlayerId(BO[i])]+I2S(r)+" |r"endifendifset T0O=T0O+1endifset i=i+1endloopif T0O>0 thenif IsPlayerAlly(GetLocalPlayer(),BO[0])==true thenset SQO=NR0+"["+GetObjectName(1848658515)+" |r"+SQO+NR0+"]|r"elseset SQO=NN0+"["+GetObjectName(1848658514)+" |r"+SQO+NN0+"]|r"endifendifset i=1loopexitwhen i>5set r=R2I(TimerGetRemaining(F0[GetPlayerId(CO[i])]))if r>0 thenset SPO=SPO+SXO(r)if TIO==0 thenif r<10 thenset SUO=C0[GetPlayerId(CO[i])]+"0"+I2S(r)+" |r"elseset SUO=C0[GetPlayerId(CO[i])]+I2S(r)+" |r"endifelseif r<10 thenset SUO=SUO+NR0+"| |r"+C0[GetPlayerId(CO[i])]+"0"+I2S(r)+" |r"elseset SUO=SUO+NR0+"| |r"+C0[GetPlayerId(CO[i])]+I2S(r)+" |r"endifendifset TIO=TIO+1endifset i=i+1endloopif TIO>0 thenif IsPlayerAlly(GetLocalPlayer(),CO[0])==true thenset SUO=NR0+"["+GetObjectName(1848658515)+" |r"+SUO+NR0+"]|r"elseset SUO=NN0+"["+GetObjectName(1848658514)+" |r"+SUO+NN0+"]|r"endifendifif M0!=null thenset id=GetPlayerId(GetLocalPlayer())if id>=0 and id<16 thenif BM[x]thenset SLO=I2S(I[id])set SMO=I2S(O[id])set SNO=I2S(D[id])set SSO=I2S(A[id])set STO=I2S(B[id])set s2=" |c00838B8B("+SLO+"/"+SMO+"/"+SNO+" - "+SSO+"/"+STO+" - |r|c00FFDC00"+I2S(EW0[id])+"|r |c00838B8B)|r"endifendifendifif TIO==0 and T0O==0 thencall MultiboardSetTitleText(M0,s2)elseif IsPlayerAlly(GetLocalPlayer(),BO[0])==true thencall MultiboardSetTitleText(M0,SUO+" "+SQO+" "+s2)elsecall MultiboardSetTitleText(M0,SQO+" "+SUO+" "+s2)endifendifif(C2 and(GetLocalPlayer()==DO0 or GetLocalPlayer()==D20))==false thencall MultiboardDisplay(M0,true)endifif RH0[GetPlayerId(GetLocalPlayer())]==false thencall SetWaterBaseColor(0,0,255,255)endifset SII=1set S1I=NK0loopexitwhen SII>S1Icall LTI(M0,1,SII+2,MTI(K1[GetPlayerId(N1[SII])]))call LLI(M0,3,SII+2,"|c00838B8B"+I2S(GetHeroLevel(K1[GetPlayerId(N1[SII])]))+"|r")if RB0[GetPlayerId(GetLocalPlayer())]thencall M3I(M0,7,1,3)call M3I(M0,8,1,2.8)call M3I(M0,9,1,0.8)call M3I(M0,10,1,0.8)call M3I(M0,11,1,0.8)call M3I(M0,12,1,0.8)call M3I(M0,13,1,0.1)call M3I(M0,7,SII+2,3)call M3I(M0,8,SII+2,1.1)call M3I(M0,9,SII+2,1.1)call M3I(M0,10,SII+2,1.1)call M3I(M0,11,SII+2,1.1)call M3I(M0,12,SII+2,1.1)call M3I(M0,13,SII+2,0.1)call LPI(M0,8,SII+2,false,true)call LPI(M0,9,SII+2,false,true)call LPI(M0,10,SII+2,false,true)call LPI(M0,11,SII+2,false,true)call LPI(M0,12,SII+2,false,true)call LPI(M0,13,SII+2,false,true)call LLI(M0,8,1,"Items")elsecall M3I(M0,7,1,2)call M3I(M0,8,1,0.1)call M3I(M0,9,1,0.1)call M3I(M0,10,1,0.1)call M3I(M0,11,1,0.1)call M3I(M0,12,1,0.1)call M3I(M0,13,1,0.1)call M3I(M0,7,SII+2,2.5)call M3I(M0,8,SII+2,0.1)call M3I(M0,9,SII+2,0.1)call M3I(M0,10,SII+2,0.1)call M3I(M0,11,SII+2,0.1)call M3I(M0,12,SII+2,0.1)call M3I(M0,13,SII+2,0.1)call LPI(M0,8,SII+2,false,false)call LPI(M0,9,SII+2,false,false)call LPI(M0,10,SII+2,false,false)call LPI(M0,11,SII+2,false,false)call LPI(M0,12,SII+2,false,false)call LPI(M0,13,SII+2,false,false)call LLI(M0,8,1," ")endifcall LTI(M0,8,SII+2,SYO(N1[SII],1))call LTI(M0,9,SII+2,SYO(N1[SII],2))call LTI(M0,10,SII+2,SYO(N1[SII],3))call LTI(M0,11,SII+2,SYO(N1[SII],4))call LTI(M0,12,SII+2,SYO(N1[SII],5))call LTI(M0,13,SII+2,SYO(N1[SII],6))if(N2I(K1[GetPlayerId(N1[SII])])and K1[GetPlayerId(N1[SII])]!=null and TimerGetRemaining(F0[GetPlayerId(N1[SII])])>0)thenif IsPlayerAlly(GetLocalPlayer(),N1[SII])thenset T1O=NR0+" ("+(I2S(R2I(TimerGetRemaining(F0[GetPlayerId(N1[SII])]))))+")|r"elseset T1O=NN0+" ("+(I2S(R2I(TimerGetRemaining(F0[GetPlayerId(N1[SII])]))))+")|r"endifelseset T1O="  "endifif EA0[GetPlayerId(N1[SII])]thencall LLI(M0,1,SII+2,"|c00333333"+(D30[GetPlayerId((N1[SII]))])+"|r"+T1O)elsecall LLI(M0,1,SII+2,(D30[GetPlayerId((N1[SII]))])+T1O)endifset SRO=(TimerGetRemaining(EZ0[GetPlayerId((N1[SII]))]))if SRO>0 thenset s=I2S(R2I(SRO))elseset s=" "endifif IsPlayerAlly(GetLocalPlayer(),N1[SII])==false thencall LLI(M0,7,SII+2," ")set s=" "elsecall LLI(M0,7,SII+2,"|cffffcc00"+I2S(R2I(GetPlayerState(N1[SII],PLAYER_STATE_RESOURCE_GOLD)))+"|r")endifcall LLI(M0,2,SII+2,s)set SII=SII+1endloopset SII=1set S1I=NL0loopexitwhen SII>S1Icall LTI(M0,1,SII+3+NK0,MTI(K1[GetPlayerId(S1[SII])]))call LLI(M0,3,SII+3+NK0,"|c00838B8B"+I2S(GetHeroLevel(K1[GetPlayerId(S1[SII])]))+"|r")if RB0[GetPlayerId(GetLocalPlayer())]thencall M3I(M0,7,1,3)call M3I(M0,8,1,2.8)call M3I(M0,9,1,0.8)call M3I(M0,10,1,0.8)call M3I(M0,11,1,0.8)call M3I(M0,12,1,0.8)call M3I(M0,13,1,0.1)call M3I(M0,7,SII+3+NK0,3)call M3I(M0,8,SII+3+NK0,1.1)call M3I(M0,9,SII+3+NK0,1.1)call M3I(M0,10,SII+3+NK0,1.1)call M3I(M0,11,SII+3+NK0,1.1)call M3I(M0,12,SII+3+NK0,1.1)call M3I(M0,13,SII+3+NK0,0.1)call LPI(M0,8,SII+3+NK0,false,true)call LPI(M0,9,SII+3+NK0,false,true)call LPI(M0,10,SII+3+NK0,false,true)call LPI(M0,11,SII+3+NK0,false,true)call LPI(M0,12,SII+3+NK0,false,true)call LPI(M0,13,SII+3+NK0,false,true)call LLI(M0,8,1,"Items")elsecall M3I(M0,7,1,2)call M3I(M0,8,1,0.1)call M3I(M0,9,1,0.1)call M3I(M0,10,1,0.1)call M3I(M0,11,1,0.1)call M3I(M0,12,1,0.1)call M3I(M0,13,1,0.1)call M3I(M0,7,SII+3+NK0,2.5)call M3I(M0,8,SII+3+NK0,0.1)call M3I(M0,9,SII+3+NK0,0.1)call M3I(M0,10,SII+3+NK0,0.1)call M3I(M0,11,SII+3+NK0,0.1)call M3I(M0,12,SII+3+NK0,0.1)call M3I(M0,13,SII+3+NK0,0.1)call LPI(M0,8,SII+3+NK0,false,false)call LPI(M0,9,SII+3+NK0,false,false)call LPI(M0,10,SII+3+NK0,false,false)call LPI(M0,11,SII+3+NK0,false,false)call LPI(M0,12,SII+3+NK0,false,false)call LPI(M0,13,SII+3+NK0,false,false)call LLI(M0,8,1," ")endifcall LTI(M0,8,SII+3+NK0,SYO(S1[SII],1))call LTI(M0,9,SII+3+NK0,SYO(S1[SII],2))call LTI(M0,10,SII+3+NK0,SYO(S1[SII],3))call LTI(M0,11,SII+3+NK0,SYO(S1[SII],4))call LTI(M0,12,SII+3+NK0,SYO(S1[SII],5))call LTI(M0,13,SII+3+NK0,SYO(S1[SII],6))if(N2I(K1[GetPlayerId(S1[SII])])and K1[GetPlayerId(S1[SII])]!=null and TimerGetRemaining(F0[GetPlayerId(S1[SII])])>0)thenif IsPlayerAlly(GetLocalPlayer(),S1[SII])thenset T1O=NR0+" ("+(I2S(R2I(TimerGetRemaining(F0[GetPlayerId(S1[SII])]))))+")|r"elseset T1O=NN0+" ("+(I2S(R2I(TimerGetRemaining(F0[GetPlayerId(S1[SII])]))))+")|r"endifelseset T1O="  "endifif EA0[GetPlayerId(S1[SII])]thencall LLI(M0,1,SII+3+NK0,"|c00333333"+(D30[GetPlayerId((S1[SII]))])+"|r"+T1O)elsecall LLI(M0,1,SII+3+NK0,(D30[GetPlayerId((S1[SII]))])+T1O)endifset SRO=(TimerGetRemaining(EZ0[GetPlayerId((S1[SII]))]))if SRO>0 thenset s=I2S(R2I(SRO))elseset s=" "endifif IsPlayerAlly(GetLocalPlayer(),S1[SII])==false thencall LLI(M0,7,SII+3+NK0," ")set s=" "elsecall LLI(M0,7,SII+3+NK0,"|cffffcc00"+I2S(R2I(GetPlayerState(S1[SII],PLAYER_STATE_RESOURCE_GOLD)))+"|r")endifcall LLI(M0,2,SII+3+NK0,s)set SII=SII+1endloopendfunctionfunction Trig_CS_Board_Actions takes nothing returns nothingset GO[GetPlayerId(BO[1])]=CreateLeaderboard()set GO[GetPlayerId(BO[2])]=CreateLeaderboard()set GO[GetPlayerId(BO[3])]=CreateLeaderboard()set GO[GetPlayerId(BO[4])]=CreateLeaderboard()set GO[GetPlayerId(BO[5])]=CreateLeaderboard()set GO[GetPlayerId(CO[1])]=CreateLeaderboard()set GO[GetPlayerId(CO[2])]=CreateLeaderboard()set GO[GetPlayerId(CO[3])]=CreateLeaderboard()set GO[GetPlayerId(CO[4])]=CreateLeaderboard()set GO[GetPlayerId(CO[5])]=CreateLeaderboard()call PlayerSetLeaderboard(BO[1],GO[GetPlayerId(BO[1])])call PlayerSetLeaderboard(BO[2],GO[GetPlayerId(BO[2])])call PlayerSetLeaderboard(BO[3],GO[GetPlayerId(BO[3])])call PlayerSetLeaderboard(BO[4],GO[GetPlayerId(BO[4])])call PlayerSetLeaderboard(BO[5],GO[GetPlayerId(BO[5])])call PlayerSetLeaderboard(CO[1],GO[GetPlayerId(CO[1])])call PlayerSetLeaderboard(CO[2],GO[GetPlayerId(CO[2])])call PlayerSetLeaderboard(CO[3],GO[GetPlayerId(CO[3])])call PlayerSetLeaderboard(CO[4],GO[GetPlayerId(CO[4])])call PlayerSetLeaderboard(CO[5],GO[GetPlayerId(CO[5])])call LeaderboardDisplay(GO[GetPlayerId(BO[1])],false)call LeaderboardDisplay(GO[GetPlayerId(BO[2])],false)call LeaderboardDisplay(GO[GetPlayerId(BO[3])],false)call LeaderboardDisplay(GO[GetPlayerId(BO[4])],false)call LeaderboardDisplay(GO[GetPlayerId(BO[5])],false)call LeaderboardDisplay(GO[GetPlayerId(CO[1])],false)call LeaderboardDisplay(GO[GetPlayerId(CO[2])],false)call LeaderboardDisplay(GO[GetPlayerId(CO[3])],false)call LeaderboardDisplay(GO[GetPlayerId(CO[4])],false)call LeaderboardDisplay(GO[GetPlayerId(CO[5])],false)call LeaderboardSetLabelBJ(GO[GetPlayerId(BO[1])],"Creep Kills: 0 Denies: 0")call LeaderboardSetLabelBJ(GO[GetPlayerId(BO[2])],"Creep Kills: 0 Denies: 0")call LeaderboardSetLabelBJ(GO[GetPlayerId(BO[3])],"Creep Kills: 0 Denies: 0")call LeaderboardSetLabelBJ(GO[GetPlayerId(BO[4])],"Creep Kills: 0 Denies: 0")call LeaderboardSetLabelBJ(GO[GetPlayerId(BO[5])],"Creep Kills: 0 Denies: 0")call LeaderboardSetLabelBJ(GO[GetPlayerId(CO[1])],"Creep Kills: 0 Denies: 0")call LeaderboardSetLabelBJ(GO[GetPlayerId(CO[2])],"Creep Kills: 0 Denies: 0")call LeaderboardSetLabelBJ(GO[GetPlayerId(CO[3])],"Creep Kills: 0 Denies: 0")call LeaderboardSetLabelBJ(GO[GetPlayerId(CO[4])],"Creep Kills: 0 Denies: 0")call LeaderboardSetLabelBJ(GO[GetPlayerId(CO[5])],"Creep Kills: 0 Denies: 0")endfunctionfunction EndScore_GameMode takes nothing returns stringreturn ALendfunctionfunction EndScore_GetWinner takes nothing returns stringreturn J3endfunctionfunction T3O takes player NJI returns stringreturn C0[GetPlayerId(NJI)]+(D30[GetPlayerId((NJI))])+"|r"endfunctionfunction T4O takes player NJI returns stringlocal string T5O=I2S(F50[GetPlayerId(NJI)])local string T6O=T5Oif NJI==GetLocalPlayer()thenset T6O=S10+T5O+"|r"endifreturn T6Oendfunctionfunction T7O takes player NJI returns stringlocal string T5O=I2S(F40[GetPlayerId(NJI)])local string T6O=T5Oif NJI==GetLocalPlayer()thenset T6O=S10+T5O+"|r"endifreturn T6Oendfunctionfunction Z91 takes nothing returns nothinglocal integer i=1local multiboarditem LSIloopexitwhen i>SI0if(K3[GetPlayerId((S00[i]))])!="Here"thenset LSI=MultiboardGetItem(NP0,NQ0[i],NU0[i])call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,"|c00555555"+(K3[GetPlayerId((S00[i]))])+"|r")call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)endifset i=i+1endloopendfunctionfunction T8O takes player NJI returns stringlocal string T5O=I2S(GetPlayerState(NJI,PLAYER_STATE_RESOURCE_GOLD))local string T6O=T5Oif NJI==GetLocalPlayer()thenset T6O=S10+T5O+"|r"endifreturn T6Oendfunctionfunction T9O takes player NJI returns stringlocal string T5O=I2S(E[GetPlayerId(NJI)])local string T6O=T5Oif NJI==GetLocalPlayer()thenset T6O=S10+T5O+"|r"endifreturn T6Oendfunctionfunction TAO takes player NJI returns stringlocal string T5O=I2S(GetUnitLevel(K1[GetPlayerId(NJI)]))local string T6O=T5Oif NJI==GetLocalPlayer()thenset T6O=S10+T5O+"|r"endifreturn T6Oendfunctionfunction TBO takes player NJI returns stringlocal string T5O=I2S(F[GetPlayerId(NJI)])local string T6O=T5Oif NJI==GetLocalPlayer()thenset T6O=S10+T5O+"|r"endifreturn T6Oendfunctionfunction TCO takes player NJI returns stringlocal string T5O=I2S(Y[GetPlayerId(NJI)])local string T6O=T5Oif NJI==GetLocalPlayer()thenset T6O=S10+T5O+"|r"endifreturn T6Oendfunctionfunction TDO takes player NJI returns stringlocal string T5O=I2S(G[GetPlayerId(NJI)])local string T6O=T5Oif NJI==GetLocalPlayer()thenset T6O=S10+T5O+"|r"endifreturn T6Oendfunctionfunction TEO takes player NJI returns stringlocal string T5O=I2S(D[GetPlayerId(NJI)])local string T6O=T5Oif NJI==GetLocalPlayer()thenset T6O=S10+T5O+"|r"endifreturn T6Oendfunctionfunction TFO takes player NJI returns stringlocal string T5O=I2S(I[GetPlayerId(NJI)])local string T6O=T5Oif NJI==GetLocalPlayer()thenset T6O=S10+T5O+"|r"endifreturn T6Oendfunctionfunction TGO takes player NJI returns stringlocal string T5O=I2S(O[GetPlayerId(NJI)])local string T6O=T5Oif NJI==GetLocalPlayer()thenset T6O=S10+T5O+"|r"endifreturn T6Oendfunctionfunction THO takes player NJI returns stringlocal string T5O=I2S(A[GetPlayerId(NJI)])local string T6O=T5Oif NJI==GetLocalPlayer()thenset T6O=S10+T5O+"|r"endifreturn T6Oendfunctionfunction TZO takes player NJI returns stringlocal string T5O=I2S(B[GetPlayerId(NJI)])local string T6O=T5Oif NJI==GetLocalPlayer()thenset T6O=S10+T5O+"|r"endifreturn T6Oendfunctionfunction TVO takes player NJI returns stringlocal string T5O=I2S((LoadInteger(XY,(400+GetPlayerId(NJI)),(79))))local string T6O=T5Oif NJI==GetLocalPlayer()thenset T6O=S10+T5O+"|r"endifreturn T6Oendfunctionfunction TWO takes player NJI returns stringlocal string T5O=I2S(Z[GetPlayerId(NJI)])local string T6O=T5Oif NJI==GetLocalPlayer()thenset T6O=S10+T5O+"|r"endifreturn T6Oendfunctionfunction TXO takes player NJI returns stringlocal string T5O=I2S(V[GetPlayerId(NJI)])local string T6O=T5Oif NJI==GetLocalPlayer()thenset T6O=S10+T5O+"|r"endifreturn T6Oendfunctionfunction TYO takes player NJI returns stringlocal string T5O=I2S(H[GetPlayerId(NJI)])local string T6O=T5Oif NJI==GetLocalPlayer()thenset T6O=S10+T5O+"|r"endifreturn T6Oendfunctionfunction TJO takes player NJI returns stringlocal string TKOlocal string TLOlocal string T6Olocal integer k=J[GetPlayerId(NJI)]local integer d=X[GetPlayerId(NJI)]if k<1 thenset k=0endifif d<1 thenset d=0endifset TKO=I2S(k)set TLO=I2S(d)set T6O=TKO+"/"+TLOif NJI==GetLocalPlayer()thenset T6O=S10+TKO+"|r/"+S10+TLO+"|r"endifreturn T6Oendfunctionfunction TMO takes player NJI returns stringlocal integer TNO=W[GetPlayerId(NJI)]local string F21local integer A41local integer A51set A41=(TNO/60)-(1/2)set A51=ModuloInteger(TNO,60)if(A51<10)thenset F21=I2S(A41)+":0"+I2S(A51)elseset F21=I2S(A41)+":"+I2S(A51)endifif NJI==GetLocalPlayer()thenset F21=S10+F21+"|r"endifreturn F21endfunctionfunction TSO takes player TLI,player TMI returns stringlocal string TKOlocal string TLOlocal string T6Olocal integer k=(LoadInteger(XY,(400+GetPlayerId(TLI)),(450+GetPlayerId(TMI))))local integer d=(LoadInteger(XY,(400+GetPlayerId(TLI)),(500+GetPlayerId(TMI))))if k<1 thenset k=0endifif d<1 thenset d=0endifset TKO=I2S(k)set TLO=I2S(d)set T6O=TKO+"/"+TLOif TLI==GetLocalPlayer()thenset T6O=S10+TKO+"|r/"+S10+TLO+"|r"endifreturn T6Oendfunctionfunction EndScore_AllKD takes nothing returns stringreturn"|c00ff0303"+I2S(I[GetPlayerId(BO[0])])+"|r/|c0020c000"+I2S(O[GetPlayerId(BO[0])])+"|r"endfunctionfunction TTO takes nothing returns nothinglocal integer TRO=NK0local integer TPO=NL0local player array TQOlocal player array TUOlocal integer R0Olocal integer RIOlocal integer R1O=21+RTI(TRO,TPO)+1local integer ROO=1+(TRO+TPO)*2local multiboarditem LSIlocal integer ilocal integer xlocal integer curRow1local integer curRow2local string e="|r"local string c0="|cff99ccff"local integer R2Olocal integer R3Ocall DisableTrigger(BH)call DestroyMultiboard(M0)if TRO>0 and TPO>0 thenset R1O=R1O+2endifset NP0=CreateMultiboard()call MultiboardSetItemsWidth(NP0,0)call MultiboardSetRowCount(NP0,R1O)call MultiboardSetColumnCount(NP0,ROO)call MultiboardSetTitleText(NP0,GetObjectName(1848657203)+" "+" - "+(AL))call MultiboardMinimize(NP0,true)call MultiboardSetItemsStyle(NP0,false,false)call MultiboardDisplay(NP0,true)call MultiboardMinimize(NP0,false)call MultiboardSetTitleText(NP0,GetObjectName(1848657203)+" "+" - "+(AL)+" - "+("|c00ff0303"+I2S(I[GetPlayerId(BO[0])])+"|r/|c0020c000"+I2S(O[GetPlayerId(BO[0])])+"|r"))set x=1set i=1loopexitwhen i>5if NYI(BO[i])or GetPlayerSlotState(BO[i])==PLAYER_SLOT_STATE_LEFT thenset TQO[x]=BO[i]set x=x+1endifset i=i+1endloopset x=1set i=1loopexitwhen i>5if NYI(CO[i])or GetPlayerSlotState(CO[i])==PLAYER_SLOT_STATE_LEFT thenset TUO[x]=CO[i]set x=x+1endifset i=i+1endloopset i=0set RIO=0loopexitwhen i>R1Oset LSI=MultiboardGetItem(NP0,i,RIO)call MultiboardSetItemWidth(LSI,0.075)call MultiboardReleaseItem(LSI)set i=i+1endloopset R0O=0set RIO=0set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI," ")call MultiboardReleaseItem(LSI)set RIO=0set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,false)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,T3O(TQO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,T3O(TUO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset R0O=R0O+1set RIO=0set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,false)call MultiboardReleaseItem(LSI)set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,true)call MultiboardSetItemValue(LSI,TAO(TQO[i]))call MultiboardSetItemIcon(LSI,(MTI(K1[GetPlayerId((TQO[i]))])))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,true)call MultiboardSetItemValue(LSI,TAO(TUO[i]))call MultiboardSetItemIcon(LSI,(MTI(K1[GetPlayerId((TUO[i]))])))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset R0O=R0O+1set RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848657218)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,(DX1(UnitItemInSlot(K1[GetPlayerId((TQO[i]))],(1)-1))))call MultiboardSetItemWidth(LSI,0.015)call MultiboardReleaseItem(LSI)set RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,(DX1(UnitItemInSlot(K1[GetPlayerId((TQO[i]))],(2)-1))))call MultiboardSetItemWidth(LSI,0.054)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,(DX1(UnitItemInSlot(K1[GetPlayerId((TUO[i]))],(1)-1))))call MultiboardSetItemWidth(LSI,0.015)call MultiboardReleaseItem(LSI)set RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,(DX1(UnitItemInSlot(K1[GetPlayerId((TUO[i]))],(2)-1))))call MultiboardSetItemWidth(LSI,0.054)call MultiboardReleaseItem(LSI)set i=i+1endloopset R0O=R0O+1set RIO=0set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+" "+e)call MultiboardReleaseItem(LSI)set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,(DX1(UnitItemInSlot(K1[GetPlayerId((TQO[i]))],(3)-1))))call MultiboardSetItemWidth(LSI,0.015)call MultiboardReleaseItem(LSI)set RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,(DX1(UnitItemInSlot(K1[GetPlayerId((TQO[i]))],(4)-1))))call MultiboardSetItemWidth(LSI,0.054)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,(DX1(UnitItemInSlot(K1[GetPlayerId((TUO[i]))],(3)-1))))call MultiboardSetItemWidth(LSI,0.015)call MultiboardReleaseItem(LSI)set RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,(DX1(UnitItemInSlot(K1[GetPlayerId((TUO[i]))],(4)-1))))call MultiboardSetItemWidth(LSI,0.054)call MultiboardReleaseItem(LSI)set i=i+1endloopset R0O=R0O+1set RIO=0set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+" "+e)call MultiboardReleaseItem(LSI)set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,(DX1(UnitItemInSlot(K1[GetPlayerId((TQO[i]))],(5)-1))))call MultiboardSetItemWidth(LSI,0.015)call MultiboardReleaseItem(LSI)set RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,(DX1(UnitItemInSlot(K1[GetPlayerId((TQO[i]))],(6)-1))))call MultiboardSetItemWidth(LSI,0.054)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,(DX1(UnitItemInSlot(K1[GetPlayerId((TUO[i]))],(5)-1))))call MultiboardSetItemWidth(LSI,0.015)call MultiboardReleaseItem(LSI)set RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,(DX1(UnitItemInSlot(K1[GetPlayerId((TUO[i]))],(6)-1))))call MultiboardSetItemWidth(LSI,0.054)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848657202)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,T8O(TQO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,T8O(TUO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848657201)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,TFO(TQO[i])+"/"+TGO(TQO[i])+"/"+TEO(TQO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,TFO(TUO[i])+"/"+TGO(TUO[i])+"/"+TEO(TUO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848656986)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,THO(TQO[i])+"/"+TZO(TQO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,THO(TUO[i])+"/"+TZO(TUO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848658517)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,T4O(TQO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,T4O(TUO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848658758)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,T7O(TQO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,T7O(TUO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848657200)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,TBO(TQO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,TBO(TUO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848656980)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,TJO(TQO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,TJO(TUO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848656985)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,TVO(TQO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,TVO(TUO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848656981)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,TCO(TQO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,TCO(TUO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848656982)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,TMO(TQO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,TMO(TUO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848656983)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,TDO(TQO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,TDO(TUO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848656974)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,T9O(TQO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,T9O(TUO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848656952)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,TWO(TQO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,TWO(TUO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848656969)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,TXO(TQO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,TXO(TUO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848656973)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,TYO(TQO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,TYO(TUO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopif TRO>0 and TPO>0 thenset RIO=0set R2O=R0Oset R3O=RIOset R0O=R0O+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848656972)+e)call MultiboardReleaseItem(LSI)set R0O=R2Oset x=1loopexitwhen x>TROset RIO=0set R0O=R2Oset i=1loopexitwhen i>TPOset RIO=x+(x-1)set R0O=R0O+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,(MTI(K1[GetPlayerId((TQO[x]))])))call MultiboardSetItemWidth(LSI,0.01)call MultiboardReleaseItem(LSI)set RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,true)call MultiboardSetItemIcon(LSI,(MTI(K1[GetPlayerId((TUO[i]))])))call MultiboardSetItemValue(LSI," "+TSO(TQO[x],TUO[i]))call MultiboardSetItemWidth(LSI,0.059)call MultiboardReleaseItem(LSI)set i=i+1endloopset x=x+1endloopset x=TRO+1loopexitwhen x>(TPO+TRO)set RIO=0set R0O=R2Oset i=1loopexitwhen i>TROset RIO=x+(x-1)set R0O=R0O+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,(MTI(K1[GetPlayerId((TUO[x-TRO]))])))call MultiboardSetItemWidth(LSI,0.01)call MultiboardReleaseItem(LSI)set RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,true)call MultiboardSetItemIcon(LSI,(MTI(K1[GetPlayerId((TQO[i]))])))call MultiboardSetItemValue(LSI," "+TSO(TUO[x-TRO],TQO[i]))call MultiboardSetItemWidth(LSI,0.059)call MultiboardReleaseItem(LSI)set i=i+1endloopset x=x+1endloopendifset R0O=R0O+1set RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848656730)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,(K3[GetPlayerId((TQO[i]))]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set SI0=SI0+1set NQ0[SI0]=R0Oset NU0[SI0]=RIOset S00[SI0]=TQO[i]set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,(K3[GetPlayerId((TUO[i]))]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set SI0=SI0+1set NQ0[SI0]=R0Oset NU0[SI0]=RIOset S00[SI0]=TUO[i]set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(NP0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848656953)+e)call MultiboardReleaseItem(LSI)set LSI=MultiboardGetItem(NP0,R0O,RIO+1)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,(J3))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)call MultiboardMinimize(NP0,true)call MultiboardMinimize(NP0,false)endfunctionfunction ObsBoard_GameMode takes nothing returns stringreturn ALendfunctionfunction R5O takes player NJI returns stringreturn C0[GetPlayerId(NJI)]+(D30[GetPlayerId((NJI))])+"|r"endfunctionfunction R6O takes player NJI returns stringlocal integer k=J[GetPlayerId(NJI)]local integer d=X[GetPlayerId(NJI)]if k<1 thenset k=0endifif d<1 thenset d=0endifreturn I2S(k)+"/"+I2S(d)endfunctionfunction R7O takes player NJI returns stringlocal integer TNO=W[GetPlayerId(NJI)]local string F21local integer A41local integer A51set A41=(TNO/60)-(1/2)set A51=ModuloInteger(TNO,60)if(A51<10)thenset F21=I2S(A41)+":0"+I2S(A51)elseset F21=I2S(A41)+":"+I2S(A51)endifreturn F21endfunctionfunction R8O takes player TLI,player TMI returns stringlocal integer k=(LoadInteger(XY,(400+GetPlayerId(TLI)),(450+GetPlayerId(TMI))))local integer d=(LoadInteger(XY,(400+GetPlayerId(TLI)),(500+GetPlayerId(TMI))))if k<1 thenset k=0endifif d<1 thenset d=0endifreturn I2S(k)+"/"+I2S(d)endfunctionfunction R9O takes player TLI returns stringlocal string RAOif QPI(K1[GetPlayerId(TLI)])thenset RAO=I2S(R2I(TimerGetRemaining(F0[GetPlayerId(TLI)])))elseset RAO=" "endifreturn RAOendfunctionfunction RBO takes player TLI returns stringlocal real r=(TimerGetRemaining(EZ0[GetPlayerId((TLI))]))local string RAOif r>0 thenset RAO=I2S(R2I(r))elseset RAO=" "endifreturn RAOendfunctionfunction RCO takes integer RDO,integer REO returns nothingset SO0=CreateMultiboard()call MultiboardSetItemsWidth(SO0,0)call MultiboardSetRowCount(SO0,RDO)call MultiboardSetColumnCount(SO0,REO)call MultiboardSetTitleText(SO0,GetObjectName(1848657203)+" "+" - "+(AL))call MultiboardMinimize(SO0,true)call MultiboardSetItemsStyle(SO0,false,false)if GetLocalPlayer()==DO0 or GetLocalPlayer()==D20 thencall MultiboardDisplay(SO0,true)endifendfunctionfunction ObsBoard_AllKD takes nothing returns stringreturn"|c00ff0303"+I2S(I[GetPlayerId(BO[0])])+"|r/|c0020c000"+I2S(O[GetPlayerId(BO[0])])+"|r"endfunctionfunction RFO takes nothing returns nothinglocal integer TRO=L1local integer TPO=M1local player array TQOlocal player array TUOlocal integer R0Olocal integer RIOlocal integer R1O=1+21+RTI(TRO,TPO)local integer ROO=1+(TRO+TPO)*2local multiboarditem LSIlocal integer ilocal integer xlocal integer curRow1local integer curRow2local string e="|r"local string c0="|cff99ccff"local integer R2Olocal integer R3Olocal integer RGO=131local integer RHO=139local integer RZO=139local integer RVO=255local integer SPO=0local string SQO=""local string SUO=""local integer T0O=0local integer TIO=0local integer rif TRO>0 and TPO>0 thenset R1O=R1O+2endifif GetTriggerExecCount(GetTriggeringTrigger())==1 thencall RCO(R1O,ROO)endifif C2 and(GetLocalPlayer()==DO0 or GetLocalPlayer()==D20)thencall MultiboardDisplay(SO0,true)endifset i=1loopexitwhen i>5set r=R2I(TimerGetRemaining(F0[GetPlayerId(BO[i])]))if r>0 thenset SPO=SPO+SXO(r)if T0O==0 thenif r<10 thenset SQO=C0[GetPlayerId(BO[i])]+"0"+I2S(r)+" |r"elseset SQO=C0[GetPlayerId(BO[i])]+I2S(r)+" |r"endifelseif r<10 thenset SQO=SQO+NR0+"| |r"+C0[GetPlayerId(BO[i])]+"0"+I2S(r)+" |r"elseset SQO=SQO+NR0+"| |r"+C0[GetPlayerId(BO[i])]+I2S(r)+" |r"endifendifset T0O=T0O+1endifset i=i+1endloopif T0O>0 thenset SQO=NR0+"[Sentinel: |r"+SQO+NR0+"]|r"endifset i=1loopexitwhen i>5set r=R2I(TimerGetRemaining(F0[GetPlayerId(CO[i])]))if r>0 thenset SPO=SPO+SXO(r)if TIO==0 thenif r<10 thenset SUO=C0[GetPlayerId(CO[i])]+"0"+I2S(r)+" |r"elseset SUO=C0[GetPlayerId(CO[i])]+I2S(r)+" |r"endifelseif r<10 thenset SUO=SUO+NR0+"| |r"+C0[GetPlayerId(CO[i])]+"0"+I2S(r)+" |r"elseset SUO=SUO+NR0+"| |r"+C0[GetPlayerId(CO[i])]+I2S(r)+" |r"endifendifset TIO=TIO+1endifset i=i+1endloopif TIO>0 thenset SUO=NR0+"[Scourge: |r"+SUO+NR0+"]|r"endifcall MultiboardSetTitleText(SO0,SQO+" "+SUO+" "+GetObjectName(1848657203)+" "+" - "+(AL)+" - "+("|c00ff0303"+I2S(I[GetPlayerId(BO[0])])+"|r/|c0020c000"+I2S(O[GetPlayerId(BO[0])])+"|r"))set x=1set i=1loopexitwhen i>5if NYI(BO[i])or GetPlayerSlotState(BO[i])==PLAYER_SLOT_STATE_LEFT thenset TQO[x]=BO[i]set x=x+1endifset i=i+1endloopset x=1set i=1loopexitwhen i>5if NYI(CO[i])or GetPlayerSlotState(CO[i])==PLAYER_SLOT_STATE_LEFT thenset TUO[x]=CO[i]set x=x+1endifset i=i+1endloopset i=0set RIO=0loopexitwhen i>R1Oset LSI=MultiboardGetItem(SO0,i,RIO)call MultiboardSetItemWidth(LSI,0.075)call MultiboardReleaseItem(LSI)set i=i+1endloopset R0O=0set RIO=0set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI," ")call MultiboardReleaseItem(LSI)set RIO=0set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,false)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,R5O(TQO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,R5O(TUO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset R0O=R0O+1set RIO=0set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,false)call MultiboardReleaseItem(LSI)set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,true)call MultiboardSetItemValue(LSI,"("+(I2S(GetUnitLevel(K1[GetPlayerId((TQO[i]))])))+")")call MultiboardSetItemIcon(LSI,(MTI(K1[GetPlayerId((TQO[i]))])))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,true)call MultiboardSetItemValue(LSI,"("+(I2S(GetUnitLevel(K1[GetPlayerId((TUO[i]))])))+")")call MultiboardSetItemIcon(LSI,(MTI(K1[GetPlayerId((TUO[i]))])))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset R0O=R0O+1set RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848657218)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,(DX1(UnitItemInSlot(K1[GetPlayerId((TQO[i]))],(1)-1))))call MultiboardSetItemWidth(LSI,0.015)call MultiboardReleaseItem(LSI)set RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,(DX1(UnitItemInSlot(K1[GetPlayerId((TQO[i]))],(2)-1))))call MultiboardSetItemWidth(LSI,0.054)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,(DX1(UnitItemInSlot(K1[GetPlayerId((TUO[i]))],(1)-1))))call MultiboardSetItemWidth(LSI,0.015)call MultiboardReleaseItem(LSI)set RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,(DX1(UnitItemInSlot(K1[GetPlayerId((TUO[i]))],(2)-1))))call MultiboardSetItemWidth(LSI,0.054)call MultiboardReleaseItem(LSI)set i=i+1endloopset R0O=R0O+1set RIO=0set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+" "+e)call MultiboardReleaseItem(LSI)set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,(DX1(UnitItemInSlot(K1[GetPlayerId((TQO[i]))],(3)-1))))call MultiboardSetItemWidth(LSI,0.015)call MultiboardReleaseItem(LSI)set RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,(DX1(UnitItemInSlot(K1[GetPlayerId((TQO[i]))],(4)-1))))call MultiboardSetItemWidth(LSI,0.054)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,(DX1(UnitItemInSlot(K1[GetPlayerId((TUO[i]))],(3)-1))))call MultiboardSetItemWidth(LSI,0.015)call MultiboardReleaseItem(LSI)set RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,(DX1(UnitItemInSlot(K1[GetPlayerId((TUO[i]))],(4)-1))))call MultiboardSetItemWidth(LSI,0.054)call MultiboardReleaseItem(LSI)set i=i+1endloopset R0O=R0O+1set RIO=0set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+" "+e)call MultiboardReleaseItem(LSI)set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,(DX1(UnitItemInSlot(K1[GetPlayerId((TQO[i]))],(5)-1))))call MultiboardSetItemWidth(LSI,0.015)call MultiboardReleaseItem(LSI)set RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,(DX1(UnitItemInSlot(K1[GetPlayerId((TQO[i]))],(6)-1))))call MultiboardSetItemWidth(LSI,0.054)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,(DX1(UnitItemInSlot(K1[GetPlayerId((TUO[i]))],(5)-1))))call MultiboardSetItemWidth(LSI,0.015)call MultiboardReleaseItem(LSI)set RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,(DX1(UnitItemInSlot(K1[GetPlayerId((TUO[i]))],(6)-1))))call MultiboardSetItemWidth(LSI,0.054)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848657202)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,(I2S(GetPlayerState((TQO[i]),PLAYER_STATE_RESOURCE_GOLD))))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,(I2S(GetPlayerState((TUO[i]),PLAYER_STATE_RESOURCE_GOLD))))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848659028)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemValueColor(LSI,RGO,RHO,RZO,RVO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,(I2S(FS[FO1(GetHeroLevel(K1[GetPlayerId((TQO[i]))]))])))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemValueColor(LSI,RGO,RHO,RZO,RVO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,(I2S(FS[FO1(GetHeroLevel(K1[GetPlayerId((TUO[i]))]))])))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848656986)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,(I2S(A[GetPlayerId((TQO[i]))]))+"/"+(I2S(B[GetPlayerId((TQO[i]))])))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,(I2S(A[GetPlayerId((TUO[i]))]))+"/"+(I2S(B[GetPlayerId((TUO[i]))])))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848657201)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemValueColor(LSI,RGO,RHO,RZO,RVO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,(I2S(I[GetPlayerId((TQO[i]))]))+"/"+(I2S(O[GetPlayerId((TQO[i]))]))+"/"+(I2S(D[GetPlayerId((TQO[i]))])))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemValueColor(LSI,RGO,RHO,RZO,RVO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,(I2S(I[GetPlayerId((TUO[i]))]))+"/"+(I2S(O[GetPlayerId((TUO[i]))]))+"/"+(I2S(D[GetPlayerId((TUO[i]))])))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848658517)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,T4O(TQO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,T4O(TUO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848658758)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemValueColor(LSI,RGO,RHO,RZO,RVO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,T7O(TQO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemValueColor(LSI,RGO,RHO,RZO,RVO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,T7O(TUO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848657200)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,(I2S(F[GetPlayerId((TQO[i]))])))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,(I2S(F[GetPlayerId((TUO[i]))])))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848656980)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemValueColor(LSI,RGO,RHO,RZO,RVO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,R6O(TQO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemValueColor(LSI,RGO,RHO,RZO,RVO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,R6O(TUO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848656985)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,(I2S((LoadInteger(XY,(400+GetPlayerId((TQO[i]))),(79))))))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,(I2S((LoadInteger(XY,(400+GetPlayerId((TUO[i]))),(79))))))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848656981)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemValueColor(LSI,RGO,RHO,RZO,RVO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,(I2S(Y[GetPlayerId((TQO[i]))])))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemValueColor(LSI,RGO,RHO,RZO,RVO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,(I2S(Y[GetPlayerId((TUO[i]))])))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848656982)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,R7O(TQO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,R7O(TUO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848656983)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemValueColor(LSI,RGO,RHO,RZO,RVO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,(I2S(G[GetPlayerId((TQO[i]))])))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemValueColor(LSI,RGO,RHO,RZO,RVO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,(I2S(G[GetPlayerId((TUO[i]))])))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848656974)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,(I2S(E[GetPlayerId((TQO[i]))])))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,(I2S(E[GetPlayerId((TUO[i]))])))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848656952)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemValueColor(LSI,RGO,RHO,RZO,RVO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,(I2S(Z[GetPlayerId((TQO[i]))])))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemValueColor(LSI,RGO,RHO,RZO,RVO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,(I2S(Z[GetPlayerId((TUO[i]))])))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848656969)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,(I2S(V[GetPlayerId((TQO[i]))])))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,(I2S(V[GetPlayerId((TUO[i]))])))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848656973)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemValueColor(LSI,RGO,RHO,RZO,RVO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,(I2S(H[GetPlayerId((TQO[i]))])))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemValueColor(LSI,RGO,RHO,RZO,RVO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,(I2S(H[GetPlayerId((TUO[i]))])))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopif TRO>0 and TPO>0 thenset RIO=0set R2O=R0Oset R3O=RIOset R0O=R0O+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848656972)+e)call MultiboardReleaseItem(LSI)set R0O=R2Oset x=1loopexitwhen x>TROset RIO=0set R0O=R2Oset i=1loopexitwhen i>TPOset RIO=x+(x-1)set R0O=R0O+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,(MTI(K1[GetPlayerId((TQO[x]))])))call MultiboardSetItemWidth(LSI,0.01)call MultiboardReleaseItem(LSI)set RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,true)call MultiboardSetItemIcon(LSI,(MTI(K1[GetPlayerId((TUO[i]))])))call MultiboardSetItemValue(LSI," "+R8O(TQO[x],TUO[i]))call MultiboardSetItemWidth(LSI,0.059)call MultiboardReleaseItem(LSI)set i=i+1endloopset x=x+1endloopset x=TRO+1loopexitwhen x>(TPO+TRO)set RIO=0set R0O=R2Oset i=1loopexitwhen i>TROset RIO=x+(x-1)set R0O=R0O+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,(MTI(K1[GetPlayerId((TUO[x-TRO]))])))call MultiboardSetItemWidth(LSI,0.01)call MultiboardReleaseItem(LSI)set RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,true)call MultiboardSetItemIcon(LSI,(MTI(K1[GetPlayerId((TQO[i]))])))call MultiboardSetItemValue(LSI," "+R8O(TUO[x-TRO],TQO[i]))call MultiboardSetItemWidth(LSI,0.059)call MultiboardReleaseItem(LSI)set i=i+1endloopset x=x+1endloopendifset R0O=R0O+1set RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848658003)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemValueColor(LSI,RGO,RHO,RZO,RVO)if R9O(TQO[i])==" "thencall MultiboardSetItemStyle(LSI,true,false)elsecall MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemIcon(LSI,(MTI(K1[GetPlayerId((TQO[i]))])))endifcall MultiboardSetItemValue(LSI,RBO(TQO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemValueColor(LSI,RGO,RHO,RZO,RVO)if R9O(TUO[i])==" "thencall MultiboardSetItemStyle(LSI,true,false)elsecall MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemIcon(LSI,(MTI(K1[GetPlayerId((TUO[i]))])))endifcall MultiboardSetItemValue(LSI,RBO(TUO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset RIO=0set R0O=R0O+1set LSI=MultiboardGetItem(SO0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,c0+GetObjectName(1848657204)+e)call MultiboardReleaseItem(LSI)set RIO=0set i=1loopexitwhen i>TROset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)if R9O(TQO[i])==" "thencall MultiboardSetItemStyle(LSI,true,false)elsecall MultiboardSetItemStyle(LSI,true,true)call MultiboardSetItemIcon(LSI,(MTI(K1[GetPlayerId((TQO[i]))])))endifcall MultiboardSetItemValue(LSI,R9O(TQO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopset i=1loopexitwhen i>TPOset RIO=RIO+1set LSI=MultiboardGetItem(SO0,R0O,RIO)if R9O(TUO[i])==" "thencall MultiboardSetItemStyle(LSI,true,false)elsecall MultiboardSetItemStyle(LSI,true,true)call MultiboardSetItemIcon(LSI,(MTI(K1[GetPlayerId((TUO[i]))])))endifcall MultiboardSetItemValue(LSI,R9O(TUO[i]))call MultiboardSetItemWidth(LSI,0.07)call MultiboardReleaseItem(LSI)set i=i+1endloopendfunctionfunction RWO takes nothing returns nothinglocal trigger tif C2 thenset t=CreateTrigger()call TriggerRegisterTimerEvent(t,1,true)call TriggerAddAction(t,function RFO)set S20=tendifendfunctionfunction RXO takes nothing returns booleanlocal integer id=GetUnitTypeId(GetTriggerUnit())local string NCIif GetLocalPlayer()==GetTriggerPlayer()thenif id==1749236021 thencall ResetUnitAnimation(GetTriggerUnit())elseif id==1848652107 thencall ResetUnitAnimation(GetTriggerUnit())elseif id==1849897784 thencall ResetUnitAnimation(GetTriggerUnit())elseif id==1697657397 thenelseif id==1848651862 thencall ResetUnitAnimation(GetTriggerUnit())elseif id==1848651863 thencall ResetUnitAnimation(GetTriggerUnit())elseif id==1848651826 thencall ResetUnitAnimation(GetTriggerUnit())elseif id==1848651864 thencall ResetUnitAnimation(GetTriggerUnit())elseif id==1848651833 thencall ResetUnitAnimation(GetTriggerUnit())elseif id==1848657989 thencall ResetUnitAnimation(GetTriggerUnit())elseif id==1849897781 thencall ResetUnitAnimation(GetTriggerUnit())elseif id==1966092369 thencall ResetUnitAnimation(GetTriggerUnit())elseif id==1967339316 thencall ResetUnitAnimation(GetTriggerUnit())elseif id==1966092592 thencall ResetUnitAnimation(GetTriggerUnit())elseif id==1966092378 thencall ResetUnitAnimation(GetTriggerUnit())endifendifreturn falseendfunctionfunction RYO takes nothing returns booleanlocal integer id=GetUnitTypeId(GetTriggerUnit())local string NCIif GetLocalPlayer()==GetTriggerPlayer()thenif id==1749236021 thenset NCI="stand work"elseif id==1848652107 thenset NCI="stand third"elseif id==1849897784 thencall SetUnitAnimationByIndex(GetTriggerUnit(),3)elseif id==1697657397 thenelseif id==1848651862 thenset NCI="spell attack"elseif id==1848651863 thenset NCI="spell"elseif id==1848651826 thencall SetUnitAnimationByIndex(GetTriggerUnit(),3)elseif id==1848651864 thenset NCI="stand work"elseif id==1848651833 thenset NCI="stand work"elseif id==1848657989 thenset NCI="stand victory"elseif id==1849897781 thenset NCI="stand work"elseif id==1966092369 thenset NCI="stand work"elseif id==1967339316 thenset NCI="stand work gold"elseif id==1966092592 thenset NCI="stand work"elseif id==1966092378 thenset NCI="stand work"endifif NCI!=""thencall SetUnitAnimation(GetTriggerUnit(),NCI)call QueueUnitAnimation(GetTriggerUnit(),NCI)endifendifreturn falseendfunctionfunction IsChinese takes nothing returns booleanreturn GetObjectName(1848658741)!="Only Translate This String If Simplified Chinese"endfunctionfunction RKO takes nothing returns booleanlocal integer i=0local string s="我开通了中文微博：@IceFrogCN(新浪)，@IceFrogdev(腾讯)"loopexitwhen i>12if GetRandomInt(0,10)<11 and(GetObjectName(1848658741)!="Only Translate This String If Simplified Chinese")thencall DisplayTimedTextToPlayer(Player(i),0,0,20,"|CFF00FF00"+s+"|r")endifset i=i+1endloopreturn falseendfunctionfunction RMO takes unit u returns nothingendfunctionfunction RNO takes nothing returns booleanlocal real RSOlocal real RTOlocal unit uif T30==false thenset u=I50if u!=null thenset RSO=GetUnitState(u,UNIT_STATE_LIFE)set RTO=RSO+SU0if RTO<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-S30)thencall SetUnitState(u,UNIT_STATE_LIFE,RTO)call RMO(u)endifendifendifif T40==false thenset u=I60if u!=null thenset RSO=GetUnitState(u,UNIT_STATE_LIFE)set RTO=RSO+SU0if RTO<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-S40)thencall SetUnitState(u,UNIT_STATE_LIFE,RTO)call RMO(u)endifendifendifif T50==false thenset u=I70if u!=null thenset RSO=GetUnitState(u,UNIT_STATE_LIFE)set RTO=RSO+SU0if RTO<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-S50)thencall SetUnitState(u,UNIT_STATE_LIFE,RTO)call RMO(u)endifendifendifif T20==false thenset u=I80if u!=null thenset RSO=GetUnitState(u,UNIT_STATE_LIFE)set RTO=RSO+SU0if RTO<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-S60)thencall SetUnitState(u,UNIT_STATE_LIFE,RTO)call RMO(u)endifendifset u=I90if u!=null thenset RSO=GetUnitState(u,UNIT_STATE_LIFE)set RTO=RSO+SU0if RTO<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-S70)thencall SetUnitState(u,UNIT_STATE_LIFE,RTO)call RMO(u)endifendifset u=IA0if u!=null thenset RSO=GetUnitState(u,UNIT_STATE_LIFE)set RTO=RSO+SU0if RTO<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-S80)thencall SetUnitState(u,UNIT_STATE_LIFE,RTO)call RMO(u)endifendifset u=IB0if u!=null thenset RSO=GetUnitState(u,UNIT_STATE_LIFE)set RTO=RSO+SU0if RTO<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-S90)thencall SetUnitState(u,UNIT_STATE_LIFE,RTO)call RMO(u)endifendifset u=IC0if u!=null thenset RSO=GetUnitState(u,UNIT_STATE_LIFE)set RTO=RSO+SU0if RTO<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-SA0)thencall SetUnitState(u,UNIT_STATE_LIFE,RTO)call RMO(u)endifendifset u=ID0if u!=null thenset RSO=GetUnitState(u,UNIT_STATE_LIFE)set RTO=RSO+SU0if RTO<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-SB0)thencall SetUnitState(u,UNIT_STATE_LIFE,RTO)call RMO(u)endifendifset u=IE0if u!=null thenset RSO=GetUnitState(u,UNIT_STATE_LIFE)set RTO=RSO+SU0if RTO<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-SC0)thencall SetUnitState(u,UNIT_STATE_LIFE,RTO)call RMO(u)endifendifset u=IF0if u!=null thenset RSO=GetUnitState(u,UNIT_STATE_LIFE)set RTO=RSO+SU0if RTO<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-SD0)thencall SetUnitState(u,UNIT_STATE_LIFE,RTO)call RMO(u)endifendifset u=IG0if u!=null thenset RSO=GetUnitState(u,UNIT_STATE_LIFE)set RTO=RSO+SU0if RTO<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-SE0)thencall SetUnitState(u,UNIT_STATE_LIFE,RTO)call RMO(u)endifendifset u=IH0if u!=null thenset RSO=GetUnitState(u,UNIT_STATE_LIFE)set RTO=RSO+SU0if RTO<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-SF0)thencall SetUnitState(u,UNIT_STATE_LIFE,RTO)call RMO(u)endifendifset u=IZ0if u!=null thenset RSO=GetUnitState(u,UNIT_STATE_LIFE)set RTO=RSO+SU0if RTO<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-SG0)thencall SetUnitState(u,UNIT_STATE_LIFE,RTO)call RMO(u)endifendifset u=IO0if u!=null thenset RSO=GetUnitState(u,UNIT_STATE_LIFE)set RTO=RSO+SU0if RTO<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-SH0)thencall SetUnitState(u,UNIT_STATE_LIFE,RTO)call RMO(u)endifendifendifif TI0==false thenset u=BP0if u!=null thenset RSO=GetUnitState(u,UNIT_STATE_LIFE)set RTO=RSO+SU0if RTO<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-SZ0)thencall SetUnitState(u,UNIT_STATE_LIFE,RTO)call RMO(u)endifendifendifif T10==false thenset u=BQ0if u!=null thenset RSO=GetUnitState(u,UNIT_STATE_LIFE)set RTO=RSO+SU0if RTO<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-SV0)thencall SetUnitState(u,UNIT_STATE_LIFE,RTO)call RMO(u)endifendifendifif TO0==false thenset u=BU0if u!=null thenset RSO=GetUnitState(u,UNIT_STATE_LIFE)set RTO=RSO+SU0if RTO<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-SW0)thencall SetUnitState(u,UNIT_STATE_LIFE,RTO)call RMO(u)endifendifendifif T00==false thenset u=C00if u!=null thenset RSO=GetUnitState(u,UNIT_STATE_LIFE)set RTO=RSO+SU0if RTO<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-SX0)thencall SetUnitState(u,UNIT_STATE_LIFE,RTO)call RMO(u)endifendifset u=CI0if u!=null thenset RSO=GetUnitState(u,UNIT_STATE_LIFE)set RTO=RSO+SU0if RTO<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-SY0)thencall SetUnitState(u,UNIT_STATE_LIFE,RTO)call RMO(u)endifendifset u=C10if u!=null thenset RSO=GetUnitState(u,UNIT_STATE_LIFE)set RTO=RSO+SU0if RTO<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-SJ0)thencall SetUnitState(u,UNIT_STATE_LIFE,RTO)call RMO(u)endifendifset u=CO0if u!=null thenset RSO=GetUnitState(u,UNIT_STATE_LIFE)set RTO=RSO+SU0if RTO<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-SK0)thencall SetUnitState(u,UNIT_STATE_LIFE,RTO)call RMO(u)endifendifset u=C20if u!=null thenset RSO=GetUnitState(u,UNIT_STATE_LIFE)set RTO=RSO+SU0if RTO<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-SL0)thencall SetUnitState(u,UNIT_STATE_LIFE,RTO)call RMO(u)endifendifset u=C30if u!=null thenset RSO=GetUnitState(u,UNIT_STATE_LIFE)set RTO=RSO+SU0if RTO<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-SM0)thencall SetUnitState(u,UNIT_STATE_LIFE,RTO)call RMO(u)endifendifset u=C40if u!=null thenset RSO=GetUnitState(u,UNIT_STATE_LIFE)set RTO=RSO+SU0if RTO<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-SN0)thencall SetUnitState(u,UNIT_STATE_LIFE,RTO)call RMO(u)endifendifset u=C50if u!=null thenset RSO=GetUnitState(u,UNIT_STATE_LIFE)set RTO=RSO+SU0if RTO<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-SS0)thencall SetUnitState(u,UNIT_STATE_LIFE,RTO)call RMO(u)endifendifset u=C60if u!=null thenset RSO=GetUnitState(u,UNIT_STATE_LIFE)set RTO=RSO+SU0if RTO<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-ST0)thencall SetUnitState(u,UNIT_STATE_LIFE,RTO)call RMO(u)endifendifset u=C70if u!=null thenset RSO=GetUnitState(u,UNIT_STATE_LIFE)set RTO=RSO+SU0if RTO<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-SR0)thencall SetUnitState(u,UNIT_STATE_LIFE,RTO)call RMO(u)endifendifset u=C80if u!=null thenset RSO=GetUnitState(u,UNIT_STATE_LIFE)set RTO=RSO+SU0if RTO<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-SP0)thencall SetUnitState(u,UNIT_STATE_LIFE,RTO)call RMO(u)endifendifset u=BN0if u!=null thenset RSO=GetUnitState(u,UNIT_STATE_LIFE)set RTO=RSO+SU0if RTO<(GetUnitState(u,UNIT_STATE_MAX_LIFE)-SQ0)thencall SetUnitState(u,UNIT_STATE_LIFE,RTO)call RMO(u)endifendifendifreturn falseendfunctionfunction RRO takes nothing returns booleanif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif TI0 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))==true thenset SZ0=SZ0+GetEventDamage()elseif IsUnitIllusion(GetEventDamageSource())==true thencall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.75*GetEventDamage())elsecall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.25*GetEventDamage())endifendifelsecall MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction RPO takes nothing returns booleanif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif T10 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))==true thenset SV0=SV0+GetEventDamage()elseif IsUnitIllusion(GetEventDamageSource())==true thencall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.75*GetEventDamage())elsecall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.25*GetEventDamage())endifendifelsecall MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction RQO takes nothing returns booleanif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif TO0 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))==true thenset SW0=SW0+GetEventDamage()elseif IsUnitIllusion(GetEventDamageSource())==true thencall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.75*GetEventDamage())elsecall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.25*GetEventDamage())endifendifelsecall MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction RUO takes nothing returns booleanif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif T00 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))==true thenset SX0=SX0+GetEventDamage()elseif IsUnitIllusion(GetEventDamageSource())==true thencall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.75*GetEventDamage())elsecall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.25*GetEventDamage())endifendifelsecall MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction P0O takes nothing returns booleanif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif T00 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))==true thenset SY0=SY0+GetEventDamage()elseif IsUnitIllusion(GetEventDamageSource())==true thencall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.75*GetEventDamage())elsecall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.25*GetEventDamage())endifendifelsecall MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction PIO takes nothing returns booleanif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif T00 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))==true thenset SJ0=SJ0+GetEventDamage()elseif IsUnitIllusion(GetEventDamageSource())==true thencall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.75*GetEventDamage())elsecall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.25*GetEventDamage())endifendifelsecall MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction P1O takes nothing returns booleanif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif T00 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))==true thenset SK0=SK0+GetEventDamage()elseif IsUnitIllusion(GetEventDamageSource())==true thencall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.75*GetEventDamage())elsecall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.25*GetEventDamage())endifendifelsecall MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction POO takes nothing returns booleanif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif T00 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))==true thenset SL0=SL0+GetEventDamage()elseif IsUnitIllusion(GetEventDamageSource())==true thencall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.75*GetEventDamage())elsecall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.25*GetEventDamage())endifendifelsecall MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction P2O takes nothing returns booleanif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif T00 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))==true thenset SM0=SM0+GetEventDamage()elseif IsUnitIllusion(GetEventDamageSource())==true thencall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.75*GetEventDamage())elsecall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.25*GetEventDamage())endifendifelsecall MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction P3O takes nothing returns booleanif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif T00 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))==true thenset SN0=SN0+GetEventDamage()elseif IsUnitIllusion(GetEventDamageSource())==true thencall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.75*GetEventDamage())elsecall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.25*GetEventDamage())endifendifelsecall MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction P4O takes nothing returns booleanif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif T00 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))==true thenset SS0=SS0+GetEventDamage()elseif IsUnitIllusion(GetEventDamageSource())==true thencall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.75*GetEventDamage())elsecall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.25*GetEventDamage())endifendifelsecall MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction P5O takes nothing returns booleanif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif T00 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))==true thenset ST0=ST0+GetEventDamage()elseif IsUnitIllusion(GetEventDamageSource())==true thencall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.75*GetEventDamage())elsecall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.25*GetEventDamage())endifendifelsecall MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction P6O takes nothing returns booleanif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif T00 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))==true thenset SR0=SR0+GetEventDamage()elseif IsUnitIllusion(GetEventDamageSource())==true thencall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.75*GetEventDamage())elsecall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.25*GetEventDamage())endifendifelsecall MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction P7O takes nothing returns booleanif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif T00 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))==true thenset SP0=SP0+GetEventDamage()elseif IsUnitIllusion(GetEventDamageSource())==true thencall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.75*GetEventDamage())elsecall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.25*GetEventDamage())endifendifelsecall MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction P8O takes nothing returns booleanif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif T00 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))==true thenset SQ0=SQ0+GetEventDamage()elseif IsUnitIllusion(GetEventDamageSource())==true thencall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.75*GetEventDamage())elsecall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.25*GetEventDamage())endifendifelsecall MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction P9O takes nothing returns booleanif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif T30 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))==true thenset S30=S30+GetEventDamage()elseif IsUnitIllusion(GetEventDamageSource())==true thencall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.75*GetEventDamage())elsecall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.25*GetEventDamage())endifendifelsecall MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction PAO takes nothing returns booleanif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif T40 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))==true thenset S40=S40+GetEventDamage()elseif IsUnitIllusion(GetEventDamageSource())==true thencall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.75*GetEventDamage())elsecall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.25*GetEventDamage())endifendifelsecall MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction PBO takes nothing returns booleanif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif T50 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))==true thenset S50=S50+GetEventDamage()elseif IsUnitIllusion(GetEventDamageSource())==true thencall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.75*GetEventDamage())elsecall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.25*GetEventDamage())endifendifelsecall MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction PCO takes nothing returns booleanif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif T20 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))==true thenset S60=S60+GetEventDamage()elseif IsUnitIllusion(GetEventDamageSource())==true thencall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.75*GetEventDamage())elsecall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.25*GetEventDamage())endifendifelsecall MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction PDO takes nothing returns booleanif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif T20 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))==true thenset S70=S70+GetEventDamage()elseif IsUnitIllusion(GetEventDamageSource())==true thencall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.75*GetEventDamage())elsecall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.25*GetEventDamage())endifendifelsecall MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction PEO takes nothing returns booleanif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif T20 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))==true thenset S80=S80+GetEventDamage()elseif IsUnitIllusion(GetEventDamageSource())==true thencall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.75*GetEventDamage())elsecall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.25*GetEventDamage())endifendifelsecall MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction PFO takes nothing returns booleanif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif T20 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))==true thenset S90=S90+GetEventDamage()elseif IsUnitIllusion(GetEventDamageSource())==true thencall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.75*GetEventDamage())elsecall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.25*GetEventDamage())endifendifelsecall MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction PGO takes nothing returns booleanif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif T20 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))==true thenset SA0=SA0+GetEventDamage()elseif IsUnitIllusion(GetEventDamageSource())==true thencall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.75*GetEventDamage())elsecall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.25*GetEventDamage())endifendifelsecall MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction PHO takes nothing returns booleanif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif T20 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))==true thenset SB0=SB0+GetEventDamage()elseif IsUnitIllusion(GetEventDamageSource())==true thencall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.75*GetEventDamage())elsecall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.25*GetEventDamage())endifendifelsecall MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction PZO takes nothing returns booleanif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif T20 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))==true thenset SC0=SC0+GetEventDamage()elseif IsUnitIllusion(GetEventDamageSource())==true thencall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.75*GetEventDamage())elsecall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.25*GetEventDamage())endifendifelsecall MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction PVO takes nothing returns booleanif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif T20 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))==true thenset SD0=SD0+GetEventDamage()elseif IsUnitIllusion(GetEventDamageSource())==true thencall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.75*GetEventDamage())elsecall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.25*GetEventDamage())endifendifelsecall MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction PWO takes nothing returns booleanif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif T20 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))==true thenset SE0=SE0+GetEventDamage()elseif IsUnitIllusion(GetEventDamageSource())==true thencall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.75*GetEventDamage())elsecall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.25*GetEventDamage())endifendifelsecall MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction PXO takes nothing returns booleanif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif T20 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))==true thenset SF0=SF0+GetEventDamage()elseif IsUnitIllusion(GetEventDamageSource())==true thencall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.75*GetEventDamage())elsecall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.25*GetEventDamage())endifendifelsecall MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction PYO takes nothing returns booleanif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif T20 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))==true thenset SG0=SG0+GetEventDamage()elseif IsUnitIllusion(GetEventDamageSource())==true thencall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.75*GetEventDamage())elsecall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.25*GetEventDamage())endifendifelsecall MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction PJO takes nothing returns booleanif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif T20 or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))==true thenset SH0=SH0+GetEventDamage()elseif IsUnitIllusion(GetEventDamageSource())==true thencall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.75*GetEventDamage())elsecall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+0.25*GetEventDamage())endifendifelsecall MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction PLO takes nothing returns booleanif GetOwningPlayer(GetFilterUnit())==CO[0]thenset T20=trueendifreturn falseendfunctionfunction PMO takes nothing returns booleanif GetOwningPlayer(GetFilterUnit())==CO[0]thenset T30=trueendifreturn falseendfunctionfunction PNO takes nothing returns booleanif GetOwningPlayer(GetFilterUnit())==CO[0]thenset T40=trueendifreturn falseendfunctionfunction PSO takes nothing returns booleanif GetOwningPlayer(GetFilterUnit())==CO[0]thenset T50=trueendifreturn falseendfunctionfunction PTO takes nothing returns booleanif GetOwningPlayer(GetFilterUnit())==BO[0]thenset T00=trueendifreturn falseendfunctionfunction PRO takes nothing returns booleanif GetOwningPlayer(GetFilterUnit())==BO[0]thenset TI0=trueendifreturn falseendfunctionfunction PPO takes nothing returns booleanif GetOwningPlayer(GetFilterUnit())==BO[0]thenset T10=trueendifreturn falseendfunctionfunction PQO takes nothing returns booleanif GetOwningPlayer(GetFilterUnit())==BO[0]thenset TO0=trueendifreturn falseendfunctionfunction PUO takes nothing returns booleanlocal group g=MDI()set T00=falseset TI0=falseset T10=falseset TO0=falseset T20=falseset T30=falseset T40=falseset T50=falsecall GroupEnumUnitsInRect(g,O6,Condition(function PLO))call GroupEnumUnitsInRect(g,A6,Condition(function PLO))call GroupEnumUnitsInRect(g,B6,Condition(function PLO))call GroupEnumUnitsInRect(g,CB,Condition(function PLO))call GroupEnumUnitsInRect(g,DB,Condition(function PLO))call GroupEnumUnitsInRect(g,EB,Condition(function PLO))call GroupEnumUnitsInRect(g,AB,Condition(function PMO))call GroupEnumUnitsInRect(g,ZB,Condition(function PNO))call GroupEnumUnitsInRect(g,BB,Condition(function PSO))call GroupEnumUnitsInRect(g,C6,Condition(function PTO))call GroupEnumUnitsInRect(g,D6,Condition(function PTO))call GroupEnumUnitsInRect(g,E6,Condition(function PTO))call GroupEnumUnitsInRect(g,HB,Condition(function PTO))call GroupEnumUnitsInRect(g,FB,Condition(function PTO))call GroupEnumUnitsInRect(g,GB,Condition(function PTO))call GroupEnumUnitsInRect(g,UA,Condition(function PRO))call GroupEnumUnitsInRect(g,IB,Condition(function PPO))call GroupEnumUnitsInRect(g,OB,Condition(function PQO))call MCI(g)set g=nullreturn falseendfunctionfunction QIO takes nothing returns booleancall MZI(GetTriggeringTrigger())call TriggerEvaluate(PG)return falseendfunctionfunction Q1O takes nothing returns booleanlocal real r=TimerGetRemaining(PK)local real OXO=rlocal integer P1I=R2I(OXO)local integer A41=P1I/60-1/2local integer A51=ModuloInteger(P1I,60)local trigger tlocal integer ilocal player pif r==0 thenset T60=truecall E71("GameStart",1)call A31(A41,A51,true)set IL=trueset N=TimerGetElapsed(M)call MZI(GetTriggeringTrigger())call SetFloatGameState(GAME_STATE_TIME_OF_DAY,6.00)call SuspendTimeOfDay(false)call SetTimeOfDayScale(0.625)if P0==false thenif DL thencall TriggerRegisterTimerEvent(YM0,120,true)elsecall TriggerRegisterTimerEvent(YM0,120,true)endifcall TriggerEvaluate(YM0)endifcall TriggerRegisterTimerEvent(PG,60,true)set t=CreateTrigger()call TriggerRegisterTimerEvent(t,30,false)call TriggerAddCondition(t,Condition(function QIO))set t=nullcall TriggerRegisterTimerEventPeriodic(EG,30.00)call TriggerExecute(EG)call TriggerRegisterTimerEventPeriodic(TG,450.00)call TriggerRegisterTimerEventSingle(CG,2699.00)call TriggerRegisterTimerEventSingle(DG,999.00)call TriggerRegisterTimerEventSingle(DG,1999.00)call TriggerRegisterTimerEventSingle(DG,2999.00)call TriggerRegisterTimerEvent(FV0,300,true)call TriggerRegisterTimerEvent(TW0,300,true)call TriggerRegisterTimerEvent(CS,30,true)call TriggerEvaluate(CS)if Q0 thencall TriggerRegisterTimerEvent(QG,600,true)endifcall ExecuteFunc("QOO")elseif r==7 thenset t=CreateTrigger()call TriggerRegisterTimerEvent(t,30,true)call TriggerAddCondition(t,Condition(function LTO))elseif OXO<12 and OL==false thenset OL=truecall PlaySoundBJ(OE)call A31(A41,A51,true)elseif OXO==20 thenif GetRandomInt(0,10)<2 thencall DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,6,"|c006699CC"+GetObjectName(1848659015)+"|r")endifelseif OXO==60 thencall ExecuteFunc("RKO")elsecall A31(A41,A51,true)endifif K0==true and ModuloInteger(GetTriggerEvalCount(GetTriggeringTrigger()),4)==0 thenif r==85 thenif K1[GetPlayerId(GetLocalPlayer())]==null thencall DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,6,"|c006699CC"+GetObjectName(1848659530)+"|r")endifelseif r==80 thenif K1[GetPlayerId(GetLocalPlayer())]==null thencall DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,6,"|c006699CC"+GetObjectName(1848659531)+"|r")endifelseif r<75 and r>0 thenif r==74 thenif K1[GetPlayerId(GetLocalPlayer())]==null thencall DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,6,"|c006699CC"+GetObjectName(1848659532)+"|r")endifendifset i=0loopexitwhen i>5set p=BO[i]if K1[GetPlayerId(p)]==null thencall SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-1)endifset p=CO[i]if K1[GetPlayerId(p)]==null thencall SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-1)endifset i=i+1endloopendifendifreturn falseendfunctionfunction Q2O takes nothing returns booleanif IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetAttacker()))and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetAttacker()))and GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1 and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==false and GetOwningPlayer(GetFilterUnit())!=DO thenif IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==true thenset T70=GetFilterUnit()elseset T80=GetFilterUnit()endifendifreturn falseendfunctionfunction Q3O takes nothing returns nothinglocal unit M0O=GetAttacker()local unit TMI=GetTriggerUnit()local group g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(M0O),GetUnitY(M0O),900,Condition(function Q2O))call MCI(g)call DisableTrigger(GetTriggeringTrigger())if T70!=null thencall IssueTargetOrder(M0O,"attack",T70)call GroupAddUnit(T90,M0O)elseif IsUnitType(TMI,UNIT_TYPE_HERO)==true and T80!=null thencall IssueTargetOrder(M0O,"attack",T80)call GroupAddUnit(T90,M0O)endifcall EnableTrigger(GetTriggeringTrigger())set T70=nullset T80=nullset M0O=nullset TMI=nullset g=nullendfunctionfunction Q4O takes nothing returns nothingif GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)<1 thencall GroupRemoveUnit(T90,GetEnumUnit())endifif GetUnitCurrentOrder(GetEnumUnit())!=OrderId("attack")thencall GroupRemoveUnit(T90,GetEnumUnit())call IssuePointOrderLoc(GetEnumUnit(),"attack",O2[GetUnitAbilityLevel(GetEnumUnit(),I2)])endifendfunctionfunction Q5O takes nothing returns booleancall ForGroup(T90,function Q4O)return falseendfunctionfunction Q7O takes string s returns nothingset TC0=TC0+1set TD0[TC0]=sendfunctionfunction Q8O takes nothing returns booleanlocal integer i=1loopexitwhen i>TC0call ExecuteFunc(TD0[i])set i=i+1endloopcall ExecuteFunc("PS1")call ExecuteFunc("F7O")return falseendfunctionfunction Q9O takes unit N0I returns nothinglocal trigger t=CreateTrigger()call SaveBoolean(XY,(GetHandleId(GetTriggerUnit())),(38),(true))call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function Q8O))set t=nullendfunctionfunction QAO takes nothing returns booleanif GetUnitTypeId(GetTriggerUnit())!=1211122232 and GetUnitTypeId(GetTriggerUnit())!=1211117645 and GetUnitTypeId(GetTriggerUnit())!=1211119431 and GetUnitTypeId(GetTriggerUnit())!=1211117657 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==true and IsUnitIllusion(GetTriggerUnit())==false and HaveSavedBoolean(XY,GetHandleId(GetTriggerUnit()),38)==false thenif TA0 and(GetUnitTypeId(GetTriggerUnit())!=1328558160 or(GetUnitTypeId(GetTriggerUnit())==1328558160 and TB0))thencall Q9O(GetTriggerUnit())endifendifreturn falseendfunctionfunction QCO takes nothing returns booleanlocal unit ulocal real QDOlocal boolean QEO=R8I()set u=IV0if u!=null and GetUnitState(u,UNIT_STATE_LIFE)>1 thenset QDO=GetUnitState(u,UNIT_STATE_MANA)if QEO thenset QDO=RQI(QDO-25,0)elseset QDO=RPI(QDO+5,300)endifcall SetUnitState(u,UNIT_STATE_MANA,QDO)endifset u=IW0if u!=null and GetUnitState(u,UNIT_STATE_LIFE)>1 thenset QDO=GetUnitState(u,UNIT_STATE_MANA)if QEO thenset QDO=RQI(QDO-25,0)elseset QDO=RPI(QDO+5,300)endifcall SetUnitState(u,UNIT_STATE_MANA,QDO)endifset u=IX0if u!=null and GetUnitState(u,UNIT_STATE_LIFE)>1 thenset QDO=GetUnitState(u,UNIT_STATE_MANA)if QEO thenset QDO=RQI(QDO-25,0)elseset QDO=RPI(QDO+5,300)endifcall SetUnitState(u,UNIT_STATE_MANA,QDO)endifset u=IY0if u!=null and GetUnitState(u,UNIT_STATE_LIFE)>1 thenset QDO=GetUnitState(u,UNIT_STATE_MANA)if QEO thenset QDO=RQI(QDO-25,0)elseset QDO=RPI(QDO+5,300)endifcall SetUnitState(u,UNIT_STATE_MANA,QDO)endifset u=IJ0if u!=null and GetUnitState(u,UNIT_STATE_LIFE)>1 thenset QDO=GetUnitState(u,UNIT_STATE_MANA)if QEO thenset QDO=RQI(QDO-25,0)elseset QDO=RPI(QDO+5,300)endifcall SetUnitState(u,UNIT_STATE_MANA,QDO)endifset u=IK0if u!=null and GetUnitState(u,UNIT_STATE_LIFE)>1 thenset QDO=GetUnitState(u,UNIT_STATE_MANA)if QEO thenset QDO=RQI(QDO-25,0)elseset QDO=RPI(QDO+5,300)endifcall SetUnitState(u,UNIT_STATE_MANA,QDO)endifset u=IL0if u!=null and GetUnitState(u,UNIT_STATE_LIFE)>1 thenset QDO=GetUnitState(u,UNIT_STATE_MANA)if QEO thenset QDO=RQI(QDO-25,0)elseset QDO=RPI(QDO+5,300)endifcall SetUnitState(u,UNIT_STATE_MANA,QDO)endifset u=IM0if u!=null and GetUnitState(u,UNIT_STATE_LIFE)>1 thenset QDO=GetUnitState(u,UNIT_STATE_MANA)if QEO thenset QDO=RQI(QDO-25,0)elseset QDO=RPI(QDO+5,300)endifcall SetUnitState(u,UNIT_STATE_MANA,QDO)endifset u=IN0if u!=null and GetUnitState(u,UNIT_STATE_LIFE)>1 thenset QDO=GetUnitState(u,UNIT_STATE_MANA)if QEO thenset QDO=RQI(QDO-25,0)elseset QDO=RPI(QDO+5,300)endifcall SetUnitState(u,UNIT_STATE_MANA,QDO)endifset u=IS0if u!=null and GetUnitState(u,UNIT_STATE_LIFE)>1 thenset QDO=GetUnitState(u,UNIT_STATE_MANA)if QEO thenset QDO=RQI(QDO-25,0)elseset QDO=RPI(QDO+5,300)endifcall SetUnitState(u,UNIT_STATE_MANA,QDO)endifset u=IT0if u!=null and GetUnitState(u,UNIT_STATE_LIFE)>1 thenset QDO=GetUnitState(u,UNIT_STATE_MANA)if QEO thenset QDO=RQI(QDO-25,0)elseset QDO=RPI(QDO+5,300)endifcall SetUnitState(u,UNIT_STATE_MANA,QDO)endifreturn falseendfunctionfunction QHO takes nothing returns booleanlocal real dif GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and QPI(GetFilterUnit())==false and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==false and IsUnitAlly(GetFilterUnit(),GetOwningPlayer(DK))==true thenset d=PAI(UJ,IK,GetUnitX(GetFilterUnit()),GetUnitY(GetFilterUnit()))if d<QJ thenset QJ=dset CK=GetFilterUnit()endifendifreturn falseendfunctionfunction QZO takes unit N3I,real x,real y returns unitlocal group g=MDI()set CK=nullset DK=N3Iset QJ=99999set UJ=xset IK=ycall GroupEnumUnitsInRange(g,x,y,2000,Condition(function QHO))call MCI(g)set g=nullreturn CKendfunctionfunction TeleportationEffect_Remove takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMIif GetSpellAbilityId()==1093808945 thenset TMI=(LoadUnitHandle(XY,(MKI),(17)))call UnitRemoveAbility(TMI,1114205798)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TMI=nullreturn falseendfunctionfunction QVO takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local location llocal real xlocal real ylocal unit TMI=GetSpellTargetUnit()call MPI(N0I,4256,1)if TMI==null thenset l=GetSpellTargetLoc()set x=GetLocationX(l)set y=GetLocationY(l)call RemoveLocation(l)if GetSpellAbilityId()==1093751349 thenset TMI=VOO(N0I,x,y)elseset TMI=QZO(N0I,x,y)endifset x=GetUnitX(TMI)set y=GetUnitY(TMI)elseset x=GetUnitX(GetSpellTargetUnit())set y=GetUnitY(GetSpellTargetUnit())endifif(IsUnitAlly(N0I,GetLocalPlayer())and GetLocalPlayer()!=GetOwningPlayer(N0I))or(C2 and(GetLocalPlayer()==DO0 or GetLocalPlayer()==D20))thencall PingMinimapEx(x,y,3,255,255,255,false)endifset N0I=nullset l=nullendfunctionfunction TeleportationEffect_Main takes nothing returns booleanif GetSpellAbilityId()==1093808945 thencall QVO()endifreturn falseendfunctionfunction QXO takes nothing returns nothingcall NPI(1311780946)call NPI(1311788343)call NPI(1311788363)call NPI(1311788356)call NPI(1311788373)call NPI(1429221430)endfunctionfunction QYO takes nothing returns nothingif T4I(GetEnumUnit())and IsUnitAlly(GetEnumUnit(),BO[0])==false and GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)>0.5 thencall UnitRemoveAbility(GetEnumUnit(),1110456392)call TKI(MQ,GetEnumUnit(),2,500)endifendfunctionfunction QJO takes nothing returns nothingif T4I(GetEnumUnit())and IsUnitAlly(GetEnumUnit(),CO[0])==false and GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)>0.5 thencall UnitRemoveAbility(GetEnumUnit(),1110456392)call TKI(BG0,GetEnumUnit(),2,500)endifendfunctionfunction QKO takes nothing returns booleanlocal group g=MDI()call GroupEnumUnitsInRect(g,G5,Condition(function LWI))call ForGroup(g,function QYO)call MCI(g)set g=MDI()call GroupEnumUnitsInRect(g,H5,Condition(function LWI))call ForGroup(g,function QJO)call MCI(g)set g=nullreturn falseendfunctionfunction QMO takes string winner returns nothinglocal integer ilocal player plocal string idlocal integer P1I=R2I(TimerGetElapsed(M)-N)local integer A41=P1I/60-1/2local integer A51=ModuloInteger(P1I,60)call TBI()set i=1loopexitwhen i>5set p=BO[i]set id=I2S(GetPlayerId(p))call StoreInteger(PN,id,"1",(I[GetPlayerId((p))]))call StoreInteger(PN,id,"2",(O[GetPlayerId((p))]))call StoreInteger(PN,id,"3",(A[GetPlayerId((p))]))call StoreInteger(PN,id,"4",(B[GetPlayerId((p))]))call StoreInteger(PN,id,"5",(D[GetPlayerId((p))]))call StoreInteger(PN,id,"6",(GetPlayerState((p),PLAYER_STATE_RESOURCE_GOLD)))call StoreInteger(PN,id,"7",(LoadInteger(XY,(400+GetPlayerId((p))),(79))))call StoreInteger(PN,id,"8_0",(GetItemTypeId(UnitItemInSlot(K1[GetPlayerId((p))],(0)))))call StoreInteger(PN,id,"8_1",(GetItemTypeId(UnitItemInSlot(K1[GetPlayerId((p))],(1)))))call StoreInteger(PN,id,"8_2",(GetItemTypeId(UnitItemInSlot(K1[GetPlayerId((p))],(2)))))call StoreInteger(PN,id,"8_3",(GetItemTypeId(UnitItemInSlot(K1[GetPlayerId((p))],(3)))))call StoreInteger(PN,id,"8_4",(GetItemTypeId(UnitItemInSlot(K1[GetPlayerId((p))],(4)))))call StoreInteger(PN,id,"8_5",(GetItemTypeId(UnitItemInSlot(K1[GetPlayerId((p))],(5)))))call StoreInteger(PN,id,"9",(GetUnitTypeId(K1[GetPlayerId((p))])))call StoreInteger(PN,id,"id",i)set p=CO[i]set id=I2S(GetPlayerId(p))call StoreInteger(PN,id,"1",(I[GetPlayerId((p))]))call StoreInteger(PN,id,"2",(O[GetPlayerId((p))]))call StoreInteger(PN,id,"3",(A[GetPlayerId((p))]))call StoreInteger(PN,id,"4",(B[GetPlayerId((p))]))call StoreInteger(PN,id,"5",(D[GetPlayerId((p))]))call StoreInteger(PN,id,"6",(GetPlayerState((p),PLAYER_STATE_RESOURCE_GOLD)))call StoreInteger(PN,id,"7",(LoadInteger(XY,(400+GetPlayerId((p))),(79))))call StoreInteger(PN,id,"8_0",(GetItemTypeId(UnitItemInSlot(K1[GetPlayerId((p))],(0)))))call StoreInteger(PN,id,"8_1",(GetItemTypeId(UnitItemInSlot(K1[GetPlayerId((p))],(1)))))call StoreInteger(PN,id,"8_2",(GetItemTypeId(UnitItemInSlot(K1[GetPlayerId((p))],(2)))))call StoreInteger(PN,id,"8_3",(GetItemTypeId(UnitItemInSlot(K1[GetPlayerId((p))],(3)))))call StoreInteger(PN,id,"8_4",(GetItemTypeId(UnitItemInSlot(K1[GetPlayerId((p))],(4)))))call StoreInteger(PN,id,"8_5",(GetItemTypeId(UnitItemInSlot(K1[GetPlayerId((p))],(5)))))call StoreInteger(PN,id,"9",(GetUnitTypeId(K1[GetPlayerId((p))])))call StoreInteger(PN,id,"id",i+5)if GetLocalPlayer()==WO thencall SyncStoredInteger(PN,I2S(GetPlayerId(BO[i])),"1")call SyncStoredInteger(PN,I2S(GetPlayerId(BO[i])),"2")call SyncStoredInteger(PN,I2S(GetPlayerId(BO[i])),"3")call SyncStoredInteger(PN,I2S(GetPlayerId(BO[i])),"4")call SyncStoredInteger(PN,I2S(GetPlayerId(BO[i])),"5")call SyncStoredInteger(PN,I2S(GetPlayerId(BO[i])),"6")call SyncStoredInteger(PN,I2S(GetPlayerId(BO[i])),"7")call SyncStoredInteger(PN,I2S(GetPlayerId(BO[i])),"8_0")call SyncStoredInteger(PN,I2S(GetPlayerId(BO[i])),"8_1")call SyncStoredInteger(PN,I2S(GetPlayerId(BO[i])),"8_2")call SyncStoredInteger(PN,I2S(GetPlayerId(BO[i])),"8_3")call SyncStoredInteger(PN,I2S(GetPlayerId(BO[i])),"8_4")call SyncStoredInteger(PN,I2S(GetPlayerId(BO[i])),"8_5")call SyncStoredInteger(PN,I2S(GetPlayerId(BO[i])),"9")call SyncStoredInteger(PN,I2S(GetPlayerId(BO[i])),"id")call SyncStoredInteger(PN,I2S(GetPlayerId(CO[i])),"1")call SyncStoredInteger(PN,I2S(GetPlayerId(CO[i])),"2")call SyncStoredInteger(PN,I2S(GetPlayerId(CO[i])),"3")call SyncStoredInteger(PN,I2S(GetPlayerId(CO[i])),"4")call SyncStoredInteger(PN,I2S(GetPlayerId(CO[i])),"5")call SyncStoredInteger(PN,I2S(GetPlayerId(CO[i])),"6")call SyncStoredInteger(PN,I2S(GetPlayerId(CO[i])),"7")call SyncStoredInteger(PN,I2S(GetPlayerId(CO[i])),"8_0")call SyncStoredInteger(PN,I2S(GetPlayerId(CO[i])),"8_1")call SyncStoredInteger(PN,I2S(GetPlayerId(CO[i])),"8_2")call SyncStoredInteger(PN,I2S(GetPlayerId(CO[i])),"8_3")call SyncStoredInteger(PN,I2S(GetPlayerId(CO[i])),"8_4")call SyncStoredInteger(PN,I2S(GetPlayerId(CO[i])),"8_5")call SyncStoredInteger(PN,I2S(GetPlayerId(CO[i])),"9")call SyncStoredInteger(PN,I2S(GetPlayerId(CO[i])),"id")endifset i=i+1endloopif TE0==false thencall StoreInteger(PN,"Global","Winner",TF0)call StoreInteger(PN,"Global","m",A41)call StoreInteger(PN,"Global","s",A51)if GetLocalPlayer()==WO thencall SyncStoredInteger(PN,"Global","Winner")call SyncStoredInteger(PN,"Global","m")call SyncStoredInteger(PN,"Global","s")endifendifendfunctionfunction Z81 takes nothing returns nothingcall QMO("1")endfunctionfunction Z71 takes nothing returns nothinglocal player p=TG0local string id=I2S(GetPlayerId(p))call StoreInteger(PN,id,"8_0",(GetItemTypeId(UnitItemInSlot(K1[GetPlayerId((p))],(0)))))call StoreInteger(PN,id,"8_1",(GetItemTypeId(UnitItemInSlot(K1[GetPlayerId((p))],(1)))))call StoreInteger(PN,id,"8_2",(GetItemTypeId(UnitItemInSlot(K1[GetPlayerId((p))],(2)))))call StoreInteger(PN,id,"8_3",(GetItemTypeId(UnitItemInSlot(K1[GetPlayerId((p))],(3)))))call StoreInteger(PN,id,"8_4",(GetItemTypeId(UnitItemInSlot(K1[GetPlayerId((p))],(4)))))call StoreInteger(PN,id,"8_5",(GetItemTypeId(UnitItemInSlot(K1[GetPlayerId((p))],(5)))))if GetLocalPlayer()==WO thencall SyncStoredInteger(PN,I2S(GetPlayerId(p)),"8_0")call SyncStoredInteger(PN,I2S(GetPlayerId(p)),"8_1")call SyncStoredInteger(PN,I2S(GetPlayerId(p)),"8_2")call SyncStoredInteger(PN,I2S(GetPlayerId(p)),"8_3")call SyncStoredInteger(PN,I2S(GetPlayerId(p)),"8_4")call SyncStoredInteger(PN,I2S(GetPlayerId(p)),"8_5")endifendfunctionfunction QNO takes nothing returns booleancall ExecuteFunc("TTO")return falseendfunctionfunction QSO takes nothing returns nothingcall NEI(GetEnumUnit())endfunctionfunction QTO takes nothing returns nothinglocal group g=MDI()call GroupEnumUnitsInRange(g,0,0,12000,Condition(function AK1))call ForGroup(g,function QSO)call MCI(g)set g=nullendfunctionfunction QRO takes nothing returns nothingset bj_changeLevelShowScores=truecall DisableTrigger(MK)call DisableTrigger(NK)call ExecuteFunc("E6O")if C2 thencall DisableTrigger(S20)endifcall DisableTrigger(EG0)call ClearTextMessages()call PDI(bj_FORCE_ALL_PLAYERS,60,J3+" "+GetObjectName(1848653108)+" www.getdota.com.")set Q2=truecall QSI()call DisableTrigger(EG)call DisableTrigger(BH)call DisableTrigger(EF0)call MEI()endfunctionfunction QPO takes nothing returns nothinglocal trigger t=CreateTrigger()call PanCameraToTimed(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),0)call TriggerRegisterTimerEvent(t,2.5,false)call TriggerAddCondition(t,Condition(function QNO))set TF0=2set J3="|c0020c000"+GetObjectName(1848652623)+"|r"call QRO()call QTO()call QMO("2")set t=nullendfunctionfunction QQO takes nothing returns booleancall SetUnitVertexColorBJ(BN0,100,100,100,GetTriggerEvalCount(GetTriggeringTrigger()))if GetTriggerEvalCount(GetTriggeringTrigger())==100 thencall ShowUnit(BN0,false)call MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction QUO takes nothing returns nothinglocal trigger t=CreateTrigger()call PanCameraToTimed(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),0)call TriggerRegisterTimerEvent(t,1.5,false)call TriggerAddCondition(t,Condition(function QNO))set TF0=1set J3="|c00ff0303"+GetObjectName(1848652622)+"|r"call QRO()call QTO()call QMO("1")call AddSpecialEffect("war3mapImported\\FrozenThronesDeath2.mdx",GetUnitX(BN0)+150,GetUnitY(BN0)+100)set t=CreateTrigger()call TriggerRegisterTimerEvent(t,0.02,true)call TriggerAddCondition(t,Condition(function QQO))set t=nullendfunctionfunction UIO takes real PHI returns booleanreturn(100*GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)/GetUnitState(GetTriggerUnit(),UNIT_STATE_MAX_LIFE))<PHIendfunctionfunction AntiTK_Building takes nothing returns booleanreturn UIO(10)and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==true and GetUnitTypeId(GetTriggerUnit())!=1702129516 and GetUnitTypeId(GetTriggerUnit())!=1970172012endfunctionfunction AntiTK_Hero takes nothing returns booleanreturn UIO(25)and(GetUnitAbilityLevel(GetTriggerUnit(),1112433775)>0 or GetUnitAbilityLevel(GetTriggerUnit(),1111847784)>0 or GetUnitAbilityLevel(GetTriggerUnit(),1110454321)>0 or GetUnitAbilityLevel(GetTriggerUnit(),1110458705)>0 or GetUnitAbilityLevel(GetTriggerUnit(),1110458704)>0 or GetUnitAbilityLevel(GetTriggerUnit(),1110455620)>0 or GetUnitAbilityLevel(GetTriggerUnit(),1110455629)>0 or GetUnitAbilityLevel(GetTriggerUnit(),1110455630)>0 or GetUnitAbilityLevel(GetTriggerUnit(),1110455631)>0)endfunctionfunction AntiTK_Creep takes nothing returns booleanreturn UIO(50)and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==false and(IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false or GetUnitTypeId(GetTriggerUnit())==1700946284 or GetUnitTypeId(GetTriggerUnit())==1697657398 or GetUnitTypeId(GetTriggerUnit())==1970107511 or GetUnitTypeId(GetTriggerUnit())==1966092370)endfunctionfunction AntiTK_Exception takes nothing returns booleanreturn GetUnitTypeId(GetTriggerUnit())==1966092371 or GetUnitTypeId(GetTriggerUnit())==1865429334 or((LoadInteger(XY,(GetHandleId((GetAttacker()))),((4328))))==1)==trueendfunctionfunction U1O takes nothing returns nothingif not((UIO(10)and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==true and GetUnitTypeId(GetTriggerUnit())!=1702129516 and GetUnitTypeId(GetTriggerUnit())!=1970172012)or(UIO(25)and(GetUnitAbilityLevel(GetTriggerUnit(),1112433775)>0 or GetUnitAbilityLevel(GetTriggerUnit(),1111847784)>0 or GetUnitAbilityLevel(GetTriggerUnit(),1110454321)>0 or GetUnitAbilityLevel(GetTriggerUnit(),1110458705)>0 or GetUnitAbilityLevel(GetTriggerUnit(),1110458704)>0 or GetUnitAbilityLevel(GetTriggerUnit(),1110455620)>0 or GetUnitAbilityLevel(GetTriggerUnit(),1110455629)>0 or GetUnitAbilityLevel(GetTriggerUnit(),1110455630)>0 or GetUnitAbilityLevel(GetTriggerUnit(),1110455631)>0))or(UIO(50)and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==false and(IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false or GetUnitTypeId(GetTriggerUnit())==1700946284 or GetUnitTypeId(GetTriggerUnit())==1697657398 or GetUnitTypeId(GetTriggerUnit())==1970107511 or GetUnitTypeId(GetTriggerUnit())==1966092370))or(GetUnitTypeId(GetTriggerUnit())==1966092371 or GetUnitTypeId(GetTriggerUnit())==1865429334 or((LoadInteger(XY,(GetHandleId((GetAttacker()))),((4328))))==1)==true))thencall IssueImmediateOrder(GetAttacker(),"stop")endifendfunctionfunction UOO takes nothing returns booleanif IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))thencall U1O()elseif IsUnitType(GetAttacker(),UNIT_TYPE_HERO)==true or OL1(GetAttacker())thenset TH0=GetPlayerId(GetOwningPlayer(GetAttacker()))if KM0[TH0]>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitTypeId(GetTriggerUnit())!=1848651852 and IsUnitIllusion(GetAttacker())==false and CT1(GetAttacker(),FK0[H50])==true thencall FJO()endifif KT0[TH0]>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitIllusion(GetAttacker())==false and(CT1(GetAttacker(),FK0[ZN0])==true or CT1(GetAttacker(),FK0[X30])==true)thencall GIO()endifif KP0[TH0]>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitIllusion(GetAttacker())==false and CT1(GetAttacker(),FK0[V50])==true thencall FRO()elseif(KQ0[TH0]>0 or LE0[TH0]>0)and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitIllusion(GetAttacker())==false and(CT1(GetAttacker(),FK0[ZM0])==true or CT1(GetAttacker(),FK0[X20])==true)thencall G0O()endifelseif GetUnitAbilityLevel(GetAttacker(),1093744467)>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false thencall Q3O()endifreturn falseendfunctionfunction U3O takes nothing returns booleanif AO1(GetSpellAbilityId())and A21(GetTriggerUnit())thencall R6I(GetTriggerUnit())endifreturn falseendfunctionfunction U5O takes nothing returns nothingcall ONO()call ORO()endfunctionfunction U7O takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT or(LoadBoolean(XY,(GetHandleId(N0I)),(140)))==true thenif(LoadBoolean(XY,(GetHandleId(N0I)),(140)))==true thencall SaveBoolean(XY,(GetHandleId(N0I)),(140),(false))call SaveInteger(XY,(GetHandleId((N0I))),((4259)),(2))call UnitRemoveAbility(N0I,1093678162)call A71(N0I,false)call PauseUnit(N0I,false)call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetSpellTargetUnit()==N0I and GetSpellAbilityId()==TV0 and(GetPlayerSlotState(GetOwningPlayer((N0I)))==PLAYER_SLOT_STATE_LEFT)and((LoadInteger(XY,(GetHandleId((N0I))),((4259))))==1)==true thencall SaveInteger(XY,(GetHandleId((N0I))),((4259)),(2))call UnitRemoveAbility(N0I,1093678162)call A71(N0I,false)call PauseUnit(N0I,false)call FlushChildHashtable(XY,(MKI))call MZI(t)endifelseif QPI(N0I)==false thencall SetUnitX(N0I,x)call SetUnitY(N0I,y)call SaveInteger(XY,(GetHandleId((N0I))),((4259)),(1))call UnitAddAbility(N0I,1093678162)call A71(N0I,true)call PauseUnit(N0I,true)endifset N0I=nullset t=nullreturn falseendfunctionfunction U8O takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit N0I=GetSpellTargetUnit()call SaveBoolean(XY,(GetHandleId(N0I)),(140),(false))call SaveInteger(XY,(GetHandleId((N0I))),((4259)),(1))call UnitAddAbility(N0I,1093678162)call A71(N0I,true)call PauseUnit(N0I,true)call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveReal(XY,(MKI),(6),((GetUnitX(N0I))*1.0))call SaveReal(XY,(MKI),(7),((GetUnitY(N0I))*1.0))call TriggerRegisterTimerEvent(t,1,true)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function U7O))set t=nullset N0I=nullendfunctionfunction U9O takes nothing returns booleanif O7I==true thenreturn falseendifif GetSpellAbilityId()==TZ0 and(GetPlayerSlotState(GetOwningPlayer((GetSpellTargetUnit())))==PLAYER_SLOT_STATE_LEFT)and((LoadInteger(XY,(GetHandleId((GetSpellTargetUnit()))),((4259))))==1)==false thencall U8O()elseif(GetSpellAbilityId()==TV0 or GetSpellAbilityId()==TZ0)and(GetPlayerSlotState(GetOwningPlayer((GetSpellTargetUnit())))==PLAYER_SLOT_STATE_LEFT)==false thencall R1I(GetOwningPlayer(GetTriggerUnit()),GetObjectName(1848652366))endifreturn falseendfunctionfunction UBO takes destructable d returns booleanlocal real x=GetDestructableX(d)local real y=GetDestructableY(d)local group g=MDI()local boolean UCOcall GroupEnumUnitsInRange(g,x,y,250,Condition(function BK1))set UCO=FirstOfGroup(g)!=nullcall MCI(g)set g=nullreturn UCOendfunctionfunction UDO takes nothing returns nothingif T5I(GetEnumDestructable())and GetDestructableLife(GetEnumDestructable())<1 and GetDestructableTypeId(GetEnumDestructable())!=1110454322 and GetDestructableTypeId(GetEnumDestructable())!=1110454323 thenif UBO(GetEnumDestructable())==false thencall DestructableRestoreLife(GetEnumDestructable(),GetDestructableMaxLife(GetEnumDestructable()),false)if QL[GetPlayerId(GetLocalPlayer())]==1 and GetDestructableTypeId(GetEnumDestructable())==1096053874 thencall SetDestructableAnimation(GetEnumDestructable(),"stand alternate")endifendifendifendfunctionfunction UEO takes nothing returns nothingcall EnumDestructablesInRectAll(bj_mapInitialPlayableArea,function UDO)endfunctionfunction UGO takes nothing returns booleanif GetUnitTypeId(GetTriggerUnit())==1848651852 thenif IsUnitIllusion(GetAttacker())==true thencall KillUnit(GetAttacker())elseif IsUnitInRegion(TX0,GetAttacker())==false thencall R1I(GetOwningPlayer(GetAttacker()),GetObjectName(1848652597))call IssueImmediateOrder(GetAttacker(),"stop")endifendifreturn falseendfunctionfunction UZO takes nothing returns booleanreturn GetUnitTypeId(GetEnteringUnit())==1697656901 or GetUnitTypeId(GetEnteringUnit())==1697657394endfunctionfunction UVO takes nothing returns nothingcall ShowUnitHide(GetEnteringUnit())call SetUnitPathing(GetEnteringUnit(),false)call SetUnitInvulnerable(GetEnteringUnit(),true)call UnitApplyTimedLifeBJ(20.00,1112820806,GetEnteringUnit())endfunctionfunction UXO takes nothing returns booleanif(GetUnitTypeId(GetDyingUnit())==1697656914)thenreturn trueendifif(GetUnitTypeId(GetDyingUnit())==1697657137)thenreturn trueendifif(GetUnitTypeId(GetDyingUnit())==1697656915)thenreturn trueendifif(GetUnitTypeId(GetDyingUnit())==1697657145)thenreturn trueendifreturn falseendfunctionfunction UYO takes nothing returns booleanif(not(GetDyingUnit()==IB0))thenreturn falseendifif(not(QPI(IC0)==true))thenreturn falseendifreturn trueendfunctionfunction UJO takes nothing returns booleanif(not(GetDyingUnit()==IC0))thenreturn falseendifif(not(QPI(IB0)==true))thenreturn falseendifreturn trueendfunctionfunction UKO takes nothing returns nothingif IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit()))thenset J[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=J[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1endifif(GetDyingUnit()==I20)thencall E71("Tower"+I2S(0)+I2S(1)+I2S(0),GetPlayerId(GetOwningPlayer(GetKillingUnit())))call A71(I50,false)call SYI(GetKillingUnit(),1)endifif(GetDyingUnit()==I30)thencall E71("Tower"+I2S(0)+I2S(1)+I2S(1),GetPlayerId(GetOwningPlayer(GetKillingUnit())))call A71(I60,false)call SYI(GetKillingUnit(),1)endifif(GetDyingUnit()==I40)thencall E71("Tower"+I2S(0)+I2S(1)+I2S(2),GetPlayerId(GetOwningPlayer(GetKillingUnit())))call A71(I70,false)call SYI(GetKillingUnit(),1)endifif(GetDyingUnit()==I50)thencall E71("Tower"+I2S(0)+I2S(2)+I2S(0),GetPlayerId(GetOwningPlayer(GetKillingUnit())))call A71(I80,false)call SYI(GetKillingUnit(),2)endifif(GetDyingUnit()==I60)thencall E71("Tower"+I2S(0)+I2S(2)+I2S(1),GetPlayerId(GetOwningPlayer(GetKillingUnit())))call A71(I90,false)call SYI(GetKillingUnit(),2)endifif(GetDyingUnit()==I70)thencall E71("Tower"+I2S(0)+I2S(2)+I2S(2),GetPlayerId(GetOwningPlayer(GetKillingUnit())))call A71(IA0,false)call SYI(GetKillingUnit(),2)endifif(GetDyingUnit()==I80)thencall E71("Tower"+I2S(0)+I2S(3)+I2S(0),GetPlayerId(GetOwningPlayer(GetKillingUnit())))call SYI(GetKillingUnit(),3)call A71(ID0,false)call A71(IG0,false)call A71(IB0,false)call A71(IC0,false)call A71(IR0,false)call A71(IP0,false)call A71(IQ0,false)call A71(IU0,false)call A71(IV0,false)call A71(IW0,false)call A71(IX0,false)call A71(IY0,false)call A71(IJ0,false)call A71(IK0,false)call A71(IL0,false)call A71(IM0,false)call A71(IN0,false)call A71(IS0,false)call A71(IT0,false)endifif(GetDyingUnit()==I90)thencall E71("Tower"+I2S(0)+I2S(3)+I2S(1),GetPlayerId(GetOwningPlayer(GetKillingUnit())))call SYI(GetKillingUnit(),3)call A71(IE0,false)call A71(IH0,false)call A71(IB0,false)call A71(IC0,false)call A71(IR0,false)call A71(IP0,false)call A71(IQ0,false)call A71(IU0,false)call A71(IV0,false)call A71(IW0,false)call A71(IX0,false)call A71(IY0,false)call A71(IJ0,false)call A71(IK0,false)call A71(IL0,false)call A71(IM0,false)call A71(IN0,false)call A71(IS0,false)call A71(IT0,false)endifif(GetDyingUnit()==IA0)thencall E71("Tower"+I2S(0)+I2S(3)+I2S(2),GetPlayerId(GetOwningPlayer(GetKillingUnit())))call SYI(GetKillingUnit(),3)call A71(IF0,false)call A71(IZ0,false)call A71(IB0,false)call A71(IC0,false)call A71(IR0,false)call A71(IP0,false)call A71(IQ0,false)call A71(IU0,false)call A71(IV0,false)call A71(IW0,false)call A71(IX0,false)call A71(IY0,false)call A71(IJ0,false)call A71(IK0,false)call A71(IL0,false)call A71(IM0,false)call A71(IN0,false)call A71(IS0,false)call A71(IT0,false)endifif GetDyingUnit()==IB0 or GetDyingUnit()==IC0 thencall E71("Tower"+I2S(0)+I2S(4)+I2S(1),GetPlayerId(GetOwningPlayer(GetKillingUnit())))call SYI(GetKillingUnit(),4)endifif(UYO())thencall A71(IO0,false)endifif(UJO())thencall A71(IO0,false)endifendfunctionfunction UMO takes nothing returns booleanif(GetUnitTypeId(GetDyingUnit())==1966092365)thenreturn trueendifif(GetUnitTypeId(GetDyingUnit())==1966092356)thenreturn trueendifif(GetUnitTypeId(GetDyingUnit())==1966092366)thenreturn trueendifif(GetUnitTypeId(GetDyingUnit())==1966092372)thenreturn trueendifreturn falseendfunctionfunction UNO takes nothing returns booleanif(not(GetDyingUnit()==CO0))thenreturn falseendifif(not(QPI(C20)==true))thenreturn falseendifreturn trueendfunctionfunction USO takes nothing returns booleanif(not(GetDyingUnit()==C20))thenreturn falseendifif(not(QPI(CO0)==true))thenreturn falseendifreturn trueendfunctionfunction UTO takes nothing returns nothingif IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit()))thenset J[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=J[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1endifif(GetDyingUnit()==BS0)thencall E71("Tower"+I2S(1)+I2S(1)+I2S(0),GetPlayerId(GetOwningPlayer(GetKillingUnit())))call A71(BP0,false)call SYI(GetKillingUnit(),1)endifif(GetDyingUnit()==BT0)thencall E71("Tower"+I2S(1)+I2S(1)+I2S(1),GetPlayerId(GetOwningPlayer(GetKillingUnit())))call A71(BQ0,false)call SYI(GetKillingUnit(),1)endifif(GetDyingUnit()==BR0)thencall E71("Tower"+I2S(1)+I2S(1)+I2S(2),GetPlayerId(GetOwningPlayer(GetKillingUnit())))call A71(BU0,false)call SYI(GetKillingUnit(),1)endifif(GetDyingUnit()==BP0)thencall E71("Tower"+I2S(1)+I2S(2)+I2S(0),GetPlayerId(GetOwningPlayer(GetKillingUnit())))call A71(C00,false)call SYI(GetKillingUnit(),2)endifif(GetDyingUnit()==BQ0)thencall E71("Tower"+I2S(1)+I2S(2)+I2S(1),GetPlayerId(GetOwningPlayer(GetKillingUnit())))call A71(CI0,false)call SYI(GetKillingUnit(),2)endifif(GetDyingUnit()==BU0)thencall E71("Tower"+I2S(1)+I2S(2)+I2S(2),GetPlayerId(GetOwningPlayer(GetKillingUnit())))call A71(C10,false)call SYI(GetKillingUnit(),2)endifif(GetDyingUnit()==C00)thencall E71("Tower"+I2S(1)+I2S(3)+I2S(0),GetPlayerId(GetOwningPlayer(GetKillingUnit())))call SYI(GetKillingUnit(),3)call A71(C30,false)call A71(C60,false)call A71(CO0,false)call A71(C20,false)call A71(CW0,false)call A71(CX0,false)call A71(CY0,false)call A71(CJ0,false)call A71(C90,false)call A71(CA0,false)call A71(CB0,false)call A71(CC0,false)call A71(CD0,false)call A71(CE0,false)call A71(CF0,false)call A71(CG0,false)call A71(CH0,false)call A71(CZ0,false)call A71(CV0,false)endifif(GetDyingUnit()==CI0)thencall E71("Tower"+I2S(1)+I2S(3)+I2S(1),GetPlayerId(GetOwningPlayer(GetKillingUnit())))call SYI(GetKillingUnit(),3)call A71(C40,false)call A71(C70,false)call A71(CO0,false)call A71(C20,false)call A71(CW0,false)call A71(CX0,false)call A71(CY0,false)call A71(CJ0,false)call A71(C90,false)call A71(CA0,false)call A71(CB0,false)call A71(CC0,false)call A71(CD0,false)call A71(CE0,false)call A71(CF0,false)call A71(CG0,false)call A71(CH0,false)call A71(CZ0,false)call A71(CV0,false)endifif(GetDyingUnit()==C10)thencall E71("Tower"+I2S(1)+I2S(3)+I2S(2),GetPlayerId(GetOwningPlayer(GetKillingUnit())))call SYI(GetKillingUnit(),3)call A71(C50,false)call A71(C80,false)call A71(CO0,false)call A71(C20,false)call A71(CW0,false)call A71(CX0,false)call A71(CY0,false)call A71(CJ0,false)call A71(C90,false)call A71(CA0,false)call A71(CB0,false)call A71(CC0,false)call A71(CD0,false)call A71(CE0,false)call A71(CF0,false)call A71(CG0,false)call A71(CH0,false)call A71(CZ0,false)call A71(CV0,false)endifif GetDyingUnit()==CO0 or GetDyingUnit()==C20 thencall E71("Tower"+I2S(1)+I2S(4)+I2S(1),GetPlayerId(GetOwningPlayer(GetKillingUnit())))call SYI(GetKillingUnit(),4)endifif(UNO())thencall A71(BN0,false)endifif(USO())thencall A71(BN0,false)endifendfunctionfunction UPO takes nothing returns booleanlocal integer x=0if GetPlayerSlotState(BO[1])==PLAYER_SLOT_STATE_EMPTY thenset x=x+1endifif GetPlayerSlotState(BO[2])==PLAYER_SLOT_STATE_EMPTY thenset x=x+1endifif GetPlayerSlotState(BO[3])==PLAYER_SLOT_STATE_EMPTY thenset x=x+1endifif GetPlayerSlotState(BO[4])==PLAYER_SLOT_STATE_EMPTY thenset x=x+1endifif GetPlayerSlotState(BO[5])==PLAYER_SLOT_STATE_EMPTY thenset x=x+1endifif GetPlayerSlotState(CO[1])==PLAYER_SLOT_STATE_EMPTY thenset x=x+1endifif GetPlayerSlotState(CO[2])==PLAYER_SLOT_STATE_EMPTY thenset x=x+1endifif GetPlayerSlotState(CO[3])==PLAYER_SLOT_STATE_EMPTY thenset x=x+1endifif GetPlayerSlotState(CO[4])==PLAYER_SLOT_STATE_EMPTY thenset x=x+1endifif GetPlayerSlotState(CO[5])==PLAYER_SLOT_STATE_EMPTY thenset x=x+1endifreturn x==9endfunctionfunction SinglePlayer_Condition takes nothing returns booleanreturn bj_isSinglePlayer and UPO()endfunctionfunction UQO takes nothing returns nothingset TY0=falseendfunctionfunction UUO takes nothing returns nothingset TK0=trueendfunctionfunction I02 takes nothing returns nothingset TY0=trueendfunctionfunction II2 takes nothing returns nothingset LK=falseset OHI=trueendfunctionfunction I12 takes nothing returns booleanif IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false thencall KillUnit(GetFilterUnit())endifreturn falseendfunctionfunction IO2 takes nothing returns nothinglocal group g=MDI()call GroupEnumUnitsOfPlayer(g,CO[0],Condition(function I12))call MCI(g)set g=nullset W3=trueendfunctionfunction I22 takes nothing returns nothinglocal group g=MDI()call GroupEnumUnitsOfPlayer(g,BO[0],Condition(function I12))call MCI(g)set g=nullset W3=trueendfunctionfunction I32 takes nothing returns booleanif GetUnitTypeId(GetFilterUnit())==1865429044 or GetUnitTypeId(GetFilterUnit())==1868921189 thencall KillUnit(GetFilterUnit())endifreturn falseendfunctionfunction I42 takes nothing returns nothinglocal group g=MDI()call GroupEnumUnitsInRange(g,0,0,9999,Condition(function I32))call MCI(g)set g=nullset W3=trueendfunctionfunction I52 takes nothing returns nothingcall I22()call IO2()set W3=trueendfunctionfunction I62 takes nothing returns booleanif IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true thencall SetHeroLevel(GetFilterUnit(),GetHeroLevel(GetFilterUnit())+RTI(TJ,1),true)endifreturn falseendfunctionfunction I72 takes nothing returns nothinglocal string I82=SubString(GetEventPlayerChatString(),6,StringLength(GetEventPlayerChatString()))local integer NGI=S2I(I82)local group g=MDI()if NGI<1 thenset NGI=1endifset TJ=NGIcall GroupEnumUnitsOfPlayer(g,GetTriggerPlayer(),Condition(function I62))call MCI(g)set g=nullset W3=trueendfunctionfunction I92 takes nothing returns nothingcall TriggerExecute(EG)set W3=trueendfunctionfunction IA2 takes nothing returns booleanif IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true thencall UnitResetCooldown(GetFilterUnit())call TimerStart(EZ0[GetPlayerId((GetOwningPlayer(GetFilterUnit())))],0,false,null)call SetUnitState(GetFilterUnit(),UNIT_STATE_LIFE,GetUnitState(GetFilterUnit(),UNIT_STATE_MAX_LIFE))call SetUnitState(GetFilterUnit(),UNIT_STATE_MANA,GetUnitState(GetFilterUnit(),UNIT_STATE_MAX_MANA))endifreturn falseendfunctionfunction IB2 takes nothing returns nothinglocal group g=MDI()call GroupEnumUnitsOfPlayer(g,GetTriggerPlayer(),Condition(function IA2))call MCI(g)set g=nullset W3=trueendfunctionfunction IC2 takes nothing returns nothingcall KillUnit(K1[GetPlayerId(GetTriggerPlayer())])set W3=trueendfunctionfunction ID2 takes nothing returns nothinglocal string IE2=SubString(GetEventPlayerChatString(),5,StringLength(GetEventPlayerChatString()))local integer F21=S2I(IE2)if F21<0 or F21>24 thenset F21=0endifcall SetFloatGameState(GAME_STATE_TIME_OF_DAY,F21)set W3=trueendfunctionfunction IF2 takes nothing returns nothinglocal string IG2=SubString(GetEventPlayerChatString(),5,StringLength(GetEventPlayerChatString()))local integer SXI=S2I(IG2)call SetPlayerState(GetTriggerPlayer(),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(GetTriggerPlayer(),PLAYER_STATE_RESOURCE_GOLD)+SXI)set W3=trueendfunctionfunction IH2 takes nothing returns nothinglocal unit IQ1=K1[GetPlayerId(GetTriggerPlayer())]local player QF1=GetTriggerPlayer()local location QB1if NWI(QF1)thenset QB1=GetRectCenter(S3)elseset QB1=GetRectCenter(O4)endifif Q2==false and QPI(IQ1)thencall ZF1(IQ1,QF1,GetLocationX(QB1),GetLocationY(QB1),true)if Q71(IQ1)==false or GetUnitAbilityLevel(IQ1,1093684567)==0 thencall ReviveHeroLoc(IQ1,QB1,true)elsecall QA1(IQ1,QB1)endifendifcall RemoveLocation(QB1)set IQ1=nullset QF1=nullset QB1=nullendfunctionfunction IZ2 takes nothing returns nothinglocal unit TLI=K1[GetPlayerId(GetTriggerPlayer())]local player IV2local unit IW2local real x=GetRectCenterX(Y5)local real y=GetRectCenterX(Y5)if NWI(GetOwningPlayer(TLI))thenset IV2=BO[1]elseset IV2=CO[1]endifset IW2=CreateUnit(IV2,1211117616,x,y,0)call SetHeroLevel(IW2,10,false)set TLI=nullset IW2=nullset IV2=nullendfunctionfunction IX2 takes nothing returns nothingcall TriggerEvaluate(YM0)endfunctionfunction IY2 takes nothing returns nothingcall TriggerEvaluate(PG)endfunctionfunction IJ2 takes nothing returns nothingcall EnumDestructablesInRectAll(bj_mapInitialPlayableArea,function UDO)endfunctionfunction IK2 takes nothing returns booleancall DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,60,"**** "+GetObjectName(1848653382)+" ****")call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,60,GetObjectName(1848653622)+" -lvlup xx, -refresh, -spawncreeps, -powerup, -neutrals, -kill, -gold xxxx, -time xx, -killsent, -killscourge, -killall, -noherolimit, -trees, -killwards, -spawnoff, -spawnon, -roshan, -respawn, -dummy")call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,60,"**** "+GetObjectName(1848653382)+" ****")return falseendfunctionfunction IL2 takes nothing returns nothinglocal player OnlyPlayer=WOlocal trigger tset TJ0=truecall DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,60,GetObjectName(1848653622)+" -lvlup xx, -refresh, -spawncreeps, -powerup, -neutrals, -kill, -gold xxxx, -time xx, -killsent, -killscourge, -killall, -noherolimit, -trees, -killwards, -spawnoff, -spawnon, -roshan, -respawn, -dummy")set t=CreateTrigger()call TriggerAddCondition(t,Condition(function IK2))call TriggerRegisterTimerEvent(t,GetRandomReal(60,100),false)set t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,BO[1],"-lvlup",false)call TriggerRegisterPlayerChatEvent(t,BO[2],"-lvlup",false)call TriggerRegisterPlayerChatEvent(t,BO[3],"-lvlup",false)call TriggerRegisterPlayerChatEvent(t,BO[4],"-lvlup",false)call TriggerRegisterPlayerChatEvent(t,BO[5],"-lvlup",false)call TriggerRegisterPlayerChatEvent(t,CO[1],"-lvlup",false)call TriggerRegisterPlayerChatEvent(t,CO[2],"-lvlup",false)call TriggerRegisterPlayerChatEvent(t,CO[3],"-lvlup",false)call TriggerRegisterPlayerChatEvent(t,CO[4],"-lvlup",false)call TriggerRegisterPlayerChatEvent(t,CO[5],"-lvlup",false)call TriggerAddAction(t,function I72)set t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,BO[1],"-spawncreeps",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-spawncreeps",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-spawncreeps",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-spawncreeps",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-spawncreeps",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-spawncreeps",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-spawncreeps",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-spawncreeps",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-spawncreeps",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-spawncreeps",true)call TriggerAddAction(t,function I92)set t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,BO[1],"-refresh",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-refresh",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-refresh",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-refresh",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-refresh",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-refresh",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-refresh",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-refresh",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-refresh",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-refresh",true)call TriggerAddAction(t,function IB2)set t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,BO[1],"-kill",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-kill",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-kill",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-kill",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-kill",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-kill",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-kill",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-kill",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-kill",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-kill",true)call TriggerAddAction(t,function IC2)set t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,BO[1],"-gold",false)call TriggerRegisterPlayerChatEvent(t,BO[2],"-gold",false)call TriggerRegisterPlayerChatEvent(t,BO[3],"-gold",false)call TriggerRegisterPlayerChatEvent(t,BO[4],"-gold",false)call TriggerRegisterPlayerChatEvent(t,BO[5],"-gold",false)call TriggerRegisterPlayerChatEvent(t,CO[1],"-gold",false)call TriggerRegisterPlayerChatEvent(t,CO[2],"-gold",false)call TriggerRegisterPlayerChatEvent(t,CO[3],"-gold",false)call TriggerRegisterPlayerChatEvent(t,CO[4],"-gold",false)call TriggerRegisterPlayerChatEvent(t,CO[5],"-gold",false)call TriggerAddAction(t,function IF2)set t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,BO[1],"-time",false)call TriggerRegisterPlayerChatEvent(t,BO[2],"-time",false)call TriggerRegisterPlayerChatEvent(t,BO[3],"-time",false)call TriggerRegisterPlayerChatEvent(t,BO[4],"-time",false)call TriggerRegisterPlayerChatEvent(t,BO[5],"-time",false)call TriggerRegisterPlayerChatEvent(t,CO[1],"-time",false)call TriggerRegisterPlayerChatEvent(t,CO[2],"-time",false)call TriggerRegisterPlayerChatEvent(t,CO[3],"-time",false)call TriggerRegisterPlayerChatEvent(t,CO[4],"-time",false)call TriggerRegisterPlayerChatEvent(t,CO[5],"-time",false)call TriggerAddAction(t,function ID2)set t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,BO[1],"-powerup",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-powerup",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-powerup",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-powerup",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-powerup",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-powerup",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-powerup",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-powerup",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-powerup",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-powerup",true)call TriggerAddAction(t,function IX2)set t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,BO[1],"-killall",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-killall",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-killall",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-killall",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-killall",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-killall",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-killall",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-killall",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-killall",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-killall",true)call TriggerAddAction(t,function I52)set t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,BO[1],"-killsent",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-killsent",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-killsent",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-killsent",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-killsent",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-killsent",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-killsent",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-killsent",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-killsent",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-killsent",true)call TriggerAddAction(t,function I22)set t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,BO[1],"-killscourge",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-killscourge",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-killscourge",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-killscourge",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-killscourge",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-killscourge",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-killscourge",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-killscourge",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-killscourge",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-killscourge",true)call TriggerAddAction(t,function IO2)set t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,BO[1],"-neutrals",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-neutrals",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-neutrals",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-neutrals",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-neutrals",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-neutrals",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-neutrals",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-neutrals",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-neutrals",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-neutrals",true)call TriggerAddAction(t,function IY2)set t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,BO[1],"-noherolimit",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-noherolimit",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-noherolimit",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-noherolimit",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-noherolimit",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-noherolimit",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-noherolimit",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-noherolimit",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-noherolimit",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-noherolimit",true)call TriggerAddAction(t,function II2)set t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,BO[1],"-trees",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-trees",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-trees",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-trees",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-trees",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-trees",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-trees",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-trees",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-trees",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-trees",true)call TriggerAddAction(t,function IJ2)set t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,BO[1],"-killwards",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-killwards",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-killwards",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-killwards",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-killwards",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-killwards",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-killwards",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-killwards",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-killwards",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-killwards",true)call TriggerAddAction(t,function I42)set t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,BO[1],"-spawnoff",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-spawnoff",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-spawnoff",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-spawnoff",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-spawnoff",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-spawnoff",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-spawnoff",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-spawnoff",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-spawnoff",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-spawnoff",true)call TriggerAddAction(t,function I02)set t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,BO[1],"-spawnon",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-spawnon",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-spawnon",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-spawnon",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-spawnon",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-spawnon",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-spawnon",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-spawnon",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-spawnon",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-spawnon",true)call TriggerAddAction(t,function UQO)set t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,BO[1],"-roshan",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-roshan",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-roshan",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-roshan",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-roshan",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-roshan",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-roshan",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-roshan",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-roshan",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-roshan",true)call TriggerAddAction(t,function UUO)set t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,BO[1],"-respawn",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-respawn",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-respawn",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-respawn",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-respawn",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-respawn",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-respawn",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-respawn",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-respawn",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-respawn",true)call TriggerAddAction(t,function IH2)set t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,BO[1],"-dummy",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-dummy",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-dummy",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-dummy",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-dummy",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-dummy",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-dummy",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-dummy",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-dummy",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-dummy",true)call TriggerAddAction(t,function IZ2)endfunctionfunction IN2 takes nothing returns booleanreturn not B0endfunctionfunction IS2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit OM1=(LoadUnitHandle(XY,(MKI),(26)))if GetUnitTypeId(OM1)!=1852010352 thencall UnitResetCooldown(OM1)call SetUnitManaPercentBJ(OM1,100)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset OM1=nullreturn falseendfunctionfunction IT2 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function IS2))call SaveUnitHandle(XY,(MKI),(26),(GetTriggerUnit()))set t=nullendfunctionfunction IR2 takes nothing returns nothinglocal trigger t=GetTriggeringTrigger()local integer IP2=NNI(OO)+NNI(AO)local integer NumRequired=RSI(IP2,IP2/2+1)local integer MKI=GetHandleId(t)set OHI=trueif RT0==false thenset TL0=truecall DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,60.00," ")call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,90.00,GetObjectName(1848653623))call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,90.00,GetObjectName(1848653624))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddAction(t,function IT2)endifendfunctionfunction IU2 takes nothing returns booleanif RR1(GetTriggerUnit())and IsUnitIllusion(GetTriggerUnit())==false thencall F61(GetOwningPlayer(GetTriggerUnit()))call E71("Level"+I2S(GetHeroLevel(GetTriggerUnit())),GetPlayerId(GetOwningPlayer(GetTriggerUnit())))endifreturn falseendfunctionfunction OI2 takes nothing returns nothingif RT0==false thencall IL2()call MZI(GetTriggeringTrigger())endifendfunctionfunction O12 takes nothing returns booleanif B0==false and(bj_isSinglePlayer and UPO())==false thencall OI2()endifreturn falseendfunctionfunction O22 takes nothing returns booleanlocal integer i=0local real O32local real O42local real xlocal real ylocal boolean O52loopexitwhen i>11if GetLocalPlayer()==Player(i)thenset O32=GetCameraTargetPositionX()set O42=GetCameraTargetPositionY()endifset i=i+1endloopset i=0call PauseGame(true)call TriggerSleepAction(0)loopexitwhen i>11if GetLocalPlayer()==Player(i)thencall SetCameraPosition(O32+1,O42+1)endifset i=i+1endloopcall TriggerSleepAction(0)call PauseGame(false)set i=0loopexitwhen i>11if GetLocalPlayer()==Player(i)thenset x=GetCameraTargetPositionX()if x==O32+1 thenset O52=falseelseset O52=trueendifcall SetCameraPosition(O32,O42)endifset i=i+1endloopreturn O52endfunctionfunction O62 takes nothing returns nothingcall CinematicModeBJ(true,bj_FORCE_ALL_PLAYERS)call PauseGame(false)call TriggerSleepAction(.0)call EnableUserControl(false)call TriggerSleepAction(.0)if O22()==false thenset TM0=trueendifcall EnableUserControl(true)call KKI(1)call CinematicModeBJ(false,bj_FORCE_ALL_PLAYERS)endfunctionfunction O72 takes nothing returns booleanlocal integer i=1local unit N0Iloopexitwhen i>5set N0I=K1[GetPlayerId(BO[i])]if N0I!=null and QPI(N0I)==false and IsUnitEnemy(N0I,GetLocalPlayer())==true thenif TM0 and(C2==false or(C2==true and(GetLocalPlayer()==DO0 or GetLocalPlayer()==D20)))thenif IsUnitVisible(N0I,GetLocalPlayer())==false thenif TK==2 thencall E41(N0I)endifelseif TK==2 thencall E21(N0I)endifendifendifendifset N0I=K1[GetPlayerId(CO[i])]if N0I!=null and QPI(N0I)==false and IsUnitEnemy(N0I,GetLocalPlayer())==true thenif TM0 and(C2==false or(C2==true and(GetLocalPlayer()==DO0 or GetLocalPlayer()==D20)))thenif IsUnitVisible(N0I,GetLocalPlayer())==false thenif TK==2 thencall E41(N0I)endifelseif TK==2 thencall E21(N0I)endifendifendifendifset i=i+1endloopset N0I=nullreturn falseendfunctionfunction O82 takes nothing returns nothinglocal trigger t=CreateTrigger()call TriggerRegisterTimerEvent(t,0.2,true)call TriggerAddCondition(t,Condition(function O72))set t=nullendfunctionfunction O92 takes nothing returns nothingcall O62()call O82()endfunctionfunction OA2 takes unit N3I returns booleanreturn(GetOwningPlayer(N3I)==BO[0])or(GetOwningPlayer(N3I)==CO[0])endfunctionfunction OB2 takes nothing returns nothingcall SetUnitUserData(GetEnumUnit(),0)call IssuePointOrderLoc(GetEnumUnit(),"attack",(O2[GetUnitAbilityLevel((GetEnumUnit()),I2)]))endfunctionfunction OC2 takes nothing returns nothingcall IssueTargetOrder(GetEnumUnit(),"attack",TT0)call GroupAddUnit(TS0,GetEnumUnit())call SetUnitUserData(GetEnumUnit(),TR0)endfunctionfunction OD2 takes nothing returns booleanlocal integer id=GetUnitTypeId(GetFilterUnit())if id==1700946284 or id==1697657398 or id==1970107511 or id==1966092370 thenreturn falseendifif IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(TT0))and(GetOwningPlayer(GetFilterUnit())==BO[0]or GetOwningPlayer(GetFilterUnit())==CO[0])and GetUnitUserData(GetFilterUnit())==0 thenreturn trueendifreturn falseendfunctionfunction OE2 takes nothing returns nothingif GetUnitCurrentOrder(GetEnumUnit())==0 and IsUnitInRange(GetEnumUnit(),TT0,GetUnitAcquireRange(GetEnumUnit()))==false thencall GroupRemoveUnit(TS0,GetEnumUnit())call SetUnitUserData(GetEnumUnit(),0)call IssuePointOrderLoc(GetEnumUnit(),"attack",(O2[GetUnitAbilityLevel((GetEnumUnit()),I2)]))endifendfunctionfunction OF2 takes nothing returns nothinglocal integer MKI=GetHandleId((LoadUnitHandle(XY,(GetHandleId(GetExpiredTimer())),(2))))local integer OG2=(LoadInteger(XY,(MKI),(143)))local group OH2=(LoadGroupHandle(XY,(MKI),(144)))set TN0[OG2]=nullcall ForGroup(OH2,function OB2)call GroupClear(OH2)set OH2=nullendfunctionfunction OZ2 takes unit N0I,unit FKO returns nothinglocal integer MKI=GetHandleId(N0I)local group OH2=(LoadGroupHandle(XY,(MKI),(144)))local integer OG2=(LoadInteger(XY,(MKI),(143)))local unit OV2=TN0[OG2]local group gif OV2!=null and OV2!=FKO thencall ForGroup(OH2,function OB2)call GroupClear(OH2)endifset TN0[OG2]=FKOset TS0=OH2set TT0=FKOset TR0=OG2call ForGroup(OH2,function OE2)set g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(FKO),GetUnitY(FKO),500,Condition(function OD2))call ForGroup(g,function OC2)call MCI(g)call TimerStart((LoadTimerHandle(XY,(MKI),(141))),2,false,function OF2)set OH2=nullset OV2=nullset g=nullendfunctionfunction OW2 takes nothing returns booleanlocal unit N0I=GetTriggerUnit()local unit TMI=GetOrderTargetUnit()local integer OX2=GetIssuedOrderId()local integer OG2if IsUnitType(TMI,UNIT_TYPE_HERO)==true and IsUnitIllusion(TMI)==false and(OX2==851983 or OX2==851971)and IsUnitEnemy(TMI,GetOwningPlayer(N0I))and IsUnitVisible(N0I,GetOwningPlayer(TMI))thenset OG2=(LoadInteger(XY,(GetHandleId(TMI)),(143)))if TN0[OG2]==null or TN0[OG2]==TMI or QPI(TN0[OG2])thenif OG2!=0 thencall OZ2(TMI,N0I)endifendifendifset N0I=nullset TMI=nullreturn falseendfunctionfunction OY2 takes nothing returns booleanlocal unit N0I=GetAttacker()local unit TMI=GetTriggerUnit()local integer OX2=GetIssuedOrderId()local integer OG2if OA2(N0I)==false thenset OG2=(LoadInteger(XY,(GetHandleId(TMI)),(143)))if TN0[OG2]==null or TN0[OG2]==TMI or QPI(TN0[OG2])thenif OG2!=0 thencall OZ2(TMI,N0I)endifendifendifset N0I=nullset TMI=nullreturn falseendfunctionfunction OJ2 takes unit N0I returns nothinglocal group glocal trigger tlocal timer tmlocal integer MKI=GetHandleId(N0I)set TP0=TP0+1call SaveBoolean(XY,(MKI),(142),(true))call SaveInteger(XY,(MKI),(143),(TP0))set g=MDI()call SaveGroupHandle(XY,(MKI),(144),(g))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_ISSUED_TARGET_ORDER)call TriggerAddCondition(t,Condition(function OW2))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function OY2))set tm=CreateTimer()call SaveTimerHandle(XY,(GetHandleId(N0I)),(141),(tm))call SaveUnitHandle(XY,(GetHandleId(tm)),(2),(N0I))set g=nullset t=nullendfunctionfunction OK2 takes nothing returns booleanif TCI(GetTriggerUnit())and(LoadBoolean(XY,(GetHandleId(GetTriggerUnit())),(142)))==false thencall OJ2(GetTriggerUnit())endifreturn falseendfunctionfunction OM2 takes nothing returns booleanif GetOwningPlayer(GetTriggerUnit())==BO[0]thencall SetUnitAbilityLevel(GetTriggerUnit(),I2,5)if TN0[GetUnitUserData(GetTriggerUnit())]==null thencall SetUnitUserData(GetTriggerUnit(),0)call IssuePointOrderLoc(GetTriggerUnit(),"attack",(O2[GetUnitAbilityLevel((GetTriggerUnit()),I2)]))endifelseif GetOwningPlayer(GetTriggerUnit())==CO[0]thencall SetUnitAbilityLevel(GetTriggerUnit(),I2,1)if TN0[GetUnitUserData(GetTriggerUnit())]==null thencall SetUnitUserData(GetTriggerUnit(),0)call IssuePointOrderLoc(GetTriggerUnit(),"attack",(O2[GetUnitAbilityLevel((GetTriggerUnit()),I2)]))endifendifreturn falseendfunctionconstant function InvisibilityUnitId takes nothing returns integerreturn 1966092354endfunctionfunction OS2 takes nothing returns nothinglocal unit XIO=GetTriggerUnit()local unit OT2=(LoadUnitHandle(XY,(GetHandleId(XIO)),(145)))call RemoveUnit(OT2)endfunctionfunction OR2 takes nothing returns nothinglocal group glocal unit XIOlocal unit OT2local trigger tlocal integer iset t=CreateTrigger()call TriggerAddAction(t,function OS2)set g=MDI()call GroupEnumUnitsOfPlayer(g,BO[0],Condition(function LWI))loopset XIO=FirstOfGroup(g)exitwhen XIO==nullcall GroupRemoveUnit(g,XIO)if GetUnitAbilityLevel(XIO,1097102451)>0 or GetUnitAbilityLevel(XIO,1098150517)>0 thencall TriggerRegisterUnitEvent(t,XIO,EVENT_UNIT_DEATH)set OT2=CreateUnit(BO[1],(1966092354),-5000,-5100,0)call SetUnitScale(OT2,0,0,0)call SetUnitPathing(OT2,false)call SetUnitInvulnerable(OT2,true)call SetUnitX(OT2,GetUnitX(XIO))call SetUnitY(OT2,GetUnitY(XIO))call SaveUnitHandle(XY,(GetHandleId(XIO)),(145),(OT2))endifendloopcall MCI(g)set g=MDI()call GroupEnumUnitsOfPlayer(g,CO[0],Condition(function LWI))loopset XIO=FirstOfGroup(g)exitwhen XIO==nullcall GroupRemoveUnit(g,XIO)if GetUnitAbilityLevel(XIO,1097102451)>0 or GetUnitAbilityLevel(XIO,1098150517)>0 thencall TriggerRegisterUnitEvent(t,XIO,EVENT_UNIT_DEATH)set OT2=CreateUnit(CO[1],(1966092354),3400,4400,0)call SetUnitScale(OT2,0,0,0)call SetUnitPathing(OT2,false)call SetUnitInvulnerable(OT2,true)call SetUnitX(OT2,GetUnitX(XIO))call SetUnitY(OT2,GetUnitY(XIO))call SaveUnitHandle(XY,(GetHandleId(XIO)),(145),(OT2))endifendloopcall MCI(g)endfunctionfunction OQ2 takes nothing returns nothinglocal unit OU2=GetTriggerUnit()local unit TMI=TN0[GetUnitUserData(OU2)]call SetUnitPosition(OU2,GetUnitX(OU2),GetUnitY(OU2))if TMI!=null and QPI(TMI)==false and IsUnitVisible(TMI,GetOwningPlayer(TMI))thencall IssueTargetOrder(OU2,"attack",TMI)elsecall DisableTrigger(GetTriggeringTrigger())call IssuePointOrderLoc(OU2,"attack",(O2[GetUnitAbilityLevel((OU2),I2)]))call EnableTrigger(GetTriggeringTrigger())endifset OU2=nullset TMI=nullendfunctionfunction A02 takes nothing returns booleanif OA2(GetTriggerUnit())thencall OQ2()endifreturn falseendfunctionfunction AI2 takes nothing returns nothinglocal unit OU2=GetTriggerUnit()local unit TMI=TN0[GetUnitUserData(OU2)]call SetUnitPosition(OU2,GetUnitX(OU2),GetUnitY(OU2))if TMI!=null and QPI(TMI)==false and IsUnitVisible(TMI,GetOwningPlayer(TMI))thencall IssueTargetOrder(OU2,"attack",TMI)elsecall DisableTrigger(GetTriggeringTrigger())call IssuePointOrderLoc(OU2,"attack",(O2[GetUnitAbilityLevel((OU2),I2)]))call EnableTrigger(GetTriggeringTrigger())endifset OU2=nullset TMI=nullendfunctionfunction A12 takes nothing returns booleanif GetIssuedOrderId()==851986 thencall AI2()endifreturn falseendfunctionfunction AO2 takes nothing returns booleanif GetOwningPlayer(GetTriggerUnit())==BO[0]thenif IsUnitFogged(GetAttacker(),BO[1])or IsUnitFogged(GetAttacker(),CO[1])thencall UMI(CreateFogModifierRadius(BO[1],FOG_OF_WAR_VISIBLE,GetUnitX(GetAttacker()),GetUnitY(GetAttacker()),128,true,false),1)endifelseif GetOwningPlayer(GetTriggerUnit())==CO[0]thenif IsUnitFogged(GetAttacker(),BO[1])or IsUnitFogged(GetAttacker(),CO[1])thencall UMI(CreateFogModifierRadius(CO[1],FOG_OF_WAR_VISIBLE,GetUnitX(GetAttacker()),GetUnitY(GetAttacker()),128,true,false),1)endifendifreturn falseendfunctionfunction A22 takes nothing returns booleanlocal trigger tlocal group glocal unit uif C2 thenset t=CreateTrigger()call TriggerRegisterPlayerUnitEvent(t,BO[0],EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER,Condition(function LWI))call TriggerRegisterPlayerUnitEvent(t,CO[0],EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER,Condition(function LWI))call TriggerAddCondition(t,Condition(function A12))set t=CreateTrigger()set g=MDI()call GroupEnumUnitsOfPlayer(g,BO[0],Condition(function LWI))loopset u=FirstOfGroup(g)exitwhen u==nullcall GroupRemoveUnit(g,u)if GetUnitAcquireRange(u)!=0 thencall TriggerRegisterUnitInRange(t,u,600,Condition(function LWI))endifendloopcall MCI(g)set g=MDI()call GroupEnumUnitsOfPlayer(g,CO[0],Condition(function LWI))loopset u=FirstOfGroup(g)exitwhen u==nullcall GroupRemoveUnit(g,u)if GetUnitAcquireRange(u)!=0 and IsUnitType(u,UNIT_TYPE_STRUCTURE)thencall TriggerRegisterUnitInRange(t,u,600,Condition(function LWI))endifendloopcall MCI(g)call TriggerAddCondition(t,Condition(function A02))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function AO2))endifcall MZI(GetTriggeringTrigger())return falseendfunctionfunction A42 takes unit N3I returns nothinglocal integer i=0loopexitwhen(i==16)if IsUnitAlly(N3I,Player(i))thencall UnitShareVision(N3I,Player(i),true)endifset i=i+1endloopendfunctionfunction A52 takes nothing returns nothingcall A42(GetEnumUnit())endfunctionfunction A62 takes nothing returns nothinglocal integer xlocal group gset x=1loopexitwhen x>5call SetPlayerAlliance(BO[0],BO[x],ConvertAllianceType(5),false)call SetPlayerAlliance(CO[0],CO[x],ConvertAllianceType(5),false)set x=x+1endloopset g=MDI()call GroupEnumUnitsOfPlayer(g,BO[0],Condition(function LWI))call ForGroup(g,function A52)call MCI(g)set g=MDI()call GroupEnumUnitsOfPlayer(g,CO[0],Condition(function LWI))call ForGroup(g,function A52)call MCI(g)set g=nullendfunctionfunction A72 takes nothing returns nothinglocal integer xset x=0loopexitwhen x>5call SetPlayerAlliance(BO[x],DO,ConvertAllianceType(0),false)call SetPlayerAlliance(BO[x],DO,ConvertAllianceType(1),false)call SetPlayerAlliance(BO[x],DO,ConvertAllianceType(2),false)call SetPlayerAlliance(BO[x],DO,ConvertAllianceType(3),false)call SetPlayerAlliance(BO[x],DO,ConvertAllianceType(4),false)call SetPlayerAlliance(BO[x],DO,ConvertAllianceType(5),false)call SetPlayerAlliance(BO[x],DO,ConvertAllianceType(6),false)call SetPlayerAlliance(BO[x],DO,ConvertAllianceType(7),false)call SetPlayerAlliance(CO[x],DO,ConvertAllianceType(0),false)call SetPlayerAlliance(CO[x],DO,ConvertAllianceType(1),false)call SetPlayerAlliance(CO[x],DO,ConvertAllianceType(2),false)call SetPlayerAlliance(CO[x],DO,ConvertAllianceType(3),false)call SetPlayerAlliance(CO[x],DO,ConvertAllianceType(4),false)call SetPlayerAlliance(CO[x],DO,ConvertAllianceType(5),false)call SetPlayerAlliance(CO[x],DO,ConvertAllianceType(6),false)call SetPlayerAlliance(CO[x],DO,ConvertAllianceType(7),false)call SetPlayerAlliance(DO,BO[x],ConvertAllianceType(0),false)call SetPlayerAlliance(DO,BO[x],ConvertAllianceType(1),false)call SetPlayerAlliance(DO,BO[x],ConvertAllianceType(2),false)call SetPlayerAlliance(DO,BO[x],ConvertAllianceType(3),false)call SetPlayerAlliance(DO,BO[x],ConvertAllianceType(4),false)call SetPlayerAlliance(DO,BO[x],ConvertAllianceType(5),false)call SetPlayerAlliance(DO,BO[x],ConvertAllianceType(6),false)call SetPlayerAlliance(DO,BO[x],ConvertAllianceType(7),false)call SetPlayerAlliance(DO,CO[x],ConvertAllianceType(0),false)call SetPlayerAlliance(DO,CO[x],ConvertAllianceType(1),false)call SetPlayerAlliance(DO,CO[x],ConvertAllianceType(2),false)call SetPlayerAlliance(DO,CO[x],ConvertAllianceType(3),false)call SetPlayerAlliance(DO,CO[x],ConvertAllianceType(4),false)call SetPlayerAlliance(DO,CO[x],ConvertAllianceType(5),false)call SetPlayerAlliance(DO,CO[x],ConvertAllianceType(6),false)call SetPlayerAlliance(DO,CO[x],ConvertAllianceType(7),false)set x=x+1endloopendfunctionfunction A82 takes nothing returns booleanreturn OA2(GetTriggerUnit())endfunctionfunction A92 takes nothing returns nothingcall A42(GetTriggerUnit())endfunctionfunction AA2 takes nothing returns nothinglocal trigger tif not C2 thenreturnendifcall A62()call A72()set t=CreateTrigger()call TriggerRegisterEnterRectSimple(t,GetWorldBounds())call TriggerAddCondition(t,Condition(function A82))call TriggerAddAction(t,function A92)set t=nullendfunctionfunction AC2 takes nothing returns nothinglocal string AD2=StringCase(GetEventPlayerChatString(),false)local boolean N7O=AD2=="-random"or AD2=="-random int"or AD2=="-random agi"or AD2=="-random str"local boolean AE2=AD2=="-repick"local boolean AF2=AD2=="-gameinfo"local boolean AG2=SubString(AD2,0,5)=="-swap"local boolean AH2=AD2=="-recreate"local boolean AZ2=AD2=="-unstuck"local boolean AV2=AD2=="-matchup"or AD2=="-ma"local boolean AW2=AD2=="-movespeed"or AD2=="-ms"local boolean AX2=AD2=="-msa"local boolean AY2=AD2=="-disablehelp"local boolean AJ2=AD2=="-enablehelp"local boolean AK2=AD2=="-creepstats"or AD2=="-cs"local boolean AL2=AD2=="-cson"or AD2=="-csoff"local boolean AM2=AD2=="-hidemsg"local boolean AN2=AD2=="-showmsg"local boolean AS2=AD2=="-weather snow"or AD2=="-weather rain"or AD2=="-weather off"or AD2=="-weather random"or AD2=="-weather wind"or AD2=="-weather moonlight"local boolean AT2=AD2=="-showdeny"or AD2=="-hidedeny"local boolean AR2=AD2=="-denyinfo"or AD2=="-di"local boolean AP2=AD2=="-don"or AD2=="-deathon"or AD2=="-doff"or AD2=="-deathoff"local boolean AQ2=SubString(AD2,0,5)=="-roll"and AD2!="-rollhero"local boolean AU2=AD2=="-hhn"or AD2=="-hideheronames"local boolean B02=AD2=="-mute"local boolean BI2=AD2=="-afk"local boolean B12=SubString(AD2,0,8)=="-kickafk"local boolean BO2=AD2=="-apm"local boolean B22=AD2=="-clear"local boolean OWO=AD2=="-courier"local boolean AH=AD2=="-ah"local boolean B32=AD2=="-invokelist"or AD2=="-il"local boolean B42=AD2=="-list"local boolean B52=AD2=="-rolloff"local boolean B62=AD2=="-rollon"local boolean B72=SubString(AD2,0,6)=="-music"local boolean B82=SubString(AD2,0,6)=="-water"local boolean B92=SubString(AD2,0,6)=="-quote"local boolean BA2=SubString(AD2,0,3)=="-cm"local boolean BB2=SubString(AD2,0,9)=="-itemswap"local boolean BC2=AD2=="-bonus"local boolean BD2=AD2=="-rollhero"or AD2=="-rh"local boolean BE2=SubString(AD2,0,9)=="-rickroll"local boolean NoSwitch=AD2=="-noswitch"local boolean BF2=SubString(AD2,0,7)=="-switch"or AD2=="-ok"or AD2=="-no"local boolean Terrain=AD2=="-terrain"or AD2=="-terrain default"or AD2=="-terrain snow"local boolean BG2=AD2=="-tips"local boolean BH2=AD2=="-ii"or AD2=="-iteminfo"local boolean BZ2=AD2=="-center"or AD2=="-centeroff"or AD2=="-c"or AD2=="-co"local boolean BV2=AD2=="-unlock"local boolean BW2=AD2=="-disableselection"or AD2=="-ds"local boolean BX2=AD2=="-enableselection"or AD2=="-es"local boolean BY2=AD2=="-sleep"local boolean BJ2=AD2=="-calm"local boolean SJI=AD2=="-st"local boolean BK2=AD2=="-nosanta"call R9I("BL2",N7O)call R9I("BM2",AE2)call R9I("BN2",AF2)call R9I("BS2",AG2)call R9I("BT2",AH2)call R9I("BR2",AZ2)call R9I("BP2",AV2)call R9I("BQ2",AW2)call R9I("BU2",AX2)call R9I("C02",AY2)call R9I("CI2",AJ2)call R9I("C12",AK2)call R9I("CO2",AL2)call R9I("C22",AM2)call R9I("C32",AN2)call R9I("C42",AS2)call R9I("C52",AT2)call R9I("C62",AR2)call R9I("C72",AP2)call R9I("C82",AQ2)call R9I("C92",AU2)call R9I("CA2",B02)call R9I("CB2",BI2)call R9I("CC2",B12)call R9I("CD2",BO2)call R9I("CE2",B22)call R9I("CF2",OWO)call R9I("CG2",AH)call R9I("CH2",B32)call R9I("CZ2",B42)call R9I("CV2",B52)call R9I("CW2",B62)call R9I("CX2",B72)call R9I("CY2",B82)call R9I("CJ2",B92)call R9I("CK2",BA2)call R9I("CL2",BB2)call R9I("CM2",BC2)call R9I("CN2",BD2)call R9I("CS2",BE2)call R9I("CT2",BF2)call R9I("CR2",BH2)call R9I("CP2",BG2)call R9I("CQ2",BZ2)call R9I("CU2",BV2)call R9I("D02",BW2)call R9I("DI2",BX2)call R9I("D12",BY2)call R9I("DO2",SJI)call R9I("D22",BJ2)call R9I("D32",BK2)endfunctionfunction CS2 takes nothing returns nothinglocal integer a=S2I(SubString(GetEventPlayerChatString(),10,StringLength(GetEventPlayerChatString())))local integer L9I=GetPlayerId(GetTriggerPlayer())set TQ0[L9I]=TQ0[L9I]+1if TQ0[L9I]>10 thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,GetObjectName(1848656977))returnendifif a<1 or a>8 thenset a=GetRandomInt(1,8)endifif a==1 thencall PDI(P2,5,C0[GetPlayerId(GetTriggerPlayer())]+(D30[GetPlayerId((GetTriggerPlayer()))])+"|r's never gonna give you up")elseif a==2 thencall PDI(P2,5,C0[GetPlayerId(GetTriggerPlayer())]+(D30[GetPlayerId((GetTriggerPlayer()))])+"|r's never gonna let you down")elseif a==3 thencall PDI(P2,5,C0[GetPlayerId(GetTriggerPlayer())]+(D30[GetPlayerId((GetTriggerPlayer()))])+"|r's never gonna run around")elseif a==4 thencall PDI(P2,5,C0[GetPlayerId(GetTriggerPlayer())]+(D30[GetPlayerId((GetTriggerPlayer()))])+"|r's never gonna desert you")elseif a==5 thencall PDI(P2,5,C0[GetPlayerId(GetTriggerPlayer())]+(D30[GetPlayerId((GetTriggerPlayer()))])+"|r's never gonna make you cry")elseif a==6 thencall PDI(P2,5,C0[GetPlayerId(GetTriggerPlayer())]+(D30[GetPlayerId((GetTriggerPlayer()))])+"|r's never gonna say goodbye")elseif a==7 thencall PDI(P2,5,C0[GetPlayerId(GetTriggerPlayer())]+(D30[GetPlayerId((GetTriggerPlayer()))])+"|r's never gonna tell a lie")elseif a==8 thencall PDI(P2,5,C0[GetPlayerId(GetTriggerPlayer())]+(D30[GetPlayerId((GetTriggerPlayer()))])+"|r's never gonna hurt you")endifendfunctionfunction D52 takes nothing returns booleanif O3==false thenreturn falseendifif S0[GetPlayerId(L2)]==true thenreturn falseendifif B0==false thenreturn falseendifif K1[GetPlayerId(L2)]!=null and B3==false thenreturn falseendifif D0[GetPlayerId(L2)]==true thenreturn falseendifif C3[GetPlayerId(L2)]and B3==false thenreturn falseendifif B3 and E3[GetPlayerId(L2)]thenreturn falseendifreturn trueendfunctionfunction D62 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local player p=(LoadPlayerHandle(XY,(MKI),(54)))local string D72=(LoadStr(XY,(MKI),(146)))set L2=pif D52()thenset S0[GetPlayerId(p)]=trueif D72=="-random int"thencall SSI(p)call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-100)elseif D72=="-random str"thencall SQI(p)call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-100)elseif D72=="-random agi"thencall SUI(p)call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-100)elsecall SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-50)call T0I(p)endifelsecall DisplayTimedTextToPlayer(p,0,U2,10,GetObjectName(1848653625))endifset t=nullset p=nullreturn falseendfunctionfunction BL2 takes nothing returns nothinglocal player NJI=GetTriggerPlayer()local trigger tset L2=NJIif D52()and F3[GetPlayerId(NJI)]==false thenset F3[GetPlayerId(NJI)]=truecall S0I(NJI)call DisplayTimedTextToPlayer(NJI,0,U2,10,GetObjectName(1848653633))set t=CreateTrigger()call TriggerRegisterTimerEvent(t,6,false)call TriggerAddCondition(t,Condition(function D62))call SavePlayerHandle(XY,(GetHandleId(t)),(54),(NJI))call SaveStr(XY,(GetHandleId(t)),(146),(StringCase(GetEventPlayerChatString(),false)))endifset t=nullendfunctionfunction D82 takes nothing returns booleanlocal unit N0I=K1[GetPlayerId(GetTriggerPlayer())]if IJI thencall R1I(GetTriggerPlayer(),GetObjectName(1848652592))return falseendifif A3==false thenif UL0==false and N2==false and Q80==false and UM==false and I6I==false and IBI==false and B3==false and E2==false thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,"-repick "+GetObjectName(1848653122))endifreturn falseendifif(D0[GetPlayerId(GetTriggerPlayer())]==true)thenreturn falseendifif(K1[GetPlayerId(GetTriggerPlayer())]==null)thenreturn falseendifif X0 or N2 or B3 thenreturn falseendifif(H3==true)thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,GetObjectName(1848653104))return falseendifif(GetPlayerState(GetTriggerPlayer(),PLAYER_STATE_RESOURCE_GOLD)<T0)thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,GetObjectName(1848653113))return falseendifif GetPlayerState(GetTriggerPlayer(),PLAYER_STATE_RESOURCE_GOLD)<350 and K0 or J2 thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,GetObjectName(1848653141))return falseendifif GetUnitState(N0I,UNIT_STATE_MANA)!=GetUnitState(N0I,UNIT_STATE_MAX_MANA)or GetUnitState(N0I,UNIT_STATE_LIFE)!=GetUnitState(N0I,UNIT_STATE_MAX_LIFE)thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,GetObjectName(1848653130))return falseendifreturn trueendfunctionfunction D92 takes nothing returns nothingif(IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)==true)thenif(GetUnitTypeId(GetEnumUnit())==1429221430)thencall ExecuteFunc("UB1")elseif GetUnitTypeId(GetEnumUnit())==1429221432 or GetUnitTypeId(GetEnumUnit())==1160786229 thenset JK=GetEnumUnit()call ExecuteFunc("I7O")endifcall PDI(KQI(GetTriggerPlayer()),10.00,GetObjectName(1848653132)+" "+MNI(GetEnumUnit())+".")endifif(GetUnitTypeId(GetEnumUnit())==1848651828)thencall RemoveUnit(GetEnumUnit())endifif(GetUnitTypeId(GetEnumUnit())==1848652088)thencall RemoveUnit(GetEnumUnit())endifif(GetUnitTypeId(GetEnumUnit())==1848652099)thencall RemoveUnit(GetEnumUnit())endifif(GetUnitTypeId(GetEnumUnit())==1848652103)thencall RemoveUnit(GetEnumUnit())endifendfunctionfunction DA2 takes nothing returns nothinglocal player NJI=GetTriggerPlayer()local group GK1=MDI()local integer STIlocal integer SRIlocal location SPIlocal unit RepickedUnitlocal integer S7Ilocal integer SIIlocal integer S1Ilocal unit DB2local location GP1=GetRectCenter(N4)local location GQ1=GetRectCenter(S4)set bj_groupEnumOwningPlayer=NJIcall GroupEnumUnitsInRect(GK1,GetWorldBounds(),filterGetUnitsInRectOfPlayer)if(NZI(NJI)==true)thenset STI=D90set SRI=DA0set SPI=GetRectCenter(F4)elseset STI=DB0set SRI=DC0set SPI=GetRectCenter(E4)endifif Y0 thenif(GetRandomInt(1,2)==1)thenset STI=D90set SRI=DA0elseset STI=DB0set SRI=DC0endifendifif K0 or J2 thenset T0=100endifset DB2=(LoadUnitHandle(XY,(GetHandleId(GetTriggerPlayer())),(147)))if DB2!=null and GetUnitTypeId(DB2)==1697656899 thencall RemoveUnit(DB2)endifcall AdjustPlayerStateBJ(-1*T0,NJI,PLAYER_STATE_RESOURCE_GOLD)set D0[GetPlayerId(NJI)]=truecall ForGroup(GK1,function D92)if S0[GetPlayerId(NJI)]==true thencall NUI(GetUnitTypeId(K1[GetPlayerId(NJI)]))endifcall RKI(K1[GetPlayerId(NJI)])set K1[GetPlayerId(GetTriggerPlayer())]=nullif K0 or J2 thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,60,GetObjectName(1311782233))if K0 thenset SII=D90set S1I=DC0endifif NZI(NJI)thenif J2 thenset SII=D90set S1I=DA0call CreateUnitAtLoc(NJI,1848651843,GP1,bj_UNIT_FACING)elsecall CreateUnitAtLoc(NJI,1848651843,GP1,bj_UNIT_FACING)call CreateUnitAtLoc(NJI,1848651843,GQ1,bj_UNIT_FACING)endifcall PanCameraToTimedLocForPlayer(NJI,GP1,0)elseif J2 thenset SII=DB0set S1I=DC0call CreateUnitAtLoc(NJI,1848651843,GQ1,bj_UNIT_FACING)elsecall CreateUnitAtLoc(NJI,1848651843,GP1,bj_UNIT_FACING)call CreateUnitAtLoc(NJI,1848651843,GQ1,bj_UNIT_FACING)endifcall PanCameraToTimedLocForPlayer(NJI,GQ1,0)endifloopexitwhen SII>S1Iif R[SII]==false thencall SetPlayerTechMaxAllowed(NJI,D70[SII],1)endifset SII=SII+1endloopcall RemoveLocation(GP1)call RemoveLocation(GQ1)returnendifloopset S7I=GetRandomInt(STI,SRI)if(R[S7I]==false)thenset R[S7I]=trueset K1[GetPlayerId(NJI)]=CreateUnitAtLoc(NJI,D70[S7I],SPI,bj_UNIT_FACING)call NPI(D70[S7I])endifexitwhen K1[GetPlayerId(GetTriggerPlayer())]!=nullendloopcall MCI(GK1)call RemoveLocation(SPI)call RemoveLocation(GP1)call RemoveLocation(GQ1)endfunctionfunction BM2 takes nothing returns nothingif D82()thencall DA2()endifendfunctionfunction BN2 takes nothing returns nothinglocal player NJI=GetTriggerPlayer()local string DD2="|c006699CC"if I6I thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"League Mode"+"|r:      "+GetObjectName(1848653621))endifif IBI thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"Extended League"+"|r:      "+GetObjectName(1848653634))call DisplayTimedTextToPlayer(NJI,0,U2,20,"                                 "+GetObjectName(1848653616))endifif X0 thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"Death Match"+"|r:        "+GetObjectName(1848653402))call DisplayTimedTextToPlayer(NJI,0,U2,20,"                              "+GetObjectName(1848653401)+" "+I2S(RSI(DA0,DC0-DB0+1))+" "+GetObjectName(1848653635))endifif E2 thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"Mirror Match"+"|r:       "+GetObjectName(1848653399))endifif K0 thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"All Pick"+"|r:                 "+GetObjectName(1848653398))endifif Q80 thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"Random Draft"+"|r:                 "+GetObjectName(1848653618))endifif UL0 thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"Single Draft"+"|r:                 "+GetObjectName(1848653639))endifif Y0 thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"All Random"+"|r:          "+GetObjectName(1848653617))endifif N2 thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"Vote Random"+"|r:         "+GetObjectName(1848653620))endifif J0 thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"Team Random"+"|r:     "+GetObjectName(1848653389))endifif B3 thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"Reverse"+"|r:                 "+GetObjectName(1848653619))endifif FO thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"Shuffle Players"+"|r:     "+GetObjectName(1848653640))endifif H2 thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"All Agility"+"|r:             "+GetObjectName(1848653644))endifif V2 thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"All Strength"+"|r:         "+GetObjectName(1848653643))endifif Z2 thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"All Intelligence"+"|r:    "+GetObjectName(1848653642))endifif IGI thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"Range Only"+"|r:    "+GetObjectName(1848657716))endifif IFI thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"Melee Only"+"|r:    "+GetObjectName(1848657717))endifif F2 thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"Duplicate Mode"+"|r:   "+GetObjectName(1848653641))endifif L0 thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"Item Drop"+"|r:             "+GetObjectName(1848653638))endifif P0 thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"No Powerups"+"|r:        "+GetObjectName(1848653645))endifif Q0 thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"Super Creeps"+"|r:        "+GetObjectName(1848653646))call DisplayTimedTextToPlayer(NJI,0,U2,20,"                             "+GetObjectName(1848653647))endifif R0 thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"Easy Mode"+"|r:           "+GetObjectName(1848653652))endifif Y2 thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"Same Hero"+"|r:           "+GetObjectName(1848653653)+" "+(D30[GetPlayerId((WO))])+"|r"+" "+GetObjectName(1848653655))endifif IHI thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"Only Mid"+"|r:           "+GetObjectName(1848653872))endifif IVI thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"No Bot"+"|r:           "+GetObjectName(1848653654))endifif IXI thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"No Mid"+"|r:           "+GetObjectName(1848653651))endifif IYI thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"No Top"+"|r:           "+GetObjectName(1848653650))endifif BL thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"No Swap"+"|r:           "+GetObjectName(1848653656))endifif BL thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"No Repick"+"|r:           "+GetObjectName(1848653649))endifif EL thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"Pool Mode"+"|r:           "+GetObjectName(1848653657))endifif IKI thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"Observer Info"+"|r:           "+GetObjectName(1848653658))endifif IMI thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"Mini Hereos"+"|r:           "+GetObjectName(1848657219))endifif INI thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"Fast Respawn"+"|r:           "+GetObjectName(1848656976))endifif IN thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"Captains Mode"+"|r:           "+GetObjectName(1848657220))endifif DL thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"Experimental Runes"+"|r:           "+GetObjectName(1848657718))endifif UM thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"Captains Draft"+"|r:           "+GetObjectName(1848657734))endifif IRI thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"Capture Point"+"|r:           "+GetObjectName(1848658760))endifif ISI thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"Capture Point"+"|r:           "+GetObjectName(1848658761))endifif J2 thencall DisplayTimedTextToPlayer(NJI,0,U2,20,DD2+"Normal Mode"+"|r:        "+GetObjectName(1848653648))endifendfunctionfunction DF2 takes nothing returns nothingif GetUnitTypeId(GetEnumUnit())==1848651828 thencall RemoveUnit(GetEnumUnit())endifif GetUnitTypeId(GetEnumUnit())==1865429043 thencall RemoveUnit(GetEnumUnit())endifendfunctionfunction DG2 takes unit u1,unit u2 returns nothinglocal player Me=GetOwningPlayer(u1)local player DH2=GetOwningPlayer(u2)local unit DZ2=CreateUnit(Me,1697657158,0,0,0)local group glocal item ZVOlocal integer DV2if S0[GetPlayerId(Me)]==true thenif GetPlayerState(Me,PLAYER_STATE_RESOURCE_GOLD)<100 thenreturnendifendifif S0[GetPlayerId(DH2)]==true thenif GetPlayerState(DH2,PLAYER_STATE_RESOURCE_GOLD)<100 thenreturnendifendifif S0[GetPlayerId(Me)]==true and D0[GetPlayerId(Me)]==false and TU0[GetPlayerId(Me)]==0 thenset TU0[GetPlayerId(Me)]=1call SetPlayerState(Me,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(Me,PLAYER_STATE_RESOURCE_GOLD)-100)endifif S0[GetPlayerId(DH2)]==true and D0[GetPlayerId(DH2)]==false and TU0[GetPlayerId(DH2)]==0 thenset TU0[GetPlayerId(DH2)]=1call SetPlayerState(DH2,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(DH2,PLAYER_STATE_RESOURCE_GOLD)-100)endifset DV2=EW0[GetPlayerId(Me)]set EW0[GetPlayerId(Me)]=EW0[GetPlayerId(DH2)]set EW0[GetPlayerId(DH2)]=DV2call DisableTrigger(L30)if GetUnitAbilityLevel(u1,1093677893)>0 thenset GM=u1set HM=u2call ExecuteFunc("DW2")elseif GetUnitAbilityLevel(u2,1093677893)>0 thenset GM=u2set HM=u1call ExecuteFunc("DW2")endifif GetUnitAbilityLevel(u1,1093682009)>0 thenset GM=u1set HM=u2call ExecuteFunc("DX2")elseif GetUnitAbilityLevel(u2,1093682009)>0 thenset GM=u2set HM=u1call ExecuteFunc("DX2")endifif GetUnitAbilityLevel(u1,1093743444)>0 thenset GM=u1set HM=u2call ExecuteFunc("DY2")elseif GetUnitAbilityLevel(u2,1093743444)>0 thenset GM=u2set HM=u1call ExecuteFunc("DY2")endifcall FlushChildHashtable(XY,(800+GetPlayerId(GetOwningPlayer(u1))))call FlushChildHashtable(XY,(800+GetPlayerId(GetOwningPlayer(u2))))set g=MDI()set bj_groupEnumOwningPlayer=Mecall GroupEnumUnitsInRect(g,GetWorldBounds(),filterGetUnitsInRectOfPlayer)call ForGroup(g,function DF2)call MCI(g)set g=MDI()set bj_groupEnumOwningPlayer=DH2call GroupEnumUnitsInRect(g,GetWorldBounds(),filterGetUnitsInRectOfPlayer)call ForGroup(g,function DF2)call MCI(g)call SetUnitOwner(u2,Me,true)call SetUnitOwner(u1,DH2,true)set K1[GetPlayerId(Me)]=u2set K1[GetPlayerId(DH2)]=u1call SetPlayerName(Me,(D30[GetPlayerId((Me))])+" ("+MNI(K1[GetPlayerId(Me)])+")")call SetPlayerName(DH2,(D30[GetPlayerId((DH2))])+" ("+MNI(K1[GetPlayerId(DH2)])+")")call UnitAddItem(DZ2,UnitItemInSlot(u2,0))call UnitAddItem(DZ2,UnitItemInSlot(u2,1))call UnitAddItem(DZ2,UnitItemInSlot(u2,2))call UnitAddItem(DZ2,UnitItemInSlot(u2,3))call UnitAddItem(DZ2,UnitItemInSlot(u2,4))call UnitAddItem(DZ2,UnitItemInSlot(u2,5))set ZVO=UnitItemInSlot(u1,0)if ZVO!=null thencall SetItemPlayer(ZVO,Me,false)call SetItemUserData(ZVO,1)call UnitAddItem(u2,ZVO)endifset ZVO=UnitItemInSlot(u1,1)if ZVO!=null thencall SetItemPlayer(ZVO,Me,false)call SetItemUserData(ZVO,1)call UnitAddItem(u2,ZVO)endifset ZVO=UnitItemInSlot(u1,2)if ZVO!=null thencall SetItemPlayer(ZVO,Me,false)call SetItemUserData(ZVO,1)call UnitAddItem(u2,ZVO)endifset ZVO=UnitItemInSlot(u1,3)if ZVO!=null thencall SetItemPlayer(ZVO,Me,false)call SetItemUserData(ZVO,1)call UnitAddItem(u2,ZVO)endifset ZVO=UnitItemInSlot(u1,4)if ZVO!=null thencall SetItemPlayer(ZVO,Me,false)call SetItemUserData(ZVO,1)call UnitAddItem(u2,ZVO)endifset ZVO=UnitItemInSlot(u1,5)if ZVO!=null thencall SetItemPlayer(ZVO,Me,false)call SetItemUserData(ZVO,1)call UnitAddItem(u2,ZVO)endifset ZVO=UnitItemInSlot(DZ2,0)if ZVO!=null thencall SetItemPlayer(ZVO,DH2,false)call SetItemUserData(ZVO,1)call UnitAddItem(u1,ZVO)endifset ZVO=UnitItemInSlot(DZ2,1)if ZVO!=null thencall SetItemPlayer(ZVO,DH2,false)call SetItemUserData(ZVO,1)call UnitAddItem(u1,ZVO)endifset ZVO=UnitItemInSlot(DZ2,2)if ZVO!=null thencall SetItemPlayer(ZVO,DH2,false)call SetItemUserData(ZVO,1)call UnitAddItem(u1,ZVO)endifset ZVO=UnitItemInSlot(DZ2,3)if ZVO!=null thencall SetItemPlayer(ZVO,DH2,false)call SetItemUserData(ZVO,1)call UnitAddItem(u1,ZVO)endifset ZVO=UnitItemInSlot(DZ2,4)if ZVO!=null thencall SetItemPlayer(ZVO,DH2,false)call SetItemUserData(ZVO,1)call UnitAddItem(u1,ZVO)endifset ZVO=UnitItemInSlot(DZ2,5)if ZVO!=null thencall SetItemPlayer(ZVO,DH2,false)call SetItemUserData(ZVO,1)call UnitAddItem(u1,ZVO)endifcall RemoveUnit(DZ2)call EnableTrigger(L30)if(IsUnitType(u1,UNIT_TYPE_MELEE_ATTACKER)==true or GetUnitTypeId(u1)==1211119187)and DB1(u1,FK0[HZ0])!=null thencall UnitRemoveItem(u1,DB1(u1,FK0[HZ0]))elseif(IsUnitType(u1,UNIT_TYPE_RANGED_ATTACKER)==true or GetUnitTypeId(u1)==1211119187)and DB1(u1,FK0[HH0])!=null thencall UnitRemoveItem(u1,DB1(u1,FK0[HH0]))endifif(IsUnitType(u2,UNIT_TYPE_MELEE_ATTACKER)==true or GetUnitTypeId(u1)==1211119187)and DB1(u2,FK0[HZ0])!=null thencall UnitRemoveItem(u1,DB1(u2,FK0[HZ0]))elseif(IsUnitType(u2,UNIT_TYPE_RANGED_ATTACKER)==true or GetUnitTypeId(u1)==1211119187)and DB1(u2,FK0[HH0])!=null thencall UnitRemoveItem(u1,DB1(u2,FK0[HH0]))endifif GetUnitTypeId(u1)==1211119187 and DB1(u1,FK0[HH0])!=null thencall UnitRemoveItem(u1,DB1(u1,FK0[HH0]))elseif GetUnitTypeId(u1)==1211119187 and DB1(u1,FK0[HZ0])!=null thencall UnitRemoveItem(u1,DB1(u1,FK0[HZ0]))endifif GetUnitTypeId(u2)==1211119187 and DB1(u2,FK0[HH0])!=null thencall UnitRemoveItem(u2,DB1(u2,FK0[HH0]))elseif GetUnitTypeId(u2)==1211119187 and DB1(u2,FK0[HZ0])!=null thencall UnitRemoveItem(u2,DB1(u2,FK0[HZ0]))endifif(IsUnitType(u1,UNIT_TYPE_MELEE_ATTACKER)==true)and DB1(u1,FK0[WR0])!=null thencall UnitRemoveItem(u1,DB1(u1,FK0[WR0]))elseif(IsUnitType(u1,UNIT_TYPE_RANGED_ATTACKER)==true)and DB1(u1,FK0[HH0])!=null thencall UnitRemoveItem(u1,DB1(u1,FK0[HH0]))endifif(IsUnitType(u2,UNIT_TYPE_MELEE_ATTACKER)==true)and DB1(u2,FK0[WR0])!=null thencall UnitRemoveItem(u1,DB1(u2,FK0[WR0]))elseif(IsUnitType(u2,UNIT_TYPE_RANGED_ATTACKER)==true)and DB1(u2,FK0[WT0])!=null thencall UnitRemoveItem(u1,DB1(u2,FK0[WT0]))endifcall ClearSelectionForPlayer(Me)call SelectUnitAddForPlayer(u2,Me)call ClearSelectionForPlayer(DH2)call SelectUnitAddForPlayer(u1,DH2)call FlushChildHashtable(XY,(800+GetPlayerId(Me)))call FlushChildHashtable(XY,(800+GetPlayerId(DH2)))set CK=u1call ExecuteFunc("P71")set CK=u2call ExecuteFunc("P71")call E51(GetOwningPlayer(u1),"9",GetUnitTypeId(u1))call E51(GetOwningPlayer(u2),"9",GetUnitTypeId(u2))call E71("SWAP_"+I2S(GetPlayerId(GetOwningPlayer(u1)))+"_"+I2S(GetPlayerId(GetOwningPlayer(u2))),GetUnitTypeId(u1))call E71("SWAP_"+I2S(GetPlayerId(GetOwningPlayer(u2)))+"_"+I2S(GetPlayerId(GetOwningPlayer(u1))),GetUnitTypeId(u2))call F61(Me)call F61(DH2)set Me=nullset DH2=nullset g=nullset DZ2=nullset ZVO=nullendfunctionfunction DJ2 takes unit u1,unit u2 returns booleanreturn(LoadBoolean(XY,(800+GetPlayerId(GetOwningPlayer(u2))),(GetUnitTypeId(u1)+GetUnitTypeId(u2))))endfunctionfunction SwapHero_Off takes nothing returns nothingcall FlushChildHashtable(XY,(800+GetPlayerId(GetTriggerPlayer())))endfunctionfunction DK2 takes player p returns integerlocal integer i=1loopexitwhen i>5if BO[i]==p or CO[i]==p thenreturn iendifset i=i+1endloopreturn-1endfunctionfunction DL2 takes unit u1,unit u2,boolean DM2 returns booleancall SaveBoolean(XY,(800+GetPlayerId(GetOwningPlayer(u1))),(GetUnitTypeId(u1)+GetUnitTypeId(u2)),(true))if DJ2(u1,u2)thencall DG2(u1,u2)return trueelsecall DisplayTimedTextToPlayer(GetOwningPlayer(u2),0,U2,30,"  ")call DisplayTimedTextToPlayer(GetOwningPlayer(u2),0,U2,30,"                         "+C0[GetPlayerId(GetOwningPlayer(u1))]+GetUnitName(u1)+"|r |cff99ccff"+GetObjectName(1848653874)+" "+GetObjectName(1848653875)+"|r |c00ff0303-swap "+I2S(DK2(GetOwningPlayer(u1)))+"|r |cff99ccff"+GetObjectName(1848653873)+"|r")call DisplayTimedTextToPlayer(GetOwningPlayer(u2),0,U2,30,"  ")if DM2 thencall DisplayTimedTextToPlayer(GetOwningPlayer(u1),0,U2,30,"  ")call DisplayTimedTextToPlayer(GetOwningPlayer(u1),0,U2,30,"|cff99ccff"+GetObjectName(1848653891)+" |r"+C0[GetPlayerId(GetOwningPlayer(u2))]+GetUnitName(u2)+"|r")call DisplayTimedTextToPlayer(GetOwningPlayer(u1),0,U2,30,"  ")endifendifreturn falseendfunctionfunction DN2 takes nothing returns nothinglocal integer i=S2I(SubString(GetEventPlayerChatString(),6,StringLength(GetEventPlayerChatString())))if GetEventPlayerChatString()=="-swapall"thenset i=1set DK=K1[GetPlayerId(GetTriggerPlayer())]loopexitwhen i>5if NZI(GetTriggerPlayer())thenset VK=BO[i]elseset VK=CO[i]endifset CK=K1[GetPlayerId(VK)]if not(DK==null or GetOwningPlayer(DK)!=GetTriggerPlayer()or CK==null or GetOwningPlayer(CK)!=VK or VK==GetTriggerPlayer())thenif DL2(DK,CK,false)thenreturnendifendifset i=i+1endloopreturnelseif i<1 or i>5 thencall R1I(GetTriggerPlayer(),GetObjectName(1848652378))returnendifset DK=K1[GetPlayerId(GetTriggerPlayer())]if NZI(GetTriggerPlayer())thenset VK=BO[i]elseset VK=CO[i]endifset CK=K1[GetPlayerId(VK)]if DK==null or GetOwningPlayer(DK)!=GetTriggerPlayer()or CK==null or GetOwningPlayer(CK)!=VK or VK==GetTriggerPlayer()thencall R1I(GetTriggerPlayer(),GetObjectName(1848652378))returnendifcall DL2(DK,CK,true)endfunctionfunction DS2 takes nothing returns nothinglocal integer ilocal player plocal unit ulocal string sif GetLocalPlayer()==GetTriggerPlayer()thencall ClearTextMessages()endifcall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,45,"|cff99ccff"+GetObjectName(1848653890)+"|r")call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,45," ")set i=1loopexitwhen i>5set p=BO[i]set u=K1[GetPlayerId(p)]if IsPlayerAlly(GetTriggerPlayer(),p)and GetTriggerPlayer()!=p and u!=null and GetOwningPlayer(u)==p thenset s=" "if DJ2(K1[GetPlayerId(GetTriggerPlayer())],u)thenset s=" |c00ff0303("+GetObjectName(1848653877)+")|r"endifcall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,45,C0[GetPlayerId(p)]+I2S(i)+"|r"+" - "+"|cff99ccff"+GetUnitName(u)+"|r"+s)endifset p=CO[i]set u=K1[GetPlayerId(p)]if IsPlayerAlly(GetTriggerPlayer(),p)and GetTriggerPlayer()!=p and u!=null and GetOwningPlayer(u)==p thenset s=" "if DJ2(K1[GetPlayerId(GetTriggerPlayer())],u)thenset s=" |c00ff0303("+GetObjectName(1848653877)+")|r"endifcall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,45,C0[GetPlayerId(p)]+I2S(i)+"|r"+" - "+"|cff99ccff"+GetUnitName(u)+"|r"+s)endifset i=i+1endloopcall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,45," ")call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,45,"|cff99ccff"+GetObjectName(1848653875)+"|r |c00ff0303-swap #|r |cff99ccff"+GetObjectName(1848653878)+" -swapcancel "+GetObjectName(1848653879)+"|r")call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,45," ")endfunctionfunction DT2 takes player KUI returns booleanlocal integer SII=1local integer DR2=0loopexitwhen SII>5if NZI(KUI)thenif K1[GetPlayerId(BO[SII])]!=null and BO[SII]!=KUI and GetHeroLevel(K1[GetPlayerId(BO[SII])])==1 thenset DR2=DR2+1endifelseif K1[GetPlayerId(CO[SII])]!=null and CO[SII]!=KUI and GetHeroLevel(K1[GetPlayerId(CO[SII])])==1 thenset DR2=DR2+1endifendifset SII=SII+1endloopif DR2>0 thenreturn trueelsereturn falseendifendfunctionfunction DP2 takes nothing returns booleanif BL or CL==false thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,"-swaphero "+GetObjectName(1848653880))return falseendifif S0[GetPlayerId(GetTriggerPlayer())]==true thenif GetPlayerState(GetTriggerPlayer(),PLAYER_STATE_RESOURCE_GOLD)<100 thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,GetObjectName(1311788372))return falseendifendifif GetUnitState(K1[GetPlayerId(GetTriggerPlayer())],UNIT_STATE_LIFE)<1 thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,GetObjectName(1848653894))return falseendifif IL==true thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,GetObjectName(1848653895)+" -swaphero.")return falseendifif DT2(GetTriggerPlayer())==false thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,GetObjectName(1848653896))return falseendifreturn trueendfunctionfunction BS2 takes nothing returns nothingif DP2()thenif GetEventPlayerChatString()=="-swap"or GetEventPlayerChatString()=="-swaphero"thencall DS2()elseif GetEventPlayerChatString()=="-swapcancel"thencall FlushChildHashtable(XY,(800+GetPlayerId(GetTriggerPlayer())))elsecall DN2()endifendifendfunctionfunction DQ2 takes nothing returns booleanreturn GetSpellAbilityId()==1093682761endfunctionfunction DU2 takes integer QRI,unit E02,unit EI2 returns nothinglocal integer SII=1local integer S1I=GetUnitAbilityLevel(E02,QRI)loopexitwhen SII>S1Icall SelectHeroSkill(EI2,QRI)set SII=SII+1endloopendfunctionfunction E12 takes nothing returns nothinglocal integer SIIlocal integer S1Ilocal unit EO2local location O4O=GetUnitLoc(GetTriggerUnit())set EO2=CreateUnitAtLoc(GetOwningPlayer(GetTriggerUnit()),GetUnitTypeId(GetTriggerUnit()),O4O,bj_UNIT_FACING)call SetHeroXP(EO2,GetHeroXP(GetTriggerUnit()),false)set SII=1set S1I=GetUnitAbilityLevel(GetTriggerUnit(),1096904043)loopexitwhen SII>S1Icall SelectHeroSkill(bj_lastCreatedUnit,1096904043)set SII=SII+1endloopset SII=0set S1I=5loopexitwhen SII>S1Icall UnitAddItem(EO2,UnitItemInSlot(GetTriggerUnit(),SII))set SII=SII+1endloopif(GetUnitTypeId(GetTriggerUnit())==1164277353)thencall DU2(1093678156,GetTriggerUnit(),EO2)call DU2(1093683252,GetTriggerUnit(),EO2)call DU2(1095071337,GetTriggerUnit(),EO2)call DU2(1093678929,GetTriggerUnit(),EO2)endifif(GetUnitTypeId(GetTriggerUnit())==1429221432)thencall DU2(1093677892,GetTriggerUnit(),EO2)call DU2(1093677639,GetTriggerUnit(),EO2)call DU2(1093677893,GetTriggerUnit(),EO2)call DU2(1093679411,GetTriggerUnit(),EO2)endifif(GetUnitTypeId(GetTriggerUnit())==1429221431)thencall DU2(1093682745,GetTriggerUnit(),EO2)call DU2(1093678681,GetTriggerUnit(),EO2)call DU2(1093677381,GetTriggerUnit(),EO2)call DU2(1093677624,GetTriggerUnit(),EO2)endifif(GetUnitTypeId(GetTriggerUnit())==1215063922)thencall DU2(1093677895,GetTriggerUnit(),EO2)call DU2(1093677894,GetTriggerUnit(),EO2)call DU2(1093685043,GetTriggerUnit(),EO2)call DU2(1095068013,GetTriggerUnit(),EO2)endifif(GetUnitTypeId(GetTriggerUnit())==1164666213)thencall DU2(1093677877,GetTriggerUnit(),EO2)call DU2(1093678679,GetTriggerUnit(),EO2)call DU2(1093678678,GetTriggerUnit(),EO2)call DU2(1093678680,GetTriggerUnit(),EO2)endifcall RKI(GetTriggerUnit())call RemoveLocation(O4O)set K1[GetPlayerId(GetOwningPlayer(EO2))]=EO2endfunctionfunction E22 takes nothing returns booleanlocal integer NOI=GetUnitTypeId(K1[GetPlayerId(GetTriggerPlayer())])return(NOI==1429221432 or NOI==1429221431 or NOI==1215063922 or NOI==1164277353 or NOI==1164666213)and(RectContainsUnit(G5,K1[GetPlayerId(GetTriggerPlayer())])or RectContainsUnit(H5,K1[GetPlayerId(GetTriggerPlayer())]))endfunctionfunction E32 takes nothing returns nothinglocal unit N0I=K1[GetPlayerId(GetTriggerPlayer())]call UnitAddAbility(N0I,1093682761)call IssueImmediateOrder(N0I,"chemicalrage")call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,120.00,"|c00ff0303"+GetObjectName(1848653897)+" "+MNI(GetEnumUnit())+". "+GetObjectName(1848653898)+"|r")endfunctionfunction BT2 takes nothing returns nothingif E22()thencall E32()endifendfunctionfunction E52 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local integer MFI=GetTriggerEvalCount(t)local real xlocal real yif GetTriggerEventId()==EVENT_UNIT_DEATH or MFI>60 thenif((LoadInteger(XY,(GetHandleId((N0I))),((4259))))==1)==false thenif NZI(GetOwningPlayer(N0I))thenset x=GetRectCenterX(O4)set y=GetRectCenterY(O4)elseset x=GetRectCenterX(S3)set y=GetRectCenterY(S3)endifcall SetUnitPosition(N0I,x,y)call PauseUnit(N0I,false)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)elsecall PauseUnit(N0I,true)endifset t=nullset N0I=nullreturn falseendfunctionfunction E62 takes player p returns nothinglocal unit N0I=K1[GetPlayerId(p)]local trigger tif QPI(N0I)==false thenset t=CreateTrigger()call DisplayTimedTextToPlayer(p,0,U2,30.0,GetObjectName(1848653899))call UnitRemoveBuffs(N0I,true,false)call UnitRemoveAbility(N0I,1113815395)call UnitRemoveAbility(N0I,1113815346)call UnitRemoveAbility(N0I,1110454858)call UnitRemoveAbility(N0I,1112896368)call UnitRemoveAbility(N0I,1114993524)call UnitRemoveAbility(N0I,1110454854)call PauseUnit(N0I,true)call TriggerRegisterTimerEvent(t,1,true)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function E52))call SaveUnitHandle(XY,(GetHandleId(t)),(14),(N0I))endifset p=nullset N0I=nullset t=nullendfunctionfunction E72 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local player p=(LoadPlayerHandle(XY,(MKI),(54)))call FlushChildHashtable(XY,(MKI))call MZI(t)if GetTriggerEventId()!=EVENT_UNIT_DAMAGED thencall E62(p)endifset t=nullreturn falseendfunctionfunction BR2 takes nothing returns nothinglocal player p=GetTriggerPlayer()local unit N0I=K1[GetPlayerId(p)]local trigger tif QPI(N0I)==false thenset t=CreateTrigger()call TriggerRegisterTimerEvent(t,3.5,false)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function E72))call SavePlayerHandle(XY,(GetHandleId(t)),(54),(p))endifset p=nullset N0I=nullset t=nullendfunctionfunction E82 takes player p returns stringlocal string s=K3[GetPlayerId(p)]if K3[GetPlayerId(p)]!="Here"thenreturn" |c00ff0303("+GetObjectName(1848653881)+" at "+SubString(s,10,StringLength(s))+"|c00ff0303)|r"endifreturn" "endfunctionfunction BP2 takes nothing returns nothinglocal integer SII=1local integer S1I=5local integer L9Icall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,20," ")if(NWI(GetTriggerPlayer())==true)thenloopexitwhen SII>S1Iset L9I=GetPlayerId(BO[SII])if(K1[L9I]!=null)thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,20,C0[L9I]+(D30[GetPlayerId((BO[SII]))])+"|r "+GetObjectName(1848653901)+" "+GetUnitName(K1[L9I])+" ("+GetObjectName(1848653900)+" "+I2S(GetUnitLevel(K1[L9I]))+")"+E82(BO[SII]))endifset SII=SII+1endloopelseloopexitwhen SII>S1Iset L9I=GetPlayerId(CO[SII])if(K1[L9I]!=null)thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,20,C0[L9I]+(D30[GetPlayerId((CO[SII]))])+"|r "+GetObjectName(1848653901)+" "+GetUnitName(K1[L9I])+" ("+GetObjectName(1848653900)+" "+I2S(GetUnitLevel(K1[L9I]))+")"+E82(CO[SII]))endifset SII=SII+1endloopendifcall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,20," ")endfunctionfunction EA2 takes unit u returns booleanreturn GetUnitTypeId(u)==1311781199 or GetUnitTypeId(u)==1311781171 or GetUnitTypeId(u)==1311781172 or GetUnitTypeId(u)==1311781173endfunctionfunction EB2 takes unit u returns unitlocal integer MKI=GetHandleId(GetOwningPlayer(u))return(LoadUnitHandle(XY,(MKI),(333)))endfunctionfunction BQ2 takes nothing returns nothinglocal unit ulocal integer i=0if(K1[GetPlayerId(GetTriggerPlayer())]==null)thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10.00,GetObjectName(1848653889))elsecall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10.00,GetUnitName(K1[GetPlayerId(GetTriggerPlayer())])+" "+GetObjectName(1848653902)+" "+I2S(R2I(0.5+FK1(K1[GetPlayerId(GetTriggerPlayer())]))))if EA2(K1[GetPlayerId(GetTriggerPlayer())])thenset u=EB2(K1[GetPlayerId(GetTriggerPlayer())])if u!=null thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10.00,GetUnitName(u)+" "+GetObjectName(1848653902)+" "+I2S(R2I(0.5+GetUnitMoveSpeed(u))))endifendifendifendfunctionfunction BU2 takes nothing returns nothinglocal unit ulocal integer i=0if(K1[GetPlayerId(GetTriggerPlayer())]==null)thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10.00,GetObjectName(1848653889))elsecall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10.00,GetUnitName(K1[GetPlayerId(GetTriggerPlayer())])+" "+GetObjectName(1848653902)+" "+I2S(R2I(0.5+FK1(K1[GetPlayerId(GetTriggerPlayer())]))))if EA2(K1[GetPlayerId(GetTriggerPlayer())])thenset u=EB2(K1[GetPlayerId(GetTriggerPlayer())])if u!=null thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10.00,GetUnitName(u)+" "+GetObjectName(1848653902)+" "+I2S(R2I(0.5+GetUnitMoveSpeed(u))))endifendifloopexitwhen i>16set u=K1[i]if u!=null and u!=K1[GetPlayerId(GetTriggerPlayer())]and IsUnitAlly(u,GetTriggerPlayer())==true thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10.00,GetUnitName(u)+" "+GetObjectName(1848653902)+" "+I2S(R2I(0.5+GetUnitMoveSpeed(u))))endifset i=i+1endloopendifendfunctionfunction C02 takes nothing returns nothingcall SaveBoolean(XY,(GetHandleId(GetTriggerPlayer())),(139),(true))call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,GetObjectName(1848653906))endfunctionfunction CI2 takes nothing returns nothingcall SaveBoolean(XY,(GetHandleId(GetTriggerPlayer())),(139),(false))call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,GetObjectName(1848653903))endfunctionfunction C12 takes nothing returns nothingcall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10.00,"   "+GetObjectName(1848653904)+" "+I2S(A[GetPlayerId(GetTriggerPlayer())])+" "+GetObjectName(1848653905)+" "+I2S(B[GetPlayerId(GetTriggerPlayer())])+" "+GetObjectName(1848653907)+" "+I2S(C[GetPlayerId(GetTriggerPlayer())]))endfunctionfunction CO2 takes nothing returns nothinglocal integer x=GetPlayerId(GetTriggerPlayer())if(GetEventPlayerChatString()=="-cson")thenset BM[x]=trueset R60[x]=trueelseset BM[x]=falseset R60[x]=falseendifcall Q31()endfunctionfunction EG2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer i=(LoadInteger(XY,(MKI),(34)))local real xlocal real yif R00[i]==false thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseif K1[i]!=null and QPI(K1[i])==false thenset x=GetUnitX(K1[i])set y=GetUnitY(K1[i])call PanCameraToTimedForPlayer(Player(i),x,y,0)endifset t=nullreturn falseendfunctionfunction CQ2 takes nothing returns nothinglocal integer x=GetPlayerId(GetTriggerPlayer())local trigger tlocal integer MKIlocal integer iif R00[x]==false and(GetEventPlayerChatString()=="-center"or GetEventPlayerChatString()=="-c")thenset R00[x]=trueset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.01,true)call TriggerAddCondition(t,Condition(function EG2))call SaveInteger(XY,(MKI),(34),(x))call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,GetObjectName(1848658519))elseif GetEventPlayerChatString()=="-centeroff"or GetEventPlayerChatString()=="-co"thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,GetObjectName(1848658520))set R00[x]=falseendifendfunctionfunction D02 takes nothing returns nothingset RI0[GetPlayerId(GetTriggerPlayer())]=falsecall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,5,GetObjectName(1848658522))endfunctionfunction DI2 takes nothing returns nothingset RI0[GetPlayerId(GetTriggerPlayer())]=truecall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,5,GetObjectName(1848658736))endfunctionfunction CU2 takes nothing returns nothinglocal integer i=0local integer id=GetPlayerId(GetTriggerPlayer())local integer MFI=0local integer EV2=0local player pif RO0==false or ZL==false thenreturnendifif R30+90<(TimerGetElapsed(M))thenloopexitwhen i>15set R20[i]=falseset i=i+1endloopendifset R30=(TimerGetElapsed(M))+90set R20[id]=trueset i=0loopexitwhen i>15if NZI(GetTriggerPlayer())thenif NZI(Player(i))and NYI(Player(i))thenset EV2=EV2+1if R20[i]thenset MFI=MFI+1endifendifelseif NWI(Player(i))and NYI(Player(i))thenset EV2=EV2+1if R20[i]thenset MFI=MFI+1endifendifendifset i=i+1endloopif MFI*2>EV2 thenif NZI(GetTriggerPlayer())thenset i=0loopexitwhen i>5set p=BO[i]if EA0[GetPlayerId(p)]==true and R10[GetPlayerId(p)]==false thencall PDI(OO,10,GetObjectName(1848658756)+" "+(D30[GetPlayerId((p))]))call OR1(p)set R10[GetPlayerId(p)]=trueendifset i=i+1endloopelseset i=0loopexitwhen i>5set p=CO[i]if EA0[GetPlayerId(p)]==true and R10[GetPlayerId(p)]==false thencall PDI(AO,10,GetObjectName(1848658756)+" "+(D30[GetPlayerId((p))]))call OR1(p)set R10[GetPlayerId(p)]=trueendifset i=i+1endloopendifelseif NZI(GetTriggerPlayer())thencall PDI(OO,10,GetObjectName(1848658754)+" "+I2S(MFI)+"/"+I2S(EV2)+" ("+(D30[GetPlayerId((GetTriggerPlayer()))])+")")elsecall PDI(AO,10,GetObjectName(1848658754)+" "+I2S(MFI)+"/"+I2S(EV2)+" ("+(D30[GetPlayerId((GetTriggerPlayer()))])+")")endifendifendfunctionfunction EX2 takes nothing returns nothinglocal integer i=1local integer RJIlocal player ploopexitwhen i>5set p=BO[i]set RJI=R2I(TimerGetRemaining(F0[GetPlayerId(p)]))if RJI>0 and R40[GetPlayerId(p)]and GL==false and Q2==false thencall PlayerSetLeaderboard(p,R50[GetPlayerId(p)])call LeaderboardDisplay(R50[GetPlayerId(p)],true)call LeaderboardSetLabel(R50[GetPlayerId(p)],"   "+GetObjectName(1848653910)+" "+I2S(RJI)+" "+GetObjectName(1848654133))elsecall LeaderboardDisplay(R50[GetPlayerId(p)],false)endifset p=CO[i]set RJI=R2I(TimerGetRemaining(F0[GetPlayerId(p)]))if RJI>0 and R40[GetPlayerId(p)]and GL==false and Q2==false thencall PlayerSetLeaderboard(p,R50[GetPlayerId(p)])call LeaderboardDisplay(R50[GetPlayerId(p)],true)call LeaderboardSetLabel(R50[GetPlayerId(p)],"   "+GetObjectName(1848653910)+" "+I2S(RJI)+" "+GetObjectName(1848654133))elsecall LeaderboardDisplay(R50[GetPlayerId(p)],false)endifset i=i+1endloopendfunctionfunction EY2 takes nothing returns nothinglocal integer x=0set x=x+1set R50[GetPlayerId(BO[x])]=CreateLeaderboard()call PlayerSetLeaderboard(BO[x],R50[GetPlayerId(BO[x])])call LeaderboardDisplay(R50[GetPlayerId(BO[x])],false)call LeaderboardSetLabel(R50[GetPlayerId(BO[x])],GetObjectName(1848657204)+": ")set R50[GetPlayerId(CO[x])]=CreateLeaderboard()call PlayerSetLeaderboard(CO[x],R50[GetPlayerId(CO[x])])call LeaderboardDisplay(R50[GetPlayerId(CO[x])],false)call LeaderboardSetLabel(R50[GetPlayerId(CO[x])],GetObjectName(1848657204)+": ")set x=x+1set R50[GetPlayerId(BO[x])]=CreateLeaderboard()call PlayerSetLeaderboard(BO[x],R50[GetPlayerId(BO[x])])call LeaderboardDisplay(R50[GetPlayerId(BO[x])],false)call LeaderboardSetLabel(R50[GetPlayerId(BO[x])],GetObjectName(1848657204)+": ")set R50[GetPlayerId(CO[x])]=CreateLeaderboard()call PlayerSetLeaderboard(CO[x],R50[GetPlayerId(CO[x])])call LeaderboardDisplay(R50[GetPlayerId(CO[x])],false)call LeaderboardSetLabel(R50[GetPlayerId(CO[x])],GetObjectName(1848657204)+": ")set x=x+1set R50[GetPlayerId(BO[x])]=CreateLeaderboard()call PlayerSetLeaderboard(BO[x],R50[GetPlayerId(BO[x])])call LeaderboardDisplay(R50[GetPlayerId(BO[x])],false)call LeaderboardSetLabel(R50[GetPlayerId(BO[x])],GetObjectName(1848657204)+": ")set R50[GetPlayerId(CO[x])]=CreateLeaderboard()call PlayerSetLeaderboard(CO[x],R50[GetPlayerId(CO[x])])call LeaderboardDisplay(R50[GetPlayerId(CO[x])],false)call LeaderboardSetLabel(R50[GetPlayerId(CO[x])],GetObjectName(1848657204)+": ")set x=x+1set R50[GetPlayerId(BO[x])]=CreateLeaderboard()call PlayerSetLeaderboard(BO[x],R50[GetPlayerId(BO[x])])call LeaderboardDisplay(R50[GetPlayerId(BO[x])],false)call LeaderboardSetLabel(R50[GetPlayerId(BO[x])],GetObjectName(1848657204)+": ")set R50[GetPlayerId(CO[x])]=CreateLeaderboard()call PlayerSetLeaderboard(CO[x],R50[GetPlayerId(CO[x])])call LeaderboardDisplay(R50[GetPlayerId(CO[x])],false)call LeaderboardSetLabel(R50[GetPlayerId(CO[x])],GetObjectName(1848657204)+": ")set x=x+1set R50[GetPlayerId(BO[x])]=CreateLeaderboard()call PlayerSetLeaderboard(BO[x],R50[GetPlayerId(BO[x])])call LeaderboardDisplay(R50[GetPlayerId(BO[x])],false)call LeaderboardSetLabel(R50[GetPlayerId(BO[x])],GetObjectName(1848657204)+": ")set R50[GetPlayerId(CO[x])]=CreateLeaderboard()call PlayerSetLeaderboard(CO[x],R50[GetPlayerId(CO[x])])call LeaderboardDisplay(R50[GetPlayerId(CO[x])],false)call LeaderboardSetLabel(R50[GetPlayerId(CO[x])],GetObjectName(1848657204)+": ")endfunctionfunction C72 takes nothing returns nothinglocal integer x=GetPlayerId(GetTriggerPlayer())if GetEventPlayerChatString()=="-don"or GetEventPlayerChatString()=="-deathon"thenset R40[x]=truecall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,GetObjectName(1848653911))elseset R40[x]=falsecall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,GetObjectName(1848653912))endifendfunctionfunction EJ2 takes nothing returns nothinglocal trigger t=CreateTrigger()call TriggerAddAction(t,function EY2)call TriggerRegisterTimerEvent(t,.5,false)set t=CreateTrigger()call TriggerAddAction(t,function EX2)call TriggerRegisterTimerEvent(t,1,true)endfunctionfunction C52 takes nothing returns nothingif(GetEventPlayerChatString()=="-showdeny")thenset R60[GetPlayerId(GetTriggerPlayer())]=trueelseset R60[GetPlayerId(GetTriggerPlayer())]=falseendifendfunctionfunction C62 takes nothing returns nothingcall R1I(GetTriggerPlayer(),GetObjectName(1848657991))endfunctionfunction EM2 takes nothing returns nothinglocal integer i=0loopexitwhen i>16set R60[i]=trueset BM[i]=trueset i=i+1endloopendfunctionfunction C22 takes nothing returns nothingcall ForceRemovePlayer(P2,GetTriggerPlayer())call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,GetObjectName(1848653909))endfunctionfunction C32 takes nothing returns nothingcall ForceAddPlayer(P2,GetTriggerPlayer())call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,GetObjectName(1848653914))endfunctionfunction ET2 takes nothing returns booleanlocal integer x=GetRandomInt(1,4)if x==1 thenset R80=Z3elseif x==2 thenset R80=V3elseif x==3 thenset R80=WSelseif x==4 thenset R80=XSendifif R90[GetPlayerId(GetLocalPlayer())]thencall EnableWeatherEffect(Z3,false)call EnableWeatherEffect(V3,false)call EnableWeatherEffect(WS,false)call EnableWeatherEffect(XS,false)call EnableWeatherEffect(R80,true)endifreturn falseendfunctionfunction ER2 takes nothing returns nothinglocal integer x=GetRandomInt(1,4)local trigger t=CreateTrigger()call TriggerRegisterTimerEvent(t,300,true)call TriggerAddCondition(t,Condition(function ET2))set R90[GetPlayerId(BO[1])]=falseset R90[GetPlayerId(BO[2])]=falseset R90[GetPlayerId(BO[3])]=falseset R90[GetPlayerId(BO[4])]=falseset R90[GetPlayerId(BO[5])]=falseset R90[GetPlayerId(CO[1])]=falseset R90[GetPlayerId(CO[2])]=falseset R90[GetPlayerId(CO[3])]=falseset R90[GetPlayerId(CO[4])]=falseset R90[GetPlayerId(CO[5])]=falseif C2 thenset R90[GetPlayerId(DO0)]=falseset R90[GetPlayerId(D20)]=falseendifif x==1 thenset R80=Z3elseif x==2 thenset R80=V3elseif x==3 thenset R80=WSelseif x==4 thenset R80=XSendifset t=nullendfunctionfunction C42 takes nothing returns nothinglocal string AD2=StringCase(GetEventPlayerChatString(),false)if R70==true thenset R70=falsecall ER2()endifif AD2=="-weather snow"and GetLocalPlayer()==GetTriggerPlayer()thenset R90[GetPlayerId(GetTriggerPlayer())]=falsecall EnableWeatherEffect(Z3,true)call EnableWeatherEffect(V3,false)call EnableWeatherEffect(WS,false)call EnableWeatherEffect(XS,false)endifif AD2=="-weather rain"and GetLocalPlayer()==GetTriggerPlayer()thenset R90[GetPlayerId(GetTriggerPlayer())]=falsecall EnableWeatherEffect(Z3,false)call EnableWeatherEffect(V3,true)call EnableWeatherEffect(WS,false)call EnableWeatherEffect(XS,false)endifif AD2=="-weather moonlight"and GetLocalPlayer()==GetTriggerPlayer()thenset R90[GetPlayerId(GetTriggerPlayer())]=falsecall EnableWeatherEffect(Z3,false)call EnableWeatherEffect(V3,false)call EnableWeatherEffect(WS,true)call EnableWeatherEffect(XS,false)endifif AD2=="-weather wind"and GetLocalPlayer()==GetTriggerPlayer()thenset R90[GetPlayerId(GetTriggerPlayer())]=falsecall EnableWeatherEffect(Z3,false)call EnableWeatherEffect(V3,false)call EnableWeatherEffect(WS,false)call EnableWeatherEffect(XS,true)endifif AD2=="-weather off"and GetLocalPlayer()==GetTriggerPlayer()thenset R90[GetPlayerId(GetTriggerPlayer())]=falsecall EnableWeatherEffect(Z3,false)call EnableWeatherEffect(V3,false)call EnableWeatherEffect(WS,false)call EnableWeatherEffect(XS,false)endifif AD2=="-weather random"thenset R90[GetPlayerId(GetTriggerPlayer())]=trueif GetLocalPlayer()==GetTriggerPlayer()thencall EnableWeatherEffect(Z3,false)call EnableWeatherEffect(V3,false)call EnableWeatherEffect(WS,false)call EnableWeatherEffect(XS,false)call EnableWeatherEffect(R80,true)endifendifendfunctionfunction C82 takes nothing returns nothinglocal integer a=S2I(SubString(GetEventPlayerChatString(),6,StringLength(GetEventPlayerChatString())))local integer L9I=GetPlayerId(GetTriggerPlayer())set UL[L9I]=UL[L9I]+1if UL[L9I]>20 thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,GetObjectName(1848656977))returnendifif GetEventPlayerChatString()=="-rollon"or GetEventPlayerChatString()=="-rolloff"thenreturnendifif a==0 thenset a=100endifif a>0 and a<2001 thencall PFI(P2,5,C0[GetPlayerId(GetTriggerPlayer())]+(D30[GetPlayerId((GetTriggerPlayer()))])+"|r "+GetObjectName(1848653129)+" "+I2S(GetRandomInt(1,a))+" "+GetObjectName(1848653133)+" "+I2S(a))elsecall R1I(GetTriggerPlayer(),GetObjectName(1848652377))endifendfunctionfunction CN2 takes nothing returns nothinglocal integer aif GetRandomInt(1,2)==1 thenset a=GetRandomInt(DB0,DC0)elseset a=GetRandomInt(D90,DA0)endifcall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,GetObjectName(1848657747)+" "+MSI(a))endfunctionfunction CK2 takes nothing returns nothinglocal integer a=S2I(SubString(GetEventPlayerChatString(),4,StringLength(GetEventPlayerChatString())))if GetTriggerPlayer()!=BO[1]or a>2 or a<1 or IN==false or TimerGetElapsed(M)>14 or P00==true thenreturnendifset P30=aset P40=aset RU0=trueif a==1 thencall PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(BO[1])]+(D30[GetPlayerId((BO[1]))])+"|r "+GetObjectName(1848656979))elsecall PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(CO[1])]+(D30[GetPlayerId((CO[1]))])+"|r "+GetObjectName(1848656979))endifif P30==1 thenset P50=BO[1]set P60=CO[1]elseset P50=CO[1]set P60=BO[1]endifendfunctionfunction CV2 takes nothing returns nothingset IM[GetPlayerId(GetTriggerPlayer())]=falseendfunctionfunction CW2 takes nothing returns nothingset IM[GetPlayerId(GetTriggerPlayer())]=trueendfunctionfunction C92 takes nothing returns nothingcall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,GetObjectName(1848654128))set RA0[GetPlayerId(GetTriggerPlayer())]=trueif GetLocalPlayer()==GetTriggerPlayer()thencall SetPlayerName(BO[1],(D30[GetPlayerId((BO[1]))]))call SetPlayerName(BO[2],(D30[GetPlayerId((BO[2]))]))call SetPlayerName(BO[3],(D30[GetPlayerId((BO[3]))]))call SetPlayerName(BO[4],(D30[GetPlayerId((BO[4]))]))call SetPlayerName(BO[5],(D30[GetPlayerId((BO[5]))]))call SetPlayerName(CO[1],(D30[GetPlayerId((CO[1]))]))call SetPlayerName(CO[2],(D30[GetPlayerId((CO[2]))]))call SetPlayerName(CO[3],(D30[GetPlayerId((CO[3]))]))call SetPlayerName(CO[4],(D30[GetPlayerId((CO[4]))]))call SetPlayerName(CO[5],(D30[GetPlayerId((CO[5]))]))endifendfunctionfunction CA2 takes nothing returns nothinglocal integer id=GetPlayerId(GetTriggerPlayer())if AM[id]==true thenset AM[id]=falsecall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,GetObjectName(1848653908))elseset AM[id]=truecall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,GetObjectName(1848654129))endifendfunctionfunction CR2 takes nothing returns nothinglocal integer id=GetPlayerId(GetTriggerPlayer())set RB0[id]=trueendfunctionfunction CZ2 takes nothing returns nothingendfunctionfunction CD2 takes nothing returns nothinglocal integer i=1local player plocal real F12loopexitwhen i>5set p=BO[i]if NYI(p)thenset F12=K[GetPlayerId(p)]/(TimerGetElapsed(M))*60call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,15.00,C0[GetPlayerId(p)]+(D30[GetPlayerId((p))])+"|r"+" "+GetObjectName(1848653876)+" "+R2S(F12))endifset p=CO[i]if NYI(p)thenset F12=K[GetPlayerId(p)]/(TimerGetElapsed(M))*60call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,15.00,C0[GetPlayerId(p)]+(D30[GetPlayerId((p))])+"|r"+" "+GetObjectName(1848653876)+" "+R2S(F12))endifset i=i+1endloopcall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,15.00," ")set p=nullendfunctionfunction CE2 takes nothing returns nothingcall IY1(GetTriggerPlayer())endfunctionfunction FO2 takes nothing returns booleancall MZI(GetTriggeringTrigger())set RC0=truereturn falseendfunctionfunction F22 takes real d returns nothinglocal trigger t=CreateTrigger()call TriggerRegisterTimerEvent(t,d,false)call TriggerAddCondition(t,Condition(function FO2))set t=nullendfunctionfunction F32 takes player KUI returns nothinglocal integer F42local player F52set F42=0loopset F52=Player(F42)if(PlayersAreCoAllied(KUI,F52)and KUI!=F52)thencall SetPlayerAlliance(KUI,F52,ALLIANCE_SHARED_VISION,true)call SetPlayerAlliance(KUI,F52,ALLIANCE_SHARED_CONTROL,true)call SetPlayerAlliance(F52,KUI,ALLIANCE_SHARED_CONTROL,true)endifset F42=F42+1exitwhen F42==12endloopendfunctionfunction CC2 takes nothing returns nothinglocal integer L9I=S2I(SubString(GetEventPlayerChatString(),9,StringLength(GetEventPlayerChatString())))local integer i=1local player plocal string F21if RC0 thenif(Z0<10)thenset F21=I2S(H0)+":0"+I2S(Z0)elseset F21=I2S(H0)+":"+I2S(Z0)endifif L9I<1 or RD0[L9I]==false thenloopexitwhen i>5set p=BO[i]if NYI(p)and((TimerGetElapsed(M))-L[GetPlayerId(p)])>300.0 and RD0[GetPlayerId(p)]==false thenset RD0[GetPlayerId(p)]=truecall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,15.00,C0[GetPlayerId(p)]+(D30[GetPlayerId((p))])+"|r"+" "+GetObjectName(1848653127)+" "+R2S(((TimerGetElapsed(M))-L[GetPlayerId(p)])/60)+" "+GetObjectName(1311782214))call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,15.00,GetObjectName(1848653135)+" |cff99ccff-kickafk "+I2S(GetPlayerId(p))+" |r "+GetObjectName(1848653136))call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,15.00," ")endifset p=CO[i]if NYI(p)and((TimerGetElapsed(M))-L[GetPlayerId(p)])>300.0 and RD0[GetPlayerId(p)]==false thenset RD0[GetPlayerId(p)]=truecall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,15.00,C0[GetPlayerId(p)]+(D30[GetPlayerId((p))])+"|r"+" "+GetObjectName(1848653127)+" "+R2S(((TimerGetElapsed(M))-L[GetPlayerId(p)])/60)+" "+GetObjectName(1311782214))call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,15.00,GetObjectName(1848653135)+" |cff99ccff-kickafk "+I2S(GetPlayerId(p))+" |r "+GetObjectName(1848653136))call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,15.00," ")endifset i=i+1endloopcall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,15.00," ")elseif NYI(Player(L9I))==true and IsPlayerAlly(GetTriggerPlayer(),Player(L9I))==true thencall DisplayTimedTextToPlayer(Player(L9I),0,U2,3600,"|c00ff0303"+GetObjectName(1848653125)+"|r")call Z51(Player(L9I))set K3[GetPlayerId(Player(L9I))]="|c00555555"+F21+"|r"call RemovePlayer(Player(L9I),PLAYER_GAME_RESULT_DEFEAT)call F32(Player(L9I))if ZL thencall OS1(Player(L9I))endifset EA0[GetPlayerId(Player(L9I))]=truecall Z41(Player(L9I))call PDI(P2,30.00,"|c00ff0303"+(D30[GetPlayerId((Player(L9I)))])+" "+GetObjectName(1848653125)+"|r")endifendifendfunctionfunction CB2 takes nothing returns nothinglocal integer i=1local player plocal integer x=0if RC0 thenloopexitwhen i>5set p=BO[i]if NYI(p)and((TimerGetElapsed(M))-L[GetPlayerId(p)])/60>0.2 thenset x=x+1call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,15.00,C0[GetPlayerId(p)]+(D30[GetPlayerId((p))])+"|r"+" "+GetObjectName(1848653124)+" "+R2S(((TimerGetElapsed(M))-L[GetPlayerId(p)])/60)+" "+GetObjectName(1311782214))endifset p=CO[i]if NYI(p)and((TimerGetElapsed(M))-L[GetPlayerId(p)])/60>0.2 thenset x=x+1call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,15.00,C0[GetPlayerId(p)]+(D30[GetPlayerId((p))])+"|r"+" "+GetObjectName(1848653124)+" "+R2S(((TimerGetElapsed(M))-L[GetPlayerId(p)])/60)+" "+GetObjectName(1311782214))endifset i=i+1endloopif x<1 thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,15.00,GetObjectName(1311782225))elsecall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,15.00," ")endifendifendfunctionfunction F62 takes nothing returns booleanlocal integer i=1local player plocal real F21=(TimerGetElapsed(M))if RC0 thenloopexitwhen i>5set p=BO[i]if NYI(p)and(F21-L[GetPlayerId(p)])>300.0 and RD0[GetPlayerId(p)]==false thenset RD0[GetPlayerId(p)]=truecall PDI(OO,15,C0[GetPlayerId(p)]+(D30[GetPlayerId((p))])+"|r"+" "+GetObjectName(1848653127)+" "+R2S((F21-L[GetPlayerId(p)])/60)+" "+GetObjectName(1311782214))call PDI(OO,15,GetObjectName(1848653135)+" |cff99ccff-kickafk "+I2S(GetPlayerId(p))+" |r "+GetObjectName(1848653136))call PDI(OO,15," ")endifset p=CO[i]if NYI(p)and(F21-L[GetPlayerId(p)])>300.0 and RD0[GetPlayerId(p)]==false thenset RD0[GetPlayerId(p)]=truecall PDI(AO,15,C0[GetPlayerId(p)]+(D30[GetPlayerId((p))])+"|r"+" "+GetObjectName(1848653127)+" "+R2S((F21-L[GetPlayerId(p)])/60)+" "+GetObjectName(1311782214))call PDI(AO,15,GetObjectName(1848653135)+" |cff99ccff-kickafk "+I2S(GetPlayerId(p))+" |r "+GetObjectName(1848653136))call PDI(AO,15," ")endifset i=i+1endloopendifreturn falseendfunctionfunction F72 takes nothing returns booleanif GetOwningPlayer(GetTriggerUnit())!=BO[0]and GetOwningPlayer(GetTriggerUnit())!=CO[0]thenset K[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]=K[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]+1if GetIssuedOrderId()!=851983 thenset L[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]=(TimerGetElapsed(M))set RD0[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]=falseendifif(GetIssuedOrderId()==851983 or GetIssuedOrderId()==851971)and GetOrderTargetItem()!=null thenif GetIssuedOrderId()==851983 or(GetIssuedOrderId()==851971 and(LoadBoolean(XY,(GetHandleId(GetItemPlayer(GetOrderTargetItem()))),(139)))==true)thenif GetItemPlayer(GetOrderTargetItem())!=GetOwningPlayer(GetTriggerUnit())and IsPointInRegion(SK,GetItemX(GetOrderTargetItem()),GetItemY(GetOrderTargetItem()))==true thencall DisableTrigger(GetTriggeringTrigger())call R6I(GetTriggerUnit())call R1I(GetOwningPlayer(GetTriggerUnit()),GetObjectName(1848657719))call EnableTrigger(GetTriggeringTrigger())endifendifendifendifreturn falseendfunctionfunction F92 takes nothing returns booleanreturn T4I(GetFilterUnit())and GetOwningPlayer(GetFilterUnit())==GetTriggerPlayer()endfunctionfunction Courier_Add takes nothing returns nothingcall UnitAddType(GetEnumUnit(),UNIT_TYPE_PEON)endfunctionfunction Courier_Remove takes nothing returns nothingcall UnitRemoveType(GetEnumUnit(),UNIT_TYPE_PEON)endfunctionfunction CF2 takes nothing returns nothinglocal group g=MDI()call GroupEnumUnitsInRange(g,0,0,12000,Condition(function F92))call MCI(g)set g=nullendfunctionfunction FB2 takes nothing returns nothinglocal string AD2=StringCase(GetEventPlayerChatString(),false)local boolean FC2=AD2=="-mode1"local boolean FD2=AD2=="-mode2"if FC2==false and FD2==false thenreturnendifif(TimerGetElapsed(M))>60 thencall R4I(GetTriggerPlayer(),GetObjectName(1848652376))returnelseif(TimerGetElapsed(M))<15 thencall R4I(GetTriggerPlayer(),GetObjectName(1848652376))returnendifif FC2 thenset TK=1elseif FD2 thenset TK=2endifcall O92()call PDI(P2,15,GetObjectName(1848653134)+" "+GetObjectName(1848653109))call PDI(P2,15,GetObjectName(1848653138))call MZI(GetTriggeringTrigger())endfunctionfunction FE2 takes nothing returns booleancall ExecuteFunc("FB2")return falseendfunctionfunction AH_RegisterCommands takes nothing returns nothinglocal trigger t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,WO,"-",false)call TriggerAddCondition(t,Condition(function FE2))call PDI(P2,30,"|cff99ccff"+GetObjectName(1848653139)+"|r")call PDI(P2,30,GetObjectName(1848653140)+" "+GetObjectName(1848653128)+" "+GetObjectName(1848653142)+" ")call PDI(P2,30," ")call PDI(P2,30,"|cff99ccff-mode1|r "+GetObjectName(1848653143)+". ("+GetObjectName(1848653144)+")")call PDI(P2,30,"|cff99ccff-mode2|r "+GetObjectName(1848653362))endfunctionfunction AH_RegisterCommands_Delayed takes nothing returns nothinglocal trigger t=CreateTrigger()call TriggerRegisterTimerEvent(t,0.5,false)set t=nullendfunctionfunction CG2 takes nothing returns nothingif(TimerGetElapsed(M))>60 thencall R4I(GetTriggerPlayer(),GetObjectName(1848652376))returnelseif(TimerGetElapsed(M))<15 thencall R4I(GetTriggerPlayer(),GetObjectName(1848652376))returnendifif GetTriggerPlayer()!=WO thencall R4I(GetTriggerPlayer(),GetObjectName(1848652375))returnendifif RK==false thenset RK=trueset TK=2call O92()call PDI(P2,15,GetObjectName(1848653134)+" "+GetObjectName(1848653109))call PDI(P2,15,GetObjectName(1848653138))elsecall R1I(GetTriggerPlayer(),GetObjectName(1848652374))endifendfunctionfunction CH2 takes nothing returns nothingcall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,GetObjectName(1848656726)+" [|cffff0000E|r|cffff0000E|r|cffff0000E|r] - [|cffffcc00T|r]")call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,GetObjectName(1848656725)+" [|cffff0000E|r|cffff0000E|r|cff00ffffW|r] - [|cffffcc00D|r]")call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,GetObjectName(1848656724)+" [|cffff0000E|r|cffff0000E|r|cff0000ffQ|r] - [|cffffcc00F|r]")call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,GetObjectName(1848656694)+" [|cff0000ffQ|r|cff0000ffQ|r|cff0000ffQ|r] - [|cffffcc00Y|r]")call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,GetObjectName(1848656716)+" [|cff0000ffQ|r|cff0000ffQ|r|cff00ffffW|r] - [|cffffcc00V|r]")call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,GetObjectName(1848656718)+" [|cff0000ffQ|r|cff0000ffQ|r|cffff0000E|r] - [|cffffcc00G|r]")call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,GetObjectName(1848656723)+" [|cff00ffffW|r|cff00ffffW|r|cffff0000E|r] - [|cffffcc00Z|r]")call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,GetObjectName(1848656719)+" [|cff00ffffW|r|cff00ffffW|r|cff0000ffQ|r] - [|cffffcc00X|r]")call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,GetObjectName(1848656720)+" [|cff00ffffW|r|cff00ffffW|r|cff00ffffW|r] - [|cffffcc00C|r]")call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,GetObjectName(1848656721)+" [|cff0000ffQ|r|cff00ffffW|r|cffff0000E|r] - [|cffffcc00B|r]")endfunctionfunction FF2 takes string s returns nothingcall StopMusic(true)call PlayMusic(s)endfunctionfunction CX2 takes nothing returns nothinglocal string s=GetEventPlayerChatString()local integer S7I=GetRandomInt(1,RF0)if GetLocalPlayer()==GetTriggerPlayer()thenif s=="-music off"thencall StopMusic(false)elseif s=="-music random"thencall FF2(RE0[S7I])elseif s=="-music nightelf1"thencall FF2(AD)elseif s=="-music nightelf2"thencall FF2(BD)elseif s=="-music nightelf3"thencall FF2(DD)elseif s=="-music human1"thencall FF2(KC)elseif s=="-music human2"thencall FF2(LC)elseif s=="-music human3"thencall FF2(MC)elseif s=="-music orc1"thencall FF2(FD)elseif s=="-music orc2"thencall FF2(GD)elseif s=="-music orc3"thencall FF2(HD)elseif s=="-music undead1"thencall FF2(BE)elseif s=="-music undead2"thencall FF2(CE)elseif s=="-music undead3"thencall FF2(DE)elseif s=="-music other1"thencall FF2(ZD)elseif s=="-music other2"thencall FF2(VD)elseif s=="-music other3"thencall FF2(WD)elseif s=="-music other4"thencall FF2(XD)elseif s=="-music other5"thencall FF2(YD)elseif s=="-music other6"thencall FF2(GF)elseif s=="-music other7"thencall FF2(HF)elseif s=="-music other8"thencall FF2(ZF)elseif s=="-music other9"thencall FF2(VF)elseif s=="-music special"thencall FF2(RG0)elsecall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,GetObjectName(1848656727)+" ")call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,"off, random, nightelf1, nightelf2, nightelf3, human1, human2, human3, orc1, orc2, orc3, undead1, undead2, undead3, other1, other2, other3, other4, other5, other6, other7, other8, other9, special")endifendifendfunctionfunction FG2 takes nothing returns booleanset RF0=RF0+1set RE0[RF0]=ADset RF0=RF0+1set RE0[RF0]=BDset RF0=RF0+1set RE0[RF0]=DDset RF0=RF0+1set RE0[RF0]=KCset RF0=RF0+1set RE0[RF0]=LCset RF0=RF0+1set RE0[RF0]=MCset RF0=RF0+1set RE0[RF0]=FDset RF0=RF0+1set RE0[RF0]=GDset RF0=RF0+1set RE0[RF0]=HDset RF0=RF0+1set RE0[RF0]=BEset RF0=RF0+1set RE0[RF0]=CEset RF0=RF0+1set RE0[RF0]=DEset RF0=RF0+1set RE0[RF0]=ZDset RF0=RF0+1set RE0[RF0]=VDset RF0=RF0+1set RE0[RF0]=WDset RF0=RF0+1set RE0[RF0]=XDset RF0=RF0+1set RE0[RF0]=YDset RF0=RF0+1set RE0[RF0]=GFset RF0=RF0+1set RE0[RF0]=HFset RF0=RF0+1set RE0[RF0]=ZFset RF0=RF0+1set RE0[RF0]=VFset RF0=RF0+1set RE0[RF0]=RG0return falseendfunctionfunction FZ2 takes player p,integer r,integer g,integer b,integer a returns nothingif GetLocalPlayer()==p thencall SetWaterBaseColor(r,g,b,a)endifendfunctionfunction FV2 takes string s returns nothinglocal string FW2=""local string FY2=""local string FJ2=""local integer i=0local integer DG1=StringLength(s)local integer FK2=1loopexitwhen i>DG1if SubString(s,i,i+1)==" "thenset FK2=FK2+1elseif FK2==1 thenset FW2=FW2+SubString(s,i,i+1)elseif FK2==2 thenset FY2=FY2+SubString(s,i,i+1)elseset FJ2=FJ2+SubString(s,i,i+1)endifendifset i=i+1endloopset RZ0=S2I(FW2)set RV0=S2I(FY2)set RW0=S2I(FJ2)endfunctionfunction CY2 takes nothing returns nothinglocal string FL2=SubString(GetEventPlayerChatString(),7,StringLength(GetEventPlayerChatString()))local player p=GetTriggerPlayer()local integer rlocal integer glocal integer bset RH0[GetPlayerId(p)]=trueif FL2=="red"thencall FZ2(p,255,0,0,255)elseif FL2=="blue"thencall FZ2(p,0,0,255,255)elseif FL2=="green"thencall FZ2(p,0,255,0,255)elseif FL2=="default"thencall FZ2(p,0,0,255,255)elseif FL2=="random"thenset r=GetRandomInt(0,255)set g=GetRandomInt(0,255)set b=GetRandomInt(0,255)call FZ2(p,r,g,b,255)call DisplayTimedTextToPlayer(p,0,0,5,GetObjectName(1848657988)+" r="+I2S(r)+" g="+I2S(g)+" b="+I2S(b))elsecall FV2(FL2)set r=RZ0set g=RV0set b=RW0if r==0 and g==0 and b==0 and FL2!="0 0 0"thenreturnendifif r>=0 and r<=255 and g>=0 and g<=255 and b>=0 and b<=255 thencall FZ2(p,r,g,b,255)endifendifendfunctionfunction CL2 takes nothing returns nothingcall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,15.00,"This command has been temporarily disabled")endfunctionfunction CM2 takes nothing returns booleancall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10.00,"Total Bonus XP/Gold: "+I2S(F40[GetPlayerId(GetTriggerPlayer())])+"/"+I2S(F50[GetPlayerId(GetTriggerPlayer())]))return falseendfunctionfunction DO2 takes nothing returns booleanif AEI>0 thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10.00,GetObjectName(1848659023)+": "+I2S(AEI))endifreturn falseendfunctionfunction Quote_ReplaySound takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer x=(LoadInteger(XY,(MKI),(148)))local player p=(LoadPlayerHandle(XY,(MKI),(54)))call TQI(p,RX0[x])call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset p=nullreturn falseendfunctionfunction CJ2 takes nothing returns nothinglocal string s=GetEventPlayerChatString()local trigger tlocal integer x=S2I(SubString(GetEventPlayerChatString(),7,StringLength(GetEventPlayerChatString())))local integer i=1if x<1 or x>RJ0 thenset x=GetRandomInt(1,RJ0)call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,GetObjectName(1848657205)+" "+I2S(x))endifif RK0 thenloopexitwhen i>RJ0call O91(RX0[i])set i=i+1endloopset RK0=falseendifif RY0[x]==false thenendifcall TQI(GetTriggerPlayer(),RX0[x])endfunctionfunction FS2 takes player p1 returns stringlocal string s=GetObjectName(1848657730)set s=EA1(s,"$c1","|c00ff0303")set s=EA1(s,"$p1",C0[GetPlayerId(p1)]+(D30[GetPlayerId((p1))])+"|r")return sendfunctionfunction FT2 takes nothing returns stringlocal string s=GetObjectName(1848657729)set s=EA1(s,"$c1","|c006699CC")set s=EA1(s,"$c2","|c00ff0303")return sendfunctionfunction FR2 takes nothing returns nothinglocal integer i=1local unit N0Iif RK thenloopexitwhen i>5set N0I=K1[GetPlayerId(BO[i])]if N0I!=null thenif TK==2 thencall E21(N0I)endifcall UnitSetUsesAltIcon(N0I,false)endifset N0I=K1[GetPlayerId(CO[i])]if N0I!=null thenif TK==2 thencall E21(N0I)endifcall UnitSetUsesAltIcon(N0I,false)endifset i=i+1endloopset N0I=nullendifendfunctionfunction FP2 takes player p1,player p2 returns stringlocal string s=GetObjectName(1848657714)set s=EA1(s,"$c1","|c006699CC")set s=EA1(s,"$c1","|c006699CC")set s=EA1(s,"$c1","|c006699CC")set s=EA1(s,"$c1","|c006699CC")set s=EA1(s,"$c2","|c00ff0303")set s=EA1(s,"$c2","|c00ff0303")set s=EA1(s,"$p1",C0[GetPlayerId(p1)]+(D30[GetPlayerId((p1))])+"|r")set s=EA1(s,"$p2",C0[GetPlayerId(p2)]+(D30[GetPlayerId((p2))])+"|r")return sendfunctionfunction FQ2 takes string FU2,string G02 returns stringlocal string s=GetObjectName(1848657494)set s=EA1(s,"$c1","|c006699CC")set s=EA1(s,"$c1","|c006699CC")set s=EA1(s,"$c1","|c006699CC")set s=EA1(s,"$c1","|c006699CC")set s=EA1(s,"$p1",FU2)set s=EA1(s,"$p2",G02)return sendfunctionfunction GI2 takes player p2 returns stringlocal string s=GetObjectName(1848657491)set s=EA1(s,"$p2",C0[GetPlayerId(p2)]+(D30[GetPlayerId((p2))])+"|r")set s=EA1(s,"$c1","|c006699CC")return sendfunctionfunction G12 takes player p returns nothinglocal integer SIIlocal integer S1Iif(NZI(p)==true)thenset SII=1set S1I=5loopexitwhen SII>S1Iif(BO[SII]!=p)thenif(NYI(BO[SII])==true)thencall SetPlayerAllianceStateBJ(p,BO[SII],4)endifendifset SII=SII+1endloopelseset SII=1set S1I=5loopexitwhen SII>S1Iif(CO[SII]!=p)thenif(NYI(CO[SII])==true)thencall SetPlayerAllianceStateBJ(p,CO[SII],4)endifendifset SII=SII+1endloopendifendfunctionfunction GO2 takes nothing returns nothingif GetOwningPlayer(GetEnumUnit())==WM thencall SetUnitOwner(GetEnumUnit(),XM,true)elseif GetOwningPlayer(GetEnumUnit())==XM thencall SetUnitOwner(GetEnumUnit(),WM,true)endifendfunctionfunction G22 takes unit u,player p returns nothinglocal real x1local real y1local real x2local real y2local integer ilocal item OT1if NZI(p)thenset x1=GetRectCenterX(S3)set y1=GetRectCenterY(S3)set x2=GetRectCenterX(O4)set y2=GetRectCenterY(O4)elseset x1=GetRectCenterX(O4)set y1=GetRectCenterY(O4)set x2=GetRectCenterX(S3)set y2=GetRectCenterY(S3)endifcall SetUnitX(u,x1)call SetUnitY(u,y1)if T4I(u)thencall IssueImmediateOrder(u,"creepanimatedead")endifif IsUnitType(u,UNIT_TYPE_HERO)==true thencall SaveBoolean(XY,(GetHandleId(u)),(140),(true))call SaveInteger(XY,(GetHandleId((u))),((4259)),(2))call UnitRemoveAbility(u,1093678162)call SetUnitInvulnerable(u,false)call PauseUnit(u,false)set i=0loopexitwhen i>5set OT1=UnitItemInSlot(u,i)if GetUnitTypeId(u)!=1211117642 and OT1!=null and(GetItemPlayer(OT1)!=GetOwningPlayer(u)and CR1(OT1)!=VR0 and CR1(OT1)!=VP0)and GetItemTypeId(OT1)!=FK0[VG0]thencall UnitRemoveItem(u,OT1)endifset i=i+1endloopendifcall SetUnitX(u,x2)call SetUnitY(u,y2)call SetUnitColor(u,GetPlayerColor(p))set OT1=nullendfunctionfunction G32 takes nothing returns booleanif IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true or T4I(GetFilterUnit())thencall G22(GetFilterUnit(),KM)elseif GetUnitTypeId(GetFilterUnit())==1852010352 thencall IssueImmediateOrder(GetFilterUnit(),"creepanimatedead")elseif GetUnitTypeId(GetFilterUnit())==1966092354 thenreturn trueendifreturn falseendfunctionfunction G42 takes item i,player p returns nothinglocal real xlocal real yif NZI(p)thenset x=GetRectCenterX(O4)set y=GetRectCenterY(O4)elseset x=GetRectCenterX(S3)set y=GetRectCenterY(S3)endifcall SetItemPosition(i,x,y)endfunctionfunction G52 takes nothing returns nothingif GetItemPlayer(GetEnumItem())==KM thencall G42(GetEnumItem(),KM)endifendfunctionfunction G62 takes player p1,player p2 returns nothinglocal group g1=MDI()local group g2=MDI()set KM=p1call GroupEnumUnitsOfPlayer(g1,p1,Condition(function G32))set KM=p2call GroupEnumUnitsOfPlayer(g2,p2,Condition(function G32))call ForGroup(g1,function GO2)call ForGroup(g2,function GO2)set KM=p1call EnumItemsInRect(GetWorldBounds(),Condition(function Q8I),function G52)set KM=p2call EnumItemsInRect(GetWorldBounds(),Condition(function Q8I),function G52)call MCI(g1)call MCI(g2)set g1=nullset g2=nullendfunctionfunction G72 takes player p1,player p2 returns nothinglocal integer xlocal integer ylocal integer ilocal integer i1local integer i2local real x1local real y1local real x2local real y2local player plocal string FU2=C0[GetPlayerId(p1)]+(D30[GetPlayerId((p1))])+"|r"local string G02=C0[GetPlayerId(p2)]+(D30[GetPlayerId((p2))])+"|r"local integer DV2set DV2=EW0[GetPlayerId(p1)]set EW0[GetPlayerId(p1)]=EW0[GetPlayerId(p2)]set EW0[GetPlayerId(p2)]=DV2if NZI(p1)thenset x1=GetRectCenterX(S3)set y1=GetRectCenterY(S3)elseset x1=GetRectCenterX(O4)set y1=GetRectCenterY(O4)endifif NZI(p2)thenset x2=GetRectCenterX(S3)set y2=GetRectCenterY(S3)elseset x2=GetRectCenterX(O4)set y2=GetRectCenterY(O4)endifset i=1loopexitwhen i>5if BO[i]==p1 or CO[i]==p1 thenset i1=iendifif BO[i]==p2 or CO[i]==p2 thenset i2=iendifset i=i+1endloopif NZI(p1)thenset CO[i2]=p1set BO[i1]=p2elseset BO[i2]=p1set CO[i1]=p2endifcall SetPlayerTeam(BO[0],0)call SetPlayerTeam(BO[1],0)call SetPlayerTeam(BO[2],0)call SetPlayerTeam(BO[3],0)call SetPlayerTeam(BO[4],0)call SetPlayerTeam(BO[5],0)call SetPlayerTeam(CO[0],1)call SetPlayerTeam(CO[1],1)call SetPlayerTeam(CO[2],1)call SetPlayerTeam(CO[3],1)call SetPlayerTeam(CO[4],1)call SetPlayerTeam(CO[5],1)call GV1()set x=0set y=0loopexitwhen x>5loopexitwhen y>5call SetPlayerAllianceStateBJ(BO[x],BO[y],3)call SetPlayerAllianceStateBJ(CO[x],CO[y],3)call SetPlayerAllianceStateBJ(BO[x],CO[y],0)call SetPlayerAllianceStateBJ(CO[x],BO[y],0)set y=y+1endloopset y=0set x=x+1endloopcall ForceClear(OO)call ForceClear(AO)call ForceAddPlayer(OO,BO[0])call ForceAddPlayer(OO,BO[1])call ForceAddPlayer(OO,BO[2])call ForceAddPlayer(OO,BO[3])call ForceAddPlayer(OO,BO[4])call ForceAddPlayer(OO,BO[5])call ForceAddPlayer(AO,CO[0])call ForceAddPlayer(AO,CO[1])call ForceAddPlayer(AO,CO[2])call ForceAddPlayer(AO,CO[3])call ForceAddPlayer(AO,CO[4])call ForceAddPlayer(AO,CO[5])call ExecuteFunc("GW1")call G62(p1,p2)set TM=truecall PanCameraToTimedForPlayer(p1,x1,y1,0)call PanCameraToTimedForPlayer(p2,x2,y2,0)call GZ1()set VM=falseif SM!=null thencall TriggerEvaluate(SM)endifif GetPlayerSlotState(p2)==PLAYER_SLOT_STATE_EMPTY thenset D30[GetPlayerId(p2)]=GetPlayerName(p2)endifset i=1loopexitwhen i>5set p=BO[i]if NLI(p)thencall G12(p)endifset p=CO[i]if NLI(p)thencall G12(p)endifset i=i+1endloopcall FR2()call SAO()call ClearTextMessages()call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20," ")call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20,FQ2(FU2,G02))call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20," ")call F41(p1)call F41(p2)endfunctionfunction G82 takes nothing returns nothinglocal integer i=1local player pset RM=0set QM=0loopexitwhen i>5set p=BO[i]if NYI(p)thenset QM=QM+1if YM[GetPlayerId(p)]==true thenset RM=RM+1endifendifset p=CO[i]if NYI(p)thenset QM=QM+1if YM[GetPlayerId(p)]==true thenset RM=RM+1endifendifset i=i+1endloopendfunctionfunction G92 takes nothing returns nothingset VM=falseif SM!=null thencall TriggerEvaluate(SM)endifcall ClearTextMessages()call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20,FS2(GetTriggerPlayer()))endfunctionfunction GA2 takes nothing returns nothinglocal integer i=1local player plocal integer GB2=0local integer GC2=0local integer GD2=0if YM[GetPlayerId(GetTriggerPlayer())]==false thenset YM[GetPlayerId(GetTriggerPlayer())]=truecall G82()call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20,C0[GetPlayerId(GetTriggerPlayer())]+(D30[GetPlayerId((GetTriggerPlayer()))])+"|r|c006699CC "+GetObjectName(1848657492)+"|r ("+I2S(RM)+"/"+I2S(QM)+")")endifloopexitwhen i>5set p=BO[i]if NYI(p)and YM[GetPlayerId(p)]==false thenset GB2=GB2+1set GD2=GD2+1endifif NYI(p)and YM[GetPlayerId(p)]==true thenset GC2=GC2+1set GD2=GD2+1endifset p=CO[i]if NYI(p)and YM[GetPlayerId(p)]==false thenset GB2=GB2+1set GD2=GD2+1endifif NYI(p)and YM[GetPlayerId(p)]==true thenset GC2=GC2+1set GD2=GD2+1endifset i=i+1endloopif GB2<2 and GC2>=R2I(GD2/2)thenif(GD2==2 and GC2>1)or GD2!=2 thencall G72(WM,XM)endifendifendfunctionfunction GE2 takes nothing returns nothinglocal integer i=1local player p=GetTriggerPlayer()local player GF2local string slocal string s2loopexitwhen i>5set s=""set s2=""if NZI(p)thenset GF2=CO[i]elseset GF2=BO[i]endifif GetPlayerSlotState(GF2)==PLAYER_SLOT_STATE_LEFT and GetPlayerController(GF2)==MAP_CONTROL_USER thenset s="|c00ff0303["+GetObjectName(1848657497)+"]|r"endifif K1[GetPlayerId(GF2)]!=null thenset s2=" ("+GetUnitName(K1[GetPlayerId(GF2)])+")"endifcall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,15,GetObjectName(1848653875)+"|c006699CC "+"-switch "+I2S(i)+"|r "+GetObjectName(1848657489)+" "+C0[GetPlayerId(GF2)]+(D30[GetPlayerId((GF2))])+s2+"|r "+s)set i=i+1endloopendfunctionfunction GG2 takes nothing returns booleanlocal integer i=0if VM thencall DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20,"|c00ff0303"+GetObjectName(1848657493)+"|r")endifset RO0=trueset VM=falseset WM=nullset XM=nullloopexitwhen i>16set YM[i]=falseset i=i+1endloopcall MZI(GetTriggeringTrigger())set SM=nullreturn falseendfunctionfunction GH2 takes player p1,player p2 returns nothinglocal trigger t=CreateTrigger()local integer i=0local string slocal string T1Olocal string msg2local string msg3local player plocal string s2set RO0=falseset VM=trueset WM=p1set XM=p2loopexitwhen i>16set YM[i]=falseset i=i+1endloopset YM[GetPlayerId(WM)]=truecall TriggerRegisterTimerEvent(t,60,false)call TriggerAddCondition(t,Condition(function GG2))set SM=tset s=FP2(p1,p2)set s2=FT2()set i=1loopexitwhen i>5set p=BO[i]if p!=p1 thencall DisplayTimedTextToPlayer(p,0,0,20,s)call DisplayTimedTextToPlayer(p,0,0,20,s2)endifset p=CO[i]if p!=p1 thencall DisplayTimedTextToPlayer(p,0,0,20,s)call DisplayTimedTextToPlayer(p,0,0,20,s2)endifset i=i+1endloopset s=GI2(p2)call DisplayTimedTextToPlayer(p1,0,0,20,s)set t=nullendfunctionfunction CT2 takes nothing returns nothingif ZL==false thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,GetObjectName(1848657752))returnendifif C2 and GetEventPlayerChatString()!="-ok"and GetEventPlayerChatString()!="-switch accept"and GetEventPlayerChatString()!="-no"thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,GetObjectName(1848657712))returnendifif GetEventPlayerChatString()=="-switch accept"or GetEventPlayerChatString()=="-ok"thenif VM thencall GA2()endifelseif GetEventPlayerChatString()=="-no"thenif VM thencall G92()endifelseif GetEventPlayerChatString()=="-switch"thenif VM==false thencall GE2()endifelseif VM==false thenset JM=S2I(SubString(GetEventPlayerChatString(),8,StringLength(GetEventPlayerChatString())))if JM>0 and JM<6 thenif NZI(GetTriggerPlayer())thenif R10[GetPlayerId(CO[JM])]==false thencall GH2(GetTriggerPlayer(),CO[JM])elsecall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,GetObjectName(1848658009))endifelseif R10[GetPlayerId(BO[JM])]==false thencall GH2(GetTriggerPlayer(),BO[JM])elsecall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,GetObjectName(1848658009))endifendifendifendifendfunctionfunction Command_NoSwitch takes nothing returns nothingif B0==false and ZL and GetTriggerPlayer()==WO thenset ZL=falsecall DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10,GetObjectName(1848657752))endifendfunctionfunction GZ2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))set t=nullreturn falseendfunctionfunction D12 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=K1[GetPlayerId(GetTriggerPlayer())]call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\Sleep\\SleepTarget.mdl",TLI,"overhead")))call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_ISSUED_ORDER)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_ISSUED_TARGET_ORDER)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_ISSUED_POINT_ORDER)call TriggerAddCondition(t,Condition(function GZ2))call SetUnitAnimation(TLI,"sleep")set t=nullset TLI=nullendfunctionfunction D22 takes nothing returns nothingcall SetUnitAnimationByIndex(K1[GetPlayerId(GetTriggerPlayer())],23)endfunctionfunction D32 takes nothing returns nothingif K1[GetPlayerId(GetTriggerPlayer())]!=null thenset RL0[GetPlayerId(GetTriggerPlayer())]=1call UnitRemoveAbility(K1[GetPlayerId(GetTriggerPlayer())],1093815114)endifendfunctionfunction CP2 takes nothing returns nothingif RM0[GetPlayerId(GetTriggerPlayer())]==false thenset RM0[GetPlayerId(GetTriggerPlayer())]=trueif GetObjectName(1848657992)=="Language: English"thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,"You have activated the -tips system.")call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,"Please remember that these are just introductory recommendations and are not the only way to play heroes.")endifif K1[GetPlayerId(GetTriggerPlayer())]!=null thencall EP1(GetTriggerPlayer(),GetUnitPointValue(K1[GetPlayerId(GetTriggerPlayer())]))endifendifendfunctionfunction GW2 takes integer GX2,integer GY2 returns integerif GY2==0 thenreturn GX2elseif GY2==1 thenif GX2==1130656372 thenreturn 1130656372endifif GX2==1130656356 thenreturn 1231317865endifif GX2==1131833710 thenreturn 1232301687endifif GX2==1130852979 thenreturn 1232301687endifif GX2==1131181671 thenreturn 1232301687endifif GX2==1517709678 thenreturn 1231317865endifif GX2==1516399475 thenreturn 1231188849endifif GX2==1315205732 thenreturn 1231188849endifelseif GY2==2 thenif GX2==1130656372 thenreturn 1130656372endifif GX2==1130656356 thenreturn 1499622509endifif GX2==1131833710 thenreturn 1499624556endifif GX2==1130852979 thenreturn 1130852979endifif GX2==1131181671 thenreturn 1131181671endifif GX2==1517709678 thenreturn 1500673132endifif GX2==1516399475 thenreturn 1500999010endifif GX2==1315205732 thenreturn 1247966316endifelseif GY2==3 thenif GX2==1130656372 thenreturn 1130656372endifif GX2==1130656356 thenreturn 1499622509endifif GX2==1131833710 thenreturn 1499624556endifif GX2==1130852979 thenreturn 1500673132endifif GX2==1131181671 thenreturn 1131181671endifif GX2==1517709678 thenreturn 1500673132endifif GX2==1516399475 thenreturn 1499624556endifif GX2==1315205732 thenreturn 1247966316endifelseif GY2==4 thenif GX2==1130656372 thenreturn 1130656372endifif GX2==1130656356 thenreturn 1131570027endifif GX2==1131833710 thenreturn 1098279278endifif GX2==1130852979 thenreturn 1097298532endifif GX2==1131181671 thenreturn 1097627236endifif GX2==1517709678 thenreturn 1097298532endifif GX2==1516399475 thenreturn 1131570027endifif GX2==1315205732 thenreturn 1131833710endifelseif GY2==5 thenif GX2==1130656372 thenreturn 1130656372endifif GX2==1130656356 thenreturn 1365537394endifif GX2==1131833710 thenreturn 1365467760endifif GX2==1130852979 thenreturn 1365734004endifif GX2==1131181671 thenreturn 1365734003endifif GX2==1517709678 thenreturn 1365734004endifif GX2==1516399475 thenreturn 1365467760endifif GX2==1315205732 thenreturn 1366520944endifelseif GY2==6 thenif GX2==1130656372 thenreturn 1130656372endifif GX2==1130656356 thenreturn 1147302507endifif GX2==1131833710 thenreturn 1147630195endifif GX2==1130852979 thenreturn 1331982964endifif GX2==1131181671 thenreturn 1332114292endifif GX2==1517709678 thenreturn 1148347507endifif GX2==1516399475 thenreturn 1148416356endifif GX2==1315205732 thenreturn 1332964706endifelseif GY2==7 thenif GX2==1130656372 thenreturn 1130656372endifif GX2==1130656356 thenreturn 1197634155endifif GX2==1131833710 thenreturn 1198290531endifif GX2==1130852979 thenreturn 1197765236endifif GX2==1131181671 thenreturn 1197763442endifif GX2==1517709678 thenreturn 1198679155endifif GX2==1516399475 thenreturn 1198748004endifif GX2==1315205732 thenreturn 1197961843endifendifreturn 0endfunctionfunction GJ2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local real GK2=(LoadReal(XY,(MKI),(149)))local real GL2=(LoadReal(XY,(MKI),(150)))local real GM2=(LoadReal(XY,(MKI),(151)))local real GN2=128local real xlocal real ylocal integer XWO=(LoadInteger(XY,(MKI),(152)))local player p=(LoadPlayerHandle(XY,(MKI),(54)))local integer GS2=(LoadInteger(XY,(MKI),(153)))loopexitwhen GK2>GM2loopexitwhen GL2>8192if GetLocalPlayer()==p thenset GS2=GS2+1set x=GK2set y=GL2call SetTerrainType(x,y,GW2(JL[GS2],XWO),SL[GS2],1,0)set x=-GK2set y=GL2call SetTerrainType(x,y,GW2(KL[GS2],XWO),TL[GS2],1,0)set x=-GK2set y=-GL2call SetTerrainType(x,y,GW2(LL[GS2],XWO),RL[GS2],1,0)set x=GK2set y=-GL2call SetTerrainType(x,y,GW2(ML[GS2],XWO),PL[GS2],1,0)endifset GL2=GL2+GN2endloopset GL2=0set GK2=GK2+GN2endloopset GM2=GM2+256call SaveReal(XY,(MKI),(149),((GK2)*1.0))call SaveReal(XY,(MKI),(150),((GL2)*1.0))call SaveInteger(XY,(MKI),(153),(GS2))call SaveReal(XY,(MKI),(151),((GM2)*1.0))if GM2>8192 thencall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullreturn falseendfunctionfunction GT2 takes nothing returns nothingif GetTriggerPlayer()==GetLocalPlayer()and(GetDestructableTypeId(GetEnumDestructable())==1096053874 or GetDestructableTypeId(GetEnumDestructable())==1110454322)thencall SetDestructableAnimation(GetEnumDestructable(),"stand alternate")endifendfunctionfunction GR2 takes nothing returns nothingif GetTriggerPlayer()==GetLocalPlayer()and(GetDestructableTypeId(GetEnumDestructable())==1096053874 or GetDestructableTypeId(GetEnumDestructable())==1110454322)thencall SetDestructableAnimation(GetEnumDestructable(),"stand")endifendfunctionfunction GP2 takes integer XWO returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)if XWO==1 thencall EnumDestructablesInRectAll(GetWorldBounds(),function GT2)elsecall EnumDestructablesInRectAll(GetWorldBounds(),function GR2)endifset QL[GetPlayerId(GetTriggerPlayer())]=XWOcall TriggerRegisterTimerEvent(t,0.02,true)call TriggerAddCondition(t,Condition(function GJ2))call SaveInteger(XY,(MKI),(152),(XWO))call SaveReal(XY,(MKI),(149),((0)*1.0))call SaveReal(XY,(MKI),(150),((0)*1.0))call SaveReal(XY,(MKI),(151),((160)*1.0))call SavePlayerHandle(XY,(MKI),(54),(GetTriggerPlayer()))set t=nullendfunctionfunction Command_Terrain takes nothing returns nothingif WL[GetPlayerId(GetTriggerPlayer())]==false thenset VL[GetPlayerId(GetTriggerPlayer())]=VL[GetPlayerId(GetTriggerPlayer())]+1if VL[GetPlayerId(GetTriggerPlayer())]<9 thenif GetEventPlayerChatString()=="-terrain"or GetEventPlayerChatString()=="-terrain default"thencall GP2(0)elseif GetEventPlayerChatString()=="-terrain snow"thencall GP2(1)elseif GetEventPlayerChatString()=="-terrain city1"thencall GP2(2)elseif GetEventPlayerChatString()=="-terrain city2"thencall GP2(3)elseif GetEventPlayerChatString()=="-terrain jungle"thencall GP2(4)elseif GetEventPlayerChatString()=="-terrain highlands"thencall GP2(5)elseif GetEventPlayerChatString()=="-terrain reddungeon"thencall GP2(6)elseif GetEventPlayerChatString()=="-terrain bluedungeon"thencall GP2(7)endifelsecall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10,GetObjectName(1848657740))endifendifendfunctionfunction GQ2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local real GK2=(LoadReal(XY,(MKI),(149)))local real GL2=(LoadReal(XY,(MKI),(150)))local real GM2=(LoadReal(XY,(MKI),(151)))local real GN2=128local real xlocal real yloopexitwhen GK2>GM2loopexitwhen GL2>8192set YL=YL+1set x=GK2set y=GL2if IsPointBlighted(x,y)==false thenset JL[YL]=GetTerrainType(x,y)set SL[YL]=GetTerrainVariance(x,y)endifset x=-GK2set y=GL2if IsPointBlighted(x,y)==false thenset KL[YL]=GetTerrainType(x,y)set TL[YL]=GetTerrainVariance(x,y)endifset x=-GK2set y=-GL2if IsPointBlighted(x,y)==false thenset LL[YL]=GetTerrainType(x,y)set RL[YL]=GetTerrainVariance(x,y)endifset x=GK2set y=-GL2if IsPointBlighted(x,y)==false thenset ML[YL]=GetTerrainType(x,y)set PL[YL]=GetTerrainVariance(x,y)endifset GL2=GL2+GN2endloopset GL2=0set GK2=GK2+GN2endloopset GM2=GM2+256call SaveReal(XY,(MKI),(149),((GK2)*1.0))call SaveReal(XY,(MKI),(150),((GL2)*1.0))call SaveReal(XY,(MKI),(151),((GM2)*1.0))if GM2>8192 thencall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullreturn falseendfunctionfunction H02 takes nothing returns nothinglocal trigger tset t=CreateTrigger()call TriggerRegisterTimerEvent(t,0.25,true)call TriggerAddCondition(t,Condition(function Q1O))set PK=CreateTimer()call TimerStart(PK,UK+1,false,null)call RemoveUnitFromStock(RQ,1747989059)call AddUnitToStock(RQ,1747989059,1,2)call RemoveUnitFromStock(BW0,1747989059)call AddUnitToStock(BW0,1747989059,1,2)set t=nullendfunctionfunction HI2 takes string D72 returns booleanif D72=="-ma"or D72=="-ms"or D72=="-cs"or D72=="-cson"or D72=="-disablehelp"or D72=="-enablehelp"or D72=="-unstuck"or D72=="-recreate"thenreturn trueelseif D72=="-swaphero"or D72=="-showmsg"or D72=="-hidemsg"or D72=="-showdeny"or D72=="-hidedeny"or D72=="-weather rain"or D72=="-weather snow"or D72=="-weather moonlight"or D72=="-weather wind"or D72=="-weather random"or D72=="-weather off"or D72=="-denyinfo"or D72=="-di"or D72=="-deathon"or D72=="-don"or D72=="-deathoff"or D72=="-doff"or D72=="-roll"or D72=="-hideheronames"or D72=="-hhn"or D72=="-test"or D72=="-mute"or D72=="-wtf"or D72=="-fleshstr"or D72=="-fs"or D72=="-switchon"thenreturn trueendifreturn falseendfunctionfunction H12 takes nothing returns booleanreturn not B0endfunctionfunction HO2 takes string H22 returns nothingif W2==""thenset W2="|c006699CC"+H22+"|r"elseset W2=W2+"/|c006699CC"+H22+"|r"endifendfunctionfunction H32 takes string H42,integer H52,integer H62 returns stringreturn SubString(H42,0,H52)+SubString(H42,H62,StringLength(H42))endfunctionfunction H72 takes string H42 returns stringlocal integer EE1=StringLength(H42)local string H82local string UCO=""local integer i=0loopexitwhen(i==EE1)set H82=StringCase(SubString(H42,i,i+1),false)if not(H82==StringCase(H82,true))thenset UCO=UCO+H82endifset i=i+1endloopreturn UCOendfunctionfunction H92 takes string HA2,integer XWO returns nothinglocal string AD2=H72(HA2)local string array HB2local string array HC2local string array GameModeStringlocal boolean array HD2local integer HE2local integer EE1=StringLength(AD2)local integer x=0local integer y=0local integer z=0local boolean APlocal boolean ARlocal boolean LMlocal boolean MMlocal boolean TRlocal boolean DMlocal boolean MRlocal boolean SPlocal boolean AAlocal boolean AIlocal boolean ASlocal boolean IDlocal boolean NPlocal boolean SClocal boolean EMlocal boolean DUlocal boolean SHlocal boolean VRlocal boolean RVlocal boolean RDlocal boolean OMlocal boolean NTlocal boolean NBlocal boolean NMlocal boolean NSlocal boolean SOlocal boolean NRlocal boolean XLlocal boolean SDlocal boolean PMlocal boolean OIlocal boolean MIlocal boolean CMlocal boolean FRlocal boolean MOlocal boolean ROlocal boolean ERlocal boolean CDlocal boolean RSlocal boolean CPlocal boolean ZMlocal boolean UBlocal boolean TTset HB2[1]="allpick"set HC2[1]="ap"set HB2[2]="allrandom"set HC2[2]="ar"set HB2[3]="leaguemode"set HC2[3]="lm"set HB2[4]="mirrormatch"set HC2[4]="mm"set HB2[5]="teamrandom"set HC2[5]="tr"set HB2[6]="deathmatch"set HC2[6]="dm"set HB2[7]="moderandom"set HC2[7]="mr"set HB2[8]="shuffleplayers"set HC2[8]="sp"set HB2[9]="allagility"set HC2[9]="aa"set HB2[10]="allintelligence"set HC2[10]="ai"set HB2[11]="allstrength"set HC2[11]="as"set HB2[12]="itemdrop"set HC2[12]="id"set HB2[13]="nopowerups"set HC2[13]="np"set HB2[14]="supercreeps"set HC2[14]="sc"set HB2[15]="easymode"set HC2[15]="em"set HB2[16]="duplicatemode"set HC2[16]="du"set HB2[17]="samehero"set HC2[17]="sh"set HB2[18]="voterandom"set HC2[18]="vr"set HB2[19]="reverse"set HC2[19]="rv"set HB2[20]="randomdraft"set HC2[20]="rd"set HB2[21]="onlymid"set HC2[21]="om"set HB2[22]="extendedleague"set HC2[22]="xl"set HB2[23]="nomid"set HC2[23]="nm"set HB2[24]="notop"set HC2[24]="nt"set HB2[25]="nobot"set HC2[25]="nb"set HB2[26]="noswap"set HC2[26]="ns"set HB2[27]="norepick"set HC2[27]="nr"set HB2[28]="captainsdraft"set HC2[28]="cd"set HB2[29]="singledraft"set HC2[29]="sd"set HB2[30]="poolingmode"set HC2[30]="pm"set HB2[31]="observerinfo"set HC2[31]="oi"set HB2[32]="miniheroes"set HC2[32]="mi"set HB2[33]="captainsmode"set HC2[33]="cm"set HB2[34]="fastrespawn"set HC2[34]="fr"set HB2[35]="meleeonly"set HC2[35]="mo"set HB2[36]="rangeonly"set HC2[36]="ro"set HB2[37]="experimentalrunes"set HC2[37]="er"set HB2[38]="randomside"set HC2[38]="rs"set HB2[39]="switchon"set HC2[39]="so"set HB2[40]="zoommode"set HC2[40]="zm"set HB2[41]="capturepoint"set HC2[41]="cp"set HB2[42]="unban"set HC2[42]="ub"set HB2[43]="tagteam"set HC2[43]="tt"set HE2=43set x=-1loopexitwhen x==EE1-1set x=x+1set y=xloopexitwhen y==EE1set y=y+1set z=1loopexitwhen z>HE2if HB2[z]==SubString(AD2,x,y)thenset HD2[z]=trueset z=HE2+1set AD2=H32(AD2,x,y)set x=-1set EE1=StringLength(AD2)set y=EE1elseset z=z+1endifendloopendloopendloopset x=-1loopexitwhen x==EE1-1set x=x+1set y=xloopexitwhen y==EE1set y=y+1set z=1loopexitwhen z>HE2if HC2[z]==SubString(AD2,x,y)thenset HD2[z]=trueset z=HE2+1set AD2=H32(AD2,x,y)set x=-1set EE1=StringLength(AD2)set y=EE1elseset z=z+1endifendloopendloopendloopset AP=HD2[1]set AR=HD2[2]set LM=HD2[3]set MM=HD2[4]set TR=HD2[5]set DM=HD2[6]set MR=HD2[7]set SP=HD2[8]set AA=HD2[9]set AI=HD2[10]set AS=HD2[11]set ID=HD2[12]set NP=HD2[13]set SC=HD2[14]set EM=HD2[15]set DU=HD2[16]set SH=HD2[17]set VR=HD2[18]set RV=HD2[19]set RD=HD2[20]set OM=HD2[21]set XL=HD2[22]set NM=HD2[23]set NT=HD2[24]set NB=HD2[25]set NS=HD2[26]set NR=HD2[27]set CD=HD2[28]set SD=HD2[29]set PM=HD2[30]set OI=HD2[31]set MI=HD2[32]set CM=HD2[33]set FR=HD2[34]set MO=HD2[35]set RO=HD2[36]set ER=HD2[37]set RS=HD2[38]set SO=HD2[39]set ZM=HD2[40]set CP=HD2[41]set UB=HD2[42]set TT=HD2[43]if AD2!=""or HI2(HA2)thenreturnendifif(AR and(CM or AP or TR or LM or MR or RV or RD or CD or SD or TT))or(AP and(TR or MR))or(TR and(LM or MR))or(LM and MR)or(MM and SH)thencall R1I(WO,GetObjectName(1848652373))returnendifif(AA and(AI or AS or DM))or(AS and(AI or DM))or(AI and DM)thencall R1I(WO,GetObjectName(1848652373))returnendifif(RO and(MO or DM))or(MO and DM)thencall R1I(WO,GetObjectName(1848652373))returnendifif RV and(CM or AR or TR or MR or LM or DM or SH or TT)thencall R1I(WO,GetObjectName(1848652373))returnendifif(DM and(CM or TR or LM or MR or SH or RV or RD or CD or SD or TT))or(MM and DM)or(SH and DM)thencall R1I(WO,GetObjectName(1848652372))returnendifif LM and(TT or CM or AP or RD or CD or AR or SD or MM or TR or DM or MR or AA or AI or AS or ID or NP or SC or EM or DU or SH or RV or OM or NB or NM or NT or XL or MO or RO)thencall R1I(WO,GetObjectName(1848652593))returnendifif XL and(TT or CM or AP or RD or CD or AR or SD or MM or TR or DM or MR or AA or AI or AS or ID or NP or SC or EM or DU or SH or RV or OM or NB or NM or NT or LM or RO or MO)thencall R1I(WO,GetObjectName(1848652594))returnendifif CM and(TT or SP or XL or AP or RD or CD or AR or SD or MM or TR or DM or MR or AA or AI or AS or ID or NP or SC or EM or DU or SH or RV or OM or NB or NM or NT or LM or MO or RO)thencall R1I(WO,GetObjectName(1848652594))returnendifif RD and(TT or CD or CM or AP or LM or AR or SD or MM or TR or DM or MR or AA or AI or AS or SH or RV or RO or MO)thencall R1I(WO,GetObjectName(1848652373))returnendifif CD and(TT or RD or CM or AP or LM or AR or SD or MM or TR or DM or MR or AA or AI or AS or SH or RV or RO or MO)thencall R1I(WO,GetObjectName(1848652373))returnendifif MR and(TT or CM or AP or LM or AR or SD or MM or TR or DM or AA or AI or AS or SH or RV or RO or MO)thencall R1I(WO,GetObjectName(1848652373))returnendifif SD and(TT or CM or AP or LM or AR or RD or CD or MM or TR or DM or MR or AA or AI or AS or SH or RV or RO or MO)thencall R1I(WO,GetObjectName(1848652373))returnendifif VR and(TT or CM or LM or RD or CD or SD or AR or MM or TR or DM or MR or AA or AI or AS or SH or RV or RO or MO)thencall R1I(WO,GetObjectName(1848652373))returnendifif TT and(SO or VR or CM or LM or RD or CD or SD or AR or MM or TR or DM or MR or AA or AI or AS or SH or RV or RO or MO)thencall R1I(WO,GetObjectName(1848652373))returnendifif MM and NNI(OO)!=NNI(AO)thencall R1I(WO,GetObjectName(1848652596))returnendifif VR and NNI(OO)!=NNI(AO)thencall R1I(WO,GetObjectName(1848652596))returnendifif RV and NNI(OO)!=NNI(AO)thencall R1I(WO,GetObjectName(1848652596))returnendifif LM and not(NYI(BO[1])and NYI(BO[2])and NYI(BO[3])and NYI(BO[4])and NYI(BO[5])and NYI(CO[1])and NYI(CO[2])and NYI(CO[3])and NYI(CO[4])and NYI(CO[5]))thenendifif XL and not(NYI(BO[1])and NYI(BO[2])and NYI(BO[3])and NYI(BO[4])and NYI(BO[5])and NYI(CO[1])and NYI(CO[2])and NYI(CO[3])and NYI(CO[4])and NYI(CO[5]))thenendifif TT or ZM or CP or FR or CM or AP or AR or LM or MM or TR or DM or MR or SP or AA or AI or AS or ID or NP or SC or DU or EM or SH or VR or RV or RD or CD or OM or NB or NM or NT or NS or NR or XL or SD or PM or OI or MI or MO or RO or ER or RS or SO thencall DisableTrigger(RR0)elsereturnendifif CM==false thencall SAO()call RWO()endifif LM==false and XL==false thencall EJ2()endifset AL=H72(HA2)if RT0 thencall E71("Mode"+AL,0)elsecall E71("Mode"+AL,GetPlayerId(WO))endifset J2=falseif LM thenset D3=GetObjectName(1848658010)elseif XL thenset D3=GetObjectName(1848658232)elseif RD thenset D3=GetObjectName(1848658254)elseif CD thenset D3=GetObjectName(1848658233)elseif MM thenset D3=GetObjectName(1848658248)elseif DM thenset D3=GetObjectName(1848658249)elseif RV thenset D3=GetObjectName(1848658243)elseif AP thenset D3=GetObjectName(1848658244)elseif AR thenset D3=GetObjectName(1848658231)elseif TR thenset D3=GetObjectName(1848658230)elseif MR thenset D3=GetObjectName(1848658250)elseif VR thenset D3=GetObjectName(1848658229)elseif SD thenset D3=GetObjectName(1848658228)elseif CM thenset D3=GetObjectName(1848658247)elseif TT thenset D3=GetObjectName(1848659280)endifif CM thencall HO2(GetObjectName(1848658251))endifif TT thencall HO2(GetObjectName(1848659281))endifif LM thencall HO2(GetObjectName(1848658227))endifif XL thencall HO2(GetObjectName(1848658226))endifif RD thencall HO2(GetObjectName(1848658246))endifif CD thencall HO2(GetObjectName(1848658225))endifif DM thencall HO2(GetObjectName(1848658241))endifif MM thencall HO2(GetObjectName(1848658224))endifif AP thencall HO2(GetObjectName(1848658252))endifif AR thencall HO2(GetObjectName(1848658257))endifif VR thencall HO2(GetObjectName(1848658253))endifif MR thencall HO2(GetObjectName(1848658245))endifif TR thencall HO2(GetObjectName(1848658242))endifif SP thencall HO2(GetObjectName(1848658255))endifif AA thencall HO2(GetObjectName(1848658261))endifif AS thencall HO2(GetObjectName(1848658256))endifif AI thencall HO2(GetObjectName(1848658259))endifif RO thencall HO2(GetObjectName(1848658260))endifif MO thencall HO2(GetObjectName(1848652594))endifif DU thencall HO2(GetObjectName(1848658264))endifif ID thencall HO2(GetObjectName(1848658266))endifif NP thencall HO2(GetObjectName(1848658486))endifif SC thencall HO2(GetObjectName(1848658487))endifif EM thencall HO2(GetObjectName(1848658489))endifif SH thencall HO2(GetObjectName(1848658497))endifif RV thencall HO2(GetObjectName(1848658263))endifif OM thencall HO2(GetObjectName(1848658262))endifif NM thencall HO2(GetObjectName(1848658258))endifif NB thencall HO2(GetObjectName(1848658498))endifif NT thencall HO2(GetObjectName(1848658488))endifif NS thencall HO2(GetObjectName(1848658499))endifif NR thencall HO2(GetObjectName(1848658502))endifif SD thencall HO2(GetObjectName(1848658480))endifif PM thencall HO2(GetObjectName(1848658265))endifif OI thencall HO2(GetObjectName(1848658485))endifif MI thencall HO2(GetObjectName(1848658484))endifif FR thencall HO2(GetObjectName(1848658500))endifif ER thencall HO2(GetObjectName(1848658501))endifif RS thencall HO2(GetObjectName(1848658481))endifif SO thencall HO2(GetObjectName(1848658482))endifif ZM thencall HO2(GetObjectName(1848658753))endifif CP thencall HO2(GetObjectName(1848658755))endifif UB thencall HO2(GetObjectName(1848658994))endifcall PDI(bj_FORCE_ALL_PLAYERS,20.00," ")if XWO==1 thencall PDI(bj_FORCE_ALL_PLAYERS,20.00,C0[GetPlayerId(WO)]+(D30[GetPlayerId((WO))])+"|r"+" "+GetObjectName(1848653361)+" "+W2)elsecall PDI(bj_FORCE_ALL_PLAYERS,20.00,GetObjectName(1848657998)+" "+W2)endifcall PDI(bj_FORCE_ALL_PLAYERS,20.00,GetObjectName(1848653363)+" -gameinfo.")call PDI(bj_FORCE_ALL_PLAYERS,20.00," ")call R9I("HF2",SP)call R9I("HG2",RS)call R9I("HH2",UB)call R9I("HZ2",DM)call R9I("HV2",MM)call R9I("HW2",SH)call R9I("HX2",AA)call R9I("HY2",AI)call R9I("HJ2",AS)call R9I("HK2",RO)call R9I("HL2",MO)call R9I("HM2",DU)call R9I("HN2",AR)call R9I("HS2",VR)call R9I("HT2",AP)call R9I("HR2",TR)call R9I("HP2",RV)call R9I("HQ2",LM)call R9I("HU2",XL)call R9I("Z02",CM)call R9I("ZI2",RD)call R9I("Z12",SD)call R9I("ZO2",MR)call R9I("Z22",ID)call R9I("Z32",NP)call R9I("Z42",SC)call R9I("Z52",EM)call R9I("Z62",OM)call R9I("Z72",NB)call R9I("Z82",NT)call R9I("Z92",NM)call R9I("ZA2",SO)call R9I("ZB2",NS)call R9I("ZC2",NR)call R9I("ZD2",PM)call R9I("ZE2",OI)call R9I("ZF2",MI)call R9I("ZG2",FR)call R9I("ZH2",ER)call R9I("ZZ2",CD)call R9I("ZV2",ZM)call R9I("ZW2",CP)call R9I("ZX2",TT)set QK=truecall A31(0,0,false)if IN==false and UM==false thencall H02()endifcall Q31()if SO==false thenset R10[0]=trueset R10[1]=trueset R10[2]=trueset R10[3]=trueset R10[4]=trueset R10[5]=trueset R10[6]=trueset R10[7]=trueset R10[8]=trueset R10[9]=trueset R10[10]=trueset R10[11]=trueset R10[12]=trueset R10[13]=trueset R10[14]=trueset R10[15]=trueset R10[16]=trueendifendfunctionfunction ZY2 takes nothing returns nothingcall H92(GetEventPlayerChatString(),1)endfunctionfunction ZJ2 takes nothing returns booleanif(YY)!=""and QK==false thenset RT0=truecall H92("-"+(YY),2)elsecall TriggerRegisterPlayerChatEvent(RR0,WO,"-",false)endifreturn falseendfunctionfunction HT2 takes nothing returns nothinglocal location GP1=GetRectCenter(N4)local location GQ1=GetRectCenter(S4)local integer x=1set K0=trueset UK=150loopexitwhen x>5if NYI(BO[x])thencall CreateUnitAtLoc(BO[x],1848651843,GQ1,bj_UNIT_FACING)endifif NYI(CO[x])thencall CreateUnitAtLoc(CO[x],1848651843,GP1,bj_UNIT_FACING)endifset x=x+1endloopcall RemoveLocation(GP1)call RemoveLocation(GQ1)set GP1=nullset GQ1=nullendfunctionfunction ZM2 takes nothing returns integerif P20==BO[1]thenreturn 1endifreturn 2endfunctionfunction ZN2 takes string S,real ZS2,real ZT2,real ZR2,real ZP2,real ZQ2,boolean ZU2,integer r,integer g,integer b returns imageset YK=CreateImage(S,ZS2,ZT2,0,ZR2-(ZS2/2),ZP2-(ZT2/2),ZQ2,0,0,0,2)call SetImageRenderAlways(YK,true)call ShowImage(YK,ZU2)call SetImageColor(YK,r,g,b,255)return YKendfunctionfunction V02 takes image i returns nothingcall ShowImage(i,false)call DestroyImage(i)endfunctionfunction VI2 takes integer V12 returns nothinglocal real x=Q00+40local real y=QI0-50local integer VO2=255local integer V22=0local integer V32=0local integer V42=0local integer V52=0local integer V62=255local integer rlocal integer glocal integer bif V12==1 thenset r=VO2set g=V22set b=V32set PZ0=ZN2("Fonts\\B.blp",90,90,x-40,y,0,true,r,g,b)set PV0=ZN2("Fonts\\A.blp",90,90,x,y,0,true,r,g,b)set PW0=ZN2("Fonts\\N.blp",90,90,x+50,y,0,true,r,g,b)elseif V12==2 thenset r=V42set g=V52set b=V62call V02(PZ0)call V02(PV0)call V02(PW0)set PZ0=ZN2("Fonts\\P.blp",90,90,x-60,y,0,true,r,g,b)set PV0=ZN2("Fonts\\I.blp",90,90,x-20,y,0,true,r,g,b)set PW0=ZN2("Fonts\\C.blp",90,90,x,y,0,true,r,g,b)set PX0=ZN2("Fonts\\K.blp",90,90,x+45,y,0,true,r,g,b)elseif V12==3 thenset r=VO2set g=V22set b=V32call V02(PZ0)call V02(PV0)call V02(PW0)call V02(PX0)set PZ0=ZN2("Fonts\\B.blp",90,90,x-40,y,0,true,r,g,b)set PV0=ZN2("Fonts\\A.blp",90,90,x,y,0,true,r,g,b)set PW0=ZN2("Fonts\\N.blp",90,90,x+50,y,0,true,r,g,b)elseif V12==4 thenset r=V42set g=V52set b=V62call V02(PZ0)call V02(PV0)call V02(PW0)set PZ0=ZN2("Fonts\\P.blp",90,90,x-60,y,0,true,r,g,b)set PV0=ZN2("Fonts\\I.blp",90,90,x-20,y,0,true,r,g,b)set PW0=ZN2("Fonts\\C.blp",90,90,x,y,0,true,r,g,b)set PX0=ZN2("Fonts\\K.blp",90,90,x+45,y,0,true,r,g,b)elseif V12==5 thenset r=VO2set g=V22set b=V32call V02(PZ0)call V02(PV0)call V02(PW0)call V02(PX0)set PZ0=ZN2("Fonts\\B.blp",90,90,x-40,y,0,true,r,g,b)set PV0=ZN2("Fonts\\A.blp",90,90,x,y,0,true,r,g,b)set PW0=ZN2("Fonts\\N.blp",90,90,x+50,y,0,true,r,g,b)elseif V12==6 thenset r=V42set g=V52set b=V62call V02(PZ0)call V02(PV0)call V02(PW0)set PZ0=ZN2("Fonts\\P.blp",90,90,x-60,y,0,true,r,g,b)set PV0=ZN2("Fonts\\I.blp",90,90,x-20,y,0,true,r,g,b)set PW0=ZN2("Fonts\\C.blp",90,90,x,y,0,true,r,g,b)set PX0=ZN2("Fonts\\K.blp",90,90,x+45,y,0,true,r,g,b)elseif V12==7 thencall V02(PZ0)call V02(PV0)call V02(PW0)call V02(PX0)endifendfunctionfunction V72 takes integer i,integer V82 returns stringif i<0 thenset i=0endifif TimerGetElapsed(M)<15 thenreturn "|c00555555"+I2S(i)endifif P40==3 thenreturn "|c00555555"+I2S(i)endifif P40==1 and V82!=ZM2()thenreturn "|c00555555"+I2S(i)elseif P40==2 and V82!=ZM2()thenreturn "|c00555555"+I2S(i)elseif i==0 thenreturn "|c00555555"+I2S(i)elseif i<6 thenreturn "|c00ff0303"+I2S(i)elsereturn I2S(i)endifendfunctionfunction V92 takes nothing returns booleanlocal multiboarditem LSIlocal integer ilocal integer R0Olocal integer RIOlocal integer C61=7local integer VA2=0set R0O=1set RIO=VA2set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemWidth(LSI,0.5)call MultiboardSetItemValue(LSI,C0[GetPlayerId(BO[1])]+(D30[GetPlayerId((BO[1]))])+"|r")call MultiboardReleaseItem(LSI)set R0O=R0O+2set RIO=VA2set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,"|c006699CC"+GetObjectName(1848657238))call MultiboardSetItemWidth(LSI,0.035)call MultiboardReleaseItem(LSI)set i=0set R0O=R0Oset RIO=VA2+i+1set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemWidth(LSI,0.015)if P90[i]>0 thencall MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,DJ0[P90[i]])endifcall MultiboardReleaseItem(LSI)set i=1set RIO=VA2+i+1set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemWidth(LSI,0.015)if P90[i]>0 thencall MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,DJ0[P90[i]])endifcall MultiboardReleaseItem(LSI)set i=2set RIO=VA2+i+1set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemWidth(LSI,0.015)if P90[i]>0 thencall MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,DJ0[P90[i]])endifcall MultiboardReleaseItem(LSI)set i=3set RIO=VA2+i+1set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemWidth(LSI,0.015)if P90[i]>0 thencall MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,DJ0[P90[i]])endifcall MultiboardReleaseItem(LSI)set i=4set RIO=VA2+i+1set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemWidth(LSI,0.015)if P90[i]>0 thencall MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,DJ0[P90[i]])endifcall MultiboardReleaseItem(LSI)set R0O=R0O+2set RIO=VA2set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,"|c006699CC"+GetObjectName(1848657240))call MultiboardSetItemWidth(LSI,0.035)call MultiboardReleaseItem(LSI)set i=0set R0O=R0Oset RIO=VA2+i+1set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemWidth(LSI,0.015)if PD0[i]>0 thencall MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,DJ0[PD0[i]])endifcall MultiboardReleaseItem(LSI)set i=1set RIO=VA2+i+1set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemWidth(LSI,0.015)if PD0[i]>0 thencall MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,DJ0[PD0[i]])endifcall MultiboardReleaseItem(LSI)set i=2set RIO=VA2+i+1set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemWidth(LSI,0.015)if PD0[i]>0 thencall MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,DJ0[PD0[i]])endifcall MultiboardReleaseItem(LSI)set i=3set RIO=VA2+i+1set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemWidth(LSI,0.015)if PD0[i]>0 thencall MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,DJ0[PD0[i]])endifcall MultiboardReleaseItem(LSI)set i=4set RIO=VA2+i+1set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemWidth(LSI,0.015)if PD0[i]>0 thencall MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,DJ0[PD0[i]])endifcall MultiboardReleaseItem(LSI)set R0O=R0O+2set RIO=VA2set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,"|c006699CC"+GetObjectName(1848657237))call MultiboardSetItemWidth(LSI,0.035)call MultiboardReleaseItem(LSI)set RIO=VA2+1set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)if P20==BO[1]thencall MultiboardSetItemValue(LSI,V72(PO0,1))elsecall MultiboardSetItemValue(LSI," ")endifcall MultiboardSetItemWidth(LSI,0.035)call MultiboardReleaseItem(LSI)set R0O=R0O+1set RIO=VA2set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,"|c006699CC"+GetObjectName(1848657236))call MultiboardSetItemWidth(LSI,0.035)call MultiboardReleaseItem(LSI)set RIO=VA2+1set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,V72(P10[1],1))call MultiboardSetItemWidth(LSI,0.035)call MultiboardReleaseItem(LSI)set R0O=R0O+2set RIO=VA2set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,"|c006699CC"+GetObjectName(1848657241))call MultiboardSetItemWidth(LSI,0.035)call MultiboardReleaseItem(LSI)set RIO=VA2+1set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)if TimerGetElapsed(M)<15 thencall MultiboardSetItemValue(LSI,"|c00555555"+GetObjectName(1848657457))elseif P40==1 thencall MultiboardSetItemValue(LSI,GetObjectName(1848657460))elseif P40==2 thencall MultiboardSetItemValue(LSI,"|c00555555"+GetObjectName(1848657457))elsecall MultiboardSetItemValue(LSI,"|c00555555"+GetObjectName(1848657458))endifcall MultiboardSetItemWidth(LSI,0.035)call MultiboardReleaseItem(LSI)set R0O=1set RIO=C61set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemWidth(LSI,1.5)call MultiboardSetItemValue(LSI,"   "+C0[GetPlayerId(CO[1])]+(D30[GetPlayerId((CO[1]))])+"|r")call MultiboardReleaseItem(LSI)set R0O=R0O+2set RIO=C61-1set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,"|c006699CC"+" "+GetObjectName(1848657238))call MultiboardSetItemWidth(LSI,0.035)call MultiboardReleaseItem(LSI)set i=0set RIO=C61+i+1-1set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemWidth(LSI,0.015)if PA0[i]>0 thencall MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,DJ0[PA0[i]])endifcall MultiboardReleaseItem(LSI)set i=1set RIO=C61+i+1-1set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemWidth(LSI,0.015)if PA0[i]>0 thencall MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,DJ0[PA0[i]])endifcall MultiboardReleaseItem(LSI)set i=2set RIO=C61+i+1-1set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemWidth(LSI,0.015)if PA0[i]>0 thencall MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,DJ0[PA0[i]])endifcall MultiboardReleaseItem(LSI)set i=3set RIO=C61+i+1-1set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemWidth(LSI,0.015)if PA0[i]>0 thencall MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,DJ0[PA0[i]])endifcall MultiboardReleaseItem(LSI)set i=4set RIO=C61+i+1-1set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemWidth(LSI,0.015)if PA0[i]>0 thencall MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,DJ0[PA0[i]])endifcall MultiboardReleaseItem(LSI)set R0O=R0O+2set RIO=C61-1set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,"|c006699CC"+" "+GetObjectName(1848657240))call MultiboardSetItemWidth(LSI,0.035)call MultiboardReleaseItem(LSI)set i=0set RIO=C61+i+1-1set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemWidth(LSI,0.015)if PE0[i]>0 thencall MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,DJ0[PE0[i]])endifcall MultiboardReleaseItem(LSI)set i=1set RIO=C61+i+1-1set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemWidth(LSI,0.015)if PE0[i]>0 thencall MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,DJ0[PE0[i]])endifcall MultiboardReleaseItem(LSI)set i=2set RIO=C61+i+1-1set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemWidth(LSI,0.015)if PE0[i]>0 thencall MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,DJ0[PE0[i]])endifcall MultiboardReleaseItem(LSI)set i=3set RIO=C61+i+1-1set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemWidth(LSI,0.015)if PE0[i]>0 thencall MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,DJ0[PE0[i]])endifcall MultiboardReleaseItem(LSI)set i=4set RIO=C61+i+1-1set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemWidth(LSI,0.015)if PE0[i]>0 thencall MultiboardSetItemStyle(LSI,false,true)call MultiboardSetItemIcon(LSI,DJ0[PE0[i]])endifcall MultiboardReleaseItem(LSI)set R0O=R0O+2set RIO=C61-2set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,"|c006699CC"+GetObjectName(1848657237))call MultiboardSetItemWidth(LSI,0.035)call MultiboardReleaseItem(LSI)set RIO=C61-1set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)if P20==CO[1]thencall MultiboardSetItemValue(LSI,V72(PO0,2))elsecall MultiboardSetItemValue(LSI," ")endifcall MultiboardSetItemWidth(LSI,0.035)call MultiboardReleaseItem(LSI)set R0O=R0O+1set RIO=C61-2set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,"|c006699CC"+GetObjectName(1848657236))call MultiboardSetItemWidth(LSI,0.035)call MultiboardReleaseItem(LSI)set RIO=C61-1set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,V72(P10[2],2))call MultiboardSetItemWidth(LSI,0.035)call MultiboardReleaseItem(LSI)set R0O=R0O+2set RIO=C61-2set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)call MultiboardSetItemValue(LSI,"|c006699CC"+GetObjectName(1848657241))call MultiboardSetItemWidth(LSI,0.035)call MultiboardReleaseItem(LSI)set RIO=C61-1set LSI=MultiboardGetItem(PH0,R0O,RIO)call MultiboardSetItemStyle(LSI,true,false)if TimerGetElapsed(M)<15 thencall MultiboardSetItemValue(LSI,"|c00555555"+GetObjectName(1848657457))elseif P40==2 thencall MultiboardSetItemValue(LSI,GetObjectName(1848657460))elseif P40==1 thencall MultiboardSetItemValue(LSI,"|c00555555"+GetObjectName(1848657457))elsecall MultiboardSetItemValue(LSI,"|c00555555"+GetObjectName(1848657458))endifcall MultiboardSetItemWidth(LSI,0.035)call MultiboardReleaseItem(LSI)return falseendfunctionfunction VB2 takes nothing returns nothinglocal integer R1O=12local integer ROO=14local trigger t=CreateTrigger()local integer ilocal multiboarditem LSIcall TriggerRegisterTimerEvent(t,0.5,true)call TriggerAddCondition(t,Condition(function V92))set PH0=CreateMultiboard()call MultiboardSetItemsWidth(PH0,0.015)call MultiboardSetRowCount(PH0,R1O)call MultiboardSetColumnCount(PH0,ROO)call MultiboardSetTitleText(PH0,GetObjectName(1848658742))call MultiboardSetItemsStyle(PH0,false,false)call MultiboardMinimize(PH0,false)call MultiboardDisplay(PH0,true)set i=0loopexitwhen i>ROOset LSI=MultiboardGetItem(PH0,0,i)call MultiboardSetItemWidth(LSI,0.015)call MultiboardReleaseItem(LSI)set i=i+1endloopset t=nullset LSI=nullendfunctionfunction VC2 takes nothing returns booleanlocal unit VD2=GetSoldUnit()local player p=GetOwningPlayer(VD2)local integer ilocal real xlocal real ylocal real aif GetUnitTypeId(VD2)==1747990094 and IsPlayerAlly(GetOwningPlayer(VD2),GetOwningPlayer(GetSellingUnit()))thenif K1[GetPlayerId(p)]!=null thencall R1I(p,GetObjectName(1848657459))call KillUnit(VD2)set VD2=nullset p=nullreturn falseendifset x=GetUnitX(GetSellingUnit())set y=GetUnitY(GetSellingUnit())set i=TDI(GetUnitTypeId(GetSellingUnit()))set a=GetUnitFacing(GetSellingUnit())call RemoveUnit(GetSellingUnit())call CreateUnit(p,i,x,y,a)endifif GetUnitTypeId(VD2)==1747990094 thencall KillUnit(VD2)endifif K1[GetPlayerId(BO[1])]!=null and K1[GetPlayerId(BO[2])]!=null and K1[GetPlayerId(BO[3])]!=null and K1[GetPlayerId(BO[4])]!=null and K1[GetPlayerId(BO[5])]!=null and K1[GetPlayerId(CO[1])]!=null and K1[GetPlayerId(CO[2])]!=null and K1[GetPlayerId(CO[3])]!=null and K1[GetPlayerId(CO[4])]!=null and K1[GetPlayerId(CO[5])]!=null thencall MZI(GetTriggeringTrigger())endifset VD2=nullset p=nullreturn falseendfunctionfunction VE2 takes nothing returns booleanset PI0=truecall MZI(GetTriggeringTrigger())call DestroyMultiboard(PH0)call SAO()call RWO()call Q31()return falseendfunctionfunction ModeCM_SpawnSound takes nothing returns booleancall MZI(GetTriggeringTrigger())call PlaySoundBJ(OE)return falseendfunctionfunction VF2 takes nothing returns booleanlocal trigger t=CreateTrigger()local integer A51local integer A41local string F21local unit ulocal real xlocal real ylocal integer ilocal real dlocal real VG2=GetRectCenterX(O4)local real VH2=GetRectCenterY(O4)local real VZ2=GetRectCenterX(S3)local real VV2=GetRectCenterY(S3)set P40=3set TA0=truecall MZI(GetTriggeringTrigger())set i=0loopexitwhen i==5set x=VG2-300+i*150set y=VH2set u=CreateUnit(BO[0],DK0[PD0[i]],x,y,270)call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_SELL)call PanCameraToTimedForPlayer(BO[i+1],VG2,VH2,0)call CreateUnit(BO[i+1],1848651843,VG2,VH2,bj_UNIT_FACING)call SetPlayerState(BO[i+1],PLAYER_STATE_RESOURCE_GOLD,RQ0[GetPlayerId(BO[i+1])]-250)set i=i+1endloopset i=0loopexitwhen i==5set x=VZ2-300+i*150set y=VV2set u=CreateUnit(CO[0],DK0[PE0[i]],x,y,270)call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_SELL)call PanCameraToTimedForPlayer(CO[i+1],VZ2,VV2,0)call CreateUnit(CO[i+1],1848651843,VZ2,VV2,bj_UNIT_FACING)call SetPlayerState(CO[i+1],PLAYER_STATE_RESOURCE_GOLD,RQ0[GetPlayerId(CO[i+1])]-250)set i=i+1endloopcall TriggerAddCondition(t,Condition(function VC2))call SuspendTimeOfDay(false)call EnableTrigger(EE0)call EnableTrigger(ON)set t=CreateTrigger()call TriggerRegisterTimerEvent(t,10,false)call TriggerAddCondition(t,Condition(function VE2))set UK=90call H02()call SOI()set t=nullset u=nullreturn falseendfunctionfunction VW2 takes integer VX2,integer i returns nothingcall NPI(D70[i])if VX2==1 thenset PD0[PF0]=iset PF0=PF0+1elseset PE0[PG0]=iset PG0=PG0+1endifendfunctionfunction VY2 takes integer VX2 returns nothinglocal integer i=S6I()loopif R[i]==false thenset R[i]=truecall VW2(VX2,i)returnendifendloopendfunctionfunction VJ2 takes integer VX2,integer i returns nothingcall E71("Ban"+I2S(GetPlayerId(GetOwningPlayer(GetSoldUnit()))),D70[i])call NPI(D70[i])if VX2==1 thenset P90[PB0]=iset PB0=PB0+1elseset PA0[PC0]=iset PC0=PC0+1endifendfunctionfunction VK2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer VX2=P40local player VL2=P50local player VM2=P60if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>40 and P10[VX2]==0)thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL and IsUnitType(GetSoldUnit(),UNIT_TYPE_HERO)==false thenset t=nullreturn falseendifif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL thencall VW2(VX2,GetUnitPointValue(GetSoldUnit()))call RemoveUnit(GetSoldUnit())elsecall VY2(VX2)endifcall MZI(t)set t=CreateTrigger()call TriggerRegisterTimerEvent(t,1,false)call TriggerAddCondition(t,Condition(function VF2))call VI2(7)call MultiboardSetTitleText(PH0,GetObjectName(1848658742))call SetPlayerState(BO[1],PLAYER_STATE_RESOURCE_GOLD,0)call SetPlayerState(CO[1],PLAYER_STATE_RESOURCE_GOLD,0)elseif GetTriggerEvalCount(t)>40 thenif P10[VX2]>0 thenset P10[VX2]=P10[VX2]-1endifelseset PO0=PO0-1endifendifset t=nullset VM2=nullreturn falseendfunctionfunction VN2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer VX2=P40local player VL2=P60local player VM2=P50if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>40 and P10[VX2]==0)thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL and IsUnitType(GetSoldUnit(),UNIT_TYPE_HERO)==false thenset t=nullreturn falseendifif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL thencall VW2(VX2,GetUnitPointValue(GetSoldUnit()))call RemoveUnit(GetSoldUnit())elsecall VY2(VX2)endifcall MZI(t)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SELL)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function VK2))set PO0=40set P20=VM2set P40=ZM2()call SetPlayerState(VM2,PLAYER_STATE_RESOURCE_GOLD,250)call SetPlayerState(VL2,PLAYER_STATE_RESOURCE_GOLD,0)call TQI(VM2,"Sound\\Interface\\Rescue.wav")elseif GetTriggerEvalCount(t)>40 thenif P10[VX2]>0 thenset P10[VX2]=P10[VX2]-1endifelseset PO0=PO0-1endifendifset t=nullset VM2=nullreturn falseendfunctionfunction VS2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer VX2=P40local player VL2=P50local player VM2=P60if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>30 and P10[VX2]==0)thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL and IsUnitType(GetSoldUnit(),UNIT_TYPE_HERO)==false thenset t=nullreturn falseendifif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL thencall VJ2(VX2,GetUnitPointValue(GetSoldUnit()))call RemoveUnit(GetSoldUnit())elsecall VJ2((VX2),-1)endifcall VI2(6)call MZI(t)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SELL)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function VN2))set PO0=40set P20=VM2set P40=ZM2()call SetPlayerState(VM2,PLAYER_STATE_RESOURCE_GOLD,250)call SetPlayerState(VL2,PLAYER_STATE_RESOURCE_GOLD,0)call TQI(VM2,"Sound\\Interface\\Rescue.wav")call MultiboardSetTitleText(PH0,GetObjectName(1848658742)+" - |c00ffffff"+GetObjectName(1848659289))call PDI(bj_FORCE_ALL_PLAYERS,15.00,"|c006699CC"+GetObjectName(1848659290)+"|r")elseif GetTriggerEvalCount(t)>30 thenif P10[VX2]>0 thenset P10[VX2]=P10[VX2]-1endifelseset PO0=PO0-1endifendifset t=nullset VM2=nullreturn falseendfunctionfunction VT2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer VX2=P40local player VL2=P60local player VM2=P50if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>30 and P10[VX2]==0)thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL and IsUnitType(GetSoldUnit(),UNIT_TYPE_HERO)==false thenset t=nullreturn falseendifif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL thencall VJ2(VX2,GetUnitPointValue(GetSoldUnit()))call RemoveUnit(GetSoldUnit())elsecall VJ2((VX2),-1)endifcall MZI(t)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SELL)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function VS2))set PO0=30set P20=VM2set P40=ZM2()call SetPlayerState(VM2,PLAYER_STATE_RESOURCE_GOLD,250)call SetPlayerState(VL2,PLAYER_STATE_RESOURCE_GOLD,0)call TQI(VM2,"Sound\\Interface\\Rescue.wav")elseif GetTriggerEvalCount(t)>30 thenif P10[VX2]>0 thenset P10[VX2]=P10[VX2]-1endifelseset PO0=PO0-1endifendifset t=nullset VM2=nullreturn falseendfunctionfunction VR2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer VX2=P40local player VL2=P50local player VM2=P60if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>40 and P10[VX2]==0)thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL and IsUnitType(GetSoldUnit(),UNIT_TYPE_HERO)==false thenset t=nullreturn falseendifif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL thencall VW2(VX2,GetUnitPointValue(GetSoldUnit()))call RemoveUnit(GetSoldUnit())elsecall VY2(VX2)endifcall VI2(5)call MZI(t)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SELL)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function VT2))set PO0=30set P20=VM2set P40=ZM2()call SetPlayerState(VM2,PLAYER_STATE_RESOURCE_GOLD,250)call SetPlayerState(VL2,PLAYER_STATE_RESOURCE_GOLD,0)call TQI(VM2,"Sound\\Interface\\Rescue.wav")call MultiboardSetTitleText(PH0,GetObjectName(1848658742)+" - |c00ffffff"+GetObjectName(1848659504))call PDI(bj_FORCE_ALL_PLAYERS,15.00,"|c006699CC"+GetObjectName(1848659505)+"|r")elseif GetTriggerEvalCount(t)>40 thenif P10[VX2]>0 thenset P10[VX2]=P10[VX2]-1endifelseset PO0=PO0-1endifendifset t=nullset VM2=nullreturn falseendfunctionfunction VP2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer VX2=P40local player VL2=P60local player VM2=P50if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>40 and P10[VX2]==0)thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL and IsUnitType(GetSoldUnit(),UNIT_TYPE_HERO)==false thenset t=nullreturn falseendifif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL thencall VW2(VX2,GetUnitPointValue(GetSoldUnit()))call RemoveUnit(GetSoldUnit())elsecall VY2(VX2)endifcall MZI(t)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SELL)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function VR2))set PO0=40set P20=VM2set P40=ZM2()call SetPlayerState(VM2,PLAYER_STATE_RESOURCE_GOLD,250)call SetPlayerState(VL2,PLAYER_STATE_RESOURCE_GOLD,0)call TQI(VM2,"Sound\\Interface\\Rescue.wav")elseif GetTriggerEvalCount(t)>40 thenif P10[VX2]>0 thenset P10[VX2]=P10[VX2]-1endifelseset PO0=PO0-1endifendifset t=nullset VM2=nullreturn falseendfunctionfunction VQ2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer VX2=P40local player VL2=P50local player VM2=P60if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>40 and P10[VX2]==0)thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL and IsUnitType(GetSoldUnit(),UNIT_TYPE_HERO)==false thenset t=nullreturn falseendifif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL thencall VW2(VX2,GetUnitPointValue(GetSoldUnit()))call RemoveUnit(GetSoldUnit())elsecall VY2(VX2)endifcall MZI(t)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SELL)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function VP2))set PO0=40set P20=VM2set P40=ZM2()call SetPlayerState(VM2,PLAYER_STATE_RESOURCE_GOLD,250)call SetPlayerState(VL2,PLAYER_STATE_RESOURCE_GOLD,0)call TQI(VM2,"Sound\\Interface\\Rescue.wav")elseif GetTriggerEvalCount(t)>40 thenif P10[VX2]>0 thenset P10[VX2]=P10[VX2]-1endifelseset PO0=PO0-1endifendifset t=nullset VM2=nullreturn falseendfunctionfunction VU2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer VX2=P40local player VL2=P60local player VM2=P50if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>40 and P10[VX2]==0)thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL and IsUnitType(GetSoldUnit(),UNIT_TYPE_HERO)==false thenset t=nullreturn falseendifif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL thencall VW2(VX2,GetUnitPointValue(GetSoldUnit()))call RemoveUnit(GetSoldUnit())elsecall VY2(VX2)endifcall MZI(t)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SELL)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function VQ2))set PO0=40set P20=VM2set P40=ZM2()call SetPlayerState(VM2,PLAYER_STATE_RESOURCE_GOLD,250)call SetPlayerState(VL2,PLAYER_STATE_RESOURCE_GOLD,0)call TQI(VM2,"Sound\\Interface\\Rescue.wav")elseif GetTriggerEvalCount(t)>40 thenif P10[VX2]>0 thenset P10[VX2]=P10[VX2]-1endifelseset PO0=PO0-1endifendifset t=nullset VM2=nullreturn falseendfunctionfunction W02 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer VX2=P40local player VL2=P60local player VM2=P60if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>30 and P10[VX2]==0)thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL and IsUnitType(GetSoldUnit(),UNIT_TYPE_HERO)==false thenset t=nullreturn falseendifif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL thencall VJ2(VX2,GetUnitPointValue(GetSoldUnit()))call RemoveUnit(GetSoldUnit())elsecall VJ2((VX2),-1)endifcall VI2(4)call MZI(t)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SELL)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function VU2))set PO0=40set P20=VM2set P40=ZM2()call SetPlayerState(VM2,PLAYER_STATE_RESOURCE_GOLD,250)call TQI(VM2,"Sound\\Interface\\Rescue.wav")call MultiboardSetTitleText(PH0,GetObjectName(1848658742)+" - |c00ffffff"+GetObjectName(1848659000))call PDI(bj_FORCE_ALL_PLAYERS,15.00,"|c006699CC"+GetObjectName(1848658995)+"|r")elseif GetTriggerEvalCount(t)>30 thenif P10[VX2]>0 thenset P10[VX2]=P10[VX2]-1endifelseset PO0=PO0-1endifendifset t=nullset VM2=nullreturn falseendfunctionfunction WI2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer VX2=P40local player VL2=P50local player VM2=P60if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>30 and P10[VX2]==0)thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL and IsUnitType(GetSoldUnit(),UNIT_TYPE_HERO)==false thenset t=nullreturn falseendifif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL thencall VJ2(VX2,GetUnitPointValue(GetSoldUnit()))call RemoveUnit(GetSoldUnit())elsecall VJ2((VX2),-1)endifcall MZI(t)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SELL)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function W02))set PO0=30set P20=VM2set P40=ZM2()call SetPlayerState(VM2,PLAYER_STATE_RESOURCE_GOLD,250)call SetPlayerState(VL2,PLAYER_STATE_RESOURCE_GOLD,0)call TQI(VM2,"Sound\\Interface\\Rescue.wav")elseif GetTriggerEvalCount(t)>30 thenif P10[VX2]>0 thenset P10[VX2]=P10[VX2]-1endifelseset PO0=PO0-1endifendifset t=nullset VM2=nullreturn falseendfunctionfunction W12 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer VX2=P40local player VL2=P60local player VM2=P50if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>30 and P10[VX2]==0)thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL and IsUnitType(GetSoldUnit(),UNIT_TYPE_HERO)==false thenset t=nullreturn falseendifif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL thencall VJ2(VX2,GetUnitPointValue(GetSoldUnit()))call RemoveUnit(GetSoldUnit())elsecall VJ2((VX2),-1)endifcall MZI(t)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SELL)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function WI2))set PO0=30set P20=VM2set P40=ZM2()call SetPlayerState(VM2,PLAYER_STATE_RESOURCE_GOLD,250)call SetPlayerState(VL2,PLAYER_STATE_RESOURCE_GOLD,0)call TQI(VM2,"Sound\\Interface\\Rescue.wav")elseif GetTriggerEvalCount(t)>30 thenif P10[VX2]>0 thenset P10[VX2]=P10[VX2]-1endifelseset PO0=PO0-1endifendifset t=nullset VM2=nullreturn falseendfunctionfunction WO2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer VX2=P40local player VL2=P50local player VM2=P60if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>30 and P10[VX2]==0)thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL and IsUnitType(GetSoldUnit(),UNIT_TYPE_HERO)==false thenset t=nullreturn falseendifif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL thencall VJ2(VX2,GetUnitPointValue(GetSoldUnit()))call RemoveUnit(GetSoldUnit())elsecall VJ2((VX2),-1)endifcall MZI(t)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SELL)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function W12))set PO0=30set P20=VM2set P40=ZM2()call SetPlayerState(VM2,PLAYER_STATE_RESOURCE_GOLD,250)call SetPlayerState(VL2,PLAYER_STATE_RESOURCE_GOLD,0)call TQI(VM2,"Sound\\Interface\\Rescue.wav")elseif GetTriggerEvalCount(t)>30 thenif P10[VX2]>0 thenset P10[VX2]=P10[VX2]-1endifelseset PO0=PO0-1endifendifset t=nullset VM2=nullreturn falseendfunctionfunction W22 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer VX2=P40local player VL2=P50local player VM2=P50if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>40 and P10[VX2]==0)thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL and IsUnitType(GetSoldUnit(),UNIT_TYPE_HERO)==false thenset t=nullreturn falseendifif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL thencall VW2(VX2,GetUnitPointValue(GetSoldUnit()))call RemoveUnit(GetSoldUnit())elsecall VY2(VX2)endifcall VI2(3)call MZI(t)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SELL)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function WO2))set PO0=30set P20=VM2set P40=ZM2()call SetPlayerState(VM2,PLAYER_STATE_RESOURCE_GOLD,250)call TQI(VM2,"Sound\\Interface\\Rescue.wav")call MultiboardSetTitleText(PH0,GetObjectName(1848658742)+" - |c00ffffff"+GetObjectName(1848658999))call PDI(bj_FORCE_ALL_PLAYERS,15.00,"|c006699CC"+GetObjectName(1848658996)+"|r")elseif GetTriggerEvalCount(t)>40 thenif P10[VX2]>0 thenset P10[VX2]=P10[VX2]-1endifelseset PO0=PO0-1endifendifset t=nullset VM2=nullreturn falseendfunctionfunction W32 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer VX2=P40local player VL2=P60local player VM2=P50if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>40 and P10[VX2]==0)thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL and IsUnitType(GetSoldUnit(),UNIT_TYPE_HERO)==false thenset t=nullreturn falseendifif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL thencall VW2(VX2,GetUnitPointValue(GetSoldUnit()))call RemoveUnit(GetSoldUnit())elsecall VY2(VX2)endifcall MZI(t)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SELL)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function W22))set PO0=40set P20=VM2set P40=ZM2()call SetPlayerState(VM2,PLAYER_STATE_RESOURCE_GOLD,250)call SetPlayerState(VL2,PLAYER_STATE_RESOURCE_GOLD,0)call TQI(VM2,"Sound\\Interface\\Rescue.wav")elseif GetTriggerEvalCount(t)>40 thenif P10[VX2]>0 thenset P10[VX2]=P10[VX2]-1endifelseset PO0=PO0-1endifendifset t=nullset VM2=nullreturn falseendfunctionfunction W42 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer VX2=P40local player VL2=P60local player VM2=P60if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>40 and P10[VX2]==0)thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL and IsUnitType(GetSoldUnit(),UNIT_TYPE_HERO)==false thenset t=nullreturn falseendifif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL thencall VW2(VX2,GetUnitPointValue(GetSoldUnit()))call RemoveUnit(GetSoldUnit())elsecall VY2(VX2)endifcall MZI(t)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SELL)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function W32))set PO0=40set P20=VM2set P40=ZM2()call SetPlayerState(VM2,PLAYER_STATE_RESOURCE_GOLD,250)call TQI(VM2,"Sound\\Interface\\Rescue.wav")elseif GetTriggerEvalCount(t)>40 thenif P10[VX2]>0 thenset P10[VX2]=P10[VX2]-1endifelseset PO0=PO0-1endifendifset t=nullset VM2=nullreturn falseendfunctionfunction W52 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer VX2=P40local player VL2=P50local player VM2=P60if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>40 and P10[VX2]==0)thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL and IsUnitType(GetSoldUnit(),UNIT_TYPE_HERO)==false thenset t=nullreturn falseendifif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL thencall VW2(VX2,GetUnitPointValue(GetSoldUnit()))call RemoveUnit(GetSoldUnit())elsecall VY2(VX2)endifcall MZI(t)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SELL)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function W42))set PO0=40set P20=VM2set P40=ZM2()call SetPlayerState(VM2,PLAYER_STATE_RESOURCE_GOLD,250)call SetPlayerState(VL2,PLAYER_STATE_RESOURCE_GOLD,0)call TQI(VM2,"Sound\\Interface\\Rescue.wav")elseif GetTriggerEvalCount(t)>40 thenif P10[VX2]>0 thenset P10[VX2]=P10[VX2]-1endifelseset PO0=PO0-1endifendifset t=nullset VM2=nullreturn falseendfunctionfunction W62 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer VX2=P40local player VL2=P60local player VM2=P50if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>30 and P10[VX2]==0)thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL and IsUnitType(GetSoldUnit(),UNIT_TYPE_HERO)==false thenset t=nullreturn falseendifif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL thencall VJ2(VX2,GetUnitPointValue(GetSoldUnit()))call RemoveUnit(GetSoldUnit())elsecall VJ2((VX2),-1)endifcall VI2(2)call MZI(t)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SELL)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function W52))set PO0=40set P20=VM2set P40=ZM2()call SetPlayerState(VM2,PLAYER_STATE_RESOURCE_GOLD,250)call SetPlayerState(VL2,PLAYER_STATE_RESOURCE_GOLD,0)call TQI(VM2,"Sound\\Interface\\Rescue.wav")call MultiboardSetTitleText(PH0,GetObjectName(1848658742)+" - |c00ffffff"+GetObjectName(1848659001))call PDI(bj_FORCE_ALL_PLAYERS,15.00,"|c006699CC"+GetObjectName(1848658997)+"|r")elseif GetTriggerEvalCount(t)>30 thenif P10[VX2]>0 thenset P10[VX2]=P10[VX2]-1endifelseset PO0=PO0-1endifendifset t=nullset VM2=nullreturn falseendfunctionfunction W72 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer VX2=P40local player VL2=P50local player VM2=P60if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>30 and P10[VX2]==0)thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL and IsUnitType(GetSoldUnit(),UNIT_TYPE_HERO)==false thenset t=nullreturn falseendifif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL thencall VJ2(VX2,GetUnitPointValue(GetSoldUnit()))call RemoveUnit(GetSoldUnit())elsecall VJ2((VX2),-1)endifcall MZI(t)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SELL)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function W62))set PO0=30set P20=VM2set P40=ZM2()call SetPlayerState(VM2,PLAYER_STATE_RESOURCE_GOLD,250)call SetPlayerState(VL2,PLAYER_STATE_RESOURCE_GOLD,0)call TQI(VM2,"Sound\\Interface\\Rescue.wav")elseif GetTriggerEvalCount(t)>30 thenif P10[VX2]>0 thenset P10[VX2]=P10[VX2]-1endifelseset PO0=PO0-1endifendifset t=nullset VM2=nullreturn falseendfunctionfunction W82 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer VX2=P40local player VL2=P60local player VM2=P50if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>30 and P10[VX2]==0)thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL and IsUnitType(GetSoldUnit(),UNIT_TYPE_HERO)==false thenset t=nullreturn falseendifif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL thencall VJ2(VX2,GetUnitPointValue(GetSoldUnit()))call RemoveUnit(GetSoldUnit())elsecall VJ2((VX2),-1)endifcall MZI(t)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SELL)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function W72))set PO0=30set P20=VM2set P40=ZM2()call SetPlayerState(VM2,PLAYER_STATE_RESOURCE_GOLD,250)call SetPlayerState(VL2,PLAYER_STATE_RESOURCE_GOLD,0)call TQI(VM2,"Sound\\Interface\\Rescue.wav")elseif GetTriggerEvalCount(t)>30 thenif P10[VX2]>0 thenset P10[VX2]=P10[VX2]-1endifelseset PO0=PO0-1endifendifset t=nullset VM2=nullreturn falseendfunctionfunction W92 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer VX2=P40local player VL2=P50local player VM2=P60if GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL or(GetTriggerEvalCount(t)>30 and P10[VX2]==0)thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL and IsUnitType(GetSoldUnit(),UNIT_TYPE_HERO)==false thenset t=nullreturn falseendifif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELL thencall VJ2(VX2,GetUnitPointValue(GetSoldUnit()))call RemoveUnit(GetSoldUnit())elsecall VJ2((VX2),-1)endifcall MZI(t)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SELL)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function W82))set PO0=30set P20=VM2set P40=ZM2()call SetPlayerState(VM2,PLAYER_STATE_RESOURCE_GOLD,250)call SetPlayerState(VL2,PLAYER_STATE_RESOURCE_GOLD,0)call TQI(VM2,"Sound\\Interface\\Rescue.wav")elseif GetTriggerEvalCount(t)>30 thenif P10[VX2]>0 thenset P10[VX2]=P10[VX2]-1endifelseset PO0=PO0-1endifendifset t=nullset VM2=nullreturn falseendfunctionfunction WA2 takes nothing returns booleanlocal trigger t=CreateTrigger()set P00=truecall MZI(GetTriggeringTrigger())if RU0==false thencall PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(P50)]+(D30[GetPlayerId((P50))])+"|r "+GetObjectName(1848657217))endifset P20=P50set PO0=30call SetPlayerState(P50,PLAYER_STATE_RESOURCE_GOLD,250)call TQI(P50,"Sound\\Interface\\Rescue.wav")call VI2(1)call PDI(bj_FORCE_ALL_PLAYERS,15.00,"|c006699CC"+GetObjectName(1848658998)+"|r")call MultiboardSetTitleText(PH0,GetObjectName(1848658742)+" - |c00ffffff"+GetObjectName(1848659009))call Q9I(t,EVENT_PLAYER_UNIT_SELL)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function W92))set t=nullreturn falseendfunctionfunction Z02 takes nothing returns nothinglocal trigger tlocal location GP1=GetRectCenter(N4)local location GQ1=GetRectCenter(S4)local integer x=1local player ploopexitwhen x>5if NYI(BO[x])thencall CreateUnitAtLoc(BO[x],1848651843,GQ1,bj_UNIT_FACING)endifif NYI(CO[x])thencall CreateUnitAtLoc(CO[x],1848651843,GP1,bj_UNIT_FACING)endifset x=x+1endloopcall RemoveLocation(GP1)call RemoveLocation(GQ1)set IN=trueset A3=falseset O3=falseset TA0=falseset RC0=falsecall SuspendTimeOfDay(true)call DisableTrigger(EE0)call DisableTrigger(ON)if IWI==false thencall QXO()endifset RQ0[GetPlayerId(BO[1])]=GetPlayerState(BO[1],PLAYER_STATE_RESOURCE_GOLD)set RQ0[GetPlayerId(BO[2])]=GetPlayerState(BO[2],PLAYER_STATE_RESOURCE_GOLD)set RQ0[GetPlayerId(BO[3])]=GetPlayerState(BO[3],PLAYER_STATE_RESOURCE_GOLD)set RQ0[GetPlayerId(BO[4])]=GetPlayerState(BO[4],PLAYER_STATE_RESOURCE_GOLD)set RQ0[GetPlayerId(BO[5])]=GetPlayerState(BO[5],PLAYER_STATE_RESOURCE_GOLD)set RQ0[GetPlayerId(CO[1])]=GetPlayerState(CO[1],PLAYER_STATE_RESOURCE_GOLD)set RQ0[GetPlayerId(CO[2])]=GetPlayerState(CO[2],PLAYER_STATE_RESOURCE_GOLD)set RQ0[GetPlayerId(CO[3])]=GetPlayerState(CO[3],PLAYER_STATE_RESOURCE_GOLD)set RQ0[GetPlayerId(CO[4])]=GetPlayerState(CO[4],PLAYER_STATE_RESOURCE_GOLD)set RQ0[GetPlayerId(CO[5])]=GetPlayerState(CO[5],PLAYER_STATE_RESOURCE_GOLD)call SetPlayerState(BO[1],PLAYER_STATE_RESOURCE_GOLD,0)call SetPlayerState(BO[2],PLAYER_STATE_RESOURCE_GOLD,0)call SetPlayerState(BO[3],PLAYER_STATE_RESOURCE_GOLD,0)call SetPlayerState(BO[4],PLAYER_STATE_RESOURCE_GOLD,0)call SetPlayerState(BO[5],PLAYER_STATE_RESOURCE_GOLD,0)call SetPlayerState(CO[1],PLAYER_STATE_RESOURCE_GOLD,0)call SetPlayerState(CO[2],PLAYER_STATE_RESOURCE_GOLD,0)call SetPlayerState(CO[3],PLAYER_STATE_RESOURCE_GOLD,0)call SetPlayerState(CO[4],PLAYER_STATE_RESOURCE_GOLD,0)call SetPlayerState(CO[5],PLAYER_STATE_RESOURCE_GOLD,0)set P30=GetRandomInt(1,2)set RU0=falseset P40=P30if P30==1 thenset P50=BO[1]set P60=CO[1]elseset P50=CO[1]set P60=BO[1]endifset P70=1set P80=2set P10[1]=110set P10[2]=110set t=CreateTrigger()call TriggerRegisterTimerEvent(t,15-TimerGetElapsed(M),false)call TriggerAddCondition(t,Condition(function WA2))call VB2()call PDI(bj_FORCE_ALL_PLAYERS,4.00,GetObjectName(1848657235))call PDI(bj_FORCE_ALL_PLAYERS,4.00,GetObjectName(1848657234))set t=nullset GP1=nullset GQ1=nullset p=nullendfunctionfunction WB2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()set AN=truecall MZI(t)call DestroyFogModifier(CreateFogModifierRadius(BO[0],FOG_OF_WAR_MASKED,QB0,QC0,700,false,false))call DestroyFogModifier(CreateFogModifierRadius(CO[0],FOG_OF_WAR_MASKED,QB0,QC0,700,false,false))set t=nullreturn falseendfunctionfunction WC2 takes nothing returns nothinglocal integer i=0loopexitwhen i>QG0call RemoveUnit(QF0[i])set i=i+1endloopendfunctionfunction WD2 takes real x,real y returns nothingset QF0[QG0]=CreateUnit(Player(0),1747990089,x,y,0)set QG0=QG0+1endfunctionfunction WE2 takes string S,real ZS2,real ZT2,real ZR2,real ZP2,real ZQ2,boolean ZU2 returns nothingset YK=CreateImage(S,ZS2,ZT2,0,ZR2-(ZS2/2),ZP2-(ZT2/2),ZQ2,0,0,0,2)call SetImageRenderAlways(YK,true)call ShowImage(YK,ZU2)endfunctionfunction WF2 takes integer WG2,integer r,integer g,integer b,integer a,real x,real y,integer MKI returns nothingif StringLength(I2S(WG2))>1 thencall WE2("Fonts\\"+SubString(I2S(WG2),0,1)+".blp",90,90,x-20,y,0,true)call SetImageColor(YK,r,g,b,a)call SaveImageHandle(XY,(MKI),(158),(YK))call WE2("Fonts\\"+SubString(I2S(WG2),1,2)+".blp",90,90,x+20,y,0,true)call SetImageColor(YK,r,g,b,a)call SaveImageHandle(XY,(MKI),(159),(YK))elsecall WE2("Fonts\\0.blp",90,90,x-20,y,0,true)call SetImageColor(YK,r,g,b,a)call SaveImageHandle(XY,(MKI),(158),(YK))call WE2("Fonts\\"+SubString(I2S(WG2),0,1)+".blp",90,90,x+20,y,0,true)call SetImageColor(YK,r,g,b,a)call SaveImageHandle(XY,(MKI),(159),(YK))endifendfunctionfunction WH2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer BP1=(LoadInteger(XY,(MKI),(57)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local integer MFI=GetTriggerEvalCount(t)local integer WZ2=BP1-MFIlocal image WV2=(LoadImageHandle(XY,(MKI),(158)))local image WW2=(LoadImageHandle(XY,(MKI),(159)))local integer rlocal integer glocal integer blocal integer aif MFI>0 thencall ShowImage(WV2,false)call DestroyImage(WV2)call ShowImage(WW2,false)call DestroyImage(WW2)endifif MFI==BP1 thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseif WZ2<6 thenset r=255set g=0set b=0elseif GetLocalPlayer()==Q50 or GetLocalPlayer()==Q60 thenset r=D40[GetPlayerId(GetLocalPlayer())]set g=D50[GetPlayerId(GetLocalPlayer())]set b=D60[GetPlayerId(GetLocalPlayer())]elseset r=255set g=255set b=255endifif IsPlayerAlly(Q50,GetLocalPlayer())thenset a=255elseset a=125endifcall WF2(WZ2,r,g,b,a,x,y,MKI)endifset t=nullset WV2=nullset WW2=nullreturn falseendfunctionfunction WX2 takes integer BP1,real x,real y returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function WH2))call SaveInteger(XY,(MKI),(57),(BP1))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))call TriggerEvaluate(t)set t=nullendfunctionfunction WY2 takes integer a,real x,real y,integer MKI returns nothingcall WE2("Fonts\\Y.blp",90,90,x-150,y,0,true)call SetImageColor(YK,255,0,0,a)call SaveImageHandle(XY,(MKI),(158),(YK))call WE2("Fonts\\O.blp",90,90,x-110,y,0,true)call SetImageColor(YK,255,0,0,a)call SaveImageHandle(XY,(MKI),(159),(YK))call WE2("Fonts\\U.blp",90,90,x-70,y,0,true)call SetImageColor(YK,255,0,0,a)call SaveImageHandle(XY,(MKI),(160),(YK))call WE2("Fonts\\R.blp",90,90,x-30,y,0,true)call SetImageColor(YK,255,0,0,a)call SaveImageHandle(XY,(MKI),(161),(YK))call WE2("Fonts\\T.blp",90,90,x+30,y,0,true)call SetImageColor(YK,255,0,0,a)call SaveImageHandle(XY,(MKI),(162),(YK))call WE2("Fonts\\U.blp",90,90,x+70,y,0,true)call SetImageColor(YK,255,0,0,a)call SaveImageHandle(XY,(MKI),(163),(YK))call WE2("Fonts\\R.blp",90,90,x+110,y,0,true)call SetImageColor(YK,255,0,0,a)call SaveImageHandle(XY,(MKI),(164),(YK))call WE2("Fonts\\N.blp",90,90,x+150,y,0,true)call SetImageColor(YK,255,0,0,a)call SaveImageHandle(XY,(MKI),(165),(YK))endfunctionfunction WJ2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local real xlocal real ylocal integer MFI=GetTriggerEvalCount(t)local image WV2=(LoadImageHandle(XY,(MKI),(158)))local image WW2=(LoadImageHandle(XY,(MKI),(159)))local image WK2=(LoadImageHandle(XY,(MKI),(160)))local image WL2=(LoadImageHandle(XY,(MKI),(161)))local image WM2=(LoadImageHandle(XY,(MKI),(162)))local image WN2=(LoadImageHandle(XY,(MKI),(163)))local image WS2=(LoadImageHandle(XY,(MKI),(164)))local image WT2=(LoadImageHandle(XY,(MKI),(165)))local integer rlocal integer glocal integer blocal integer alocal player p=(LoadPlayerHandle(XY,(MKI),(54)))if NZI(p)thenset x=QB0set y=QC0+250elseset x=QD0set y=QE0+250endifif MFI>0 thencall ShowImage(WV2,false)call DestroyImage(WV2)call ShowImage(WW2,false)call DestroyImage(WW2)call ShowImage(WK2,false)call DestroyImage(WK2)call ShowImage(WL2,false)call DestroyImage(WL2)call ShowImage(WM2,false)call DestroyImage(WM2)call ShowImage(WN2,false)call DestroyImage(WN2)call ShowImage(WS2,false)call DestroyImage(WS2)call ShowImage(WT2,false)call DestroyImage(WT2)endifif MFI==20 thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetLocalPlayer()==Q50 or GetLocalPlayer()==Q60 thenset a=255elseset a=0endifcall WY2(a,x,y,MKI)endifset t=nullset WV2=nullset WW2=nullset WK2=nullset WL2=nullset WM2=nullset WN2=nullset WS2=nullset WT2=nullset p=nullreturn falseendfunctionfunction WR2 takes player p returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function WJ2))call SavePlayerHandle(XY,(MKI),(54),(p))call TriggerEvaluate(t)set t=nullendfunctionfunction WP2 takes player p,integer L9I,boolean randomed returns nothinglocal integer i=NHI(p)local real dif NYI(p)==false thenreturnendifif NZI(p)thencall SetUnitPosition(PL0[L9I],PM0[i],PN0[i])set d=RQI(N9I(PL0[L9I])-0.3,0.5)call SetUnitScale(PL0[L9I],d,d,d)call SetUnitFacing(PL0[L9I],270)call UnitRemoveAbility(PL0[L9I],1097690998)elsecall SetUnitPosition(PL0[L9I],PS0[i],PT0[i])set d=RQI(N9I(PL0[L9I])-0.3,0.5)call SetUnitScale(PL0[L9I],d,d,d)call SetUnitFacing(PL0[L9I],90)call UnitRemoveAbility(PL0[L9I],1097690998)endifcall SetUnitColor(PL0[L9I],GetPlayerColor(p))call PauseUnit(PL0[L9I],true)call SetUnitOwner(PL0[L9I],p,true)set QA0[GetPlayerId(p)]=trueset PK0[L9I]=trueif NZI(p)thenset K1[GetPlayerId(p)]=CreateUnit(p,D70[PJ0[L9I]],GetRectCenterX(O4),GetRectCenterY(O4),0)elseset K1[GetPlayerId(p)]=CreateUnit(p,D70[PJ0[L9I]],GetRectCenterX(S3),GetRectCenterY(S3),0)endifendfunctionfunction WQ2 takes nothing returns integerlocal integer i=1loopexitwhen i>24if PK0[i]==false thenreturn iendifset i=i+1endloopreturn 0endfunctionfunction WU2 takes player p returns nothinglocal integer i=1local boolean X02=NZI(p)loopexitwhen i==24if GetOwningPlayer(PL0[i])==BO[0]or GetOwningPlayer(PL0[i])==CO[0]thenif X02 thencall SetUnitOwner(PL0[i],BO[0],false)elsecall SetUnitOwner(PL0[i],CO[0],false)endifendifset i=i+1endloopendfunctionfunction XI2 takes player p,unit u returns nothinglocal integer a=80if GetLocalPlayer()==p thenset a=255endifcall SetUnitVertexColor(u,255,255,255,a)endfunctionfunction X12 takes player p1,player p2 returns nothinglocal unit QHIlocal real xlocal real ycall WR2(p1)call TQI(p1,"Sound\\Interface\\Rescue.wav")if NZI(p1)thenif GetLocalPlayer()==p1 thencall PingMinimapEx(Q00,QI0,5,255,255,255,false)endifset QHI=CreateUnit(p1,1848652353,Q00-250,QI0,0)call UnitApplyTimedLife(QHI,1112820806,20)call UnitAddAbility(QHI,1097625443)set QZ0[GetPlayerId(p1)]=QHIcall XI2(p1,QHI)if GetLocalPlayer()==p1 thencall ClearTextMessages()endifcall DisplayTimedTextToPlayer(p1,0,0,10," ")call DisplayTimedTextToPlayer(p1,0,0,10," ")call DisplayTimedTextToPlayer(p1,0,0,20,GetObjectName(1848653368))call DisplayTimedTextToPlayer(p1,0,0,10," ")elsecall WR2(p1)if GetLocalPlayer()==p1 thencall PingMinimapEx(Q10,QO0,5,255,255,255,false)endifset QHI=CreateUnit(p1,1848652353,Q00-250,QI0,0)call SetUnitVertexColor(QHI,255,255,255,175)call UnitApplyTimedLife(QHI,1112820806,20)call UnitAddAbility(QHI,1097625443)set QV0[GetPlayerId(p1)]=QHIcall XI2(p1,QHI)if GetLocalPlayer()==p1 thencall ClearTextMessages()endifcall DisplayTimedTextToPlayer(p1,0,0,10," ")call DisplayTimedTextToPlayer(p1,0,0,10," ")call DisplayTimedTextToPlayer(p1,0,0,20,GetObjectName(1848653368))call DisplayTimedTextToPlayer(p1,0,0,10," ")endifif p2!=null thencall WR2(p2)call TQI(p2,"Sound\\Interface\\Rescue.wav")if NZI(p2)thenif GetLocalPlayer()==p2 thencall PingMinimapEx(Q00,QI0,5,255,255,255,false)endifset QHI=CreateUnit(p2,1848652353,Q00+250,QI0,0)call UnitApplyTimedLife(QHI,1112820806,20)call UnitAddAbility(QHI,1097625443)set QZ0[GetPlayerId(p2)]=QHIcall XI2(p2,QHI)if GetLocalPlayer()==p2 thencall ClearTextMessages()endifcall DisplayTimedTextToPlayer(p2,0,0,10," ")call DisplayTimedTextToPlayer(p2,0,0,10," ")call DisplayTimedTextToPlayer(p2,0,0,20,GetObjectName(1848653368))call DisplayTimedTextToPlayer(p2,0,0,10," ")elseif GetLocalPlayer()==p2 thencall PingMinimapEx(Q10,QO0,5,255,255,255,false)endifset QHI=CreateUnit(p2,1848652353,Q00+250,QI0,0)call UnitApplyTimedLife(QHI,1112820806,20)call UnitAddAbility(QHI,1097625443)set QV0[GetPlayerId(p2)]=QHIcall XI2(p2,QHI)if GetLocalPlayer()==p2 thencall ClearTextMessages()endifcall DisplayTimedTextToPlayer(p2,0,0,10," ")call DisplayTimedTextToPlayer(p2,0,0,10," ")call DisplayTimedTextToPlayer(p2,0,0,20,GetObjectName(1848653368))call DisplayTimedTextToPlayer(p2,0,0,10," ")endifendifset QHI=nullendfunctionfunction XO2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer X22=(LoadInteger(XY,(MKI),(25)))local player X32=Q50local player X42=Q60local integer iset Q50=nullset Q60=nullif X22==0 thenif Q70==1 thenset Q50=BO[1]elseset Q50=CO[1]endifcall WU2(Q50)call PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(Q50)]+(D30[GetPlayerId((Q50))])+"|r"+" "+GetObjectName(1848653364))call X12(Q50,Q60)call WX2(20,QB0,QC0)elseif X22==1 thenif Q70==1 thenif QW0==false thenset Q50=CO[1]set Q60=CO[2]elseset Q50=CO[1]set Q60=CO[1]endifelseif QW0==false thenset Q50=BO[1]set Q60=BO[2]elseset Q50=BO[1]set Q60=BO[1]endifendifif QA0[GetPlayerId(X32)]==false thencall WP2(X32,WQ2(),true)endifcall WU2(Q50)call PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(Q50)]+(D30[GetPlayerId((Q50))])+"|r"+" "+GetObjectName(1848653364))call PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(Q60)]+(D30[GetPlayerId((Q60))])+"|r"+" "+GetObjectName(1848653364))call X12(Q50,Q60)call WX2(20,QB0,QC0)elseif X22==2 thenif Q70==1 thenif QW0==false thenset Q50=BO[2]set Q60=BO[3]elseset Q50=BO[1]set Q60=BO[1]endifelseif QW0==false thenset Q50=CO[2]set Q60=CO[3]elseset Q50=CO[1]set Q60=CO[1]endifendifif QA0[GetPlayerId(X32)]==false thencall WP2(X32,WQ2(),true)endifif QA0[GetPlayerId(X42)]==false thencall WP2(X42,WQ2(),true)endifcall WU2(Q50)call PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(Q50)]+(D30[GetPlayerId((Q50))])+"|r"+" "+GetObjectName(1848653364))call PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(Q60)]+(D30[GetPlayerId((Q60))])+"|r"+" "+GetObjectName(1848653364))call X12(Q50,Q60)call WX2(20,QB0,QC0)elseif X22==3 thenif Q70==1 thenif QW0==false thenset Q50=CO[3]set Q60=CO[4]elseset Q50=CO[1]set Q60=CO[1]endifelseif QW0==false thenset Q50=BO[3]set Q60=BO[4]elseset Q50=BO[1]set Q60=BO[1]endifendifif QA0[GetPlayerId(X32)]==false thencall WP2(X32,WQ2(),true)endifif QA0[GetPlayerId(X42)]==false thencall WP2(X42,WQ2(),true)endifcall WU2(Q50)call PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(Q50)]+(D30[GetPlayerId((Q50))])+"|r"+" "+GetObjectName(1848653364))call PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(Q60)]+(D30[GetPlayerId((Q60))])+"|r"+" "+GetObjectName(1848653364))call X12(Q50,Q60)call WX2(20,QB0,QC0)elseif X22==4 thenif Q70==1 thenif QW0==false thenset Q50=BO[4]set Q60=BO[5]elseset Q50=BO[1]set Q60=BO[1]endifelseif QW0==false thenset Q50=CO[4]set Q60=CO[5]elseset Q50=CO[1]set Q60=CO[1]endifendifif QA0[GetPlayerId(X32)]==false thencall WP2(X32,WQ2(),true)endifif QA0[GetPlayerId(X42)]==false thencall WP2(X42,WQ2(),true)endifcall WU2(Q50)call PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(Q50)]+(D30[GetPlayerId((Q50))])+"|r"+" "+GetObjectName(1848653364))call PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(Q60)]+(D30[GetPlayerId((Q60))])+"|r"+" "+GetObjectName(1848653364))call X12(Q50,Q60)call WX2(20,QB0,QC0)elseif X22==5 thenif Q70==1 thenif QW0==false thenset Q50=CO[5]elseset Q50=CO[1]endifelseif QW0==false thenset Q50=BO[5]elseset Q60=BO[1]endifendifif QA0[GetPlayerId(X32)]==false thencall WP2(X32,WQ2(),true)endifif QA0[GetPlayerId(X42)]==false thencall WP2(X42,WQ2(),true)endifcall WU2(Q50)call PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(Q50)]+(D30[GetPlayerId((Q50))])+"|r"+" "+GetObjectName(1848653364))call X12(Q50,Q60)call WX2(20,QB0,QC0)elseif X22==6 thenif QA0[GetPlayerId(X32)]==false thencall WP2(X32,WQ2(),true)endifcall SuspendTimeOfDay(false)endifif X22==7 thenset Q90=trueendifif X22==8 thencall WC2()set i=1loopexitwhen i>24call RemoveUnit(PL0[i])set i=i+1endloopcall P11()call F22(60)call UnitApplyTimedLife(PY0[1],1112820806,2)call UnitApplyTimedLife(PY0[2],1112820806,2)call UnitApplyTimedLife(PY0[3],1112820806,2)call UnitApplyTimedLife(PY0[4],1112820806,2)call UnitApplyTimedLife(PY0[5],1112820806,2)call UnitApplyTimedLife(PY0[6],1112820806,2)call UnitApplyTimedLife(PY0[7],1112820806,2)call UnitApplyTimedLife(PY0[8],1112820806,2)call UnitApplyTimedLife(PY0[9],1112820806,2)call UnitApplyTimedLife(PY0[10],1112820806,2)call UnitApplyTimedLife(PY0[11],1112820806,2)call UnitApplyTimedLife(PY0[12],1112820806,2)call MZI(QH0)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=CreateTrigger()call TriggerRegisterTimerEvent(t,7,false)call TriggerAddCondition(t,Condition(function WB2))elsecall SaveInteger(XY,(MKI),(25),(X22+1))endifset t=nullset X32=nullset X42=nullreturn falseendfunctionfunction X52 takes unit N0I returns integerlocal integer i=1loopexitwhen i>24if PL0[i]==N0I thenreturn iendifset i=i+1endloopreturn 0endfunctionfunction X62 takes nothing returns booleanlocal unit VD2=GetSoldUnit()local player p=GetOwningPlayer(VD2)call KillUnit(VD2)if QA0[GetPlayerId(p)]==true thencall R1I(p,GetObjectName(1848656951))set VD2=nullset p=nullreturn falseendifif p!=Q50 and p!=Q60 thencall R1I(p,GetObjectName(1848656722))set VD2=nullset p=nullreturn falseendifif GetUnitTypeId(VD2)==1747990094 thencall WP2(p,X52(GetSellingUnit()),false)call KillUnit(QZ0[GetPlayerId(p)])call KillUnit(QV0[GetPlayerId(p)])endifset VD2=nullset p=nullreturn falseendfunctionfunction ModeRD_Selected takes nothing returns booleanlocal unit X72=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local player p=GetOwningPlayer(X72)if GetSpellAbilityId()==1093687874 and X52(TMI)!=0 thenif(p==Q50 or p==Q60)and QA0[GetPlayerId(p)]==false and PK0[X52(TMI)]==false thencall WP2(p,X52(TMI),false)call RemoveUnit(X72)endifendifset TMI=nullset p=nullreturn falseendfunctionfunction X82 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKIlocal integer i=1call MZI(t)call SuspendTimeOfDay(true)set Q70=GetRandomInt(1,2)call PDI(bj_FORCE_ALL_PLAYERS,15.00," ")if Q70==1 thencall PDI(bj_FORCE_ALL_PLAYERS,15.00,GetObjectName(1848653131)+" "+C0[GetPlayerId(BO[0])]+GetObjectName(1848653365)+"|r"+" "+GetObjectName(1848653366))elsecall PDI(bj_FORCE_ALL_PLAYERS,15.00,GetObjectName(1848653131)+" "+C0[GetPlayerId(CO[0])]+GetObjectName(1848653379)+"|r"+" "+GetObjectName(1848653366))endifcall PDI(bj_FORCE_ALL_PLAYERS,15.00," ")set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,20,true)call TriggerAddCondition(t,Condition(function XO2))call SaveInteger(XY,(MKI),(25),(0))call TriggerEvaluate(t)set t=nullreturn falseendfunctionfunction ModeRD_SetCap takes nothing returns booleanif QW0==false thenset QW0=truecall PDI(bj_FORCE_ALL_PLAYERS,15.00,GetObjectName(1848657732))endifreturn falseendfunctionfunction ZI2 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer i=1local real xlocal real ylocal real alocal integer rlocal integer S7Ilocal boolean X92=falselocal boolean XA2=falselocal boolean XB2=falselocal boolean XC2=falselocal boolean XD2=falselocal boolean XE2=falselocal boolean XF2=falselocal boolean XG2=falselocal boolean XH2=falselocal boolean array XZ2local player plocal real C61local boolean XV2=falselocal real zset RC0=falseset QH0=CreateTrigger()call TriggerAddCondition(QH0,Condition(function X62))call TQI(GetLocalPlayer(),"Sound\\Interface\\Rescue.wav")set p=BO[1]call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-250)set p=BO[2]call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-250)set p=BO[3]call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-250)set p=BO[4]call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-250)set p=BO[5]call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-250)set p=CO[1]call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-250)set p=CO[2]call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-250)set p=CO[3]call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-250)set p=CO[4]call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-250)set p=CO[5]call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-250)call TriggerRegisterTimerEvent(t,15-TimerGetElapsed(M),false)call TriggerAddCondition(t,Condition(function X82))set Q80=trueset UK=180set A3=falseset O3=falsecall UnitAddAbility(DR0,1097295983)call UnitAddAbility(DP0,1097295983)call UnitAddAbility(DQ0,1097295983)call UnitAddAbility(DU0,1097295983)call UnitAddAbility(E20,1097295983)call UnitAddAbility(E30,1097295983)call UnitAddAbility(E40,1097295983)call UnitAddAbility(E50,1097295983)call UnitAddAbility(E00,1097295983)call UnitAddAbility(EI0,1097295983)call UnitAddAbility(E10,1097295983)call UnitAddAbility(EO0,1097295983)call ShowUnit(DR0,false)call ShowUnit(DP0,false)call ShowUnit(DQ0,false)call ShowUnit(DU0,false)call ShowUnit(E20,false)call ShowUnit(E30,false)call ShowUnit(E40,false)call ShowUnit(E50,false)call ShowUnit(E00,false)call ShowUnit(EI0,false)call ShowUnit(E10,false)call ShowUnit(EO0,false)set i=1loopexitwhen i>24set S7I=TII(true,true)if X92 thenset X92=falseset S7I=91elseif XA2 thenset XA2=falseset S7I=51elseif XB2 thenset XB2=falseset S7I=99elseif XC2 thenset XC2=falseif GetRandomInt(1,2)==1 thenset S7I=104elseset S7I=65endifelseif XD2 thenset XD2=falseset S7I=109elseif XE2 thenset XE2=falseset S7I=15elseif XF2 thenset XF2=falseset S7I=110elseif XG2 thenset XG2=falseelseif XH2 thenset XH2=falseendifif XZ2[S7I]==false and((S7I)!=23)thenset XZ2[S7I]=trueset PJ0[i]=S7Iset i=i+1endifendloopset PY0[1]=CreateUnit(BO[0],1848656963,Q00,QI0,0)set PY0[2]=CreateUnit(BO[1],1848656963,Q00,QI0,0)set PY0[3]=CreateUnit(BO[2],1848656963,Q00,QI0,0)set PY0[4]=CreateUnit(BO[3],1848656963,Q00,QI0,0)set PY0[5]=CreateUnit(BO[4],1848656963,Q00,QI0,0)set PY0[6]=CreateUnit(BO[5],1848656963,Q00,QI0,0)set PY0[7]=CreateUnit(CO[0],1848656963,Q10,QO0,0)set PY0[8]=CreateUnit(CO[1],1848656963,Q10,QO0,0)set PY0[9]=CreateUnit(CO[2],1848656963,Q10,QO0,0)set PY0[10]=CreateUnit(CO[3],1848656963,Q10,QO0,0)set PY0[11]=CreateUnit(CO[4],1848656963,Q10,QO0,0)set PY0[12]=CreateUnit(CO[5],1848656963,Q10,QO0,0)call PanCameraToTimedForPlayer(BO[1],Q00,QI0,0)call PanCameraToTimedForPlayer(BO[2],Q00,QI0,0)call PanCameraToTimedForPlayer(BO[3],Q00,QI0,0)call PanCameraToTimedForPlayer(BO[4],Q00,QI0,0)call PanCameraToTimedForPlayer(BO[5],Q00,QI0,0)call PanCameraToTimedForPlayer(CO[1],Q00,QI0,0)call PanCameraToTimedForPlayer(CO[2],Q00,QI0,0)call PanCameraToTimedForPlayer(CO[3],Q00,QI0,0)call PanCameraToTimedForPlayer(CO[4],Q00,QI0,0)call PanCameraToTimedForPlayer(CO[5],Q00,QI0,0)set QB0=Q00set QC0=QI0set QD0=Q10set QE0=QO0set PM0[1]=Q00+Q30*(-2)set PN0[1]=QI0+Q40set PM0[2]=Q00+Q30*(-1)set PN0[2]=QI0+Q40set PM0[3]=Q00+Q30*(0)set PN0[3]=QI0+Q40set PM0[4]=Q00+Q30*(1)set PN0[4]=QI0+Q40set PM0[5]=Q00+Q30*(2)set PN0[5]=QI0+Q40set PS0[1]=Q00+Q30*(-2)set PT0[1]=QI0-Q40set PS0[2]=Q00+Q30*(-1)set PT0[2]=QI0-Q40set PS0[3]=Q00+Q30*(0)set PT0[3]=QI0-Q40set PS0[4]=Q00+Q30*(1)set PT0[4]=QI0-Q40set PS0[5]=Q00+Q30*(2)set PT0[5]=QI0-Q40set PR0[1]=Q10+Q30*(-2)set PP0[1]=QO0+Q40set PR0[2]=Q10+Q30*(-1)set PP0[2]=QO0+Q40set PR0[3]=Q10+Q30*(0)set PP0[3]=QO0+Q40set PR0[4]=Q10+Q30*(1)set PP0[4]=QO0+Q40set PR0[5]=Q10+Q30*(2)set PP0[5]=QO0+Q40set PQ0[1]=Q10+Q30*(-2)set PU0[1]=QO0-Q40set PQ0[2]=Q10+Q30*(-1)set PU0[2]=QO0-Q40set PQ0[3]=Q10+Q30*(0)set PU0[3]=QO0-Q40set PQ0[4]=Q10+Q30*(1)set PU0[4]=QO0-Q40set PQ0[5]=Q10+Q30*(2)set PU0[5]=QO0-Q40set C61=Q20set i=1loopexitwhen i>24if XV2==false thenset XV2=trueelseset XV2=falseendifset a=i/I2R(24)*360.0set x=Q00+C61*Cos(a*bj_DEGTORAD)set y=QI0+C61*Sin(a*bj_DEGTORAD)set PL0[i]=CreateUnit(BO[0],DK0[PJ0[i]],x,y,PUI(x,y,Q00,QI0))call WD2(x,y)if XV2 thencall SetUnitColor(PL0[i],GetPlayerColor(CO[5]))elsecall SetUnitColor(PL0[i],GetPlayerColor(CO[4]))endifcall TriggerRegisterUnitEvent(QH0,PL0[i],EVENT_UNIT_SELL)set i=i+1endloopcall SOI()set t=nullset p=nullendfunctionfunction XW2 takes nothing returns booleanlocal unit VD2=GetSoldUnit()local player p=GetOwningPlayer(VD2)local integer ilocal real xlocal real ylocal real aif GetUnitTypeId(VD2)==1747990094 and IsPlayerAlly(GetOwningPlayer(VD2),GetOwningPlayer(GetSellingUnit()))thenif K1[GetPlayerId(p)]!=null thencall R1I(p,GetObjectName(1848657459))call KillUnit(VD2)set VD2=nullset p=nullreturn falseendifset x=GetUnitX(GetSellingUnit())set y=GetUnitY(GetSellingUnit())set i=TDI(GetUnitTypeId(GetSellingUnit()))set a=GetUnitFacing(GetSellingUnit())call RemoveUnit(GetSellingUnit())call CreateUnit(p,i,x,y,a)endifif GetUnitTypeId(VD2)==1747990094 thencall KillUnit(VD2)endifif K1[GetPlayerId(BO[1])]!=null and K1[GetPlayerId(BO[2])]!=null and K1[GetPlayerId(BO[3])]!=null and K1[GetPlayerId(BO[4])]!=null and K1[GetPlayerId(BO[5])]!=null and K1[GetPlayerId(CO[1])]!=null and K1[GetPlayerId(CO[2])]!=null and K1[GetPlayerId(CO[3])]!=null and K1[GetPlayerId(CO[4])]!=null and K1[GetPlayerId(CO[5])]!=null thencall MZI(GetTriggeringTrigger())endifset VD2=nullset p=nullreturn falseendfunctionfunction XX2 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer A51local integer A41local string F21local unit ulocal real xlocal real ylocal integer ilocal real dlocal real VG2=GetRectCenterX(O4)+125local real VH2=GetRectCenterY(O4)+75local real VZ2=GetRectCenterX(S3)+100local real VV2=GetRectCenterY(S3)set TA0=trueset i=1loopexitwhen i>5set x=VG2-290+(i-1)*100set y=VH2call CreateUnit(BO[i+1],1848651843,VG2,VH2,bj_UNIT_FACING)set u=CreateUnit(BO[0],DK0[QQ0[i+2]],x,y,270)call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_SELL)call PanCameraToTimedForPlayer(BO[i],VG2,VH2,0)set i=i+1endloopset i=1loopexitwhen i>5set x=VZ2-290+(i-1)*100set y=VV2call CreateUnit(CO[i+1],1848651843,VZ2,VV2,bj_UNIT_FACING)set u=CreateUnit(CO[0],DK0[QU0[i+2]],x,y,270)call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_SELL)call PanCameraToTimedForPlayer(CO[i],VZ2,VV2,0)set i=i+1endloopcall TriggerAddCondition(t,Condition(function XW2))call SuspendTimeOfDay(false)call EnableTrigger(EE0)call EnableTrigger(ON)set UK=90call H02()set t=nullset u=nullendfunctionfunction XY2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()set AN=truecall MZI(t)call DestroyFogModifier(CreateFogModifierRadius(BO[0],FOG_OF_WAR_MASKED,RN0,RS0,700,false,false))call DestroyFogModifier(CreateFogModifierRadius(CO[0],FOG_OF_WAR_MASKED,RN0,RS0,700,false,false))set t=nullreturn falseendfunctionfunction XJ2 takes string S,real ZS2,real ZT2,real ZR2,real ZP2,real ZQ2,boolean ZU2 returns nothingset YK=CreateImage(S,ZS2,ZT2,0,ZR2-(ZS2/2),ZP2-(ZT2/2),ZQ2,0,0,0,2)call SetImageRenderAlways(YK,true)call ShowImage(YK,ZU2)endfunctionfunction XK2 takes string XL2,integer r,integer g,integer b,integer a,real x,real y returns imagecall XJ2("Fonts\\"+XL2+".blp",60,60,x-20,y,0,true)call SetImageColor(YK,r,g,b,a)return YKendfunctionfunction XM2 takes boolean XN2,boolean XS2 returns nothinglocal integer XT2local integer XR2local integer XP2local integer XQ2local integer XU2local integer Y02local integer YI2local integer Y12local integer c1local integer c2local integer a=0set XT2=QT0[1]set XR2=XT2/60set XP2=(XT2-XR2*60)/10set XQ2=XT2-XR2*60-XP2*10set XU2=QT0[2]set Y02=XU2/60set YI2=(XU2-Y02*60)/10set Y12=XU2-Y02*60-YI2*10if XN2==false thencall ShowImage(U60,false)call DestroyImage(U60)call ShowImage(U70,false)call DestroyImage(U70)call ShowImage(U80,false)call DestroyImage(U80)call ShowImage(U90,false)call DestroyImage(U90)call ShowImage(UA0,false)call DestroyImage(UA0)call ShowImage(UB0,false)call DestroyImage(UB0)call ShowImage(UC0,false)call DestroyImage(UC0)call ShowImage(UD0,false)call DestroyImage(UD0)call ShowImage(UE0,false)call DestroyImage(UE0)call ShowImage(UF0,false)call DestroyImage(UF0)call ShowImage(UG0,false)call DestroyImage(UG0)call ShowImage(UH0,false)call DestroyImage(UH0)call ShowImage(UZ0,false)call DestroyImage(UZ0)call ShowImage(UV0,false)call DestroyImage(UV0)call ShowImage(UW0,false)call DestroyImage(UW0)call ShowImage(UX0,false)call DestroyImage(UX0)endifif XS2==false thenset c1=255set c2=255if QS0==1 thenif IsPlayerAlly(BO[1],GetLocalPlayer())thenset a=255set c1=0endifelseif IsPlayerAlly(CO[1],GetLocalPlayer())thenset a=255set c2=0endifendifset U60=XK2(I2S(XR2),255,c1,c1,255,RN0-40,RS0+300)set U70=XK2("58",255,c1,c1,255,RN0-0,RS0+300)set U80=XK2(I2S(XP2),255,c1,c1,255,RN0+20,RS0+300)set U90=XK2(I2S(XQ2),255,c1,c1,255,RN0+60,RS0+300)set UA0=XK2(I2S(Y02),255,c2,c2,255,RN0-40,RS0-300)set UB0=XK2("58",255,c2,c2,255,RN0-0,RS0-300)set UC0=XK2(I2S(YI2),255,c2,c2,255,RN0+20,RS0-300)set UD0=XK2(I2S(Y12),255,c2,c2,255,RN0+60,RS0-300)if QR0==1 or QR0==2 or QR0==3 or QR0==4 thenset UE0=XK2("Y",255,0,0,a,RN0-130,RS0)set UF0=XK2("O",255,0,0,a,RN0-90,RS0)set UG0=XK2("U",255,0,0,a,RN0-50,RS0)set UH0=XK2("R",255,0,0,a,RN0-10,RS0)set UZ0=XK2("B",255,0,0,a,RN0+70,RS0)set UV0=XK2("A",255,0,0,a,RN0+110,RS0)set UW0=XK2("N",255,0,0,a,RN0+150,RS0)set UX0=XK2("K",255,0,0,0,RN0+170,RS0)elseset UE0=XK2("Y",255,0,0,a,RN0-150,RS0)set UF0=XK2("O",255,0,0,a,RN0-110,RS0)set UG0=XK2("U",255,0,0,a,RN0-70,RS0)set UH0=XK2("R",255,0,0,a,RN0-30,RS0)set UZ0=XK2("P",255,0,0,a,RN0+50,RS0)set UV0=XK2("I",255,0,0,a,RN0+90,RS0)set UW0=XK2("C",255,0,0,a,RN0+130,RS0)set UX0=XK2("K",255,0,0,a,RN0+170,RS0)endifendifendfunctionfunction YO2 takes nothing returns nothinglocal integer i=0loopexitwhen i>QL0call RemoveUnit(QM0[i])set i=i+1endloopendfunctionfunction Y22 takes real x,real y returns nothingset QM0[QL0]=CreateUnit(Player(0),1747990089,x,y,0)set QL0=QL0+1endfunctionfunction Y32 takes integer Y42,boolean Y52 returns nothinglocal player plocal real dset QP0[Y42]=trueset U40[QS0]=U40[QS0]-1if QS0==1 thenset p=BO[1]set U00=U00+1set QQ0[U00]=QY0[Y42]if U00<3 thencall UnitAddAbility(QK0[Y42],1097167980)call UnitAddAbility(QK0[Y42],1097625443)endifcall SetUnitPosition(QK0[Y42],U10[U00],UO0[U00])set d=RMaxBJ(N9I(QK0[Y42])-0.3,0.5)call Y22(U10[U00],UO0[U00])call SetUnitScale(QK0[Y42],d,d,d)call SetUnitFacing(QK0[Y42],270)if Y52==false thenif QR0==1 or QR0==2 or QR0==3 or QR0==4 thencall DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10,C0[GetPlayerId(p)]+(D30[GetPlayerId((p))])+"|r "+GetObjectName(1848657973)+" "+GetUnitName(QK0[Y42]))call E71("Ban"+I2S(GetPlayerId(p)),D70[QY0[Y42]])elsecall DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10,C0[GetPlayerId(p)]+(D30[GetPlayerId((p))])+"|r "+GetObjectName(1848657974)+" "+GetUnitName(QK0[Y42]))call E71("Pick"+I2S(GetPlayerId(p)),D70[QY0[Y42]])endifelseif QR0==1 or QR0==2 or QR0==3 or QR0==4 thencall DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10,C0[GetPlayerId(p)]+(D30[GetPlayerId((p))])+"|r "+GetObjectName(1848657975)+" "+GetUnitName(QK0[Y42]))call E71("Ban"+I2S(GetPlayerId(p)),D70[QY0[Y42]])elsecall DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10,C0[GetPlayerId(p)]+(D30[GetPlayerId((p))])+"|r "+GetObjectName(1848657976)+" "+GetUnitName(QK0[Y42]))call E71("Pick"+I2S(GetPlayerId(p)),D70[QY0[Y42]])endifendifelseset p=CO[1]set UI0=UI0+1set QU0[UI0]=QY0[Y42]if UI0<3 thencall UnitAddAbility(QK0[Y42],1097167980)call UnitAddAbility(QK0[Y42],1097625443)endifcall SetUnitPosition(QK0[Y42],U20[UI0],U30[UI0])set d=RMaxBJ(N9I(QK0[Y42])-0.3,0.5)call Y22(U20[UI0],U30[UI0])call SetUnitScale(QK0[Y42],d,d,d)call SetUnitFacing(QK0[Y42],90)if Y52==false thenif QR0==1 or QR0==2 or QR0==3 or QR0==4 thencall DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10,C0[GetPlayerId(p)]+(D30[GetPlayerId((p))])+"|r "+GetObjectName(1848657973)+" "+GetUnitName(QK0[Y42]))call E71("Ban"+I2S(GetPlayerId(p)),D70[QY0[Y42]])elsecall DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10,C0[GetPlayerId(p)]+(D30[GetPlayerId((p))])+"|r "+GetObjectName(1848657974)+" "+GetUnitName(QK0[Y42]))call E71("Pick"+I2S(GetPlayerId(p)),D70[QY0[Y42]])endifelseif QR0==1 or QR0==2 or QR0==3 or QR0==4 thencall DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10,C0[GetPlayerId(p)]+(D30[GetPlayerId((p))])+"|r "+GetObjectName(1848657975)+" "+GetUnitName(QK0[Y42]))call E71("Ban"+I2S(GetPlayerId(p)),D70[QY0[Y42]])elsecall DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10,C0[GetPlayerId(p)]+(D30[GetPlayerId((p))])+"|r "+GetObjectName(1848657976)+" "+GetUnitName(QK0[Y42]))call E71("Pick"+I2S(GetPlayerId(p)),D70[QY0[Y42]])endifendifendifcall PauseUnit(QK0[Y42],true)call SetUnitOwner(QK0[Y42],p,true)endfunctionfunction Y62 takes unit N0I returns integerlocal integer i=1loopexitwhen i>28if QK0[i]==N0I thenreturn iendifset i=i+1endloopreturn 0endfunctionfunction Y72 takes nothing returns nothinglocal integer iloopset i=GetRandomInt(1,28)exitwhen QP0[i]==falseendloopcall Y32(i,true)endfunctionfunction Y82 takes nothing returns booleanlocal unit VD2=GetSoldUnit()local player p=GetOwningPlayer(VD2)local integer id=GetPlayerId(p)local player Y92if QS0==1 thenset Y92=BO[1]elseset Y92=CO[1]endifcall KillUnit(VD2)if U50 or U40[QS0]<1 or p!=Y92 thencall R1I(p,GetObjectName(1848656722))elseif GetUnitTypeId(VD2)==1747990094 thencall Y32(Y62(GetSellingUnit()),false)endifset VD2=nullreturn falseendfunctionfunction YA2 takes nothing returns booleanlocal integer i=1local trigger tcall MZI(GetTriggeringTrigger())loopexitwhen i>28call RemoveUnit(QK0[i])set i=i+1endloopcall SuspendTimeOfDay(false)call YO2()call P11()call F22(90)call UnitApplyTimedLife(QJ0[1],1112820806,2)call UnitApplyTimedLife(QJ0[2],1112820806,2)call UnitApplyTimedLife(QJ0[3],1112820806,2)call UnitApplyTimedLife(QJ0[4],1112820806,2)call UnitApplyTimedLife(QJ0[5],1112820806,2)call UnitApplyTimedLife(QJ0[6],1112820806,2)call UnitApplyTimedLife(QJ0[7],1112820806,2)call UnitApplyTimedLife(QJ0[8],1112820806,2)call UnitApplyTimedLife(QJ0[9],1112820806,2)call UnitApplyTimedLife(QJ0[10],1112820806,2)call UnitApplyTimedLife(QJ0[11],1112820806,2)call UnitApplyTimedLife(QJ0[12],1112820806,2)set t=CreateTrigger()call TriggerRegisterTimerEvent(t,7,false)call TriggerAddCondition(t,Condition(function XY2))set t=nullcall XX2()return falseendfunctionfunction YB2 takes nothing returns booleanlocal integer ilocal trigger tlocal force flocal string c="|c006699CC"set QT0[QS0]=IMaxBJ(QT0[QS0]-1,0)call XM2(false,false)if U40[QS0]<1 thenif QS0==1 thencall TQI(BO[1],"Sound\\Interface\\Rescue.wav")call TQI(BO[2],"Sound\\Interface\\Rescue.wav")call TQI(BO[3],"Sound\\Interface\\Rescue.wav")call TQI(BO[4],"Sound\\Interface\\Rescue.wav")call TQI(BO[5],"Sound\\Interface\\Rescue.wav")elsecall TQI(CO[1],"Sound\\Interface\\Rescue.wav")call TQI(CO[2],"Sound\\Interface\\Rescue.wav")call TQI(CO[3],"Sound\\Interface\\Rescue.wav")call TQI(CO[4],"Sound\\Interface\\Rescue.wav")call TQI(CO[5],"Sound\\Interface\\Rescue.wav")endifset QR0=QR0+1if QS0==1 thenset QS0=2set f=AOelseset QS0=1set f=OOendifset QT0[QS0]=IMaxBJ(QT0[QS0],6)if QR0==1 or QR0==2 or QR0==3 or QR0==4 thenset U40[QS0]=1call PDI(f,15,c+GetObjectName(1848657970)+"|r")elseif QR0==5 thenset U40[QS0]=1call PDI(f,15,c+GetObjectName(1848657971)+"|r")elseif QR0==6 or QR0==7 or QR0==8 or QR0==9 thenset U40[QS0]=2call PDI(f,15,c+GetObjectName(1848657972)+"|r")elseif QR0==10 thenset U40[QS0]=1call PDI(f,15,c+GetObjectName(1848657971)+"|r")elsecall XM2(false,true)call MZI(GetTriggeringTrigger())call MZI(QX0)set t=CreateTrigger()call TriggerRegisterTimerEvent(t,6,false)call TriggerAddCondition(t,Condition(function YA2))set t=nullcall PDI(bj_FORCE_ALL_PLAYERS,15.00,GetObjectName(1848657977))endifelseif QT0[QS0]==0 thencall Y72()endifreturn falseendfunctionfunction YC2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local force flocal string c="|c006699CC"call MZI(t)set QN0=GetRandomInt(1,2)call PDI(bj_FORCE_ALL_PLAYERS,15.00," ")if QN0==1 thencall PDI(bj_FORCE_ALL_PLAYERS,15.00,GetObjectName(1848653131)+" "+C0[GetPlayerId(BO[0])]+GetObjectName(1848653365)+"|r"+" "+GetObjectName(1848653366))elsecall PDI(bj_FORCE_ALL_PLAYERS,15.00,GetObjectName(1848653131)+" "+C0[GetPlayerId(CO[0])]+GetObjectName(1848653379)+"|r"+" "+GetObjectName(1848653366))endifcall PDI(bj_FORCE_ALL_PLAYERS,15.00," ")set QS0=QN0set t=CreateTrigger()call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function YB2))set QT0[1]=150set QT0[2]=150set QR0=1set U40[QS0]=1call XM2(true,false)if QS0==1 thenset f=OOelseset f=AOendifcall PDI(f,15,c+GetObjectName(1848657970)+"|r")set U50=falseset t=nullreturn falseendfunctionfunction ZZ2 takes nothing returns nothinglocal integer ilocal player plocal boolean XV2=falselocal real alocal real xlocal real ylocal trigger tlocal integer S7Ilocal boolean X92=falselocal boolean XA2=falselocal boolean XB2=falselocal boolean XC2=falselocal boolean XD2=falselocal boolean XE2=falselocal boolean XF2=falselocal boolean XG2=falselocal boolean XH2=falselocal integer zlocal string c="|c006699CC"local boolean array XZ2call QXO()set t=CreateTrigger()call TriggerRegisterTimerEvent(t,15,false)call TriggerAddCondition(t,Condition(function YC2))set t=nullset QS0=-1set RC0=falseset UM=trueset A3=falseset O3=falseset TA0=falsecall TQI(GetLocalPlayer(),"Sound\\Interface\\Rescue.wav")call SuspendTimeOfDay(true)set QX0=CreateTrigger()call UnitAddAbility(DR0,1097295983)call UnitAddAbility(DP0,1097295983)call UnitAddAbility(DQ0,1097295983)call UnitAddAbility(DU0,1097295983)call UnitAddAbility(E20,1097295983)call UnitAddAbility(E30,1097295983)call UnitAddAbility(E40,1097295983)call UnitAddAbility(E50,1097295983)call UnitAddAbility(E00,1097295983)call UnitAddAbility(EI0,1097295983)call UnitAddAbility(E10,1097295983)call UnitAddAbility(EO0,1097295983)set p=BO[1]set QJ0[1]=CreateUnit(p,1848656963,RN0,RS0,0)call PanCameraToTimedForPlayer(p,RN0,RS0,0)call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-250)set p=BO[2]set QJ0[2]=CreateUnit(p,1848656963,RN0,RS0,0)call PanCameraToTimedForPlayer(p,RN0,RS0,0)call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-250)set p=BO[3]set QJ0[3]=CreateUnit(p,1848656963,RN0,RS0,0)call PanCameraToTimedForPlayer(p,RN0,RS0,0)call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-250)set p=BO[4]set QJ0[4]=CreateUnit(p,1848656963,RN0,RS0,0)call PanCameraToTimedForPlayer(p,RN0,RS0,0)call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-250)set p=BO[5]set QJ0[5]=CreateUnit(p,1848656963,RN0,RS0,0)call PanCameraToTimedForPlayer(p,RN0,RS0,0)call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-250)set p=CO[1]set QJ0[6]=CreateUnit(p,1848656963,RN0,RS0,0)call PanCameraToTimedForPlayer(p,RN0,RS0,0)call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-250)set p=CO[2]set QJ0[7]=CreateUnit(p,1848656963,RN0,RS0,0)call PanCameraToTimedForPlayer(p,RN0,RS0,0)call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-250)set p=CO[3]set QJ0[8]=CreateUnit(p,1848656963,RN0,RS0,0)call PanCameraToTimedForPlayer(p,RN0,RS0,0)call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-250)set p=CO[4]set QJ0[9]=CreateUnit(p,1848656963,RN0,RS0,0)call PanCameraToTimedForPlayer(p,RN0,RS0,0)call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-250)set p=CO[5]set QJ0[10]=CreateUnit(p,1848656963,RN0,RS0,0)call PanCameraToTimedForPlayer(p,RN0,RS0,0)call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-250)set U10[1]=RN0+UJ0*(-3.5)set UO0[1]=RS0+UK0set U10[2]=RN0+UJ0*(3.5)set UO0[2]=RS0+UK0set U10[3]=RN0+UJ0*(-2)set UO0[3]=RS0+UK0set U10[4]=RN0+UJ0*(-1)set UO0[4]=RS0+UK0set U10[5]=RN0+UJ0*(0)set UO0[5]=RS0+UK0set U10[6]=RN0+UJ0*(1)set UO0[6]=RS0+UK0set U10[7]=RN0+UJ0*(2)set UO0[7]=RS0+UK0set U20[1]=RN0+UJ0*(-3.5)set U30[1]=RS0-UK0set U20[2]=RN0+UJ0*(3.5)set U30[2]=RS0-UK0set U20[3]=RN0+UJ0*(-2)set U30[3]=RS0-UK0set U20[4]=RN0+UJ0*(-1)set U30[4]=RS0-UK0set U20[5]=RN0+UJ0*(0)set U30[5]=RS0-UK0set U20[6]=RN0+UJ0*(1)set U30[6]=RS0-UK0set U20[7]=RN0+UJ0*(2)set U30[7]=RS0-UK0call QEI(RN0,RS0,600)set i=1loopexitwhen i>28set S7I=TII(true,true)if X92 thenset X92=falseset S7I=50elseif XA2 thenset XA2=falseset S7I=51elseif XB2 thenset XB2=falseset S7I=104elseif XC2 thenset XC2=falseset S7I=65elseif XD2 thenset XD2=falseset S7I=49elseif XE2 thenset XE2=falseif GetRandomInt(1,2)==1 thenset S7I=16elseset S7I=86endifelseif XF2 thenset XF2=falseif GetRandomInt(1,2)==1 thenset S7I=73elseset S7I=83endifelseif XG2 thenset XG2=falseelseif XH2 thenset XH2=falseendifif XZ2[S7I]==false thenset XZ2[S7I]=trueset QY0[i]=S7Icall E71("Pool"+I2S(i),D70[QY0[i]])if XV2==false thenset XV2=trueelseset XV2=falseendifset a=(i/I2R(28))*360.0set x=RN0+UY0*Cos(a*bj_DEGTORAD)set y=RS0+UY0*Sin(a*bj_DEGTORAD)set QK0[i]=CreateUnit(BO[0],DK0[QY0[i]],x,y,PUI(x,y,RN0,RS0))call SetUnitPathing(QK0[i],false)call SetUnitX(QK0[i],x)call SetUnitY(QK0[i],y)call Y22(x,y)if XV2 thencall SetUnitColor(QK0[i],GetPlayerColor(CO[5]))elsecall SetUnitColor(QK0[i],GetPlayerColor(CO[4]))endifset QP0[i]=falsecall TriggerRegisterUnitEvent(QX0,QK0[i],EVENT_UNIT_SELL)set i=i+1endifendloopcall TriggerAddCondition(QX0,Condition(function Y82))call SOI()endfunctionfunction YD2 takes player p,integer N6I returns nothinglocal integer i=1loopexitwhen i>5if p!=BO[i]thencall SetPlayerTechMaxAllowed(BO[i],N6I,0)endifif p!=CO[i]thencall SetPlayerTechMaxAllowed(CO[i],N6I,0)endifset i=i+1endloopendfunctionfunction ModeSD_Chosen takes nothing returns booleanlocal string AD2=GetEventPlayerChatString()local integer a=S2I(SubString(AD2,6,StringLength(AD2)))local integer N6Ilocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local location GP1=GetRectCenter(F4)local location GQ1=GetRectCenter(E4)local player p=GetTriggerPlayer()if a==1 thenset N6I=(LoadInteger(XY,(MKI),(166)))elseif a==2 thenset N6I=(LoadInteger(XY,(MKI),(167)))elseif a==3 thenset N6I=(LoadInteger(XY,(MKI),(168)))elsecall RemoveLocation(GP1)call RemoveLocation(GQ1)set GP1=nullset GQ1=nullreturn falseendifif GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)>=250 thenif NZI(p)thenset K1[GetPlayerId(p)]=CreateUnitAtLoc(p,D70[N6I],GP1,0)elseset K1[GetPlayerId(p)]=CreateUnitAtLoc(p,D70[N6I],GQ1,0)endifcall IY1(p)call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)-250)call FlushChildHashtable(XY,(MKI))call MZI(t)elsecall R1I(p,GetObjectName(1848652595))endifcall RemoveLocation(GP1)call RemoveLocation(GQ1)set GP1=nullset GQ1=nullset t=nullset p=nullreturn falseendfunctionfunction YE2 takes integer YF2 returns integerlocal integer N7Oif YF2==1 thenset N7O=GetUnitPointValueByType(DD0[GetRandomInt(1,DE0)])elseif YF2==2 thenset N7O=GetUnitPointValueByType(DF0[GetRandomInt(1,DG0)])elseif YF2==3 thenset N7O=GetUnitPointValueByType(DH0[GetRandomInt(1,DZ0)])endifreturn N7Oendfunctionfunction YG2 takes integer YH2,integer YZ2,integer YF2 returns integerlocal integer STIlocal integer SRIlocal integer N7Oset N7O=YE2(YF2)if F2 and YH2!=N7O and YZ2!=N7O thenreturn N7Oendifloopexitwhen R[N7O]==false and YH2!=N7O and YZ2!=N7Oset N7O=YE2(YF2)endloopset R[N7O]=truereturn N7Oendfunctionfunction Z12 takes nothing returns nothinglocal player plocal integer i=1local integer YV2local integer YW2local integer YX2local trigger tlocal integer MKIset UL0=trueset UK=120set O3=falseset A3=falsecall PauseUnit(DR0,true)call PauseUnit(DP0,true)call PauseUnit(DQ0,true)call PauseUnit(DU0,true)call PauseUnit(E00,true)call PauseUnit(EI0,true)call PauseUnit(E10,true)call PauseUnit(EO0,true)call PauseUnit(E20,true)call PauseUnit(E30,true)call PauseUnit(E40,true)call PauseUnit(E50,true)loopexitwhen i>5set p=BO[i]set YV2=0set YW2=0set YX2=0if NYI(p)thencall UnitAddAbility(D00[GetPlayerId(p)],1093743686)call UnitAddAbility(D00[GetPlayerId(p)],1093743685)call UnitAddAbility(D00[GetPlayerId(p)],1093743688)set YV2=YG2(YV2,YW2,1)set YW2=YG2(YV2,YW2,2)set YX2=YG2(YV2,YW2,3)call AddUnitToStock(D00[GetPlayerId(p)],D70[YV2],1,1)call YD2(p,D70[YV2])call AddUnitToStock(D00[GetPlayerId(p)],D70[YW2],1,1)call YD2(p,D70[YW2])call AddUnitToStock(D00[GetPlayerId(p)],D70[YX2],1,1)call YD2(p,D70[YX2])call ClearSelectionForPlayer(p)call SelectUnitAddForPlayer(D00[GetPlayerId(p)],p)call PanCameraToTimedForPlayer(p,GetRectCenterX(O4),GetRectCenterY(O4),0)call DisplayTimedTextToPlayer(p,0,U2,15," ")call DisplayTimedTextToPlayer(p,0,U2,15," ")call DisplayTimedTextToPlayer(p,0,U2,15," ")call DisplayTimedTextToPlayer(p,0,U2,15,"|cff99ccff"+GetObjectName(1848657206)+"|r")call DisplayTimedTextToPlayer(p,0,U2,15," ")endifset p=CO[i]set YV2=0set YW2=0set YX2=0if NYI(p)thencall UnitAddAbility(D00[GetPlayerId(p)],1093743686)call UnitAddAbility(D00[GetPlayerId(p)],1093743685)call UnitAddAbility(D00[GetPlayerId(p)],1093743688)set YV2=YG2(YV2,YW2,1)set YW2=YG2(YV2,YW2,2)set YX2=YG2(YV2,YW2,3)call AddUnitToStock(D00[GetPlayerId(p)],D70[YV2],1,1)call YD2(p,D70[YV2])call AddUnitToStock(D00[GetPlayerId(p)],D70[YW2],1,1)call YD2(p,D70[YW2])call AddUnitToStock(D00[GetPlayerId(p)],D70[YX2],1,1)call YD2(p,D70[YX2])call ClearSelectionForPlayer(p)call SelectUnitAddForPlayer(D00[GetPlayerId(p)],p)call PanCameraToTimedForPlayer(p,GetRectCenterX(S3),GetRectCenterY(S3),0)call DisplayTimedTextToPlayer(p,0,U2,15," ")call DisplayTimedTextToPlayer(p,0,U2,15," ")call DisplayTimedTextToPlayer(p,0,U2,15," ")call DisplayTimedTextToPlayer(p,0,U2,15,"|cff99ccff"+GetObjectName(1848657206)+"|r")call DisplayTimedTextToPlayer(p,0,U2,15," ")endifset i=i+1endloopset p=nullset t=nullendfunctionfunction YY2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer USI=(LoadInteger(XY,(MKI),(55)))local player plocal integer S7Ilocal location GP1=GetRectCenter(O4)local location GQ1=GetRectCenter(S3)if USI<6 thenset p=BO[USI]elseif USI<11 thenset p=CO[USI-5]endifif USI>10 thencall FlushChildHashtable(XY,(MKI))call MZI(t)if X0==false thenset A3=trueendifelseif USI<6 thencall SaveInteger(XY,(MKI),(55),(USI+1))set K1[GetPlayerId(p)]=nullif NYI(p)thenloopexitwhen K1[GetPlayerId(p)]!=nullset S7I=S6I()if R[S7I]==false thenif not F2 thenset R[S7I]=trueendifset K1[GetPlayerId(p)]=CreateUnitAtLoc(p,D70[S7I],GP1,bj_UNIT_FACING)endifendloopendifelseif USI<11 thencall SaveInteger(XY,(MKI),(55),(USI+1))set K1[GetPlayerId(p)]=nullif NYI(p)thenloopexitwhen K1[GetPlayerId(p)]!=nullset S7I=S6I()if R[S7I]==false thenif not F2 thenset R[S7I]=trueendifset K1[GetPlayerId(p)]=CreateUnitAtLoc(p,D70[S7I],GQ1,bj_UNIT_FACING)endifendloopendifendifcall RemoveLocation(GP1)call RemoveLocation(GQ1)set GP1=nullset GQ1=nullset p=nullset t=nullreturn falseendfunctionfunction HN2 takes nothing returns nothinglocal location GP1=GetRectCenter(O4)local location GQ1=GetRectCenter(S3)local location YJ2=GetRectCenter(O4)local location YK2=GetRectCenter(S3)local integer SII=1local integer S1I=5local integer S7Ilocal trigger tset Y0=trueset O3=falseif not F2 thencall SOI()endifset T0=400call PanCameraToTimedLocForPlayer(BO[1],YJ2,0)call PanCameraToTimedLocForPlayer(BO[2],YJ2,0)call PanCameraToTimedLocForPlayer(BO[3],YJ2,0)call PanCameraToTimedLocForPlayer(BO[4],YJ2,0)call PanCameraToTimedLocForPlayer(BO[5],YJ2,0)call PanCameraToTimedLocForPlayer(CO[1],YK2,0)call PanCameraToTimedLocForPlayer(CO[2],YK2,0)call PanCameraToTimedLocForPlayer(CO[3],YK2,0)call PanCameraToTimedLocForPlayer(CO[4],YK2,0)call PanCameraToTimedLocForPlayer(CO[5],YK2,0)if Y2 thenloopset S7I=S6I()exitwhen R[S7I]==falseendloopif NZI(WO)thenset K1[GetPlayerId(WO)]=CreateUnit(WO,D70[S7I],GetLocationX(GP1),GetLocationY(GP1),270)elseset K1[GetPlayerId(WO)]=CreateUnit(WO,D70[S7I],GetLocationX(GQ1),GetLocationY(GQ1),270)endifcall RemoveLocation(GP1)call RemoveLocation(GQ1)call RemoveLocation(YJ2)call RemoveLocation(YK2)set GP1=nullset GQ1=nullset YJ2=nullset YK2=nullset t=nullreturnendifset A3=falseset t=CreateTrigger()call TriggerRegisterTimerEvent(t,.5,true)call TriggerAddCondition(t,Condition(function YY2))call SaveInteger(XY,(GetHandleId(t)),(55),(1))call RemoveLocation(GP1)call RemoveLocation(GQ1)call RemoveLocation(YJ2)call RemoveLocation(YK2)set GP1=nullset GQ1=nullset YJ2=nullset YK2=nullset t=nullendfunctionfunction YL2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()call MZI(t)set I3=trueset t=nullreturn falseendfunctionfunction YM2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local trigger YN2=(LoadTriggerHandle(XY,(MKI),(35)))local integer ilocal integer xlocal integer S7Ilocal integer YS2=NNI(OO)local integer YT2=NNI(AO)local location GP1=GetRectCenter(F4)local location GQ1=GetRectCenter(E4)local location YJ2=GetRectCenter(O4)local location YK2=GetRectCenter(S3)call MZI(YN2)call FlushChildHashtable(XY,(MKI))call MZI(t)set I0I=(LoadInteger(XY,(2001),(126)))set III=(LoadInteger(XY,(2001),(127)))set I1I=(LoadInteger(XY,(2001),(128)))set i=1loopexitwhen i>YS2set UU0[i]=UN0[i]set i=i+1endloopset x=GetRandomInt(1,3)if x==1 thenif YS2==1 thenset UU0[1]=UN0[1]elseif YS2==2 thenset UU0[1]=UN0[2]set UU0[2]=UN0[1]elseif YS2==3 thenset UU0[1]=UN0[3]set UU0[2]=UN0[1]set UU0[3]=UN0[2]elseif YS2==4 thenset UU0[1]=UN0[4]set UU0[2]=UN0[3]set UU0[3]=UN0[2]set UU0[4]=UN0[1]elseif YS2==5 thenset UU0[1]=UN0[5]set UU0[2]=UN0[4]set UU0[3]=UN0[1]set UU0[4]=UN0[2]set UU0[5]=UN0[3]endifelseif x==2 thenif YS2==1 thenset UU0[1]=UN0[1]elseif YS2==2 thenset UU0[1]=UN0[2]set UU0[2]=UN0[1]elseif YS2==3 thenset UU0[1]=UN0[2]set UU0[2]=UN0[3]set UU0[3]=UN0[1]elseif YS2==4 thenset UU0[1]=UN0[3]set UU0[2]=UN0[1]set UU0[3]=UN0[4]set UU0[4]=UN0[2]elseif YS2==5 thenset UU0[1]=UN0[4]set UU0[2]=UN0[3]set UU0[3]=UN0[2]set UU0[4]=UN0[5]set UU0[5]=UN0[1]endifelseif YS2==1 thenset UU0[1]=UN0[1]elseif YS2==2 thenset UU0[1]=UN0[1]set UU0[2]=UN0[2]elseif YS2==3 thenset UU0[1]=UN0[3]set UU0[2]=UN0[2]set UU0[3]=UN0[1]elseif YS2==4 thenset UU0[1]=UN0[2]set UU0[2]=UN0[4]set UU0[3]=UN0[3]set UU0[4]=UN0[1]elseif YS2==5 thenset UU0[1]=UN0[5]set UU0[2]=UN0[1]set UU0[3]=UN0[3]set UU0[4]=UN0[4]set UU0[5]=UN0[2]endifendifset i=1loopexitwhen i>YS2set UN0[i]=UU0[i]set i=i+1endloopset i=1loopexitwhen i>YS2set UU0[i]=US0[i]set i=i+1endloopset x=GetRandomInt(1,3)if x==1 thenif YS2==1 thenset UU0[1]=US0[1]elseif YS2==2 thenset UU0[1]=US0[2]set UU0[2]=US0[1]elseif YS2==3 thenset UU0[1]=US0[3]set UU0[2]=US0[1]set UU0[3]=US0[2]elseif YS2==4 thenset UU0[1]=US0[4]set UU0[2]=US0[3]set UU0[3]=US0[2]set UU0[4]=US0[1]elseif YS2==5 thenset UU0[1]=US0[5]set UU0[2]=US0[4]set UU0[3]=US0[1]set UU0[4]=US0[2]set UU0[5]=US0[3]endifelseif x==2 thenif YS2==1 thenset UU0[1]=US0[1]elseif YS2==2 thenset UU0[1]=US0[2]set UU0[2]=US0[1]elseif YS2==3 thenset UU0[1]=US0[2]set UU0[2]=US0[3]set UU0[3]=US0[1]elseif YS2==4 thenset UU0[1]=US0[3]set UU0[2]=US0[1]set UU0[3]=US0[4]set UU0[4]=US0[2]elseif YS2==5 thenset UU0[1]=US0[4]set UU0[2]=US0[3]set UU0[3]=US0[2]set UU0[4]=US0[5]set UU0[5]=US0[1]endifelseif YS2==1 thenset UU0[1]=US0[1]elseif YS2==2 thenset UU0[1]=US0[1]set UU0[2]=US0[2]elseif YS2==3 thenset UU0[1]=US0[3]set UU0[2]=US0[2]set UU0[3]=US0[1]elseif YS2==4 thenset UU0[1]=US0[2]set UU0[2]=US0[4]set UU0[3]=US0[3]set UU0[4]=US0[1]elseif YS2==5 thenset UU0[1]=US0[5]set UU0[2]=US0[1]set UU0[3]=US0[3]set UU0[4]=US0[4]set UU0[5]=US0[2]endifendifset i=1loopexitwhen i>YS2set US0[i]=UU0[i]set i=i+1endloopset i=1loopexitwhen i>YS2set UU0[i]=UT0[i]set i=i+1endloopset x=GetRandomInt(1,3)if x==1 thenif YS2==1 thenset UU0[1]=UT0[1]elseif YS2==2 thenset UU0[1]=UT0[2]set UU0[2]=UT0[1]elseif YS2==3 thenset UU0[1]=UT0[3]set UU0[2]=UT0[1]set UU0[3]=UT0[2]elseif YS2==4 thenset UU0[1]=UT0[4]set UU0[2]=UT0[3]set UU0[3]=UT0[2]set UU0[4]=UT0[1]elseif YS2==5 thenset UU0[1]=UT0[5]set UU0[2]=UT0[4]set UU0[3]=UT0[1]set UU0[4]=UT0[2]set UU0[5]=UT0[3]endifelseif x==2 thenif YS2==1 thenset UU0[1]=UT0[1]elseif YS2==2 thenset UU0[1]=UT0[2]set UU0[2]=UT0[1]elseif YS2==3 thenset UU0[1]=UT0[2]set UU0[2]=UT0[3]set UU0[3]=UT0[1]elseif YS2==4 thenset UU0[1]=UT0[3]set UU0[2]=UT0[1]set UU0[3]=UT0[4]set UU0[4]=UT0[2]elseif YS2==5 thenset UU0[1]=UT0[4]set UU0[2]=UT0[3]set UU0[3]=UT0[2]set UU0[4]=UT0[5]set UU0[5]=UT0[1]endifelseif YS2==1 thenset UU0[1]=UT0[1]elseif YS2==2 thenset UU0[1]=UT0[1]set UU0[2]=UT0[2]elseif YS2==3 thenset UU0[1]=UT0[3]set UU0[2]=UT0[2]set UU0[3]=UT0[1]elseif YS2==4 thenset UU0[1]=UT0[2]set UU0[2]=UT0[4]set UU0[3]=UT0[3]set UU0[4]=UT0[1]elseif YS2==5 thenset UU0[1]=UT0[5]set UU0[2]=UT0[1]set UU0[3]=UT0[3]set UU0[4]=UT0[4]set UU0[5]=UT0[2]endifendifset i=1loopexitwhen i>YS2set UT0[i]=UU0[i]set i=i+1endloopset i=1loopexitwhen i>YS2set UU0[i]=UR0[i]set i=i+1endloopset x=GetRandomInt(1,3)if x==1 thenif YS2==1 thenset UU0[1]=UR0[1]elseif YS2==2 thenset UU0[1]=UR0[2]set UU0[2]=UR0[1]elseif YS2==3 thenset UU0[1]=UR0[3]set UU0[2]=UR0[1]set UU0[3]=UR0[2]elseif YS2==4 thenset UU0[1]=UR0[4]set UU0[2]=UR0[3]set UU0[3]=UR0[2]set UU0[4]=UR0[1]elseif YS2==5 thenset UU0[1]=UR0[5]set UU0[2]=UR0[4]set UU0[3]=UR0[1]set UU0[4]=UR0[2]set UU0[5]=UR0[3]endifelseif x==2 thenif YS2==1 thenset UU0[1]=UR0[1]elseif YS2==2 thenset UU0[1]=UR0[2]set UU0[2]=UR0[1]elseif YS2==3 thenset UU0[1]=UR0[2]set UU0[2]=UR0[3]set UU0[3]=UR0[1]elseif YS2==4 thenset UU0[1]=UR0[3]set UU0[2]=UR0[1]set UU0[3]=UR0[4]set UU0[4]=UR0[2]elseif YS2==5 thenset UU0[1]=UR0[4]set UU0[2]=UR0[3]set UU0[3]=UR0[2]set UU0[4]=UR0[5]set UU0[5]=UR0[1]endifelseif YS2==1 thenset UU0[1]=UR0[1]elseif YS2==2 thenset UU0[1]=UR0[1]set UU0[2]=UR0[2]elseif YS2==3 thenset UU0[1]=UR0[3]set UU0[2]=UR0[2]set UU0[3]=UR0[1]elseif YS2==4 thenset UU0[1]=UR0[2]set UU0[2]=UR0[4]set UU0[3]=UR0[3]set UU0[4]=UR0[1]elseif YS2==5 thenset UU0[1]=UR0[5]set UU0[2]=UR0[1]set UU0[3]=UR0[3]set UU0[4]=UR0[4]set UU0[5]=UR0[2]endifendifset i=1loopexitwhen i>YS2set UR0[i]=UU0[i]set i=i+1endloopset i=1loopexitwhen i>YS2set UU0[i]=UP0[i]set i=i+1endloopset x=GetRandomInt(1,3)if x==1 thenif YS2==1 thenset UU0[1]=UP0[1]elseif YS2==2 thenset UU0[1]=UP0[2]set UU0[2]=UP0[1]elseif YS2==3 thenset UU0[1]=UP0[3]set UU0[2]=UP0[1]set UU0[3]=UP0[2]elseif YS2==4 thenset UU0[1]=UP0[4]set UU0[2]=UP0[3]set UU0[3]=UP0[2]set UU0[4]=UP0[1]elseif YS2==5 thenset UU0[1]=UP0[5]set UU0[2]=UP0[4]set UU0[3]=UP0[1]set UU0[4]=UP0[2]set UU0[5]=UP0[3]endifelseif x==2 thenif YS2==1 thenset UU0[1]=UP0[1]elseif YS2==2 thenset UU0[1]=UP0[2]set UU0[2]=UP0[1]elseif YS2==3 thenset UU0[1]=UP0[2]set UU0[2]=UP0[3]set UU0[3]=UP0[1]elseif YS2==4 thenset UU0[1]=UP0[3]set UU0[2]=UP0[1]set UU0[3]=UP0[4]set UU0[4]=UP0[2]elseif YS2==5 thenset UU0[1]=UP0[4]set UU0[2]=UP0[3]set UU0[3]=UP0[2]set UU0[4]=UP0[5]set UU0[5]=UP0[1]endifelseif YS2==1 thenset UU0[1]=UP0[1]elseif YS2==2 thenset UU0[1]=UP0[1]set UU0[2]=UP0[2]elseif YS2==3 thenset UU0[1]=UP0[3]set UU0[2]=UP0[2]set UU0[3]=UP0[1]elseif YS2==4 thenset UU0[1]=UP0[2]set UU0[2]=UP0[4]set UU0[3]=UP0[3]set UU0[4]=UP0[1]elseif YS2==5 thenset UU0[1]=UP0[5]set UU0[2]=UP0[1]set UU0[3]=UP0[3]set UU0[4]=UP0[4]set UU0[5]=UP0[2]endifendifset i=1loopexitwhen i>YS2set UP0[i]=UU0[i]set i=i+1endloopset i=1loopexitwhen i>YS2set UU0[i]=UQ0[i]set i=i+1endloopset x=GetRandomInt(1,3)if x==1 thenif YS2==1 thenset UU0[1]=UQ0[1]elseif YS2==2 thenset UU0[1]=UQ0[2]set UU0[2]=UQ0[1]elseif YS2==3 thenset UU0[1]=UQ0[3]set UU0[2]=UQ0[1]set UU0[3]=UQ0[2]elseif YS2==4 thenset UU0[1]=UQ0[4]set UU0[2]=UQ0[3]set UU0[3]=UQ0[2]set UU0[4]=UQ0[1]elseif YS2==5 thenset UU0[1]=UQ0[5]set UU0[2]=UQ0[4]set UU0[3]=UQ0[1]set UU0[4]=UQ0[2]set UU0[5]=UQ0[3]endifelseif x==2 thenif YS2==1 thenset UU0[1]=UQ0[1]elseif YS2==2 thenset UU0[1]=UQ0[2]set UU0[2]=UQ0[1]elseif YS2==3 thenset UU0[1]=UQ0[2]set UU0[2]=UQ0[3]set UU0[3]=UQ0[1]elseif YS2==4 thenset UU0[1]=UQ0[3]set UU0[2]=UQ0[1]set UU0[3]=UQ0[4]set UU0[4]=UQ0[2]elseif YS2==5 thenset UU0[1]=UQ0[4]set UU0[2]=UQ0[3]set UU0[3]=UQ0[2]set UU0[4]=UQ0[5]set UU0[5]=UQ0[1]endifelseif YS2==1 thenset UU0[1]=UQ0[1]elseif YS2==2 thenset UU0[1]=UQ0[1]set UU0[2]=UQ0[2]elseif YS2==3 thenset UU0[1]=UQ0[3]set UU0[2]=UQ0[2]set UU0[3]=UQ0[1]elseif YS2==4 thenset UU0[1]=UQ0[2]set UU0[2]=UQ0[4]set UU0[3]=UQ0[3]set UU0[4]=UQ0[1]elseif YS2==5 thenset UU0[1]=UQ0[5]set UU0[2]=UQ0[1]set UU0[3]=UQ0[3]set UU0[4]=UQ0[4]set UU0[5]=UQ0[2]endifendifset i=1loopexitwhen i>YS2set UQ0[i]=UU0[i]set i=i+1endloopset S7I=GetRandomInt(1,2)if I0I>=III and I0I>=I1I thencall ClearTextMessages()call PDI(bj_FORCE_ALL_PLAYERS,45,GetObjectName(1848653146)+" "+IOI)call PDI(bj_FORCE_ALL_PLAYERS,45," ")set i=1set x=1loopexitwhen i>5if NYI(BO[i])thenif S7I==1 thenset K1[GetPlayerId(BO[i])]=CreateUnitAtLoc(BO[i],UN0[x],GP1,bj_UNIT_FACING)elseset K1[GetPlayerId(BO[i])]=CreateUnitAtLoc(BO[i],US0[x],GP1,bj_UNIT_FACING)endifset x=x+1endifset i=i+1endloopset i=1set x=1loopexitwhen i>5if NYI(CO[i])thenif S7I==1 thenset K1[GetPlayerId(CO[i])]=CreateUnitAtLoc(CO[i],US0[x],GQ1,bj_UNIT_FACING)elseset K1[GetPlayerId(CO[i])]=CreateUnitAtLoc(CO[i],UN0[x],GQ1,bj_UNIT_FACING)endifset x=x+1endifset i=i+1endloopelseif III>=I0I and III>=I1I thencall ClearTextMessages()call PDI(bj_FORCE_ALL_PLAYERS,45,GetObjectName(1848653146)+" "+I2I)call PDI(bj_FORCE_ALL_PLAYERS,45," ")set i=1set x=1loopexitwhen i>5if NYI(BO[i])thenif S7I==1 thenset K1[GetPlayerId(BO[i])]=CreateUnitAtLoc(BO[i],UT0[x],GP1,bj_UNIT_FACING)elseset K1[GetPlayerId(BO[i])]=CreateUnitAtLoc(BO[i],UR0[x],GP1,bj_UNIT_FACING)endifset x=x+1endifset i=i+1endloopset i=1set x=1loopexitwhen i>5if NYI(CO[i])thenif S7I==1 thenset K1[GetPlayerId(CO[i])]=CreateUnitAtLoc(CO[i],UR0[x],GQ1,bj_UNIT_FACING)elseset K1[GetPlayerId(CO[i])]=CreateUnitAtLoc(CO[i],UT0[x],GQ1,bj_UNIT_FACING)endifset x=x+1endifset i=i+1endloopelseif I1I>=I0I and I1I>=III thencall ClearTextMessages()call PDI(bj_FORCE_ALL_PLAYERS,45,GetObjectName(1848653146)+" "+I3I)call PDI(bj_FORCE_ALL_PLAYERS,45," ")set i=1set x=1loopexitwhen i>5if NYI(BO[i])thenif S7I==1 thenset K1[GetPlayerId(BO[i])]=CreateUnitAtLoc(BO[i],UP0[x],GP1,bj_UNIT_FACING)elseset K1[GetPlayerId(BO[i])]=CreateUnitAtLoc(BO[i],UQ0[x],GP1,bj_UNIT_FACING)endifset x=x+1endifset i=i+1endloopset i=1set x=1loopexitwhen i>5if NYI(CO[i])thenif S7I==1 thenset K1[GetPlayerId(CO[i])]=CreateUnitAtLoc(CO[i],UQ0[x],GQ1,bj_UNIT_FACING)elseset K1[GetPlayerId(CO[i])]=CreateUnitAtLoc(CO[i],UP0[x],GQ1,bj_UNIT_FACING)endifset x=x+1endifset i=i+1endloopendifset t=CreateTrigger()call TriggerRegisterTimerEvent(t,70,false)call TriggerAddCondition(t,Condition(function YL2))call RemoveLocation(GP1)call RemoveLocation(GQ1)call RemoveLocation(YJ2)call RemoveLocation(YK2)set GP1=nullset GQ1=nullset YJ2=nullset YK2=nullset t=nullset YN2=nullreturn falseendfunctionfunction YR2 takes integer i returns integerif i==1 thenreturn TEI(DH0[GetRandomInt(1,DZ0)])elseif i==2 thenreturn TEI(DD0[GetRandomInt(1,DE0)])elseif i==3 thenreturn TEI(DF0[GetRandomInt(1,DG0)])elseif i==4 thenreturn TEI(DX0[GetRandomInt(1,DY0)])elseif i==5 thenreturn TEI(DV0[GetRandomInt(1,DW0)])endifreturn 0endfunctionfunction YP2 takes integer i returns integerlocal integer STIlocal integer SRIlocal integer N7Oset N7O=YR2(i)if F2 thenreturn N7Oendifloopexitwhen S2[N7O]==falseset N7O=YR2(i)endloopset S2[N7O]=truereturn N7Oendfunctionfunction YQ2 takes nothing returns nothinglocal integer i=D90loopexitwhen i>DC0set S2[i]=falseset i=i+1endloopendfunctionfunction YU2 takes nothing returns booleanlocal integer J02=GetPlayerId(GetTriggerPlayer())local string JI2=SubString(GetEventPlayerChatString(),8,9)local integer J12=0if JI2=="1"thenset J12=1elseif JI2=="2"thenset J12=2elseif JI2=="3"thenset J12=3endifif J12==0 thencall R5I(GetTriggerPlayer(),GetObjectName(1848652612))return falseendifif(LoadBoolean(XY,(2001),(950+J02)))thencall R5I(GetTriggerPlayer(),GetObjectName(1848652609))return falseendifcall SaveBoolean(XY,(2001),(950+J02),(true))if J12==1 thencall SaveInteger(XY,(2001),(126),(1+(LoadInteger(XY,(2001),(126)))))elseif J12==2 thencall SaveInteger(XY,(2001),(127),(1+(LoadInteger(XY,(2001),(127)))))elsecall SaveInteger(XY,(2001),(128),(1+(LoadInteger(XY,(2001),(128)))))endifcall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,20,GetObjectName(1848654157)+" Option "+I2S(J12)+".")return falseendfunctionfunction HS2 takes nothing returns nothinglocal integer YS2=NNI(OO)local integer YT2=NNI(AO)local integer ilocal integer xlocal trigger t=CreateTrigger()local location GP1=GetRectCenter(F4)local location GQ1=GetRectCenter(E4)local location YJ2=GetRectCenter(O4)local location YK2=GetRectCenter(S3)local integer S7Ilocal trigger t2set N2=trueset O3=falseset A3=falsecall SOI()call PanCameraToTimedLocForPlayer(BO[1],YJ2,0)call PanCameraToTimedLocForPlayer(BO[2],YJ2,0)call PanCameraToTimedLocForPlayer(BO[3],YJ2,0)call PanCameraToTimedLocForPlayer(BO[4],YJ2,0)call PanCameraToTimedLocForPlayer(BO[5],YJ2,0)call PanCameraToTimedLocForPlayer(CO[1],YK2,0)call PanCameraToTimedLocForPlayer(CO[2],YK2,0)call PanCameraToTimedLocForPlayer(CO[3],YK2,0)call PanCameraToTimedLocForPlayer(CO[4],YK2,0)call PanCameraToTimedLocForPlayer(CO[5],YK2,0)call TriggerRegisterPlayerChatEvent(t,BO[1],"-Option",false)call TriggerRegisterPlayerChatEvent(t,BO[2],"-Option",false)call TriggerRegisterPlayerChatEvent(t,BO[3],"-Option",false)call TriggerRegisterPlayerChatEvent(t,BO[4],"-Option",false)call TriggerRegisterPlayerChatEvent(t,BO[5],"-Option",false)call TriggerRegisterPlayerChatEvent(t,CO[1],"-Option",false)call TriggerRegisterPlayerChatEvent(t,CO[2],"-Option",false)call TriggerRegisterPlayerChatEvent(t,CO[3],"-Option",false)call TriggerRegisterPlayerChatEvent(t,CO[4],"-Option",false)call TriggerRegisterPlayerChatEvent(t,CO[5],"-Option",false)call TriggerAddCondition(t,Condition(function YU2))call YQ2()set i=1loopexitwhen i>YS2set UN0[i]=D70[YP2(i)]set IOI=IOI+GetObjectName(UN0[i])set i=i+1if i<=YS2 thenset IOI=IOI+"|c005BFEEA-|r"endifendloopset IOI=IOI+" |c00FF0000vs |r"set i=1loopexitwhen i>YT2set US0[i]=D70[YP2(i)]set IOI=IOI+GetObjectName(US0[i])set i=i+1if i<=YT2 thenset IOI=IOI+"|c005BFEEA-|r"endifendloopcall YQ2()set i=1loopexitwhen i>YS2set UT0[i]=D70[YP2(i)]set I2I=I2I+GetObjectName(UT0[i])+" "set i=i+1if i<=YS2 thenset I2I=I2I+"|c005BFEEA-|r"endifendloopset I2I=I2I+" |c00FF0000vs |r"set i=1loopexitwhen i>YT2set UR0[i]=D70[YP2(i)]set I2I=I2I+GetObjectName(UR0[i])+" "set i=i+1if i<=YT2 thenset I2I=I2I+"|c005BFEEA-|r"endifendloopcall YQ2()set i=1loopexitwhen i>YS2set UP0[i]=D70[YP2(i)]set I3I=I3I+GetObjectName(UP0[i])+" "set i=i+1if i<=YS2 thenset I3I=I3I+"|c005BFEEA-|r"endifendloopset I3I=I3I+" |c00FF0000vs |r"set i=1loopexitwhen i>YT2set UQ0[i]=D70[YP2(i)]set I3I=I3I+GetObjectName(UQ0[i])+" "set i=i+1if i<=YT2 thenset I3I=I3I+"|c005BFEEA-|r"endifendloopcall PDI(bj_FORCE_ALL_PLAYERS,75," ")call PDI(bj_FORCE_ALL_PLAYERS,75,GetObjectName(1848653396))call PDI(bj_FORCE_ALL_PLAYERS,75,GetObjectName(1848653385)+" "+GetObjectName(1848653380))call PDI(bj_FORCE_ALL_PLAYERS,75," ")call PDI(bj_FORCE_ALL_PLAYERS,75,IOI)call PDI(bj_FORCE_ALL_PLAYERS,75," ")call PDI(bj_FORCE_ALL_PLAYERS,75,I2I)call PDI(bj_FORCE_ALL_PLAYERS,75," ")call PDI(bj_FORCE_ALL_PLAYERS,75,I3I)set t2=CreateTrigger()call TriggerRegisterTimerEvent(t2,30,false)call TriggerAddCondition(t2,Condition(function YM2))call SaveTriggerHandle(XY,(GetHandleId(t2)),(35),(t))call RemoveLocation(GP1)call RemoveLocation(GQ1)call RemoveLocation(YJ2)call RemoveLocation(YK2)set GP1=nullset GQ1=nullset YJ2=nullset YK2=nullset t=nullset t2=nullendfunctionfunction JO2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MFI=GetTriggerEvalCount(t)local integer F21=20-(MFI-(MFI/20)*20)call LeaderboardSetLabel(I8I,"           "+GetObjectName(1848657242)+" "+I2S(F21))if MFI>125 thencall DestroyLeaderboard(I8I)call EJ2()call MZI(t)endifset t=nullreturn falseendfunctionfunction J22 takes nothing returns nothinglocal trigger t=CreateTrigger()call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function JO2))set I8I=CreateLeaderboard()call LeaderboardSetStyle(I8I,true,false,false,false)call LeaderboardDisplay(I8I,false)call PlayerSetLeaderboard(BO[1],I8I)call PlayerSetLeaderboard(BO[2],I8I)call PlayerSetLeaderboard(BO[3],I8I)call PlayerSetLeaderboard(BO[4],I8I)call PlayerSetLeaderboard(BO[5],I8I)call PlayerSetLeaderboard(CO[1],I8I)call PlayerSetLeaderboard(CO[2],I8I)call PlayerSetLeaderboard(CO[3],I8I)call PlayerSetLeaderboard(CO[4],I8I)call PlayerSetLeaderboard(CO[5],I8I)set t=nullendfunctionfunction J32 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer X22=(LoadInteger(XY,(MKI),(25)))local player p1local player p2local player X32local player X42if X22==0 thenif I4I==1 thenset p1=BO[1]elseset p1=CO[1]endifcall PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(p1)]+(D30[GetPlayerId((p1))])+"|r"+" "+GetObjectName(1848653364))call SetPlayerState(p1,PLAYER_STATE_RESOURCE_GOLD,I5I[GetPlayerId(p1)])if GetLocalPlayer()==p1 thencall LeaderboardDisplay(I8I,true)elsecall LeaderboardDisplay(I8I,false)endifelseif X22==1 thenif I4I==1 thenset p1=CO[1]set p2=CO[2]set X32=BO[1]elseset p1=BO[1]set p2=BO[2]set X32=CO[1]endifcall S0I(X32)call PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(p1)]+(D30[GetPlayerId((p1))])+"|r"+" "+GetObjectName(1848653364))call PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(p2)]+(D30[GetPlayerId((p2))])+"|r"+" "+GetObjectName(1848653364))call SetPlayerState(p1,PLAYER_STATE_RESOURCE_GOLD,I5I[GetPlayerId(p1)])call SetPlayerState(p2,PLAYER_STATE_RESOURCE_GOLD,I5I[GetPlayerId(p2)])if GetLocalPlayer()==p1 or GetLocalPlayer()==p2 thencall LeaderboardDisplay(I8I,true)elsecall LeaderboardDisplay(I8I,false)endifelseif X22==2 thenif I4I==1 thenset p1=BO[2]set p2=BO[3]set X32=CO[1]set X42=CO[2]elseset p1=CO[2]set p2=CO[3]set X32=BO[1]set X42=BO[2]endifcall S0I(X32)call S0I(X42)call PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(p1)]+(D30[GetPlayerId((p1))])+"|r"+" "+GetObjectName(1848653364))call PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(p2)]+(D30[GetPlayerId((p2))])+"|r"+" "+GetObjectName(1848653364))call SetPlayerState(p1,PLAYER_STATE_RESOURCE_GOLD,I5I[GetPlayerId(p1)])call SetPlayerState(p2,PLAYER_STATE_RESOURCE_GOLD,I5I[GetPlayerId(p2)])if GetLocalPlayer()==p1 or GetLocalPlayer()==p2 thencall LeaderboardDisplay(I8I,true)elsecall LeaderboardDisplay(I8I,false)endifelseif X22==3 thenif I4I==1 thenset p1=CO[3]set p2=CO[4]set X32=BO[2]set X42=BO[3]elseset p1=BO[3]set p2=BO[4]set X32=CO[2]set X42=CO[3]endifcall S0I(X32)call S0I(X42)call PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(p1)]+(D30[GetPlayerId((p1))])+"|r"+" "+GetObjectName(1848653364))call PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(p2)]+(D30[GetPlayerId((p2))])+"|r"+" "+GetObjectName(1848653364))call SetPlayerState(p1,PLAYER_STATE_RESOURCE_GOLD,I5I[GetPlayerId(p1)])call SetPlayerState(p2,PLAYER_STATE_RESOURCE_GOLD,I5I[GetPlayerId(p2)])if GetLocalPlayer()==p1 or GetLocalPlayer()==p2 thencall LeaderboardDisplay(I8I,true)elsecall LeaderboardDisplay(I8I,false)endifelseif X22==4 thenif I4I==1 thenset p1=BO[4]set p2=BO[5]set X32=CO[3]set X42=CO[4]elseset p1=CO[4]set p2=CO[5]set X32=BO[3]set X42=BO[4]endifcall S0I(X32)call S0I(X42)call PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(p1)]+(D30[GetPlayerId((p1))])+"|r"+" "+GetObjectName(1848653364))call PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(p2)]+(D30[GetPlayerId((p2))])+"|r"+" "+GetObjectName(1848653364))call SetPlayerState(p1,PLAYER_STATE_RESOURCE_GOLD,I5I[GetPlayerId(p1)])call SetPlayerState(p2,PLAYER_STATE_RESOURCE_GOLD,I5I[GetPlayerId(p2)])if GetLocalPlayer()==p1 or GetLocalPlayer()==p2 thencall LeaderboardDisplay(I8I,true)elsecall LeaderboardDisplay(I8I,false)endifelseif X22==5 thenif I4I==1 thenset p1=CO[5]set X32=BO[4]set X42=BO[5]elseset p1=BO[5]set X32=CO[4]set X42=CO[5]endifcall S0I(X32)call S0I(X42)call PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(p1)]+(D30[GetPlayerId((p1))])+"|r"+" "+GetObjectName(1848653364))call SetPlayerState(p1,PLAYER_STATE_RESOURCE_GOLD,I5I[GetPlayerId(p1)])if GetLocalPlayer()==p1 thencall LeaderboardDisplay(I8I,true)elsecall LeaderboardDisplay(I8I,false)endifelseif X22==6 thenif I4I==1 thenset X32=CO[5]elseset X32=BO[5]endifcall S0I(X32)call LeaderboardDisplay(I8I,false)call SuspendTimeOfDay(false)endifif X22>6 thenset I7I=truecall FlushChildHashtable(XY,(MKI))call MZI(t)elsecall SaveInteger(XY,(MKI),(25),(X22+1))endifset t=nullset p1=nullset p2=nullset X32=nullset X42=nullreturn falseendfunctionfunction J42 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKIcall MZI(t)call SuspendTimeOfDay(true)set I4I=GetRandomInt(1,2)call PDI(bj_FORCE_ALL_PLAYERS,15.00," ")if I4I==1 thencall PDI(bj_FORCE_ALL_PLAYERS,15.00,GetObjectName(1848653131)+" "+C0[GetPlayerId(BO[0])]+GetObjectName(1848653365)+"|r"+" "+GetObjectName(1848653366))elsecall PDI(bj_FORCE_ALL_PLAYERS,15.00,GetObjectName(1848653131)+" "+C0[GetPlayerId(CO[0])]+GetObjectName(1848653379)+"|r"+" "+GetObjectName(1848653366))endifcall PDI(bj_FORCE_ALL_PLAYERS,15.00," ")set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,20,true)call TriggerAddCondition(t,Condition(function J32))call SaveInteger(XY,(MKI),(25),(0))call J22()call TriggerEvaluate(t)set t=nullreturn falseendfunctionfunction HQ2 takes nothing returns nothinglocal trigger tlocal integer x=1set I6I=trueset UK=180set A3=falseset O3=falsecall QXO()set I5I[GetPlayerId(BO[1])]=GetPlayerState(BO[1],PLAYER_STATE_RESOURCE_GOLD)set I5I[GetPlayerId(BO[2])]=GetPlayerState(BO[2],PLAYER_STATE_RESOURCE_GOLD)set I5I[GetPlayerId(BO[3])]=GetPlayerState(BO[3],PLAYER_STATE_RESOURCE_GOLD)set I5I[GetPlayerId(BO[4])]=GetPlayerState(BO[4],PLAYER_STATE_RESOURCE_GOLD)set I5I[GetPlayerId(BO[5])]=GetPlayerState(BO[5],PLAYER_STATE_RESOURCE_GOLD)set I5I[GetPlayerId(CO[1])]=GetPlayerState(CO[1],PLAYER_STATE_RESOURCE_GOLD)set I5I[GetPlayerId(CO[2])]=GetPlayerState(CO[2],PLAYER_STATE_RESOURCE_GOLD)set I5I[GetPlayerId(CO[3])]=GetPlayerState(CO[3],PLAYER_STATE_RESOURCE_GOLD)set I5I[GetPlayerId(CO[4])]=GetPlayerState(CO[4],PLAYER_STATE_RESOURCE_GOLD)set I5I[GetPlayerId(CO[5])]=GetPlayerState(CO[5],PLAYER_STATE_RESOURCE_GOLD)call SetPlayerState(BO[1],PLAYER_STATE_RESOURCE_GOLD,0)call SetPlayerState(BO[2],PLAYER_STATE_RESOURCE_GOLD,0)call SetPlayerState(BO[3],PLAYER_STATE_RESOURCE_GOLD,0)call SetPlayerState(BO[4],PLAYER_STATE_RESOURCE_GOLD,0)call SetPlayerState(BO[5],PLAYER_STATE_RESOURCE_GOLD,0)call SetPlayerState(CO[1],PLAYER_STATE_RESOURCE_GOLD,0)call SetPlayerState(CO[2],PLAYER_STATE_RESOURCE_GOLD,0)call SetPlayerState(CO[3],PLAYER_STATE_RESOURCE_GOLD,0)call SetPlayerState(CO[4],PLAYER_STATE_RESOURCE_GOLD,0)call SetPlayerState(CO[5],PLAYER_STATE_RESOURCE_GOLD,0)set t=CreateTrigger()call TriggerRegisterTimerEvent(t,15-TimerGetElapsed(M),false)call TriggerAddCondition(t,Condition(function J42))set t=nullendfunctionfunction J52 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MFI=GetTriggerEvalCount(t)local integer F21=20-(MFI-(MFI/20)*20)call LeaderboardSetLabel(IDI,"           "+GetObjectName(1848657242)+" "+I2S(F21))if MFI>125 thencall DestroyLeaderboard(IDI)call EJ2()call MZI(t)endifset t=nullreturn falseendfunctionfunction J62 takes nothing returns nothinglocal trigger t=CreateTrigger()call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function J52))set IDI=CreateLeaderboard()call LeaderboardSetStyle(IDI,true,false,false,false)call LeaderboardDisplay(IDI,false)call PlayerSetLeaderboard(BO[1],IDI)call PlayerSetLeaderboard(BO[2],IDI)call PlayerSetLeaderboard(BO[3],IDI)call PlayerSetLeaderboard(BO[4],IDI)call PlayerSetLeaderboard(BO[5],IDI)call PlayerSetLeaderboard(CO[1],IDI)call PlayerSetLeaderboard(CO[2],IDI)call PlayerSetLeaderboard(CO[3],IDI)call PlayerSetLeaderboard(CO[4],IDI)call PlayerSetLeaderboard(CO[5],IDI)set t=nullendfunctionfunction J72 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer X22=(LoadInteger(XY,(MKI),(25)))local player p1local player p2local player X32local player X42if X22==0 thenif I9I==1 thenset p1=BO[1]elseset p1=CO[1]endifcall PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(p1)]+(D30[GetPlayerId((p1))])+"|r"+" "+GetObjectName(1848653364))call SetPlayerState(p1,PLAYER_STATE_RESOURCE_GOLD,IAI[GetPlayerId(p1)])if GetLocalPlayer()==p1 thencall LeaderboardDisplay(IDI,true)elsecall LeaderboardDisplay(IDI,false)endifelseif X22==1 thenif I9I==1 thenset p1=CO[1]set p2=CO[2]set X32=BO[1]elseset p1=BO[1]set p2=BO[2]set X32=CO[1]endifcall S0I(X32)call PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(p1)]+(D30[GetPlayerId((p1))])+"|r"+" "+GetObjectName(1848653364))call PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(p2)]+(D30[GetPlayerId((p2))])+"|r"+" "+GetObjectName(1848653364))call SetPlayerState(p1,PLAYER_STATE_RESOURCE_GOLD,IAI[GetPlayerId(p1)])call SetPlayerState(p2,PLAYER_STATE_RESOURCE_GOLD,IAI[GetPlayerId(p2)])if GetLocalPlayer()==p1 or GetLocalPlayer()==p2 thencall LeaderboardDisplay(IDI,true)elsecall LeaderboardDisplay(IDI,false)endifelseif X22==2 thenif I9I==1 thenset p1=BO[2]set p2=BO[3]set X32=CO[1]set X42=CO[2]elseset p1=CO[2]set p2=CO[3]set X32=BO[1]set X42=BO[2]endifcall S0I(X32)call S0I(X42)call PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(p1)]+(D30[GetPlayerId((p1))])+"|r"+" "+GetObjectName(1848653364))call PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(p2)]+(D30[GetPlayerId((p2))])+"|r"+" "+GetObjectName(1848653364))call SetPlayerState(p1,PLAYER_STATE_RESOURCE_GOLD,IAI[GetPlayerId(p1)])call SetPlayerState(p2,PLAYER_STATE_RESOURCE_GOLD,IAI[GetPlayerId(p2)])if GetLocalPlayer()==p1 or GetLocalPlayer()==p2 thencall LeaderboardDisplay(IDI,true)elsecall LeaderboardDisplay(IDI,false)endifelseif X22==3 thenif I9I==1 thenset p1=CO[3]set p2=CO[4]set X32=BO[2]set X42=BO[3]elseset p1=BO[3]set p2=BO[4]set X32=CO[2]set X42=CO[3]endifcall S0I(X32)call S0I(X42)call PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(p1)]+(D30[GetPlayerId((p1))])+"|r"+" "+GetObjectName(1848653364))call PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(p2)]+(D30[GetPlayerId((p2))])+"|r"+" "+GetObjectName(1848653364))call SetPlayerState(p1,PLAYER_STATE_RESOURCE_GOLD,IAI[GetPlayerId(p1)])call SetPlayerState(p2,PLAYER_STATE_RESOURCE_GOLD,IAI[GetPlayerId(p2)])if GetLocalPlayer()==p1 or GetLocalPlayer()==p2 thencall LeaderboardDisplay(IDI,true)elsecall LeaderboardDisplay(IDI,false)endifelseif X22==4 thenif I9I==1 thenset p1=BO[4]set p2=BO[5]set X32=CO[3]set X42=CO[4]elseset p1=CO[4]set p2=CO[5]set X32=BO[3]set X42=BO[4]endifcall S0I(X32)call S0I(X42)call PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(p1)]+(D30[GetPlayerId((p1))])+"|r"+" "+GetObjectName(1848653364))call PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(p2)]+(D30[GetPlayerId((p2))])+"|r"+" "+GetObjectName(1848653364))call SetPlayerState(p1,PLAYER_STATE_RESOURCE_GOLD,IAI[GetPlayerId(p1)])call SetPlayerState(p2,PLAYER_STATE_RESOURCE_GOLD,IAI[GetPlayerId(p2)])if GetLocalPlayer()==p1 or GetLocalPlayer()==p2 thencall LeaderboardDisplay(IDI,true)elsecall LeaderboardDisplay(IDI,false)endifelseif X22==5 thenif I9I==1 thenset p1=CO[5]set X32=BO[4]set X42=BO[5]elseset p1=BO[5]set X32=CO[4]set X42=CO[5]endifcall S0I(X32)call S0I(X42)call PDI(bj_FORCE_ALL_PLAYERS,15.00,C0[GetPlayerId(p1)]+(D30[GetPlayerId((p1))])+"|r"+" "+GetObjectName(1848653364))call SetPlayerState(p1,PLAYER_STATE_RESOURCE_GOLD,IAI[GetPlayerId(p1)])if GetLocalPlayer()==p1 thencall LeaderboardDisplay(IDI,true)elsecall LeaderboardDisplay(IDI,false)endifelseif X22==6 thenif I9I==1 thenset X32=CO[5]elseset X32=BO[5]endifcall S0I(X32)call LeaderboardDisplay(IDI,false)call SuspendTimeOfDay(false)endifif X22>6 thenset ICI=truecall FlushChildHashtable(XY,(MKI))call MZI(t)elsecall SaveInteger(XY,(MKI),(25),(X22+1))endifset t=nullset p1=nullset p2=nullset X32=nullset X42=nullreturn falseendfunctionfunction J82 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local trigger J92=(LoadTriggerHandle(XY,(MKI),(169)))set TA0=truecall MZI(J92)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=CreateTrigger()call TriggerRegisterTimerEvent(t,20,true)call TriggerAddCondition(t,Condition(function J72))call SaveInteger(XY,(MKI),(25),(0))call SetPlayerState(BO[1],PLAYER_STATE_RESOURCE_GOLD,0)call SetPlayerState(CO[1],PLAYER_STATE_RESOURCE_GOLD,0)call EnableTrigger(EE0)call EnableTrigger(ON)set I9I=GetRandomInt(1,2)call PDI(bj_FORCE_ALL_PLAYERS,15.00," ")if I9I==1 thencall PDI(bj_FORCE_ALL_PLAYERS,15.00,GetObjectName(1848654159)+" "+GetObjectName(1848653131)+" "+C0[GetPlayerId(BO[0])]+GetObjectName(1848653365)+"|r"+" "+GetObjectName(1848653366))elsecall PDI(bj_FORCE_ALL_PLAYERS,15.00,GetObjectName(1848654159)+" "+GetObjectName(1848653131)+" "+C0[GetPlayerId(CO[0])]+GetObjectName(1848653379)+"|r"+" "+GetObjectName(1848653366))endifcall PDI(bj_FORCE_ALL_PLAYERS,15.00," ")call J62()call TriggerEvaluate(t)set t=nullset J92=nullreturn falseendfunctionfunction JA2 takes nothing returns booleanlocal unit N0I=GetSoldUnit()local string JB2=C0[GetPlayerId(GetOwningPlayer(GetSoldUnit()))]+(D30[GetPlayerId((GetOwningPlayer(GetSoldUnit())))])+"|r"call PDI(bj_FORCE_ALL_PLAYERS,20,JB2+" "+GetObjectName(1848654153)+" "+GetUnitName(N0I)+" "+GetObjectName(1848654158))call NPI(GetUnitTypeId(GetSoldUnit()))call E71("Ban"+I2S(GetPlayerId(GetOwningPlayer(GetSoldUnit()))),GetUnitTypeId(GetSoldUnit()))call RemoveUnit(GetSoldUnit())set N0I=nullreturn falseendfunctionfunction JC2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local trigger J92=CreateTrigger()local integer MKIlocal string JD2=C0[GetPlayerId(BO[1])]+(D30[GetPlayerId((BO[1]))])+"|r"local string JE2=C0[GetPlayerId(CO[1])]+(D30[GetPlayerId((CO[1]))])+"|r"call PDI(bj_FORCE_ALL_PLAYERS,20.00," ")call PDI(bj_FORCE_ALL_PLAYERS,20.00,JD2+" "+GetObjectName(1848654155))call PDI(bj_FORCE_ALL_PLAYERS,20.00,JE2+" "+GetObjectName(1848654155))call PDI(bj_FORCE_ALL_PLAYERS,20.00," ")call MZI(t)call Q9I(J92,EVENT_PLAYER_UNIT_SELL)call TriggerAddCondition(J92,Condition(function JA2))call SuspendTimeOfDay(true)call DisableTrigger(EE0)call DisableTrigger(ON)call SetPlayerState(BO[1],PLAYER_STATE_RESOURCE_GOLD,1000)call SetPlayerState(CO[1],PLAYER_STATE_RESOURCE_GOLD,1000)set t=CreateTrigger()set MKI=GetHandleId(t)call SaveTriggerHandle(XY,(MKI),(169),(J92))call TriggerRegisterTimerEvent(t,20,false)call TriggerAddCondition(t,Condition(function J82))set J92=nullset t=nullreturn falseendfunctionfunction HU2 takes nothing returns nothinglocal trigger tlocal location GP1=GetRectCenter(N4)local location GQ1=GetRectCenter(S4)local integer x=1loopexitwhen x>5if NYI(BO[x])thencall CreateUnitAtLoc(BO[x],1848651843,GQ1,bj_UNIT_FACING)endifif NYI(CO[x])thencall CreateUnitAtLoc(CO[x],1848651843,GP1,bj_UNIT_FACING)endifset x=x+1endloopcall RemoveLocation(GP1)call RemoveLocation(GQ1)set IBI=trueset UK=180set A3=falseset O3=falseset TA0=falsecall QXO()set IAI[GetPlayerId(BO[1])]=GetPlayerState(BO[1],PLAYER_STATE_RESOURCE_GOLD)set IAI[GetPlayerId(BO[2])]=GetPlayerState(BO[2],PLAYER_STATE_RESOURCE_GOLD)set IAI[GetPlayerId(BO[3])]=GetPlayerState(BO[3],PLAYER_STATE_RESOURCE_GOLD)set IAI[GetPlayerId(BO[4])]=GetPlayerState(BO[4],PLAYER_STATE_RESOURCE_GOLD)set IAI[GetPlayerId(BO[5])]=GetPlayerState(BO[5],PLAYER_STATE_RESOURCE_GOLD)set IAI[GetPlayerId(CO[1])]=GetPlayerState(CO[1],PLAYER_STATE_RESOURCE_GOLD)set IAI[GetPlayerId(CO[2])]=GetPlayerState(CO[2],PLAYER_STATE_RESOURCE_GOLD)set IAI[GetPlayerId(CO[3])]=GetPlayerState(CO[3],PLAYER_STATE_RESOURCE_GOLD)set IAI[GetPlayerId(CO[4])]=GetPlayerState(CO[4],PLAYER_STATE_RESOURCE_GOLD)set IAI[GetPlayerId(CO[5])]=GetPlayerState(CO[5],PLAYER_STATE_RESOURCE_GOLD)call SetPlayerState(BO[1],PLAYER_STATE_RESOURCE_GOLD,0)call SetPlayerState(BO[2],PLAYER_STATE_RESOURCE_GOLD,0)call SetPlayerState(BO[3],PLAYER_STATE_RESOURCE_GOLD,0)call SetPlayerState(BO[4],PLAYER_STATE_RESOURCE_GOLD,0)call SetPlayerState(BO[5],PLAYER_STATE_RESOURCE_GOLD,0)call SetPlayerState(CO[1],PLAYER_STATE_RESOURCE_GOLD,0)call SetPlayerState(CO[2],PLAYER_STATE_RESOURCE_GOLD,0)call SetPlayerState(CO[3],PLAYER_STATE_RESOURCE_GOLD,0)call SetPlayerState(CO[4],PLAYER_STATE_RESOURCE_GOLD,0)call SetPlayerState(CO[5],PLAYER_STATE_RESOURCE_GOLD,0)set t=CreateTrigger()call TriggerRegisterTimerEvent(t,15-TimerGetElapsed(M),false)call TriggerAddCondition(t,Condition(function JC2))set t=nullset GP1=nullset GQ1=nullendfunctionfunction JF2 takes nothing returns booleanlocal player NJIset G3=trueset NJI=BO[1]if(GetPlayerSlotState((NJI))==PLAYER_SLOT_STATE_EMPTY)==false and C3[GetPlayerId(NJI)]==false thencall T0I(NJI)endifset NJI=BO[2]if(GetPlayerSlotState((NJI))==PLAYER_SLOT_STATE_EMPTY)==false and C3[GetPlayerId(NJI)]==false thencall T0I(NJI)endifset NJI=BO[3]if(GetPlayerSlotState((NJI))==PLAYER_SLOT_STATE_EMPTY)==false and C3[GetPlayerId(NJI)]==false thencall T0I(NJI)endifset NJI=BO[4]if(GetPlayerSlotState((NJI))==PLAYER_SLOT_STATE_EMPTY)==false and C3[GetPlayerId(NJI)]==false thencall T0I(NJI)endifset NJI=BO[5]if(GetPlayerSlotState((NJI))==PLAYER_SLOT_STATE_EMPTY)==false and C3[GetPlayerId(NJI)]==false thencall T0I(NJI)endifset NJI=CO[1]if(GetPlayerSlotState((NJI))==PLAYER_SLOT_STATE_EMPTY)==false and C3[GetPlayerId(NJI)]==false thencall T0I(NJI)endifset NJI=CO[2]if(GetPlayerSlotState((NJI))==PLAYER_SLOT_STATE_EMPTY)==false and C3[GetPlayerId(NJI)]==false thencall T0I(NJI)endifset NJI=CO[3]if(GetPlayerSlotState((NJI))==PLAYER_SLOT_STATE_EMPTY)==false and C3[GetPlayerId(NJI)]==false thencall T0I(NJI)endifset NJI=CO[4]if(GetPlayerSlotState((NJI))==PLAYER_SLOT_STATE_EMPTY)==false and C3[GetPlayerId(NJI)]==false thencall T0I(NJI)endifset NJI=CO[5]if(GetPlayerSlotState((NJI))==PLAYER_SLOT_STATE_EMPTY)==false and C3[GetPlayerId(NJI)]==false thencall T0I(NJI)endifreturn falseendfunctionfunction JG2 takes nothing returns booleanset O3=falseset A3=falsecall SOI()return falseendfunctionfunction HP2 takes nothing returns nothinglocal integer MKI=2000local player array YS2local player array YT2local integer x=0local integer y=0local integer i=0local trigger t=CreateTrigger()set B3=truecall TriggerAddCondition(t,Condition(function JF2))call TriggerRegisterTimerEvent(t,60-TimerGetElapsed(M),false)set t=CreateTrigger()call TriggerAddCondition(t,Condition(function JG2))call TriggerRegisterTimerEvent(t,57-TimerGetElapsed(M),false)set t=nullif NYI(BO[1])thenset x=x+1set YS2[x]=BO[1]endifif NYI(BO[2])thenset x=x+1set YS2[x]=BO[2]endifif NYI(BO[3])thenset x=x+1set YS2[x]=BO[3]endifif NYI(BO[4])thenset x=x+1set YS2[x]=BO[4]endifif NYI(BO[5])thenset x=x+1set YS2[x]=BO[5]endifif NYI(CO[1])thenset y=y+1set YT2[y]=CO[1]endifif NYI(CO[2])thenset y=y+1set YT2[y]=CO[2]endifif NYI(CO[3])thenset y=y+1set YT2[y]=CO[3]endifif NYI(CO[4])thenset y=y+1set YT2[y]=CO[4]endifif NYI(CO[5])thenset y=y+1set YT2[y]=CO[5]endifset i=1loopexitwhen i>xcall SavePlayerHandle(XY,(2000),(550+GetPlayerId(YS2[i])),(YT2[i]))call SavePlayerHandle(XY,(2000),(550+GetPlayerId(YT2[i])),(YS2[i]))set i=i+1endloopendfunctionfunction JZ2 takes nothing returns nothingcall RKI(GetEnumUnit())endfunctionfunction JV2 takes unit N0I returns nothinglocal integer JW2=GetPlayerId(GetOwningPlayer(N0I))set KO[JW2]=UnitItemInSlot(N0I,0)set LO[JW2]=UnitItemInSlot(N0I,1)set NO[JW2]=UnitItemInSlot(N0I,2)set TO[JW2]=UnitItemInSlot(N0I,3)set PO[JW2]=UnitItemInSlot(N0I,4)set QO[JW2]=UnitItemInSlot(N0I,5)endfunctionfunction JX2 takes player T1I,player TOI returns integerlocal unit JY2=K1[GetPlayerId(T1I)]local unit JJ2=K1[GetPlayerId(TOI)]call UnitRemoveBuffs(JY2,true,true)call UnitRemoveBuffs(JJ2,true,true)if JY2==null and JJ2==null thencall PDI(bj_FORCE_ALL_PLAYERS,15,C0[GetPlayerId(BO[0])]+(D30[GetPlayerId((T1I))])+" "+GetObjectName(1848653367)+" "+(D30[GetPlayerId((TOI))])+" "+GetObjectName(1848656176)+"|r")elseif GetRandomInt(1,2)==1 thenif(JY2!=null)thenreturn GetUnitTypeId(JY2)elsereturn GetUnitTypeId(JJ2)endifelseif(JJ2!=null)thenreturn GetUnitTypeId(JJ2)elsereturn GetUnitTypeId(JY2)endifendifcall PDI(bj_FORCE_ALL_PLAYERS,15,C0[GetPlayerId(BO[0])]+(D30[GetPlayerId((T1I))])+" "+GetObjectName(1848653367)+" "+(D30[GetPlayerId((TOI))])+" "+GetObjectName(1848654146))return S6I()endfunctionfunction JK2 takes nothing returns nothingif(GetUnitTypeId(GetEnumUnit())==1848651828)thencall RemoveUnit(GetEnumUnit())endifif(GetUnitTypeId(GetEnumUnit())==1865429043)thencall RemoveUnit(GetEnumUnit())endifendfunctionfunction JL2 takes nothing returns booleanlocal integer SIIlocal group JM2=MDI()local unit JN2local location YJ2=GetRectCenter(O4)local location YK2=GetRectCenter(S3)local integer JS2=NNI(OO)local player array JT2local player array JR2local integer xlocal integer ylocal real JP2local real JQ2local real JU2local integer K02local group GK1=MDI()call GroupEnumUnitsInRect(GK1,GetWorldBounds(),Condition(function LWI))call ForGroup(GK1,function JK2)call MCI(GK1)set SII=1set x=1set y=1loopexitwhen SII>5if(NYI(BO[SII]))thencall JV2(K1[GetPlayerId(BO[SII])])call GroupAddUnit(JM2,K1[GetPlayerId(BO[SII])])set JT2[x]=BO[SII]set x=x+1endifif(NYI(CO[SII]))thencall JV2(K1[GetPlayerId(CO[SII])])call GroupAddUnit(JM2,K1[GetPlayerId(CO[SII])])set JR2[y]=CO[SII]set y=y+1endifset SII=SII+1endloopset x=1loopexitwhen x>JS2set K02=JX2(JT2[x],JR2[x])if(K1[GetPlayerId(JT2[x])]==null)thenset JP2=GetLocationX(YJ2)+GetRandomReal(1,40)set JQ2=GetLocationY(YJ2)+GetRandomReal(1,40)set JU2=270elseset JP2=GetUnitX(K1[GetPlayerId(JT2[x])])set JQ2=GetUnitY(K1[GetPlayerId(JT2[x])])set JU2=GetUnitFacing(K1[GetPlayerId(JT2[x])])call SetUnitPathing(K1[GetPlayerId(JT2[x])],false)endifset K1[GetPlayerId(JT2[x])]=CreateUnit(JT2[x],K02,JP2,JQ2,JU2)call SetUnitPathing(K1[GetPlayerId(JT2[x])],false)call SetUnitPosition(K1[GetPlayerId(JT2[x])],JP2,JQ2)call UnitAddItem(K1[GetPlayerId(JT2[x])],KO[GetPlayerId(JT2[x])])call UnitAddItem(K1[GetPlayerId(JT2[x])],LO[GetPlayerId(JT2[x])])call UnitAddItem(K1[GetPlayerId(JT2[x])],NO[GetPlayerId(JT2[x])])call UnitAddItem(K1[GetPlayerId(JT2[x])],TO[GetPlayerId(JT2[x])])call UnitAddItem(K1[GetPlayerId(JT2[x])],PO[GetPlayerId(JT2[x])])call UnitAddItem(K1[GetPlayerId(JT2[x])],QO[GetPlayerId(JT2[x])])call ClearSelectionForPlayer(JT2[x])call SelectUnitAddForPlayer(K1[GetPlayerId(JT2[x])],JT2[x])call PanCameraToTimedForPlayer(JT2[x],JP2,JQ2,0)call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Awaken\\Awaken.mdl",JP2,JQ2))if(K1[GetPlayerId(JR2[x])]==null)thenset JP2=GetLocationX(YK2)set JQ2=GetLocationY(YK2)set JU2=270elseset JP2=GetUnitX(K1[GetPlayerId(JR2[x])])set JQ2=GetUnitY(K1[GetPlayerId(JR2[x])])set JU2=GetUnitFacing(K1[GetPlayerId(JR2[x])])call SetUnitPathing(K1[GetPlayerId(JR2[x])],false)endifset K1[GetPlayerId(JR2[x])]=CreateUnit(JR2[x],K02,JP2,JQ2,JU2)call SetUnitPathing(K1[GetPlayerId(JR2[x])],false)call SetUnitPosition(K1[GetPlayerId(JR2[x])],JP2,JQ2)call UnitAddItem(K1[GetPlayerId(JR2[x])],KO[GetPlayerId(JR2[x])])call UnitAddItem(K1[GetPlayerId(JR2[x])],LO[GetPlayerId(JR2[x])])call UnitAddItem(K1[GetPlayerId(JR2[x])],NO[GetPlayerId(JR2[x])])call UnitAddItem(K1[GetPlayerId(JR2[x])],TO[GetPlayerId(JR2[x])])call UnitAddItem(K1[GetPlayerId(JR2[x])],PO[GetPlayerId(JR2[x])])call UnitAddItem(K1[GetPlayerId(JR2[x])],QO[GetPlayerId(JR2[x])])call ClearSelectionForPlayer(JR2[x])call SelectUnitAddForPlayer(K1[GetPlayerId(JR2[x])],JR2[x])call PanCameraToTimedForPlayer(JR2[x],JP2,JQ2,0)call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Awaken\\Awaken.mdl",JP2,JQ2))set x=x+1endloopcall ForGroup(JM2,function JZ2)call MCI(JM2)set x=1loopexitwhen x>JS2call SetUnitPathing(K1[GetPlayerId(JT2[x])],true)call SetUnitPathing(K1[GetPlayerId(JR2[x])],true)set x=x+1endloopcall RemoveLocation(YJ2)call RemoveLocation(YK2)set JM2=nullset JN2=nullset YJ2=nullset YK2=nullset GK1=nullreturn falseendfunctionfunction KI2 takes nothing returns booleanset D2=truereturn falseendfunctionfunction K12 takes nothing returns booleanset A3=falseset O3=falsecall SOI()return falseendfunctionfunction HV2 takes nothing returns nothinglocal trigger t=CreateTrigger()call PDI(P2,10,GetObjectName(1848654152))call PDI(P2,10,GetObjectName(1848654149))set E2=truecall NPI(1211117641)call TriggerRegisterTimerEvent(t,60-TimerGetElapsed(M),false)call TriggerAddCondition(t,Condition(function JL2))set t=CreateTrigger()call TriggerAddCondition(t,Condition(function K12))call TriggerRegisterTimerEvent(t,57-TimerGetElapsed(M),false)set t=CreateTrigger()call TriggerRegisterTimerEvent(t,55+60-TimerGetElapsed(M),false)call TriggerAddCondition(t,Condition(function KI2))set t=nullendfunctionfunction HR2 takes nothing returns nothinglocal location GP1=GetRectCenter(F4)local location GQ1=GetRectCenter(E4)local location YJ2=GetRectCenter(O4)local location YK2=GetRectCenter(S3)local integer SIIlocal integer S1Ilocal integer S7Iif not F2 thencall SOI()endifset J0=trueset T0=400set O3=falsecall PanCameraToTimedLocForPlayer(BO[1],YJ2,0)call PanCameraToTimedLocForPlayer(BO[2],YJ2,0)call PanCameraToTimedLocForPlayer(BO[3],YJ2,0)call PanCameraToTimedLocForPlayer(BO[4],YJ2,0)call PanCameraToTimedLocForPlayer(BO[5],YJ2,0)call PanCameraToTimedLocForPlayer(CO[1],YK2,0)call PanCameraToTimedLocForPlayer(CO[2],YK2,0)call PanCameraToTimedLocForPlayer(CO[3],YK2,0)call PanCameraToTimedLocForPlayer(CO[4],YK2,0)call PanCameraToTimedLocForPlayer(CO[5],YK2,0)if Y2 thenif NZI(WO)thenloopset S7I=GetRandomInt(D90,DA0)exitwhen R[S7I]==falseendloopset K1[GetPlayerId(WO)]=CreateUnit(WO,D70[S7I],GetLocationX(GP1),GetLocationY(GP1),270)elseloopset S7I=GetRandomInt(DB0,DC0)exitwhen R[S7I]==falseendloopset K1[GetPlayerId(WO)]=CreateUnit(WO,D70[S7I],GetLocationX(GQ1),GetLocationY(GQ1),270)endifcall RemoveLocation(GP1)call RemoveLocation(GQ1)call RemoveLocation(YJ2)call RemoveLocation(YK2)returnendifset A3=falseset SII=1set S1I=5loopexitwhen SII>S1Iset K1[GetPlayerId(BO[SII])]=nullif(NYI(BO[SII]))thenloopset S7I=GetRandomInt(D90,DA0)if(R[S7I]==false)thenif not F2 thenset R[S7I]=trueendifset K1[GetPlayerId(BO[SII])]=CreateUnitAtLoc(BO[SII],D70[S7I],GP1,bj_UNIT_FACING)endifexitwhen(K1[GetPlayerId(BO[SII])]!=null)endloopendifset SII=SII+1endloopset SII=1set S1I=5loopexitwhen SII>S1Iset K1[GetPlayerId(CO[SII])]=nullif(NYI(CO[SII]))thenloopset S7I=GetRandomInt(DB0,DC0)if(R[S7I]==false)thenif not F2 thenset R[S7I]=trueendifset K1[GetPlayerId(CO[SII])]=CreateUnitAtLoc(CO[SII],D70[S7I],GQ1,bj_UNIT_FACING)endifexitwhen(K1[GetPlayerId(CO[SII])]!=null)endloopendifset SII=SII+1endloopset A3=truecall RemoveLocation(GP1)call RemoveLocation(GQ1)call RemoveLocation(YJ2)call RemoveLocation(YK2)endfunctionfunction K32 takes nothing returns nothingset GL=truecall PDI(bj_FORCE_ALL_PLAYERS,10,GetObjectName(1848653387)+" "+GetObjectName(1848653388))call DisableTrigger(GetTriggeringTrigger())endfunctionfunction K42 takes nothing returns nothinglocal integer K52=S2I(SubString(GetEventPlayerChatString(),6,StringLength(GetEventPlayerChatString())))if K52>HL thencall R1I(WO,GetObjectName(1848652611))elseif K52<10 thencall R1I(WO,GetObjectName(1848652361))elseset HL=K52call PDI(bj_FORCE_ALL_PLAYERS,10,GetObjectName(1848653400)+" "+I2S(HL)+" "+GetObjectName(1848653390))call DisableTrigger(GetTriggeringTrigger())endifendfunctionfunction K62 takes nothing returns nothingcall DisableTrigger((LoadTriggerHandle(XY,(GetHandleId(GetTriggeringTrigger())),(170))))call DisableTrigger((LoadTriggerHandle(XY,(GetHandleId(GetTriggeringTrigger())),(171))))call DisableTrigger(GetTriggeringTrigger())endfunctionfunction K72 takes nothing returns nothinglocal trigger K82=CreateTrigger()local trigger K92=CreateTrigger()local trigger nd=CreateTrigger()set HL=RSI(DA0,DC0-DB0+1)call PDI(bj_FORCE_ALL_PLAYERS,10.00," ")call PDI(bj_FORCE_ALL_PLAYERS,10.00,GetObjectName(1848653391)+" -nd "+GetObjectName(1848653367)+" -lives xx "+GetObjectName(1848653393))call PDI(bj_FORCE_ALL_PLAYERS,10.00,GetObjectName(1848653360)+" "+I2S(HL))call TriggerRegisterTimerEvent(K82,15,false)call TriggerAddAction(K82,function K62)call SaveTriggerHandle(XY,(GetHandleId(K82)),(170),(nd))call SaveTriggerHandle(XY,(GetHandleId(K82)),(171),(K92))call TriggerRegisterPlayerChatEvent(nd,WO,"-nd",true)call TriggerAddAction(nd,function K32)call TriggerRegisterPlayerChatEvent(K92,WO,"-lives",false)call TriggerAddAction(K92,function K42)endfunctionfunction KA2 takes nothing returns nothinglocal integer KB2=(LoadInteger(XY,(GetHandleId(GetTriggeringTrigger())),(173)))local integer SIIlocal integer S1Ilocal integer S7Ilocal integer USIlocal location GP1=GetRectCenter(N4)local location GQ1=GetRectCenter(S4)if Q2 thenreturnendifif NZI(Player(KB2))thenset SII=D90set S1I=DA0set USI=0elseset SII=DB0set S1I=DC0set USI=1endifif K0 thenset SII=D90set S1I=DC0if NZI(Player(KB2))thencall CreateUnitAtLoc(Player(KB2),1848651843,GP1,bj_UNIT_FACING)call CreateUnitAtLoc(Player(KB2),1848651843,GQ1,bj_UNIT_FACING)elsecall CreateUnitAtLoc(Player(KB2),1848651843,GP1,bj_UNIT_FACING)call CreateUnitAtLoc(Player(KB2),1848651843,GQ1,bj_UNIT_FACING)endifelseset SII=D90set S1I=DC0if NZI(Player(KB2))thencall CreateUnitAtLoc(Player(KB2),1848651843,GP1,bj_UNIT_FACING)elsecall CreateUnitAtLoc(Player(KB2),1848651843,GQ1,bj_UNIT_FACING)endifendifif not Y0 thenloopexitwhen SII>S1Iif R[SII]==false thencall SetPlayerTechMaxAllowed(Player(KB2),D70[SII],1)endifset SII=SII+1endloopif(GetPlayerState(Player(KB2),PLAYER_STATE_RESOURCE_GOLD)<250)thencall SetPlayerState(Player(KB2),PLAYER_STATE_RESOURCE_GOLD,250)endifelseif(T1[USI]<HL)thenset K1[KB2]=nullif NYI(Player(KB2))thenloopset S7I=S6I()if R[S7I]==false thenset R[S7I]=trueif NZI(Player(KB2))thenset K1[KB2]=CreateUnitAtLoc(Player(KB2),D70[S7I],GP1,bj_UNIT_FACING)elseset K1[KB2]=CreateUnitAtLoc(Player(KB2),D70[S7I],GQ1,bj_UNIT_FACING)endifendifexitwhen K1[KB2]!=nullendloopendifendifcall RemoveLocation(GP1)call RemoveLocation(GQ1)if not Y0 thenendifendfunctionfunction HZ2 takes nothing returns nothinglocal location O4Olocal real KC2local trigger tlocal integer KD2local integer xset X0=truecall NPI(1211117641)set x=1loopexitwhen x>5set KD2=GetPlayerId(BO[x])set t=CreateTrigger()call TriggerRegisterTimerExpireEvent(t,F0[KD2])call TriggerAddAction(t,function KA2)call SaveInteger(XY,(GetHandleId(t)),(173),(KD2))set KD2=GetPlayerId(CO[x])set t=CreateTrigger()call TriggerRegisterTimerExpireEvent(t,F0[KD2])call TriggerAddAction(t,function KA2)call SaveInteger(XY,(GetHandleId(t)),(173),(KD2))set x=x+1endloopcall UnitRemoveAbility(CK0,1096906593)call UnitRemoveAbility(CL0,1096906593)call UnitRemoveAbility(CM0,1096906593)call UnitRemoveAbility(CN0,1096906593)call UnitRemoveAbility(CS0,1096906593)call UnitRemoveAbility(CT0,1096906593)call UnitRemoveAbility(CR0,1096906593)call UnitRemoveAbility(CP0,1096906593)call UnitRemoveAbility(CQ0,1096906593)call UnitRemoveAbility(CU0,1096906593)call ExecuteFunc("K72")endfunctionfunction ZO2 takes nothing returns nothinglocal integer Y52=GetRandomInt(1,4)set G2=trueif(Y52==1)thencall PDI(bj_FORCE_ALL_PLAYERS,20.00,GetObjectName(1848657476))call PDI(bj_FORCE_ALL_PLAYERS,20.00," ")call ExecuteFunc("ZI2")endifif(Y52==2)thencall PDI(bj_FORCE_ALL_PLAYERS,20.00,GetObjectName(1848657477))call PDI(bj_FORCE_ALL_PLAYERS,20.00," ")call ExecuteFunc("Z12")endifif(Y52==3)thencall PDI(bj_FORCE_ALL_PLAYERS,20.00,GetObjectName(1848657483))call PDI(bj_FORCE_ALL_PLAYERS,20.00," ")call ExecuteFunc("HS2")endifif(Y52==4)thencall PDI(bj_FORCE_ALL_PLAYERS,20.00,GetObjectName(1848657485))call PDI(bj_FORCE_ALL_PLAYERS,20.00," ")call ExecuteFunc("HY2")call ExecuteFunc("HN2")endifendfunctionfunction HM2 takes nothing returns nothingset F2=truecall NPI(1211117641)call NPI(1311788373)endfunctionfunction HF2 takes nothing returns nothinglocal integer GR1=NNI(OO)local integer GT1=NNI(AO)local integer P1I=GR1+GT1local integer SIIlocal integer KG2local integer xlocal integer ylocal integer zlocal player array KH2local player array KZ2local integer wlocal integer KV2local integer KW2local location YJ2=GetRectCenter(O4)local location YK2=GetRectCenter(S3)local location GP1=GetRectCenter(N4)local location GQ1=GetRectCenter(S4)set FO=truecall P01(BO[1])call P01(BO[2])call P01(BO[3])call P01(BO[4])call P01(BO[5])call P01(CO[1])call P01(CO[2])call P01(CO[3])call P01(CO[4])call P01(CO[5])set x=1loopexitwhen x>5if NYI(BO[x])thencall CreateUnitAtLoc(BO[x],1848651843,GP1,bj_UNIT_FACING)call CreateUnitAtLoc(BO[x],1848651843,GQ1,bj_UNIT_FACING)endifif NYI(CO[x])thencall CreateUnitAtLoc(CO[x],1848651843,GP1,bj_UNIT_FACING)call CreateUnitAtLoc(CO[x],1848651843,GQ1,bj_UNIT_FACING)endifset x=x+1endloopcall RemoveLocation(GP1)call RemoveLocation(GQ1)set KV2=GetPlayerState(BO[1],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(BO[2],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(BO[3],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(BO[4],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(BO[5],PLAYER_STATE_RESOURCE_GOLD)set KW2=GetPlayerState(CO[1],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(CO[2],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(CO[3],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(CO[4],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(CO[5],PLAYER_STATE_RESOURCE_GOLD)set KH2[1]=nullset KH2[2]=nullset KH2[3]=nullset KH2[4]=nullset KH2[5]=nullset KH2[6]=nullset KH2[7]=nullset KH2[8]=nullset KH2[9]=nullset KH2[10]=nullset z=1set w=1set SII=1loopexitwhen SII>5if(NYI(BO[SII]))thenset KH2[w]=BO[SII]set w=w+1elseset KZ2[z]=BO[SII]set z=z+1endifset SII=SII+1endloopset SII=1loopexitwhen SII>5if(NYI(CO[SII]))thenset KH2[w]=CO[SII]set w=w+1elseset KZ2[z]=CO[SII]set z=z+1endifset SII=SII+1endloopset BO[1]=nullset BO[2]=nullset BO[3]=nullset BO[4]=nullset BO[5]=nullset CO[1]=nullset CO[2]=nullset CO[3]=nullset CO[4]=nullset CO[5]=nullset SII=1loopexitwhen SII>(P1I/2)set KG2=GetRandomInt(1,P1I)if(KH2[KG2]!=null)thenset BO[SII]=KH2[KG2]set KH2[KG2]=nullset SII=SII+1endifendloopset x=SIIset SII=1loopexitwhen SII>P1I-x+1set KG2=GetRandomInt(1,P1I)if(KH2[KG2]!=null)thenset CO[SII]=KH2[KG2]set KH2[KG2]=nullset SII=SII+1endifendloopset z=SIIset SII=xset y=1loopexitwhen SII>5set BO[SII]=KZ2[y]set y=y+1set SII=SII+1endloopset SII=zloopexitwhen SII>5set CO[SII]=KZ2[y]set y=y+1set SII=SII+1endloopset SII=0loopexitwhen SII>5set SII=SII+1endloopcall SetPlayerTeam(BO[0],0)call SetPlayerTeam(BO[1],0)call SetPlayerTeam(BO[2],0)call SetPlayerTeam(BO[3],0)call SetPlayerTeam(BO[4],0)call SetPlayerTeam(BO[5],0)call SetPlayerTeam(CO[0],1)call SetPlayerTeam(CO[1],1)call SetPlayerTeam(CO[2],1)call SetPlayerTeam(CO[3],1)call SetPlayerTeam(CO[4],1)call SetPlayerTeam(CO[5],1)call GV1()set x=0set y=0loopexitwhen x>5loopexitwhen y>5call SetPlayerAllianceStateBJ(BO[x],BO[y],3)call SetPlayerAllianceStateBJ(CO[x],CO[y],3)call SetPlayerAllianceStateBJ(BO[x],CO[y],0)call SetPlayerAllianceStateBJ(CO[x],BO[y],0)set y=y+1endloopset y=0set x=x+1endloopcall ForceClear(OO)call ForceClear(AO)call ForceAddPlayer(OO,BO[0])call ForceAddPlayer(OO,BO[1])call ForceAddPlayer(OO,BO[2])call ForceAddPlayer(OO,BO[3])call ForceAddPlayer(OO,BO[4])call ForceAddPlayer(OO,BO[5])call ForceAddPlayer(AO,CO[0])call ForceAddPlayer(AO,CO[1])call ForceAddPlayer(AO,CO[2])call ForceAddPlayer(AO,CO[3])call ForceAddPlayer(AO,CO[4])call ForceAddPlayer(AO,CO[5])call ExecuteFunc("GW1")call SAO()set GR1=NNI(OO)set GT1=NNI(AO)set SII=1loopexitwhen SII>5if(NYI(BO[SII]))thencall SetPlayerStateBJ(BO[SII],PLAYER_STATE_RESOURCE_GOLD,(4375/GR1))call SetPlayerStateBJ(BO[SII],PLAYER_STATE_RESOURCE_LUMBER,0)endifif(NYI(CO[SII]))thencall SetPlayerStateBJ(CO[SII],PLAYER_STATE_RESOURCE_GOLD,(4375/GT1))call SetPlayerStateBJ(CO[SII],PLAYER_STATE_RESOURCE_LUMBER,0)endifset SII=SII+1endloopif C2 thenset x=0loopexitwhen x>5call SetPlayerAlliance(Player(0),BO[x],ConvertAllianceType(0),true)call SetPlayerAlliance(Player(0),BO[x],ConvertAllianceType(4),true)call SetPlayerAlliance(Player(0),CO[x],ConvertAllianceType(0),false)call SetPlayerAlliance(Player(0),CO[x],ConvertAllianceType(4),false)set x=x+1endloopendifcall GZ1()set YJ2=nullset YK2=nullset GP1=nullset GQ1=nullendfunctionfunction HG2 takes nothing returns nothinglocal integer GR1=NNI(OO)local integer GT1=NNI(AO)local integer P1I=GR1+GT1local integer SIIlocal integer KG2local integer xlocal integer ylocal integer zlocal player array KH2local player array KZ2local integer wlocal integer KV2local integer KW2local location YJ2local location YK2local location GP1local location GQ1local integer KY2set KY2=GetRandomInt(1,2)call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10,GetObjectName(1848657753))if KY2==1 thenreturnendifset IEI=trueset YJ2=GetRectCenter(O4)set YK2=GetRectCenter(S3)set GP1=GetRectCenter(N4)set GQ1=GetRectCenter(S4)call P01(BO[1])call P01(BO[2])call P01(BO[3])call P01(BO[4])call P01(BO[5])call P01(CO[1])call P01(CO[2])call P01(CO[3])call P01(CO[4])call P01(CO[5])set x=1loopexitwhen x>5if NYI(BO[x])thencall CreateUnitAtLoc(BO[x],1848651843,GP1,bj_UNIT_FACING)call CreateUnitAtLoc(BO[x],1848651843,GQ1,bj_UNIT_FACING)endifif NYI(CO[x])thencall CreateUnitAtLoc(CO[x],1848651843,GP1,bj_UNIT_FACING)call CreateUnitAtLoc(CO[x],1848651843,GQ1,bj_UNIT_FACING)endifset x=x+1endloopcall RemoveLocation(GP1)call RemoveLocation(GQ1)set KV2=GetPlayerState(BO[1],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(BO[2],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(BO[3],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(BO[4],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(BO[5],PLAYER_STATE_RESOURCE_GOLD)set KW2=GetPlayerState(CO[1],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(CO[2],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(CO[3],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(CO[4],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(CO[5],PLAYER_STATE_RESOURCE_GOLD)set KH2[1]=BO[1]set KH2[2]=BO[2]set KH2[3]=BO[3]set KH2[4]=BO[4]set KH2[5]=BO[5]set KH2[6]=CO[1]set KH2[7]=CO[2]set KH2[8]=CO[3]set KH2[9]=CO[4]set KH2[10]=CO[5]set BO[1]=KH2[6]set BO[2]=KH2[7]set BO[3]=KH2[8]set BO[4]=KH2[9]set BO[5]=KH2[10]set CO[1]=KH2[1]set CO[2]=KH2[2]set CO[3]=KH2[3]set CO[4]=KH2[4]set CO[5]=KH2[5]call SetPlayerTeam(BO[0],0)call SetPlayerTeam(BO[1],0)call SetPlayerTeam(BO[2],0)call SetPlayerTeam(BO[3],0)call SetPlayerTeam(BO[4],0)call SetPlayerTeam(BO[5],0)call SetPlayerTeam(CO[0],1)call SetPlayerTeam(CO[1],1)call SetPlayerTeam(CO[2],1)call SetPlayerTeam(CO[3],1)call SetPlayerTeam(CO[4],1)call SetPlayerTeam(CO[5],1)call GV1()set x=0set y=0loopexitwhen x>5loopexitwhen y>5call SetPlayerAllianceStateBJ(BO[x],BO[y],3)call SetPlayerAllianceStateBJ(CO[x],CO[y],3)call SetPlayerAllianceStateBJ(BO[x],CO[y],0)call SetPlayerAllianceStateBJ(CO[x],BO[y],0)set y=y+1endloopset y=0set x=x+1endloopcall ForceClear(OO)call ForceClear(AO)call ForceAddPlayer(OO,BO[0])call ForceAddPlayer(OO,BO[1])call ForceAddPlayer(OO,BO[2])call ForceAddPlayer(OO,BO[3])call ForceAddPlayer(OO,BO[4])call ForceAddPlayer(OO,BO[5])call ForceAddPlayer(AO,CO[0])call ForceAddPlayer(AO,CO[1])call ForceAddPlayer(AO,CO[2])call ForceAddPlayer(AO,CO[3])call ForceAddPlayer(AO,CO[4])call ForceAddPlayer(AO,CO[5])call ExecuteFunc("GW1")set GR1=NNI(OO)set GT1=NNI(AO)set SII=1loopexitwhen SII>5if(NYI(BO[SII]))thencall SetPlayerStateBJ(BO[SII],PLAYER_STATE_RESOURCE_GOLD,(4375/GR1))call SetPlayerStateBJ(BO[SII],PLAYER_STATE_RESOURCE_LUMBER,0)endifif(NYI(CO[SII]))thencall SetPlayerStateBJ(CO[SII],PLAYER_STATE_RESOURCE_GOLD,(4375/GT1))call SetPlayerStateBJ(CO[SII],PLAYER_STATE_RESOURCE_LUMBER,0)endifset SII=SII+1endloopcall PanCameraToTimedLocForPlayer(BO[1],YJ2,0)call PanCameraToTimedLocForPlayer(BO[2],YJ2,0)call PanCameraToTimedLocForPlayer(BO[3],YJ2,0)call PanCameraToTimedLocForPlayer(BO[4],YJ2,0)call PanCameraToTimedLocForPlayer(BO[5],YJ2,0)call PanCameraToTimedLocForPlayer(CO[1],YK2,0)call PanCameraToTimedLocForPlayer(CO[2],YK2,0)call PanCameraToTimedLocForPlayer(CO[3],YK2,0)call PanCameraToTimedLocForPlayer(CO[4],YK2,0)call PanCameraToTimedLocForPlayer(CO[5],YK2,0)call DestroyFogModifier(CreateFogModifierRectBJ(true,BO[1],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))call DestroyFogModifier(CreateFogModifierRectBJ(true,BO[2],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))call DestroyFogModifier(CreateFogModifierRectBJ(true,BO[3],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))call DestroyFogModifier(CreateFogModifierRectBJ(true,BO[4],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))call DestroyFogModifier(CreateFogModifierRectBJ(true,BO[5],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))call DestroyFogModifier(CreateFogModifierRectBJ(true,CO[1],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))call DestroyFogModifier(CreateFogModifierRectBJ(true,CO[2],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))call DestroyFogModifier(CreateFogModifierRectBJ(true,CO[3],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))call DestroyFogModifier(CreateFogModifierRectBJ(true,CO[4],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))call DestroyFogModifier(CreateFogModifierRectBJ(true,CO[5],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))if C2 thenset x=0loopexitwhen x>5call SetPlayerAlliance(Player(0),BO[x],ConvertAllianceType(0),true)call SetPlayerAlliance(Player(0),BO[x],ConvertAllianceType(4),true)call SetPlayerAlliance(Player(0),CO[x],ConvertAllianceType(0),false)call SetPlayerAlliance(Player(0),CO[x],ConvertAllianceType(4),false)set x=x+1endloopendifcall GZ1()call SAO()set YJ2=nullset YK2=nullset GP1=nullset GQ1=nullendfunctionfunction HX2 takes nothing returns nothinglocal integer SIIlocal integer S1Iset H2=trueset SII=1set S1I=DZ0loopexitwhen SII>S1Icall NPI(DH0[SII])set SII=SII+1endloopset SII=1set S1I=DG0loopexitwhen SII>S1Icall NPI(DF0[SII])set SII=SII+1endloopendfunctionfunction KK2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer NOI=(LoadInteger(XY,(MKI),(172)))local player NJIlocal integer x=1loopexitwhen x>5set NJI=BO[x]if NYI(NJI)and NJI!=WO thenset K1[GetPlayerId(NJI)]=CreateUnit(NJI,NOI,GetRectCenterX(O4),GetRectCenterY(O4),270)endifset NJI=CO[x]if NYI(NJI)and NJI!=WO thenset K1[GetPlayerId(NJI)]=CreateUnit(NJI,NOI,GetRectCenterX(S3),GetRectCenterY(S3),270)endifset x=x+1endloopcall FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset NJI=nullreturn falseendfunctionfunction KL2 takes nothing returns nothinglocal integer x=1local player NJIlocal unit N0I=GetTriggerUnit()local integer NOI=GetUnitTypeId(N0I)local trigger tlocal integer MKIif(GetOwningPlayer(N0I)==WO and IsUnitType(N0I,UNIT_TYPE_HERO)==true)thencall DisableTrigger(GetTriggeringTrigger())if S0[GetPlayerId(WO)]==false and Y0==false and J0==false thencall SetPlayerState(WO,PLAYER_STATE_RESOURCE_GOLD,250+GetPlayerState(WO,PLAYER_STATE_RESOURCE_GOLD))endifset D0[GetPlayerId(WO)]=trueset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.01,false)call TriggerAddCondition(t,Condition(function KK2))call SaveInteger(XY,(MKI),(172),(NOI))endifset NJI=nullset N0I=nullset t=nullendfunctionfunction HW2 takes nothing returns nothinglocal integer x=1local trigger t=CreateTrigger()local region r=CreateRegion()set Y2=truecall NPI(1211117641)call NPI(1311788373)loopexitwhen x>5if(BO[x]!=WO)thencall S0I(BO[x])set S0[GetPlayerId(BO[x])]=trueset D0[GetPlayerId(BO[x])]=trueendifif(CO[x]!=WO)thencall S0I(CO[x])set S0[GetPlayerId(CO[x])]=trueset D0[GetPlayerId(CO[x])]=trueendifset x=x+1endloopcall RegionAddRect(r,bj_mapInitialPlayableArea)call TriggerRegisterEnterRegion(t,r,Condition(function LWI))call TriggerAddAction(t,function KL2)endfunctionfunction HJ2 takes nothing returns nothinglocal integer SIIlocal integer S1Iset V2=trueset SII=1set S1I=DZ0loopexitwhen SII>S1Icall NPI(DH0[SII])set SII=SII+1endloopset SII=1set S1I=DE0loopexitwhen SII>S1Icall NPI(DD0[SII])set SII=SII+1endloopendfunctionfunction HY2 takes nothing returns nothinglocal integer SIIlocal integer S1Iset Z2=trueset SII=1set S1I=DE0loopexitwhen SII>S1Icall NPI(DD0[SII])set SII=SII+1endloopset SII=1set S1I=DG0loopexitwhen SII>S1Icall NPI(DF0[SII])set SII=SII+1endloopendfunctionfunction HL2 takes nothing returns nothinglocal integer SIIlocal integer S1Iset IFI=trueset SII=1set S1I=DW0loopexitwhen SII>S1Icall NPI(DV0[SII])set SII=SII+1endloopendfunctionfunction HK2 takes nothing returns nothinglocal integer SIIlocal integer S1Iset IGI=trueset SII=1set S1I=DY0loopexitwhen SII>S1Icall NPI(DX0[SII])set SII=SII+1endloopendfunctionfunction Z22 takes nothing returns nothingset L0=trueendfunctionfunction Z52 takes nothing returns nothingset R0=truecall SetPlayerTechResearched(BO[0],1378889780,1)call SetPlayerTechResearched(CO[0],1378889780,1)call SetPlayerHandicapXP(BO[1],1.5)call SetPlayerHandicapXP(BO[2],1.5)call SetPlayerHandicapXP(BO[3],1.5)call SetPlayerHandicapXP(BO[4],1.5)call SetPlayerHandicapXP(BO[5],1.5)call SetPlayerHandicapXP(CO[1],1.5)call SetPlayerHandicapXP(CO[2],1.5)call SetPlayerHandicapXP(CO[3],1.5)call SetPlayerHandicapXP(CO[4],1.5)call SetPlayerHandicapXP(CO[5],1.5)endfunctionfunction Z32 takes nothing returns nothingset P0=truecall DisableTrigger(YM0)endfunctionfunction Z42 takes nothing returns nothingset Q0=trueendfunctionfunction KU2 takes nothing returns nothingset IZI=falsecall PDI(bj_FORCE_ALL_PLAYERS,10,GetObjectName(1848657985))call DisableTrigger(GetTriggeringTrigger())endfunctionfunction L02 takes nothing returns nothingcall DisableTrigger((LoadTriggerHandle(XY,(GetHandleId(GetTriggeringTrigger())),(174))))call DisableTrigger(GetTriggeringTrigger())endfunctionfunction LI2 takes nothing returns nothinglocal trigger K82=CreateTrigger()local trigger nn=CreateTrigger()call PDI(bj_FORCE_ALL_PLAYERS,10.00," ")call PDI(bj_FORCE_ALL_PLAYERS,10.00,"Extra commands: -noneutrals can be entered in the following 15 seconds. ")call TriggerRegisterTimerEvent(K82,15,false)call TriggerAddAction(K82,function L02)call SaveTriggerHandle(XY,(GetHandleId(K82)),(174),(nn))call TriggerRegisterPlayerChatEvent(nn,WO,"-noneutrals",true)call TriggerAddAction(nn,function KU2)endfunctionfunction Z62 takes nothing returns nothingset IHI=truecall ExecuteFunc("LI2")endfunctionfunction Z72 takes nothing returns nothingset IVI=trueendfunctionfunction HH2 takes nothing returns nothingset IWI=trueendfunctionfunction Z92 takes nothing returns nothingset IXI=trueendfunctionfunction Z82 takes nothing returns nothingset IYI=trueendfunctionfunction ZB2 takes nothing returns nothingset BL=trueset CL=falseendfunctionfunction ZC2 takes nothing returns nothingset IJI=trueendfunctionfunction ZA2 takes nothing returns nothingset FL=trueset ZL=trueendfunctionfunction ZD2 takes nothing returns nothingset EL=trueendfunctionfunction L62 takes nothing returns nothinglocal integer i=0loopexitwhen i>5call SetPlayerName(BO[i],(D30[GetPlayerId((BO[i]))])+" ("+I2S(I[GetPlayerId(BO[i])])+"/"+I2S(O[GetPlayerId(BO[i])])+" | "+I2S(A[GetPlayerId(BO[i])])+"-"+I2S(B[GetPlayerId(BO[i])])+")")call SetPlayerName(CO[i],(D30[GetPlayerId((CO[i]))])+" ("+I2S(I[GetPlayerId(CO[i])])+"/"+I2S(O[GetPlayerId(CO[i])])+" | "+I2S(A[GetPlayerId(CO[i])])+"-"+I2S(B[GetPlayerId(CO[i])])+")")set i=i+1endloopendfunctionfunction L72 takes nothing returns booleanif IKI==false thenif GetLocalPlayer()==DO0 or GetLocalPlayer()==D20 thencall L62()endifendifreturn falseendfunctionfunction ZE2 takes nothing returns nothingset IKI=trueendfunctionfunction L92 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()call SetUnitScale(N0I,N9I(N0I)*ILI,N9I(N0I)*ILI,N9I(N0I)*ILI)set N0I=nullendfunctionfunction LA2 takes nothing returns booleanif IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==true thencall L92()endifreturn falseendfunctionfunction ZF2 takes nothing returns nothinglocal trigger t=CreateTrigger()call TriggerRegisterEnterRectSimple(t,bj_mapInitialPlayableArea)call TriggerAddCondition(t,Condition(function LA2))set IMI=trueset ILI=0.5endfunctionfunction ZG2 takes nothing returns nothingset INI=trueendfunctionfunction ZH2 takes nothing returns nothingset DL=trueendfunctionfunction LC2 takes nothing returns booleanif GetLocalPlayer()==DO0 or GetLocalPlayer()==D20 thenif GetTriggerEvalCount(GetTriggeringTrigger())==1 thencall CameraSetupSetDestPosition(ITI,0,0,0.0)elsecall CameraSetupSetDestPosition(ITI,GetCameraTargetPositionX(),GetCameraTargetPositionY(),0.0)endifcall CameraSetupApplyForPlayer(true,ITI,GetLocalPlayer(),0)call SetTerrainFogEx(0,0.0,100000.0,0.500,0.353,0.314,0.235)endifreturn falseendfunctionfunction ZV2 takes nothing returns nothinglocal trigger t=CreateTrigger()set ISI=trueset ITI=CreateCameraSetup()call CameraSetupSetField(ITI,CAMERA_FIELD_ZOFFSET,0.0,0.0)call CameraSetupSetField(ITI,CAMERA_FIELD_ROTATION,90.0,0.0)call CameraSetupSetField(ITI,CAMERA_FIELD_ANGLE_OF_ATTACK,304.0,0.0)call CameraSetupSetField(ITI,CAMERA_FIELD_TARGET_DISTANCE,2500.0,0.0)call CameraSetupSetField(ITI,CAMERA_FIELD_ROLL,0.0,0.0)call CameraSetupSetField(ITI,CAMERA_FIELD_FIELD_OF_VIEW,70.0,0.0)call CameraSetupSetField(ITI,CAMERA_FIELD_FARZ,16000.0,0.0)call CameraSetupSetDestPosition(ITI,0.0,0.0,0.0)call TriggerRegisterTimerEvent(t,180,true)call TriggerRegisterTimerEvent(t,0.1,false)call TriggerAddCondition(t,Condition(function LC2))set t=nullendfunctionfunction LD2 takes nothing returns booleanreturn NZI(GetOwningPlayer(GetFilterUnit()))and TCI(GetFilterUnit())==true and GetUnitTypeId(GetFilterUnit())!=1211117642endfunctionfunction LE2 takes nothing returns booleanreturn NWI(GetOwningPlayer(GetFilterUnit()))and TCI(GetFilterUnit())==true and GetUnitTypeId(GetFilterUnit())!=1211117642endfunctionfunction LF2 takes nothing returns nothinglocal unit u=GetEnumUnit()call SetUnitState(u,UNIT_STATE_LIFE,GetUnitState(u,UNIT_STATE_LIFE)+200)call SetUnitState(u,UNIT_STATE_MANA,GetUnitState(u,UNIT_STATE_MANA)+200)call SetPlayerState(GetOwningPlayer(u),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(GetOwningPlayer(u),PLAYER_STATE_RESOURCE_GOLD)+150)call AddHeroXP(u,248,true)set u=nullendfunctionfunction LG2 takes integer i,integer WG2,integer r,integer g,integer b,integer a,real x,real y,boolean LH2 returns nothinglocal integer MKI=GetHandleId(GetTriggeringTrigger())local image LZ2=(LoadImageHandle(XY,(MKI),(476+i)))local image LV2=(LoadImageHandle(XY,(MKI),(484+i)))if LZ2!=null thencall DestroyImage(LZ2)call SaveImageHandle(XY,(MKI),(476+i),(null))set LZ2=nullendifif LV2!=null thencall DestroyImage(LV2)call SaveImageHandle(XY,(MKI),(484+i),(null))set LV2=nullendifif LH2==false or WG2<1 thenreturnendifif StringLength(I2S(WG2))>1 thencall WE2("Fonts\\"+SubString(I2S(WG2),0,1)+".blp",120,120,x-30,y,0,true)call SetImageColor(YK,r,g,b,a)set LZ2=YKcall WE2("Fonts\\"+SubString(I2S(WG2),1,2)+".blp",120,120,x+30,y,0,true)call SetImageColor(YK,r,g,b,a)set LV2=YKelsecall WE2("Fonts\\0.blp",120,120,x-30,y,0,true)call SetImageColor(YK,r,g,b,a)set LZ2=YKcall WE2("Fonts\\"+SubString(I2S(WG2),0,1)+".blp",120,120,x+30,y,0,true)call SetImageColor(YK,r,g,b,a)set LV2=YKendifcall SaveImageHandle(XY,(MKI),(476+i),(LZ2))call SaveImageHandle(XY,(MKI),(484+i),(LV2))set LZ2=nullset LV2=nullendfunctionfunction LW2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local group LX2=MDI()local group LY2=MDI()local integer LJ2local integer LK2local real xlocal real ylocal rect rlocal player LL2local player LM2local integer i=0local integer RJIlocal unit CPlocal real FNOlocal real MXI=(TimerGetElapsed(M))loopexitwhen i>5set r=(LoadRectHandle(XY,(MKI),(460+i)))set RJI=(LoadInteger(XY,(MKI),(492+i)))set CP=(LoadUnitHandle(XY,(MKI),(452+i)))set LL2=GetOwningPlayer(CP)set LM2=(LoadPlayerHandle(XY,(MKI),(468+i)))set x=GetRectCenterX(r)set y=GetRectCenterY(r)call GroupEnumUnitsInRect(LX2,r,Condition(function LD2))call GroupEnumUnitsInRect(LY2,r,Condition(function LE2))set LJ2=CountUnitsInGroup(LX2)set LK2=CountUnitsInGroup(LY2)if(LJ2>0 and LK2>0)or(LJ2==0 and LK2==0)thenif LL2==EO thenset LM2=EOcall SavePlayerHandle(XY,(MKI),(468+i),(LM2))endifset RJI=61call SaveInteger(XY,(MKI),(492+i),(RJI))elseif LJ2>0 and LK2==0 thenset LM2=BO[1]call SavePlayerHandle(XY,(MKI),(468+i),(LM2))set RJI=RJI-LJ2call SaveInteger(XY,(MKI),(492+i),(RJI))elseif LK2>0 and LJ2==0 thenset LM2=CO[1]call SavePlayerHandle(XY,(MKI),(468+i),(LM2))set RJI=RJI-LK2call SaveInteger(XY,(MKI),(492+i),(RJI))endifif LM2==EO and LL2!=EO thencall SetUnitColor(CP,GetPlayerColor(LM2))call SetUnitOwner(CP,LM2,false)call LG2(i,RJI,255,0,0,255,x,y,false)elseif LM2==LL2 thencall LG2(i,RJI,255,0,0,255,x,y,false)set RJI=61call SaveInteger(XY,(MKI),(492+i),(RJI))elseif LM2!=EO thenif RJI<61 thencall LG2(i,RJI,255,0,0,255,x,y,true)elsecall LG2(i,RJI,255,0,0,255,x,y,false)endifif RJI<1 thencall PingMinimapEx(x,y,2,255,255,255,false)call RII(LM2,"Sound\\Interface\\Rescue.wav")call SetUnitOwner(CP,LM2,false)set RJI=61call SaveInteger(XY,(MKI),(492+i),(RJI))call SaveReal(XY,(MKI),(500+i),((MXI)*1.0))if NZI(LM2)thencall SetUnitColor(CP,GetPlayerColor(BO[0]))call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10,"|c00ff0303The Sentinel now controls a Capture Point.|r")call ForGroup(LX2,function LF2)elsecall SetUnitColor(CP,GetPlayerColor(CO[0]))call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10,"|c00ff0303The Scourge now controls a Capture Point.|r")call ForGroup(LY2,function LF2)endifendifendifset i=i+1endloopcall MCI(LX2)call MCI(LY2)set LX2=nullset LY2=nullreturn falseendfunctionfunction LN2 takes nothing returns booleanlocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local fogmodifier QYIcall TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function LW2))call PingMinimapEx(GetRectCenterX(KB),GetRectCenterY(KB),4,255,255,255,false)call PingMinimapEx(GetRectCenterX(MB),GetRectCenterY(MB),4,255,255,255,false)call PingMinimapEx(GetRectCenterX(TB),GetRectCenterY(TB),4,255,255,255,false)call PingMinimapEx(GetRectCenterX(LB),GetRectCenterY(LB),4,255,255,255,false)call PingMinimapEx(GetRectCenterX(SB),GetRectCenterY(SB),4,255,255,255,false)call PingMinimapEx(GetRectCenterX(RB),GetRectCenterY(RB),4,255,255,255,false)set IPI=CreateUnit(EO,1852010546,GetRectCenterX(KB),GetRectCenterY(KB),0)set IQI=CreateUnit(EO,1852010546,GetRectCenterX(MB),GetRectCenterY(MB),0)set IUI=CreateUnit(EO,1852010546,GetRectCenterX(TB),GetRectCenterY(TB),0)set O0I=CreateUnit(EO,1852010546,GetRectCenterX(LB),GetRectCenterY(LB),0)set OII=CreateUnit(EO,1852010546,GetRectCenterX(SB),GetRectCenterY(SB),0)set O1I=CreateUnit(EO,1852010546,GetRectCenterX(RB),GetRectCenterY(RB),0)set QYI=CreateFogModifierRadius(BO[1],FOG_OF_WAR_VISIBLE,GetRectCenterX(KB),GetRectCenterY(KB),600,true,true)call FogModifierStart(QYI)set QYI=CreateFogModifierRadius(CO[1],FOG_OF_WAR_VISIBLE,GetRectCenterX(KB),GetRectCenterY(KB),600,true,true)call FogModifierStart(QYI)set QYI=CreateFogModifierRadius(BO[1],FOG_OF_WAR_VISIBLE,GetRectCenterX(MB),GetRectCenterY(MB),600,true,true)call FogModifierStart(QYI)set QYI=CreateFogModifierRadius(CO[1],FOG_OF_WAR_VISIBLE,GetRectCenterX(MB),GetRectCenterY(MB),600,true,true)call FogModifierStart(QYI)set QYI=CreateFogModifierRadius(BO[1],FOG_OF_WAR_VISIBLE,GetRectCenterX(TB),GetRectCenterY(TB),600,true,true)call FogModifierStart(QYI)set QYI=CreateFogModifierRadius(CO[1],FOG_OF_WAR_VISIBLE,GetRectCenterX(TB),GetRectCenterY(TB),600,true,true)call FogModifierStart(QYI)set QYI=CreateFogModifierRadius(BO[1],FOG_OF_WAR_VISIBLE,GetRectCenterX(LB),GetRectCenterY(LB),600,true,true)call FogModifierStart(QYI)set QYI=CreateFogModifierRadius(CO[1],FOG_OF_WAR_VISIBLE,GetRectCenterX(LB),GetRectCenterY(LB),600,true,true)call FogModifierStart(QYI)set QYI=CreateFogModifierRadius(BO[1],FOG_OF_WAR_VISIBLE,GetRectCenterX(SB),GetRectCenterY(SB),600,true,true)call FogModifierStart(QYI)set QYI=CreateFogModifierRadius(CO[1],FOG_OF_WAR_VISIBLE,GetRectCenterX(SB),GetRectCenterY(SB),600,true,true)call FogModifierStart(QYI)set QYI=CreateFogModifierRadius(BO[1],FOG_OF_WAR_VISIBLE,GetRectCenterX(RB),GetRectCenterY(RB),600,true,true)call FogModifierStart(QYI)set QYI=CreateFogModifierRadius(CO[1],FOG_OF_WAR_VISIBLE,GetRectCenterX(RB),GetRectCenterY(RB),600,true,true)call FogModifierStart(QYI)call Q2I("Speed",IPI,255,233,12)call Q2I("Speed",O0I,255,233,12)call Q2I("Combat",IQI,255,233,12)call Q2I("Combat",OII,255,233,12)call Q2I("Regen",IUI,255,233,12)call Q2I("Regen",O1I,255,233,12)call UnitAddAbility(IPI,1395667023)call UnitAddAbility(O0I,1395667026)call UnitAddAbility(IQI,1093750863)call UnitAddAbility(IQI,1093750860)call UnitAddAbility(OII,1093750862)call UnitAddAbility(OII,1093750858)call UnitAddAbility(IUI,1093750870)call UnitAddAbility(IUI,1093750854)call UnitAddAbility(O1I,1093750852)call UnitAddAbility(O1I,1093750853)set OOI=61set O2I=61set O3I=61set O4I=61set O5I=61set O6I=61call SaveUnitHandle(XY,(MKI),(452),(IPI))call SaveUnitHandle(XY,(MKI),(453),(IQI))call SaveUnitHandle(XY,(MKI),(454),(IUI))call SaveUnitHandle(XY,(MKI),(455),(O0I))call SaveUnitHandle(XY,(MKI),(456),(OII))call SaveUnitHandle(XY,(MKI),(457),(O1I))call SaveReal(XY,(MKI),(500),((-1)*1.0))call SaveReal(XY,(MKI),(501),((-1)*1.0))call SaveReal(XY,(MKI),(502),((-1)*1.0))call SaveReal(XY,(MKI),(503),((-1)*1.0))call SaveReal(XY,(MKI),(504),((-1)*1.0))call SaveReal(XY,(MKI),(505),((-1)*1.0))call SaveRectHandle(XY,(MKI),(460),(KB))call SaveRectHandle(XY,(MKI),(461),(MB))call SaveRectHandle(XY,(MKI),(462),(TB))call SaveRectHandle(XY,(MKI),(463),(LB))call SaveRectHandle(XY,(MKI),(464),(SB))call SaveRectHandle(XY,(MKI),(465),(RB))call SavePlayerHandle(XY,(MKI),(468),(EO))call SavePlayerHandle(XY,(MKI),(469),(EO))call SavePlayerHandle(XY,(MKI),(470),(EO))call SavePlayerHandle(XY,(MKI),(471),(EO))call SavePlayerHandle(XY,(MKI),(472),(EO))call SavePlayerHandle(XY,(MKI),(473),(EO))call SaveInteger(XY,(MKI),(492),(61))call SaveInteger(XY,(MKI),(493),(61))call SaveInteger(XY,(MKI),(494),(61))call SaveInteger(XY,(MKI),(495),(61))call SaveInteger(XY,(MKI),(496),(61))call SaveInteger(XY,(MKI),(497),(61))call SaveImageHandle(XY,(MKI),(476),(null))call SaveImageHandle(XY,(MKI),(484),(null))call SaveImageHandle(XY,(MKI),(477),(null))call SaveImageHandle(XY,(MKI),(485),(null))call SaveImageHandle(XY,(MKI),(478),(null))call SaveImageHandle(XY,(MKI),(486),(null))call SaveImageHandle(XY,(MKI),(479),(null))call SaveImageHandle(XY,(MKI),(487),(null))call SaveImageHandle(XY,(MKI),(480),(null))call SaveImageHandle(XY,(MKI),(488),(null))call SaveImageHandle(XY,(MKI),(481),(null))call SaveImageHandle(XY,(MKI),(489),(null))call MZI(GetTriggeringTrigger())set t=nullreturn falseendfunctionfunction QOO takes nothing returns nothinglocal trigger tif IRI thenset t=CreateTrigger()call TriggerRegisterTimerEvent(t,600,false)call TriggerAddCondition(t,Condition(function LN2))set t=nullendifendfunctionfunction ZW2 takes nothing returns nothingset IRI=trueendfunctionfunction LS2 takes nothing returns nothinglocal integer CN1=CR1(GetEnumItem())if GetWidgetLife(GetEnumItem())>0 and GetItemPlayer(GetEnumItem())==OFI and CN1!=VG0 and CN1!=VR0 and CN1!=VP0 and CN1!=GB0 and CN1!=GC0 thenif IsItemVisible(GetEnumItem())thencall SetItemVisible(GetEnumItem(),false)elsecall SetItemVisible(GetEnumItem(),true)endifendifendfunctionfunction LT2 takes nothing returns nothinglocal player p=OFIlocal region r=CreateRegion()local unit u=GetEnumUnit()local integer CN1local integer i=0local item OT1local integer idlocal real xlocal real yif NZI(p)thencall RegionAddRect(r,G5)set x=GetRectCenterX(G5)set y=GetRectCenterY(G5)elsecall RegionAddRect(r,H5)set x=GetRectCenterX(H5)set y=GetRectCenterY(H5)endifloopexitwhen i>5set OT1=UnitItemInSlot(u,i)set CN1=CR1(OT1)if GetItemPlayer(OT1)==OFI and CN1!=VG0 and CN1!=VR0 and CN1!=VP0 and CN1!=GB0 and CN1!=GC0 thencall UnitRemoveItemFromSlot(u,i)set id=GetPlayerId(GetItemPlayer(OT1))call SetItemPosition(OT1,x,y)endifset i=i+1endloopcall RemoveRegion(r)set u=nullset r=nullendfunctionfunction LR2 takes nothing returns booleanreturn(GetUnitTypeId(GetFilterUnit())==1852010352 or T4I(GetFilterUnit())or(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and GetOwningPlayer(GetFilterUnit())!=OFI and GetOwningPlayer(GetFilterUnit())!=BO[0]and GetOwningPlayer(GetFilterUnit())!=CO[0]))and IsUnitAlly(GetFilterUnit(),OFI)==trueendfunctionfunction LP2 takes player p returns nothinglocal integer i=0local item OT1local integer id=GetPlayerId(p)local group g=MDI()set OFI=pcall GroupEnumUnitsInRange(g,0,0,99999,Condition(function LR2))call ForGroup(g,function LT2)call MCI(g)endfunctionfunction LQ2 takes player p returns nothingset OFI=pcall EnumItemsInRectBJ(bj_mapInitialPlayableArea,function LS2)endfunctionfunction LU2 takes unit u returns nothinglocal unit IQ1=ulocal player QF1=GetOwningPlayer(u)local location QB1if NWI(QF1)thenset QB1=GetRectCenter(S3)elseset QB1=GetRectCenter(O4)endifif Q2==false and QPI(IQ1)thencall ZF1(IQ1,QF1,GetLocationX(QB1),GetLocationY(QB1),true)if Q71(IQ1)==false or GetUnitAbilityLevel(IQ1,1093684567)==0 thencall ReviveHeroLoc(IQ1,QB1,true)elsecall QA1(IQ1,QB1)endifendifcall RemoveLocation(QB1)set IQ1=nullset QF1=nullset QB1=nullendfunctionfunction M02 takes unit MI2,unit M12 returns nothinglocal player p=GetOwningPlayer(M12)local integer id=GetPlayerId(p)call SetHeroXP(M12,GetHeroXP(MI2),true)call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,(LoadInteger(XY,(GetHandleId(M12)),(787)))+OCI[id])set OBI[id]=GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)set OCI[id]=0endfunctionfunction MO2 takes integer id,unit SKI returns booleanreturn NII(D70[id])!=MUI(SKI)endfunctionfunction M22 takes unit u returns integerreturn 255endfunctionfunction M32 takes unit u returns integerreturn 255endfunctionfunction M42 takes unit u returns integerreturn 255endfunctionfunction M52 takes unit u,integer id,player p returns nothinglocal player p1=GetOwningPlayer(u)local player p2local integer ilocal item E11if NZI(GetOwningPlayer(u))thenset p2=BO[0]elseset p2=CO[0]endifcall SaveInteger(XY,(GetHandleId(u)),(787),(GetPlayerState(GetOwningPlayer(u),PLAYER_STATE_RESOURCE_GOLD)))call SaveBoolean(XY,(GetHandleId(u)),(140),(false))call SaveInteger(XY,(GetHandleId((u))),((4259)),(1))call UnitAddAbility(u,1093678162)call A71(u,true)call PauseUnit(u,true)call SetUnitVertexColor(u,M22(u),M32(u),M42(u),150)call SelectUnitRemoveForPlayer(u,GetOwningPlayer(u))call SetUnitOwner(u,p2,false)call SetUnitPathing(u,false)call SetUnitX(u,GetUnitX(D00[id]))call SetUnitY(u,GetUnitY(D00[id]))set i=0loopexitwhen i>5if UnitItemInSlot(u,i)==null thenset E11=CreateItem(1227895373,GetUnitX(u),GetUnitY(u))call UnitAddItem(u,E11)endifset i=i+1endloopset p1=nullset p2=nullendfunctionfunction M62 takes unit u,integer id,player p returns nothinglocal integer iset K1[id]=ucall SaveBoolean(XY,(GetHandleId(u)),(140),(false))call SaveInteger(XY,(GetHandleId((u))),((4259)),(2))call UnitRemoveAbility(u,1093678162)call A71(u,false)call PauseUnit(u,false)call SetUnitVertexColor(u,M22(u),M32(u),M42(u),255)call SelectUnitAddForPlayer(u,GetOwningPlayer(u))call SetUnitOwner(u,p,false)call SetUnitPathing(u,true)if NZI(Player(id))==true thencall SetUnitPosition(u,GetRectCenterX(O4),GetRectCenterY(O4))elsecall SetUnitPosition(u,GetRectCenterX(S3),GetRectCenterY(S3))endifset i=0loopexitwhen i>5if GetItemTypeId(UnitItemInSlot(u,i))==1227895373 thencall D81(UnitItemInSlot(u,i))endifset i=i+1endloopendfunctionfunction M72 takes integer id returns booleanlocal region r=CreateRegion()local boolean DR1=falseif NZI(Player(id))==true thencall RegionAddRect(r,F4)elsecall RegionAddRect(r,E4)endifif IsUnitInRegion(r,O9I[id])and IsUnitInRegion(r,OAI[id])thenset DR1=trueendifcall RemoveRegion(r)return DR1 or QPI(O9I[id])or QPI(OAI[id])endfunctionfunction M82 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer id=(LoadInteger(XY,(MKI),(34)))local integer M92=GetTriggerEvalCount(t)local player p=Player(id)if M92==1 thencall LP2(p)elseif M92==2 thencall LQ2(p)elseif M92==3 thenif K1[id]==O9I[id]thencall LU2(O9I[id])call M52(O9I[id],id,p)call M62(OAI[id],id,p)call M02(O9I[id],OAI[id])elsecall LU2(OAI[id])call M52(OAI[id],id,p)call M62(O9I[id],id,p)call M02(OAI[id],O9I[id])endifelsecall FlushChildHashtable(XY,(MKI))call MZI(t)endifreturn falseendfunctionfunction MA2 takes nothing returns booleanlocal integer id=GetPlayerId(GetTriggerPlayer())local real MXI=(TimerGetElapsed(M))local trigger tlocal integer MKIif(MXI-O8I[id])<180 thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,GetObjectName(1848659282)+": "+I2S(R2I(180-(MXI-O8I[id]))))elseif M72(id)==false thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10,GetObjectName(1848659283))elseset O8I[id]=MXIset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.2,true)call TriggerAddCondition(t,Condition(function M82))call SaveInteger(XY,(MKI),(34),(id))set t=nullendifreturn falseendfunctionfunction MB2 takes nothing returns booleanlocal integer i=1local integer idlocal integer MC2local integer I2Olocal player ploopexitwhen i>5set p=BO[i]set id=GetPlayerId(p)set I2O=GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)if OBI[id]<I2O and OEI[id]==false thenset OCI[id]=OCI[id]+I2O-OBI[id]endifset OBI[id]=I2Oif OEI[id]==true thenset OEI[id]=falseendifset p=CO[i]set id=GetPlayerId(p)set I2O=GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)if OBI[id]<I2O and OEI[id]==false thenset OCI[id]=OCI[id]+I2O-OBI[id]endifset OBI[id]=I2Oif OEI[id]==true thenset OEI[id]=falseendifset i=i+1endloopreturn falseendfunctionfunction MD2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer USI=(LoadInteger(XY,(MKI),(55)))local player plocal integer S7Ilocal location GP1=GetRectCenter(O4)local location GQ1=GetRectCenter(S3)local integer idif USI<6 thenset p=BO[USI]set id=GetPlayerId(p)elseif USI<11 thenset p=CO[USI-5]set id=GetPlayerId(p)endifif USI>10 thencall FlushChildHashtable(XY,(MKI))call MZI(t)call TriggerRegisterTimerEvent(ODI,0.1,true)call TriggerAddCondition(ODI,Condition(function MB2))elseif USI<6 thencall SaveInteger(XY,(MKI),(55),(USI+1))set K1[GetPlayerId(p)]=nullif NYI(p)thenloopexitwhen K1[GetPlayerId(p)]!=nullset S7I=S6I()if R[S7I]==false thenif not F2 thenset R[S7I]=trueendifset K1[id]=CreateUnitAtLoc(p,D70[S7I],GP1,bj_UNIT_FACING)set O9I[id]=K1[id]call M52(K1[id],id,p)endifendloopendifelseif USI<11 thencall SaveInteger(XY,(MKI),(55),(USI+1))set K1[GetPlayerId(p)]=nullif NYI(p)thenloopexitwhen K1[id]!=nullset S7I=S6I()if R[S7I]==false thenif not F2 thenset R[S7I]=trueendifset K1[id]=CreateUnitAtLoc(p,D70[S7I],GQ1,bj_UNIT_FACING)set O9I[id]=K1[id]call M52(K1[id],id,p)endifendloopendifendifif USI<6 thenset p=BO[USI]elseif USI<11 thenset p=CO[USI-5]endifif USI<6 thencall SaveInteger(XY,(MKI),(55),(USI+1))set K1[GetPlayerId(p)]=nullif NYI(p)thenloopexitwhen K1[id]!=nullset S7I=S6I()if R[S7I]==false and MO2(S7I,O9I[id])thenif not F2 thenset R[S7I]=trueendifset K1[id]=CreateUnitAtLoc(p,D70[S7I],GP1,bj_UNIT_FACING)set OAI[id]=K1[id]set OBI[id]=GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)call M62(K1[id],id,p)call SaveUnitHandle(XY,(GetHandleId(OAI[id])),(788),(O9I[id]))call SaveUnitHandle(XY,(GetHandleId(O9I[id])),(788),(OAI[id]))endifendloopendifelseif USI<11 thencall SaveInteger(XY,(MKI),(55),(USI+1))set K1[id]=nullif NYI(p)thenloopexitwhen K1[id]!=nullset S7I=S6I()if R[S7I]==false and MO2(S7I,O9I[id])thenif not F2 thenset R[S7I]=trueendifset K1[id]=CreateUnitAtLoc(p,D70[S7I],GQ1,bj_UNIT_FACING)set OAI[id]=K1[id]set OBI[id]=GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)call M62(K1[id],id,p)call SaveUnitHandle(XY,(GetHandleId(OAI[id])),(788),(O9I[id]))call SaveUnitHandle(XY,(GetHandleId(O9I[id])),(788),(OAI[id]))endifendloopendifendifcall RemoveLocation(GP1)call RemoveLocation(GQ1)set GP1=nullset GQ1=nullset p=nullset t=nullreturn falseendfunctionfunction ZX2 takes nothing returns nothinglocal integer i=1local integer idlocal real MXI=(TimerGetElapsed(M))local trigger tset O7I=trueset A3=falseset CL=falsecall NPI(1211117641)call NPI(1328558160)call NPI(1211117653)loopexitwhen i>5set id=GetPlayerId(BO[i])set OEI[id]=falseset O8I[id]=MXI-180set OCI[id]=0set id=GetPlayerId(CO[i])set OEI[id]=falseset O8I[id]=MXI-180set OCI[id]=0set i=i+1endloopset t=CreateTrigger()call TriggerRegisterTimerEvent(t,.5,true)call TriggerAddCondition(t,Condition(function MD2))call SaveInteger(XY,(GetHandleId(t)),(55),(1))set t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,BO[1],"-tt",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-tt",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-tt",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-tt",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-tt",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-tt",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-tt",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-tt",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-tt",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-tt",true)call TriggerAddCondition(t,Condition(function MA2))set t=nullendfunctionfunction ME2 takes nothing returns nothingset Q[1]=0endfunctionfunction MG2 takes nothing returns nothingset Q[2]=0endfunctionfunction MZ2 takes nothing returns nothingset Q[3]=0endfunctionfunction MW2 takes nothing returns nothingset Q[4]=0endfunctionfunction MY2 takes nothing returns nothingset Q[5]=0endfunctionfunction MK2 takes nothing returns nothingset Q[7]=0endfunctionfunction MM2 takes nothing returns nothingset Q[8]=0endfunctionfunction MS2 takes nothing returns nothingset Q[9]=0endfunctionfunction MR2 takes nothing returns nothingset Q[10]=0endfunctionfunction MQ2 takes nothing returns nothingset Q[11]=0endfunctionfunction N02 takes nothing returns nothinglocal integer i=1local string idlocal player ploopexitwhen i>5set p=BO[i]set id=I2S(GetPlayerId(p))call StoreInteger(PN,id,"id",i)set p=CO[i]set id=I2S(GetPlayerId(p))call StoreInteger(PN,id,"id",i+5)if GetLocalPlayer()==WO thencall SyncStoredInteger(PN,I2S(GetPlayerId(BO[i])),"id")call SyncStoredInteger(PN,I2S(GetPlayerId(CO[i])),"id")endifset i=i+1endloopendfunctionfunction NI2 takes nothing returns booleanif J2 thencall S3I()call PDI(bj_FORCE_ALL_PLAYERS,20.00,C0[GetPlayerId(WO)]+(D30[GetPlayerId((WO))])+"|r"+" "+GetObjectName(1848656717))call PDI(bj_FORCE_ALL_PLAYERS,20.00," ")set QK=truecall H02()call EJ2()call SAO()call RWO()call Q31()endifcall N02()call MZI(GetTriggeringTrigger())return falseendfunctionfunction N12 takes nothing returns booleanset B0=truecall MZI(GetTriggeringTrigger())return falseendfunctionfunction N22 takes nothing returns nothingset O0=trueendfunctionfunction N42 takes nothing returns nothingset UO=trueendfunctionfunction N62 takes nothing returns nothingset H3=trueendfunctionfunction N82 takes nothing returns booleanif IsUnitIllusion(GetFilterUnit())==true and GetOwningPlayer(GetFilterUnit())!=GetOwningPlayer(CK)thencall SetUnitOwner(GetFilterUnit(),GetOwningPlayer(CK),true)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl",GetFilterUnit(),"origin"))endifreturn falseendfunctionfunction N92 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local item OT1=(LoadItemHandle(XY,(MKI),(96)))local group glocal real x=GetUnitX(N0I)local real y=GetUnitY(N0I)if GetTriggerEventId()==EVENT_UNIT_DROP_ITEM and GetManipulatedItem()==OT1 thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEventId()!=EVENT_UNIT_DROP_ITEM thenif QPI(N0I)==false thenset g=MDI()set CK=N0Icall GroupEnumUnitsInRange(g,x,y,1000,Condition(function N82))call MCI(g)set g=nullendifendifset t=nullset N0I=nullset OT1=nullreturn falseendfunctionfunction NA2 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,1,true)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_DROP_ITEM)call TriggerAddCondition(t,Condition(function N92))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveItemHandle(XY,(MKI),(96),(GetManipulatedItem()))set t=nullset N0I=nullendfunctionfunction GenuineMKB_Main takes nothing returns booleanif GetItemType(GetManipulatedItem())==ITEM_TYPE_PERMANENT and DH1(GetManipulatedItem())==X80 thencall NA2()endifreturn falseendfunctionfunction NB2 takes string s returns nothingcall PDI(bj_FORCE_ALL_PLAYERS,20.00,"|c00CC0000"+GetObjectName(1848659525)+": |r|c006699CC"+s+"|r")call StartSound(XF)endfunctionfunction NC2 takes nothing returns nothingcall NB2(GetObjectName((1848659527)))call CreateItem(FJ0[X80],GetUnitX(OJI),GetUnitY(OJI))call ReviveHero(OJI,GetUnitX(OJI),GetUnitY(OJI),false)call RemoveUnit(OJI)endfunctionfunction ND2 takes nothing returns nothingcall NB2(GetObjectName((1848659528)))call SetItemVisible(OVI,true)call SetItemPosition(OVI,GetUnitX(OJI),GetUnitY(OJI))call RemoveUnit(OJI)endfunctionfunction NE2 takes nothing returns booleanlocal item i=DB1(GetFilterUnit(),FK0[VU0])if i!=null thencall RemoveItem(i)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl",GetFilterUnit(),"chest"))endifset i=nullreturn falseendfunctionfunction NF2 takes nothing returns booleanif IsUnitIllusion(GetFilterUnit())==true and GetOwningPlayer(GetFilterUnit())!=GetOwningPlayer(OJI)thencall SetUnitOwner(GetFilterUnit(),GetOwningPlayer(OJI),true)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl",GetFilterUnit(),"origin"))endifreturn falseendfunctionfunction NG2 takes nothing returns nothinglocal unit TLI=GetEnumUnit()local integer x=0local item iif IsUnitIllusion(TLI)==true thenreturnendifloopexitwhen x>5set i=UnitItemInSlot(TLI,x)call UnitRemoveItem(TLI,i)set x=x+1endloopset TLI=nullendfunctionfunction NH2 takes nothing returns nothinglocal unit TLI=GetEnumUnit()local integer x=0local unit QHIif IsUnitIllusion(TLI)==true thenreturnendifset QHI=CreateUnit(GetOwningPlayer(OJI),1697656901,GetUnitX(TLI),GetUnitY(TLI),0)call QTI(QHI,1093817945)call IssueTargetOrder(QHI,"ensnare",TLI)set TLI=nullset QHI=nullendfunctionfunction NZ2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local real x=GetUnitX(OJI)local real y=GetUnitY(OJI)local group gif GetTriggerEventId()==EVENT_WIDGET_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullcall NC2()return falseelseif GetTriggerEvalCount(t)>12000 or(OGI and GetTriggerEvalCount(t)>600)thencall FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullif OGI thencall NC2()elsecall ND2()endifreturn falseendifset g=MDI()call GroupEnumUnitsInRange(g,x,y,1000,Condition(function NF2))call MCI(g)set g=MDI()call GroupEnumUnitsInRange(g,x,y,1000,Condition(function NE2))call MCI(g)if ModuloInteger(GetTriggerEvalCount(t),200)==0 thenset g=MDI()call GroupEnumUnitsInRange(g,x,y,1000,Condition(function BK1))call ForGroup(g,function NG2)call MCI(g)endifif ModuloInteger(GetTriggerEvalCount(t),300)==0 thenset g=MDI()call GroupEnumUnitsInRange(g,x,y,1000,Condition(function BK1))call ForGroup(g,function NH2)call MCI(g)endifset g=nullset t=nullreturn falseendfunctionfunction NV2 takes nothing returns booleanlocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SetUnitInvulnerable(OJI,false)call UnitRemoveAbility(OJI,1096971630)call NB2(GetObjectName((1848659524)))set OZI=truecall TriggerRegisterTimerEvent(t,0.1,true)call TriggerRegisterDeathEvent(t,OJI)call TriggerAddCondition(t,Condition(function NZ2))set t=nullreturn falseendfunctionfunction NW2 takes nothing returns nothinglocal trigger t=CreateTrigger()call NB2(GetObjectName((1848659512)))call SetUnitInvulnerable(OJI,true)call TriggerRegisterTimerEvent(t,10,false)call TriggerAddCondition(t,Condition(function NV2))set t=nullendfunctionfunction NX2 takes nothing returns nothingcall NB2(GetObjectName((1848659526)))if OGI thencall NW2()elsecall RemoveUnit(OJI)endifendfunctionfunction NY2 takes nothing returns nothinglocal group g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(OJI),GetUnitY(OJI),1000,Condition(function BK1))set ONI=GroupPickRandomUnit(g)call MCI(g)set g=nullendfunctionfunction NJ2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local real x0local real y0local real x1local real y1local real x2local real y2local real x3local real y3local integer r=GetRandomInt(0,2)if GetTriggerEvalCount(t)==1 thencall NY2()if ONI==null thencall RemoveUnit(OJI)call FlushChildHashtable(XY,(MKI))call MZI(t)return falseendifcall NB2(GetObjectName((1848659521)))call SaveEffectHandle(XY,(GetHandleId(t)),(175),(AddSpecialEffectTarget("Abilities\\Spells\\Human\\InnerFire\\InnerFireTarget.mdl",ONI,"overhead")))if r==0 thenset x0=ORIset y0=OPIset x1=OQIset y1=OUIset x2=A0Iset y2=AIIset x3=A1Iset y3=AOIelseif r==1 thenset x0=A0Iset y0=AIIset x1=ORIset y1=OPIset x2=OQIset y2=OUIset x3=A1Iset y3=AOIelseif r==2 thenset x0=OQIset y0=OUIset x1=A1Iset y1=AOIset x2=A0Iset y2=AIIset x3=ORIset y3=OPIendifcall ClearSelection()call SetUnitPosition(OJI,x0,y0)set OKI=CreateUnit(GetOwningPlayer(OJI),1211123027,x1,y1,GetUnitFacing(OJI))set OLI=CreateUnit(GetOwningPlayer(OJI),1211123027,x2,y2,GetUnitFacing(OJI))set OMI=CreateUnit(GetOwningPlayer(OJI),1211123027,x3,y3,GetUnitFacing(OJI))call IssueImmediateOrder(ONI,"holdposition")call SetUnitVertexColor(OKI,220,255,255,255)call SetUnitVertexColor(OLI,220,255,255,255)call SetUnitVertexColor(OMI,220,255,255,255)call TriggerRegisterUnitEvent(t,OJI,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,OKI,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,OLI,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,OMI,EVENT_UNIT_DAMAGED)call PauseUnit(OJI,true)call SetUnitInvulnerable(OJI,false)call PauseUnit(OKI,true)call PauseUnit(OLI,true)call PauseUnit(OMI,true)call SetHeroLevel(OKI,25,false)call SetHeroLevel(OLI,25,false)call SetHeroLevel(OMI,25,false)if OGI thencall SetUnitVertexColor(OJI,0,255,255,255)endifelseif GetTriggerEventId()==EVENT_UNIT_DAMAGED and GetEventDamage()>0 and GetEventDamageSource()==ONI thencall PauseUnit(OJI,false)call PauseUnit(OKI,false)call PauseUnit(OLI,false)call PauseUnit(OMI,false)call RemoveUnit(OKI)call RemoveUnit(OLI)call RemoveUnit(OMI)if GetTriggerUnit()==OJI thencall NW2()elsecall NX2()endifcall DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullreturn falseendfunctionfunction NK2 takes nothing returns nothinglocal trigger t=CreateTrigger()call NB2(GetObjectName((1848659522)))call TriggerRegisterTimerEvent(t,10,false)call TriggerAddCondition(t,Condition(function NJ2))set t=nullendfunctionfunction NL2 takes nothing returns nothingcall NB2(GetObjectName((1848659523)))if OGI thencall NK2()elsecall RemoveUnit(OJI)endifendfunctionfunction NM2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer MFI=GetTriggerEvalCount(t)local real x0=2897local real y0=-2814local real x1=GetUnitX(OJI)local real y1=GetUnitY(OJI)local real NN2local real NS2local real NT2local real NR2local real U2Ilocal real U3Ilocal location llocal real d=PAI(OSI,OTI,2897,-2814)local real r=d/200local real NP2=0.1if PAI(GetUnitX(ONI),GetUnitY(ONI),2897,-2814)<100 thencall NK2()call DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call SetUnitAnimationByIndex(OJI,0)call SetUnitFlyHeight(OJI,GetUnitDefaultFlyHeight(OJI),0)call SetUnitPosition(OJI,2897,-2814)call PauseUnit(OJI,false)call SetUnitPathing(OJI,true)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullreturn falseendifset NN2=PUI(x1,y1,x0,y0)set NR2=(MFI-100)*(MFI-100)*NP2set U2I=x1+r*Cos(NN2*bj_DEGTORAD)set U3I=y1+r*Sin(NN2*bj_DEGTORAD)if MFI<201 thencall SetUnitFlyHeight(OJI,10000*NP2-NR2,0)call SetUnitPosition(OJI,U2I,U3I)elsecall SetUnitFlyHeight(OJI,GetUnitDefaultFlyHeight(OJI),0)call PauseUnit(OJI,false)call SetUnitPathing(OJI,true)set l=Location(U2I,U3I)call TerrainDeformationRippleBJ(0.2,true,l,1.00,300.00,96.00,1,64.00)call RemoveLocation(l)call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl",GetUnitX(OJI),GetUnitY(OJI)))call DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call SetUnitAnimationByIndex(OJI,0)call FlushChildHashtable(XY,(MKI))call MZI(t)call NL2()endifset t=nullreturn falseendfunctionfunction NQ2 takes effect NU2,effect S02 returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit QHIcall SetUnitPosition(OJI,OSI,OTI)set QHI=CreateUnit(GetOwningPlayer(OJI),1697656901,GetUnitX(OJI),GetUnitY(OJI),0)call SetUnitPosition(ONI,GetUnitX(OJI)+50,GetUnitY(OJI)+50)call PauseUnit(OJI,false)call PauseUnit(ONI,false)call QTI(OJI,1097691750)call UnitRemoveAbility(OJI,1097691750)call QTI(QHI,1093817945)call IssueTargetOrder(QHI,"ensnare",ONI)call TriggerRegisterTimerEvent(t,0.03,true)call TriggerAddCondition(t,Condition(function NM2))call SaveEffectHandle(XY,(MKI),(175),(NU2))call SaveEffectHandle(XY,(MKI),(176),(S02))set t=nullset QHI=nullendfunctionfunction SI2 takes nothing returns nothinglocal group g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(OJI),GetUnitY(OJI),1800,Condition(function BK1))set ONI=GroupPickRandomUnit(g)call MCI(g)set g=nullendfunctionfunction S12 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)if GetTriggerEvalCount(t)==1 thencall SI2()if ONI==null thencall RemoveUnit(OJI)call FlushChildHashtable(XY,(MKI))call MZI(t)return falseendifcall NB2(GetObjectName((1848659513)))call TriggerRegisterTimerEvent(t,1,true)call SaveEffectHandle(XY,(GetHandleId(t)),(175),(AddSpecialEffectTarget("Abilities\\Spells\\Human\\InnerFire\\InnerFireTarget.mdl",ONI,"overhead")))call SaveEffectHandle(XY,(GetHandleId(t)),(176),(AddSpecialEffect("Objects\\InventoryItems\\BattleStandard\\BattleStandard.mdl",2897,-2814)))call PingMinimap(2897,-2814,5)call SetUnitPosition(OJI,OSI,OTI)call SetUnitPosition(ONI,GetUnitX(OJI)+50,GetUnitY(OJI)+50)call PauseUnit(OJI,true)call SetUnitAnimationByIndex(OJI,7)call SetUnitPathing(OJI,false)call PauseUnit(ONI,true)elsecall NB2(I2S(6-GetTriggerEvalCount(t)))if GetTriggerEvalCount(t)==6 thencall NQ2((LoadEffectHandle(XY,(MKI),(175))),(LoadEffectHandle(XY,(MKI),(176))))call FlushChildHashtable(XY,(MKI))call MZI(t)endifendifset t=nullreturn falseendfunctionfunction SO2 takes nothing returns booleanif OZI==false thencall SetUnitState(OJI,UNIT_STATE_LIFE,GetUnitState(OJI,UNIT_STATE_MAX_LIFE))call SetUnitState(OJI,UNIT_STATE_MANA,GetUnitState(OJI,UNIT_STATE_MAX_MANA))endifreturn falseendfunctionfunction S22 takes nothing returns nothinglocal trigger tif OHI==false or OGI thenset t=CreateTrigger()set OJI=CreateUnit(DO,1211123027,OSI,OTI,0)call QTI(OJI,1096971630)call PauseUnit(OJI,true)call SetUnitInvulnerable(OJI,true)call SetHeroLevel(OJI,25,false)call PingMinimap(OSI,OTI,4)call SetCameraPosition(GetUnitX(OJI),GetUnitY(OJI))call NB2(GetObjectName((1848659511)))call TriggerRegisterTimerEvent(t,20,false)call TriggerAddCondition(t,Condition(function S12))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,OJI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,0.01,true)call TriggerAddCondition(t,Condition(function SO2))endifset t=nullendfunctionfunction S32 takes nothing returns nothingendfunctionfunction S42 takes nothing returns nothinglocal real x=GetSpellTargetX()local real y=GetSpellTargetY()local location l1=Location(x-450,y-450)local location l2=Location(x+450,y+450)local rect r=RectFromLoc(l1,l2)call RemoveLocation(l1)call RemoveLocation(l2)set OXI=falseset OYI=falsecall EnumItemsInRect(r,null,function S32)if OXI and OYI thencall SetItemVisible(OVI,false)call RemoveItem(OWI)call S22()endifset l1=nullset l2=nullset r=nullendfunctionfunction Torrent_Damage takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=(LoadInteger(XY,(MKI),(5)))call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction S62 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer MFI=GetTriggerEvalCount(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer TRI=(LoadInteger(XY,(MKI),(30)))local unit TMI=M6I(TRI)local integer NGI=(LoadInteger(XY,(MKI),(5)))local real NR2local unit QHIset NR2=0.6*(MFI-25)*(MFI-25)if MFI<51 and GetTriggerEventId()!=EVENT_UNIT_DEATH thenif ModuloInteger(MFI,5)==0 thencall TKI(TLI,TMI,1,3+3*NGI)endifif T9I(TMI)==false thencall SetUnitFlyHeight(TMI,500-NR2,0)endifelseset QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call QTI(QHI,1093742924)call SetUnitAbilityLevel(QHI,1093742924,NGI)call IssueTargetOrder(QHI,"slow",TMI)if T9I(TMI)==false thencall SetUnitFlyHeight(TMI,GetUnitDefaultFlyHeight(TMI),0)endifif Q2==false thencall PauseUnit(TMI,false)endifcall SetUnitPathing(TMI,true)call M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullset QHI=nullreturn falseendfunctionfunction S72 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=CKlocal unit TMI=GetEnumUnit()local integer NGI=TJcall PauseUnit(TMI,true)call SetUnitPathing(TMI,false)if T9I(TMI)==false thencall QTI(TMI,1097691750)call UnitRemoveAbility(TMI,1097691750)endifcall TriggerRegisterTimerEvent(t,0.03,true)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function S62))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(30),(M8I(TMI)))call SaveInteger(XY,(MKI),(5),(NGI))call TKI(TLI,TMI,1,30+30*NGI)set t=nullset TLI=nullset TMI=nullendfunctionfunction S82 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local group g=MDI()local ubersplat OD1=CreateUbersplat(x,y,"THNN",255,255,255,255,false,false)call SetUbersplatRenderAlways(OD1,true)call QJI(GetOwningPlayer(N0I),4,x,y,400)call DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(177))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(178))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(179))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(180))))call FlushChildHashtable(XY,(MKI))call MZI(t)call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",x,y))call DestroyEffect(AddSpecialEffect("effects\\TidalErruption.mdx",x,y))set CK=N0Iset TJ=NGIcall GroupEnumUnitsInRange(g,x,y,225+25,Condition(function AU1))call ForGroup(g,function S72)call MCI(g)set t=nullset N0I=nullreturn falseendfunctionfunction S92 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local location l=GetSpellTargetLoc()local real x=GetLocationX(l)local real y=GetLocationY(l)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer NGI=GetUnitAbilityLevel(N0I,1093743414)local string s=""local real aif IsPlayerAlly(GetLocalPlayer(),GetOwningPlayer(N0I))==true or TGI(GetLocalPlayer())thenset s="Objects\\Spawnmodels\\Other\\IllidanFootprint\\IllidanWaterSpawnFootPrint.mdl"endifcall RemoveLocation(l)call SaveInteger(XY,(MKI),(5),(NGI))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))call SaveInteger(XY,(MKI),(5),(NGI))set a=0call SaveEffectHandle(XY,(MKI),(175),(AddSpecialEffect(s,x+40*Cos(a/6*360*bj_DEGTORAD),y+40*Sin(a/6*360*bj_DEGTORAD))))set a=1call SaveEffectHandle(XY,(MKI),(176),(AddSpecialEffect(s,x+40*Cos(a/6*360*bj_DEGTORAD),y+40*Sin(a/6*360*bj_DEGTORAD))))set a=2call SaveEffectHandle(XY,(MKI),(177),(AddSpecialEffect(s,x+40*Cos(a/6*360*bj_DEGTORAD),y+40*Sin(a/6*360*bj_DEGTORAD))))set a=3call SaveEffectHandle(XY,(MKI),(178),(AddSpecialEffect(s,x+40*Cos(a/6*360*bj_DEGTORAD),y+40*Sin(a/6*360*bj_DEGTORAD))))set a=4call SaveEffectHandle(XY,(MKI),(179),(AddSpecialEffect(s,x+40*Cos(a/6*360*bj_DEGTORAD),y+40*Sin(a/6*360*bj_DEGTORAD))))set a=5call SaveEffectHandle(XY,(MKI),(180),(AddSpecialEffect(s,x+40*Cos(a/6*360*bj_DEGTORAD),y+40*Sin(a/6*360*bj_DEGTORAD))))call TriggerRegisterTimerEvent(t,1.6,false)call TriggerAddCondition(t,Condition(function S82))set N0I=nullset t=nullset l=nullendfunctionfunction SA2 takes nothing returns booleanif GetSpellAbilityId()==1093743414 thencall S92()endifreturn falseendfunctionfunction NR1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function SA2))set t=nullendfunctionfunction DY2 takes nothing returns nothingcall SetPlayerAbilityAvailable(GetOwningPlayer(GM),1093743671,false)call SetPlayerAbilityAvailable(GetOwningPlayer(GM),1093743672,false)call SetPlayerAbilityAvailable(GetOwningPlayer(GM),1093742933,false)call SetPlayerAbilityAvailable(GetOwningPlayer(GM),1093743673,false)call SetPlayerAbilityAvailable(GetOwningPlayer(HM),1093743671,false)call SetPlayerAbilityAvailable(GetOwningPlayer(HM),1093743672,false)call SetPlayerAbilityAvailable(GetOwningPlayer(HM),1093742933,false)call SetPlayerAbilityAvailable(GetOwningPlayer(HM),1093743673,false)endfunctionfunction SB2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer TRI=(LoadInteger(XY,(MKI),(30)))local unit TMI=M6I(TRI)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamageSource()==TLI and(GetEventDamage()>40 or IsUnitType(TMI,UNIT_TYPE_STRUCTURE)==true or GetUnitTypeId(TMI)==1970107511 or GetUnitTypeId(TMI)==1700946284)and(LoadBoolean(XY,(GetHandleId(TLI)),(183)))==true thencall SaveBoolean(XY,(GetHandleId(TLI)),(183),(false))call SaveReal(XY,(GetHandleId(TLI)),(184),(((TimerGetElapsed(M)))*1.0))call UnitRemoveAbility(TLI,1093742927)call UnitRemoveAbility(TLI,1093742930)call UnitRemoveAbility(TLI,1093743671)call UnitRemoveAbility(TLI,1093743672)call UnitRemoveAbility(TLI,1093742933)call UnitRemoveAbility(TLI,1093743673)call FlushChildHashtable(XY,(GetHandleId((LoadTriggerHandle(XY,(MKI),(35))))))call MZI((LoadTriggerHandle(XY,(MKI),(35))))call M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifelsecall M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction SC2 takes nothing returns booleanlocal trigger tlocal integer MKIlocal unit TMIlocal unit TLIif GetTriggerEventId()==EVENT_UNIT_DEATH thencall SaveBoolean(XY,(GetHandleId(GetTriggerUnit())),(183),(false))call SaveReal(XY,(GetHandleId(GetTriggerUnit())),(184),(((TimerGetElapsed(M)))*1.0))call UnitRemoveAbility(GetTriggerUnit(),1093742927)call UnitRemoveAbility(GetTriggerUnit(),1093742930)call UnitRemoveAbility(GetTriggerUnit(),1093743671)call UnitRemoveAbility(GetTriggerUnit(),1093743672)call UnitRemoveAbility(GetTriggerUnit(),1093742933)call UnitRemoveAbility(GetTriggerUnit(),1093743673)call FlushChildHashtable(XY,(GetHandleId(GetTriggeringTrigger())))call MZI(GetTriggeringTrigger())elseif GetAttacker()==(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(182)))thenif IsUnitAlly(GetAttacker(),GetOwningPlayer(GetTriggerUnit()))==false thenset t=CreateTrigger()set MKI=GetHandleId(t)set TMI=GetTriggerUnit()set TLI=GetAttacker()call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,2.5,false)call TriggerAddCondition(t,Condition(function SB2))call SaveInteger(XY,(MKI),(30),(M8I(TMI)))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveTriggerHandle(XY,(MKI),(35),(GetTriggeringTrigger()))set TMI=nullset TLI=nullset t=nullendifendifreturn falseendfunctionfunction SD2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local real POI=(TimerGetElapsed(M))local integer NGI=GetUnitAbilityLevel(N0I,1093743444)local real SE2=(LoadReal(XY,(GetHandleId(N0I)),(184)))local boolean SF2=(LoadBoolean(XY,(GetHandleId(N0I)),(183)))if POI-SE2>16-NGI*3 and SF2==false and GetUnitTypeId(N0I)==1211119187 and QPI(N0I)==false thencall SaveBoolean(XY,(GetHandleId(N0I)),(183),(true))set t=CreateTrigger()set MKI=GetHandleId(t)call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function SC2))call SaveUnitHandle(XY,(MKI),(182),(N0I))call QTI(N0I,1093742927)call SetUnitAbilityLevel(N0I,1093742927,NGI)call QTI(N0I,1093742930)if NGI==1 thencall QTI(N0I,1093743671)elseif NGI==2 thencall QTI(N0I,1093743672)elseif NGI==3 thencall QTI(N0I,1093742933)elseif NGI==4 thencall QTI(N0I,1093743673)endifcall SetPlayerAbilityAvailable(GetOwningPlayer(N0I),1093743671,false)call SetPlayerAbilityAvailable(GetOwningPlayer(N0I),1093743672,false)call SetPlayerAbilityAvailable(GetOwningPlayer(N0I),1093742933,false)call SetPlayerAbilityAvailable(GetOwningPlayer(N0I),1093743673,false)elseif SF2==false thencall UnitRemoveAbility(N0I,1093742927)call UnitRemoveAbility(N0I,1093742930)call UnitRemoveAbility(N0I,1093743671)call UnitRemoveAbility(N0I,1093743672)call UnitRemoveAbility(N0I,1093742933)call UnitRemoveAbility(N0I,1093743673)endifset t=nullset N0I=nullreturn falseendfunctionfunction SG2 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.5,true)call TriggerAddCondition(t,Condition(function SD2))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveInteger(XY,(MKI),(181),(0))set N0I=nullset t=nullendfunctionfunction SH2 takes nothing returns booleanif GetLearnedSkill()==1093743444 and GetUnitAbilityLevel(GetTriggerUnit(),1093743444)==1 and IsUnitIllusion(GetTriggerUnit())==false thencall SG2()endifreturn falseendfunctionfunction NP1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function SH2))set t=nullendfunctionfunction SZ2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer TRI=(LoadInteger(XY,(MKI),(30)))local unit TMI=M6I(TRI)local image i=(LoadImageHandle(XY,(MKI),(185)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if GetTriggerEventId()!=EVENT_UNIT_SPELL_EFFECT or(GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()==1093743428)thenif GetTriggerEventId()!=EVENT_UNIT_DEATH and T6I(TMI)==false thenif IsUnitHidden(TMI)thencall SetUnitX(TMI,x)call SetUnitY(TMI,y)elsecall SetUnitPosition(TMI,x,y)endifendifcall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093743428,false)if(LoadInteger(XY,(GetHandleId(TLI)),(704)))==0 or(LoadInteger(XY,(GetHandleId(TLI)),(704)))==1093742926 thencall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093742926,true)endifcall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call ShowImage(i,false)call DestroyImage(i)call M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TMI=nullset i=nullset TLI=nullreturn falseendfunctionfunction SV2 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local real x=GetUnitX(TMI)local real y=GetUnitY(TMI)local real Q6I=90local image i=CreateImage("Fonts\\X.blp",Q6I,Q6I,0,x-Q6I/2,y-Q6I/2,0,0,0,0,2)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local string fx=""local integer NGI=GetUnitAbilityLevel(TLI,1093742926)call MPI(TMI,4401,5)call QTI(TLI,1093743428)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093743428,true)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093742926,false)call SetImageRenderAlways(i,true)if IsUnitAlly(TLI,GetOwningPlayer(TMI))==false or IsUnitAlly(TMI,GetLocalPlayer())==true or TGI(GetLocalPlayer())thenset fx="effects\\BlackTide.mdx"call ShowImage(i,true)elsecall ShowImage(i,false)endifcall SetImageColor(i,255,0,0,255)call UnitApplyTimedLife(CreateUnit(GetOwningPlayer(TLI),1865429338,x,y,0),1112820806,5)if IsUnitAlly(TMI,GetOwningPlayer(TLI))==true thencall TriggerRegisterTimerEvent(t,NGI*2,false)elsecall TriggerRegisterTimerEvent(t,NGI,false)endifcall TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function SZ2))call SaveImageHandle(XY,(MKI),(185),(i))call SaveInteger(XY,(MKI),(30),(M8I(TMI)))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget(fx,TMI,"overhead")))call SaveUnitHandle(XY,(MKI),(2),(TLI))set TLI=nullset TMI=nullset i=nullset t=nullendfunctionfunction SW2 takes nothing returns booleanif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT thenif GetSpellAbilityId()==1093742926 and(IsUnitAlly(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))or MBI(GetSpellTargetUnit())==false)thencall SV2()endifelseif GetLearnedSkill()==1093742926 thencall SetPlayerAbilityAvailable(GetOwningPlayer(GetTriggerUnit()),1093743428,false)call QTI(GetTriggerUnit(),1093743428)endifendifreturn falseendfunctionfunction SX2 takes nothing returns booleanif GetSpellAbilityId()==1093742926 thenif(LoadBoolean(XY,(GetHandleId(GetOwningPlayer(GetSpellTargetUnit()))),(139)))and IsUnitAlly(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))==true thencall R6I(GetTriggerUnit())call R1I(GetOwningPlayer(GetTriggerUnit()),GetObjectName(1848652600))endifendifreturn falseendfunctionfunction NQ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function SW2))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function SX2))set t=nullendfunctionfunction SY2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer USI=1local player plocal real dlocal unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer SJ2=(LoadInteger(XY,(MKI),(136)))local integer BP1=(LoadInteger(XY,(MKI),(188)))if GetTriggerEventId()==EVENT_UNIT_DEATH or GetTriggerEvalCount(t)>BP1 thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseloopexitwhen USI>SJ2set p=(LoadPlayerHandle(XY,(MKI),(1300+USI)))set d=(LoadReal(XY,(MKI),(1200+USI)))if p==null thenset USI=SJ2elsecall SetUnitState(TMI,UNIT_STATE_LIFE,RQI(1,GetUnitState(TMI,UNIT_STATE_LIFE)-d/BP1))endifset USI=USI+1endloopendifset t=nullset p=nullset TMI=nullreturn falseendfunctionfunction SK2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local player p=(LoadPlayerHandle(XY,(MKI),(54)))local trigger SL2=(LoadTriggerHandle(XY,(MKI),(135)))local integer USI=GetTriggerEvalCount(t)if GetTriggerEventId()!=EVENT_UNIT_DAMAGED thencall FlushChildHashtable(XY,(MKI))call MZI(t)call TriggerRegisterTimerEvent(SL2,1,true)call TriggerAddCondition(SL2,Condition(function SY2))call UnitRemoveAbility(TMI,1110456661)elseset MKI=GetHandleId(SL2)call SetUnitState(TMI,UNIT_STATE_LIFE,GetUnitState(TMI,UNIT_STATE_LIFE)+0.5*GetEventDamage())call SavePlayerHandle(XY,(MKI),(1300+USI),(GetOwningPlayer(GetEventDamageSource())))call SaveReal(XY,(MKI),(1200+USI),((0.5*GetEventDamage())*1.0))call SaveInteger(XY,(MKI),(136),(USI))endifset t=nullset TMI=nullset p=nullset SL2=nullreturn falseendfunctionfunction SM2 takes nothing returns nothinglocal unit TLI=A3Ilocal unit TMI=GetEnumUnit()local integer NGI=A4Ilocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer BP1=10local trigger SL2=CreateTrigger()call O11(TMI,1093743158,1,BP1)call UnitMakeAbilityPermanent(TMI,true,1093743158)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093743158,false)call TriggerRegisterTimerEvent(t,BP1+0.01,false)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function SK2))call SavePlayerHandle(XY,(MKI),(54),(GetOwningPlayer(TLI)))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveTriggerHandle(XY,(MKI),(135),(SL2))call SaveUnitHandle(XY,(GetHandleId(SL2)),(17),(TMI))call SaveInteger(XY,(GetHandleId(SL2)),(188),(BP1))set TLI=nullset TMI=nullset t=nullset SL2=nullendfunctionfunction SN2 takes nothing returns booleanif(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))==false and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))and IsUnitInGroup(GetFilterUnit(),A2I)==false thencall GroupAddUnit(A2I,GetFilterUnit())return trueendifreturn falseendfunctionfunction SS2 takes nothing returns nothinglocal unit TLI=A3Ilocal unit TMI=GetEnumUnit()local integer NGI=A4Icall BQ1(TLI,TMI,1.4)call TKI(TLI,TMI,1,300+100*NGI)set TLI=nullset TMI=nullendfunctionfunction ST2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit UII=(LoadUnitHandle(XY,(MKI),(45)))local unit SR2local real NN2=(LoadReal(XY,(MKI),(13)))local real P4I=GetUnitX(UII)local real P5I=GetUnitY(UII)local real P6I=(LoadReal(XY,(MKI),(66)))local real P7I=(LoadReal(XY,(MKI),(67)))local integer MFI=GetTriggerEvalCount(t)local real U2I=RCI(P6I+13.33*MFI*Cos(NN2))local real U3I=RGI(P7I+13.33*MFI*Sin(NN2))local integer NGI=(LoadInteger(XY,(MKI),(5)))local group SP2=(LoadGroupHandle(XY,(MKI),(187)))local group gif MFI<19 thencall SetUnitVertexColor(UII,255,255,255,5+MFI*10)set SR2=(LoadUnitHandle(XY,(MKI),(186)))call SetUnitVertexColor(SR2,255,255,255,5+MFI*10)elseif MFI<125 thencall SetUnitVertexColor(UII,255,255,255,190)elseif MFI<150 thenendifset g=MDI()set A2I=SP2set CK=UIIset A3I=UIIset A4I=NGIcall GroupEnumUnitsInRange(g,GetUnitX(UII),GetUnitY(UII),425,Condition(function SN2))call ForGroup(g,function SM2)call MCI(g)call SetUnitX(UII,U2I)call SetUnitY(UII,U3I)if MFI==140 thenset SR2=(LoadUnitHandle(XY,(MKI),(186)))call KillUnit(SR2)elseif MFI<140 thenset SR2=(LoadUnitHandle(XY,(MKI),(186)))call SetUnitX(SR2,U2I)call SetUnitY(SR2,U3I)endifif MFI==150 thenset g=MDI()set CK=UIIcall GroupEnumUnitsInRange(g,U2I,U3I,425+25,Condition(function AT1))call ForGroup(g,function SS2)call MCI(g)call KillUnit(UII)call MCI(SP2)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset UII=nullset SR2=nullset SP2=nullset g=nullreturn falseendfunctionfunction SQ2 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local real P4I=GetUnitX(N0I)local real P5I=GetUnitY(N0I)local location l=GetSpellTargetLoc()local real x0=GetLocationX(l)local real y0=GetLocationY(l)local real NN2local real x1local real y1local real x2local real y2local trigger tlocal integer MKIlocal integer NGIlocal unit UIIlocal unit SR2local string s=""local integer SU2=1747990101if GetRandomInt(0,5)==0 thenset SU2=1747993674endifif IsPlayerAlly(GetOwningPlayer(N0I),GetLocalPlayer())or TGI(GetLocalPlayer())thenset s="war3mapImported\\Whirlpool.mdx"endifif x0==GetUnitX(N0I)and y0==GetUnitY(N0I)thenset x0=x0+50*Cos(GetUnitFacing(N0I)*bj_DEGTORAD)set y0=y0+50*Sin(GetUnitFacing(N0I)*bj_DEGTORAD)endifset NN2=Atan2(y0-P5I,x0-P4I)set x1=P4I-1000*Cos(NN2)set y1=P5I-1000*Sin(NN2)set x2=P4I+1000*Cos(NN2)set y2=P5I+1000*Sin(NN2)set t=CreateTrigger()set MKI=GetHandleId(t)set NGI=GetUnitAbilityLevel(N0I,1093742923)set UII=CreateUnit(GetOwningPlayer(N0I),SU2,x1,y1,Atan2(y0-P5I,x0-P4I)*bj_RADTODEG)set SR2=CreateUnit(GetOwningPlayer(N0I),1747990102,x1,y1,Atan2(y0-P5I,x0-P4I)*bj_RADTODEG)call SetUnitVertexColor(UII,255,255,255,0)call SetUnitPathing(UII,false)call RemoveLocation(l)call SaveInteger(XY,(MKI),(5),(NGI))call SaveReal(XY,(MKI),(13),((NN2)*1.0))call SaveUnitHandle(XY,(MKI),(45),(UII))call SaveUnitHandle(XY,(MKI),(186),(SR2))call SaveReal(XY,(MKI),(66),((x1)*1.0))call SaveReal(XY,(MKI),(67),((y1)*1.0))call SaveGroupHandle(XY,(MKI),(187),(MDI()))call DestroyEffect(AddSpecialEffect(s,RCI(x2),RGI(y2)))call TriggerRegisterTimerEvent(t,0.02,true)call TriggerAddCondition(t,Condition(function ST2))set N0I=nullset t=nullset UII=nullset SR2=nullset l=nullendfunctionfunction T02 takes nothing returns booleanif GetSpellAbilityId()==1093742923 thencall SQ2()endifreturn falseendfunctionfunction NU1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function T02))call RVI(1093742924)set t=nullendfunctionfunction TI2 takes nothing returns nothingcall TKI(A5I,GetEnumUnit(),2,A8I)call BQ1(A5I,GetEnumUnit(),A7I)endfunctionfunction T12 takes unit TLI,unit TMI,real PM1 returns nothinglocal group glocal integer NGI=GetUnitAbilityLevel(TLI,1093750345)local real xlocal real yset A5I=TLIset A8I=(80+70*NGI)*PM1/5.0set A7I=(1+0.75*NGI)*PM1/5.0set A6I=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call QTI(A6I,1093687350)call SetUnitAbilityLevel(A6I,1093687350,BR1(A7I))set CK=TLIset g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(TMI),GetUnitY(TMI),175+25,Condition(function AT1))if GetUnitTypeId(TMI)!=1747993156 thencall GroupAddUnit(g,TMI)endifcall ForGroup(g,function TI2)call MCI(g)call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\DemolisherFireMissile\\DemolisherFireMissile.mdl",GetUnitX(TMI),GetUnitY(TMI)))endfunctionfunction TO2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit UII=(LoadUnitHandle(XY,(MKI),(45)))local real PM1=(LoadReal(XY,(MKI),(444)))local real T22=(LoadReal(XY,(MKI),(445)))local real NN2=PUI(GetUnitX(UII),GetUnitY(UII),GetUnitX(TMI),GetUnitY(TMI))local real x=GetUnitX(UII)+18*Cos(NN2*bj_DEGTORAD)local real y=GetUnitY(UII)+18*Sin(NN2*bj_DEGTORAD)call SetUnitX(UII,x)call SetUnitY(UII,y)if PAI(x,y,GetUnitX(TMI),GetUnitY(TMI))<=18 thencall KillUnit(UII)call T12(TLI,TMI,PM1)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullset UII=nullreturn falseendfunctionfunction T32 takes unit TLI,unit TMI,real PM1,real T22 returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit UII=CreateUnit(GetOwningPlayer(TLI),1747993156,GetUnitX(TLI),GetUnitY(TLI),GetUnitFacing(TLI))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(45),(UII))call SaveReal(XY,(MKI),(444),((PM1)*1.0))call SaveReal(XY,(MKI),(445),((T22)*1.0))call TriggerRegisterTimerEvent(t,0.02,true)call TriggerAddCondition(t,Condition(function TO2))set t=nullset UII=nullendfunctionfunction T42 takes string Q3I,unit TMI,unit N0I returns nothinglocal texttag tt=CreateTextTag()call SetTextTagText(tt,Q3I,0.033)call SetTextTagPosUnit(tt,TMI,64)call SetTextTagColor(tt,255,0,0,255)call SetTextTagVelocity(tt,0,0.0355)call SetTextTagFadepoint(tt,0.15)call SetTextTagPermanent(tt,false)call SetTextTagLifespan(tt,0.65)if IsUnitAlly(N0I,GetLocalPlayer())or TGI(GetLocalPlayer())thencall SetTextTagVisibility(tt,true)elsecall SetTextTagVisibility(tt,false)endifset tt=nullendfunctionfunction T52 takes real BP1 returns stringif BP1>4.5 thenreturn"5.0"elseif BP1>4.0 thenreturn"4.5"elseif BP1>3.5 thenreturn"4.0"elseif BP1>3.0 thenreturn"3.5"elseif BP1>2.5 thenreturn"3.0"elseif BP1>2.0 thenreturn"2.5"elseif BP1>1.5 thenreturn"2.0"elseif BP1>1.0 thenreturn"1.5"elseif BP1>0.5 thenreturn"1.0"elseif BP1>0.0 thenreturn"0.5"elsereturn"0.0"endifreturn" "endfunctionfunction T62 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real T22=(LoadReal(XY,(MKI),(442)))local real F21=(TimerGetElapsed(M))local real OXO=5.0-(F21-T22)local real P1I=RPI(F21-T22,5.0)local integer MFI=(LoadInteger(XY,(MKI),(34)))+1if GetTriggerEventId()==EVENT_UNIT_DEATH thencall T12(TLI,TLI,5.0)if(LoadInteger(XY,(GetHandleId(TLI)),(704)))==0 or(LoadInteger(XY,(GetHandleId(TLI)),(704)))==1093750345 thencall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093750345,true)endifcall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093750344,false)call SetUnitVertexColor(TLI,255,255,255,255)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT thenif GetSpellAbilityId()==1093750344 thenif MBI(GetSpellTargetUnit())==false thencall T32(TLI,GetSpellTargetUnit(),P1I,T22)endifif(LoadInteger(XY,(GetHandleId(TLI)),(704)))==0 or(LoadInteger(XY,(GetHandleId(TLI)),(704)))==1093750345 thencall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093750345,true)endifcall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093750344,false)call SetUnitVertexColor(TLI,255,255,255,255)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)endifelsecall SaveInteger(XY,(MKI),(34),(MFI))if OXO>=0 thencall T42(T52(OXO),TLI,TLI)if ModuloInteger(MFI,2)==0 thencall SetUnitVertexColor(TLI,255,125,125,255)elsecall SetUnitVertexColor(TLI,255,175,175,255)endifelsecall SetUnitVertexColor(TLI,255,0,0,255)endifif F21-T22>(5.0+0.5)thencall T12(TLI,TLI,5.0)if(LoadInteger(XY,(GetHandleId(TLI)),(704)))==0 or(LoadInteger(XY,(GetHandleId(TLI)),(704)))==1093750345 thencall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093750345,true)endifcall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093750344,false)call SetUnitVertexColor(TLI,255,255,255,255)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)endifendifset t=nullset TLI=nullreturn falseendfunctionfunction T72 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local string s="war3mapImported\\UnstableConcoctionRangeDisplay3.mdx"if GetLocalPlayer()!=GetOwningPlayer(TLI)thenset s=""endifcall SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(442),(((TimerGetElapsed(M)))*1.0))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget(s,TLI,"origin")))call TriggerRegisterTimerEvent(t,0.5,true)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function T62))call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093750345,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093750344,true)call QTI(TLI,1093750344)call UnitMakeAbilityPermanent(TLI,true,1093750344)call TriggerEvaluate(t)set TLI=nullset t=nullendfunctionfunction T82 takes nothing returns booleanif GetSpellAbilityId()==1093750345 thencall T72()endifreturn falseendfunctionfunction LK1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function T82))call RVI(1093687350)set t=nullendfunctionfunction T92 takes nothing returns booleanreturn GetUnitAbilityLevel(GetKillingUnit(),1093685043)>0 and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit()))and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitIllusion(GetTriggerUnit())==falseendfunctionfunction TA2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit u=(LoadUnitHandle(XY,(MKI),(26)))call SaveInteger(XY,(GetHandleId(u)),(27),((LoadInteger(XY,(GetHandleId(u)),(27)))-1))call FlushChildHashtable(XY,(MKI))call MZI(t)set u=nullset t=nullreturn falseendfunctionfunction TB2 takes nothing returns nothinglocal unit R7I=GetKillingUnit()local unit TC2=GetTriggerUnit()local integer MKI=GetHandleId(R7I)local integer TD2=(LoadInteger(XY,(MKI),(27)))local integer NGI=GetUnitAbilityLevel(R7I,1093685043)local integer TE2=TD2*NGIlocal integer TF2=RSI(TE2+NGI*2+2,30)local texttag tt=CreateTextTag()local player p=GetOwningPlayer(R7I)local trigger t=CreateTrigger()set A9I[GetPlayerId(p)]=A9I[GetPlayerId(p)]+TF2call TriggerRegisterTimerEvent(t,25,false)call TriggerAddCondition(t,Condition(function TA2))call SaveUnitHandle(XY,(GetHandleId(t)),(26),(R7I))call SaveInteger(XY,(MKI),(27),(TD2+1))call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,TF2+GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD))call SetTextTagText(tt,"+"+I2S(TF2),0.025)call SetTextTagPosUnit(tt,TC2,0)call SetTextTagColor(tt,255,220,0,255)call SetTextTagVelocity(tt,0,0.03)if GetLocalPlayer()==p thencall SetTextTagVisibility(tt,true)elsecall SetTextTagVisibility(tt,false)endifcall SetTextTagFadepoint(tt,2)call SetTextTagLifespan(tt,3)call SetTextTagPermanent(tt,false)set t=nullendfunctionfunction TG2 takes nothing returns booleanlocal integer BC2=A9I[GetPlayerId(GetTriggerPlayer())]if(GetUnitTypeId(K1[GetPlayerId(GetTriggerPlayer())])==1311781193 or GetUnitTypeId(K1[GetPlayerId(GetTriggerPlayer())])==1311781192 or GetUnitTypeId(K1[GetPlayerId(GetTriggerPlayer())])==1311781204 or GetUnitTypeId(K1[GetPlayerId(GetTriggerPlayer())])==1311781194)and BC2>0 thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10.00,GetObjectName(1848657745)+" "+I2S(BC2))endifreturn falseendfunctionfunction LJ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_DEATH)call TriggerAddCondition(t,Condition(function T92))call TriggerAddAction(t,function TB2)set t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,BO[1],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[1],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-st",true)call TriggerAddCondition(t,Condition(function TG2))set t=nullendfunctionconstant function AcidSpray_RawCode takes nothing returns integerreturn 1093683532endfunctionconstant function AcidSpray_EffectCode takes nothing returns integerreturn 1093683764endfunctionfunction TH2 takes nothing returns booleanreturn GetSpellAbilityId()==(1093683532)endfunctionfunction TZ2 takes nothing returns booleanreturn IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(XO))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and GetUnitTypeId(GetFilterUnit())!=1848657461endfunctionfunction TV2 takes nothing returns nothingcall UnitDamageTarget(XO,GetEnumUnit(),JO,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)endfunctionfunction TW2 takes nothing returns nothinglocal timer t=GetExpiredTimer()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local integer TX2=(LoadInteger(XY,(MKI),(28)))local real x=GetUnitX(QHI)local real y=GetUnitY(QHI)local boolexpr PI1local group GK1if TX2>16 thencall KillUnit(QHI)call PauseTimer(t)call FlushChildHashtable(XY,(MKI))call DestroyTimer(t)elseset XO=N0Iset JO=8+GetUnitAbilityLevel(N0I,(1093683532))*6set PI1=Condition(function TZ2)set GK1=MDI()call GroupEnumUnitsInRange(GK1,x,y,650,PI1)call ForGroup(GK1,function TV2)call MCI(GK1)set TX2=TX2+1call SaveInteger(XY,(MKI),(28),(TX2))endifendfunctionfunction TY2 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local location O4O=GetSpellTargetLoc()local real x=GetLocationX(O4O)local real y=GetLocationY(O4O)local unit QHI=CreateUnit(GetOwningPlayer(N0I),1697657157,x,y,0)local timer t=CreateTimer()local integer MKI=GetHandleId(t)call RemoveLocation(O4O)call QTI(QHI,(1093683764))call SetUnitAbilityLevel(QHI,(1093683764),GetUnitAbilityLevel(N0I,(1093683532)))call QTI(QHI,1097625443)call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveInteger(XY,(MKI),(28),(0))call TimerStart(t,1,true,function TW2)endfunctionfunction LL1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddAction(t,function TY2)call TriggerAddCondition(t,Condition(function TH2))call RVI((1093683764))endfunctionfunction TJ2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local real QDO=GetUnitState(N0I,UNIT_STATE_MANA)call FlushChildHashtable(XY,(MKI))call MZI(t)call SetUnitState(N0I,UNIT_STATE_MANA,GetUnitState(N0I,UNIT_STATE_MAX_MANA))call SetUnitState(N0I,UNIT_STATE_MANA,QDO)set t=nullset N0I=nullreturn falseendfunctionfunction TK2 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit N0I=GetTriggerUnit()call TriggerRegisterTimerEvent(t,0.1,false)call TriggerAddCondition(t,Condition(function TJ2))call SaveUnitHandle(XY,(MKI),(14),(N0I))set t=nullset N0I=nullendfunctionfunction TL2 takes nothing returns booleanif GetSpellAbilityId()==1095656306 and GetUnitTypeId(GetTriggerUnit())==1311781193 thencall TK2()endifreturn falseendfunctionfunction Register_ChemicalRage takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function TL2))set t=nullendfunctionfunction TM2 takes nothing returns nothingcall TKI(ABI,GetEnumUnit(),1,AAI)endfunctionfunction TN2 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(N0I,1093818181)local real TSI=(0.35+0.25*NGI)*(GetUnitState(TMI,UNIT_STATE_MAX_MANA)-GetUnitState(TMI,UNIT_STATE_MANA))local group g=MDI()call BQ1(N0I,TMI,0.1*NGI)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\DragonHawkMissile\\DragonHawkMissile.mdl",TMI,"chest"))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\SpiritOfVengeanceMissile\\SpiritOfVengeanceMissile.mdl",TMI,"chest"))call DestroyEffect(AddSpecialEffect("war3mapImported\\Enchantment.mdx",GetUnitX(TMI),GetUnitY(TMI)))call GroupEnumUnitsInRange(g,GetUnitX(TMI),GetUnitY(TMI),500+25,Condition(function AK1))set AAI=TSIset ABI=N0Icall ForGroup(g,function TM2)call PlaySoundOnUnitBJ(PC,100,TMI)call MCI(g)set N0I=nullset TMI=nullset g=nullendfunctionfunction TS2 takes nothing returns booleanif GetSpellAbilityId()==1093818181 and MBI(GetSpellTargetUnit())==false thencall TN2()endifreturn falseendfunctionfunction VO1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function TS2))set t=nullendfunctionfunction TT2 takes unit TLI,unit TMI returns nothinglocal integer NGI=GetUnitAbilityLevel(TLI,1093752374)local real TR2=16+12*NGIlocal real TP2=GetUnitState(TMI,UNIT_STATE_MANA)local real TQ2=RMinBJ(TR2,TP2)if TQ2>0 thencall SetUnitState(TMI,UNIT_STATE_MANA,TP2-TQ2)call TKI(TLI,TMI,2,TQ2*0.6)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Feedback\\SpellBreakerAttack.mdl",TMI,"origin"))endifendfunctionfunction TU2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer TRI=(LoadInteger(XY,(MKI),(30)))local unit TMI=M6I(TRI)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamageSource()==TLI thencall DisableTrigger(t)call TT2(TLI,TMI)call M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifelsecall M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction R02 takes nothing returns nothinglocal trigger t=CreateTrigger()local unit TMI=GetTriggerUnit()local unit TLI=GetAttacker()local integer MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,0.4,false)call TriggerAddCondition(t,Condition(function TU2))call SaveInteger(XY,(MKI),(30),(M8I(TMI)))call SaveUnitHandle(XY,(MKI),(2),(TLI))set TMI=nullset TLI=nullset t=nullendfunctionfunction RI2 takes nothing returns nothinglocal unit TLI=GetAttacker()if((LoadInteger(XY,(GetHandleId((TLI))),((4274))))==1)==false thencall MPI(TLI,4274,0.4)call R02()endifendfunctionfunction R12 takes nothing returns booleanif GetUnitAbilityLevel(GetAttacker(),1093752374)>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(14)))and GetUnitTypeId(GetTriggerUnit())!=1848651852 and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))and T6I(GetTriggerUnit())==false thencall RI2()endifreturn falseendfunctionfunction RO2 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function R12))call SaveUnitHandle(XY,(GetHandleId(t)),(14),(GetTriggerUnit()))set t=nullendfunctionfunction R22 takes nothing returns booleanif GetLearnedSkill()==1093752374 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093752374)==1 thencall RO2()endifreturn falseendfunctionfunction V31 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function R22))set t=nullendfunctionfunction R32 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local integer MFI=GetTriggerEvalCount(t)local integer N5O=R2I(((0.9-0.3)/0.5)/0.03)local integer R42=R2I((175/N5O))local integer R52=R2I((255/N5O)*1.75)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))if MFI>N5O thencall SetUnitVertexColor(QHI,255,255,255,0)call SetUnitVertexColor(N0I,255,255,255,255)call ShowUnit(QHI,false)call FlushChildHashtable(XY,(MKI))call MZI(t)elsecall SetUnitVertexColor(QHI,255,255,255,175-R42*MFI)call SetUnitX(QHI,x)call SetUnitY(QHI,y)call SetUnitVertexColor(N0I,255,255,255,R52*MFI)endifset t=nullset QHI=nullset N0I=nullreturn falseendfunctionfunction R62 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local unit QHI=(LoadUnitHandle(XY,(GetHandleId(N0I)),(293)))local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real x=GetUnitX(N0I)local real y=GetUnitY(N0I)call SetUnitX(QHI,x)call SetUnitY(QHI,y)call SetUnitX(N0I,x)call SetUnitY(N0I,y)call SetUnitVertexColor(N0I,255,255,255,0)call SetUnitVertexColor(QHI,255,255,255,175)call SetUnitTimeScale(QHI,0.5)call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))call TriggerRegisterTimerEvent(t,0.03,true)call TriggerAddCondition(t,Condition(function R32))set N0I=nullset QHI=nullset t=nullendfunctionfunction R72 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local unit QHIlocal integer MKI=GetHandleId(N0I)local location l=GetSpellTargetLoc()local real a=PUI(GetUnitX(N0I),GetUnitY(N0I),GetLocationX(l),GetLocationY(l))local real x=GetUnitX(N0I)local real y=GetUnitY(N0I)call RemoveLocation(l)call SetUnitPathing(N0I,false)call QTI(N0I,1097167976)set QHI=CreateUnit(GetOwningPlayer(N0I),1747990091,GetUnitX(N0I),GetUnitY(N0I),a)call IA1(QHI,5)call SetUnitPathing(QHI,false)call QTI(QHI,1097167976)call QTI(QHI,1097625443)call QTI(QHI,1093678162)call SetUnitVertexColor(QHI,255,255,255,0)call SetUnitX(QHI,x)call SetUnitY(QHI,y)call SetUnitX(N0I,x)call SetUnitY(N0I,y)call SetUnitAnimation(QHI,"Spell Throw")call SetUnitPathing(N0I,true)call UnitRemoveAbility(N0I,1097167976)call SaveUnitHandle(XY,(MKI),(293),(QHI))set N0I=nullset QHI=nullendfunctionfunction R82 takes nothing returns booleanif GetSpellAbilityId()==1095066220 thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT thencall R62()elsecall R72()endifendifreturn falseendfunctionfunction V21 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function R82))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function R82))set t=nullcall IK1(1747990091)endfunctionfunction R92 takes nothing returns booleanreturn GetSpellAbilityId()==1093685041endfunctionfunction TreeKiller takes nothing returns nothingcall KillDestructable(GetEnumDestructable())endfunctionfunction RA2 takes unit R7I,real x,real y,group WVO returns nothinglocal group GK1=MDI()local unit V11call QEI(x,y,150)call GroupEnumUnitsInRange(GK1,x,y,150,Condition(function LWI))loopset V11=FirstOfGroup(GK1)exitwhen V11==nullif(IsUnitInGroup(V11,WVO)==false and IsUnitEnemy(V11,GetOwningPlayer(R7I)))thenif(GetUnitAbilityLevel(V11,1093678162)!=1 and GetUnitState(V11,UNIT_STATE_LIFE)>0 and IsUnitType(V11,UNIT_TYPE_STRUCTURE)==false)thencall GroupAddUnit(WVO,V11)call UnitDamageTarget(R7I,V11,60+GetUnitAbilityLevel(R7I,1093685041)*30,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_METAL_HEAVY_SLICE)call AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",V11,"overhead")endifendifcall GroupRemoveUnit(GK1,V11)endloopcall MCI(GK1)endfunctionfunction RB2 takes nothing returns nothinglocal integer MKI=GetHandleId(GetExpiredTimer())local unit RC2=(LoadUnitHandle(XY,(MKI),(290)))local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local real Ax=(LoadReal(XY,(MKI),(284)))local real Ay=(LoadReal(XY,(MKI),(285)))local real Cx=(LoadReal(XY,(MKI),(286)))local real Cy=(LoadReal(XY,(MKI),(287)))local real Bx=(LoadReal(XY,(MKI),(288)))local real By=(LoadReal(XY,(MKI),(289)))local real a=(LoadReal(XY,(MKI),(137)))local real b=1-alocal boolean RD2=(LoadBoolean(XY,(MKI),(291)))local group WVO=(LoadGroupHandle(XY,(MKI),(133)))local real RE2=RMaxBJ(PAI(Ax,Ay,Cx,Cy)/1300,0.4)call SetUnitX(RC2,RCI(Ax*a*a+Bx*2*a*b+Cx*b*b))call SetUnitY(RC2,RGI(Ay*a*a+By*2*a*b+Cy*b*b))call RA2(N0I,GetUnitX(RC2),GetUnitY(RC2),WVO)if(RD2)thencall SaveReal(XY,(MKI),(137),((a-.02/RE2)*1.0))elsecall SaveReal(XY,(MKI),(137),((a+.02/RE2)*1.0))call SaveReal(XY,(MKI),(284),((GetUnitX(N0I))*1.0))call SaveReal(XY,(MKI),(285),((GetUnitY(N0I))*1.0))endifif(a<0 and RD2)thencall SaveBoolean(XY,(MKI),(291),(false))call SaveReal(XY,(MKI),(288),((Ax+300*Cos(Atan2(Cy-Ay,Cx-Ax)+(LoadReal(XY,(MKI),(292)))))*1.0))call SaveReal(XY,(MKI),(289),((Ay+300*Sin(Atan2(Cy-Ay,Cx-Ax)+(LoadReal(XY,(MKI),(292)))))*1.0))endifif(a>1 and RD2==false)thencall PauseTimer(GetExpiredTimer())call MCI(WVO)call FlushChildHashtable(XY,(MKI))call RemoveUnit(RC2)call DestroyTimer(GetExpiredTimer())endifendfunctionfunction RF2 takes nothing returns nothinglocal unit R7I=GetTriggerUnit()local real Ax=GetUnitX(R7I)local real Ay=GetUnitY(R7I)local real Cx=GetLocationX(GetSpellTargetLoc())local real Cy=GetLocationY(GetSpellTargetLoc())local unit RG2=CreateUnit(GetOwningPlayer(R7I),1697657172,Ax,Ay,270.0)local unit RH2=CreateUnit(GetOwningPlayer(R7I),1697657172,Ax,Ay,270.0)local integer RZ2local integer RV2local timer RW2=CreateTimer()local timer RX2=CreateTimer()if GetSpellTargetUnit()!=null thenset Cx=GetUnitX(GetSpellTargetUnit())set Cy=GetUnitY(GetSpellTargetUnit())endifcall QTI(RG2,1097691750)call UnitRemoveAbility(RG2,1097691750)call SetUnitFlyHeight(RG2,150,0)call QTI(RH2,1097691750)call UnitRemoveAbility(RH2,1097691750)call SetUnitFlyHeight(RH2,150,0)set RZ2=GetHandleId(RW2)call SaveUnitHandle(XY,(RZ2),(14),(R7I))call SaveUnitHandle(XY,(RZ2),(290),(RG2))call SaveGroupHandle(XY,(RZ2),(133),(MDI()))call SaveReal(XY,(RZ2),(284),((Ax)*1.0))call SaveReal(XY,(RZ2),(285),((Ay)*1.0))call SaveReal(XY,(RZ2),(286),((Cx)*1.0))call SaveReal(XY,(RZ2),(287),((Cy)*1.0))call SaveReal(XY,(RZ2),(288),((Ax+300*Cos(Atan2(Cy-Ay,Cx-Ax)+45))*1.0))call SaveReal(XY,(RZ2),(289),((Ay+300*Sin(Atan2(Cy-Ay,Cx-Ax)+45))*1.0))call SaveReal(XY,(RZ2),(137),((1)*1.0))call SaveReal(XY,(RZ2),(292),((-45)*1.0))call SaveBoolean(XY,(RZ2),(291),(true))set RV2=GetHandleId(RX2)call SaveUnitHandle(XY,(RV2),(14),(R7I))call SaveUnitHandle(XY,(RV2),(290),(RH2))call SaveGroupHandle(XY,(RV2),(133),(MDI()))call SaveReal(XY,(RV2),(284),((Ax)*1.0))call SaveReal(XY,(RV2),(285),((Ay)*1.0))call SaveReal(XY,(RV2),(286),((Cx)*1.0))call SaveReal(XY,(RV2),(287),((Cy)*1.0))call SaveReal(XY,(RV2),(288),((Ax+300*Cos(Atan2(Cy-Ay,Cx-Ax)-45))*1.0))call SaveReal(XY,(RV2),(289),((Ay+300*Sin(Atan2(Cy-Ay,Cx-Ax)-45))*1.0))call SaveReal(XY,(RV2),(137),((1)*1.0))call SaveReal(XY,(RV2),(292),((45)*1.0))call SaveBoolean(XY,(RV2),(291),(true))call TimerStart(RW2,.025,true,function RB2)call TimerStart(RX2,.025,true,function RB2)endfunctionfunction V51 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function R92))call TriggerAddAction(t,function RF2)endfunctionfunction RY2 takes nothing returns nothinglocal real x=GetUnitX(GetEnumUnit())local real y=GetUnitY(GetEnumUnit())local real a=bj_RADTODEG*Atan2(y-UJ,x-QJ)local real RJ2local real RK2if Sin((a-IK)*bj_DEGTORAD)<0 thenset RJ2=GetUnitX(GetEnumUnit())+15*Cos((IK-90)*bj_DEGTORAD)set RK2=GetUnitY(GetEnumUnit())+15*Sin((IK-90)*bj_DEGTORAD)call SetUnitPosition(GetEnumUnit(),RJ2,RK2)call SetUnitFacingTimed(GetEnumUnit(),IK+90,0.3)elseset RJ2=GetUnitX(GetEnumUnit())+15*Cos((IK+90)*bj_DEGTORAD)set RK2=GetUnitY(GetEnumUnit())+15*Sin((IK+90)*bj_DEGTORAD)call SetUnitPosition(GetEnumUnit(),RJ2,RK2)call SetUnitFacingTimed(GetEnumUnit(),IK-90,0.3)endifcall DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",GetEnumUnit(),"origin"))endfunctionfunction RL2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local real NN2=(LoadReal(XY,(MKI),(13)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local group g=(LoadGroupHandle(XY,(MKI),(22)))if GetTriggerEvalCount(t)>16 thencall MCI(g)call FlushChildHashtable(XY,(MKI))call MZI(t)elseset QJ=xset UJ=yset IK=NN2call ForGroup(g,function RY2)endifset t=nullset g=nullreturn falseendfunctionfunction RM2 takes nothing returns nothingcall TKI(CK,GetEnumUnit(),1,QJ)endfunctionfunction RN2 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit N0I=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(N0I,1093685042)local unit QHIlocal real NN2=bj_RADTODEG*Atan2(GetUnitY(TMI)-GetUnitY(N0I),GetUnitX(TMI)-GetUnitX(N0I))local real xlocal real ylocal group g=MDI()local group g2=MDI()if NGI==0 thenset NGI=GetUnitAbilityLevel(N0I,1093810233)endifcall SaveGroupHandle(XY,(MKI),(22),(g))call SaveReal(XY,(MKI),(13),((NN2)*1.0))call SaveReal(XY,(MKI),(6),((GetUnitX(N0I))*1.0))call SaveReal(XY,(MKI),(7),((GetUnitY(N0I))*1.0))call TriggerRegisterTimerEvent(t,0.025,true)call TriggerAddCondition(t,Condition(function RL2))set x=GetUnitX(N0I)+50*Cos(NN2*bj_DEGTORAD)set y=GetUnitY(N0I)+50*Sin(NN2*bj_DEGTORAD)call GroupEnumUnitsInRange(g2,x,y,250,Condition(function AK1))call GroupAddGroup(g2,g)call GroupClear(g2)set QHI=CreateUnit(GetOwningPlayer(N0I),1865429081,x,y,NN2)call UnitApplyTimedLife(QHI,1112820806,1)call QTI(QHI,1093684825)call SetUnitAbilityLevel(QHI,1093684825,NGI)call IssueImmediateOrder(QHI,"thunderclap")set x=GetUnitX(N0I)+250*Cos(NN2*bj_DEGTORAD)set y=GetUnitY(N0I)+250*Sin(NN2*bj_DEGTORAD)call GroupEnumUnitsInRange(g2,x,y,250,Condition(function AK1))call GroupAddGroup(g2,g)call GroupClear(g2)set QHI=CreateUnit(GetOwningPlayer(N0I),1865429081,x,y,NN2)call UnitApplyTimedLife(QHI,1112820806,1)call QTI(QHI,1093684825)call SetUnitAbilityLevel(QHI,1093684825,NGI)call IssueImmediateOrder(QHI,"thunderclap")set x=GetUnitX(N0I)+450*Cos(NN2*bj_DEGTORAD)set y=GetUnitY(N0I)+450*Sin(NN2*bj_DEGTORAD)call GroupEnumUnitsInRange(g2,x,y,250,Condition(function AK1))call GroupAddGroup(g2,g)call GroupClear(g2)set QHI=CreateUnit(GetOwningPlayer(N0I),1865429081,x,y,NN2)call UnitApplyTimedLife(QHI,1112820806,1)call QTI(QHI,1093684825)call SetUnitAbilityLevel(QHI,1093684825,NGI)call IssueImmediateOrder(QHI,"thunderclap")if GetUnitAbilityLevel(N0I,1093685042)==0 thenset x=GetUnitX(N0I)+650*Cos(NN2*bj_DEGTORAD)set y=GetUnitY(N0I)+650*Sin(NN2*bj_DEGTORAD)call GroupEnumUnitsInRange(g2,x,y,250,Condition(function AK1))call GroupAddGroup(g2,g)call GroupClear(g2)set QHI=CreateUnit(GetOwningPlayer(N0I),1865429081,x,y,NN2)call UnitApplyTimedLife(QHI,1112820806,1)call QTI(QHI,1093684825)call SetUnitAbilityLevel(QHI,1093684825,NGI)call IssueImmediateOrder(QHI,"thunderclap")endifcall MCI(g2)call GroupRemoveUnit(g,TMI)set QJ=100*NGIset CK=N0Icall ForGroup(g,function RM2)set t=nullset N0I=nullset TMI=nullset QHI=nullset g=nullset g2=nullendfunctionfunction RS2 takes nothing returns booleanif(GetSpellAbilityId()==1093685042 or GetSpellAbilityId()==1093810233)and MBI(GetSpellTargetUnit())==false thencall RN2()endifreturn falseendfunctionfunction V41 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function RS2))set t=nullendfunctionfunction RT2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))call UnitRemoveAbility(TLI,1093743664)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullreturn falseendfunctionfunction RR2 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()call QTI(TLI,1093743664)call TriggerRegisterTimerEvent(t,5,false)call TriggerAddCondition(t,Condition(function RT2))call SaveUnitHandle(XY,(MKI),(2),(TLI))set t=nullset TLI=nullendfunctionfunction RP2 takes nothing returns booleanif GetSpellAbilityId()==1093743450 thencall RR2()endifreturn falseendfunctionfunction V71 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function RP2))set t=nullendfunctionfunction RQ2 takes nothing returns booleanreturn GetSpellAbilityId()==1093685071 or GetSpellAbilityId()==1093817653endfunctionfunction RU2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit P02=(LoadUnitHandle(XY,(MKI),(2)))local real PI2=(LoadReal(XY,(MKI),(6)))local real P12=(LoadReal(XY,(MKI),(7)))local real PO2=GetUnitX(P02)local real P22=GetUnitY(P02)call SaveReal(XY,(MKI),(6),((PO2)*1.0))call SaveReal(XY,(MKI),(7),((P22)*1.0))if GetTriggerEventId()==EVENT_UNIT_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseif PI2==PO2 and P12==P22 thenif GetUnitAbilityLevel(P02,1093752647)==0 thencall QTI(P02,1093752647)endifelseif GetUnitAbilityLevel(P02,1093752647)>0 thencall UnitRemoveAbility(P02,1093752647)endifendifendifset t=nullset P02=nullreturn falseendfunctionfunction P32 takes nothing returns nothingif ACI thenif(GetUnitTypeId(GetEnumUnit())==1848652113 or GetUnitTypeId(GetEnumUnit())==1848652114)thenendifelseif ADI thenif(GetUnitTypeId(GetEnumUnit())==1848652109 or GetUnitTypeId(GetEnumUnit())==1848652115)thenendifendifendfunctionfunction P42 takes nothing returns nothinglocal unit R7I=GetTriggerUnit()local player NJI=GetOwningPlayer(R7I)local integer NGI=GetUnitAbilityLevel(R7I,1093685071)local real x=GetUnitX(R7I)local real y=GetUnitY(R7I)local group GK1=MDI()local unit P02local trigger tlocal integer MKIlocal boolean P52=GetSpellAbilityId()==1093685071local boolean P62=GetSpellAbilityId()==1093817653set ACI=P52set ADI=P62call GroupEnumUnitsOfPlayer(GK1,NJI,Condition(function LWI))call ForGroup(GK1,function P32)call MCI(GK1)call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl",x,y))if(P52)thenif(NGI==1)thenset P02=CreateUnit(NJI,1848652113,x,y,270)call UnitApplyTimedLife(P02,1112820806,60)elseif(NGI==2)thenset P02=CreateUnit(NJI,1848652113,x,y,270)call UnitApplyTimedLife(P02,1112820806,60)elseif(NGI==3)thenset P02=CreateUnit(NJI,1848652114,x,y,270)call UnitApplyTimedLife(P02,1112820806,60)elseif(NGI==4)thenset P02=CreateUnit(NJI,1848652114,x,y,270)call UnitApplyTimedLife(P02,1112820806,60)endifif NGI==3 or NGI==4 thenset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.05,true)call TriggerRegisterUnitEvent(t,P02,EVENT_UNIT_DEATH)call SaveReal(XY,(MKI),(6),((GetUnitX(P02))*1.0))call SaveReal(XY,(MKI),(7),((GetUnitY(P02))*1.0))call SaveUnitHandle(XY,(MKI),(2),(P02))call TriggerAddCondition(t,Condition(function RU2))endifendifif(P62)thenif(NGI==1)thenelseif(NGI==2)thencall UnitApplyTimedLife(CreateUnit(NJI,1848652109,x,y,270),1112820806,60)elseif(NGI==3)thencall UnitApplyTimedLife(CreateUnit(NJI,1848652109,x,y,270),1112820806,60)elseif(NGI==4)thencall UnitApplyTimedLife(CreateUnit(NJI,1848652115,x,y,270),1112820806,60)endifendifendfunctionfunction P72 takes nothing returns booleanif GetLearnedSkill()==1093685071 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093685071)>=2 thenif GetUnitAbilityLevel(GetTriggerUnit(),1093685071)==2 thencall QTI(GetTriggerUnit(),1093817653)endifcall SetUnitAbilityLevel(GetTriggerUnit(),1093817653,GetUnitAbilityLevel(GetTriggerUnit(),1093685071))endifreturn falseendfunctionfunction V61 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function RQ2))call TriggerAddAction(t,function P42)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function P72))set t=nullendfunctionfunction P82 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local integer MKI=GetHandleId(TLI)local player p=(LoadPlayerHandle(XY,(MKI),(54)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local texttag tt=CreateTextTag()local integer SXIlocal integer i=1local unit ulocal player p2if NGI==1 thenset SXI=150elseif NGI==2 thenset SXI=200elseset SXI=250endifcall SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)+SXI)call SetTextTagText(tt,"+"+I2S(SXI),0.025)call SetTextTagPosUnit(tt,K1[GetPlayerId(p)],100)call SetTextTagColor(tt,255,220,0,255)call SetTextTagVelocity(tt,0,0.03)call SetTextTagVisibility(tt,false)if GetLocalPlayer()==p thencall SetTextTagVisibility(tt,true)endifcall SetTextTagFadepoint(tt,2)call SetTextTagLifespan(tt,3)call SetTextTagPermanent(tt,false)set EW0[GetPlayerId(p)]=EW0[GetPlayerId(p)]+SXIset AEI=AEI+SXIif NGI==1 thenset SXI=50elseif NGI==2 thenset SXI=100elseset SXI=150endifloopexitwhen i>5if NZI(p)thenset p2=BO[i]elseset p2=CO[i]endifif p2!=p thenset u=K1[GetPlayerId(p2)]if P8I(u,TLI)<950 thenset tt=CreateTextTag()call SetPlayerState(p2,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p2,PLAYER_STATE_RESOURCE_GOLD)+SXI)call SetTextTagText(tt,"+"+I2S(SXI),0.025)call SetTextTagPosUnit(tt,u,100)call SetTextTagColor(tt,255,220,0,255)call SetTextTagVelocity(tt,0,0.03)call SetTextTagVisibility(tt,false)if GetLocalPlayer()==p2 thencall SetTextTagVisibility(tt,true)endifcall SetTextTagFadepoint(tt,2)call SetTextTagLifespan(tt,3)call SetTextTagPermanent(tt,false)set EW0[GetPlayerId(p2)]=EW0[GetPlayerId(p2)]+SXIset AEI=AEI+SXIendifendifset i=i+1endloopset TLI=nullset p=nullset tt=nullendfunctionfunction P92 takes nothing returns booleanif IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==true and(LoadReal(XY,(GetHandleId(GetTriggerUnit())),(314)))>(TimerGetElapsed(M))thencall P82()endifreturn falseendfunctionfunction PA2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))call SetUnitX(QHI,GetUnitX(TMI))call SetUnitY(QHI,GetUnitY(TMI))if GetTriggerEventId()==EVENT_UNIT_DEATH or(GetTriggerEvalCount(t)>10 and GetUnitAbilityLevel(TMI,1110454348)==0)thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call KillUnit(QHI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TMI=nullset QHI=nullreturn falseendfunctionfunction PB2 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TMI=GetSpellTargetUnit()local unit TLI=GetTriggerUnit()local unit QHI=CreateUnit(GetOwningPlayer(TMI),1697657174,GetUnitX(TMI),GetUnitY(TMI),0)local string FX="war3mapImported\\TrackBuff.mdx"if IsPlayerAlly(GetLocalPlayer(),GetOwningPlayer(TMI))and TGI(GetLocalPlayer())==false thenset FX=""endifcall QTI(QHI,1093742901)call TriggerRegisterTimerEvent(t,0.1,true)call TriggerRegisterUnitEvent(t,GetSpellTargetUnit(),EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function PA2))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget(FX,TMI,"overhead")))call SaveReal(XY,(GetHandleId(GetSpellTargetUnit())),(314),(((TimerGetElapsed(M))+30)*1.0))call SavePlayerHandle(XY,(GetHandleId(GetSpellTargetUnit())),(54),(GetOwningPlayer(GetTriggerUnit())))call SaveInteger(XY,(GetHandleId(GetSpellTargetUnit())),(5),(GetUnitAbilityLevel(GetTriggerUnit(),1093681716)))set t=nullset TMI=nullset TLI=nullset QHI=nullendfunctionfunction PC2 takes nothing returns booleanif GetSpellAbilityId()==1093681716 thencall PB2()endifreturn falseendfunctionfunction VC1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function PC2))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_DEATH)call TriggerAddCondition(t,Condition(function P92))set t=nullendfunctionfunction Jinada_Swap takes nothing returns nothingcall SetPlayerAbilityAvailable(GetOwningPlayer(GM),1093749300,false)call SetPlayerAbilityAvailable(GetOwningPlayer(GM),1093749299,false)call SetPlayerAbilityAvailable(GetOwningPlayer(GM),1093749301,false)call SetPlayerAbilityAvailable(GetOwningPlayer(GM),1093749077,false)call SetPlayerAbilityAvailable(GetOwningPlayer(HM),1093749300,false)call SetPlayerAbilityAvailable(GetOwningPlayer(HM),1093749299,false)call SetPlayerAbilityAvailable(GetOwningPlayer(HM),1093749301,false)call SetPlayerAbilityAvailable(GetOwningPlayer(HM),1093749077,false)endfunctionfunction PD2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))call UnitRemoveAbility(TMI,1093749079)call UnitRemoveAbility(TMI,1110459201)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TMI=nullreturn falseendfunctionfunction PE2 takes unit TLI,unit TMI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,3,false)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function PD2))call SaveUnitHandle(XY,(MKI),(17),(TMI))call QTI(TMI,1093749079)call UnitMakeAbilityPermanent(TMI,true,1093749079)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093749079,false)call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\HumanBloodKnight.mdl",TMI,"chest"))set t=nullendfunctionfunction PF2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer TRI=(LoadInteger(XY,(MKI),(30)))local unit TMI=M6I(TRI)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamageSource()==TLI and(GetEventDamage()>40 or IsUnitType(TMI,UNIT_TYPE_STRUCTURE)==true or GetUnitTypeId(TMI)==1970107511 or GetUnitTypeId(TMI)==1700946284)and(LoadBoolean(XY,(GetHandleId(TLI)),(183)))==true thencall PE2(TLI,TMI)call SaveBoolean(XY,(GetHandleId(TLI)),(183),(false))call SaveReal(XY,(GetHandleId(TLI)),(184),(((TimerGetElapsed(M)))*1.0))call UnitRemoveAbility(TLI,1093749075)call UnitRemoveAbility(TLI,1093749300)call UnitRemoveAbility(TLI,1093749299)call UnitRemoveAbility(TLI,1093749301)call UnitRemoveAbility(TLI,1093749077)call FlushChildHashtable(XY,(GetHandleId((LoadTriggerHandle(XY,(MKI),(35))))))call MZI((LoadTriggerHandle(XY,(MKI),(35))))call M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifelsecall M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction PG2 takes nothing returns booleanlocal trigger tlocal integer MKIlocal unit TMIlocal unit TLIlocal integer NGIif GetTriggerEventId()==EVENT_UNIT_DEATH thencall SaveBoolean(XY,(GetHandleId(GetTriggerUnit())),(183),(false))call SaveReal(XY,(GetHandleId(GetTriggerUnit())),(184),(((TimerGetElapsed(M)))*1.0))call UnitRemoveAbility(GetTriggerUnit(),1093749075)call UnitRemoveAbility(GetTriggerUnit(),1093749300)call UnitRemoveAbility(GetTriggerUnit(),1093749299)call UnitRemoveAbility(GetTriggerUnit(),1093749301)call UnitRemoveAbility(GetTriggerUnit(),1093749077)call FlushChildHashtable(XY,(GetHandleId(GetTriggeringTrigger())))call MZI(GetTriggeringTrigger())elseif GetAttacker()==(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(182)))thenif IsUnitAlly(GetAttacker(),GetOwningPlayer(GetTriggerUnit()))==false and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false thenset t=CreateTrigger()set MKI=GetHandleId(t)set TMI=GetTriggerUnit()set TLI=GetAttacker()call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,2.5,false)call TriggerAddCondition(t,Condition(function PF2))call SaveInteger(XY,(MKI),(30),(M8I(TMI)))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveTriggerHandle(XY,(MKI),(35),(GetTriggeringTrigger()))set NGI=GetUnitAbilityLevel(GetAttacker(),1093749073)if NGI==0 thencall UnitRemoveAbility(GetAttacker(),1093749300)call UnitRemoveAbility(GetAttacker(),1093749299)call UnitRemoveAbility(GetAttacker(),1093749301)call UnitRemoveAbility(GetAttacker(),1093749077)elseif NGI==1 thencall UnitRemoveAbility(GetAttacker(),1093749299)call UnitRemoveAbility(GetAttacker(),1093749301)call UnitRemoveAbility(GetAttacker(),1093749077)elseif NGI==2 thencall UnitRemoveAbility(GetAttacker(),1093749300)call UnitRemoveAbility(GetAttacker(),1093749301)call UnitRemoveAbility(GetAttacker(),1093749077)elseif NGI==3 thencall UnitRemoveAbility(GetAttacker(),1093749300)call UnitRemoveAbility(GetAttacker(),1093749299)call UnitRemoveAbility(GetAttacker(),1093749077)elseif NGI==4 thencall UnitRemoveAbility(GetAttacker(),1093749300)call UnitRemoveAbility(GetAttacker(),1093749299)call UnitRemoveAbility(GetAttacker(),1093749301)endifset TMI=nullset TLI=nullset t=nullendifendifreturn falseendfunctionfunction PH2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local real POI=(TimerGetElapsed(M))local integer NGI=GetUnitAbilityLevel(N0I,1093749073)local real SE2=(LoadReal(XY,(GetHandleId(N0I)),(184)))local boolean PZ2=(LoadBoolean(XY,(GetHandleId(N0I)),(183)))if POI-SE2>14-NGI*2 and PZ2==false and GetUnitTypeId(N0I)==1315007329 and QPI(N0I)==false thencall SaveBoolean(XY,(GetHandleId(N0I)),(183),(true))set t=CreateTrigger()set MKI=GetHandleId(t)call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function PG2))call SaveUnitHandle(XY,(MKI),(182),(N0I))call QTI(N0I,1093749075)if GetUnitAbilityLevel(N0I,1110455864)==0 thenif NGI==1 thencall QTI(N0I,1093749300)elseif NGI==2 thencall QTI(N0I,1093749299)elseif NGI==3 thencall QTI(N0I,1093749301)elseif NGI==4 thencall QTI(N0I,1093749077)endifendifcall SetPlayerAbilityAvailable(GetOwningPlayer(N0I),1093749300,false)call SetPlayerAbilityAvailable(GetOwningPlayer(N0I),1093749299,false)call SetPlayerAbilityAvailable(GetOwningPlayer(N0I),1093749301,false)call SetPlayerAbilityAvailable(GetOwningPlayer(N0I),1093749077,false)elseif PZ2==false and GetUnitAbilityLevel(N0I,1110455864)==0 thencall UnitRemoveAbility(N0I,1093749075)call UnitRemoveAbility(N0I,1093749300)call UnitRemoveAbility(N0I,1093749299)call UnitRemoveAbility(N0I,1093749301)call UnitRemoveAbility(N0I,1093749077)endifset t=nullset N0I=nullreturn falseendfunctionfunction PV2 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.5,true)call TriggerAddCondition(t,Condition(function PH2))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveInteger(XY,(MKI),(181),(0))set N0I=nullset t=nullendfunctionfunction PW2 takes nothing returns booleanif GetLearnedSkill()==1093749073 and GetUnitAbilityLevel(GetTriggerUnit(),1093749073)==1 and IsUnitIllusion(GetTriggerUnit())==false thencall PV2()endifreturn falseendfunctionfunction VD1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function PW2))set t=nullendfunctionfunction PX2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer NGI=GetUnitAbilityLevel(TLI,1093678913)if GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamageSource()==TLI thencall FlushChildHashtable(XY,(MKI))call MZI(t)if((LoadInteger(XY,(GetHandleId((TLI))),((2487))))==1)==false thencall MPI(TLI,2487,0.5)if IsUnitType(TMI,UNIT_TYPE_STRUCTURE)==false and IsUnitEnemy(TMI,GetOwningPlayer(TLI))thencall TKI(TLI,TMI,2,30*NGI)call Q5I(I2S(R2I(30*NGI)),1,TLI,0.027,216,0,0,216)endifendifendifelsecall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction PY2 takes nothing returns nothinglocal trigger t=CreateTrigger()local unit TMI=GetTriggerUnit()local unit TLI=GetAttacker()local integer MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,2,false)call TriggerAddCondition(t,Condition(function PX2))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(2),(TLI))set TMI=nullset TLI=nullset t=nullendfunctionfunction PJ2 takes nothing returns booleanlocal integer NGIlocal unit N0Iif GetTriggerEventId()==EVENT_UNIT_SPELL_CAST or GetTriggerEventId()==EVENT_UNIT_DEATH thenset N0I=(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(14)))set NGI=GetUnitAbilityLevel(N0I,1093749073)if(LoadBoolean(XY,(GetHandleId(N0I)),(183)))thenset NGI=GetUnitAbilityLevel(N0I,1093749073)if NGI==0 thencall UnitRemoveAbility(N0I,1093749300)call UnitRemoveAbility(N0I,1093749299)call UnitRemoveAbility(N0I,1093749301)call UnitRemoveAbility(N0I,1093749077)elseif NGI==1 thencall UnitRemoveAbility(N0I,1093749299)call UnitRemoveAbility(N0I,1093749301)call UnitRemoveAbility(N0I,1093749077)elseif NGI==2 thencall UnitRemoveAbility(N0I,1093749300)call UnitRemoveAbility(N0I,1093749301)call UnitRemoveAbility(N0I,1093749077)elseif NGI==3 thencall UnitRemoveAbility(N0I,1093749300)call UnitRemoveAbility(N0I,1093749299)call UnitRemoveAbility(N0I,1093749077)elseif NGI==4 thencall UnitRemoveAbility(N0I,1093749300)call UnitRemoveAbility(N0I,1093749299)call UnitRemoveAbility(N0I,1093749301)endifelsecall UnitRemoveAbility(N0I,1093749300)call UnitRemoveAbility(N0I,1093749299)call UnitRemoveAbility(N0I,1093749301)call UnitRemoveAbility(N0I,1093749077)endifcall FlushChildHashtable(XY,(GetHandleId(GetTriggeringTrigger())))call MZI(GetTriggeringTrigger())elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED thenif GetAttacker()==(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(14)))thenif((LoadInteger(XY,(GetHandleId((GetAttacker()))),((2488))))==1)==false thencall FlushChildHashtable(XY,(GetHandleId(GetTriggeringTrigger())))call MZI(GetTriggeringTrigger())call PY2()endifif(LoadBoolean(XY,(GetHandleId(GetAttacker())),(183)))thenset NGI=GetUnitAbilityLevel(GetAttacker(),1093749073)if NGI==0 thencall UnitRemoveAbility(GetAttacker(),1093749300)call UnitRemoveAbility(GetAttacker(),1093749299)call UnitRemoveAbility(GetAttacker(),1093749301)call UnitRemoveAbility(GetAttacker(),1093749077)elseif NGI==1 thencall UnitRemoveAbility(GetAttacker(),1093749299)call UnitRemoveAbility(GetAttacker(),1093749301)call UnitRemoveAbility(GetAttacker(),1093749077)elseif NGI==2 thencall UnitRemoveAbility(GetAttacker(),1093749300)call UnitRemoveAbility(GetAttacker(),1093749301)call UnitRemoveAbility(GetAttacker(),1093749077)elseif NGI==3 thencall UnitRemoveAbility(GetAttacker(),1093749300)call UnitRemoveAbility(GetAttacker(),1093749299)call UnitRemoveAbility(GetAttacker(),1093749077)elseif NGI==4 thencall UnitRemoveAbility(GetAttacker(),1093749300)call UnitRemoveAbility(GetAttacker(),1093749299)call UnitRemoveAbility(GetAttacker(),1093749301)endifelsecall UnitRemoveAbility(GetAttacker(),1093749300)call UnitRemoveAbility(GetAttacker(),1093749299)call UnitRemoveAbility(GetAttacker(),1093749301)call UnitRemoveAbility(GetAttacker(),1093749077)endifendifelseset N0I=(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(14)))if(LoadBoolean(XY,(GetHandleId(N0I)),(183)))==false thencall UnitRemoveAbility(N0I,1093749300)call UnitRemoveAbility(N0I,1093749299)call UnitRemoveAbility(N0I,1093749301)call UnitRemoveAbility(N0I,1093749077)endifcall FlushChildHashtable(XY,(GetHandleId(GetTriggeringTrigger())))call MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction PK2 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TMI=GetSpellTargetUnit()local unit TLI=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093678913)call MPI(TLI,2488,1.25-0.25*NGI-0.01)call TriggerRegisterTimerEvent(t,15+5*NGI,false)call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_CAST)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function PJ2))call SaveUnitHandle(XY,(MKI),(14),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call QTI(TLI,1093749300)call QTI(TLI,1093749299)call QTI(TLI,1093749301)call QTI(TLI,1093749077)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093749300,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093749299,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093749301,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093749077,false)set t=nullset TMI=nullset TLI=nullendfunctionfunction PL2 takes nothing returns booleanif GetSpellAbilityId()==1093678913 thencall PK2()endifreturn falseendfunctionfunction VE1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function PL2))set t=nullendfunctionconstant function Warpath_AbilityCode takes nothing returns integerreturn 1093682774endfunctionconstant function Warpath_EffectCode takes nothing returns integerreturn 1093682502endfunctionconstant function Warpath_SprayCode takes nothing returns integerreturn 1093683024endfunctionconstant function Warpath_GooCode takes nothing returns integerreturn 1093682775endfunctionfunction PM2 takes nothing returns booleanreturn GetSpellAbilityId()==(1093683024)or GetSpellAbilityId()==(1093682775)endfunctionfunction PN2 takes integer NGI,integer a returns integerif a==0 thenreturn 1elseif NGI==1 thenreturn a+1elseif NGI==2 thenreturn a+6elseif NGI==3 thenreturn a+12endifendifreturn 1endfunctionfunction PS2 takes nothing returns booleanreturn GetUnitTypeId(GetFilterUnit())==1697656920endfunctionfunction PT2 takes nothing returns nothingcall RemoveUnit(GetEnumUnit())endfunctionfunction PR2 takes player p returns nothinglocal group g=MDI()call GroupEnumUnitsOfPlayer(g,p,Condition(function PS2))call ForGroup(g,function PT2)call MCI(g)set g=nullendfunctionfunction PP2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local unit N0I=(LoadUnitHandle(XY,(GetHandleId(t)),(14)))local integer MKI=GetHandleId(N0I)local integer NGI=GetUnitAbilityLevel(N0I,(1093682774))local integer PQ2=(LoadInteger(XY,(MKI),(315)))-1local integer PU2=RRI(PQ2,0,4+NGI)local unit QHI=(LoadUnitHandle(XY,(MKI),(316)))local integer Q02if NGI==1 thenset Q02=PU2*20elseif NGI==2 thenset Q02=PU2*25elseif NGI==3 thenset Q02=PU2*30endifif PQ2==0 thenset Q02=0endifcall EW1(N0I,Q02)if GetUnitTypeId(QHI)==1697656920 thencall SetUnitAbilityLevel(QHI,(1093682502),PN2(NGI,PU2))call SaveInteger(XY,(MKI),(315),(PQ2))elsecall PR2((LoadPlayerHandle(XY,(GetHandleId(t)),(54))))endifcall FlushChildHashtable(XY,(GetHandleId(t)))call MZI(t)set t=nullset N0I=nullset QHI=nullreturn falseendfunctionfunction QI2 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local integer MKI=GetHandleId(N0I)local unit QHI=(LoadUnitHandle(XY,(MKI),(316)))local integer NGI=GetUnitAbilityLevel(N0I,(1093682774))local integer PQ2=(LoadInteger(XY,(MKI),(315)))+1local integer PU2=RRI(PQ2,0,4+NGI)local integer Q12=PN2(NGI,PU2)local trigger t=CreateTrigger()local integer Q02if NGI==1 thenset Q02=PU2*20elseif NGI==2 thenset Q02=PU2*25elseif NGI==3 thenset Q02=PU2*30endifcall EW1(N0I,Q02)call SetUnitAbilityLevel(QHI,(1093682502),Q12)call SaveInteger(XY,(MKI),(315),(PQ2))call SaveUnitHandle(XY,(GetHandleId(t)),(14),(N0I))call SavePlayerHandle(XY,(GetHandleId(t)),(54),(GetOwningPlayer(N0I)))call TriggerRegisterTimerEvent(t,14,false)call TriggerAddCondition(t,Condition(function PP2))set t=nullendfunctionfunction QO2 takes nothing returns booleanreturn GetLearnedSkill()==(1093682774)and GetUnitAbilityLevel(GetTriggerUnit(),(1093682774))==1 and IsUnitIllusion(GetTriggerUnit())==falseendfunctionfunction Q22 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(N0I,(1093682774))local unit QHI=CreateUnit(GetOwningPlayer(N0I),1697656920,0,0,0)local trigger t=CreateTrigger()call QTI(QHI,(1093682502))call SaveUnitHandle(XY,(GetHandleId(N0I)),(316),(QHI))call SetUnitInvulnerable(QHI,true)call QTI(QHI,1097625443)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function PM2))call TriggerAddAction(t,function QI2)endfunctionfunction VF1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function QO2))call TriggerAddAction(t,function Q22)call RVI((1093682502))endfunctionfunction Q32 takes nothing returns booleanreturn GetSpellAbilityId()==1093683024endfunctionfunction Q42 takes nothing returns booleanreturn IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and GetUnitAbilityLevel(GetFilterUnit(),1093678162)!=1endfunctionfunction Q52 takes nothing returns nothinglocal integer Q62=GetHandleId(GetEnumUnit())local integer Q72=(LoadInteger(XY,(AFI),(Q62)))local real TSI=RPI(JO+Q72*30,400)call UnitDamageTarget(XO,GetEnumUnit(),TSI,false,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)call SaveInteger(XY,(AFI),(Q62),(Q72+1))endfunctionfunction Q82 takes nothing returns nothinglocal integer Q62=GetHandleId(GetEnumUnit())local integer Q72=(LoadInteger(XY,(AFI),(Q62)))call SaveInteger(XY,(AFI),(Q62),(Q72-1))endfunctionfunction Q92 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit R7I=(LoadUnitHandle(XY,(MKI),(221)))local group GK1=(LoadGroupHandle(XY,(MKI),(317)))set AFI=GetHandleId(R7I)call ForGroup(GK1,function Q82)call MCI(GK1)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullreturn falseendfunctionfunction QA2 takes nothing returns nothinglocal unit R7I=GetTriggerUnit()local group GK1=MDI()local trigger t=CreateTrigger()if IsUnitType(R7I,UNIT_TYPE_HERO)==false thenset R7I=K1[GetPlayerId(GetOwningPlayer(R7I))]endifcall GroupEnumUnitsInRange(GK1,GetUnitX(R7I),GetUnitY(R7I),650,Condition(function Q42))set XO=CreateUnit(GetOwningPlayer(R7I),1697656901,GetUnitX(R7I),GetUnitY(R7I),0)set JO=GetUnitAbilityLevel(R7I,1093683024)*20set AFI=GetHandleId(R7I)call ForGroup(GK1,function Q52)call SaveUnitHandle(XY,(GetHandleId(t)),(221),(R7I))call SaveGroupHandle(XY,(GetHandleId(t)),(317),(GK1))call TriggerRegisterTimerEvent(t,14,false)call TriggerAddCondition(t,Condition(function Q92))set t=nullendfunctionfunction VZ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function Q32))call TriggerAddAction(t,function QA2)endfunctionfunction QB2 takes nothing returns booleanreturn GetSpellAbilityId()==1093682775 and MBI(GetSpellTargetUnit())==falseendfunctionfunction Trig_Goo_Func001Func001001002 takes nothing returns booleanreturn(GetUnitTypeId(GetFilterUnit())==1697657413)endfunctionfunction QC2 takes nothing returns nothingcall KillUnit(GetEnumUnit())endfunctionfunction QD2 takes nothing returns booleanreturn(GetUnitTypeId(GetFilterUnit())==1697657413)endfunctionfunction QE2 takes nothing returns booleanif(not(GetUnitUserData(GetEnumUnit())==4))thenreturn falseendifreturn trueendfunctionfunction QF2 takes nothing returns nothinglocal location O4O=GetUnitLoc(GetTriggerUnit())call SetUnitPositionLoc(GetEnumUnit(),O4O)if(QE2())thencall IssueTargetOrder(GetEnumUnit(),"acidbomb",GetSpellTargetUnit())elsecall IncUnitAbilityLevel(GetEnumUnit(),1093682778)call IssueTargetOrder(GetEnumUnit(),"acidbomb",GetSpellTargetUnit())call SetUnitUserData(GetEnumUnit(),(GetUnitUserData(GetEnumUnit())+1))endifcall RemoveLocation(O4O)endfunctionfunction QG2 takes nothing returns nothinglocal location O4O=GetUnitLoc(GetTriggerUnit())local location QH2=GetUnitLoc(GetSpellTargetUnit())local group QZ2=MDI()if(UnitHasBuffBJ(GetSpellTargetUnit(),1110454869)==true)thencall GroupEnumUnitsOfPlayer(QZ2,GetOwningPlayer(GetSpellTargetUnit()),Condition(function QD2))call ForGroupBJ(QZ2,function QF2)elsecall GroupEnumUnitsOfPlayer(QZ2,GetOwningPlayer(GetSpellTargetUnit()),Condition(function QD2))call ForGroupBJ(QZ2,function QC2)call DisableTrigger(CH)call CreateNUnitsAtLocFacingLocBJ(1,1697657413,GetOwningPlayer(GetSpellTargetUnit()),O4O,QH2)call EnableTrigger(CH)call UnitAddAbility(bj_lastCreatedUnit,1093682778)call SetUnitAbilityLevelSwapped(1093682778,bj_lastCreatedUnit,((GetUnitAbilityLevelSwapped(1093682775,GetTriggerUnit())*4)-3))call IssueTargetOrder(bj_lastCreatedUnit,"acidbomb",GetSpellTargetUnit())call SetUnitUserData(bj_lastCreatedUnit,1)endifcall MCI(QZ2)call RemoveLocation(O4O)call RemoveLocation(QH2)endfunctionfunction VG1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function QB2))call TriggerAddAction(t,function QG2)endfunctionfunction QV2 takes nothing returns booleanreturn GetLearnedSkill()==1093684531 and IsUnitIllusion(GetTriggerUnit())==falseendfunctionfunction QW2 takes nothing returns booleanif(IsUnitType(GetEventDamageSource(),UNIT_TYPE_STRUCTURE)==true)thenreturn falseendifreturn trueendfunctionfunction QX2 takes unit N0I returns nothinglocal unit QHI=CreateUnit(GetOwningPlayer(N0I),1697656901,GetUnitX(N0I),GetUnitY(N0I),0)call QTI(QHI,1093683024)call SetUnitAbilityLevel(QHI,1093683024,GetUnitAbilityLevel(N0I,1093683024))call IssueImmediateOrder(QHI,"fanofknives")set QHI=nullendfunctionfunction QY2 takes unit N0I,real TSI returns nothinglocal integer MKI=GetHandleId(N0I)local real CH1=(LoadReal(XY,(MKI),(278)))if CH1+TSI>250 thencall SaveReal(XY,(MKI),(278),((0)*1.0))call QX2(N0I)elsecall SaveReal(XY,(MKI),(278),((CH1+TSI)*1.0))endifendfunctionfunction QJ2 takes nothing returns nothinglocal unit QK2=GetTriggerUnit()local unit FKO=GetEventDamageSource()local real QL2=PQI(FKO,QK2)local real QM2=GetUnitFacing(QK2)local real QN2local real TSI=GetEventDamage()local real QS2local real NN2if(TSI>5)and GetUnitState(QK2,UNIT_STATE_LIFE)>1 and GetUnitAbilityLevel(QK2,1112433775)==0 thenif((QM2-QL2)<(-180.00))thenset QN2=(QM2-QL2+360)elseif((QM2-QL2)>180.00)thenset QN2=(QM2-QL2-360)elseset QN2=(QM2-QL2)endifendifset NN2=RAbsBJ(QN2)if NN2<=70 thenset QS2=(GetUnitAbilityLevel(QK2,1093684531)*0.08+0.08)*TSIcall QY2(QK2,TSI-QS2)call SetUnitState(QK2,UNIT_STATE_LIFE,GetUnitState(QK2,UNIT_STATE_LIFE)+QS2)elseif NN2<=110 thenset QS2=(GetUnitAbilityLevel(QK2,1093684531)*0.04+0.04)*TSIcall SetUnitState(QK2,UNIT_STATE_LIFE,GetUnitState(QK2,UNIT_STATE_LIFE)+QS2)endifendifset QK2=nullset FKO=nullendfunctionfunction QT2 takes nothing returns nothinglocal trigger tif GetUnitAbilityLevel(GetTriggerUnit(),1093684531)==1 thenset t=CreateTrigger()call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function QW2))call TriggerAddAction(t,function QJ2)endifendfunctionfunction VH1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function QV2))call TriggerAddAction(t,function QT2)endfunctionfunction QR2 takes nothing returns booleanreturn GetUnitAbilityLevel(GetTriggerUnit(),1093677142)>0 and GetUnitAbilityLevel(GetAttacker(),1093678162)!=1 and IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))==false and GetUnitTypeId(GetAttacker())!=1848657461endfunctionfunction QP2 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetAttacker()local integer NGI=GetUnitAbilityLevel(TLI,1093677142)local integer QQ2=GetHeroStr(TLI,true)local real TSI=(14+2*NGI)+(0.18+0.08*NGI)*QQ2call TKI(TLI,TMI,2,TSI)set TLI=nullset TMI=nullendfunctionfunction VW1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function QR2))call TriggerAddAction(t,function QP2)endfunctionfunction QU2 takes nothing returns nothingcall TKI(AGI,GetEnumUnit(),1,AHI)endfunctionfunction UI2 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093816142)local real U12local group g=MDI()set AHI=100+NGI*75set AGI=TLIset CK=TLIcall GroupEnumUnitsInRange(g,GetUnitX(TMI),GetUnitY(TMI),190+25,Condition(function AU1))call ForGroup(g,function QU2)set U12=AHIif GetUnitState(TLI,UNIT_STATE_LIFE)<=U12*0.75 thenset U12=GetUnitState(TLI,UNIT_STATE_LIFE)/0.75-10endifcall TKI(TLI,TLI,1,U12)call DestroyEffect(AddSpecialEffect("war3mapImported\\DoubleEdgeTarget.mdx",GetUnitX(TMI),GetUnitY(TMI)))set TLI=nullset TMI=nullendfunctionfunction UO2 takes nothing returns booleanif GetSpellAbilityId()==1093816142 thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT thencall UI2()elsecall DestroyEffect(AddSpecialEffectTarget("war3mapImported\\DoubleEdgeCaster.mdx",GetTriggerUnit(),"hand, right"))endifendifreturn falseendfunctionfunction VV1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function UO2))set t=nullendfunctionfunction U22 takes nothing returns nothinglocal integer U32if T6I(GetEnumUnit())==false and((LoadInteger(XY,(GetHandleId((GetEnumUnit()))),((4332))))==1)==false thencall MPI(GetEnumUnit(),4332,3.75)set U32=AWIcall TKI(AVI,GetEnumUnit(),1,(U32)*GetHeroStr(AZI,true))call SetPlayerAbilityAvailable(GetOwningPlayer(GetEnumUnit()),1093816139,false)call QTI(GetEnumUnit(),1093816139)call O41(GetEnumUnit(),1093816139,1,1.5,1110460230)endifendfunctionfunction U42 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local group gif GetTriggerEvalCount(t)>=R2I(20*3.75)or GetTriggerEventId()==EVENT_WIDGET_DEATH thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call FlushChildHashtable(XY,(MKI))call MZI(t)call SetUnitPathing(TLI,true)call UnitRemoveAbility(TLI,1093816116)call UnitRemoveAbility(TLI,1110460226)elseset g=MDI()set CK=TLIset AZI=QHIset AVI=TLIset AWI=NGIcall GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),105+25,Condition(function AT1))call ForGroup(g,function U22)call MCI(g)endifset t=nullset TLI=nullset g=nullreturn falseendfunctionfunction U52 takes nothing returns nothinglocal unit TLI=GetEnumUnit()local integer NGI=GetUnitAbilityLevel(AZI,1093816118)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SetUnitPathing(TLI,false)call QTI(TLI,1093816116)call TriggerRegisterTimerEvent(t,0.05,true)call TriggerRegisterDeathEvent(t,TLI)call TriggerAddCondition(t,Condition(function U42))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(19),(AZI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveEffectHandle(XY,(MKI),(175),(AddSpecialEffectTarget("war3mapImported\\SandBreathDamageSmall.mdx",TLI,"foot, left")))call SaveEffectHandle(XY,(MKI),(176),(AddSpecialEffectTarget("war3mapImported\\SandBreathDamageSmall.mdx",TLI,"foot, right")))set TLI=nullset t=nullendfunctionfunction U62 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local group g=MDI()call FlushChildHashtable(XY,(MKI))call MZI(t)set AZI=TLIset CK=TLIcall GroupEnumUnitsInRange(g,0,0,99999,Condition(function BA1))call ForGroup(g,function U52)call MCI(g)set t=nullset TLI=nullset g=nullreturn falseendfunctionfunction U72 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local sound R0I=CreateSound("abilities\\Spells\\Other\\Stampede\\StampedeCaster1.wav",false,false,false,10,10,"DefaultEAXON")local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call StartSound(R0I)call KillSoundWhenDone(R0I)call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function U62))call SaveUnitHandle(XY,(MKI),(2),(TLI))set TLI=nullset R0I=nullendfunctionfunction U82 takes nothing returns booleanif GetSpellAbilityId()==1093816118 thencall U72()endifreturn falseendfunctionfunction VX1 takes nothing returns nothinglocal trigger t=CreateTrigger()call RVI(1093816116)call RVI(1093687350)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function U82))call CreateSound("abilities\\Spells\\Other\\Stampede\\StampedeCaster1.wav",false,false,false,10,10,"DefaultEAXON")set t=nullendfunctionfunction U92 takes nothing returns booleanreturn GetSpellAbilityId()==1093684310 or GetSpellAbilityId()==1093815619endfunctionfunction UA2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit UB2=(LoadUnitHandle(XY,(MKI),(2)))local unit u=(LoadUnitHandle(XY,(MKI),(26)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT thenif CY1(GetSpellAbilityId())and GetSpellTargetUnit()==u thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset UB2=nullset u=nullendifreturn falseendifcall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))if(LoadBoolean(XY,(GetHandleId(u)),(80)))==false and GetUnitAbilityLevel(u,1093678162)==0 thencall MPI(u,4409,1)call SetUnitPosition(u,x,y)endifif(LoadBoolean(XY,(GetHandleId(u)),(80)))==true thencall R1I(GetOwningPlayer(UB2),GetObjectName(1848652598))endifcall FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset UB2=nullset u=nullreturn falseendfunctionfunction UC2 takes unit u,unit UD2,integer UE2,real x,real y returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)if IsUnitOwnedByPlayer(u,GetOwningPlayer(UD2))thencall TriggerRegisterTimerEvent(t,0.1,false)elsecall TriggerRegisterTimerEvent(t,7-UE2,false)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)endifcall TriggerAddCondition(t,Condition(function UA2))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("effects\\Test_of_Faith_FX.mdx",u,"overhead")))call SaveUnitHandle(XY,(MKI),(26),(u))call SaveUnitHandle(XY,(MKI),(2),(UD2))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))set t=nullendfunctionfunction UF2 takes nothing returns nothinglocal unit TMI=GetSpellTargetUnit()local unit UB2=GetTriggerUnit()local location O4O=GetUnitLoc(UB2)local unit QHIlocal integer UE2=GetUnitAbilityLevel(UB2,1093684310)local real C11local location UG2local effect fxif(NZI(GetOwningPlayer(UB2)))thenset UG2=GetRectCenter(O4)elseset UG2=GetRectCenter(S3)endifif(IsUnitAlly(TMI,GetOwningPlayer(UB2))==false)thenif MBI(GetSpellTargetUnit())==false thenset C11=GetRandomInt(50*UE2,100*UE2)call Q5I(I2S(R2I(C11)),1,TMI,0.023,255,255,0,216)call UnitDamageTargetBJ(UB2,TMI,C11,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC)set fx=AddSpecialEffectTargetUnitBJ("chest",TMI,"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")call DestroyEffect(fx)endifelseif(IsUnitType(TMI,UNIT_TYPE_HERO)==true)thenif((LoadBoolean(XY,(GetHandleId(GetOwningPlayer(TMI))),(139)))==false)thencall UC2(TMI,UB2,UE2,GetLocationX(UG2),GetLocationY(UG2))endifelseif(IsUnitOwnedByPlayer(TMI,GetOwningPlayer(UB2))==true)thencall SetUnitPositionLoc(TMI,UG2)endifendifcall RemoveLocation(O4O)call RemoveLocation(UG2)endfunctionfunction UH2 takes nothing returns booleanif GetLearnedSkill()==1093684310 and IsUnitIllusion(GetTriggerUnit())==false thencall QTI(GetTriggerUnit(),1093815619)call SetUnitAbilityLevel(GetTriggerUnit(),1093815619,GetUnitAbilityLevel(GetTriggerUnit(),1093684310))endifreturn falseendfunctionfunction VL1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function U92))call TriggerAddAction(t,function UF2)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function UH2))endfunctionfunction UZ2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer NGI=(LoadInteger(XY,(MKI),(5)))local real UV2if GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamage()>10 thenset UV2=GetEventDamage()*0.08*NGIcall DisableTrigger(t)call TKI(GetEventDamageSource(),GetTriggerUnit(),2,UV2)call EnableTrigger(t)endifelsecall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullreturn falseendfunctionfunction UW2 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TMI=GetSpellTargetUnit()local unit TLI=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093684045)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl",TLI,"chest"))call SaveInteger(XY,(MKI),(5),(NGI))call TriggerRegisterTimerEvent(t,7,false)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function UZ2))set t=nullset TMI=nullset TLI=nullendfunctionfunction UX2 takes nothing returns booleanif GetSpellAbilityId()==1093684045 thencall UW2()endifreturn falseendfunctionfunction VY1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function UX2))set t=nullendfunctionfunction UY2 takes nothing returns booleanif(not(GetSpellAbilityId()==1093678649))thenreturn falseendifreturn trueendfunctionfunction UJ2 takes nothing returns booleanif(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==false)thenif(IsUnitAliveBJ(GetFilterUnit()))thenif T4I(GetFilterUnit())==false thenif(GetUnitTypeId(GetFilterUnit())!=1852010352)thenif(GetUnitAbilityLevel(GetFilterUnit(),1097167976)==1)thenif((GetUnitAbilityLevel(GetFilterUnit(),1093684047)==1)or(GetUnitAbilityLevel(GetFilterUnit(),1093684049)==1)or(GetUnitAbilityLevel(GetFilterUnit(),1093684050)==1)or(GetUnitAbilityLevel(GetFilterUnit(),1093684048)==1))thenreturn trueendifendifendifendifendifendifreturn falseendfunctionfunction UK2 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit UB2=(LoadUnitHandle(XY,(MKI),(2)))local integer UL2=(LoadInteger(XY,(MKI),(157)))local group GK1=MDI()local unit DB2call GroupEnumUnitsOfPlayer(GK1,GetOwningPlayer(UB2),Condition(function UJ2))loopexitwhen(CountUnitsInGroup(GK1)<=UL2)set DB2=GroupPickRandomUnit(GK1)call GroupRemoveUnit(GK1,DB2)call KillUnit(DB2)endloopcall MCI(GK1)call FlushChildHashtable(XY,(MKI))call MZI(t)set UB2=nullset t=nullset GK1=nullset DB2=nullreturn falseendfunctionfunction UM2 takes nothing returns nothinglocal unit UN2=GetSpellTargetUnit()local unit UB2=GetTriggerUnit()local integer UE2=GetUnitAbilityLevel(UB2,1093678649)local integer UL2=1local integer playerid=GetPlayerId(GetOwningPlayer(UB2))local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call PBI(UN2)if(UE2==1)thencall QTI(UN2,1093684047)endifif(UE2==2)thencall QTI(UN2,1093684049)endifif(UE2==3)thenset UL2=2call QTI(UN2,1093684050)endifif(UE2==4)thenset UL2=3call QTI(UN2,1093684048)endifcall QTI(UN2,1097167976)call QTI(UN2,1093743175)call SaveUnitHandle(XY,(MKI),(2),(UB2))call SaveInteger(XY,(MKI),(157),(UL2))call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function UK2))set t=nullset UN2=nullset UB2=nullendfunctionfunction US2 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local unit QHIlocal real xlocal real yif IsUnitEnemy(TMI,GetOwningPlayer(TLI))thenset QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call UnitAddAbility(QHI,1093678649)call SetUnitAbilityLevel(QHI,1093678649,GetUnitAbilityLevel(TLI,1093810260))call IssueTargetOrder(QHI,"charm",TMI)elseif NZI(GetOwningPlayer(TLI))thenset x=GetRectCenterX(O4)set y=GetRectCenterY(O4)elseset x=GetRectCenterX(S3)set y=GetRectCenterY(S3)endifif(LoadBoolean(XY,(GetHandleId(GetOwningPlayer(TMI))),(139)))==false thencall UC2(TMI,TLI,GetUnitAbilityLevel(TLI,1093810260),x,y)endifendifset TLI=nullset TMI=nullset QHI=nullendfunctionfunction UT2 takes nothing returns booleanif GetSpellAbilityId()==1093810260 and MBI(GetSpellTargetUnit())==false thencall US2()endifreturn falseendfunctionfunction UR2 takes nothing returns booleanif GetSpellAbilityId()==1093810260 thenif IsUnitEnemy(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))==true thenif IsUnitType(GetSpellTargetUnit(),UNIT_TYPE_HERO)==true or IsUnitIllusion(GetSpellTargetUnit())thencall R6I(GetTriggerUnit())call R1I(GetOwningPlayer(GetTriggerUnit()),GetObjectName(1848658745))endifendifendifreturn falseendfunctionfunction VK1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function UY2))call TriggerAddAction(t,function UM2)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function UR2))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function UT2))set t=nullendfunctionfunction UP2 takes nothing returns booleanreturn GetSpellAbilityId()==1093684308 or GetSpellAbilityId()==1093747539endfunctionfunction UQ2 takes nothing returns booleanreturn IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1endfunctionfunction UU2 takes nothing returns nothinglocal unit R7I=GetTriggerUnit()local integer UE2=GetUnitAbilityLevel(R7I,1093684308)local group GK1=MDI()local unit DB2if UE2==0 thenset UE2=GetUnitAbilityLevel(R7I,1093747539)endifcall GroupEnumUnitsInRect(GK1,bj_mapInitialPlayableArea,Condition(function UQ2))loopset DB2=FirstOfGroup(GK1)exitwhen DB2==nullif(IsUnitAlly(DB2,GetOwningPlayer(R7I))==true)thencall SetWidgetLife(DB2,(GetUnitStateSwap(UNIT_STATE_LIFE,DB2)+100+(100*UE2)))call DestroyEffect(AddSpecialEffectTargetUnitBJ("chest",DB2,"Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl"))endifcall GroupRemoveUnit(GK1,DB2)endloopcall MCI(GK1)set GK1=MDI()set bj_groupEnumOwningPlayer=GetOwningPlayer(R7I)call GroupEnumUnitsInRect(GK1,GetWorldBounds(),filterGetUnitsInRectOfPlayer)loopset DB2=FirstOfGroup(GK1)exitwhen DB2==nullif(IsUnitType(DB2,UNIT_TYPE_HERO)==false and GetUnitTypeId(DB2)!=1848651843)thencall SetUnitLifePercentBJ(DB2,100)call DestroyEffect(AddSpecialEffectTargetUnitBJ("chest",DB2,"Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl"))endifcall GroupRemoveUnit(GK1,DB2)endloopcall MCI(GK1)endfunctionfunction VJ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function UP2))call TriggerAddAction(t,function UU2)endfunctionfunction I03 takes nothing returns nothingif T4I(GetEnumUnit())==false thencall TKI(AYI,GetEnumUnit(),1,AXI)endifendfunctionfunction II3 takes unit TLI,real x,real y returns nothinglocal real x1local real y1local group g=MDI()local integer NGI=GetUnitAbilityLevel(TLI,1093687862)local real TSI=40+40*NGIset CK=TLIset AYI=TLIset AXI=TSIcall GroupEnumUnitsInRange(g,x,y,600,Condition(function AT1))call ForGroup(g,function I03)call MCI(g)set x1=xset y1=ycall DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\FlyingMachine\\FlyingMachineImpact.mdl",x1,y1))set x1=x+200set y1=y+200call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\FlyingMachine\\FlyingMachineImpact.mdl",x1,y1))set x1=x+200set y1=y-200call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\FlyingMachine\\FlyingMachineImpact.mdl",x1,y1))set x1=x-200set y1=y+200call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\FlyingMachine\\FlyingMachineImpact.mdl",x1,y1))set x1=x-200set y1=y-200call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\FlyingMachine\\FlyingMachineImpact.mdl",x1,y1))call QJI(GetOwningPlayer(TLI),10,x,y,600)set g=nullendfunctionfunction I13 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0Ilocal unit UII=(LoadUnitHandle(XY,(MKI),(45)))local real P6I=(LoadReal(XY,(MKI),(47)))local real P7I=(LoadReal(XY,(MKI),(48)))local real NN2=(LoadReal(XY,(MKI),(13)))local real P4I=(LoadReal(XY,(MKI),(189)))local real P5I=(LoadReal(XY,(MKI),(190)))local real U2I=RCI(P4I+30*Cos(NN2))local real U3I=RGI(P5I+30*Sin(NN2))local real IO3local real I23call SetUnitX(UII,U2I)call SetUnitY(UII,U3I)call SaveReal(XY,(MKI),(189),((U2I)*1.0))call SaveReal(XY,(MKI),(190),((U3I)*1.0))if QCI(P6I,P7I,U2I,U3I)<=35 thencall KillUnit(UII)set N0I=(LoadUnitHandle(XY,(MKI),(14)))call II3(N0I,U2I,U3I)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset N0I=nullset UII=nullreturn falseendfunctionfunction I33 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local real P4I=RCI(GetUnitX(N0I))local real P5I=RGI(GetUnitY(N0I))local location UG2=GetSpellTargetLoc()local real P6I=RCI(GetLocationX(UG2))local real P7I=RGI(GetLocationY(UG2))local real NN2=Atan2(P7I-P5I,P6I-P4I)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit UII=CreateUnit(GetOwningPlayer(N0I),1747989337,P4I,P5I,NN2*bj_RADTODEG)call RemoveLocation(UG2)call SetUnitFacing(UII,NN2*bj_RADTODEG)call SetUnitPathing(UII,false)call QTI(UII,1097625443)call ShowUnit(UII,false)call UnitRemoveAbility(UII,1097625443)call ShowUnit(UII,true)call SaveReal(XY,(MKI),(191),((P4I)*1.0))call SaveReal(XY,(MKI),(192),((P5I)*1.0))call SaveReal(XY,(MKI),(189),((P4I)*1.0))call SaveReal(XY,(MKI),(190),((P5I)*1.0))call SaveReal(XY,(MKI),(47),((P6I)*1.0))call SaveReal(XY,(MKI),(48),((P7I)*1.0))call SaveReal(XY,(MKI),(13),((NN2)*1.0))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveUnitHandle(XY,(MKI),(45),(UII))call TriggerRegisterTimerEvent(t,0.025,true)call TriggerAddCondition(t,Condition(function I13))set N0I=nullset UG2=nullset t=nullset UII=nullendfunctionfunction I43 takes nothing returns booleanif GetSpellAbilityId()==1093687862 thencall I33()endifreturn falseendfunctionfunction NS1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function I43))set t=nullendfunctionfunction I53 takes real s,real d1,real d2,real d3 returns booleanreturn s<=d1 and s<=d2 and s<=d3endfunctionfunction I63 takes unit u,real x,real y,real d returns reallocal real x2=GetUnitX(u)local real y2=GetUnitY(u)local real I73=PAI(x-d,y,x2,y2)local real I83=PAI(x+d,y,x2,y2)local real I93=PAI(x,y+d,x2,y2)local real IA3=PAI(x,y-d,x2,y2)if I53(I73,I83,IA3,I93)thenreturn 180.0elseif I53(I83,I73,IA3,I93)thenreturn 0.0elseif I53(IA3,I83,I73,I93)thenreturn 270.0endifreturn 90.0endfunctionfunction IB3 takes real s,real d1,real d2,real d3,real d4,real d5,real d6,real d7 returns booleanreturn s<=d1 and s<=d2 and s<=d3 and s<=d4 and s<=d5 and s<=d6 and s<=d7endfunctionfunction IC3 takes unit u,integer MKI returns unitlocal real x1=GetUnitX(u)local real y1=GetUnitY(u)local unit ID3=(LoadUnitHandle(XY,(MKI),(1100+1)))local unit IE3=(LoadUnitHandle(XY,(MKI),(1100+2)))local unit IF3=(LoadUnitHandle(XY,(MKI),(1100+3)))local unit IG3=(LoadUnitHandle(XY,(MKI),(1100+4)))local unit IH3=(LoadUnitHandle(XY,(MKI),(1100+5)))local unit IZ3=(LoadUnitHandle(XY,(MKI),(1100+6)))local unit IV3=(LoadUnitHandle(XY,(MKI),(1100+7)))local unit IW3=(LoadUnitHandle(XY,(MKI),(1100+8)))local real d1=PAI(x1,y1,GetUnitX(ID3),GetUnitY(ID3))local real d2=PAI(x1,y1,GetUnitX(IE3),GetUnitY(IE3))local real d3=PAI(x1,y1,GetUnitX(IF3),GetUnitY(IF3))local real d4=PAI(x1,y1,GetUnitX(IG3),GetUnitY(IG3))local real d5=PAI(x1,y1,GetUnitX(IH3),GetUnitY(IH3))local real d6=PAI(x1,y1,GetUnitX(IZ3),GetUnitY(IZ3))local real d7=PAI(x1,y1,GetUnitX(IV3),GetUnitY(IV3))local real d8=PAI(x1,y1,GetUnitX(IW3),GetUnitY(IW3))if IB3(d1,d2,d3,d4,d5,d6,d7,d8)thenreturn ID3elseif IB3(d2,d1,d3,d4,d5,d6,d7,d8)thenreturn IE3elseif IB3(d3,d2,d1,d4,d5,d6,d7,d8)thenreturn IF3elseif IB3(d4,d2,d3,d1,d5,d6,d7,d8)thenreturn IG3elseif IB3(d5,d2,d3,d4,d1,d6,d7,d8)thenreturn IH3elseif IB3(d6,d2,d3,d4,d5,d1,d7,d8)thenreturn IZ3elseif IB3(d7,d2,d3,d4,d5,d6,d1,d8)thenreturn IV3elseif IB3(d8,d2,d3,d4,d5,d6,d7,d1)thenreturn IW3endifreturn nullendfunctionfunction IX3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real NN2=(LoadReal(XY,(MKI),(13)))local real x=GetUnitX(TMI)local real y=GetUnitY(TMI)local real NT2=12local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local integer IY3=40+40*NGIif GetTriggerEvalCount(t)>21 thencall FlushChildHashtable(XY,(MKI))call MZI(t)call SaveInteger(XY,(GetHandleId((TMI))),((4260)),(2))call TKI(TLI,TMI,1,I2R(IY3))call SetUnitState(TMI,UNIT_STATE_MANA,RQI(GetUnitState(TMI,UNIT_STATE_MANA)-IY3,0))call QEI(GetUnitX(TMI),GetUnitY(TMI),100)elsecall DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl",x,y))call QEI(x,y,150)if((LoadInteger(XY,(GetHandleId((TMI))),((4261))))==1)==false thencall SetUnitPosition(TMI,x+NT2*Cos(NN2*bj_DEGTORAD),y+NT2*Sin(NN2*bj_DEGTORAD))endifendifset t=nullset TMI=nullreturn falseendfunctionfunction IJ3 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TMI=GetEnumUnit()local real x=QJlocal real y=UJlocal real d=IKlocal real NN2=I63(TMI,x,y,d)local real IK3=200local real IL3=d-PAI(GetUnitX(TMI),GetUnitY(TMI),x,y)+IK3/2call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl",TMI,"chest"))call SaveInteger(XY,(GetHandleId((TMI))),((4260)),(1))if IL3>0 thencall SetUnitX(TMI,GetUnitX(TMI)+IL3*Cos(NN2*bj_DEGTORAD))call SetUnitY(TMI,GetUnitY(TMI)+IL3*Sin(NN2*bj_DEGTORAD))endifcall SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveReal(XY,(MKI),(13),((NN2)*1.0))call SaveInteger(XY,(MKI),(5),(TJ))call SaveUnitHandle(XY,(MKI),(2),(CK))call TriggerRegisterTimerEvent(t,0.04,true)call TriggerAddCondition(t,Condition(function IX3))set t=nullset TMI=nullendfunctionfunction IM3 takes unit u,integer MKI returns booleanlocal unit IN3=IC3(u,MKI)local boolean DR1=trueif QPI(IN3)or(LoadInteger(XY,(GetHandleId(IN3)),(156)))==1 thenset DR1=falseendifcall SaveInteger(XY,(GetHandleId(IN3)),(156),(1))call SetUnitVertexColor(IN3,25,25,25,175)set IN3=nullreturn DR1endfunctionfunction IS3 takes nothing returns nothingif GetUnitState(GetEnumUnit(),UNIT_STATE_MANA)>0 and IsUnitInGroup(GetEnumUnit(),HK)==false and((LoadInteger(XY,(GetHandleId((GetEnumUnit()))),((4260))))==1)==false and IM3(GetEnumUnit(),AJI)thencall SaveInteger(XY,(GetHandleId((GetEnumUnit()))),((4260)),(1))call GroupAddUnit(ZK,GetEnumUnit())endifendfunctionfunction IT3 takes trigger t,unit N0I,real x,real y,real d,integer NGI returns nothinglocal integer MKI=GetHandleId(t)local real IK3=200local rect r1=Rect(x-d,y-d,x+d,y+d)local rect r2=Rect(x-d-IK3,y-d-IK3,x+d+IK3,y+d+IK3)local group g1=MDI()local group g2=MDI()local group g3=MDI()set CK=N0Icall GroupEnumUnitsInRect(g1,r1,Condition(function AU1))call GroupEnumUnitsInRect(g2,r2,Condition(function AU1))set HK=g1set ZK=g3set QJ=xset UJ=yset IK=dset AJI=MKIcall ForGroup(g2,function IS3)set TJ=NGIcall ForGroup(g3,function IJ3)call MCI(g1)call MCI(g2)call MCI(g3)call RemoveRect(r1)call RemoveRect(r2)set g1=nullset g2=nullset g3=nullset r1=nullset r2=nullendfunctionfunction IR3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local player p=(LoadPlayerHandle(XY,(MKI),(54)))local boolean IP3=(LoadBoolean(XY,(MKI),(155)))call FlushChildHashtable(XY,(MKI))call MZI(t)if IP3 thencall QJI(p,.2,x,y,500)endifset t=nullset p=nullreturn falseendfunctionfunction IQ3 takes unit IU3 returns nothinglocal real x=GetUnitX(IU3)local real y=GetUnitY(IU3)local player p=GetOwningPlayer(IU3)local unit QHI=CreateUnit(p,1966092375,x,y,0)call KillUnit(QHI)set p=nullset QHI=nullendfunctionfunction O03 takes integer MKI,real x,real y,boolean IP3,player p returns nothinglocal unit ID3=(LoadUnitHandle(XY,(MKI),(1100+1)))local unit IE3=(LoadUnitHandle(XY,(MKI),(1100+2)))local unit IF3=(LoadUnitHandle(XY,(MKI),(1100+3)))local unit IG3=(LoadUnitHandle(XY,(MKI),(1100+4)))local unit IH3=(LoadUnitHandle(XY,(MKI),(1100+5)))local unit IZ3=(LoadUnitHandle(XY,(MKI),(1100+6)))local unit IV3=(LoadUnitHandle(XY,(MKI),(1100+7)))local unit IW3=(LoadUnitHandle(XY,(MKI),(1100+8)))local trigger t=CreateTrigger()call TriggerRegisterTimerEvent(t,0.1,false)call TriggerAddCondition(t,Condition(function IR3))call SaveReal(XY,(GetHandleId(t)),(6),((x)*1.0))call SaveReal(XY,(GetHandleId(t)),(7),((y)*1.0))call SavePlayerHandle(XY,(GetHandleId(t)),(54),(p))call SaveBoolean(XY,(GetHandleId(t)),(155),(IP3))set AKI=truecall IQ3(ID3)call RemoveUnit(ID3)call IQ3(IE3)call RemoveUnit(IE3)call IQ3(IF3)call RemoveUnit(IF3)call IQ3(IG3)call RemoveUnit(IG3)call IQ3(IH3)call RemoveUnit(IH3)call IQ3(IZ3)call RemoveUnit(IZ3)call IQ3(IV3)call RemoveUnit(IV3)call IQ3(IW3)call RemoveUnit(IW3)set ID3=nullset IE3=nullset IF3=nullset IG3=nullset IH3=nullset IZ3=nullset IV3=nullset IW3=nullendfunctionfunction PowerCog_DeathBurn takes nothing returns nothinglocal integer IY3=(40+40*AMI)/2call TKI(ALI,GetEnumUnit(),1,I2R(IY3))call SetUnitState(GetEnumUnit(),UNIT_STATE_MANA,RQI(GetUnitState(GetEnumUnit(),UNIT_STATE_MANA)-IY3,0))endfunctionfunction OI3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit IU3=(LoadUnitHandle(XY,(MKI),(19)))local group gif AKI==false thenset g=MDI()set CK=IU3set ALI=IU3call GroupEnumUnitsInRange(g,GetUnitX(IU3),GetUnitY(IU3),175+25,Condition(function AU1))call MCI(g)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset g=nullset IU3=nullreturn falseendfunctionfunction O13 takes unit IU3,integer MKI,integer L9I,player p returns nothinglocal trigger t=CreateTrigger()local integer XVO=GetHandleId(t)call TriggerRegisterDeathEvent(t,IU3)call SaveUnitHandle(XY,(XVO),(19),(IU3))call TriggerAddCondition(t,Condition(function OI3))if IsUnitVisible(IU3,p)thencall SaveBoolean(XY,(MKI),(155),(true))endifcall SaveUnitHandle(XY,(MKI),(1100+L9I),(IU3))endfunctionfunction OO3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local real BP1=(LoadReal(XY,(MKI),(57)))local integer MFI=GetTriggerEvalCount(t)if MFI>R2I(BP1*100)thencall O03(MKI,(LoadReal(XY,(MKI),(6))),(LoadReal(XY,(MKI),(7))),(LoadBoolean(XY,(MKI),(155))),(LoadPlayerHandle(XY,(MKI),(154))))call FlushChildHashtable(XY,(MKI))call MZI(t)elsecall IT3(t,(LoadUnitHandle(XY,(MKI),(14))),(LoadReal(XY,(MKI),(6))),(LoadReal(XY,(MKI),(7))),(LoadReal(XY,(MKI),(138))),(LoadInteger(XY,(MKI),(5))))endifset t=nullreturn falseendfunctionfunction O23 takes nothing returns nothingcall SetUnitX(GetEnumUnit(),GetUnitX(CK))call SetUnitY(GetEnumUnit(),GetUnitY(CK))endfunctionfunction O33 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local integer NGI=GetUnitAbilityLevel(N0I,1093687861)local integer ID=1966092371local real x1=GetUnitX(N0I)local real y1=GetUnitY(N0I)local real x2local real y2local real d=125local unit IU3local real BP1=4+NGIlocal real BufferDuration=5local group glocal rect O43local player GF2local integer HP=2if NGI==4 thenset HP=3endifset AMI=NGIset AKI=falseif NZI(GetOwningPlayer(N0I))thenset GF2=CO[0]elseset GF2=BO[0]endifcall FlushChildHashtable(XY,(MKI))call MZI(t)set t=CreateTrigger()set MKI=GetHandleId(t)call SaveBoolean(XY,(MKI),(155),(false))set x2=x1+dset y2=y1set IU3=CreateUnit(GetOwningPlayer(N0I),ID,x2,y2,0)call SetUnitPosition(IU3,x2,y2)call O13(IU3,MKI,1,GF2)call SetUnitState(IU3,UNIT_STATE_LIFE,HP)set x2=x1+dset y2=y1+dset IU3=CreateUnit(GetOwningPlayer(N0I),ID,x2,y2,0)call SetUnitPosition(IU3,x2,y2)call O13(IU3,MKI,2,GF2)call SetUnitState(IU3,UNIT_STATE_LIFE,HP)set x2=x1set y2=y1+dset IU3=CreateUnit(GetOwningPlayer(N0I),ID,x2,y2,0)call SetUnitPosition(IU3,x2,y2)call O13(IU3,MKI,3,GF2)call SetUnitState(IU3,UNIT_STATE_LIFE,HP)set x2=x1-dset y2=y1+dset IU3=CreateUnit(GetOwningPlayer(N0I),ID,x2,y2,0)call SetUnitPosition(IU3,x2,y2)call O13(IU3,MKI,4,GF2)call SetUnitState(IU3,UNIT_STATE_LIFE,HP)set x2=x1-dset y2=y1set IU3=CreateUnit(GetOwningPlayer(N0I),ID,x2,y2,0)call SetUnitPosition(IU3,x2,y2)call O13(IU3,MKI,5,GF2)call SetUnitState(IU3,UNIT_STATE_LIFE,HP)set x2=x1-dset y2=y1-dset IU3=CreateUnit(GetOwningPlayer(N0I),ID,x2,y2,0)call SetUnitPosition(IU3,x2,y2)call O13(IU3,MKI,6,GF2)call SetUnitState(IU3,UNIT_STATE_LIFE,HP)set x2=x1set y2=y1-dset IU3=CreateUnit(GetOwningPlayer(N0I),ID,x2,y2,0)call SetUnitPosition(IU3,x2,y2)call O13(IU3,MKI,7,GF2)call SetUnitState(IU3,UNIT_STATE_LIFE,HP)set x2=x1+dset y2=y1-dset IU3=CreateUnit(GetOwningPlayer(N0I),ID,x2,y2,0)call SetUnitPosition(IU3,x2,y2)call O13(IU3,MKI,8,GF2)call SetUnitState(IU3,UNIT_STATE_LIFE,HP)call TriggerRegisterTimerEvent(t,0.01,true)call TriggerAddCondition(t,Condition(function OO3))call SaveReal(XY,(MKI),(57),((BP1)*1.0))call SaveReal(XY,(MKI),(6),((x1)*1.0))call SaveReal(XY,(MKI),(7),((y1)*1.0))call SaveReal(XY,(MKI),(138),((d)*1.0))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveInteger(XY,(MKI),(5),(NGI))call SavePlayerHandle(XY,(MKI),(154),(GF2))set d=d+110set g=MDI()set O43=Rect(x1-d,y1-d,x1+d,y1+d)set CK=N0Icall GroupEnumUnitsInRect(g,O43,Condition(function BW1))call ForGroup(g,function O23)call MCI(g)set t=nullset g=nullset N0I=nullset IU3=nullset O43=nullset GF2=nullreturn falseendfunctionfunction O53 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit N0I=GetTriggerUnit()call TriggerRegisterTimerEvent(t,0.1,false)call TriggerAddCondition(t,Condition(function O33))call SaveUnitHandle(XY,(MKI),(14),(N0I))set t=nullset N0I=nullendfunctionfunction O63 takes nothing returns booleanif GetSpellAbilityId()==1093687861 thencall O53()endifreturn falseendfunctionfunction NN1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function O63))set t=nullset AKI=falseendfunctionfunction O73 takes unit TLI,unit TMI returns nothinglocal unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)local integer NGI=GetUnitAbilityLevel(TLI,1093687864)if NGI==0 thenset NGI=GetUnitAbilityLevel(TLI,1093747542)endifcall QTI(QHI,1093687865)call SetUnitAbilityLevel(QHI,1093687865,NGI)call IssueTargetOrder(QHI,"thunderbolt",TMI)set QHI=nullendfunctionfunction O83 takes nothing returns nothingif IsUnitInGroup(GetEnumUnit(),HK)==false thencall GroupAddUnit(HK,GetEnumUnit())call O73(CK,GetEnumUnit())endifendfunctionfunction O93 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer OA3=(LoadInteger(XY,(MKI),(18)))local integer MFI=GetTriggerEvalCount(t)local unit OB3local group OC3=(LoadGroupHandle(XY,(MKI),(16)))local group glocal real OD3=200if TMI==null thenset OB3=(LoadUnitHandle(XY,(MKI),(700+OA3+1-MFI)))call RemoveUnit(OB3)elseset OB3=(LoadUnitHandle(XY,(MKI),(700+MFI)))call SetUnitX(N0I,GetUnitX(OB3))call SetUnitY(N0I,GetUnitY(OB3))call RemoveUnit(OB3)if MFI==OA3 thenset OD3=225endifset g=MDI()set CK=N0Iset HK=OC3call GroupEnumUnitsInRange(g,GetUnitX(N0I),GetUnitY(N0I),OD3,Condition(function AQ1))call ForGroup(g,function O83)call MCI(g)endifif MFI==(OA3)thenif TMI!=null thencall PauseUnit(TMI,false)endifcall QEI(GetUnitX(N0I),GetUnitY(N0I),100)call MCI(OC3)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset N0I=nullset TMI=nullset OB3=nullset OC3=nullset g=nullreturn falseendfunctionfunction OE3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local real NN2=(LoadReal(XY,(MKI),(13)))local integer JNO=(LoadInteger(XY,(MKI),(12)))local integer MFI=GetTriggerEvalCount(t)local real x=GetUnitX(N0I)+MFI*50*Cos(NN2*bj_DEGTORAD)local real y=GetUnitY(N0I)+MFI*50*Sin(NN2*bj_DEGTORAD)local boolean OF3=(LoadBoolean(XY,(MKI),(15)))local unit OG3local trigger OH3=(LoadTriggerHandle(XY,(MKI),(11)))local integer OZ3=GetHandleId(OH3)local group g=MDI()local unit TMI=nulllocal integer ID=1966092374local real OD3=125if MFI==1 thenset OD3=100endifset CK=N0Icall GroupEnumUnitsInRange(g,x,y,OD3,Condition(function AX1))call GroupRemoveUnit(g,N0I)set TMI=GroupPickRandomUnit(g)call MCI(g)if TMI!=null or MFI==JNO or MFI==(JNO-1)or MFI==(JNO-2)thenset ID=1966092373endifset OG3=CreateUnit(GetOwningPlayer(N0I),ID,x,y,NN2)call SaveUnitHandle(XY,(OZ3),(700+MFI),(OG3))if TMI!=null thenif(IsUnitAlly(TMI,GetOwningPlayer(N0I))==true and OF3==false)or GetOwningPlayer(TMI)==DO or((LoadInteger(XY,(GetHandleId((TMI))),((4259))))==1)==true thenset TMI=nullendifcall FlushChildHashtable(XY,(MKI))call MZI(t)if TMI!=null and IsUnitAlly(TMI,GetOwningPlayer(N0I))==false thencall PauseUnit(TMI,true)endifcall TriggerRegisterTimerEvent(OH3,0.5/JNO,true)call TriggerAddCondition(OH3,Condition(function O93))call SaveInteger(XY,(OZ3),(18),(MFI))call SaveUnitHandle(XY,(OZ3),(17),(TMI))call SaveUnitHandle(XY,(OZ3),(14),(N0I))call SaveGroupHandle(XY,(OZ3),(16),(MDI()))elseif MFI>JNO thenset TMI=nullcall FlushChildHashtable(XY,(MKI))call MZI(t)call TriggerRegisterTimerEvent(OH3,0.5/JNO,true)call TriggerAddCondition(OH3,Condition(function O93))call SaveInteger(XY,(OZ3),(18),(MFI))call SaveUnitHandle(XY,(OZ3),(17),(TMI))call SaveUnitHandle(XY,(OZ3),(14),(N0I))call SaveGroupHandle(XY,(OZ3),(16),(MDI()))endifset t=nullset N0I=nullset OG3=nullset OH3=nullset g=nullset TMI=nullreturn falseendfunctionfunction OV3 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit N0I=GetTriggerUnit()local location l=GetSpellTargetLoc()local real NN2=PUI(GetUnitX(N0I),GetUnitY(N0I),GetLocationX(l),GetLocationY(l))local integer NGI=GetUnitAbilityLevel(N0I,1093687864)local integer OW3local integer JNOlocal boolean OF3=truelocal trigger OX3=CreateTrigger()if NGI==0 thenset NGI=GetUnitAbilityLevel(N0I,1093747542)set OF3=trueendifset OW3=1500+500*NGIset JNO=OW3/50call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveInteger(XY,(MKI),(5),(NGI))call SaveReal(XY,(MKI),(13),((NN2)*1.0))call SaveInteger(XY,(MKI),(12),(JNO))call SaveTriggerHandle(XY,(MKI),(11),(OX3))call SaveBoolean(XY,(MKI),(15),(OF3))call TriggerRegisterTimerEvent(t,0.5/JNO,true)call TriggerAddCondition(t,Condition(function OE3))call RemoveLocation(l)set t=nullset N0I=nullset l=nullendfunctionfunction OY3 takes nothing returns booleanif GetSpellAbilityId()==1093687864 or GetSpellAbilityId()==1093747542 thencall OV3()endifreturn falseendfunctionfunction NT1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function OY3))set t=nullendfunctionfunction OJ3 takes unit TLI returns nothinglocal group g=MDI()local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)local unit TMIlocal unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,x,y,0)local integer NGI=GetUnitAbilityLevel(TLI,1093687860)set CK=TLIcall GroupEnumUnitsInRange(g,x,y,300,Condition(function B01))set TMI=GroupPickRandomUnit(g)call MCI(g)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\FlakCannons\\FlakTarget.mdl",TLI,"origin"))if TMI!=null thencall QTI(QHI,1093687863)call SetUnitAbilityLevel(QHI,1093687863,NGI)call IssueTargetOrder(QHI,"thunderbolt",TMI)endifset g=nullset TMI=nullset QHI=nullendfunctionfunction OK3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer MFI=GetTriggerEvalCount(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))if MFI>15 or GetTriggerEventId()==EVENT_UNIT_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)elsecall OJ3(N0I)endifset t=nullset N0I=nullreturn falseendfunctionfunction OL3 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit N0I=GetTriggerUnit()call TriggerRegisterTimerEvent(t,.7,true)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function OK3))call SaveUnitHandle(XY,(MKI),(14),(N0I))call TriggerEvaluate(t)set t=nullset N0I=nullendfunctionfunction OM3 takes nothing returns booleanif GetSpellAbilityId()==1093687860 thencall OL3()endifreturn falseendfunctionfunction NM1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function OM3))set t=nullendfunctionfunction ON3 takes nothing returns nothingcall TKI(ANI,GetEnumUnit(),1,ASI)endfunctionfunction OS3 takes unit TLI,real x,real y,integer NGI returns nothinglocal group g=MDI()if NGI==1 thenset ASI=105elseif NGI==2 thenset ASI=170elseif NGI==3 thenset ASI=250elseif NGI==4 thenset ASI=310endifset ANI=TLIset CK=TLIcall GroupEnumUnitsInRange(g,x,y,230+25,Condition(function AT1))call ForGroup(g,function ON3)call MCI(g)set g=nullendfunctionfunction OT3 takes nothing returns nothinglocal unit QHI=CreateUnit(GetOwningPlayer(CK),1697656901,GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),0)if GetUnitAbilityLevel(CK,1093677906)>0 thencall QTI(QHI,1093742676)elsecall QTI(QHI,1093817142)endifcall IssueTargetOrder(QHI,"slow",GetEnumUnit())set QHI=nullendfunctionfunction OR3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local integer OP3=ModuloInteger(GetTriggerEvalCount(t),4)+1local real alocal real dlocal real xlocal real ylocal group g=MDI()set CK=N0Icall GroupEnumUnitsInRange(g,GetUnitX(N0I),GetUnitY(N0I),710,Condition(function AT1))call ForGroup(g,function OT3)call MCI(g)if OP3==1 thenset a=GetRandomReal(0,90)elseif OP3==2 thenset a=GetRandomReal(90,180)elseif OP3==3 thenset a=GetRandomReal(180,270)elseset a=GetRandomReal(270,360)endifset d=GetRandomReal(140,710)if GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST and(GetSpellAbilityId()==1093677906 or GetSpellAbilityId()==1093681494)thencall FlushChildHashtable(XY,(MKI))call MZI(t)call StopSound(DC,false,true)elseset x=GetUnitX(N0I)+d*Cos(a*bj_DEGTORAD)set y=GetUnitY(N0I)+d*Sin(a*bj_DEGTORAD)call DestroyEffect(AddSpecialEffect("effects\\SnowyBlizzardTarget.mdx",x,y))call OS3(N0I,x,y,NGI)endifset t=nullset N0I=nullreturn falseendfunctionfunction OQ3 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer NGIcall QWI(DC,GetUnitX(N0I),GetUnitY(N0I))if GetSpellAbilityId()==1093677906 thenset NGI=GetUnitAbilityLevel(N0I,1093677906)elseset NGI=GetUnitAbilityLevel(N0I,1093681494)+1endifcall TriggerRegisterTimerEvent(t,0.10,true)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_SPELL_ENDCAST)call TriggerAddCondition(t,Condition(function OR3))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveInteger(XY,(MKI),(5),(NGI))set t=nullset N0I=nullendfunctionfunction OU3 takes nothing returns booleanif GetSpellAbilityId()==1093677906 or GetSpellAbilityId()==1093681494 thencall OQ3()endifreturn falseendfunctionfunction VS1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function OU3))call RVI(1093677912)set t=nullendfunctionfunction A03 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local location l=GetSpellTargetLoc()local real x=GetLocationX(l)local real y=GetLocationY(l)local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697657656,x,y,0)local integer NGI=GetUnitAbilityLevel(TLI,1093748025)call QTI(QHI,1093677380)call SetUnitAbilityLevel(QHI,1093677380,NGI)call IssueTargetOrder(QHI,"frostnova",QHI)call RemoveLocation(l)call QTI(QHI,1097625443)call UnitApplyTimedLife(QHI,1112820806,2)set TLI=nullset QHI=nullset l=nullendfunctionfunction AI3 takes nothing returns booleanif GetSpellAbilityId()==1093748025 thencall A03()endifreturn falseendfunctionfunction VN1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function AI3))set t=nullendfunctionfunction A13 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer NGI=GetUnitAbilityLevel(TLI,1095262562)if QPI(TLI)==false thencall SetUnitState(TLI,UNIT_STATE_MANA,GetUnitState(TLI,UNIT_STATE_MANA)+(0.5+0.5*NGI)*0.25)endifset TLI=nullset t=nullreturn falseendfunctionfunction AO3 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()call TriggerRegisterTimerEvent(t,0.25,true)call TriggerAddCondition(t,Condition(function A13))call SaveUnitHandle(XY,(MKI),(2),(TLI))set t=nullset TLI=nullendfunctionfunction A23 takes nothing returns booleanif GetLearnedSkill()==1095262562 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1095262562)==1 thencall AO3()endifreturn falseendfunctionfunction VM1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function A23))set t=nullendfunctionfunction A33 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))call SetUnitAnimationByIndex(TLI,8)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullreturn falseendfunctionfunction A43 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SetUnitAnimationByIndex(TLI,7)call TriggerRegisterTimerEvent(t,2.5,false)call TriggerAddCondition(t,Condition(function A33))call SaveUnitHandle(XY,(MKI),(2),(TLI))set t=nullset TLI=nullendfunctionfunction A53 takes nothing returns booleanif GetUnitTypeId(GetTriggerUnit())==1311788336 thencall A43()endifreturn falseendfunctionfunction TN1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_DEATH)call TriggerAddCondition(t,Condition(function A53))set t=nullendfunctionfunction A63 takes nothing returns nothingcall DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\ChimaeraLightningMissile\\ChimaeraLightningMissile.mdl",GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit())))call TKI(ATI,GetEnumUnit(),1,ARI)endfunctionfunction A73 takes nothing returns booleanlocal trigger t2=GetTriggeringTrigger()local integer XVO=GetHandleId(t2)local trigger t1=(LoadTriggerHandle(XY,(XVO),(9)))local integer A83=GetHandleId(t1)local unit A93=(LoadUnitHandle(XY,(XVO),(8)))local group glocal integer NGI=(LoadInteger(XY,(XVO),(5)))if GetTriggerEventId()==EVENT_UNIT_DEATH thencall ShowUnit(A93,false)call KillUnit(A93)call FlushChildHashtable(XY,(A83))call MZI(t1)call FlushChildHashtable(XY,(XVO))call MZI(t2)elseif IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(A93))==true and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetTriggerUnit(),1093678162)==0 thenset g=MDI()set CK=A93set ATI=A93set ARI=100+40*NGIcall GroupEnumUnitsInRange(g,GetUnitX(A93),GetUnitY(A93),285,Condition(function AT1))call ForGroup(g,function A63)call MCI(g)call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\Bolt\\BoltImpact.mdl",GetUnitX(A93),GetUnitY(A93)))call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\Bolt\\BoltImpact.mdl",GetUnitX(A93),GetUnitY(A93)))call ShowUnit(A93,false)call KillUnit(A93)call FlushChildHashtable(XY,(A83))call MZI(t1)call FlushChildHashtable(XY,(XVO))call MZI(t2)endifset t1=nullset t2=nullset A93=nullset g=nullreturn falseendfunctionfunction AA3 takes nothing returns booleanlocal trigger t1=GetTriggeringTrigger()local integer A83=GetHandleId(t1)local trigger t2local integer XVOlocal unit A93local integer NGIlocal real x=(LoadReal(XY,(A83),(6)))local real y=(LoadReal(XY,(A83),(7)))local real KC2local integer MFI=GetTriggerEvalCount(t1)if MFI==1 thencall DestroyEffect((LoadEffectHandle(XY,(A83),(3))))elseif MFI==2 thencall DestroyEffect((LoadEffectHandle(XY,(A83),(4))))set t2=CreateTrigger()set XVO=GetHandleId(t2)set NGI=(LoadInteger(XY,(A83),(5)))set KC2=(LoadReal(XY,(A83),(1)))set A93=CreateUnit(GetOwningPlayer((LoadUnitHandle(XY,(A83),(2)))),1747990342,x,y,KC2)call SetUnitVertexColor(A93,255,255,255,100)call UnitApplyTimedLife(A93,1112820806,12)call SaveUnitHandle(XY,(A83),(8),(A93))call SaveUnitHandle(XY,(XVO),(8),(A93))call SaveTriggerHandle(XY,(XVO),(9),(t1))call SaveInteger(XY,(XVO),(5),(NGI))call TriggerRegisterUnitInRange(t2,A93,235,Condition(function Q8I))call TriggerRegisterUnitEvent(t2,A93,EVENT_UNIT_DEATH)call TriggerAddCondition(t2,Condition(function A73))call DestroyEffect(AddSpecialEffectTarget("effects\\ManaFlareBoltImpact_NoSound.mdx",A93,"origin"))elseif MFI>2 thenset A93=(LoadUnitHandle(XY,(A83),(8)))call DestroyEffect(AddSpecialEffectTarget("effects\\ManaFlareBoltImpact_NoSound.mdx",A93,"origin"))endifset t1=nullset A93=nullreturn falseendfunctionfunction AB3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t1=CreateTrigger()local integer A83=GetHandleId(t1)local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)call TriggerRegisterTimerEvent(t1,0.5,true)call TriggerAddCondition(t1,Condition(function AA3))call SaveReal(XY,(A83),(6),((x)*1.0))call SaveReal(XY,(A83),(7),((y)*1.0))call SaveInteger(XY,(A83),(5),(GetUnitAbilityLevel(TLI,1093743696)))call SaveUnitHandle(XY,(A83),(2),(TLI))call SaveReal(XY,(A83),(1),((GetUnitFacing(TLI))*1.0))call SaveEffectHandle(XY,(A83),(3),(AddSpecialEffect("Abilities\\Spells\\Orc\\LightningShield\\LightningShieldTarget.mdl",x,y)))call SaveEffectHandle(XY,(A83),(4),(AddSpecialEffect("effects\\Static_Remnant_FX.mdx",x,y)))set TLI=nullset t1=nullendfunctionfunction AC3 takes nothing returns booleanif GetSpellAbilityId()==1093743696 thencall AB3()endifreturn falseendfunctionfunction MS1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function AC3))set t=nullendfunctionfunction AD3 takes nothing returns nothinglocal unit QHI=CreateUnit(GetOwningPlayer(API),1697656901,GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),0)call QTI(QHI,1093686069)call IssueTargetOrder(QHI,"slow",GetEnumUnit())call TKI(API,GetEnumUnit(),1,AQI)set QHI=nullendfunctionfunction AE3 takes unit TLI,unit TMI returns nothinglocal integer MKI=GetHandleId(TLI)local group g=MDI()call DestroyEffect((LoadEffectHandle(XY,(MKI),(200))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(201))))call SaveInteger(XY,(GetHandleId((TLI))),((4264)),(2))set CK=TLIset API=TLIset AQI=GetUnitAbilityLevel(TLI,1093685591)*20+10call GroupEnumUnitsInRange(g,GetUnitX(TMI),GetUnitY(TMI),300,Condition(function AT1))call ForGroup(g,function AD3)call MCI(g)call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl",GetUnitX(TMI),GetUnitY(TMI)))set g=nullendfunctionfunction AF3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer TRI=(LoadInteger(XY,(MKI),(30)))local unit TMI=M6I(TRI)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local trigger AG3=(LoadTriggerHandle(XY,(MKI),(202)))if GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamageSource()==TLI and((LoadInteger(XY,(GetHandleId((TLI))),((4264))))==1)==true thencall DisableTrigger(t)call AE3(TLI,TMI)call M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)call FlushChildHashtable(XY,(GetHandleId(AG3)))call MZI(AG3)endifelsecall M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TMI=nullset TLI=nullset AG3=nullreturn falseendfunctionfunction AH3 takes nothing returns nothinglocal trigger t=CreateTrigger()local unit TMI=GetTriggerUnit()local unit TLI=GetAttacker()local integer MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,2.5,false)call TriggerAddCondition(t,Condition(function AF3))call SaveInteger(XY,(MKI),(30),(M8I(TMI)))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveTriggerHandle(XY,(MKI),(202),(GetTriggeringTrigger()))set t=nullset TMI=nullset TLI=nullendfunctionfunction AZ3 takes nothing returns booleanif GetAttacker()==(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(2)))and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitAlly(GetAttacker(),GetOwningPlayer(GetTriggerUnit()))==false thencall AH3()endifreturn falseendfunctionfunction AV3 takes nothing returns nothinglocal trigger t=CreateTrigger()local unit TLI=GetTriggerUnit()local integer MKI=GetHandleId(TLI)local string fx=""if IsUnitAlly(TLI,GetLocalPlayer())or TGI(GetLocalPlayer())thenset fx="Abilities\\Weapons\\FarseerMissile\\FarseerMissile.mdl"endifcall SaveEffectHandle(XY,(MKI),(200),(AddSpecialEffectTarget(fx,TLI,"right hand")))call SaveEffectHandle(XY,(MKI),(201),(AddSpecialEffectTarget(fx,TLI,"left hand")))call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function AZ3))call SaveUnitHandle(XY,(GetHandleId(t)),(2),(TLI))set t=nullendfunctionfunction AW3 takes nothing returns booleanif(GetSpellAbilityId()==1093743695 or GetSpellAbilityId()==1093743696 or GetSpellAbilityId()==1093743698)and((LoadInteger(XY,(GetHandleId((GetTriggerUnit()))),((4264))))==1)==false thencall SaveInteger(XY,(GetHandleId((GetTriggerUnit()))),((4264)),(1))call AV3()endifreturn falseendfunctionfunction AX3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function AW3))set TLI=nullset t=nullendfunctionfunction AY3 takes nothing returns booleanif GetLearnedSkill()==1093685591 and GetUnitAbilityLevel(GetTriggerUnit(),1093685591)==1 and IsUnitIllusion(GetTriggerUnit())==false thencall AX3()endifreturn falseendfunctionfunction MR1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function AY3))set t=nullendfunctionfunction AJ3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real NN2=(LoadReal(XY,(MKI),(13)))local real x=GetUnitX(TMI)-5*Cos(NN2)local real y=GetUnitY(TMI)-5*Sin(NN2)local integer NGI=(LoadInteger(XY,(MKI),(5)))local real x0=(LoadReal(XY,(MKI),(6)))local real y0=(LoadReal(XY,(MKI),(7)))if((x0-x)*(x0-x))+((y0-y)*(y0-y))<100 thenset x=x0set y=y0endifcall SetUnitX(TMI,x)call SetUnitY(TMI,y)if GetTriggerEvalCount(t)==(10+10*NGI)or GetTriggerEventId()==EVENT_UNIT_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TMI=nullreturn falseendfunctionfunction AK3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local unit QHI=CreateUnit(GetOwningPlayer(TLI),1966092376,GetUnitX(TLI),GetUnitY(TLI),GetUnitFacing(TLI))local integer NGI=GetUnitAbilityLevel(TLI,1093743698)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.05,true)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function AJ3))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveReal(XY,(MKI),(13),((Atan2(GetUnitY(TMI)-GetUnitY(TLI),GetUnitX(TMI)-GetUnitX(TLI)))*1.0))call SaveInteger(XY,(MKI),(5),(NGI))call SaveReal(XY,(MKI),(6),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(7),((GetUnitY(TLI))*1.0))call QTI(QHI,1093743697)call SetUnitAbilityLevel(QHI,1093743697,NGI)call IssueTargetOrder(QHI,"magicleash",TMI)call UnitApplyTimedLife(QHI,1112820806,0.5+0.5*NGI)set QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TLI),GetUnitY(TLI),GetUnitFacing(TLI))call QTI(QHI,1093743699)call IssueTargetOrder(QHI,"slow",TLI)set TLI=nullset TMI=nullset QHI=nullset t=nullendfunctionfunction AL3 takes nothing returns booleanif GetSpellAbilityId()==1093743698 and GetUnitTypeId(GetSpellTargetUnit())!=1848651852 and MBI(GetSpellTargetUnit())==false thencall AK3()endifreturn falseendfunctionfunction MT1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function AL3))set t=nullendfunctionfunction AM3 takes nothing returns nothingif(LoadBoolean(XY,(AUI),(GetHandleId(GetEnumUnit()))))==false thencall SaveBoolean(XY,(AUI),(GetHandleId(GetEnumUnit())),(true))call TKI(BII,GetEnumUnit(),1,B1I*(B0I*4+4)/100)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl",GetEnumUnit(),"origin"))endifendfunctionfunction AN3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer NGI=(LoadInteger(XY,(MKI),(5)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit AS3=(LoadUnitHandle(XY,(MKI),(195)))local integer OXO=(LoadInteger(XY,(MKI),(194)))local real P6I=(LoadReal(XY,(MKI),(6)))local real P7I=(LoadReal(XY,(MKI),(7)))local real PO2=GetUnitX(TLI)local real P22=GetUnitY(TLI)local real NN2=Atan2(P7I-P22,P6I-PO2)local real U2I=PO2+(25+25*NGI)*Cos(NN2)local real U3I=P22+(25+25*NGI)*Sin(NN2)local lightning QOI=(LoadLightningHandle(XY,(MKI),(196)))local real lx=(LoadReal(XY,(MKI),(197)))local real ly=(LoadReal(XY,(MKI),(198)))local real XTO=GetUnitState(TLI,UNIT_STATE_MANA)local real AT3=(25+25*NGI)*(10+0.01*GetUnitState(TLI,UNIT_STATE_MAX_MANA))/100local group g=MDI()local real AR3=(LoadReal(XY,(MKI),(199)))set AR3=AR3+25+25*NGIcall SaveReal(XY,(MKI),(199),((AR3)*1.0))if GetTriggerEvalCount(t)>25 thenset lx=lx+(25+25*NGI)*Cos(NN2)set ly=ly+(25+25*NGI)*Sin(NN2)call SaveReal(XY,(MKI),(197),((lx)*1.0))call SaveReal(XY,(MKI),(198),((ly)*1.0))endifcall SetUnitState(TLI,UNIT_STATE_MANA,RMaxBJ(XTO-AT3,0))call MoveLightning(QOI,true,lx,ly,U2I,U3I)call SetUnitX(TLI,U2I)call SetUnitY(TLI,U3I)call SetUnitPosition(QHI,U2I,U3I)call SetUnitPosition(AS3,U2I,U3I)set CK=TLIset BII=TLIset AUI=MKIset B0I=NGIset B1I=AR3call GroupEnumUnitsInRange(g,U2I,U3I,75+75*NGI,Condition(function AT1))call ForGroup(g,function AM3)call MCI(g)set OXO=OXO-1call SaveInteger(XY,(MKI),(194),(OXO))call SetUnitVertexColor(TLI,255,255,255,0)if OXO==0 or GetUnitState(TLI,UNIT_STATE_MANA)<1 thencall DestroyLightning(QOI)call QEI(U2I,U3I,75)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call RemoveUnit(QHI)call RemoveUnit(AS3)call SetUnitVertexColor(TLI,255,255,255,255)call SetUnitPathing(TLI,true)call SetUnitInvulnerable(TLI,false)call FlushChildHashtable(XY,(MKI))call MZI(t)elsecall QEI(U2I,U3I,75)endifset t=nullset QHI=nullset TLI=nullset QOI=nullset g=nullset AS3=nullreturn falseendfunctionfunction AP3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local real P4I=GetUnitX(TLI)local real P5I=GetUnitY(TLI)local unit QHIlocal unit AS3local location llocal real xlocal real ylocal trigger tlocal integer MKIlocal lightning QOIlocal integer NGI=GetUnitAbilityLevel(TLI,1093743695)local real XTO=GetUnitState(TLI,UNIT_STATE_MANA)local real AT3=15+0.07*GetUnitState(TLI,UNIT_STATE_MAX_MANA)call SetUnitState(TLI,UNIT_STATE_MANA,RMaxBJ(XTO-AT3,0))if GetUnitState(TLI,UNIT_STATE_MANA)>10 thenset t=CreateTrigger()set MKI=GetHandleId(t)set QHI=CreateUnit(GetOwningPlayer(TLI),1865429296,P4I,P5I,0)set AS3=CreateUnit(GetOwningPlayer(TLI),1211119431,P4I,P5I,0)set QOI=AddLightning("FORK",true,P4I,P5I,P4I,P5I)if GetSpellTargetUnit()==null thenset l=GetSpellTargetLoc()set x=GetLocationX(l)set y=GetLocationY(l)call RemoveLocation(l)elseset x=GetUnitX(GetSpellTargetUnit())set y=GetUnitY(GetSpellTargetUnit())endifcall SetUnitVertexColor(TLI,255,255,255,0)call SetUnitVertexColor(AS3,255,255,255,0)call SetUnitPathing(TLI,false)call SetUnitPathing(QHI,false)call SetUnitInvulnerable(TLI,true)call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(195),(AS3))call SaveLightningHandle(XY,(MKI),(196),(QOI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))call SaveReal(XY,(MKI),(197),((P4I)*1.0))call SaveReal(XY,(MKI),(198),((P5I)*1.0))call SaveReal(XY,(MKI),(199),((0)*1.0))call SaveInteger(XY,(MKI),(194),(RTI(R2I(SquareRoot((x-P4I)*(x-P4I)+(y-P5I)*(y-P5I))/(25+25*NGI)),1)))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("effects\\Lightning_Ball_Tail_FX.mdx",AS3,"origin")))call TriggerRegisterTimerEvent(t,0.04,true)call TriggerAddCondition(t,Condition(function AN3))call ShowUnit(TLI,false)call ShowUnit(TLI,true)call SelectUnitAddForPlayer(TLI,GetOwningPlayer(TLI))endifset TLI=nullset QHI=nullset AS3=nullset l=nullset t=nullset QOI=nullendfunctionfunction AQ3 takes nothing returns booleanif GetSpellAbilityId()==1093743695 thencall AP3()endifreturn falseendfunctionfunction AU3 takes nothing returns booleanif GetSpellAbilityId()==1093743695 thenif GetUnitState(GetTriggerUnit(),UNIT_STATE_MANA)<(15+0.07*GetUnitState(GetTriggerUnit(),UNIT_STATE_MAX_MANA))thencall R6I(GetTriggerUnit())call R1I(GetOwningPlayer(GetTriggerUnit()),GetObjectName(1848657720))endifendifreturn falseendfunctionfunction MP1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function AQ3))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function AU3))set t=nullendfunctionfunction B03 takes unit TLI returns nothinglocal integer NGI=GetUnitAbilityLevel(TLI,1093812553)if GetUnitTypeId(TLI)==1215063922 thencall SetUnitAbilityLevel(TLI,1093681490,NGI)elsecall SetUnitAbilityLevel(TLI,1093681490,NGI+4)endifendfunctionfunction BI3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093812553)if NGI==1 thencall QTI(TLI,1093681490)endifcall B03(TLI)set TLI=nullendfunctionfunction B13 takes nothing returns booleanif GetLearnedSkill()==1093812553 and IsUnitIllusion(GetTriggerUnit())==false thencall BI3()endifreturn falseendfunctionfunction BO3 takes nothing returns nothinglocal unit u=GetTriggerUnit()if GetUnitTypeId(u)==1211117639 or GetUnitTypeId(u)==1211117638 or GetUnitTypeId(u)==1211117637 thencall SetUnitAnimation(u,"stand")call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Defend\\DefendCaster.mdl",u,"head"))elseif GetUnitTypeId(u)==1215063922 thencall SetUnitAnimation(u,"stand defend")call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Defend\\DefendCaster.mdl",u,"origin"))endifset u=nullendfunctionfunction B23 takes nothing returns booleanif GetSpellAbilityId()==1093681490 thencall BO3()endifreturn falseendfunctionfunction LX1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function B23))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function B13))call RVI(1093681490)set t=nullendfunctionconstant function DragonsBlood_RawCode takes nothing returns integerreturn 1093681996endfunctionconstant function DragonsBlood_ArmorCode takes nothing returns integerreturn 1378889782endfunctionfunction B33 takes nothing returns booleanreturn GetLearnedSkill()==(1093681996)and IsUnitIllusion(GetTriggerUnit())==falseendfunctionfunction B43 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()call SetPlayerTechResearched(GetOwningPlayer(N0I),(1378889782),GetPlayerTechCount(GetOwningPlayer(N0I),(1378889782),true)+1)endfunctionfunction LW1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function B33))call TriggerAddAction(t,function B43)endfunctionfunction B53 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real F21=(LoadReal(XY,(GetHandleId(TMI)),(805)))local real U32=0.75local real TSI=20if IsUnitType(TMI,UNIT_TYPE_HERO)==false thenset U32=1endifif GetUnitState(TMI,UNIT_STATE_LIFE)<=TSI*U32 thenset TSI=GetUnitState(TMI,UNIT_STATE_LIFE)/U32-2endifcall TKI(TLI,TMI,1,TSI)if(TimerGetElapsed(M))>=F21 thencall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction B63 takes unit TLI,unit TMI returns nothinglocal trigger tlocal integer MKIlocal real F21=(LoadReal(XY,(GetHandleId(TMI)),(805)))if F21>(TimerGetElapsed(M))thencall SaveReal(XY,(GetHandleId(TMI)),(805),(((TimerGetElapsed(M))+5)*1.0))elsecall SaveReal(XY,(GetHandleId(TMI)),(805),(((TimerGetElapsed(M))+5)*1.0))set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function B53))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))endifset t=nullendfunctionfunction B73 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))if GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamageSource()==TLI thencall DisableTrigger(t)call B63(TLI,TMI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifelsecall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TMI=nullset TLI=nullreturn falseendfunctionfunction B83 takes nothing returns nothinglocal trigger t=CreateTrigger()local unit TMI=GetTriggerUnit()local unit TLI=GetAttacker()local integer MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,2.5,false)call TriggerAddCondition(t,Condition(function B73))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))set t=nullset TMI=nullset TLI=nullendfunctionfunction B93 takes nothing returns booleanif GetAttacker()==(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(2)))and IsUnitAlly(GetAttacker(),GetOwningPlayer(GetTriggerUnit()))==false and GetUnitAbilityLevel(GetAttacker(),1093685044)>0 thencall B83()endifreturn falseendfunctionfunction BA3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function B93))call SaveUnitHandle(XY,(GetHandleId(t)),(2),(TLI))set TLI=nullset t=nullendfunctionfunction BB3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))call B03(TLI)call MZI(t)call FlushChildHashtable(XY,(MKI))set t=nullset TLI=nullreturn falseendfunctionfunction BC3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))call B03(TLI)call MZI(t)call FlushChildHashtable(XY,(MKI))set t=nullset TLI=nullreturn falseendfunctionfunction ZC1 takes nothing returns nothingif GetUnitAbilityLevel(CK,1093681490)>0 thencall B03(CK)endifendfunctionfunction BD3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.01,false)call TriggerAddCondition(t,Condition(function BB3))call SaveUnitHandle(XY,(MKI),(2),(TLI))set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterDeathEvent(t,TLI)call TriggerAddCondition(t,Condition(function BC3))call SaveUnitHandle(XY,(MKI),(2),(TLI))set TLI=nullset t=nullendfunctionfunction BE3 takes nothing returns booleanif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT thenif GetSpellAbilityId()==1093677895 thencall BD3()endifelseif GetLearnedSkill()==1093677895 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093677895)==1 thencall BA3()endifendifreturn falseendfunctionfunction LY1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function BE3))set t=nullendfunctionfunction BF3 takes nothing returns booleanif((GetSpellAbilityId()==1093686091))thenreturn trueendifif((GetSpellAbilityId()==1093682252))thenreturn trueendifif((GetSpellAbilityId()==1093682248))thenreturn trueendifif((GetSpellAbilityId()==1093750594))thenreturn trueendifreturn falseendfunctionfunction BG3 takes nothing returns booleanif(not(GetUnitAbilityLevelSwapped(1093682250,GetSpellAbilityUnit())>0))thenreturn falseendifif(not BF3())thenreturn falseendifreturn trueendfunctionfunction BH3 takes nothing returns nothinglocal location QZ2=GetUnitLoc(GetTriggerUnit())call CreateNUnitsAtLoc(1,1697656901,GetOwningPlayer(GetTriggerUnit()),QZ2,bj_UNIT_FACING)call UnitAddAbility(bj_lastCreatedUnit,1093682249)call SetUnitAbilityLevelSwapped(1093682249,bj_lastCreatedUnit,GetUnitAbilityLevelSwapped(1093682250,GetSpellAbilityUnit()))call IssueImmediateOrder(bj_lastCreatedUnit,"stomp")call RemoveLocation(QZ2)endfunctionfunction VP1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function BG3))call TriggerAddAction(t,function BH3)endfunctionfunction BZ3 takes nothing returns nothinglocal unit QHI=CreateUnit(GetOwningPlayer(GetEnumUnit()),1697656901,GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),0)call QTI(QHI,1093686090)call SetUnitAbilityLevel(QHI,1093686090,TJ)call IssueTargetOrder(QHI,"thunderbolt",GetEnumUnit())call TKI(GetTriggerUnit(),GetEnumUnit(),1,QJ)set QHI=nullendfunctionfunction BV3 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local location l=GetSpellTargetLoc()local integer i=1local real P4I=GetUnitX(N0I)local real P5I=GetUnitY(N0I)local real P6Ilocal real P7Ilocal real xlocal real ylocal real alocal group g=MDI()local group g2=MDI()if TMI==null thenset P6I=GetLocationX(l)set P7I=GetLocationY(l)elseset P6I=GetUnitX(TMI)set P7I=GetUnitY(TMI)endifset a=bj_DEGTORAD*PUI(P4I,P5I,P6I,P7I)call RemoveLocation(l)loopexitwhen i>24set x=RCI(P4I+i*60*Cos(a))set y=RGI(P5I+i*60*Sin(a))call GroupEnumUnitsInRange(g2,x,y,250,Condition(function AK1))call GroupAddGroup(g2,g)call GroupClear(g2)call UTI(CreateDestructable(1110454320,x,y,GetRandomReal(0,360),0.5,GetRandomInt(0,2)),8)call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Volcano\\VolcanoDeath.mdl",x,y))set i=i+1endloopset TJ=GetUnitAbilityLevel(N0I,1093686091)set QJ=TJ*50+75call ForGroup(g,function BZ3)call MCI(g)call MCI(g2)set N0I=nullset l=nullendfunctionfunction BW3 takes nothing returns booleanif GetSpellAbilityId()==1093686091 thencall BV3()endifreturn falseendfunctionfunction VR1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function BW3))call RVI(1093686090)set t=nullendfunctionfunction BX3 takes nothing returns booleanif(not(UnitHasBuffBJ(GetAttacker(),1114795873)==true))thenreturn falseendifreturn trueendfunctionfunction BY3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))if GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamageSource()==TLI thencall UnitRemoveAbility(TLI,1114795873)endifelsecall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction BJ3 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TMI=GetTriggerUnit()local unit TLI=GetAttacker()call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,1.5,false)call TriggerAddCondition(t,Condition(function BY3))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))set t=nullset TLI=nullset TMI=nullendfunctionfunction VU1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function BX3))call TriggerAddAction(t,function BJ3)endfunctionfunction BK3 takes nothing returns booleanif(GetItemTypeId(GetManipulatedItem())==1227894859)thenif(GetUnitTypeId(GetTriggerUnit())==1333027688)thenreturn trueendifendifreturn falseendfunctionfunction BL3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local unit QHI=CreateUnit(GetOwningPlayer(N0I),1697656901,GetUnitX(N0I),GetUnitY(N0I),0)call QTI(QHI,1095332466)call IssueImmediateOrder(QHI,"roar")call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset N0I=nullset QHI=nullreturn falseendfunctionfunction BM3 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call UnitRemoveAbility(N0I,1110454608)call SaveUnitHandle(XY,(MKI),(14),(N0I))call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function BL3))set t=nullset N0I=nullendfunctionfunction VQ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)call TriggerAddCondition(t,Condition(function BK3))call TriggerAddAction(t,function BM3)endfunctionfunction BN3 takes nothing returns nothinglocal real x=GetUnitX(GetEnumUnit())local real y=GetUnitY(GetEnumUnit())local integer id=GetPlayerId(GetOwningPlayer(GetTriggerUnit()))call SetUnitX(BOI[id],x)call SetUnitY(BOI[id],y)call IssueImmediateOrder(BOI[id],"fanofknives")endfunctionfunction BS3 takes nothing returns nothinglocal real x=GetUnitX(GetEnumUnit())local real y=GetUnitY(GetEnumUnit())local integer id=GetPlayerId(GetOwningPlayer(GetTriggerUnit()))if IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)==true or IsUnitIllusion(GetEnumUnit())==true thencall SetUnitX(BOI[id],x)call SetUnitY(BOI[id],y)call IssueImmediateOrder(BOI[id],"fanofknives")endifendfunctionfunction BT3 takes nothing returns booleanreturn GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))==true and QPI(GetFilterUnit())==falseendfunctionfunction BR3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)local group g=MDI()local integer id=GetPlayerId(GetOwningPlayer(TLI))local integer NGI=GetUnitAbilityLevel(TLI,1093682248)local unit QHI=CreateUnit(GetOwningPlayer(TLI),1865429082,GetUnitX(TLI),GetUnitY(TLI),0)call UnitApplyTimedLife(QHI,1112820806,0.5)if NGI==0 thenset NGI=GetUnitAbilityLevel(TLI,1093750594)endifset BOI[id]=CreateUnit(GetOwningPlayer(TLI),1697656901,x,y,0)set B2I[id]=CreateUnit(GetOwningPlayer(TLI),1697656901,x,y,0)call SetUnitScale(BOI[id],0.25,0.25,0.25)call QTI(BOI[id],1093682253)call QTI(B2I[id],1093748784)call SetUnitAbilityLevel(BOI[id],1093682253,NGI)call SetUnitAbilityLevel(B2I[id],1093748784,NGI)call GroupEnumUnitsInRange(g,x,y,575+25,Condition(function BT3))call ForGroup(g,function BN3)if GetUnitAbilityLevel(TLI,1093750594)>0 thencall ForGroup(g,function BS3)endifcall MCI(g)set TLI=nullset g=nullendfunctionfunction BP3 takes nothing returns booleanif GetSpellAbilityId()==1093682248 or GetSpellAbilityId()==1093750594 thencall BR3()endifreturn falseendfunctionfunction VT1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function BP3))set t=nullcall RVI(1093682253)endfunctionconstant function Untouchable_RawCode takes nothing returns integerreturn 1093682263endfunctionconstant function Untouchable_EffectCode takes nothing returns integerreturn 1093681712endfunctionfunction BQ3 takes nothing returns booleanif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT thenreturn GetUnitAbilityLevel(GetSpellTargetUnit(),(1093682263))>0elsereturn GetUnitAbilityLevel(GetTriggerUnit(),(1093682263))>0endifendfunctionfunction BU3 takes nothing returns nothinglocal unit TLIlocal unit TMIlocal unit QHIif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT thenset TLI=GetSpellTargetUnit()set TMI=GetTriggerUnit()elseset TLI=GetTriggerUnit()set TMI=GetAttacker()endifset QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call QTI(QHI,(1093681712))call SetUnitAbilityLevel(QHI,(1093681712),GetUnitAbilityLevel(TLI,(1093682263)))call IssueTargetOrder(QHI,"acidbomb",TMI)endfunctionfunction WO1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function BQ3))call TriggerAddAction(t,function BU3)endfunctionfunction C03 takes nothing returns booleanreturn(IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))==false and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)!=GetUnitState(GetFilterUnit(),UNIT_STATE_MAX_LIFE)endfunctionfunction CI3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer TX2=(LoadInteger(XY,(MKI),(28)))local group glocal unit V11if TX2>10 thencall FlushChildHashtable(XY,(MKI))call MZI(t)elsecall SaveInteger(XY,(MKI),(28),(TX2+1))set CK=TLIset g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),300,Condition(function C03))set V11=GroupPickRandomUnit(g)call MCI(g)call SetUnitState(V11,UNIT_STATE_LIFE,GetUnitState(V11,UNIT_STATE_LIFE)+10)endifset t=nullset TLI=nullset g=nullset V11=nullreturn falseendfunctionfunction C13 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))call AddUnitAnimationProperties(TLI,"alternate",false)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullreturn falseendfunctionfunction CO3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local integer i=1local trigger tlocal integer MKIloopexitwhen i>(1+2*GetUnitAbilityLevel(TLI,1093677378))set t=CreateTrigger()call SaveUnitHandle(XY,(GetHandleId(t)),(2),(TLI))call SaveInteger(XY,(GetHandleId(t)),(28),(0))call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function CI3))set i=i+1endloopif GetUnitTypeId(TLI)==1160786520 thenset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function C13))call SaveUnitHandle(XY,(MKI),(2),(TLI))set t=nullendifset t=nullset TLI=nullendfunctionfunction C23 takes nothing returns booleanif GetSpellAbilityId()==1093677378 thencall CO3()endifreturn falseendfunctionfunction WI1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function C23))set t=nullendfunctionfunction C33 takes real x1,real y1,real x2,real y2 returns realreturn SquareRoot(((x1-x2)*(x1-x2))+((y1-y2)*(y1-y2)))endfunctionfunction C43 takes unit u returns integerlocal integer NGI=GetUnitAbilityLevel(u,1093682265)if NGI>0 thenreturn NGIendifset NGI=GetUnitAbilityLevel(u,1093752642)return NGIendfunctionfunction C53 takes nothing returns booleanlocal real dlocal real C63if GetUnitAbilityLevel(GetTriggerUnit(),1110455125)>0 and C43(GetEventDamageSource())>0 and(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(2)))==GetEventDamageSource()thencall UnitRemoveAbility(GetTriggerUnit(),1110455125)set C63=RMinBJ(C33(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetUnitX(GetEventDamageSource()),GetUnitY(GetEventDamageSource())),2500)set d=(0.10+0.05*I2R(C43(GetEventDamageSource())))*C63call Q5I("+"+I2S(R2I(d)),1,GetTriggerUnit(),0.023,3,216,216,216)call DisableTrigger(GetTriggeringTrigger())call TKI(GetEventDamageSource(),GetTriggerUnit(),3,d)call FlushChildHashtable(XY,(GetHandleId(GetTriggeringTrigger())))call MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction C73 takes nothing returns nothinglocal trigger tlocal unit TMIlocal unit TLIif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT thenset TMI=GetSpellTargetUnit()set TLI=GetTriggerUnit()elseset TMI=GetTriggerUnit()set TLI=GetAttacker()endifif IsUnitIllusion(TLI)==false thenset t=CreateTrigger()call SaveUnitHandle(XY,(GetHandleId(t)),(2),(TLI))call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function C53))endifset t=nullset TMI=nullset TLI=nullendfunctionfunction C83 takes nothing returns booleanif GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED thenif C43(GetAttacker())>0 and(LoadBoolean(XY,(GetHandleId(GetTriggeringTrigger())),(263)))and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(14)))thencall C73()endifelseif GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER thenif(GetIssuedOrderId()==OrderId("poisonarrows"))thencall SaveBoolean(XY,(GetHandleId(GetTriggeringTrigger())),(263),(true))elseif(GetIssuedOrderId()==OrderId("unpoisonarrows"))thencall SaveBoolean(XY,(GetHandleId(GetTriggeringTrigger())),(263),(false))endifelseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and(GetSpellAbilityId()==1093682265 or GetSpellAbilityId()==1093752642)thencall C73()endifreturn falseendfunctionfunction C93 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_SPELL_EFFECT)call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_ISSUED_ORDER)call TriggerAddCondition(t,Condition(function C83))call SaveUnitHandle(XY,(GetHandleId(t)),(14),(GetTriggerUnit()))set t=nullendfunctionfunction CA3 takes nothing returns booleanif(GetLearnedSkill()==1093682265 or GetLearnedSkill()==1093752642)and IsUnitIllusion(GetTriggerUnit())==false and C43(GetTriggerUnit())==1 thencall C93()endifreturn falseendfunctionfunction W11 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function CA3))set t=nullendfunctionfunction CB3 takes unit u returns booleanreturn IsUnitType(u,UNIT_TYPE_HERO)==false and IsUnitType(u,UNIT_TYPE_ANCIENT)==false and GetUnitTypeId(u)!=1848652101 and GetUnitTypeId(u)!=1848652089endfunctionfunction CC3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))call UnitRemoveAbility(TMI,1114860655)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TMI=nullreturn falseendfunctionfunction CD3 takes nothing returns nothinglocal unit TMI=GetSpellTargetUnit()local unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.01,false)call TriggerAddCondition(t,Condition(function CC3))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SetUnitOwner(TMI,GetOwningPlayer(TLI),true)call UnitApplyTimedLife(TMI,1112820806,80)call QTI(TMI,1097167976)call QTI(TMI,1093743175)call PBI(TMI)set TMI=nullset TLI=nullendfunctionfunction CE3 takes nothing returns booleanif GetSpellAbilityId()==1093682264 and CB3(GetSpellTargetUnit())thencall CD3()endifreturn falseendfunctionfunction W01 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function CE3))set t=nullendfunctionfunction CF3 takes nothing returns booleanif(not(GetSpellAbilityId()==1093681713))thenreturn falseendifreturn trueendfunctionfunction CG3 takes nothing returns nothinglocal location QZ2=GetUnitLoc(GetTriggerUnit())local location CH3=GetSpellTargetLoc()call CreateNUnitsAtLocFacingLocBJ(1,1697656901,GetOwningPlayer(GetTriggerUnit()),CH3,CH3)call ShowUnitHide(bj_lastCreatedUnit)call UnitApplyTimedLifeBJ(11.00,1112820806,bj_lastCreatedUnit)call UnitAddAbility(bj_lastCreatedUnit,1093681714)call SetUnitAbilityLevelSwapped(1093681714,bj_lastCreatedUnit,GetUnitAbilityLevelSwapped(1093681713,GetTriggerUnit()))call IssuePointOrderLoc(bj_lastCreatedUnit,"deathanddecay",CH3)call RemoveLocation(QZ2)call RemoveLocation(CH3)endfunctionfunction W41 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function CF3))call TriggerAddAction(t,function CG3)endfunctionfunction CZ3 takes unit TLI,unit TMI,integer NGI returns nothinglocal real TSIlocal real CV3if NGI==1 thenset TSI=25set CV3=0.25elseif NGI==2 thenset TSI=40set CV3=0.5elseif NGI==3 thenset TSI=55set CV3=0.75elseset TSI=70set CV3=1endifcall BQ1(TMI,TMI,CV3)call TKI(TLI,TMI,1,TSI)endfunctionfunction CW3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=(LoadInteger(XY,(MKI),(5)))call CZ3(TLI,TMI,NGI)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction CX3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger tlocal integer MKIlocal integer NGI=GetUnitAbilityLevel(TLI,1093683511)call CZ3(TLI,TMI,NGI)set t=CreateTrigger()set MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(5),(NGI))call TriggerRegisterTimerEvent(t,2,false)call TriggerAddCondition(t,Condition(function CW3))set t=CreateTrigger()set MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(5),(NGI))call TriggerRegisterTimerEvent(t,4,false)call TriggerAddCondition(t,Condition(function CW3))set t=nullset TLI=nullset TMI=nullendfunctionfunction CY3 takes nothing returns booleanif GetSpellAbilityId()==1093683511 and MBI(GetSpellTargetUnit())==false thencall CX3()endifreturn falseendfunctionfunction W31 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function CY3))endfunctionfunction DemonicConversion_Delayed takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer NGI=(LoadInteger(XY,(MKI),(5)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))call QTI(QHI,1093744474)call SetUnitAbilityLevel(QHI,1093744474,NGI)call IssueImmediateOrder(QHI,"slimemonster")call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset QHI=nullreturn falseendfunctionfunction CJ3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local real x=GetUnitX(TMI)local real y=GetUnitY(TMI)local integer NGI=GetUnitAbilityLevel(TLI,1093744688)local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,x,y,0)call SetUnitState(TMI,UNIT_STATE_LIFE,1)call TKI(TLI,TMI,2,20)call TKI(TLI,TMI,1,20)call TKI(TLI,TMI,3,20)call QTI(QHI,1093744474)call SetUnitAbilityLevel(QHI,1093744474,NGI)call IssueImmediateOrder(QHI,"lavamonster")set TLI=nullset TMI=nullset QHI=nullendfunctionfunction CK3 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer CL3=GetUnitLevel(TMI)if GetOwningPlayer(TMI)!=BO[0]and GetOwningPlayer(TMI)!=CO[0]and CL3>4 thencall R6I(N0I)call R1I(GetOwningPlayer(N0I),GetObjectName(1848656728))endifset N0I=nullset TMI=nullendfunctionfunction CM3 takes nothing returns booleanif GetSpellAbilityId()==1093744688 thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT thencall CJ3()elsecall CK3()endifendifreturn falseendfunctionfunction DemonicConversion_Recolor takes nothing returns booleanlocal integer id=GetUnitTypeId(GetTriggerUnit())if id==1752654196 or id==1752658994 or id==1752658995 or id==1747988534 thencall SetUnitVertexColor(GetSummonedUnit(),0,0,50,255)endifreturn falseendfunctionfunction W51 takes nothing returns nothinglocal trigger t=CreateTrigger()local region L7O=CreateRegion()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function CM3))set t=nullendfunctionfunction CN3 takes real x returns reallocal real RDI=GetRectMinX(bj_mapInitialPlayableArea)+150if(x<RDI)thenreturn RDIendifset RDI=GetRectMaxX(bj_mapInitialPlayableArea)-150if(x>RDI)thenreturn RDIendifreturn xendfunctionfunction CS3 takes real y returns reallocal real RDI=GetRectMinY(bj_mapInitialPlayableArea)+150if(y<RDI)thenreturn RDIendifset RDI=GetRectMaxY(bj_mapInitialPlayableArea)-150if(y>RDI)thenreturn RDIendifreturn yendfunctionfunction CT3 takes unit u returns booleanlocal integer id=GetUnitTypeId(u)return id==1852862003 or id==1852862006 or id==1848652080 or id==1848657754 or id==1852862001 or id==1852862004 or id==1848652081 or id==1848657968 or id==1852862002 or id==1852862005 or id==1848652082 or id==1848657969endfunctionfunction CR3 takes nothing returns booleanreturn GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or CT3(GetFilterUnit())or AZ1(GetFilterUnit())or GetUnitTypeId(GetFilterUnit())==1848651861 or GetUnitTypeId(GetFilterUnit())==1848651865 or GetUnitTypeId(GetFilterUnit())==1848651866 or GetUnitTypeId(GetFilterUnit())==1848658773 or GetUnitTypeId(GetFilterUnit())==1848658774 or GetUnitTypeId(GetFilterUnit())==1848658775 or TVI(GetUnitTypeId(GetFilterUnit())))and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer((LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(318)))))==trueendfunctionfunction CP3 takes nothing returns nothinglocal location CQ3=GetUnitLoc(GetEnumUnit())local location CU3=GetUnitLoc((LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(318))))local location D03=KNI(CU3,DistanceBetweenPoints(CU3,CQ3)-2,AngleBetweenPoints(CU3,CQ3))call SetUnitFacing(GetEnumUnit(),AngleBetweenPoints(CU3,CQ3))call SetUnitPositionLoc(GetEnumUnit(),D03)call RemoveLocation(CQ3)call RemoveLocation(CU3)call RemoveLocation(D03)if B3I>0 thencall TKI(B4I,GetEnumUnit(),8,GetUnitState(GetEnumUnit(),UNIT_STATE_MAX_LIFE)*(0.03+0.01*B3I))endifendfunctionfunction DI3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local group GK1local integer MKI=GetHandleId(t)local unit D13=(LoadUnitHandle(XY,(MKI),(318)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit QHIlocal real xlocal real yif GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST and(GetSpellAbilityId()==1093747288 or GetSpellAbilityId()==1093817432)thencall KillUnit(D13)set QHI=(LoadUnitHandle(XY,(MKI),(19)))call UnitApplyTimedLife((LoadUnitHandle(XY,(MKI),(250))),1112820806,1)call UnitApplyTimedLife((LoadUnitHandle(XY,(MKI),(251))),1112820806,1)call UnitApplyTimedLife((LoadUnitHandle(XY,(MKI),(252))),1112820806,1)call UnitApplyTimedLife((LoadUnitHandle(XY,(MKI),(253))),1112820806,1)call FlushChildHashtable(XY,(MKI))call MZI(t)call KillUnit(QHI)elseif GetTriggerEvalCount(t)>90 thenset QHI=(LoadUnitHandle(XY,(MKI),(19)))call UnitApplyTimedLife((LoadUnitHandle(XY,(MKI),(250))),1112820806,1)call UnitApplyTimedLife((LoadUnitHandle(XY,(MKI),(251))),1112820806,1)call UnitApplyTimedLife((LoadUnitHandle(XY,(MKI),(252))),1112820806,1)call UnitApplyTimedLife((LoadUnitHandle(XY,(MKI),(253))),1112820806,1)call FlushChildHashtable(XY,(MKI))call MZI(t)call KillUnit(D13)call KillUnit(QHI)call R6I((LoadUnitHandle(XY,(MKI),(2))))elseset B3I=0if GetTriggerEvalCount(t)==20 or GetTriggerEvalCount(t)==40 or GetTriggerEvalCount(t)==60 or GetTriggerEvalCount(t)==80 thenif GetUnitAbilityLevel(TLI,1093817432)>0 thenset B4I=TLIset B3I=GetUnitAbilityLevel(TLI,1093681713)endifendifset x=GetUnitX(D13)set y=GetUnitY(D13)set GK1=MDI()call GroupEnumUnitsInRange(GK1,x,y,425,Condition(function CR3))call ForGroup(GK1,function CP3)call MCI(GK1)endifset QHI=nullset D13=nullset t=nullreturn falseendfunctionfunction DO3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local location l=GetSpellTargetLoc()local real x=GetLocationX(l)local real y=GetLocationY(l)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,x,y,0)local unit D13=CreateUnit(GetOwningPlayer(TLI),1966092340,x,y,0)local integer NGI=GetUnitAbilityLevel(TLI,1093747288)call RemoveLocation(l)if NGI==0 thenset NGI=GetUnitAbilityLevel(TLI,1093817432)endifcall SetUnitAbilityLevel(D13,1093681968,NGI)if NWI(GetOwningPlayer(TLI))thencall QTI(QHI,1093687348)elsecall QTI(QHI,1093687347)endifcall IssuePointOrder(QHI,"cloudoffog",x,y)call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveUnitHandle(XY,(MKI),(250),(CreateUnit(GetOwningPlayer(TLI),1747990098,x,y,0)))call SaveUnitHandle(XY,(MKI),(251),(CreateUnit(GetOwningPlayer(TLI),1747990098,x,y,0)))call SaveUnitHandle(XY,(MKI),(252),(CreateUnit(GetOwningPlayer(TLI),1747990098,x,y,0)))call SaveUnitHandle(XY,(MKI),(253),(CreateUnit(GetOwningPlayer(TLI),1747990098,x,y,0)))call SaveUnitHandle(XY,(MKI),(318),(D13))call SaveUnitHandle(XY,(MKI),(2),(TLI))call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_ENDCAST)call TriggerRegisterTimerEvent(t,0.05,true)call TriggerAddCondition(t,Condition(function DI3))set TLI=nullset D13=nullset t=nullset l=nullendfunctionfunction D23 takes nothing returns booleanif GetSpellAbilityId()==1093747288 or GetSpellAbilityId()==1093817432 thencall DO3()endifreturn falseendfunctionfunction D33 takes nothing returns booleanlocal location llocal real xlocal real yif GetSpellAbilityId()==1093747288 or GetSpellAbilityId()==1093817432 thenset l=GetSpellTargetLoc()set x=GetLocationX(l)set y=GetLocationY(l)call RemoveLocation(l)set l=nullif(x!=CN3(x)and y!=CS3(y))or RectContainsCoords(U9,x,y)or RectContainsCoords(IA,x,y)or RectContainsCoords(OA,x,y)or RectContainsCoords(BA,x,y)or RectContainsCoords(CA,x,y)or RectContainsCoords(DA,x,y)thencall R6I(GetTriggerUnit())call R1I(GetOwningPlayer(GetTriggerUnit()),"Cannot cast Blackhole here")endifendifreturn falseendfunctionfunction W21 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function D23))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function D33))call RVI(1093681968)endfunctionfunction D43 takes nothing returns nothingcall TKI(GetTriggerUnit(),GetEnumUnit(),1,QJ)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\StaffOfPurification\\PurificationTarget.mdx",GetEnumUnit(),"chest"))endfunctionfunction D53 takes nothing returns nothinglocal group g=MDI()local unit N0I=GetTriggerUnit()local real x=GetUnitX(N0I)local real y=GetUnitY(N0I)local integer NGI=GetUnitAbilityLevel(N0I,1093686083)local unit QHI=CreateUnit(GetOwningPlayer(N0I),1697656901,x,y,0)call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Items\\StaffOfPurification\\PurificationCaster.mdx",x,y))call QTI(QHI,1093686084)call SetUnitAbilityLevel(QHI,1093686084,NGI)call IssuePointOrder(QHI,"silence",x,y)set QJ=NGI*70call GroupEnumUnitsInRange(g,x,y,425,Condition(function AL1))call ForGroup(g,function D43)call MCI(g)set QHI=nullset g=nullset N0I=nullendfunctionfunction D63 takes nothing returns booleanif GetSpellAbilityId()==1093686083 thencall D53()endifreturn falseendfunctionfunction N21 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function D63))set t=nullendfunctionfunction D73 takes unit TLI,unit TMI,integer NGI,integer XWO returns nothingcall BQ1(TLI,TMI,0.75+0.75*NGI)if XWO==1 thencall TKI(TLI,TMI,1,NGI*50+50)elsecall TKI(TLI,TMI,1,NGI*50+50+100)endifendfunctionfunction D83 takes unit TLI,unit TMI returns nothinglocal unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call QTI(QHI,1093686086)call IssueTargetOrder(QHI,"thunderbolt",TMI)set QHI=nullendfunctionfunction D93 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer NGI=(LoadInteger(XY,(MKI),(5)))local integer XWO=(LoadInteger(XY,(MKI),(152)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer TRI=(LoadInteger(XY,(MKI),(30)))local unit TMI=M6I(TRI)local lightning QOI=(LoadLightningHandle(XY,(MKI),(196)))if GetTriggerEventId()==EVENT_UNIT_DEATH thencall DestroyLightning(QOI)call M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)elsecall MoveLightning(QOI,false,GetUnitX(TLI),GetUnitY(TLI),GetUnitX(TMI),GetUnitY(TMI))if PAI(GetUnitX(TLI),GetUnitY(TLI),GetUnitX(TMI),GetUnitY(TMI))>600 thencall DestroyLightning(QOI)call M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)call D73(TLI,TMI,NGI,XWO)endifendifset t=nullset TLI=nullset TMI=nullset QOI=nullreturn falseendfunctionfunction DA3 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local lightning QOI=AddLightning("HWPB",false,GetUnitX(B9I),GetUnitY(B9I),GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()))call SetLightningColor(QOI,0,.7,1,1)call SaveLightningHandle(XY,(MKI),(196),(QOI))call SaveUnitHandle(XY,(MKI),(2),(B9I))call SaveInteger(XY,(MKI),(30),(M8I(GetEnumUnit())))call SaveInteger(XY,(MKI),(5),(B5I))call SaveInteger(XY,(MKI),(152),(B6I))call TriggerRegisterTimerEvent(t,0.03,true)call TriggerRegisterUnitEvent(t,GetEnumUnit(),EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,B9I,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function D93))call TKI(GetTriggerUnit(),GetEnumUnit(),1,B7I)call D83(GetTriggerUnit(),GetEnumUnit())set t=nullset QOI=nullendfunctionfunction DB3 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local location l=GetSpellTargetLoc()local real x=GetLocationX(l)local real y=GetLocationY(l)local unit QHI=CreateUnit(GetOwningPlayer(N0I),1697656917,x,y,0)local group g=MDI()local integer NGI=GetUnitAbilityLevel(N0I,1093686072)local real BP1=6local integer XWO=1if NGI==0 thenset NGI=GetUnitAbilityLevel(N0I,1093751120)set BP1=8set XWO=2endifcall RemoveLocation(l)call SetUnitAnimation(QHI,"channel")call ID1(QHI,BP1)set B9I=QHIset B8I=BP1set B7I=NGI*50+50set B5I=NGIset B6I=XWOset CK=N0Icall GroupEnumUnitsInRange(g,x,y,400,Condition(function AP1))call ForGroup(g,function DA3)call MCI(g)set g=nullset QHI=nullset N0I=nullset l=nullendfunctionfunction DC3 takes nothing returns booleanif GetSpellAbilityId()==1093686072 or GetSpellAbilityId()==1093751120 thencall DB3()endifreturn falseendfunctionfunction N41 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function DC3))set t=nullendfunctionfunction DD3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local integer NGIlocal integer TX2local integer JNOif(GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER and GetIssuedOrderId()!=String2OrderIdBJ("phaseshift"))or GetTriggerEventId()==EVENT_UNIT_ISSUED_POINT_ORDER or GetTriggerEventId()==EVENT_UNIT_ISSUED_TARGET_ORDER or GetTriggerEventId()==EVENT_UNIT_DEATH thencall SetUnitInvulnerable(N0I,false)call UnitRemoveAbility(N0I,1093678162)call FlushChildHashtable(XY,(MKI))call MZI(t)elseset NGI=(LoadInteger(XY,(MKI),(5)))set TX2=(LoadInteger(XY,(MKI),(28)))+1call SaveInteger(XY,(MKI),(28),(TX2))set JNO=3*NGIif NGI==4 thenset JNO=JNO+1endifif TX2>JNO or PAI(GetUnitX(N0I),GetUnitY(N0I),(LoadReal(XY,(MKI),(6))),(LoadReal(XY,(MKI),(7))))>125 thencall SetUnitInvulnerable(N0I,false)call UnitRemoveAbility(N0I,1093678162)call FlushChildHashtable(XY,(MKI))call MZI(t)endifendifset t=nullset N0I=nullreturn falseendfunctionfunction DE3 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SetUnitInvulnerable(N0I,true)call QTI(N0I,1093678162)call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveInteger(XY,(MKI),(5),(GetUnitAbilityLevel(N0I,1093686082)))call SaveInteger(XY,(MKI),(28),(0))call SaveReal(XY,(MKI),(6),((GetUnitX(N0I))*1.0))call SaveReal(XY,(MKI),(7),((GetUnitY(N0I))*1.0))call TriggerRegisterTimerEvent(t,0.25,true)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_ISSUED_ORDER)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_ISSUED_POINT_ORDER)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_ISSUED_TARGET_ORDER)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function DD3))call MPI(N0I,4266,5.9)set t=nullset N0I=nullendfunctionfunction DF3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))call IssueImmediateOrder(N0I,"phaseshiftoff")call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset N0I=nullreturn falseendfunctionfunction DG3 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(14),(N0I))call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function DF3))set t=nullset N0I=nullendfunctionfunction DH3 takes nothing returns booleanif GetIssuedOrderId()==String2OrderIdBJ("phaseshift")and IsUnitIllusion(GetTriggerUnit())==false and((LoadInteger(XY,(GetHandleId((GetTriggerUnit()))),((4266))))==1)==false thencall DE3()elseif GetIssuedOrderId()==String2OrderIdBJ("phaseshifton")thencall DG3()endifreturn falseendfunctionfunction N31 takes nothing returns nothinglocal trigger t=CreateTrigger()call QBI(t,EVENT_PLAYER_UNIT_ISSUED_ORDER)call TriggerAddCondition(t,Condition(function DH3))set t=nullendfunctionfunction DZ3 takes nothing returns nothingif IsUnitInGroup(GetEnumUnit(),HK)==false thencall GroupAddUnit(HK,GetEnumUnit())call TKI(CK,GetEnumUnit(),1,QJ)endifendfunctionfunction DV3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local group g=(LoadGroupHandle(XY,(MKI),(22)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local real NN2=(LoadReal(XY,(MKI),(13)))local group DW3local real xlocal real yif GetTriggerEventId()==EVENT_UNIT_DEATH thenset CK=CreateUnit(GetOwningPlayer(QHI),1747990095,GetUnitX((LoadUnitHandle(XY,(MKI),(14)))),GetUnitY((LoadUnitHandle(XY,(MKI),(14)))),0)call SetUnitScale(CK,2.5,2.5,2.5)call KillUnit(CK)call SetUnitPosition((LoadUnitHandle(XY,(MKI),(14))),GetUnitX(QHI),GetUnitY(QHI))call ShowUnit((LoadUnitHandle(XY,(MKI),(14))),false)call ShowUnit((LoadUnitHandle(XY,(MKI),(14))),true)call SelectUnitAddForPlayer((LoadUnitHandle(XY,(MKI),(14))),GetOwningPlayer((LoadUnitHandle(XY,(MKI),(14)))))set BAI[GetPlayerId(GetOwningPlayer(QHI))]=nullcall MCI(g)call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEvalCount(t)>120 thenset BAI[GetPlayerId(GetOwningPlayer(QHI))]=nullcall MCI(g)call FlushChildHashtable(XY,(MKI))call MZI(t)call SetUnitScale(QHI,2.5,2.5,2.5)call KillUnit(QHI)elseset x=GetUnitX(QHI)set y=GetUnitY(QHI)set DW3=MDI()set HK=gset CK=QHIset QJ=NGI*70call GroupEnumUnitsInRange(DW3,x,y,225+25,Condition(function BO1))call ForGroup(DW3,function DZ3)call MCI(DW3)call SetUnitX(QHI,RCI(x+15*Cos(NN2*bj_DEGTORAD)))call SetUnitY(QHI,RGI(y+15*Sin(NN2*bj_DEGTORAD)))endifset t=nullset g=nullset DW3=nullset QHI=nullreturn falseendfunctionfunction DX3 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local group g=MDI()local unit N0I=GetTriggerUnit()local location l=GetSpellTargetLoc()local real x1=GetUnitX(N0I)local real y1=GetUnitY(N0I)local real x2=GetLocationX(l)local real y2=GetLocationY(l)local real NN2=PUI(x1,y1,x2,y2)local integer NGI=GetUnitAbilityLevel(N0I,1093686073)local unit QHI=CreateUnit(GetOwningPlayer(N0I),1747990095,x1,y1,NN2)call QWI(NC,x1,y1)call QTI(GetTriggerUnit(),1093686081)set BAI[GetPlayerId(GetOwningPlayer(N0I))]=QHIcall SetUnitScale(QHI,3.5,3.5,3.5)call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveGroupHandle(XY,(MKI),(22),(g))call SaveReal(XY,(MKI),(13),((NN2)*1.0))call SaveUnitHandle(XY,(MKI),(14),(N0I))call TriggerRegisterTimerEvent(t,0.025,true)call TriggerRegisterUnitEvent(t,QHI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function DV3))call RemoveLocation(l)set t=nullset QHI=nullset g=nullset N0I=nullset l=nullendfunctionfunction DY3 takes nothing returns nothinglocal integer i=GetPlayerId(GetOwningPlayer(GetTriggerUnit()))if BAI[i]==null thencall R1I(GetOwningPlayer(GetTriggerUnit()),GetObjectName(1848652599))elsecall SetUnitScale(BAI[i],2.5,2.5,2.5)call KillUnit(BAI[i])endifendfunctionfunction DJ3 takes nothing returns booleanif GetSpellAbilityId()==1093686073 thencall DX3()endifif GetSpellAbilityId()==1093686081 thencall DY3()endifreturn falseendfunctionfunction IllusoryOrb_Learn takes nothing returns booleanif GetLearnedSkill()==1093686073 and GetUnitAbilityLevel(GetTriggerUnit(),1093686073)==1 and IsUnitIllusion(GetTriggerUnit())==false thencall QTI(GetTriggerUnit(),1093686081)endifreturn falseendfunctionfunction NO1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function DJ3))set t=nullendfunctionfunction DK3 takes nothing returns booleanreturn GetSpellAbilityId()==1093808453endfunctionfunction DL3 takes nothing returns nothingcall SetUnitX(GetEnumUnit(),BBI)call SetUnitY(GetEnumUnit(),BCI)endfunctionfunction DM3 takes nothing returns nothinglocal destructable array dxlocal integer SIIlocal integer S1Ilocal fogmodifier DN3local unit QHI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local location UG2local real xlocal real ylocal group g=MDI()if TMI==null thenset UG2=GetSpellTargetLoc()elseset UG2=GetUnitLoc(TMI)endifset x=GetLocationX(UG2)set y=GetLocationY(UG2)set BBI=xset BCI=yif IsUnitAlly(QHI,GetOwningPlayer(TMI))==true or MBI(GetSpellTargetUnit())==false thenset CK=QHIcall GroupEnumUnitsInRange(g,x,y,150,Condition(function AT1))call UMI(CreateFogModifierRadiusLocBJ(true,GetOwningPlayer(QHI),FOG_OF_WAR_VISIBLE,UG2,1000.00),2.25+0.75*GetUnitAbilityLevel(QHI,1093808453))set SII=1set S1I=8loopexitwhen SII>S1Icall UTI(CreateDestructableLoc(1110454325,KNI(UG2,150.00,(I2R(SII)*45.00)),GetRandomReal(0,360),1,0),2.25+0.75*GetUnitAbilityLevel(QHI,1093808453))set SII=SII+1endloopendifcall RemoveLocation(UG2)call ForGroup(g,function DL3)call MCI(g)set DN3=nullset QHI=nullset TMI=nullset UG2=nullset g=nullendfunctionfunction DS3 takes nothing returns nothingif GetSpellAbilityId()==1093808453 and IsUnitAlly(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))and(LoadBoolean(XY,(GetHandleId(GetOwningPlayer(GetSpellTargetUnit()))),(139)))thencall R6I(GetTriggerUnit())call R1I(GetOwningPlayer(GetTriggerUnit()),GetObjectName(1848652600))endifendfunctionfunction W61 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function DK3))call TriggerAddAction(t,function DM3)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddAction(t,function DS3)endfunctionconstant function Teleportation_AbilityCode takes nothing returns integerreturn 1093677391endfunctionfunction DT3 takes nothing returns booleanreturn GetSpellAbilityId()==(1093677391)endfunctionfunction DR3 takes nothing returns nothinglocal location O4O=GetSpellTargetLoc()local real x=GetLocationX(O4O)local real y=GetLocationY(O4O)if IsPlayerAlly(GetLocalPlayer(),GetOwningPlayer(GetTriggerUnit()))thencall PingMinimapEx(x,y,3,255,255,255,false)endifcall DestroyEffect(AddSpecialEffect("war3mapImported\\FurionTeleportTarget.mdx",x,y))call DestroyEffect(AddSpecialEffect("war3mapImported\\FurionTeleportTarget.mdx",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit())))call RemoveLocation(O4O)endfunctionfunction W71 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CHANNEL)call TriggerAddCondition(t,Condition(function DT3))call TriggerAddAction(t,function DR3)endfunctionfunction DP3 takes unit TLI,real x,real y returns nothinglocal unit DQ3=CreateUnit(GetOwningPlayer(TLI),1701212014,x,y,0)call UnitApplyTimedLife(DQ3,1111844462,60)call SetUnitVertexColor(DQ3,175,255,175,175)call SetUnitFlyHeight(DQ3,0,0)set DQ3=nullendfunctionfunction DU3 takes nothing returns nothingif(T5I(GetEnumDestructable())or GetDestructableTypeId(GetEnumDestructable())==1110454325)and BDI<=BEI and GetDestructableLife(GetEnumDestructable())>0 thenset BDI=BDI+1call DP3(GetTriggerUnit(),GetDestructableX(GetEnumDestructable()),GetDestructableY(GetEnumDestructable()))call KillDestructable(GetEnumDestructable())endifendfunctionfunction E03 takes nothing returns nothinglocal integer NGI=GetUnitAbilityLevel(GetTriggerUnit(),1095067246)local location l=GetSpellTargetLoc()local real x=GetLocationX(l)local real y=GetLocationY(l)local real d=75+75*NGI+50local rect r=Rect(x-d,y-d,x+d,y+d)set BDI=0set BEI=NGIcall EnumDestructablesInRect(r,Condition(function LWI),function DU3)call RemoveRect(r)call RemoveLocation(l)set l=nullset r=nullendfunctionfunction ForceOfNature_Main takes nothing returns booleanif GetSpellAbilityId()==1095067246 thencall E03()endifreturn falseendfunctionfunction W81 takes nothing returns nothingendfunctionfunction EI3 takes nothing returns nothinglocal unit TMI=GetEnumUnit()local real d=PAI(GetUnitX(TMI),GetUnitY(TMI),BHI,BZI)if d<BGI and IsUnitVisible(TMI,GetOwningPlayer(BVI))==true thenset BFI=GetEnumUnit()set BGI=dendifset TMI=nullendfunctionfunction E13 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(GetTriggerUnit(),1093752632)local integer UWI=1093678936local group glocal unit QHIif NGI==0 thenset NGI=GetUnitAbilityLevel(GetTriggerUnit(),1093752633)set UWI=1093681484endifif TMI==null thenset BFI=nullset BVI=TLIset BGI=999999set BHI=GetSpellTargetX()set BZI=GetSpellTargetY()set CK=TLIset g=MDI()call GroupEnumUnitsInRange(g,0,0,9999,Condition(function AT1))call ForGroup(g,function EI3)call MCI(g)set TMI=BFIset g=nullendifif TMI!=null thenset QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TLI),GetUnitY(TLI),0)call QTI(QHI,UWI)call SetUnitAbilityLevel(QHI,UWI,NGI)call IssueTargetOrder(QHI,"chainlightning",TMI)set QHI=nullendifset TLI=nullset TMI=nullendfunctionfunction EO3 takes nothing returns booleanif GetSpellAbilityId()==1093752632 or GetSpellAbilityId()==1093752633 thencall E13()endifreturn falseendfunctionfunction W91 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function EO3))set t=nullendfunctionfunction E23 takes unit TLI,unit TMI returns nothinglocal unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)local integer NGI=GetUnitAbilityLevel(TLI,1093685586)local real U32local real E33=0.5if NGI==0 thenset NGI=GetUnitAbilityLevel(TLI,1093747251)set E33=0.65endifcall QTI(QHI,1093685589)call SetUnitAbilityLevel(QHI,1093685589,NGI)call IssueTargetOrder(QHI,"slow",TMI)if NGI==1 thenset U32=0.4elseif NGI==2 thenset U32=0.35elseset U32=0.3endifcall TKI(TLI,TLI,1,GetUnitState(TLI,UNIT_STATE_LIFE)*U32)call TKI(TLI,TMI,1,GetUnitState(TMI,UNIT_STATE_LIFE)*E33)call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",TLI,"chest"))call DestroyEffect(AddSpecialEffectTarget("effects\\LifeBreak.mdx",TMI,"chest"))set TLI=nullset TMI=nullset QHI=nullendfunctionfunction E43 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real PI2=(LoadReal(XY,(MKI),(23)))local real P12=(LoadReal(XY,(MKI),(24)))local real xlocal real ylocal real P4I=GetUnitX(TLI)local real P5I=GetUnitY(TLI)local real P6I=GetUnitX(TMI)local real P7I=GetUnitY(TMI)local real NN2=Atan2(P7I-P5I,P6I-P4I)if GetUnitTypeId(TLI)==1160786520 thencall SetUnitAnimationByIndex(TLI,1)elsecall SetUnitAnimationByIndex(TLI,17)endifif GetTriggerEventId()==EVENT_WIDGET_DEATH or PAI(PI2,P12,P6I,P7I)>1400 or AI1(TLI)thencall SetUnitPathing(TLI,true)call DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call UnitRemoveAbility(TLI,1093686100)call SetUnitTimeScale(TLI,1.0)call FlushChildHashtable(XY,(MKI))call MZI(t)elseif PAI(P4I,P5I,P6I,P7I)<125 thencall SetUnitPathing(TLI,true)call DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call UnitRemoveAbility(TLI,1093686100)call FlushChildHashtable(XY,(MKI))call MZI(t)call SetUnitTimeScale(TLI,1.0)if TMI!=null and QPI(TMI)==false thencall IssueTargetOrder(TLI,"attack",TMI)call E23(TLI,TMI)endifelsecall SetUnitPathing(TLI,false)set PI2=P6Iset P12=P7Icall SaveReal(XY,(MKI),(23),((PI2)*1.0))call SaveReal(XY,(MKI),(24),((P12)*1.0))set x=P4I+15*Cos(NN2)set y=P5I+15*Sin(NN2)call SetUnitPosition(TLI,x,y)call SetUnitFacing(TLI,NN2*bj_RADTODEG)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction E53 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.015,true)call TriggerRegisterDeathEvent(t,TLI)call TriggerAddCondition(t,Condition(function E43))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveReal(XY,(MKI),(23),((GetUnitX(TMI))*1.0))call SaveReal(XY,(MKI),(24),((GetUnitY(TMI))*1.0))call SaveEffectHandle(XY,(MKI),(175),(AddSpecialEffectTarget("war3mapImported\\LifeBreakCharge.mdx",TLI,"hand right alternate")))call SaveEffectHandle(XY,(MKI),(176),(AddSpecialEffectTarget("war3mapImported\\LifeBreakCharge.mdx",TLI,"hand left alternate")))call SetUnitPathing(TLI,false)call QTI(TLI,1093686100)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093686100,false)call SetUnitAnimationByIndex(TLI,17)call SetUnitTimeScale(TLI,3.0)set TLI=nullset TMI=nullset t=nullendfunctionfunction E63 takes nothing returns booleanif(GetSpellAbilityId()==1093685586 or GetSpellAbilityId()==1093747251)and MBI(GetSpellTargetUnit())==false thencall E53()endifreturn falseendfunctionfunction MF1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function E63))set t=nullcall RVI(1093685589)endfunctionfunction E73 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer NGI=(LoadInteger(XY,(MKI),(5)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer E83=N1I(TMI)local real POI=GetUnitState(TMI,UNIT_STATE_LIFE)local real N5O=GetUnitState(TMI,UNIT_STATE_MAX_LIFE)local real E93if POI/N5O>0.4 thenset E93=I2R(NGI)/4*0.2*E83+2*NGIelseset E93=(I2R(NGI)/4+0.25)*0.6*E83+2*NGIendifset E93=E93/8.0if GetTriggerEvalCount(t)>16*8.0 thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(31))))call UnitRemoveAbility(TMI,1093685583)call FlushChildHashtable(XY,(MKI))call MZI(t)elsecall SetUnitState(TMI,UNIT_STATE_LIFE,POI+E93)endifset TMI=nullset t=nullreturn falseendfunctionfunction EA3 takes nothing returns nothinglocal unit TMI=GetSpellTargetUnit()local unit TLI=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093685584)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,1/8.0,true)call TriggerAddCondition(t,Condition(function E73))call SaveInteger(XY,(MKI),(5),(NGI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveEffectHandle(XY,(MKI),(31),(AddSpecialEffectTarget("InnerVitality.mdx",TMI,"chest")))call QTI(TMI,1093685583)call SetUnitAbilityLevel(TMI,1093685583,NGI)set TMI=nullset TLI=nullset t=nullendfunctionfunction EB3 takes nothing returns booleanif GetSpellAbilityId()==1093685584 thencall EA3()endifreturn falseendfunctionfunction MC1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function EB3))endfunctionfunction EC3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer XVOlocal integer ED3local integer EE3local integer TRI=(LoadInteger(XY,(MKI),(30)))local unit TMI=M6I(TRI)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if GetTriggerEvalCount(t)>8 or QPI(TMI)thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(31))))call FlushChildHashtable(XY,(MKI))set XVO=GetHandleId(TLI)set ED3=6000+GetHandleId(TMI)set EE3=(LoadInteger(XY,(XVO),(ED3)))set EE3=EE3-1if EE3==0 thencall SaveInteger(XY,(XVO),(ED3),(0))elsecall SaveInteger(XY,(XVO),(ED3),(EE3))endifcall M5I(TRI)call MZI(t)elsecall TKI(TLI,TMI,1,5*GetUnitAbilityLevel(TLI,1093685582))endifset t=nullset TMI=nullset TLI=nullreturn falseendfunctionfunction EF3 takes unit TLI,unit TMI returns nothinglocal integer MKI=GetHandleId(TLI)local integer XVOlocal trigger tlocal integer EG3=(LoadInteger(XY,(MKI),(6000+GetHandleId(TMI))))set t=CreateTrigger()call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function EC3))set XVO=GetHandleId(t)call SaveUnitHandle(XY,(XVO),(2),(TLI))call SaveInteger(XY,(XVO),(30),(M8I(TMI)))call SaveInteger(XY,(MKI),(6000+GetHandleId(TMI)),(EG3+1))call SaveEffectHandle(XY,(XVO),(31),(AddSpecialEffectTarget("Abilities\\Spells\\Other\\BreathOfFire\\BreathOfFireDamage.mdl",TMI,"chest")))set t=nullendfunctionfunction EH3 takes nothing returns booleanlocal real dif GetUnitAbilityLevel(GetTriggerUnit(),1110456369)>0 and GetUnitAbilityLevel(GetEventDamageSource(),1093685582)>0 and(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(2)))==GetEventDamageSource()thencall SetUnitState(GetEventDamageSource(),UNIT_STATE_LIFE,RQI(GetUnitState(GetEventDamageSource(),UNIT_STATE_LIFE)-15,1))call UnitRemoveAbility(GetTriggerUnit(),1110456369)call EF3(GetEventDamageSource(),GetTriggerUnit())call DisableTrigger(GetTriggeringTrigger())call FlushChildHashtable(XY,(GetHandleId(GetTriggeringTrigger())))call MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction EZ3 takes nothing returns nothinglocal trigger tlocal unit TMIlocal unit TLIif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT thenset TMI=GetSpellTargetUnit()set TLI=GetTriggerUnit()elseset TMI=GetTriggerUnit()set TLI=GetAttacker()endifif IsUnitIllusion(TLI)==false thenset t=CreateTrigger()call SaveUnitHandle(XY,(GetHandleId(t)),(2),(TLI))call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function EH3))endifset t=nullset TMI=nullset TLI=nullendfunctionfunction EV3 takes nothing returns booleanif GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED thenif GetUnitAbilityLevel(GetAttacker(),1093685582)>0 and(LoadBoolean(XY,(GetHandleId(GetTriggeringTrigger())),(263)))and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(14)))thencall EZ3()endifelseif GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER thenif(GetIssuedOrderId()==OrderId("poisonarrows"))thencall SaveBoolean(XY,(GetHandleId(GetTriggeringTrigger())),(263),(true))elseif(GetIssuedOrderId()==OrderId("unpoisonarrows"))thencall SaveBoolean(XY,(GetHandleId(GetTriggeringTrigger())),(263),(false))endifelseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()==1093685582 thencall EZ3()endifreturn falseendfunctionfunction EW3 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_SPELL_EFFECT)call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_ISSUED_ORDER)call TriggerAddCondition(t,Condition(function EV3))call SaveUnitHandle(XY,(GetHandleId(t)),(14),(GetTriggerUnit()))set t=nullendfunctionfunction EX3 takes nothing returns booleanif GetLearnedSkill()==1093685582 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093685582)==1 thencall EW3()endifreturn falseendfunctionfunction MD1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function EX3))set t=nullendfunctionfunction EY3 takes unit N0I,integer EJ3 returns nothinglocal integer i=0loopexitwhen i>24if i!=EJ3/4 and GetUnitAbilityLevel(N0I,BWI[i])>0 thencall UnitRemoveAbility(N0I,BWI[i])endifset i=i+1endloopif GetUnitAbilityLevel(N0I,BWI[EJ3/4])==0 thencall QTI(N0I,BWI[EJ3/4])call SetPlayerAbilityAvailable(GetOwningPlayer(N0I),BWI[EJ3/4],false)endifendfunctionfunction EK3 takes nothing returns booleanlocal integer MKI=GetHandleId(GetTriggeringTrigger())local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local real EL3=GetUnitState(N0I,UNIT_STATE_LIFE)local real MaxHealth=GetUnitState(N0I,UNIT_STATE_MAX_LIFE)local integer EM3local integer EN3local integer NGI=GetUnitAbilityLevel(N0I,1093685585)local boolean ES3=(LoadBoolean(XY,(MKI),(319)))if IsUnitType(N0I,UNIT_TYPE_HERO)==true and NGI>0 thenset EM3=R2I(100*GetUnitState(N0I,UNIT_STATE_LIFE)/GetUnitState(N0I,UNIT_STATE_MAX_LIFE))set EN3=RTI(RSI(R2I(100-EM3)/7,14),1)if QPI(N0I)==false thenif(GetUnitAbilityLevel(N0I,1112433775)>0)thenset EN3=0endifcall EM1(N0I,(4+NGI*4)*EN3)call EY3(N0I,(3+NGI)*EN3)if EM3<40 thenif ES3==false thencall SaveBoolean(XY,(MKI),(319),(true))call SaveEffectHandle(XY,(MKI),(175),(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\TrollBerserk\\HeadhunterWEAPONSLeft.mdl",N0I,"left weapon")))call SaveEffectHandle(XY,(MKI),(176),(AddSpecialEffectTarget("effects\\HeadhunterWEAPONSRight_NoSound.mdx",N0I,"right weapon")))endifelseif ES3==true thencall SaveBoolean(XY,(MKI),(319),(false))call DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))endifendifendifendifset N0I=nullreturn falseendfunctionfunction ET3 takes nothing returns nothinglocal trigger t=CreateTrigger()call TriggerRegisterTimerEvent(t,0.5,true)call TriggerAddCondition(t,Condition(function EK3))call SaveUnitHandle(XY,(GetHandleId(t)),(14),(GetTriggerUnit()))call SaveBoolean(XY,(GetHandleId(t)),(319),(false))set t=nullendfunctionfunction ER3 takes nothing returns booleanif GetLearnedSkill()==1093685585 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093685585)==1 thencall ET3()endifreturn falseendfunctionfunction ME1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function ER3))set BWI[1]=1093816397set BWI[2]=1093816398set BWI[3]=1093816399set BWI[4]=1093816400set BWI[5]=1093816401set BWI[6]=1093816394set BWI[7]=1093816402set BWI[8]=1093816393set BWI[9]=1093816396set BWI[10]=1093816404set BWI[11]=1093816625set BWI[12]=1093816405set BWI[13]=1093816392set BWI[14]=1093816406set BWI[15]=1093816407set BWI[16]=1093816408set BWI[17]=1093816409set BWI[18]=1093816410set BWI[19]=1093816624set BWI[20]=1093816395set BWI[21]=1093816403set BWI[22]=1093817409set BWI[23]=1093817410set BWI[24]=1093817411set t=nullendfunctionfunction EP3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local real a=(LoadReal(XY,(MKI),(137)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local integer id=GetPlayerId(GetOwningPlayer(TLI))local integer MFI=GetTriggerEvalCount(t)local real U2I=x+150*MFI*Cos(a)local real U3I=y+150*MFI*Sin(a)local integer EQ3=6if GetUnitAbilityLevel(TLI,1093685045)==0 thenset EQ3=11endifcall IssuePointOrder(BXI[id],"flamestrike",U2I,U3I)if MFI==(EQ3)thencall FlushChildHashtable(XY,(MKI))call MZI(t)call SetUnitAnimation(TLI,"stand")endifset t=nullset TLI=nullreturn falseendfunctionfunction EU3 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local location l=GetSpellTargetLoc()local real x=GetLocationX(l)local real y=GetLocationY(l)local real a=Atan2(y-GetUnitY(TLI),x-GetUnitX(TLI))local integer NGI=GetUnitAbilityLevel(TLI,1093685045)local integer F03=1093685061if NGI==0 thenset NGI=GetUnitAbilityLevel(TLI,1093747249)set F03=1093747250endifcall RemoveLocation(l)call SetUnitAnimation(TLI,"spell")set BXI[GetPlayerId(GetOwningPlayer(TLI))]=CreateUnit(GetOwningPlayer(TLI),1697656901,x,y,0)call QTI(BXI[GetPlayerId(GetOwningPlayer(TLI))],F03)call SetUnitAbilityLevel(BXI[GetPlayerId(GetOwningPlayer(TLI))],F03,NGI)call SaveInteger(XY,(MKI),(5),(NGI))call SaveReal(XY,(MKI),(6),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(7),((GetUnitY(TLI))*1.0))call SaveReal(XY,(MKI),(137),((a)*1.0))call SaveUnitHandle(XY,(MKI),(2),(TLI))if F03==1093685061 thencall TriggerRegisterTimerEvent(t,0.1,true)elsecall TriggerRegisterTimerEvent(t,0.05,true)endifcall TriggerAddCondition(t,Condition(function EP3))set t=nullset TLI=nullset l=nullendfunctionfunction FI3 takes nothing returns booleanif GetSpellAbilityId()==1093685045 or GetSpellAbilityId()==1093747249 thencall EU3()endifreturn falseendfunctionfunction VB1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function FI3))call RVI(1093685061)set t=nullendfunctionfunction F13 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer NGI=(LoadInteger(XY,(MKI),(5)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))if GetTriggerEvalCount(t)>10 or GetTriggerEventId()==EVENT_UNIT_DEATH thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call UnitRemoveAbility(TMI,1093748533)call UnitRemoveAbility(TMI,1093748531)call UnitRemoveAbility(TMI,1093748534)call UnitRemoveAbility(TMI,1093748532)call FlushChildHashtable(XY,(MKI))call MZI(t)elsecall TKI(TLI,TMI,1,(NGI*5+10)/2)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction FO3 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer NGI=BJIlocal unit TLI=BYIlocal unit TMI=GetEnumUnit()if NGI==1 thencall QTI(TMI,1093748533)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093748533,false)elseif NGI==2 thencall QTI(TMI,1093748531)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093748531,false)elseif NGI==3 thencall QTI(TMI,1093748534)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093748534,false)elseif NGI==4 thencall QTI(TMI,1093748532)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093748532,false)endifcall SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("Abilities\\Spells\\Other\\BreathOfFire\\BreathOfFireDamage.mdl",TMI,"chest")))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(5),(NGI))call TriggerRegisterTimerEvent(t,0.5,true)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function F13))call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",GetUnitX(TMI),GetUnitY(TMI)))set t=nullset TLI=nullset TMI=nullendfunctionfunction F23 takes unit TLI,unit TMI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer NGI=GetUnitAbilityLevel(TLI,1093817935)local real x=GetUnitX(TMI)local real y=GetUnitY(TMI)local group g=MDI()local group g2=MDI()set BJI=NGIset BYI=TLIset CK=TLIcall GroupEnumUnitsInRange(g,x,y,300+25,Condition(function B21))call GroupEnumUnitsInRange(g2,x,y,300+25,Condition(function AJ1))call GroupAddGroup(g2,g)call ForGroup(g,function FO3)call MCI(g)call MCI(g2)set t=nullset g=nullset g2=nullendfunctionfunction F33 takes nothing returns booleanif GetUnitAbilityLevel(GetTriggerUnit(),1110460248)>0 and GetUnitAbilityLevel(GetEventDamageSource(),1093817677)>0 and(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(2)))==GetEventDamageSource()thencall UnitRemoveAbility(GetTriggerUnit(),1110460248)call FlushChildHashtable(XY,(GetHandleId(GetTriggeringTrigger())))call MZI(GetTriggeringTrigger())call F23(GetEventDamageSource(),GetTriggerUnit())endifreturn falseendfunctionfunction F43 takes nothing returns nothinglocal trigger t=CreateTrigger()local unit TMI=GetSpellTargetUnit()local unit TLI=GetTriggerUnit()call SaveUnitHandle(XY,(GetHandleId(t)),(2),(TLI))call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function F33))set t=nullset TMI=nullset TLI=nullendfunctionfunction F53 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))call IssueImmediateOrder(TLI,"unpoisonarrows")call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullreturn falseendfunctionfunction F63 takes nothing returns booleanlocal unit TLI=GetTriggerUnit()local trigger tif GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER thenif GetIssuedOrderId()==OrderId("poisonarrows")thenset t=CreateTrigger()call SaveUnitHandle(XY,(GetHandleId(t)),(2),(TLI))call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function F53))endifelseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()==1093817677 thencall F43()endifreturn falseendfunctionfunction F73 takes nothing returns nothinglocal trigger tif GetUnitAbilityLevel(GetTriggerUnit(),1093817935)==1 thenset t=CreateTrigger()call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_SPELL_EFFECT)call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_ISSUED_ORDER)call TriggerAddCondition(t,Condition(function F63))set t=nullendifif GetUnitAbilityLevel(GetTriggerUnit(),1093817677)==0 thencall QTI(GetTriggerUnit(),1093817677)endifcall SetUnitAbilityLevel(GetTriggerUnit(),1093817677,GetUnitAbilityLevel(GetTriggerUnit(),1093817935))endfunctionfunction F83 takes nothing returns booleanif GetLearnedSkill()==1093817935 and IsUnitIllusion(GetTriggerUnit())==false thencall F73()endifreturn falseendfunctionfunction V91 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function F83))set t=nullendfunctionfunction F93 takes nothing returns nothinglocal unit TLI=BLIlocal unit TMI=GetEnumUnit()local unit FA3if IsUnitInGroup(TMI,BKI)==false thencall GroupAddUnit(BKI,TMI)call BQ1(TLI,TMI,BMI)call TKI(TLI,TMI,1,50)call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\FreezingBreath\\FreezingBreathMissile.mdl",GetUnitX(TMI),GetUnitY(TMI)))endifendfunctionfunction FB3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local real x0=(LoadReal(XY,(MKI),(6)))local real y0=(LoadReal(XY,(MKI),(7)))local real a=(LoadReal(XY,(MKI),(137)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer MFI=GetTriggerEvalCount(t)local real xlocal real ylocal group glocal integer ilocal group SP2=(LoadGroupHandle(XY,(MKI),(187)))local integer NGI=GetUnitAbilityLevel(TLI,1093685046)set i=0loopexitwhen i>10set x=x0+100*i*Cos(a*bj_DEGTORAD)set y=y0+100*i*Sin(a*bj_DEGTORAD)if ModuloInteger(MFI,10)==0 thenendifset CK=TLIset BLI=TLIset BKI=SP2set BMI=(0.6+0.4*NGI)-(MFI*0.05)set BNI=NGIset g=MDI()call GroupEnumUnitsInRange(g,x,y,150+25,Condition(function AT1))call ForGroup(g,function F93)call MCI(g)set i=i+1endloopif MFI==20*(0.6+0.4*NGI)thencall MCI(SP2)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset g=nullset SP2=nullreturn falseendfunctionfunction FC3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local real x0=(LoadReal(XY,(MKI),(6)))local real y0=(LoadReal(XY,(MKI),(7)))local real a=(LoadReal(XY,(MKI),(137)))local integer MFI=GetTriggerEvalCount(t)local real x=x0+100*MFI*Cos(a*bj_DEGTORAD)local real y=y0+100*MFI*Sin(a*bj_DEGTORAD)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer NGI=GetUnitAbilityLevel(TLI,1093685046)local ubersplat OD1local integer iif MFI<10 thencall SaveEffectHandle(XY,(MKI),(609+MFI),(AddSpecialEffect("effects\\IcePath.mdx",x,y)))set OD1=CreateUbersplat(x,y,"IPTH",255,255,255,255,false,false)call SetUbersplatRenderAlways(OD1,true)call SaveUbersplatHandle(XY,(MKI),(760+MFI),(OD1))endifif MFI==10 thenset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.05,true)call TriggerAddCondition(t,Condition(function FB3))call SaveReal(XY,(MKI),(6),((x0)*1.0))call SaveReal(XY,(MKI),(7),((y0)*1.0))call SaveReal(XY,(MKI),(137),((a)*1.0))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveGroupHandle(XY,(MKI),(187),(MDI()))call TriggerEvaluate(t)elseif MFI>=(0.4+0.6+0.4*NGI)/.05 thenset i=0loopexitwhen i==10call DestroyEffect((LoadEffectHandle(XY,(MKI),(609+i))))call DestroyUbersplat((LoadUbersplatHandle(XY,(MKI),(760+i))))set i=i+1endloopcall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullreturn falseendfunctionfunction FD3 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)local real a=PUI(x,y,GetSpellTargetX(),GetSpellTargetY())call TriggerRegisterTimerEvent(t,0.05,true)call TriggerAddCondition(t,Condition(function FC3))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))call SaveReal(XY,(MKI),(137),((a)*1.0))call SaveUnitHandle(XY,(MKI),(2),(TLI))call TriggerEvaluate(t)set t=nullset TLI=nullendfunctionfunction FE3 takes nothing returns booleanif GetSpellAbilityId()==1093685046 thencall FD3()endifreturn falseendfunctionfunction VA1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function FE3))set t=nullendfunctionfunction FF3 takes real x1,real y1,real x2,real y2,real x3,real y3,real x,real y returns booleanlocal real FG3=(y-y1)*(x2-x1)-(x-x1)*(y2-y1)local real FH3=(y-y3)*(x1-x3)-(x-x3)*(y1-y3)local real FZ3=(y-y2)*(x3-x2)-(x-x2)*(y3-y2)return(FG3*FH3>0)and(FZ3*FH3>0)endfunctionfunction FV3 takes nothing returns booleanlocal real FW3=QJlocal real FX3=UJlocal real FY3=IKlocal real FJ3=OKlocal real FK3=AKlocal real FL3=BKreturn IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and FF3(FW3,FX3,FY3,FJ3,FK3,FL3,GetUnitX(GetFilterUnit()),GetUnitY(GetFilterUnit()))endfunctionfunction FM3 takes real FN3,real FS3,real FT3 returns nothinglocal real FR3=600local real FP3=200local real FQ3=250local real FU3=Asin((FQ3-FP3)/FR3)local real x=FP3/Sin(FU3)local real y=(FR3+FQ3+x)*Tan(FU3)local real FW3=FS3+x*Cos((FN3-180)*bj_DEGTORAD)local real FX3=FT3+x*Sin((FN3-180)*bj_DEGTORAD)local real FY3=(FS3+(FR3+FQ3)*Cos(FN3*bj_DEGTORAD))+y*Cos((FN3-90)*bj_DEGTORAD)local real FJ3=(FT3+(FR3+FQ3)*Sin(FN3*bj_DEGTORAD))+y*Sin((FN3-90)*bj_DEGTORAD)local real FK3=(FS3+(FR3+FQ3)*Cos(FN3*bj_DEGTORAD))+y*Cos((FN3+90)*bj_DEGTORAD)local real FL3=(FT3+(FR3+FQ3)*Sin(FN3*bj_DEGTORAD))+y*Sin((FN3+90)*bj_DEGTORAD)set QJ=FW3set UJ=FX3set IK=FY3set OK=FJ3set AK=FK3set BK=FL3endfunctionfunction G03 takes nothing returns nothinglocal unit QHI=CreateUnit(GetOwningPlayer(GetTriggerUnit()),1697656901,GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),0)call QTI(QHI,1093685057)call IssueTargetOrder(QHI,"frostnova",GetEnumUnit())set QHI=nullendfunctionfunction GI3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local player p=(LoadPlayerHandle(XY,(MKI),(54)))local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local real P6I=(LoadReal(XY,(MKI),(47)))local real P7I=(LoadReal(XY,(MKI),(48)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local unit QHIif GetTriggerEvalCount(t)>1 thencall SetUnitAnimation(N0I,"stand")call FlushChildHashtable(XY,(MKI))call MZI(t)elsecall SetUnitAnimation(N0I,"spell")set QHI=CreateUnit(p,1697656901,x,y,0)call QTI(QHI,1093685059)call SetUnitAbilityLevel(QHI,1093685059,NGI)call IssuePointOrder(QHI,"breathoffrost",P6I,P7I)endifset t=nullset p=nullset N0I=nullset QHI=nullreturn falseendfunctionfunction G13 takes unit u,player p,integer NGI,location l,real x,real y returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SavePlayerHandle(XY,(MKI),(54),(p))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))call SaveReal(XY,(MKI),(47),((GetLocationX(l))*1.0))call SaveReal(XY,(MKI),(48),((GetLocationY(l))*1.0))call SaveInteger(XY,(MKI),(5),(NGI))call SaveUnitHandle(XY,(MKI),(14),(u))call TriggerRegisterTimerEvent(t,0.3,true)call TriggerAddCondition(t,Condition(function GI3))set t=nullendfunctionfunction GO3 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(N0I,1093685047)local real x=GetUnitX(N0I)local real y=GetUnitY(N0I)local location llocal unit QHIlocal group g=MDI()if GetSpellTargetUnit()==null thenset l=GetSpellTargetLoc()elseset l=GetUnitLoc(GetSpellTargetUnit())endifcall FM3(bj_RADTODEG*Atan2(GetLocationY(l)-y,GetLocationX(l)-x),x,y)call GroupEnumUnitsInRange(g,x,y,2000,Condition(function FV3))call ForGroup(g,function G03)call MCI(g)set QHI=CreateUnit(GetOwningPlayer(N0I),1697656901,x,y,0)call QTI(QHI,1093685058)call SetUnitAbilityLevel(QHI,1093685058,NGI)call IssuePointOrder(QHI,"breathoffire",GetLocationX(l),GetLocationY(l))call G13(N0I,GetOwningPlayer(N0I),NGI,l,x+50*Cos(Atan2(GetLocationY(l)-y,GetLocationX(l)-x)),y+50*Sin(Atan2(GetLocationY(l)-y,GetLocationX(l)-x)))call RemoveLocation(l)set N0I=nullset l=nullset g=nullendfunctionfunction G23 takes nothing returns booleanif GetSpellAbilityId()==1093685047 thencall GO3()endifreturn falseendfunctionfunction V81 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function G23))call RVI(1093685058)call RVI(1093685059)call RVI(1093685057)set t=nullendfunctionfunction G33 takes unit N0I,unit TMI returns nothinglocal real a=GetRandomReal(0,360)local real x=GetUnitX(TMI)+50*Cos(a*bj_DEGTORAD)local real y=GetUnitY(TMI)+50*Sin(a*bj_DEGTORAD)local real G43=GetRandomReal(200,225)if((LoadInteger(XY,(GetHandleId((N0I))),((4256))))==1)==false thencall SetUnitPosition(N0I,x,y)elsecall SetUnitX(N0I,x)call SetUnitY(N0I,y)endifcall SetUnitFacing(N0I,bj_RADTODEG*Atan2(GetUnitY(TMI)-GetUnitY(N0I),GetUnitX(TMI)-GetUnitX(N0I)))call SetUnitAnimation(N0I,"Attack")call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl",N0I,"chest"))if NXI(GetOwningPlayer(TMI))==false and IsUnitType(TMI,UNIT_TYPE_ANCIENT)==false thenset G43=99999endifcall TKI(N0I,TMI,2,G43)if((LoadInteger(XY,(GetHandleId((N0I))),((4256))))==1)==false thencall IssueTargetOrder(N0I,"attack",TMI)endifendfunctionfunction G53 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))call G33(N0I,TMI)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset N0I=nullset TMI=nullreturn falseendfunctionfunction G63 takes unit N0I returns nothinglocal group g=MDI()set CK=N0Icall GroupEnumUnitsInRange(g,GetUnitX(N0I),GetUnitY(N0I),450,Condition(function BM1))set CK=GroupPickRandomUnit(g)if CK!=null thencall G33(N0I,CK)endifcall MCI(g)set g=nullendfunctionfunction G73 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local integer G83=(LoadInteger(XY,(MKI),(216)))local integer G93=(LoadInteger(XY,(MKI),(325)))local integer TX2=(LoadInteger(XY,(MKI),(28)))local unit GA3if TX2>G83 thencall KillUnit(QHI)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)call SetPlayerAbilityAvailable(GetOwningPlayer(N0I),1093678407,true)call SetUnitPathing(N0I,true)call SetUnitInvulnerable(N0I,false)call SaveInteger(XY,(GetHandleId((N0I))),((4253)),(2))call SetUnitVertexColor(N0I,255,255,255,255)elsecall SaveInteger(XY,(MKI),(28),(TX2+1))call G63(N0I)if CK==null thencall KillUnit(QHI)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)call SetPlayerAbilityAvailable(GetOwningPlayer(N0I),1093678407,true)call SetUnitPathing(N0I,true)call SetUnitInvulnerable(N0I,false)call SaveInteger(XY,(GetHandleId((N0I))),((4253)),(2))call SetUnitVertexColor(N0I,255,255,255,255)endifendifset t=nullset N0I=nullset GA3=nullset QHI=nullreturn falseendfunctionfunction GB3 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(N0I,1093684529)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer G93=GetUnitAbilityLevel(N0I,1093678407)local player p=GetOwningPlayer(N0I)local integer G83=3local unit QHI=CreateUnit(GetOwningPlayer(N0I),1865429060,GetUnitX(N0I),GetUnitY(N0I),0)if NGI==0 thenset NGI=GetUnitAbilityLevel(N0I,1093747032)if NGI==1 thenset G83=6elseif NGI==2 thenset G83=9elseif NGI==3 thenset G83=12endifelseif NGI==2 thenset G83=6elseif NGI==3 thenset G83=9endifcall SetPlayerAbilityAvailable(p,1093678407,false)call SetUnitVertexColor(N0I,255,255,255,125)call SetUnitPathing(N0I,false)call SetUnitInvulnerable(N0I,true)call SaveInteger(XY,(GetHandleId((N0I))),((4253)),(1))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveUnitHandle(XY,(MKI),(17),(TMI))call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function G53))set t=CreateTrigger()set MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveInteger(XY,(MKI),(216),(G83))call SaveInteger(XY,(MKI),(325),(G93))call SaveInteger(XY,(MKI),(28),(2))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile_mini.mdl",N0I,"weapon")))call TriggerRegisterTimerEvent(t,0.4,true)call TriggerAddCondition(t,Condition(function G73))set N0I=nullset TMI=nullset t=nullset p=nullendfunctionfunction GC3 takes nothing returns booleanif GetSpellAbilityId()==1093684529 or GetSpellAbilityId()==1093747032 thencall GB3()endifreturn falseendfunctionfunction GD3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))call FlushChildHashtable(XY,(MKI))call MZI(t)call SetUnitAnimationByIndex(TLI,4)set t=nullset TLI=nullreturn falseendfunctionfunction GE3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.01,false)call TriggerAddCondition(t,Condition(function GD3))call SaveUnitHandle(XY,(MKI),(2),(TLI))set t=nullset TLI=nullendfunctionfunction GF3 takes nothing returns booleanif GetSpellAbilityId()==1093684529 or GetSpellAbilityId()==1093747032 thencall GE3()endifreturn falseendfunctionfunction WB1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function GC3))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function GF3))set t=nullendfunctionfunction GG3 takes nothing returns nothingcall TKI(BSI,GetEnumUnit(),1,(60.0+20.0*BTI)*0.25)endfunctionfunction GH3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer MFI=GetTriggerEvalCount(t)local group gif MFI==20 or GetTriggerEventId()==EVENT_UNIT_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseset CK=TLIset BSI=TLIset BTI=GetUnitAbilityLevel(TLI,1093678407)set g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),275,Condition(function AT1))call ForGroup(g,function GG3)call MCI(g)set g=nullendifset t=nullset TLI=nullreturn falseendfunctionfunction GZ3 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.25,true)call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function GH3))call SaveUnitHandle(XY,(MKI),(2),(GetTriggerUnit()))call TriggerEvaluate(t)call MPI(GetTriggerUnit(),4252,5)endfunctionfunction GV3 takes nothing returns booleanif GetSpellAbilityId()==1093678407 thencall GZ3()endifreturn falseendfunctionfunction WC1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function GV3))set t=nullendfunctionfunction GW3 takes nothing returns booleanreturn GetUnitTypeId(GetSummonedUnit())==1865429059 or GetUnitTypeId(GetSummonedUnit())==1865429319 or GetUnitTypeId(GetSummonedUnit())==1865429320 or GetUnitTypeId(GetSummonedUnit())==1865429321endfunctionfunction GX3 takes nothing returns nothingcall SetUnitAbilityLevelSwapped(1093678392,GetSummonedUnit(),GetUnitAbilityLevelSwapped(1093678135,GetSummoningUnit()))endfunctionfunction WA1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SUMMON)call TriggerAddCondition(t,Condition(function GW3))call TriggerAddAction(t,function GX3)endfunctionfunction GY3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real x1local real y1local real x2local real y2if GetTriggerEventId()==EVENT_UNIT_DEATH or(GetTriggerEventId()==EVENT_UNIT_DAMAGED and GetEventDamage()>2 and NXI(GetOwningPlayer(GetEventDamageSource())))thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEventId()!=EVENT_UNIT_DAMAGED and GetTriggerEventId()!=EVENT_UNIT_DEATH thenset x1=GetUnitX(TLI)set y1=GetUnitY(TLI)set x2=GetUnitX(TMI)set y2=GetUnitY(TMI)call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportCaster.mdl",x1,y1))call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl",x2,y2))call MPI(TMI,4410,1)call SetUnitPosition(TMI,GetUnitX(TLI),GetUnitY(TLI))call DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction GJ3 takes nothing returns nothinglocal unit TMI=GetEnumUnit()local real d=PAI(GetUnitX(TMI),GetUnitY(TMI),BQI,BUI)if d<BPI thenset BRI=GetEnumUnit()set BPI=dendifset TMI=nullendfunctionfunction GK3 takes nothing returns nothinglocal unit TMI=GetSpellTargetUnit()local unit TLI=GetTriggerUnit()local trigger tlocal integer MKIlocal real BP1local group gif TMI==null thenset BRI=nullset BPI=999999set BQI=GetSpellTargetX()set BUI=GetSpellTargetY()set CK=TLIset g=MDI()call GroupEnumUnitsInRange(g,0,0,9999,Condition(function BG1))call GroupRemoveUnit(g,TLI)call ForGroup(g,function GJ3)call MCI(g)set TMI=BRIset g=nullendifif GetSpellAbilityId()==1093742677 thenset BP1=5elseif GetSpellAbilityId()==1093742937 thenset BP1=4elseif GetSpellAbilityId()==1093742938 thenset BP1=3elseif GetSpellAbilityId()==1093750321 thenset BP1=3endifif TMI!=null thenset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,BP1,false)call TriggerAddCondition(t,Condition(function GY3))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveEffectHandle(XY,(MKI),(175),(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTo.mdl",TLI,"origin")))call SaveEffectHandle(XY,(MKI),(176),(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTo.mdl",TMI,"origin")))endifset TMI=nullset TLI=nullset t=nullendfunctionfunction GL3 takes nothing returns booleanif GetSpellAbilityId()==1093742677 or GetSpellAbilityId()==1093742937 or GetSpellAbilityId()==1093742938 thencall GK3()endifreturn falseendfunctionfunction GM3 takes nothing returns booleanif GetSpellAbilityId()==1093742677 or GetSpellAbilityId()==1093742937 or GetSpellAbilityId()==1093742938 thenif GetSpellTargetUnit()!=null and(LoadBoolean(XY,(GetHandleId(GetOwningPlayer(GetSpellTargetUnit()))),(139)))thencall R6I(GetTriggerUnit())call R1I(GetOwningPlayer(GetTriggerUnit()),GetObjectName(1848652600))endifendifreturn falseendfunctionfunction WG1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function GL3))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function GM3))set t=nullendfunctionfunction GN3 takes integer NGI returns integerif NGI==1 thenreturn 1093742682elseif NGI==2 thenreturn 1093742897elseif NGI==3 thenreturn 1093742681elseif NGI==4 thenreturn 1093742896endifreturn 0endfunctionfunction GS3 takes integer NGI returns integerif NGI==1 thenreturn 1110456653elseif NGI==2 thenreturn 1110456654elseif NGI==3 thenreturn 1110456655elseif NGI==4 thenreturn 1110456652endifreturn 0endfunctionfunction GT3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local real PI2=(LoadReal(XY,(MKI),(23)))local real P12=(LoadReal(XY,(MKI),(24)))local real x=GetUnitX(TMI)local real y=GetUnitY(TMI)local real d=SquareRoot((PI2-x)*(PI2-x)+(P12-y)*(P12-y))local real GR3=(0.00030+NGI*0.00005)*d*GetUnitState(TMI,UNIT_STATE_MAX_MANA)local integer X22=GetTriggerEvalCount(t)local unit QHIif T6I(TMI)==true thenset GR3=0endifif d>300 thenset GR3=0endifif GR3>1 and ModuloInteger(GetTriggerEvalCount(t),3)==0 thencall DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\WingedSerpentMissile\\WingedSerpentMissile.mdl",TMI,"chest"))endifif GR3>0 thencall SetUnitState(TMI,UNIT_STATE_MANA,GetUnitState(TMI,UNIT_STATE_MANA)-GR3)endifcall SaveReal(XY,(MKI),(23),((x)*1.0))call SaveReal(XY,(MKI),(24),((y)*1.0))if GetTriggerEventId()==EVENT_UNIT_DEATH or X22==(NGI+3)*10 thencall UnitRemoveAbility(TMI,GN3(NGI))call UnitRemoveAbility(TMI,GS3(NGI))call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetUnitState(TMI,UNIT_STATE_MANA)<1 thencall BQ1((LoadUnitHandle(XY,(MKI),(2))),TMI,1+0.5*NGI)set QHI=nullcall UnitRemoveAbility(TMI,GN3(NGI))call UnitRemoveAbility(TMI,GS3(NGI))call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TMI=nullreturn falseendfunctionfunction GP3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer NGI=GetUnitAbilityLevel(TLI,1093742680)call QTI(TMI,GN3(NGI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveReal(XY,(MKI),(23),((GetUnitX(TMI))*1.0))call SaveReal(XY,(MKI),(24),((GetUnitY(TMI))*1.0))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("effects\\BasicWaterFlash.mdx",TMI,"chest")))call TriggerRegisterTimerEvent(t,0.1,true)call TriggerAddCondition(t,Condition(function GT3))set TLI=nullset TMI=nullset t=nullendfunctionfunction GQ3 takes nothing returns booleanif GetSpellAbilityId()==1093742680 and MBI(GetSpellTargetUnit())==false thencall GP3()endifreturn falseendfunctionfunction WD1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function GQ3))set t=nullendfunctionfunction GU3 takes nothing returns nothingif IsUnitInGroup(GetEnumUnit(),HK)==false thencall GroupAddUnit(HK,GetEnumUnit())call SetUnitState(GetEnumUnit(),UNIT_STATE_LIFE,GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)+QJ)endifendfunctionfunction H03 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local group g=(LoadGroupHandle(XY,(MKI),(22)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local real NN2=(LoadReal(XY,(MKI),(13)))local group DW3local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local integer MFI=GetTriggerEvalCount(t)local real C41=1050*0.1if MFI>19 thencall MCI(g)call FlushChildHashtable(XY,(MKI))call MZI(t)elseset x=x+MFI*C41*Cos(NN2*bj_DEGTORAD)set y=y+MFI*C41*Sin(NN2*bj_DEGTORAD)set DW3=MDI()set HK=gset CK=TLIset QJ=(50*NGI)*0.75call GroupEnumUnitsInRange(DW3,x,y,350+25,Condition(function BC1))call ForGroup(DW3,function GU3)call MCI(DW3)endifset t=nullset g=nullset DW3=nullreturn falseendfunctionfunction HI3 takes unit TLI,real x0,real y0,real x1,real y1,integer M92 returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local group g=MDI()local real NN2=PUI(x0,y0,x1,y1)call SaveInteger(XY,(MKI),(5),(M92))call SaveGroupHandle(XY,(MKI),(22),(g))call SaveReal(XY,(MKI),(13),((NN2)*1.0))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(6),((x0)*1.0))call SaveReal(XY,(MKI),(7),((y0)*1.0))call TriggerRegisterTimerEvent(t,0.1,true)call TriggerAddCondition(t,Condition(function H03))set t=nullset g=nullendfunctionfunction H13 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit HO3=(LoadUnitHandle(XY,(MKI),(19)))local real NN2=(LoadReal(XY,(MKI),(13)))local integer M92=(LoadInteger(XY,(MKI),(34)))local real H23=GetUnitX(HO3)-50*Cos(NN2)local real H33=GetUnitY(HO3)-50*Sin(NN2)local unit QHI=CreateUnit(GetOwningPlayer(HO3),1697656901,H23,H33,0)local real x=GetUnitX(QHI)+50*Cos(NN2)local real y=GetUnitY(QHI)+50*Sin(NN2)local real x2=x+(300+50*M92)*Cos(NN2)local real y2=y+(300+50*M92)*Sin(NN2)local unit TLI=K1[GetPlayerId(GetOwningPlayer(QHI))]call QTI(QHI,1093679159)call SetUnitAbilityLevel(QHI,1093679159,M92)call IssuePointOrder(QHI,"breathoffire",x,y)call KillUnit(HO3)call FlushChildHashtable(XY,(MKI))call MZI(t)if TLI!=null and R8I()and DB1(TLI,FK0[J20])!=null thencall HI3(TLI,H23,H33,x,y,M92)endifset QHI=nullset t=nullreturn falseendfunctionfunction H43 takes unit HO3,integer M92,real NN2 returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function H13))call SaveUnitHandle(XY,(MKI),(19),(HO3))call SaveReal(XY,(MKI),(13),((NN2)*1.0))call SaveInteger(XY,(MKI),(34),(M92))set t=nullendfunctionfunction H53 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer MFI=(LoadInteger(XY,(MKI),(34)))local integer M92=MFI-1local real NN2=(LoadReal(XY,(MKI),(13)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local integer H63=2+NGI*2local boolean H73=(LoadBoolean(XY,(MKI),(240)))local unit FA3if GetTriggerEventId()!=EVENT_UNIT_SPELL_ENDCAST thencall SaveInteger(XY,(MKI),(34),(MFI+1))endifcall SetUnitScale(QHI,I2R(100+20*M92)/100,I2R(100+20*M92)/100,I2R(100+20*M92)/100)if(GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST and H73==false)or(GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST and GetSpellAbilityId()==1093743153)or M92==H63 thenif H73 thenset FA3=(LoadUnitHandle(XY,(MKI),(239)))call ShowUnit(FA3,false)call UnitApplyTimedLife(FA3,1112820806,1)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)if(LoadInteger(XY,(GetHandleId(N0I)),(704)))==0 or(LoadInteger(XY,(GetHandleId(N0I)),(704)))==1093679157 thencall SetPlayerAbilityAvailable(GetOwningPlayer(N0I),1093679157,true)endifcall SetPlayerAbilityAvailable(GetOwningPlayer(N0I),1093743153,false)call UnitRemoveAbility(N0I,1093743153)call H43(QHI,M92,NN2)endifset QHI=CreateUnit(GetOwningPlayer(QHI),1747990093,GetUnitX(QHI)+150*(M92)*Cos(NN2),GetUnitY(QHI)+150*(M92)*Sin(NN2),0)call UnitApplyTimedLife(QHI,1112820806,7)set t=nullset QHI=nullset N0I=nullset FA3=nullreturn falseendfunctionfunction H83 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))call IssueImmediateOrder(N0I,"stop")call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset N0I=nullreturn falseendfunctionfunction H93 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit N0I=GetTriggerUnit()local location l=GetSpellTargetLoc()local real NN2=Atan2(GetLocationY(l)-GetUnitY(N0I),GetLocationX(l)-GetUnitX(N0I))local real xlocal real ylocal unit QHIlocal unit FA3local boolean H73=falseif GetLocationY(l)==GetUnitY(N0I)and GetLocationX(l)==GetUnitX(N0I)thenset NN2=GetUnitFacing(N0I)*bj_DEGTORADendifset x=GetUnitX(N0I)+150*Cos(NN2)set y=GetUnitY(N0I)+150*Sin(NN2)set QHI=CreateUnit(GetOwningPlayer(N0I),1966092362,x,y,NN2*bj_RADTODEG)call RemoveLocation(l)if GetUnitTypeId(N0I)==1211119192 or GetUnitTypeId(N0I)==1211119193 or GetUnitTypeId(N0I)==1211119191 thenset H73=trueendifcall SaveBoolean(XY,(MKI),(240),(H73))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveInteger(XY,(MKI),(34),(1))call SaveInteger(XY,(MKI),(5),(GetUnitAbilityLevel(N0I,1093679157)))call SaveReal(XY,(MKI),(13),((NN2)*1.0))call TriggerRegisterTimerEvent(t,0.5,true)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_SPELL_ENDCAST)call TriggerAddCondition(t,Condition(function H53))if H73 thenset FA3=CreateUnit(GetOwningPlayer(N0I),1747990106,GetUnitX(N0I),GetUnitY(N0I),NN2*bj_RADTODEG)call SetUnitX(FA3,GetUnitX(N0I))call SetUnitY(FA3,GetUnitY(N0I))call SetUnitAnimation(FA3,"spell")call QueueUnitAnimation(FA3,"spell")call QueueUnitAnimation(FA3,"spell")call SetUnitVertexColor(FA3,255,255,255,75)call SaveUnitHandle(XY,(MKI),(239),(FA3))set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function H83))call SaveUnitHandle(XY,(MKI),(14),(N0I))endifcall SetPlayerAbilityAvailable(GetOwningPlayer(N0I),1093679157,false)call SetPlayerAbilityAvailable(GetOwningPlayer(N0I),1093743153,true)call O11(N0I,1093743153,1,6)set t=nullset N0I=nullset QHI=nullset FA3=nullset l=nullendfunctionfunction HA3 takes nothing returns booleanif GetSpellAbilityId()==1093679157 thencall H93()endifreturn falseendfunctionfunction WF1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function HA3))set t=nullendfunctionfunction HB3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer BP1=(LoadInteger(XY,(MKI),(188)))local integer MFI=GetTriggerEvalCount(t)if MFI==BP1 or GetUnitTypeId(TLI)==1214409837 thenif(LoadReal(XY,(GetHandleId(TLI)),(241)))<=(TimerGetElapsed(M))or GetUnitTypeId(TLI)==1214409837 thencall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093742932,true)elseendifcall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullreturn falseendfunctionfunction HC3 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093742932)local integer BP1=40call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093742932,false)call SaveReal(XY,(GetHandleId(TLI)),(241),(((TimerGetElapsed(M))+BP1)*1.0))call SaveInteger(XY,(MKI),(188),(BP1))call SaveUnitHandle(XY,(MKI),(2),(TLI))call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function HB3))set t=nullset TLI=nullendfunctionfunction Ignis_Main takes nothing returns booleanif GetSpellAbilityId()==1093742932 and GetUnitTypeId(GetTriggerUnit())==1214409837 thencall HC3()endifreturn falseendfunctionfunction WZ1 takes nothing returns nothingendfunctionfunction HD3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real QDO=(LoadReal(XY,(MKI),(242)))call SetUnitState(TMI,UNIT_STATE_MANA,GetUnitState(TMI,UNIT_STATE_MANA)+QDO)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIim\\AIimTarget.mdl",TMI,"origin"))call FlushChildHashtable(XY,(MKI))call MZI(t)set TMI=nullset t=nullreturn falseendfunctionfunction HE3 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveReal(XY,(MKI),(242),((75*GetUnitAbilityLevel(N0I,1093742898))*1.0))call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function HD3))set t=nullset N0I=nullset TMI=nullendfunctionfunction HF3 takes nothing returns booleanif GetSpellAbilityId()==1093742898 thencall HE3()endifreturn falseendfunctionfunction WE1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function HF3))set t=nullendfunctionfunction HG3 takes nothing returns nothinglocal unit TMI=GetEnumUnit()local real x=GetUnitX(TMI)local real y=GetUnitY(TMI)local real a=Atan2(y-C1I,x-CII)set x=RCI(x+25*Cos(a))set y=RGI(y+25*Sin(a))call QEI(x,y,150)call SetUnitX(TMI,x)call SetUnitY(TMI,y)set TMI=nullendfunctionfunction HH3 takes nothing returns nothinglocal unit TMI=GetEnumUnit()local unit QHI=CreateUnit(VK,1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call QTI(QHI,1093742679)call SetUnitAbilityLevel(QHI,1093742679,C0I)call IssueTargetOrder(QHI,"drunkenhaze",TMI)set TMI=nullset QHI=nullendfunctionfunction HZ3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local player p=(LoadPlayerHandle(XY,(MKI),(54)))local real P4I=(LoadReal(XY,(MKI),(189)))local real P5I=(LoadReal(XY,(MKI),(190)))local integer O01=(LoadInteger(XY,(MKI),(59)))local group g=(LoadGroupHandle(XY,(MKI),(22)))local integer MFI=GetTriggerEvalCount(t)set CII=P4Iset C1I=P5Icall ForGroup(g,function HG3)if MFI==10 thenif O01==1093742936 thenset C0I=1elseif O01==1093742934 thenset C0I=2elseset C0I=3endifset VK=pcall ForGroup(g,function HH3)call MCI(g)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset p=nullset g=nullreturn falseendfunctionfunction HV3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local player p=(LoadPlayerHandle(XY,(MKI),(54)))local real P4I=(LoadReal(XY,(MKI),(189)))local real P5I=(LoadReal(XY,(MKI),(190)))local integer O01=(LoadInteger(XY,(MKI),(59)))local group g=(LoadGroupHandle(XY,(MKI),(22)))call MZI(t)call FlushChildHashtable(XY,(MKI))set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.04,true)call TriggerAddCondition(t,Condition(function HZ3))call SavePlayerHandle(XY,(MKI),(54),(p))call SaveReal(XY,(MKI),(189),((P4I)*1.0))call SaveReal(XY,(MKI),(190),((P5I)*1.0))call SaveGroupHandle(XY,(MKI),(22),(g))call SaveInteger(XY,(MKI),(59),(O01))set t=nullset p=nullset g=nullreturn falseendfunctionfunction HW3 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local group g=MDI()local unit TLI=GetTriggerUnit()local location l=GetSpellTargetLoc()local real x=GetLocationX(l)local real y=GetLocationY(l)call KillUnit(CreateUnit(GetOwningPlayer(TLI),1747990096,x,y,0))set CK=TLIcall GroupEnumUnitsInRange(g,x,y,700,Condition(function AU1))call TriggerRegisterTimerEvent(t,0.4,false)call TriggerAddCondition(t,Condition(function HV3))call SavePlayerHandle(XY,(MKI),(54),(GetOwningPlayer(GetTriggerUnit())))call SaveReal(XY,(MKI),(189),((x)*1.0))call SaveReal(XY,(MKI),(190),((y)*1.0))call SaveGroupHandle(XY,(MKI),(22),(g))call SaveInteger(XY,(MKI),(59),(GetSpellAbilityId()))set t=nullset g=nullset TLI=nullendfunctionfunction HX3 takes nothing returns booleanif GetSpellAbilityId()==1093742936 or GetSpellAbilityId()==1093742934 or GetSpellAbilityId()==1093742935 thencall HW3()endifreturn falseendfunctionfunction WH1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function HX3))set t=nullendfunctionfunction HY3 takes nothing returns booleanlocal integer MKI=GetHandleId(GetTriggeringTrigger())local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit HJ3=(LoadUnitHandle(XY,(MKI),(305)))if TLI==null or QPI(TLI)or R8I()==false or DB1(TLI,FK0[J20])==null thencall ShowUnit(HJ3,false)elsecall ShowUnit(HJ3,true)call SetUnitX(HJ3,GetUnitX(TLI))call SetUnitY(HJ3,GetUnitY(TLI))endifif GetOwningPlayer(HJ3)!=GetOwningPlayer(TLI)thencall SetUnitOwner(HJ3,GetOwningPlayer(TLI),true)endifreturn falseendfunctionfunction HK3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093818450)local trigger tlocal integer MKIcall UnitRemoveAbility(TLI,1110458689)call UnitRemoveAbility(TLI,1093742932)if GetUnitAbilityLevel(TLI,1093815117)==0 thencall QTI(TLI,1093815117)endifif NGI==1 thencall UnitAddAbility(TLI,1093818420)call UnitRemoveAbility(TLI,1093818420)elseif NGI==2 thencall SetUnitAbilityLevel(TLI,1093815117,NGI)call UnitAddAbility(TLI,1093818419)call UnitRemoveAbility(TLI,1093818419)call UnitRemoveAbility(TLI,1093742936)call UnitRemoveAbility(TLI,1093742677)call QTI(TLI,1093742934)call QTI(TLI,1093742937)elseif NGI==3 thencall SetUnitAbilityLevel(TLI,1093815117,NGI)call UnitAddAbility(TLI,1093818421)call UnitRemoveAbility(TLI,1093818421)call UnitRemoveAbility(TLI,1093742936)call UnitRemoveAbility(TLI,1093742677)call UnitRemoveAbility(TLI,1093742934)call UnitRemoveAbility(TLI,1093742937)call QTI(TLI,1093742935)call QTI(TLI,1093742938)endifif NGI>0 thenset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.2,true)call TriggerAddCondition(t,Condition(function HY3))call SaveUnitHandle(XY,(MKI),(2),(GetTriggerUnit()))call SaveUnitHandle(XY,(MKI),(305),(CreateUnit(GetOwningPlayer(GetTriggerUnit()),1865429313,GetUnitX(TLI),GetUnitY(TLI),0)))set t=nullendifset TLI=nullendfunctionfunction HL3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093818449)local trigger tlocal integer MKIif NGI==1 thencall QTI(TLI,1093742932)elseif NGI==2 thencall SetUnitAbilityLevel(TLI,1093742932,NGI)elseif NGI==3 thencall SetUnitAbilityLevel(TLI,1093742932,NGI)endifset TLI=nullendfunctionfunction HM3 takes nothing returns booleanif GetTriggerEventId()==EVENT_PLAYER_HERO_SKILL thenif GetLearnedSkill()==1093818450 and IsUnitIllusion(GetTriggerUnit())==false thencall HK3()endifif GetLearnedSkill()==1093818449 and IsUnitIllusion(GetTriggerUnit())==false thencall HL3()endifelseif GetTriggerEventId()==EVENT_PLAYER_UNIT_PICKUP_ITEM and GetItemType(GetManipulatedItem())==ITEM_TYPE_PERMANENT and DH1(GetManipulatedItem())==J20 thencall HK3()endifendifreturn falseendfunctionfunction WV1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call Q9I(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)call TriggerAddCondition(t,Condition(function HM3))set t=nullendfunctionfunction HN3 takes unit N0I,integer NGI returns integerlocal integer HS3local integer HT3if NGI==1 thenset HT3=1110458929set HS3=1093744730if GetUnitAbilityLevel(N0I,HT3)>0 thencall UnitRemoveAbility(N0I,HT3)return HS3endifset HT3=1110458928set HS3=1093744970if GetUnitAbilityLevel(N0I,HT3)>0 thencall UnitRemoveAbility(N0I,HT3)return HS3endifset HT3=1110458713set HS3=1093744970if GetUnitAbilityLevel(N0I,HT3)>0 thencall UnitRemoveAbility(N0I,HT3)return HS3endifreturn 1093744729elseif NGI==2 thenset HT3=1110458936set HS3=1093744968if GetUnitAbilityLevel(N0I,HT3)>0 thencall UnitRemoveAbility(N0I,HT3)return HS3endifset HT3=1110458935set HS3=1093744967if GetUnitAbilityLevel(N0I,HT3)>0 thencall UnitRemoveAbility(N0I,HT3)return HS3endifset HT3=1110458930set HS3=1093744967if GetUnitAbilityLevel(N0I,HT3)>0 thencall UnitRemoveAbility(N0I,HT3)return HS3endifreturn 1093744969elseif NGI==3 thenset HT3=1110458931set HS3=1093744965if GetUnitAbilityLevel(N0I,HT3)>0 thencall UnitRemoveAbility(N0I,HT3)return HS3endifset HT3=1110458937set HS3=1093744964if GetUnitAbilityLevel(N0I,HT3)>0 thencall UnitRemoveAbility(N0I,HT3)return HS3endifset HT3=1110458934set HS3=1093744964if GetUnitAbilityLevel(N0I,HT3)>0 thencall UnitRemoveAbility(N0I,HT3)return HS3endifreturn 1093744971elseif NGI==4 thenset HT3=1110458933set HS3=1093744950if GetUnitAbilityLevel(N0I,HT3)>0 thencall UnitRemoveAbility(N0I,HT3)return HS3endifset HT3=1110458932set HS3=1093744949if GetUnitAbilityLevel(N0I,HT3)>0 thencall UnitRemoveAbility(N0I,HT3)return HS3endifset HT3=1110458945set HS3=1093744949if GetUnitAbilityLevel(N0I,HT3)>0 thencall UnitRemoveAbility(N0I,HT3)return HS3endifreturn 1093744972endifreturn 0endfunctionfunction HR3 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(N0I,1093744728)local integer HP3=HN3(N0I,NGI)local unit QHI=CreateUnit(GetOwningPlayer(N0I),1697656901,GetUnitX(N0I),GetUnitY(N0I),0)call QTI(QHI,HP3)call IssueTargetOrder(QHI,"bloodlust",N0I)set N0I=nullset QHI=nullendfunctionfunction HQ3 takes nothing returns booleanif GetSpellAbilityId()==1093677382 or GetSpellAbilityId()==1093677623 or GetSpellAbilityId()==1093677392 or GetSpellAbilityId()==1093679450 thencall HR3()endifreturn falseendfunctionfunction HU3 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function HQ3))set t=nullset N0I=nullendfunctionfunction Z03 takes nothing returns booleanif GetLearnedSkill()==1093744728 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093744728)==1 thencall HU3()endifreturn falseendfunctionfunction S21 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function Z03))set t=nullendfunctionfunction ZI3 takes nothing returns nothinglocal integer NGI=GetUnitAbilityLevel(GetTriggerUnit(),1093679450)local real TSIif NGI==1 thenset TSI=600elseif NGI==2 thenset TSI=925elseif NGI==3 thenset TSI=1250endifcall TKI(GetTriggerUnit(),GetSpellTargetUnit(),8,TSI)endfunctionfunction Z13 takes nothing returns booleanif(GetSpellAbilityId()==1093679450)and MBI(GetSpellTargetUnit())==false thencall ZI3()endifreturn falseendfunctionfunction ZO3 takes nothing returns booleanif(GetSpellAbilityId()==1093677392)and T6I(GetSpellTargetUnit())thencall R6I(GetTriggerUnit())call R1I(GetOwningPlayer(GetTriggerUnit()),GetObjectName(1848659026))endifreturn falseendfunctionfunction S31 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function ZO3))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function Z13))set t=nullendfunctionfunction Z23 takes nothing returns booleanif GetLearnedSkill()==1093678129 thenif GetUnitAbilityLevel(GetTriggerUnit(),1093678129)==4 thencall SetPlayerTechResearched(GetOwningPlayer(GetTriggerUnit()),1382378855,5)elsecall SetPlayerTechResearched(GetOwningPlayer(GetTriggerUnit()),1382378855,GetUnitAbilityLevel(GetTriggerUnit(),1093678129))endifelseif GetLearnedSkill()==1093678642 thencall SetPlayerTechResearched(GetOwningPlayer(GetTriggerUnit()),1378889801,1)endifreturn falseendfunctionfunction WX1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function Z23))set t=nullendfunctionfunction Z33 takes nothing returns booleanif(GetUnitTypeId((GetFilterUnit()))==1966092345)or(T6I(GetFilterUnit())==false and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(CK))and IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))thenif(LoadInteger(XY,(COI),(GetHandleId(GetFilterUnit()))))<TJ thenreturn trueendifendifreturn falseendfunctionfunction Z43 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local integer Z53=(LoadInteger(XY,(MKI),(217)))local integer G83=(LoadInteger(XY,(MKI),(216)))local integer Z63=(LoadInteger(XY,(MKI),(218)))local group g=MDI()local real x=GetUnitX(N0I)local real y=GetUnitY(N0I)local unit TMIlocal real r1=GetRandomInt(200,350)local real r2=GetRandomInt(200,350)if GetRandomInt(1,2)==1 thenset r1=-1*r1set r2=-1*r2endifset CK=N0Iset TJ=Z63set COI=GetHandleId(t)call GroupEnumUnitsInRange(g,x,y,700,Condition(function Z33))set TMI=GroupPickRandomUnit(g)call MCI(g)if QPI(N0I)==false and TMI!=null and(GetUnitTypeId((TMI))==1966092345)==false thencall SaveInteger(XY,(COI),(GetHandleId(TMI)),((LoadInteger(XY,(COI),(GetHandleId(TMI))))+1))call PKI("effects\\Eclipse.mdx",TMI,"origin",3)call TKI(N0I,TMI,1,Z53*75)elseif QPI(N0I)==false thenset x=x+GetRandomInt(-350,350)set y=y+GetRandomInt(-350,350)call PMI("effects\\Eclipse.mdx",x,y,1.5)endifif(GetTriggerEvalCount(t)+1)==G83 or QPI(N0I)==true thencall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset N0I=nullset g=nullset TMI=nullreturn falseendfunctionfunction Z73 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer G83local integer Z53=GetUnitAbilityLevel(N0I,1093678130)local integer Z63local unit QHI=CreateUnit(GetOwningPlayer(N0I),1697656901,GetUnitX(N0I),GetUnitY(N0I),0)if Z53==0 and GetUnitTypeId(N0I)!=1160785973 thenset Z53=4endifcall QTI(QHI,1093751862)if GetSpellAbilityId()==1093678388 thenset G83=1+3*GetUnitAbilityLevel(N0I,1093678388)set Z63=4elseset G83=4*GetUnitAbilityLevel(N0I,1093677141)set Z63=60endifcall SaveInteger(XY,(MKI),(217),(Z53))call SaveInteger(XY,(MKI),(216),(G83))call SaveInteger(XY,(MKI),(218),(Z63))call SaveUnitHandle(XY,(MKI),(14),(N0I))call TriggerRegisterTimerEvent(t,0.6,true)call TriggerAddCondition(t,Condition(function Z43))call TriggerEvaluate(t)call IssueImmediateOrderById(QHI,852621)set t=nullset N0I=nullset QHI=nullendfunctionfunction Z83 takes nothing returns booleanif GetSpellAbilityId()==1093678388 or GetSpellAbilityId()==1093677141 thencall Z73()endifreturn falseendfunctionfunction WW1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function Z83))set t=nullendfunctionfunction Z93 takes nothing returns nothingcall DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Starfall\\StarfallTarget.mdl",GetEnumUnit(),"origin"))endfunctionfunction ZA3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))call TKI(N0I,TMI,1,0.75*GetUnitAbilityLevel(N0I,1093684054)*75)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset N0I=nullset TMI=nullreturn falseendfunctionfunction ZB3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local group glocal unit TMI=(LoadUnitHandle(XY,(MKI),(17)))if QPI(TMI)thenset g=MDI()set CK=N0Icall GroupEnumUnitsInRange(g,GetUnitX(N0I),GetUnitY(N0I),175+25,Condition(function AN1))set TMI=GroupPickRandomUnit(g)call MCI(g)set g=nullendifcall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Starfall\\StarfallTarget.mdl",TMI,"origin"))call FlushChildHashtable(XY,(MKI))call MZI(t)set t=CreateTrigger()set MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveUnitHandle(XY,(MKI),(17),(TMI))call TriggerRegisterTimerEvent(t,0.5,false)call TriggerAddCondition(t,Condition(function ZA3))set t=nullset N0I=nullset TMI=nullreturn falseendfunctionfunction ZC3 takes nothing returns nothingcall TKI(C3I,GetEnumUnit(),1,C2I)endfunctionfunction ZD3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local group g=(LoadGroupHandle(XY,(MKI),(22)))set C2I=GetUnitAbilityLevel(N0I,1093684054)*75set C3I=N0Icall ForGroup(g,function ZC3)call MCI(g)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset N0I=nullset g=nullreturn falseendfunctionfunction ZE3 takes nothing returns nothinglocal real P3I=P8I(GetTriggerUnit(),GetEnumUnit())if P3I>650 thenelsecall GroupAddUnit(HK,GetEnumUnit())endifendfunctionfunction ZF3 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit N0I=GetTriggerUnit()local group g=MDI()local unit TMIset CK=N0Iset C3I=N0Iset HK=MDI()call GroupEnumUnitsInRange(g,GetUnitX(N0I),GetUnitY(N0I),900,Condition(function AN1))call ForGroup(g,function ZE3)call MCI(g)set g=HKcall ForGroup(g,function Z93)call SaveGroupHandle(XY,(MKI),(22),(g))call SaveUnitHandle(XY,(MKI),(14),(N0I))call TriggerRegisterTimerEvent(t,0.5,false)call TriggerAddCondition(t,Condition(function ZD3))set C3I=N0Iset g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(N0I),GetUnitY(N0I),175+25,Condition(function AN1))set TMI=GroupPickRandomUnit(g)call MCI(g)set t=CreateTrigger()set MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Starfall\\StarfallCaster.mdl",N0I,"origin")))call TriggerRegisterTimerEvent(t,1,false)call TriggerAddCondition(t,Condition(function ZB3))set t=nullset g=nullset N0I=nullset TMI=nullendfunctionfunction ZG3 takes nothing returns booleanif GetSpellAbilityId()==1093684054 thencall ZF3()endifreturn falseendfunctionfunction LP1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function ZG3))set t=nullendfunctionconstant function MoonlightShadow_RawCode takes nothing returns integerreturn 1093684053endfunctionconstant function MoonlightShadow_InvisibilityAbility takes nothing returns integerreturn 1093684052endfunctionfunction ZH3 takes nothing returns booleanreturn GetSpellAbilityId()==(1093684053)endfunctionfunction ZZ3 takes nothing returns booleanreturn IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))endfunctionfunction ZV3 takes nothing returns nothingcall QTI(GetEnumUnit(),(1093684052))call SetUnitAbilityLevel(GetEnumUnit(),(1093684052),YO)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Invisibility\\InvisibilityTarget.mdl",GetEnumUnit(),"chest"))endfunctionfunction ZW3 takes nothing returns nothingcall UnitRemoveAbility(GetEnumUnit(),(1093684052))endfunctionfunction ZX3 takes nothing returns nothinglocal timer t=GetExpiredTimer()local integer MKI=GetHandleId(t)local group GK1=(LoadGroupHandle(XY,(MKI),(220)))call ForGroup(GK1,function ZW3)call MCI(GK1)call PRI(t)endfunctionfunction ZY3 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local group GK1=MDI()local timer t=CreateTimer()local integer MKI=GetHandleId(t)local integer NGI=GetUnitAbilityLevel(N0I,(1093684053))local real BP1=15set YO=NGIcall GroupEnumUnitsInRange(GK1,0,0,9999,Condition(function ZZ3))call ForGroup(GK1,function ZV3)call SaveGroupHandle(XY,(MKI),(220),(GK1))call TimerStart(t,BP1,false,function ZX3)endfunctionfunction LR1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function ZH3))call TriggerAddAction(t,function ZY3)endfunctionconstant function Leap_RawCode takes nothing returns integerreturn 1093684302endfunctionconstant function Leap_BonusCode takes nothing returns integerreturn 1093684303endfunctionfunction ZJ3 takes nothing returns booleanreturn GetSpellAbilityId()==(1093684302)endfunctionfunction ZK3 takes nothing returns booleanreturn IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitAlly(GetFilterUnit(),GetOwningPlayer(XO))endfunctionfunction ZL3 takes nothing returns nothinglocal unit N0I=GetEnumUnit()local unit QHI=CreateUnit(GetOwningPlayer(N0I),1697657170,0,0,0)call QTI(QHI,(1093684303))call SetUnitAbilityLevel(QHI,(1093684303),GetUnitAbilityLevel(XO,(1093684302)))call UnitApplyTimedLife(QHI,1112820806,10)endfunctionfunction ZM3 takes unit N0I returns nothinglocal group GK1=MDI()set XO=N0Icall GroupEnumUnitsInRange(GK1,GetUnitX(N0I),GetUnitY(N0I),800,Condition(function ZK3))call ForGroup(GK1,function ZL3)call MCI(GK1)endfunctionfunction ZN3 takes unit N0I returns nothinglocal integer MKI=GetHandleId(N0I)local string ZS3=(LoadStr(XY,(MKI),(206)))local string ZT3=OrderId2String((LoadInteger(XY,(MKI),(211))))local real P6Ilocal real P7Ilocal unit TMIlocal trigger t=(LoadTriggerHandle(XY,(MKI),(204)))local boolean ZR3=not(LoadBoolean(XY,(MKI),(207)))local boolean ZP3=(LoadBoolean(XY,(MKI),(208)))call DisableTrigger(t)call IssueImmediateOrder(N0I,"stop")if ZS3=="Target"and(ZR3 or ZP3)thenset TMI=(LoadUnitHandle(XY,(MKI),(215)))call IssueTargetOrder(N0I,ZT3,TMI)elseif ZS3=="Point"and(ZR3 or ZP3)thenset P6I=(LoadReal(XY,(MKI),(209)))set P7I=(LoadReal(XY,(MKI),(210)))call IssuePointOrder(N0I,ZT3,P6I,P7I)elseif(ZR3 or ZP3)thencall IssueImmediateOrder(N0I,"OrderString")endifcall SaveBoolean(XY,(MKI),(208),(false))call EnableTrigger(t)endfunctionfunction ZQ3 takes nothing returns nothinglocal timer t=GetExpiredTimer()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local real ZU3=(LoadReal(XY,(MKI),(212)))local real V03=(LoadReal(XY,(MKI),(213)))local real NN2=(LoadReal(XY,(MKI),(13)))local real U2I=GetUnitX(N0I)+30*Cos(NN2*bj_DEGTORAD)local real U3I=GetUnitY(N0I)+30*Sin(NN2*bj_DEGTORAD)local real VI3=200local real V13=(1-ZU3/V03)*VI3*2if V13>VI3 thenset V13=VI3*2-V13endifcall SetUnitFlyHeight(N0I,RQI(V13,0),0)call SetUnitX(N0I,RCI(U2I))call SetUnitY(N0I,RGI(U3I))call SetUnitFacing(N0I,NN2)call SaveReal(XY,(MKI),(212),((ZU3-20)*1.0))if V13<1 and ZU3-V03!=0 thencall SaveBoolean(XY,(GetHandleId(N0I)),(214),(false))call SetUnitFacing(N0I,NN2)call SetUnitAnimation(N0I,"stand")call SetUnitPathing(N0I,true)call ZN3(N0I)call PauseTimer(t)call FlushChildHashtable(XY,(MKI))call DestroyTimer(t)endifendfunctionfunction VO3 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(N0I,(1093684302))local real P3I=350+50*NGIlocal real NN2=GetUnitFacing(N0I)local real P4I=GetUnitX(N0I)local real P5I=GetUnitY(N0I)local real P6I=RCI(P4I+P3I*Cos(NN2*bj_DEGTORAD))local real P7I=RGI(P5I+P3I*Sin(NN2*bj_DEGTORAD))local timer t=CreateTimer()local integer MKI=GetHandleId(t)local trigger V23=(LoadTriggerHandle(XY,(GetHandleId(N0I)),(204)))set P3I=SquareRoot((P4I-P6I)*(P4I-P6I)+(P5I-P7I)*(P5I-P7I))call ZM3(N0I)if P3I>100 thencall QTI(N0I,1097691750)call UnitRemoveAbility(N0I,1097691750)call SetUnitPathing(N0I,false)call SetUnitAnimationByIndex(N0I,6)call DisableTrigger(V23)call IssueImmediateOrder(N0I,"stop")call EnableTrigger(V23)call SaveReal(XY,(MKI),(212),((P3I)*1.0))call SaveReal(XY,(MKI),(213),((P3I)*1.0))call SaveReal(XY,(MKI),(13),((NN2)*1.0))call SaveUnitHandle(XY,(MKI),(14),(N0I))call TimerStart(t,0.025,true,function ZQ3)call SaveBoolean(XY,(GetHandleId(N0I)),(214),(true))call SaveBoolean(XY,(GetHandleId(N0I)),(208),(false))endifendfunctionfunction V33 takes nothing returns booleanreturn OrderId2String(GetIssuedOrderId())!="windwalk"endfunctionfunction V43 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local integer MKI=GetHandleId(N0I)local boolean V53=(LoadBoolean(XY,(MKI),(214)))call SaveInteger(XY,(MKI),(211),(GetIssuedOrderId()))call SaveBoolean(XY,(MKI),(207),(false))if GetTriggerEventId()==EVENT_UNIT_ISSUED_TARGET_ORDER thenelseif GetTriggerEventId()==EVENT_UNIT_ISSUED_POINT_ORDER thenif V53 or PPI(GetUnitX(N0I),GetUnitY(N0I),GetOrderPointX(),GetOrderPointY())>800 thencall SaveStr(XY,(MKI),(206),("Point"))call SaveReal(XY,(MKI),(209),((GetOrderPointX())*1.0))call SaveReal(XY,(MKI),(210),((GetOrderPointY())*1.0))elsecall SaveBoolean(XY,(MKI),(207),(true))endifelsecall SaveStr(XY,(MKI),(206),("Instant"))endifif V53 thencall SaveBoolean(XY,(MKI),(208),(true))endifendfunctionfunction V63 takes nothing returns nothinglocal unit N0I=(LoadUnitHandle(XY,(GetHandleId(GetExpiredTimer())),(14)))local integer MKI=GetHandleId(N0I)local real x=GetUnitX(N0I)local real y=GetUnitY(N0I)local string ZS3=(LoadStr(XY,(MKI),(206)))if ZS3=="Point"and PPI(GetUnitX(N0I),GetUnitY(N0I),(LoadReal(XY,(MKI),(209))),(LoadReal(XY,(MKI),(210))))<100 thencall SaveBoolean(XY,(MKI),(207),(true))endifendfunctionfunction V73 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local trigger t=CreateTrigger()local timer t2call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_ISSUED_TARGET_ORDER)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_ISSUED_POINT_ORDER)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_ISSUED_ORDER)call TriggerAddAction(t,function V43)call TriggerAddCondition(t,Condition(function V33))call SaveTriggerHandle(XY,(GetHandleId(N0I)),(204),(t))set t2=CreateTimer()call SaveUnitHandle(XY,(GetHandleId(t2)),(14),(N0I))call TimerStart(t2,0.3,true,function V63)call SaveTimerHandle(XY,(GetHandleId(N0I)),(205),(t2))endfunctionfunction V83 takes nothing returns nothingif GetUnitAbilityLevel(GetTriggerUnit(),(1093684302))==1 thencall V73()endifendfunctionfunction LU1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function ZJ3))call TriggerAddAction(t,function VO3)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddAction(t,function V83)endfunctionconstant function ElunesArrow_RawCode takes nothing returns integerreturn 1093684280endfunctionconstant function ElunesArrow_ArrowUnit takes nothing returns integerreturn 1747988533endfunctionconstant function ElunesArrow_StunCode takes nothing returns integerreturn 1093684279endfunctionfunction V93 takes nothing returns booleanreturn GetSpellAbilityId()==(1093684280)endfunctionfunction VA3 takes nothing returns booleanreturn GetUnitAbilityLevel(GetFilterUnit(),1093751362)==0 and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(XO))and GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==falseendfunctionfunction VB3 takes real IO3,real I23,real P4I,real P5I returns integerlocal real P3I=SquareRoot((P4I-IO3)*(P4I-IO3)+(P5I-I23)*(P5I-I23))return RSI(R2I(P3I/150),11)endfunctionfunction VC3 takes nothing returns nothinglocal timer t=GetExpiredTimer()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local unit UII=(LoadUnitHandle(XY,(MKI),(45)))local real P6I=(LoadReal(XY,(MKI),(47)))local real P7I=(LoadReal(XY,(MKI),(48)))local real NN2=(LoadReal(XY,(MKI),(13)))local real P4I=GetUnitX(UII)local real P5I=GetUnitY(UII)local real U2I=RCI(GetUnitX(UII)+30*Cos(NN2))local real U3I=RGI(GetUnitY(UII)+30*Sin(NN2))local boolexpr PI1=Condition(function VA3)local group GK1=MDI()local unit QHIlocal unit TMIlocal real IO3local real I23call SetUnitX(UII,U2I)call SetUnitY(UII,U3I)set XO=N0Icall GroupEnumUnitsInRange(GK1,U2I,U3I,140,PI1)set TMI=FirstOfGroup(GK1)call MCI(GK1)if TMI!=null thenif IsUnitType(TMI,UNIT_TYPE_HERO)==true thenset C4I[GetPlayerId(GetOwningPlayer(N0I))]=C4I[GetPlayerId(GetOwningPlayer(N0I))]+1call E71("AA_Hits"+I2S(GetPlayerId(GetOwningPlayer(N0I))),C4I[GetPlayerId(GetOwningPlayer(N0I))])endifset IO3=(LoadReal(XY,(MKI),(191)))set I23=(LoadReal(XY,(MKI),(192)))set QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,P4I,P5I,0)call QTI(QHI,(1093684279))call SetUnitAbilityLevel(QHI,(1093684279),VB3(IO3,I23,P4I,P5I))if IssueTargetOrder(QHI,"thunderbolt",TMI)thenendifcall UnitDamageTarget(N0I,TMI,90*GetUnitAbilityLevel(N0I,(1093684280))-40+(VB3(IO3,I23,P4I,P5I)-1)*14,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)call KillUnit(UII)call PRI(t)elseif(U2I-P6I)*(U2I-P6I)+(U3I-P7I)*(U3I-P7I)<1600 thencall KillUnit(UII)call PRI(t)endifendfunctionfunction VD3 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local real P4I=RCI(GetUnitX(N0I))local real P5I=RGI(GetUnitY(N0I))local location UG2=GetSpellTargetLoc()local real P6I=GetLocationX(UG2)local real P7I=GetLocationY(UG2)local real NN2=Atan2(P7I-P5I,P6I-P4I)local timer t=CreateTimer()local integer MKI=GetHandleId(t)local unit UII=CreateUnit(GetOwningPlayer(N0I),(1747988533),P4I,P5I,NN2*bj_RADTODEG)set C5I[GetPlayerId(GetOwningPlayer(N0I))]=C5I[GetPlayerId(GetOwningPlayer(N0I))]+1call E71("AA_Total"+I2S(GetPlayerId(GetOwningPlayer(N0I))),C5I[GetPlayerId(GetOwningPlayer(N0I))])call RemoveLocation(UG2)call SetUnitFacing(UII,NN2*bj_RADTODEG)call SetUnitPathing(UII,false)set P6I=RCI(P4I+3000*Cos(NN2))set P7I=RGI(P5I+3000*Sin(NN2))call SaveReal(XY,(MKI),(191),((P4I)*1.0))call SaveReal(XY,(MKI),(192),((P5I)*1.0))call SaveReal(XY,(MKI),(47),((P6I)*1.0))call SaveReal(XY,(MKI),(48),((P7I)*1.0))call SaveReal(XY,(MKI),(13),((NN2)*1.0))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveUnitHandle(XY,(MKI),(45),(UII))call TimerStart(t,0.035,true,function VC3)endfunctionfunction VE3 takes nothing returns booleanlocal integer VF3=C4I[GetPlayerId(GetTriggerPlayer())]local integer P1I=C5I[GetPlayerId(GetTriggerPlayer())]if GetUnitTypeId(K1[GetPlayerId(GetTriggerPlayer())])==1311781206 and P1I>0 thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10.00,GetObjectName(1848657741)+" "+R2S(I2R(VF3)/I2R(P1I)*100)+"% ("+I2S(VF3)+"/"+I2S(P1I)+")")endifreturn falseendfunctionfunction LQ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function V93))call TriggerAddAction(t,function VD3)call RVI((1093684279))set t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,BO[1],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[1],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-st",true)call TriggerAddCondition(t,Condition(function VE3))set t=nullendfunctionfunction VG3 takes nothing returns booleanreturn GetSpellAbilityId()==1093682766endfunctionfunction VH3 takes nothing returns booleanlocal unit VZ3=GetFilterUnit()if IsUnitInGroup(VZ3,B2)thenreturn falseendifif IsUnitEnemy(VZ3,GetOwningPlayer(XO))and GetUnitAbilityLevel(VZ3,1093678162)!=1 and GetUnitState(VZ3,UNIT_STATE_LIFE)>0 and IsUnitType(VZ3,UNIT_TYPE_STRUCTURE)==false thenreturn trueendifreturn falseendfunctionfunction VV3 takes nothing returns nothingcall UnitDamageTarget(XO,GetEnumUnit(),JO,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)endfunctionfunction VW3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit R7I=(LoadUnitHandle(XY,(MKI),(221)))local real NN2=(LoadReal(XY,(MKI),(13)))local integer OXO=(LoadInteger(XY,(MKI),(194)))local group WVO=(LoadGroupHandle(XY,(MKI),(133)))local real PO2=GetUnitX(R7I)local real P22=GetUnitY(R7I)local real PI2=(LoadReal(XY,(MKI),(23)))local real P12=(LoadReal(XY,(MKI),(24)))local real U2I=PI2+1000*0.05*Cos(NN2)local real U3I=P12+1000*0.05*Sin(NN2)local group GK1local unit FA3=(LoadUnitHandle(XY,(MKI),(239)))if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT thenif GetSpellAbilityId()==1093683011 or GetSpellAbilityId()==0 thencall RemoveUnit(FA3)call SetUnitVertexColor(R7I,255,255,255,255)call SaveBoolean(XY,(GetHandleId(R7I)),(225),(false))call SetUnitInvulnerable(R7I,false)call SetUnitPathing(R7I,true)call MCI(WVO)call FlushChildHashtable(XY,(MKI))call MZI(t)endifreturn falseendifset GK1=MDI()call SaveReal(XY,(MKI),(23),((U2I)*1.0))call SaveReal(XY,(MKI),(24),((U3I)*1.0))set XO=R7Iset JO=GetUnitAbilityLevel(R7I,1093682766)*75+25set B2=WVOcall GroupEnumUnitsInRange(GK1,PO2,P22,200+25,Condition(function VH3))call ForGroup(GK1,function VV3)call GroupAddGroup(GK1,WVO)call MCI(GK1)set OXO=OXO-1call SaveInteger(XY,(MKI),(194),(OXO))call SetUnitX(R7I,RCI(U2I))call SetUnitY(R7I,RGI(U3I))call SetUnitX(FA3,GetUnitX(R7I))call SetUnitY(FA3,GetUnitY(R7I))call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",PO2,P22))if OXO==0 thencall RemoveUnit(FA3)call SetUnitVertexColor(R7I,255,255,255,255)call SaveBoolean(XY,(GetHandleId(R7I)),(225),(false))call SetUnitInvulnerable(R7I,false)call SetUnitPathing(R7I,true)call MCI(WVO)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset R7I=nullset WVO=nullset GK1=nullset t=nullreturn falseendfunctionfunction VX3 takes nothing returns nothinglocal unit R7I=GetTriggerUnit()local real P4I=GetUnitX(R7I)local real P5I=GetUnitY(R7I)local location UG2=GetSpellTargetLoc()local real P6I=GetLocationX(UG2)local real P7I=GetLocationY(UG2)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local group WVO=MDI()local integer pid=GetPlayerId(GetOwningPlayer(R7I))local unit FA3=CreateUnit(GetOwningPlayer(R7I),1697656901,P4I,P5I,0)call RemoveLocation(UG2)if GetSpellTargetUnit()!=null thenset P6I=GetUnitX(GetSpellTargetUnit())set P7I=GetUnitY(GetSpellTargetUnit())endifcall SetUnitVertexColor(R7I,255,255,255,0)call SaveBoolean(XY,(GetHandleId(R7I)),(225),(true))call SetUnitInvulnerable(R7I,true)call SetUnitPathing(R7I,false)call SaveUnitHandle(XY,(MKI),(221),(R7I))call SaveReal(XY,(MKI),(23),((P4I)*1.0))call SaveReal(XY,(MKI),(24),((P5I)*1.0))call SaveGroupHandle(XY,(MKI),(133),(WVO))call SaveReal(XY,(MKI),(13),((Atan2(P7I-P5I,P6I-P4I))*1.0))call SaveInteger(XY,(MKI),(194),(RTI(R2I(SquareRoot((P6I-P4I)*(P6I-P4I)+(P7I-P5I)*(P7I-P5I))/50),1)))call SaveUnitHandle(XY,(MKI),(239),(FA3))call TriggerRegisterTimerEvent(t,0.04,true)call TriggerRegisterUnitEvent(t,R7I,EVENT_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function VW3))call ShowUnit(R7I,false)call ShowUnit(R7I,true)call SelectUnitAddForPlayer(R7I,GetOwningPlayer(R7I))set t=nullendfunctionfunction WJ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function VG3))call TriggerAddAction(t,function VX3)endfunctionconstant function ReplicateAbilityId takes nothing returns integerreturn 1093683000endfunctionconstant function ReplicateMorphAbilityId takes nothing returns integerreturn 1093683011endfunctionconstant function ReplicateMorphBuffId takes nothing returns integerreturn 1110455088endfunctionfunction VY3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer MFI=(LoadInteger(XY,(MKI),(34)))-1local texttag ttcall SaveInteger(XY,(MKI),(34),(MFI))if GetTriggerEventId()==EVENT_UNIT_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseset tt=CreateTextTag()call SetTextTagText(tt,I2S(MFI),0.03)call SetTextTagPosUnit(tt,TLI,0)call SetTextTagColorBJ(tt,0,29,255,15)call SetTextTagVelocity(tt,0,0.035)call SetTextTagFadepoint(tt,3)call SetTextTagLifespan(tt,0.9)call SetTextTagPermanent(tt,false)call SetTextTagVisibility(tt,false)if GetOwningPlayer(TLI)==GetLocalPlayer()thencall SetTextTagVisibility(tt,true)endifset tt=CreateTextTag()call SetTextTagText(tt,I2S(MFI),0.03)call SetTextTagPosUnit(tt,TMI,0)call SetTextTagColorBJ(tt,0,29,255,15)call SetTextTagVelocity(tt,0,0.035)call SetTextTagFadepoint(tt,3)call SetTextTagLifespan(tt,0.9)call SetTextTagPermanent(tt,false)call SetTextTagVisibility(tt,false)if GetOwningPlayer(TLI)==GetLocalPlayer()thencall SetTextTagVisibility(tt,true)endifendifset t=nullset tt=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction VJ3 takes nothing returns nothinglocal trigger t=GetTriggeringTrigger()local unit N0I=(LoadUnitHandle(XY,(GetHandleId(t)),(14)))local unit VK3=(LoadUnitHandle(XY,(GetHandleId(N0I)),(229)))call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",GetUnitX(VK3),GetUnitY(VK3)))call RemoveUnit(VK3)call UnitRemoveAbility(N0I,(1093683011))if(LoadInteger(XY,(GetHandleId(N0I)),(704)))==0 or(LoadInteger(XY,(GetHandleId(N0I)),(704)))==(1093683000)thencall SetPlayerAbilityAvailable(GetOwningPlayer(N0I),(1093683000),true)endifcall FlushChildHashtable(XY,(GetHandleId(t)))call MZI((t))set N0I=nullset VK3=nullendfunctionfunction VL3 takes nothing returns booleanif GetSpellAbilityId()==(1093683011)thenreturn trueendifreturn falseendfunctionfunction VM3 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local integer MKI=GetHandleId(N0I)local unit VK3=(LoadUnitHandle(XY,(MKI),(229)))local real x=GetUnitX(VK3)local real y=GetUnitY(VK3)call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",GetUnitX(N0I),GetUnitY(N0I)))call KillUnit(VK3)call SetUnitX(N0I,x)call SetUnitY(N0I,y)call PanCameraToTimedForPlayer(GetOwningPlayer(N0I),x,y,0)call IssueImmediateOrder(N0I,"stop")set N0I=nullset VK3=nullendfunctionfunction VN3 takes nothing returns booleanreturn GetUnitAbilityLevel(GetSummonedUnit(),(1110455088))>0 and GetUnitState(GetSummonedUnit(),UNIT_STATE_LIFE)>0endfunctionfunction VS3 takes nothing returns nothinglocal unit N0I=GetSummoningUnit()local integer MKI=GetHandleId(N0I)local unit TMI=(LoadUnitHandle(XY,(MKI),(228)))local unit VK3=GetSummonedUnit()local trigger tcall SetPlayerAbilityAvailable(GetOwningPlayer(N0I),(1093683000),false)call QTI(N0I,(1093683011))call SetUnitColor(VK3,GetPlayerColor(GetOwningPlayer(TMI)))call SaveUnitHandle(XY,(MKI),(229),(VK3))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,VK3,EVENT_UNIT_DEATH)call TriggerAddAction(t,function VJ3)call SaveUnitHandle(XY,(GetHandleId(t)),(14),(N0I))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,VK3,EVENT_UNIT_DEATH)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function VY3))call SaveUnitHandle(XY,(GetHandleId(t)),(2),(N0I))call SaveUnitHandle(XY,(GetHandleId(t)),(17),(VK3))call SaveInteger(XY,(GetHandleId(t)),(34),(GetUnitAbilityLevel(N0I,(1093683000))*15+15-1))set N0I=nullset TMI=nullset VK3=nullset t=nullendfunctionfunction VT3 takes nothing returns booleanreturn GetSpellAbilityId()==(1093683000)endfunctionfunction VR3 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()call SaveUnitHandle(XY,(GetHandleId(N0I)),(228),(TMI))set N0I=nullset TMI=nullendfunctionfunction VP3 takes nothing returns booleanif GetSpellAbilityId()==(1093683000)thenif GetOwningPlayer(GetSpellTargetUnit())==GetOwningPlayer(GetTriggerUnit())thencall R6I(GetTriggerUnit())call R1I(GetOwningPlayer(GetTriggerUnit()),GetObjectName(1848659014))endifendifreturn falseendfunctionfunction WM1 takes nothing returns nothinglocal trigger tset t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function VT3))call TriggerAddAction(t,function VR3)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SUMMON)call TriggerAddCondition(t,Condition(function VN3))call TriggerAddAction(t,function VS3)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function VL3))call TriggerAddAction(t,function VM3)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function VP3))set t=nullendfunctionfunction VQ3 takes unit N0I,integer VU3,real W03 returns nothinglocal integer WI3=GetHeroAgi(N0I,false)local integer W13=GetHeroStr(N0I,false)local real XTO=GetUnitState(N0I,UNIT_STATE_MANA)if VU3==0 thenif XTO>=W03 and WI3>2 and QPI(N0I)==false thencall SetUnitState(N0I,UNIT_STATE_MANA,XTO-W03)call SetHeroAgi(N0I,WI3-2,true)call SetHeroStr(N0I,W13+2,true)endifelseif VU3==1 thenif XTO>=W03 and W13>2 and QPI(N0I)==false thencall SetUnitState(N0I,UNIT_STATE_MANA,XTO-W03)call SetHeroAgi(N0I,WI3+2,true)call SetHeroStr(N0I,W13-2,true)endifendifendfunctionfunction WO3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local integer NGI=GetUnitAbilityLevel(N0I,1093684056)call VQ3(N0I,1,30.0/NGI)set t=nullset N0I=nullreturn falseendfunctionfunction W23 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local integer NGI=GetUnitAbilityLevel(N0I,1093684056)call VQ3(N0I,0,30.0/NGI)set t=nullset N0I=nullreturn falseendfunctionfunction W33 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=GetTriggerUnit()local trigger W43=(LoadTriggerHandle(XY,(MKI),(226)))local integer NGI=GetUnitAbilityLevel(N0I,1093684056)local integer L=(LoadInteger(XY,(MKI),(227)))local real W53=1.0/NGIif NGI==4 thenset W53=0.2endifif GetIssuedOrderId()==852549 thenif W43!=null thencall FlushChildHashtable(XY,(GetHandleId(W43)))call MZI(W43)endifset W43=CreateTrigger()call TriggerRegisterTimerEvent(W43,W53,true)call TriggerAddCondition(W43,Condition(function WO3))call SaveUnitHandle(XY,(GetHandleId(W43)),(14),(N0I))call SaveTriggerHandle(XY,(MKI),(226),(W43))call SaveInteger(XY,(MKI),(227),(GetIssuedOrderId()))call UnitAddAbility(N0I,1093808716)call UnitRemoveAbility(N0I,1093808724)elseif GetIssuedOrderId()==852546 thenif W43!=null thencall FlushChildHashtable(XY,(GetHandleId(W43)))call MZI(W43)endifset W43=CreateTrigger()call TriggerRegisterTimerEvent(W43,W53,true)call TriggerAddCondition(W43,Condition(function W23))call SaveUnitHandle(XY,(GetHandleId(W43)),(14),(N0I))call SaveTriggerHandle(XY,(MKI),(226),(W43))call SaveInteger(XY,(MKI),(227),(GetIssuedOrderId()))call UnitAddAbility(N0I,1093808724)call UnitRemoveAbility(N0I,1093808716)elseif GetIssuedOrderId()==852550 thenif W43!=null thencall FlushChildHashtable(XY,(GetHandleId(W43)))call MZI(W43)endifcall SaveTriggerHandle(XY,(MKI),(226),(null))call SaveInteger(XY,(MKI),(227),(GetIssuedOrderId()))call UnitRemoveAbility(N0I,1093808716)call UnitRemoveAbility(N0I,1093808724)elseif GetIssuedOrderId()==852547 thenif W43!=null thencall FlushChildHashtable(XY,(GetHandleId(W43)))call MZI(W43)endifcall SaveTriggerHandle(XY,(MKI),(226),(null))call SaveInteger(XY,(MKI),(227),(GetIssuedOrderId()))call UnitRemoveAbility(N0I,1093808716)call UnitRemoveAbility(N0I,1093808724)elseif GetIssuedOrderId()==852548 and L!=852546 and L!=852546 thencall VQ3(N0I,1,30*W53)elseif GetIssuedOrderId()==852545 and L!=852546 and L!=852546 thencall VQ3(N0I,0,30*W53)endifset t=nullset N0I=nullset W43=nullreturn falseendfunctionfunction W63 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local trigger tlocal integer MKIlocal integer NGI=GetUnitAbilityLevel(GetTriggerUnit(),1093684056)if NGI==1 thencall SetHeroAgi(N0I,GetHeroAgi(N0I,false)+3,true)call SetHeroStr(N0I,GetHeroStr(N0I,false)+3,true)elsecall SetHeroAgi(N0I,GetHeroAgi(N0I,false)+1,true)call SetHeroStr(N0I,GetHeroStr(N0I,false)+1,true)endifif NGI==1 thenset t=CreateTrigger()set MKI=GetHandleId(t)call QTI(N0I,1093684055)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_ISSUED_ORDER)call TriggerAddCondition(t,Condition(function W33))call SaveTriggerHandle(XY,(MKI),(226),(null))elsecall SetUnitAbilityLevel(N0I,1093684055,NGI)endifset t=nullendfunctionfunction W73 takes nothing returns booleanif GetLearnedSkill()==1093684056 and IsUnitIllusion(GetTriggerUnit())==false thencall W63()endifreturn falseendfunctionfunction WK1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function W73))set t=nullendfunctionfunction W83 takes nothing returns nothinglocal unit R7I=(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(326)))local real rlocal real glocal real blocal integer W93local integer WA3local real WB3local real WC3if GetUnitTypeId(R7I)!=1328558160 thencall DisableTrigger(GetTriggeringTrigger())elseif QPI(R7I)==false and(LoadBoolean(XY,(GetHandleId(R7I)),(225)))==false thenset W93=GetHeroAgi(R7I,true)set WA3=GetHeroStr(R7I,true)set WB3=RMaxBJ(75+2*(W93-WA3),35)set r=WB3set g=WB3set b=WB3call SetUnitVertexColorBJ(R7I,r,g,b,GetRandomReal(0.00,10.00))endifendfunctionfunction WD3 takes nothing returns booleanreturn GetUnitTypeId(GetTriggerUnit())==1328558160 and IsUnitIllusion(GetTriggerUnit())==falseendfunctionfunction WE3 takes nothing returns nothinglocal trigger tif((LoadBoolean(XY,(GetHandleId(GetTriggerUnit())),(327)))==false)thenset t=CreateTrigger()call SaveUnitHandle(XY,(GetHandleId(t)),(326),(GetTriggerUnit()))call SaveTriggerHandle(XY,(GetHandleId(GetTriggerUnit())),(328),(t))call TriggerAddAction(t,function W83)call TriggerRegisterTimerEvent(t,1.0,true)call SaveBoolean(XY,(GetHandleId(GetTriggerUnit())),(327),(true))call UnitAddItem(GetTriggerUnit(),CreateItem(1227894853,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit())))endifendfunctionfunction WY1 takes nothing returns nothinglocal trigger t=CreateTrigger()call TriggerRegisterEnterRectSimple(t,bj_mapInitialPlayableArea)call TriggerAddCondition(t,Condition(function WD3))call TriggerAddAction(t,function WE3)endfunctionfunction WF3 takes nothing returns booleanreturn GetSpellAbilityId()==1093682998 and GetUnitTypeId(GetSpellTargetUnit())!=1848651852 and MBI(GetSpellTargetUnit())==falseendfunctionfunction WG3 takes nothing returns nothinglocal unit R7I=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(R7I,1093682998)local unit QHIlocal location WH3local real NN2local integer W93=GetHeroAgi(R7I,true)local integer WA3=GetHeroStr(R7I,true)local real WB3=I2R(W93)/I2R(WA3)local real WC3=I2R(WA3)/I2R(W93)local real WZ3local real WV3local real WW3local real C63local real WX3local real WY3local integer i1local integer i2local integer i3local string s1local string s2local string s3if WB3<0.5 thenset WZ3=0.25set WV3=20*NGIelseif WB3>1.5 thenset WZ3=0.5*NGIset WV3=20*NGIelseset WZ3=0.25+(WB3-0.5)*(0.5*NGI-0.25)set WV3=20*NGIendifif WC3<0.5 thenset WW3=0.25set C63=100elseif WC3>1.5 thenset WW3=0.75*NGIset C63=300elseset C63=100+(WC3-0.5)*200set WW3=0.25+(WC3-0.5)*(0.75*NGI-0.25)endifset WX3=WV3+WZ3*W93set WY3=WW3set i1=R2I(WY3)set i2=R2I(10*WY3-i1*10)set i3=R2I(100*WY3-i2*10-i1*100)set s1=I2S(i1)set s2=I2S(i2)set s3=I2S(i3)set NN2=Atan2(GetUnitY(TMI)-GetUnitY(R7I),GetUnitX(TMI)-GetUnitX(R7I))set WH3=Location(GetUnitX(TMI)+C63*Cos(NN2),GetUnitY(TMI)+C63*Sin(NN2))call SetUnitPositionLoc(TMI,WH3)call QEI(GetLocationX(WH3),GetLocationY(WH3),200)call RemoveLocation(WH3)call Q5I("|c001ce6b9+"+I2S(R2I(WX3))+"|r |c00ff0303+"+s1+"."+s2+s3+"|r",1,TMI,0.023,255,255,255,216)call TKI(R7I,TMI,1,WX3)call BQ1(R7I,TMI,WY3)set R7I=nullset TMI=nullset QHI=nullset WH3=nullendfunctionfunction WL1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function WF3))call TriggerAddAction(t,function WG3)call RVI(1093687350)endfunctionfunction WJ3 takes nothing returns nothingif IsUnitInGroup(GetEnumUnit(),C9I)==false thencall GroupAddUnit(CAI,GetEnumUnit())call UnitRemoveAbility(GetEnumUnit(),1110454858)call UnitRemoveAbility(GetEnumUnit(),1112896368)call UnitRemoveAbility(GetEnumUnit(),1114993524)endifendfunctionfunction WK3 takes nothing returns nothingcall UnitRemoveAbility(GetEnumUnit(),1110454858)call UnitRemoveAbility(GetEnumUnit(),1112896368)call UnitRemoveAbility(GetEnumUnit(),1114993524)endfunctionfunction WL3 takes nothing returns nothingif IsUnitInGroup(GetEnumUnit(),C8I)==false thencall GroupAddUnit(C8I,GetEnumUnit())call SetUnitOwner(C7I,GetOwningPlayer(GetEnumUnit()),false)call IssueTargetOrder(C7I,"sleep",GetEnumUnit())endifendfunctionfunction WM3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local group glocal group SP2=(LoadGroupHandle(XY,(MKI),(187)))if GetTriggerEvalCount(t)==10 thencall QTI(TLI,1093809221)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093678933,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093809221,true)endifif GetTriggerEventId()==EVENT_WIDGET_DEATH or GetTriggerEvalCount(t)>140 or(GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()==1093809221)thenif(LoadInteger(XY,(GetHandleId(TLI)),(704)))==0 or(LoadInteger(XY,(GetHandleId(TLI)),(704)))==1093678933 thencall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093678933,true)endifcall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093809221,false)call ForGroup(SP2,function WK3)call MCI(SP2)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)elseset g=MDI()set CK=TLIset C6I=TLIset C7I=QHIset C8I=SP2call GroupEnumUnitsInRange(g,x,y,1250+25,Condition(function AY1))call ForGroup(g,function WL3)set C9I=gset CAI=MDI()call ForGroup(SP2,function WJ3)call GroupRemoveGroup(CAI,SP2)call MCI(g)call MCI(CAI)endifset t=nullset g=nullset TLI=nullset SP2=nullset QHI=nullreturn falseendfunctionfunction WN3 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,x,y,0)call UnitAddAbility(QHI,1093678932)call TriggerRegisterTimerEvent(t,0.05,true)call TriggerRegisterDeathEvent(t,TLI)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function WM3))call SaveGroupHandle(XY,(MKI),(187),(MDI()))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("war3mapImported\\SongOfTheSiren_2.mdx",TLI,"origin")))set t=nullset TLI=nullendfunctionfunction WS3 takes nothing returns booleanif GetSpellAbilityId()==1093678933 thencall WN3()endifreturn falseendfunctionfunction WN1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function WS3))set t=nullendfunctionfunction WT3 takes unit TLI,unit TMI returns nothinglocal integer NGI=GetUnitAbilityLevel(TLI,1093815125)local integer id=1093809204call TKI(TLI,TMI,1,100+30*NGI)if NGI==2 thenset id=1093809205elseif NGI==3 thenset id=1093809206elseif NGI==4 thenset id=1093809207endifif A61(TMI)==false thencall O11(TMI,id,1,8)endifcall SetPlayerAbilityAvailable(GetOwningPlayer(TMI),id,false)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\CrushingWave\\CrushingWaveDamage.mdl",TMI,"chest"))set TLI=nullset TMI=nullendfunctionfunction WR3 takes nothing returns nothingif IsUnitInGroup(GetEnumUnit(),CCI)==false and T6I(GetEnumUnit())==false thencall GroupAddUnit(CCI,GetEnumUnit())call WT3(CBI,GetEnumUnit())endifendfunctionfunction WP3 takes nothing returns nothinglocal unit TLI=GetEnumUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)local group g=MDI()call DestroyEffect(AddSpecialEffect("war3mapImported\\RipTide09.mdx",x,y))set CK=TLIcall GroupEnumUnitsInRange(g,x,y,320+25,Condition(function AT1))call ForGroup(g,function WR3)call MCI(g)set t=nullset g=nullendfunctionfunction WQ3 takes nothing returns booleanreturn IsUnitIllusion(GetFilterUnit())and QPI(GetFilterUnit())==falseendfunctionfunction WU3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)local group g=MDI()local integer i=0set CCI=MDI()set CBI=TLIcall GroupEnumUnitsOfPlayer(g,GetOwningPlayer(TLI),Condition(function WQ3))call GroupAddUnit(g,TLI)call ForGroup(g,function WP3)call MCI(g)call MCI(CCI)set TLI=nullset g=nullendfunctionfunction X03 takes nothing returns booleanif GetSpellAbilityId()==1093815125 thencall WU3()endifreturn falseendfunctionfunction WS1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function X03))set t=nullendfunctionfunction XI3 takes unit TLI,unit TMI,integer NGI returns nothinglocal unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TLI),GetUnitY(TLI),0)call UnitAddAbility(QHI,1093681729)call SetUnitAbilityLevel(QHI,1093681729,NGI)call IssueTargetOrder(QHI,"ensnare",TMI)set QHI=nullendfunctionfunction X13 takes nothing returns booleanif IsUnitIllusion(GetFilterUnit())==true and GetUnitTypeId(GetFilterUnit())==1212363833 and GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(GetTriggerUnit())thencall XI3(GetFilterUnit(),CEI,GetUnitAbilityLevel(GetTriggerUnit(),1093809220))endifreturn falseendfunctionfunction XO3 takes nothing returns booleanif IsUnitIllusion(GetFilterUnit())==true and GetUnitTypeId(GetFilterUnit())==1212363833 and GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(GetTriggerUnit())thencall SetUnitFacing(GetFilterUnit(),QJ)call SetUnitAnimation(GetFilterUnit(),"spell")endifreturn falseendfunctionfunction X23 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local group g=MDI()set QJ=PUI(GetUnitX(N0I),GetUnitY(N0I),GetUnitX(CEI),GetUnitY(CEI))call GroupEnumUnitsInRange(g,GetUnitX(N0I),GetUnitY(N0I),700,Condition(function XO3))call MCI(g)set N0I=nullset g=nullendfunctionfunction X33 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local unit TMI=CEIlocal group g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(N0I),GetUnitY(N0I),700,Condition(function X13))call MCI(g)set N0I=nullset g=nullendfunctionfunction X43 takes nothing returns booleanif GetSpellAbilityId()==1093809220 thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT thenif MBI(GetSpellTargetUnit())==false thenset CDI=0set CEI=GetSpellTargetUnit()call XI3(GetTriggerUnit(),CEI,GetUnitAbilityLevel(GetTriggerUnit(),1093809220))call X33()endifelsecall X23()endifendifreturn falseendfunctionfunction WT1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function X43))set t=nullendfunctionfunction X53 takes unit N3I returns integerlocal real r=GetRandomReal(0,100)local integer NGI=GetUnitAbilityLevel(N3I,1093679160)local boolean OF3=DB1(N3I,FK0[JA0])!=nulllocal integer X63=0local integer id=GetPlayerId(GetOwningPlayer(N3I))set OF3=falseif NGI==1 thenset CVI[id]=CVI[id]+1if OF3 thenif r<30 thenset CGI[id]=CGI[id]+1set X63=3elseif r<60 thenset CFI[id]=CFI[id]+1set X63=2endifelseif r<25 thenset X63=2set CFI[id]=CFI[id]+1endifendifelseif NGI==2 thenset CVI[id]=CVI[id]+1if OF3 thenif r<17.5 thenset X63=4set CHI[id]=CHI[id]+1elseif r<35 thenset X63=3set CGI[id]=CGI[id]+1elseif r<70 thenset X63=2set CFI[id]=CFI[id]+1endifelseif r<20 thenset X63=3set CGI[id]=CGI[id]+1elseif r<40 thenset X63=2set CFI[id]=CFI[id]+1endifendifelseif NGI==3 thenset CVI[id]=CVI[id]+1if OF3 thenif r<10 thenset X63=5set CZI[id]=CZI[id]+1elseif r<20 thenset X63=4set CHI[id]=CHI[id]+1elseif r<40 thenset X63=3set CGI[id]=CGI[id]+1elseif r<80 thenset X63=2set CFI[id]=CFI[id]+1endifelseif r<12.5 thenset X63=4set CHI[id]=CHI[id]+1elseif r<25 thenset X63=3set CGI[id]=CGI[id]+1elseif r<50 thenset X63=2set CFI[id]=CFI[id]+1endifendifendifreturn X63endfunctionfunction X73 takes nothing returns booleanreturn(T6I(GetFilterUnit())==false and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(CK))and IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))and GetUnitAbilityLevel(GetFilterUnit(),1110455114)==0 and GetFilterUnit()!=CWIendfunctionfunction X83 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer X93=(LoadInteger(XY,(MKI),(300)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local integer XA3=(LoadInteger(XY,(MKI),(299)))local unit QHIlocal group g=MDI()set CK=TLIset CWI=TMIcall GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),1425,Condition(function X73))set TMI=GroupPickRandomUnit(g)if TMI==null thencall GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),1425,Condition(function B01))set TMI=GroupPickRandomUnit(g)endifcall MCI(g)call SaveUnitHandle(XY,(MKI),(17),(TMI))if GetTriggerEvalCount(t)>X93 thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseset QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TLI),GetUnitY(TLI),0)if XA3==1093815121 thenset XA3=1093815122endifcall QTI(QHI,XA3)call SetUnitAbilityLevel(QHI,XA3,NGI)call IssueTargetOrder(QHI,"acidbomb",TMI)endifset t=nullset TMI=nullset TLI=nullset QHI=nullset g=nullreturn falseendfunctionfunction XB3 takes integer r returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer XA3=GetSpellAbilityId()local integer NGI=GetUnitAbilityLevel(TLI,XA3)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)if r==2 thencall Q5I(GetObjectName(1848658743),5,GetTriggerUnit(),0.03,255,0,0,255)elseif r==3 thencall Q5I(GetObjectName(1848658516),5,GetTriggerUnit(),0.03,255,0,0,255)elseif r==4 thencall Q5I(GetObjectName(1848658744),5,GetTriggerUnit(),0.03,255,0,0,255)elseif r==5 thencall Q5I(GetObjectName(1848658511),5,GetTriggerUnit(),0.03,255,0,0,255)endifset r=r-1call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(300),(r))call SaveInteger(XY,(MKI),(5),(NGI))call SaveInteger(XY,(MKI),(299),(XA3))call TriggerRegisterTimerEvent(t,0.3,true)call TriggerAddCondition(t,Condition(function X83))set t=nullset TMI=nullset TLI=nullendfunctionfunction XC3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call QTI(QHI,1093815122)call IssueTargetOrder(QHI,"thunderbolt",TMI)call SetUnitState(TLI,UNIT_STATE_MANA,GetUnitState(TLI,UNIT_STATE_MANA)*0.4)set TLI=nullset TMI=nullset QHI=nullendfunctionfunction D6O takes nothing returns nothinglocal unit TLI=CKcall QTI(TLI,1093815121)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093815121,true)set TLI=nullendfunctionfunction D7O takes nothing returns nothinglocal unit TLI=CKcall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093815121,false)set TLI=nullendfunctionfunction XD3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer X93=(LoadInteger(XY,(MKI),(300)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local integer XA3=(LoadInteger(XY,(MKI),(299)))local unit QHIif GetTriggerEvalCount(t)>X93 thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseset QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)if XA3==1093815121 thenset XA3=1093815122endifcall QTI(QHI,XA3)call SetUnitAbilityLevel(QHI,XA3,NGI)call IssueTargetOrder(QHI,"thunderbolt",TMI)endifset t=nullset TMI=nullset TLI=nullset QHI=nullreturn falseendfunctionfunction XE3 takes integer r returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer XA3=GetSpellAbilityId()local integer NGI=GetUnitAbilityLevel(TLI,XA3)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)if r==2 thencall Q5I(GetObjectName(1848658743),5,GetTriggerUnit(),0.03,255,0,0,255)elseif r==3 thencall Q5I(GetObjectName(1848658516),5,GetTriggerUnit(),0.03,255,0,0,255)elseif r==4 thencall Q5I(GetObjectName(1848658744),5,GetTriggerUnit(),0.03,255,0,0,255)elseif r==5 thencall Q5I(GetObjectName(1848658511),5,GetTriggerUnit(),0.03,255,0,0,255)endifset r=r-1call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(300),(r))call SaveInteger(XY,(MKI),(5),(NGI))call SaveInteger(XY,(MKI),(299),(XA3))call TriggerRegisterTimerEvent(t,0.3,true)call TriggerAddCondition(t,Condition(function XD3))set t=nullset TMI=nullset TLI=nullendfunctionfunction XF3 takes nothing returns booleanlocal integer rif GetUnitAbilityLevel(GetTriggerUnit(),1093679160)>0 and MBI(GetSpellTargetUnit())==false thenif GetSpellAbilityId()==1093678167 or GetSpellAbilityId()==1093679172 or GetSpellAbilityId()==1093679169 or GetSpellAbilityId()==1093679161 or GetSpellAbilityId()==1093815121 thenset r=X53(GetTriggerUnit())if r>1 and((LoadInteger(XY,(GetHandleId((GetSpellTargetUnit()))),((4322))))==1)==false thencall XE3(r)endifelseif GetSpellAbilityId()==1093677361 or GetSpellAbilityId()==1093677111 or GetSpellAbilityId()==1093744471 or GetSpellAbilityId()==1093677396 or GetSpellAbilityId()==1093744472 or GetSpellAbilityId()==1093677126 or GetSpellAbilityId()==1093744473 or GetSpellAbilityId()==1093744470 thenset r=X53(GetTriggerUnit())if r>1 and((LoadInteger(XY,(GetHandleId((GetSpellTargetUnit()))),((4322))))==1)==false thencall XB3(r)endifendifendifif MBI(GetSpellTargetUnit())==false and GetSpellAbilityId()==1093815121 thencall XC3()endifreturn falseendfunctionfunction XG3 takes nothing returns booleanlocal integer id=GetPlayerId(GetTriggerPlayer())local string s1local string s2local string s3local string s4local string s5local string s6if CVI[id]>0 thenset s1=GetObjectName(1848658504)+" "+I2S(CVI[id])set s2=GetObjectName(1848658509)+" "+I2S(CFI[id]+CGI[id]+CHI[id]+CZI[id])+" ("+I2S((CFI[id]+CGI[id]+CHI[id]+CZI[id])*100/CVI[id])+"%)"set s3=GetObjectName(1848658508)+" "+I2S(CFI[id])+" ("+I2S(100*CFI[id]/CVI[id])+"%)"set s4=GetObjectName(1848658507)+" "+I2S(CGI[id])+" ("+I2S(100*CGI[id]/CVI[id])+"%)"set s5=GetObjectName(1848658506)+" "+I2S(CHI[id])+" ("+I2S(100*CHI[id]/CVI[id])+"%)"call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10.00,s1)call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10.00,s2)call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10.00,s3)call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10.00,s4)call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10.00,s5)endifreturn falseendfunctionfunction WR1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function XF3))set t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,BO[1],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[1],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-st",true)call TriggerAddCondition(t,Condition(function XG3))set t=nullendfunctionfunction XH3 takes nothing returns booleanlocal unit VZ3=GetFilterUnit()local unit R7I=GetTriggerUnit()if IsUnitAlly(VZ3,GetOwningPlayer(R7I))and GetUnitState(VZ3,UNIT_STATE_LIFE)>0 and GetUnitAbilityLevel(VZ3,1113746543)==0 thenif(GetOwningPlayer(VZ3)==BO[0]or GetOwningPlayer(VZ3)==CO[0])thenif(GetUnitTypeId(VZ3)==1969711215 or GetUnitTypeId(VZ3)==1966092337 or GetUnitTypeId(VZ3)==1970169187 or GetUnitTypeId(VZ3)==1966092338)thenreturn trueendifif(GetUnitTypeId(VZ3)==1702061422 or GetUnitTypeId(VZ3)==1697656918 or GetUnitTypeId(VZ3)==1701081721 or GetUnitTypeId(VZ3)==1697656919)thenreturn trueendifreturn falseelseif IsUnitType(VZ3,UNIT_TYPE_HERO)==true thenreturn trueelseif GetOwningPlayer(VZ3)==GetOwningPlayer(R7I)thenreturn trueendifendifreturn falseendfunctionfunction XZ3 takes integer r returns nothinglocal unit R7I=GetTriggerUnit()local integer NGI=rlocal group GK1=MDI()local unit QHIlocal unit V11local integer SFI=GetSpellAbilityId()local integer SII=1if r==2 thencall Q5I(GetObjectName(1848658743),5,GetTriggerUnit(),0.03,255,0,0,255)elseif r==3 thencall Q5I(GetObjectName(1848658516),5,GetTriggerUnit(),0.03,255,0,0,255)elseif r==4 thencall Q5I(GetObjectName(1848658744),5,GetTriggerUnit(),0.03,255,0,0,255)elseif r==5 thencall Q5I(GetObjectName(1848658511),5,GetTriggerUnit(),0.03,255,0,0,255)endifset r=r-1call GroupEnumUnitsInRange(GK1,GetUnitX(R7I),GetUnitY(R7I),600,Condition(function XH3))if R7I!=GetSpellTargetUnit()thencall GroupAddUnit(GK1,R7I)endifloopexitwhen SII>NGIset SII=SII+1set QHI=CreateUnit(GetOwningPlayer(R7I),1697656899,GetUnitX(R7I),GetUnitY(R7I),270)call QTI(QHI,SFI)call SetUnitAbilityLevel(QHI,SFI,GetUnitAbilityLevel(R7I,SFI))call UnitApplyTimedLife(QHI,1112820806,1.0)set V11=GroupPickRandomUnit(GK1)call IssueTargetOrder(QHI,"bloodlust",V11)call SetUnitPathing(QHI,false)call SetUnitInvulnerable(QHI,true)call QTI(QHI,1097625443)call GroupRemoveUnit(GK1,V11)endloopcall MCI(GK1)endfunctionfunction XV3 takes nothing returns booleanlocal integer rif GetUnitAbilityLevel(GetTriggerUnit(),1093679160)>0 and(GetSpellAbilityId()==1093679155 or GetSpellAbilityId()==1093679177 or GetSpellAbilityId()==1093679175 or GetSpellAbilityId()==1093679174)thenset r=X53(GetTriggerUnit())if r>1 thencall XZ3(r)endifendifreturn falseendfunctionfunction WP1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function XV3))set t=nullendfunctionconstant function Purification_RawCode takes nothing returns integerreturn 1093679182endfunctionfunction XW3 takes nothing returns booleanreturn GetSpellAbilityId()==(1093679182)endfunctionfunction XX3 takes nothing returns booleanreturn IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),1093678162)!=1 and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))endfunctionfunction XY3 takes nothing returns nothingcall TKI(GetTriggerUnit(),GetEnumUnit(),3,JO)endfunctionfunction XJ3 takes nothing returns nothinglocal boolexpr PI1=Condition(function XX3)local group GK1=MDI()local real x=GetUnitX(GetSpellTargetUnit())local real y=GetUnitY(GetSpellTargetUnit())set JO=90*GetUnitAbilityLevel(GetTriggerUnit(),(1093679182))if GetUnitState(GetSpellTargetUnit(),UNIT_STATE_LIFE)>1 thencall SetUnitState(GetSpellTargetUnit(),UNIT_STATE_LIFE,GetUnitState(GetSpellTargetUnit(),UNIT_STATE_LIFE)+JO)endifcall GroupEnumUnitsInRange(GK1,x,y,240+25,PI1)call ForGroup(GK1,function XY3)call MCI(GK1)endfunctionfunction WQ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function XW3))call TriggerAddAction(t,function XJ3)endfunctionfunction XK3 takes nothing returns booleanlocal unit QP1=GetSummonedUnit()local unit QHIlocal unit TMIif GetUnitAbilityLevel(QP1,1110456632)>0 thenset QHI=GetSummoningUnit()set TMI=(LoadUnitHandle(XY,(GetHandleId(QHI)),(303)))call SetUnitX(QP1,GetUnitX(TMI))call SetUnitY(QP1,GetUnitY(TMI))call IssueTargetOrder(QP1,"attack",TMI)endifset QP1=nullset QHI=nullset TMI=nullreturn falseendfunctionfunction XL3 takes player p,unit TMI,integer NGI returns nothinglocal unit QHI=CreateUnit(p,1697656901,GetUnitX(TMI),GetUnitX(TMI),0)local integer QRIcall SaveUnitHandle(XY,(GetHandleId(QHI)),(303),(TMI))if NGI==1 thenset QRI=1093742664elseif NGI==2 thenset QRI=1093742663elseif NGI==3 thenset QRI=1093742665elseset QRI=1093742662endifcall QTI(QHI,QRI)call IssueTargetOrderById(QHI,852274,K1[GetPlayerId(p)])set QHI=nullendfunctionfunction XM3 takes player p,unit TMI,integer NGI,boolean XN3,boolean XS3 returns nothinglocal real TSI=50+50*NGIlocal unit QHIlocal integer QRIif XS3 thenset QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call QTI(QHI,1093742659)call SetUnitAbilityLevel(QHI,1093742659,NGI)call IssueTargetOrder(QHI,"cripple",TMI)call TKI(K1[GetPlayerId(p)],TMI,1,TSI)if XN3 thencall XL3(p,TMI,NGI)endifendifcall DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\IllidanMissile\\IllidanMissile.mdl",TMI,"origin"))set QHI=nullendfunctionfunction XT3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local player p=(LoadPlayerHandle(XY,(MKI),(54)))local integer TRI=(LoadInteger(XY,(MKI),(30)))local unit TMI=M6I(TRI)local integer NGI=(LoadInteger(XY,(MKI),(5)))local boolean C11=(LoadBoolean(XY,(MKI),(302)))local unit UII=(LoadUnitHandle(XY,(MKI),(45)))local real x=GetUnitX(UII)local real y=GetUnitY(UII)local real P6I=GetUnitX(TMI)local real P7I=GetUnitY(TMI)local real U1I=1000*0.035local real UOI=PUI(x,y,P6I,P7I)local real U2I=x+U1I*Cos(UOI*bj_DEGTORAD)local real U3I=y+U1I*Sin(UOI*bj_DEGTORAD)local boolean G2O=(LoadBoolean(XY,(MKI),(249)))call SetUnitX(UII,U2I)call SetUnitY(UII,U3I)call SetUnitFacing(UII,UOI)if((LoadInteger(XY,(GetHandleId((TMI))),((4422))))==1)==true thenset G2O=falsecall SaveBoolean(XY,(MKI),(249),(G2O))endifif QCI(P6I,P7I,U2I,U3I)<=U1I thenif G2O thencall XM3(p,TMI,NGI,true,C11)endifcall KillUnit(UII)call M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TMI=nullset UII=nullreturn falseendfunctionfunction XR3 takes unit TLI,integer NGI,unit TMI,boolean C11 returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit UII=CreateUnit(GetOwningPlayer(TLI),1747990092,GetUnitX(TLI),GetUnitY(TLI),PUI(GetUnitX(TLI),GetUnitY(TLI),GetUnitX(TMI),GetUnitY(TMI)))call SavePlayerHandle(XY,(MKI),(54),(GetOwningPlayer(TLI)))call SaveInteger(XY,(MKI),(30),(M8I(TMI)))call SaveBoolean(XY,(MKI),(302),(C11))call SaveUnitHandle(XY,(MKI),(45),(UII))call SaveInteger(XY,(MKI),(5),(NGI))call SaveBoolean(XY,(MKI),(249),(true))call TriggerRegisterTimerEvent(t,0.035,true)call TriggerAddCondition(t,Condition(function XT3))set t=nullendfunctionfunction XP3 takes nothing returns booleanif IsUnitIllusion(GetFilterUnit())==true and GetUnitTypeId(GetFilterUnit())==1332179560 and GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(GetTriggerUnit())thencall XR3(GetFilterUnit(),GetUnitAbilityLevel(GetTriggerUnit(),1093742660),GetSpellTargetUnit(),false)endifreturn falseendfunctionfunction XQ3 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(N0I,1093742660)local unit TMI=GetSpellTargetUnit()local group g=MDI()local boolean XU3=MBI(GetSpellTargetUnit())call GroupEnumUnitsInRange(g,GetUnitX(N0I),GetUnitY(N0I),700,Condition(function XP3))if XU3 thencall XR3(N0I,NGI,TMI,false)elsecall XR3(N0I,NGI,TMI,true)endifcall MCI(g)set N0I=nullset TMI=nullset g=nullendfunctionfunction Y03 takes nothing returns booleanif IsUnitIllusion(GetFilterUnit())==true and GetUnitTypeId(GetFilterUnit())==1332179560 and GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(GetTriggerUnit())thencall SetUnitFacing(GetFilterUnit(),QJ)call SetUnitAnimation(GetFilterUnit(),"spell")endifreturn falseendfunctionfunction YI3 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local group g=MDI()set QJ=PUI(GetUnitX(N0I),GetUnitY(N0I),GetUnitX(GetSpellTargetUnit()),GetUnitY(GetSpellTargetUnit()))call GroupEnumUnitsInRange(g,GetUnitX(N0I),GetUnitY(N0I),700,Condition(function Y03))call MCI(g)set N0I=nullset g=nullendfunctionfunction Y13 takes nothing returns booleanif GetSpellAbilityId()==1093742660 thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT thencall XQ3()elsecall YI3()endifendifreturn falseendfunctionfunction XI1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function Y13))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function Y13))call RVI(1093742659)call RVI(1093742664)call RVI(1093742663)call RVI(1093742665)call RVI(1093742662)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SUMMON)call TriggerAddCondition(t,Condition(function XK3))set t=nullendfunctionfunction YO3 takes nothing returns booleanif GetUnitAbilityLevel(GetFilterUnit(),1110455106)>0 thenset TJ=TJ+1endifreturn falseendfunctionfunction Y23 takes nothing returns nothinglocal unit Y33=GetAttacker()local group g=MDI()local integer S7I=GetRandomInt(1,100)local integer Y43=GetUnitAbilityLevel(Y33,1093682242)local integer Y53=GetUnitAbilityLevel(Y33,1093687627)local unit QHIlocal integer Y63=2*Y43local integer Y73=12set TJ=0call GroupEnumUnitsOfPlayer(g,GetOwningPlayer(Y33),Condition(function YO3))call MCI(g)if TJ<Y63 and GetUnitAbilityLevel(Y33,1112433775)==0 thenif IsUnitIllusion(Y33)==false and S7I<=(Y73+2*Y53)thenset QHI=CreateUnit(GetOwningPlayer(Y33),1697656901,GetUnitX(Y33),GetUnitY(Y33),0)call QTI(QHI,1093682244)call IssueTargetOrderById(QHI,852274,Y33)endifif IsUnitIllusion(Y33)==true and S7I<=(1+2*Y53)and Y53>0 thenset QHI=CreateUnit(GetOwningPlayer(Y33),1697656901,GetUnitX(Y33),GetUnitY(Y33),0)call QTI(QHI,1093682244)call IssueTargetOrderById(QHI,852274,Y33)endifendifset Y33=nullset g=nullset QHI=nullendfunctionfunction Y83 takes nothing returns booleanif(GetUnitAbilityLevel(GetAttacker(),1110455106)>0 or GetUnitAbilityLevel(GetAttacker(),1110455105)>0)and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))==true thencall Y23()endifreturn falseendfunctionfunction X01 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function Y83))set t=nullendfunctionfunction Y93 takes nothing returns nothinglocal unit u=GetTriggerUnit()local unit QHI=CreateUnit(GetOwningPlayer(u),1697656901,GetUnitX(u),GetUnitY(u),0)call QTI(QHI,1093682243)call IssueTargetOrderById(QHI,852274,u)set u=nullset QHI=nullendfunctionfunction YA3 takes nothing returns booleanif GetSpellAbilityId()==1093682231 thencall Y93()endifreturn falseendfunctionfunction X11 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function YA3))set t=nullendfunctionfunction YB3 takes nothing returns booleanif GetUnitTypeId(GetFilterUnit())==D70[21]and GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(GetTriggerUnit())and IsUnitIllusion(GetFilterUnit())==false thenset CK=GetFilterUnit()endifreturn falseendfunctionfunction YC3 takes nothing returns nothinglocal unit QP1=GetTriggerUnit()local unit TLIlocal group g=MDI()local real xlocal real yset CK=nullcall GroupEnumUnitsInRange(g,GetUnitX(QP1),GetUnitY(QP1),1000,Condition(function YB3))call MCI(g)set TLI=CKif TLI!=null thenset x=GetUnitX(TLI)set y=GetUnitY(TLI)call SetUnitPosition(QP1,x,y)endifset x=GetUnitX(QP1)+600*Cos(GetUnitFacing(QP1)*bj_DEGTORAD)set y=GetUnitY(QP1)+600*Sin(GetUnitFacing(QP1)*bj_DEGTORAD)call IssuePointOrder(QP1,"move",x,y)set QP1=nullset TLI=nullset g=nullendfunctionfunction YD3 takes nothing returns booleanif GetUnitAbilityLevel(GetTriggerUnit(),1110455105)>0 thencall YC3()endifreturn falseendfunctionfunction WU1 takes nothing returns nothinglocal trigger t=CreateTrigger()local region r=CreateRegion()call RegionAddRect(r,bj_mapInitialPlayableArea)call TriggerRegisterEnterRegion(t,r,Condition(function LWI))call TriggerAddCondition(t,Condition(function YD3))set t=nullset r=nullendfunctionfunction YE3 takes nothing returns booleanreturn GetSpellAbilityId()==1093678938endfunctionfunction YF3 takes nothing returns booleanreturn IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>0endfunctionfunction YG3 takes nothing returns nothinglocal unit R7I=GetTriggerUnit()local unit QHI=CreateUnit(GetOwningPlayer(R7I),1697657394,GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),270)call QTI(QHI,1093678676)call SetUnitAbilityLevel(QHI,1093678676,GetUnitAbilityLevel(R7I,1093678938))call IssueTargetOrder(QHI,"entanglingroots",GetEnumUnit())endfunctionfunction YH3 takes nothing returns nothinglocal unit R7I=GetTriggerUnit()local group GK1=MDI()local boolexpr PI1=Condition(function YF3)call GroupEnumUnitsInRange(GK1,GetUnitX(R7I),GetUnitY(R7I),700,PI1)call ForGroup(GK1,function YG3)call MCI(GK1)endfunctionfunction XO1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function YE3))call TriggerAddAction(t,function YH3)endfunctionfunction YZ3 takes unit TLI,integer NGI returns nothinglocal unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TLI),GetUnitY(TLI),0)call QTI(QHI,1093748546)call SetUnitAbilityLevel(QHI,1093748546,NGI)call IssueTargetOrder(QHI,"invisibility",TLI)call QTI(TLI,1093808975)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093808975,false)set QHI=nullendfunctionfunction YV3 takes nothing returns booleanreturn GetUnitTypeId(GetFilterUnit())==1747993172endfunctionfunction YW3 takes unit N0I returns booleanlocal group g=MDI()local boolean DR1=falsecall GroupEnumUnitsInRange(g,GetUnitX(N0I),GetUnitY(N0I),375,Condition(function YV3))if FirstOfGroup(g)!=null thenset DR1=trueendifcall MCI(g)set g=nullreturn DR1endfunctionfunction YX3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer TRI=(LoadInteger(XY,(MKI),(30)))local unit N0I=M6I(TRI)local integer MFI=(LoadInteger(XY,(MKI),(34)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local real FNO=(LoadReal(XY,(MKI),(442)))if GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED and(LoadBoolean(XY,(MKI),(329)))and GetAttacker()==N0I thencall UnitRemoveAbility(N0I,1110454833)call UnitRemoveAbility(N0I,1093748545)call UnitRemoveAbility(N0I,1093808975)call UnitRemoveAbility(N0I,1110459705)call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEventId()!=EVENT_PLAYER_UNIT_ATTACKED and GetTriggerEventId()!=EVENT_PLAYER_UNIT_SPELL_EFFECT thenset MFI=MFI+1call SaveInteger(XY,(MKI),(34),(MFI))elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT and GetSpellAbilityId()==1093677402 and GetTriggerUnit()==N0I thencall SaveReal(XY,(MKI),(442),(((TimerGetElapsed(M))+1.0)*1.0))call DisableTrigger(GetTriggeringTrigger())call YZ3(N0I,NGI)call EnableTrigger(GetTriggeringTrigger())call SaveInteger(XY,(MKI),(34),(0))endifif QLI(GetUnitX(N0I),GetUnitY(N0I),375)==false and YW3(N0I)==false thenif FNO<(TimerGetElapsed(M))or GetTriggerEvalCount(t)==1 thencall UnitRemoveAbility(N0I,1110454833)call UnitRemoveAbility(N0I,1093748545)call UnitRemoveAbility(N0I,1093808975)call UnitRemoveAbility(N0I,1110459705)call FlushChildHashtable(XY,(MKI))call MZI(t)endifelseif(LoadBoolean(XY,(MKI),(329)))and MFI>(150*NGI)thencall UnitRemoveAbility(N0I,1110454833)call UnitRemoveAbility(N0I,1093748545)call UnitRemoveAbility(N0I,1093808975)call UnitRemoveAbility(N0I,1110459705)call FlushChildHashtable(XY,(MKI))call MZI(t)elseif(LoadBoolean(XY,(MKI),(329)))and GetUnitAbilityLevel(N0I,1110454833)==0 and GetUnitAbilityLevel(N0I,1093748545)>0 thencall SaveReal(XY,(MKI),(442),(((TimerGetElapsed(M))+1.0)*1.0))call DisableTrigger(GetTriggeringTrigger())call YZ3(N0I,NGI)call EnableTrigger(GetTriggeringTrigger())elseif GetUnitAbilityLevel(N0I,1110454833)==0 thencall UnitRemoveAbility(N0I,1110454833)call UnitRemoveAbility(N0I,1093748545)call UnitRemoveAbility(N0I,1093808975)call UnitRemoveAbility(N0I,1110459705)call FlushChildHashtable(XY,(MKI))call MZI(t)elsecall SaveReal(XY,(MKI),(442),(((TimerGetElapsed(M))+1.0)*1.0))endifendifset t=nullset N0I=nullreturn falseendfunctionfunction YY3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if GetTriggerEventId()!=EVENT_WIDGET_DEATH thenif GetUnitAbilityLevel(TLI,1110454833)>0 thencall QTI(TLI,1093748545)endifendifcall FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullreturn falseendfunctionfunction YJ3 takes nothing returns nothinglocal trigger tlocal integer MKIset t=CreateTrigger()set MKI=GetHandleId(t)call SaveInteger(XY,(MKI),(30),(M8I(GetSpellTargetUnit())))call SaveInteger(XY,(MKI),(5),(GetUnitAbilityLevel(GetTriggerUnit(),1093677402)))call SaveInteger(XY,(MKI),(34),(0))call SaveReal(XY,(MKI),(442),(((TimerGetElapsed(M))+1.0)*1.0))call TriggerAddCondition(t,Condition(function YX3))call TriggerRegisterTimerEvent(t,0.1,true)call QTI(GetSpellTargetUnit(),1093808975)call SetPlayerAbilityAvailable(GetOwningPlayer(GetSpellTargetUnit()),1093808975,false)if GetTriggerUnit()==GetSpellTargetUnit()thencall SaveBoolean(XY,(MKI),(329),(true))call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)set t=CreateTrigger()set MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(2),(GetTriggerUnit()))call TriggerAddCondition(t,Condition(function YY3))call TriggerRegisterTimerEvent(t,2,false)call TriggerRegisterDeathEvent(t,GetTriggerUnit())endifset t=nullendfunctionfunction YK3 takes nothing returns booleanif GetSpellAbilityId()==1093677402 thencall YJ3()endifreturn falseendfunctionfunction X21 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function YK3))set t=nullendfunctionfunction YL3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))call SetUnitAnimationByIndex(TLI,6)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullreturn falseendfunctionfunction YM3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093748535)local location l=GetSpellTargetLoc()local real x=RCI(GetLocationX(l))local real y=RGI(GetLocationY(l))local destructable dlocal unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,x,y,0)local rect r1=Rect(-7840.0,2976.0,8032.0,7680.0)local rect r2=Rect(-832.0,-832.0,8192.0,3040.0)local rect r3=Rect(3232.0,-3136.0,8096.0,-480.0)local rect r4=Rect(352.0,-1760.0,3296.0,512.0)local rect r5=Rect(-2624.0,1376.0,-1120.0,2688.0)local rect r6=Rect(-5024.0,2336.0,-2496.0,3488.0)local region r=CreateRegion()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call RegionAddRect(r,r1)call RegionAddRect(r,r2)call RegionAddRect(r,r3)call RegionAddRect(r,r4)call RegionAddRect(r,r5)call RegionAddRect(r,r6)if IsPointInRegion(r,x,y)==true thenset d=CreateDestructable(1110454323,x,y,0,1,1)elseset d=CreateDestructable(1110454322,x,y,0,1,1)call KillDestructable(d)call DestructableRestoreLife(d,GetDestructableMaxLife(d),true)endifcall QTI(QHI,1093677398)call SetUnitAbilityLevel(QHI,1093677398,NGI)call IssueTargetOrder(QHI,"sentinel",d)call SetUnitAnimationByIndex(TLI,6)call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\NightElf\\EntBirthTarget\\EntBirthTarget.mdl",x,y))call RemoveRegion(r)call RemoveRect(r1)call RemoveRect(r2)call RemoveRect(r3)call RemoveRect(r4)call RemoveRect(r5)call RemoveRect(r6)call RemoveLocation(l)call TriggerRegisterTimerEvent(t,0.1,false)call TriggerAddCondition(t,Condition(function YL3))call SaveUnitHandle(XY,(MKI),(2),(TLI))set t=nullset TLI=nullset l=nullset d=nullset QHI=nullset r=nullset r1=nullset r2=nullset r3=nullset r4=nullset r5=nullset r6=nullendfunctionfunction YN3 takes nothing returns booleanif GetSpellAbilityId()==1093748535 thencall YM3()endifreturn falseendfunctionfunction Register_EyesInTheForest takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function YN3))set t=nullendfunctionfunction YS3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local real YSO=(LoadReal(XY,(GetHandleId(TMI)),(686)))if GetTriggerEventId()==EVENT_WIDGET_DEATH or YSO<(TimerGetElapsed(M))or T6I(TMI)thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)call SaveReal(XY,(GetHandleId(TMI)),(686),((0)*1.0))call UnitRemoveAbility(TMI,1093809232)call UnitRemoveAbility(TMI,1093809232)call UnitRemoveAbility(TMI,1093809232)call UnitRemoveAbility(TMI,1093809232)call UnitRemoveAbility(TMI,1110459719)elsecall TKI(TLI,TMI,1,15+15*NGI)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction YT3 takes unit TLI,unit TMI returns nothinglocal trigger tlocal integer MKIlocal real YSO=(LoadReal(XY,(GetHandleId(TMI)),(686)))local integer NGI=GetUnitAbilityLevel(TLI,1093748535)if YSO>(TimerGetElapsed(M))thencall SaveReal(XY,(GetHandleId(TMI)),(686),(((TimerGetElapsed(M))+4)*1.0))elseset t=CreateTrigger()set MKI=GetHandleId(t)call SaveReal(XY,(GetHandleId(TMI)),(686),(((TimerGetElapsed(M))+4)*1.0))call TriggerRegisterTimerEvent(t,1,true)call TriggerRegisterDeathEvent(t,TMI)call TriggerAddCondition(t,Condition(function YS3))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("Abilities\\Spells\\Other\\AcidBomb\\BottleImpact.mdl",TMI,"overhead")))if NGI==1 thencall QTI(TMI,1093809232)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093809232,false)elseif NGI==2 thencall QTI(TMI,1093809232)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093809232,false)elseif NGI==3 thencall QTI(TMI,1093809232)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093809232,false)elseif NGI==4 thencall QTI(TMI,1093809232)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093809232,false)endifendifset t=nullendfunctionfunction Sentinel_FindClosest takes nothing returns booleanif GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(CYI)and(GetUnitTypeId(GetFilterUnit())==1747993172 or GetUnitTypeId(GetFilterUnit())==1747993173)thenif PAI(GetUnitX(GetFilterUnit()),GetUnitY(GetFilterUnit()),CJI,CKI)<CLI thenset CXI=GetFilterUnit()set CLI=PAI(GetUnitX(GetFilterUnit()),GetUnitY(GetFilterUnit()),CJI,CKI)endifendifreturn falseendfunctionfunction YR3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMIlocal group glocal real F21=(LoadReal(XY,(MKI),(442)))local real xlocal real ylocal integer SVIlocal real hplocal integer MFI=(LoadInteger(XY,(MKI),(34)))if GetTriggerEventId()!=EVENT_PLAYER_UNIT_DEATH thenset MFI=MFI+1call SaveInteger(XY,(MKI),(34),(MFI))endifif GetTriggerEventId()==EVENT_PLAYER_UNIT_DEATH thenif GetTriggerUnit()==QHI thencall UnitRemoveAbility(QHI,1097886070)call FlushChildHashtable(XY,(MKI))call MZI(t)endifelseif GetUnitTypeId(QHI)==1747993172 thenset CK=QHIset g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(QHI),GetUnitY(QHI),110,Condition(function AT1))set TMI=OG1(g,GetUnitX(QHI),GetUnitY(QHI))call MCI(g)if TMI!=null thencall YT3(TLI,TMI)set x=GetUnitX(QHI)set y=GetUnitY(QHI)set hp=GetUnitState(QHI,UNIT_STATE_LIFE)call ShowUnit(QHI,false)call DisableTrigger(t)call KillUnit(QHI)call EnableTrigger(t)set QHI=CreateUnit(GetOwningPlayer(TLI),1747993173,x,y,0)call SetUnitState(QHI,UNIT_STATE_LIFE,hp)call UnitApplyTimedLife(QHI,1112820806,480-((TimerGetElapsed(M))-F21))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveReal(XY,(MKI),(411),(((TimerGetElapsed(M))+4)*1.0))endifelseif GetUnitTypeId(QHI)==1747993173 and(LoadReal(XY,(MKI),(411)))<(TimerGetElapsed(M))thenset x=GetUnitX(QHI)set y=GetUnitY(QHI)set hp=GetUnitState(QHI,UNIT_STATE_LIFE)call ShowUnit(QHI,false)call DisableTrigger(t)call KillUnit(QHI)call EnableTrigger(t)set QHI=CreateUnit(GetOwningPlayer(TLI),1747993172,x,y,0)call SetUnitState(QHI,UNIT_STATE_LIFE,hp)call UnitApplyTimedLife(QHI,1112820806,480-((TimerGetElapsed(M))-F21))call SaveUnitHandle(XY,(MKI),(19),(QHI))endifset t=nullset TLI=nullset TMI=nullset QHI=nullset g=nullreturn falseendfunctionfunction YP3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093748535)local real x=GetSpellTargetX()local real y=GetSpellTargetY()local unit QHI=CreateUnit(GetOwningPlayer(TLI),1747993172,x,y,0)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call UnitApplyTimedLife(QHI,1112820806,480)call Q9I(t,EVENT_PLAYER_UNIT_DEATH)call TriggerRegisterTimerEvent(t,0.1,true)call TriggerAddCondition(t,Condition(function YR3))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(442),(((TimerGetElapsed(M)))*1.0))call SaveInteger(XY,(MKI),(34),(0))set t=nullset TLI=nullset QHI=nullendfunctionfunction YQ3 takes nothing returns booleanif GetSpellAbilityId()==1093748535 thencall YP3()endifreturn falseendfunctionfunction X41 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function YQ3))set t=nullendfunctionfunction YU3 takes nothing returns nothinglocal unit TMI=GetEnumUnit()local real d=PAI(GetUnitX(TMI),GetUnitY(TMI),CSI,CTI)if d<CNI and IsUnitVisible(TMI,GetOwningPlayer(CRI))==true and(IsUnitType(TMI,UNIT_TYPE_HERO)==true or(IsUnitType(TMI,UNIT_TYPE_STRUCTURE)==true and AF1(TMI)))thenset CMI=GetEnumUnit()set CNI=dendifset TMI=nullendfunctionfunction J03 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer MFI=(LoadInteger(XY,(MKI),(34)))local integer NGI=GetUnitAbilityLevel(TLI,1093815628)if GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamage()>5 thenset MFI=MFI+1call SaveInteger(XY,(MKI),(34),(MFI))call PII(TMI,RMinBJ(GetEventDamage(),20*GetUnitAbilityLevel(TLI,1093815628)))endifendifif GetTriggerEventId()!=EVENT_UNIT_DAMAGED or MFI>(NGI+3-1)thencall FlushChildHashtable(XY,(MKI))call MZI(t)call UnitRemoveAbility(TMI,1093815640)call UnitRemoveAbility(TMI,1093815641)call UnitRemoveAbility(TMI,1093815639)call UnitRemoveAbility(TMI,1093815638)call UnitRemoveAbility(TMI,1110460213)endifset t=nullset TMI=nullreturn falseendfunctionfunction JI3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer UWI=1093815640local integer NGI=GetUnitAbilityLevel(TLI,1093815628)local group gif TMI==null thenset CMI=nullset CRI=TLIset CNI=999999set CSI=GetSpellTargetX()set CTI=GetSpellTargetY()set CK=TLIset g=MDI()call GroupEnumUnitsInRange(g,0,0,9999,Condition(function B31))call ForGroup(g,function YU3)call MCI(g)set TMI=CMIset g=nullendifif NGI==2 thenset UWI=1093815641elseif NGI==3 thenset UWI=1093815639elseif NGI==4 thenset UWI=1093815638endifcall QTI(TMI,UWI)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),UWI,false)call TriggerRegisterTimerEvent(t,15,false)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function J03))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(34),(0))set t=nullset TLI=nullendfunctionfunction J13 takes nothing returns booleanif GetSpellAbilityId()==1093815628 thencall JI3()endifreturn falseendfunctionfunction X31 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function J13))set t=nullendfunctionfunction JO3 takes nothing returns nothinglocal integer MKI=GetHandleId(GetTriggeringTrigger())local unit TLI=CKlocal unit TMI=DKlocal real J23=(LoadReal(XY,(MKI),(21)))call SetUnitState(TMI,UNIT_STATE_LIFE,GetUnitState(TMI,UNIT_STATE_LIFE)+J23)set TLI=nullset TMI=nullendfunctionfunction J33 takes nothing returns nothinglocal trigger t=U6I(CPI,GetEnumUnit(),1747993656,"JO3",400,false)local integer MKI=GetHandleId(t)call SaveReal(XY,(MKI),(21),((CQI)*1.0))set t=nullendfunctionfunction J43 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local group glocal integer MFI=(LoadInteger(XY,(MKI),(34)))if GetTriggerEventId()==EVENT_WIDGET_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)call UnitRemoveAbility(TMI,1093809971)call UnitRemoveAbility(TMI,1110459724)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))elseset MFI=MFI+1call SaveInteger(XY,(MKI),(34),(MFI))if MFI>5 thencall FlushChildHashtable(XY,(MKI))call MZI(t)call UnitRemoveAbility(TMI,1093809971)call UnitRemoveAbility(TMI,1110459724)endifcall DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\NightElf\\EntBirthTarget\\EntBirthTarget.mdl",TMI,"origin"))set CK=TLIset g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(TMI),GetUnitY(TMI),525,Condition(function BC1))set CPI=TMIset CQI=15*NGIcall ForGroup(g,function J33)call MCI(g)call TKI(TLI,TMI,1,CQI)endifset t=nullset TLI=nullset TMI=nullset g=nullreturn falseendfunctionfunction J53 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093809742)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call QTI(TMI,1093809971)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093809971,false)call TriggerRegisterTimerEvent(t,1,true)call TriggerRegisterTimerEvent(t,0,false)call TriggerRegisterTimerEvent(t,4.5,false)call TriggerAddCondition(t,Condition(function J43))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(442),(((TimerGetElapsed(M)))*1.0))call SaveInteger(XY,(MKI),(5),(NGI))call SaveInteger(XY,(MKI),(34),(0))set t=nullset TLI=nullendfunctionfunction LeechSeed takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()call U6I(TLI,TMI,1747993657,"J53",600,false)set TLI=nullset TMI=nullendfunctionfunction J63 takes nothing returns booleanif GetSpellAbilityId()==1093809742 and MBI(GetSpellTargetUnit())==false thencall J53()endifreturn falseendfunctionfunction X51 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function J63))set t=nullendfunctionfunction J73 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=GetUnitAbilityLevel(TLI,1093815892)call FlushChildHashtable(XY,(MKI))call MZI(t)call TKI(TLI,TMI,1,100+50*NGI)set t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction J83 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)local integer NGI=GetUnitAbilityLevel(TLI,1093815892)local boolean J93=(LoadBoolean(XY,(MKI),(95)))call FlushChildHashtable(XY,(MKI))call MZI(t)call QTI(QHI,1093684307)call SetUnitAbilityLevel(QHI,1093684307,NGI)call IssueTargetOrder(QHI,"soulburn",TMI)set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerAddCondition(t,Condition(function J73))call TriggerRegisterTimerEvent(t,0.01,false)call SaveUnitHandle(XY,(GetHandleId(t)),(2),(TLI))call SaveUnitHandle(XY,(GetHandleId(t)),(17),(TMI))call SaveInteger(XY,(GetHandleId(t)),(5),(NGI))if J93 thencall DestroyEffect(AddSpecialEffectTarget("war3mapImported\\LastWordDamageSpell.mdx",TMI,"overhead"))endifset t=nullset TLI=nullset TMI=nullset QHI=nullreturn falseendfunctionfunction JA3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit QHIlocal integer NGI=GetUnitAbilityLevel(TLI,1093815892)if GetTriggerEventId()==EVENT_WIDGET_DEATH thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call UnitRemoveAbility(TMI,1093815893)call UnitRemoveAbility(TMI,1110455638)call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEventId()!=EVENT_UNIT_SPELL_EFFECT thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call UnitRemoveAbility(TMI,1093815893)call UnitRemoveAbility(TMI,1110455638)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerAddCondition(t,Condition(function J83))call TriggerRegisterTimerEvent(t,0.01,false)call SaveUnitHandle(XY,(GetHandleId(t)),(2),(TLI))call SaveUnitHandle(XY,(GetHandleId(t)),(17),(TMI))call SaveInteger(XY,(GetHandleId(t)),(5),(NGI))call SaveBoolean(XY,(MKI),(95),(false))set QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call QTI(QHI,1093815895)call SetUnitAbilityLevel(QHI,1093815895,NGI)call IssueTargetOrder(QHI,"drunkenhaze",TMI)call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\LastWordDamageDuration.mdx",TMI,"overhead"))set QHI=nullelseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and HL1(GetSpellAbilityId())==false and HN1(GetSpellAbilityId())==false and GetSpellAbilityId()!=1095328363 and GetSpellAbilityId()!=1093678426 and GetSpellAbilityId()!=1093682768 and GetSpellAbilityId()!=1093685593 and GetSpellAbilityId()!=1093678680 and GetSpellAbilityId()!=1093681489 and GetSpellAbilityId()!=1093808472 and GetSpellAbilityId()!=1093808471 and GetSpellAbilityId()!=1093808470 and GetSpellAbilityId()!=1093743191 and GetSpellAbilityId()!=1093678667 and GetSpellAbilityId()!=1097163124 and GetSpellAbilityId()!=1093683801 and GetSpellAbilityId()!=1093682767 and GetSpellAbilityId()!=1093750345 and GetSpellAbilityId()!=1093750089 and GetSpellAbilityId()!=1093816645 and GetSpellAbilityId()!=1093751096 and GetSpellAbilityId()!=1093751361 and GetSpellAbilityId()!=1093751126 and GetSpellAbilityId()!=1093808473 and GetSpellAbilityId()!=1093748565 and GetSpellAbilityId()!=1093753177 and AO1(GetSpellAbilityId())==false thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call UnitRemoveAbility(TMI,1093815893)call UnitRemoveAbility(TMI,1110455638)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=CreateTrigger()set MKI=GetHandleId(t)if GetSpellAbilityId()==1093685846 or GetSpellAbilityId()==1093684302 thencall TriggerRegisterTimerEvent(t,0.01,false)elsecall TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_SPELL_ENDCAST)endifcall TriggerAddCondition(t,Condition(function J83))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveBoolean(XY,(MKI),(95),(true))endifset TMI=nullset TLI=nullset t=nullreturn falseendfunctionfunction JB3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))if GetUnitAbilityLevel(TMI,1093815893)==0 or GetTriggerEvalCount(t)>250 thencall FlushChildHashtable(XY,(MKI))call MZI(t)call KillUnit(QHI)elsecall SetUnitX(QHI,GetUnitX(TMI))call SetUnitY(QHI,GetUnitY(TMI))endifset t=nullset QHI=nullset TMI=nullreturn falseendfunctionfunction JC3 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local unit QHI=CreateUnit(GetOwningPlayer(TLI),1865429305,GetUnitX(TMI),GetUnitY(TMI),0)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_SPELL_EFFECT)call TriggerRegisterTimerEvent(t,5,false)call TriggerRegisterDeathEvent(t,TMI)call TriggerAddCondition(t,Condition(function JA3))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call QTI(TMI,1093815893)call UnitMakeAbilityPermanent(TMI,true,1093815894)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093815893,false)call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("war3mapImported\\LastWordDebuff_6.mdx",TMI,"overhead")))set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.02,true)call TriggerAddCondition(t,Condition(function JB3))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveUnitHandle(XY,(MKI),(17),(TMI))set TLI=nullset TMI=nullset t=nullendfunctionfunction JD3 takes nothing returns booleanif GetSpellAbilityId()==1093815892 and MBI(GetSpellTargetUnit())==false thencall JC3()endifreturn falseendfunctionfunction LastWord_Process takes nothing returns nothinglocal integer MKI=GetHandleId(GetTriggeringTrigger())local unit TLI=DKlocal real TSI=(LoadReal(XY,(MKI),(20)))call SetHeroInt(TLI,GetHeroInt(TLI,false)+1,true)call Q5I("+1 "+GetObjectName(1848658512),3,TLI,0.023,0,255,0,230)set TLI=nullendfunctionfunction JE3 takes nothing returns nothinglocal integer MKI=GetHandleId(GetTriggeringTrigger())local unit TLI=DKlocal real TSI=(LoadReal(XY,(MKI),(20)))call SetHeroInt(TLI,GetHeroInt(TLI,false)+2,true)call Q5I("+2 "+GetObjectName(1848658512),3,TLI,0.023,0,255,0,230)set TLI=nullendfunctionfunction JF3 takes unit TLI,unit QK1 returns nothingif IsUnitType(QK1,UNIT_TYPE_HERO)==true and HK1(GetUnitTypeId(QK1))==false and IsUnitIllusion(QK1)==false and(IsUnitInRange(TLI,QK1,900)or GetOwningPlayer(TLI)==GetOwningPlayer(GetKillingUnit()))and QPI(TLI)==false and IsUnitAlly(TLI,GetOwningPlayer(QK1))==false thenif GetUnitTypeId(TLI)==1311781185 thenset CUI[GetPlayerId(GetOwningPlayer(TLI))]=CUI[GetPlayerId(GetOwningPlayer(TLI))]+2call Q5I("-2 "+GetObjectName(1848658512),3,QK1,0.023,255,0,0,230)call SetHeroInt(QK1,GetHeroInt(QK1,false)-2,true)call U6I(QK1,TLI,1747993424,"JE3",450,false)endifendifendfunctionfunction JG3 takes nothing returns nothingcall JF3(GetEnumUnit(),GetTriggerUnit())endfunctionfunction JH3 takes nothing returns booleanlocal group g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),1000,Condition(function BK1))call GroupAddUnit(g,K1[GetPlayerId(GetOwningPlayer(GetKillingUnit()))])call ForGroup(g,function JG3)call MCI(g)set g=nullreturn falseendfunctionfunction JZ3 takes nothing returns booleanlocal integer P1I=CUI[GetPlayerId(GetTriggerPlayer())]if GetUnitTypeId(K1[GetPlayerId(GetTriggerPlayer())])==1311781185 and P1I>0 thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10.00,GetObjectName(1848657997)+" "+I2S(P1I))endifreturn falseendfunctionfunction X81 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function JD3))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_DEATH)call TriggerAddCondition(t,Condition(function JH3))set t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,BO[1],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[1],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-st",true)call TriggerAddCondition(t,Condition(function JZ3))set t=nullendfunctionfunction JV3 takes nothing returns booleanlocal real dif GetUnitAbilityLevel(GetTriggerUnit(),1110455640)>0 and GetUnitAbilityLevel(GetEventDamageSource(),1093684314)>0 and(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(2)))==GetEventDamageSource()thencall UnitRemoveAbility(GetTriggerUnit(),1110455640)set d=(0.15+0.15*I2R(GetUnitAbilityLevel(GetEventDamageSource(),1093684314)))*GetHeroInt(GetEventDamageSource(),true)call Q5I("+"+I2S(R2I(d)),1,GetTriggerUnit(),0.023,3,216,216,216)call DisableTrigger(GetTriggeringTrigger())call TKI(GetEventDamageSource(),GetTriggerUnit(),3,d)call FlushChildHashtable(XY,(GetHandleId(GetTriggeringTrigger())))call MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction JW3 takes nothing returns nothinglocal trigger tlocal unit TMIlocal unit TLIif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT thenset TMI=GetSpellTargetUnit()set TLI=GetTriggerUnit()elseset TMI=GetTriggerUnit()set TLI=GetAttacker()endifif IsUnitIllusion(TLI)==false thenset t=CreateTrigger()call SaveUnitHandle(XY,(GetHandleId(t)),(2),(TLI))call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function JV3))endifset t=nullset TMI=nullset TLI=nullendfunctionfunction JX3 takes nothing returns booleanif GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED thenif GetUnitAbilityLevel(GetAttacker(),1093684314)>0 and(LoadBoolean(XY,(GetHandleId(GetTriggeringTrigger())),(263)))and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(14)))thencall JW3()endifelseif GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER thenif(GetIssuedOrderId()==OrderId("poisonarrows"))thencall SaveBoolean(XY,(GetHandleId(GetTriggeringTrigger())),(263),(true))elseif(GetIssuedOrderId()==OrderId("unpoisonarrows"))thencall SaveBoolean(XY,(GetHandleId(GetTriggeringTrigger())),(263),(false))endifelseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()==1093684314 thencall JW3()endifreturn falseendfunctionfunction JY3 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_SPELL_EFFECT)call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_ISSUED_ORDER)call TriggerAddCondition(t,Condition(function JX3))call SaveUnitHandle(XY,(GetHandleId(t)),(14),(GetTriggerUnit()))set t=nullendfunctionfunction JJ3 takes nothing returns booleanif GetLearnedSkill()==1093684314 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093684314)==1 thencall JY3()endifreturn falseendfunctionfunction X71 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function JJ3))set t=nullendfunctionfunction JK3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local integer MFI=(LoadInteger(XY,(MKI),(34)))if GetTriggerEventId()!=EVENT_UNIT_DEATH and GetTriggerEventId()!=EVENT_UNIT_SPELL_EFFECT and MFI<(6)thenset MFI=MFI+1call SaveInteger(XY,(MKI),(34),(MFI))call SetUnitState(TMI,UNIT_STATE_MANA,GetUnitState(TMI,UNIT_STATE_MANA)-8*NGI)call TKI(TLI,TMI,1,5+15*NGI)elseif MFI>=(6)or GetTriggerEventId()==EVENT_UNIT_DEATH or(GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()!=1093743191 and GetSpellAbilityId()!=1093682767 and GetSpellAbilityId()!=1093750095 and GetSpellAbilityId()!=1093747504 and GetSpellAbilityId()!=1093753417 and GetSpellAbilityId()!=1093810265 and HN1(GetSpellAbilityId())==false and(SEI(GetSpellAbilityId())or GetSpellAbilityId()==1093678667))thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call UnitRemoveAbility(TMI,1093750867)call UnitRemoveAbility(TMI,1110459217)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction JL3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetEnumUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093743692)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call QTI(TMI,1093750867)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_SPELL_EFFECT)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function JK3))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("Abilities\\Spells\\Human\\ManaFlare\\ManaFlareTarget.mdl",TMI,"overhead")))call SaveInteger(XY,(MKI),(5),(NGI))call SaveInteger(XY,(MKI),(34),(0))set TLI=nullset TMI=nullset t=nullendfunctionfunction JM3 takes nothing returns nothinglocal group glocal integer NGI=GetUnitAbilityLevel(GetTriggerUnit(),1093743692)if NGI>0 thenset g=MDI()set CK=GetTriggerUnit()set D0I=GetTriggerUnit()call GroupEnumUnitsInRange(g,0,0,9999,Condition(function BZ1))call ForGroup(g,function JL3)call MCI(g)endifset g=nullendfunctionfunction JN3 takes nothing returns nothinglocal group g=MDI()local location l=GetSpellTargetLoc()set CK=GetTriggerUnit()set D0I=GetTriggerUnit()call GroupEnumUnitsInRange(g,GetLocationX(l),GetLocationY(l),375,Condition(function BZ1))call ForGroup(g,function JL3)call PMI("war3mapImported\\CotS.mdx",GetLocationX(l),GetLocationY(l),5)call MCI(g)call RemoveLocation(l)set g=nullset l=nullendfunctionfunction JS3 takes nothing returns booleanif GetSpellAbilityId()==1093743692 thencall JN3()endifreturn falseendfunctionfunction X61 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function JS3))set t=nullendfunctionfunction JT3 takes nothing returns booleanreturn GetSpellAbilityId()==1093684275 or GetSpellAbilityId()==1093816643endfunctionfunction JR3 takes nothing returns booleancall MZI(GetTriggeringTrigger())call VolumeGroupReset()return falseendfunctionfunction JP3 takes nothing returns nothinglocal location O4O=GetUnitLoc(GetTriggerUnit())local trigger t=CreateTrigger()local integer NGI=GetUnitAbilityLevel(GetTriggerUnit(),1093684275)if NGI==0 thenset NGI=1+GetUnitAbilityLevel(GetTriggerUnit(),1093816643)call JM3()endifcall TriggerRegisterTimerEvent(t,NGI+2,false)call TriggerAddCondition(t,Condition(function JR3))call CreateNUnitsAtLoc(1,1697656901,GetOwningPlayer(GetTriggerUnit()),O4O,bj_UNIT_FACING)call ShowUnitHide(bj_lastCreatedUnit)call UnitApplyTimedLifeBJ(5.00,1112820806,bj_lastCreatedUnit)call UnitAddAbility(bj_lastCreatedUnit,1093684274)call SetUnitAbilityLevelSwapped(1093684274,bj_lastCreatedUnit,NGI)call IssuePointOrderLoc(bj_lastCreatedUnit,"silence",O4O)call VolumeGroupSetVolume(SOUND_VOLUMEGROUP_UNITSOUNDS,.0)call VolumeGroupSetVolume(SOUND_VOLUMEGROUP_COMBAT,.0)call VolumeGroupSetVolume(SOUND_VOLUMEGROUP_SPELLS,.0)call VolumeGroupSetVolume(SOUND_VOLUMEGROUP_MUSIC,.0)call RemoveLocation(O4O)set t=nullset O4O=nullendfunctionfunction GS takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function JT3))call TriggerAddAction(t,function JP3)endfunctionfunction JQ3 takes nothing returns booleanreturn GetLearnedSkill()==1093677909endfunctionfunction JU3 takes nothing returns nothingcall SetPlayerTechResearchedSwap(1378889781,GetUnitAbilityLevelSwapped(1093677909,GetTriggerUnit()),GetOwningPlayer(GetLearningUnit()))endfunctionfunction XB1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function JQ3))call TriggerAddAction(t,function JU3)endfunctionfunction K03 takes nothing returns nothingif IsUnitType(GetEnumUnit(),UNIT_TYPE_STRUCTURE)==false thencall TKI(DII,GetEnumUnit(),1,DOI)call IssueTargetOrder(D1I,"slow",GetEnumUnit())elsecall TKI(DII,GetEnumUnit(),1,DOI/3)call IssueTargetOrder(D1I,"slow",GetEnumUnit())endifendfunctionfunction KI3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local group g=MDI()local real dlocal real alocal real x2local real y2set CK=TLIcall GroupEnumUnitsInRange(g,x,y,400+25,Condition(function B21))set DII=TLIset DOI=NGI*12set D1I=QHIcall ForGroup(g,function K03)call MCI(g)call DestroyEffect((LoadEffectHandle(XY,(MKI),(309))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(177))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(178))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(179))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(180))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(330))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(331))))if GetTriggerEvalCount(t)==9 thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseset d=0set a=0set x2=x+d*Cos(a*bj_DEGTORAD)set y2=y+d*Sin(a*bj_DEGTORAD)call SaveEffectHandle(XY,(MKI),(309),(AddSpecialEffect("Abilities\\Weapons\\FlyingMachine\\FlyingMachineImpact.mdl",x2,y2)))set d=150set a=45set x2=x+d*Cos(a*bj_DEGTORAD)set y2=y+d*Sin(a*bj_DEGTORAD)call SaveEffectHandle(XY,(MKI),(175),(AddSpecialEffect("Abilities\\Weapons\\FlyingMachine\\FlyingMachineImpact.mdl",x2,y2)))set d=275set a=90set x2=x+d*Cos(a*bj_DEGTORAD)set y2=y+d*Sin(a*bj_DEGTORAD)call SaveEffectHandle(XY,(MKI),(176),(AddSpecialEffect("Abilities\\Weapons\\FlyingMachine\\FlyingMachineImpact.mdl",x2,y2)))set d=150set a=135set x2=x+d*Cos(a*bj_DEGTORAD)set y2=y+d*Sin(a*bj_DEGTORAD)call SaveEffectHandle(XY,(MKI),(177),(AddSpecialEffect("Abilities\\Weapons\\FlyingMachine\\FlyingMachineImpact.mdl",x2,y2)))set d=275set a=180set x2=x+d*Cos(a*bj_DEGTORAD)set y2=y+d*Sin(a*bj_DEGTORAD)call SaveEffectHandle(XY,(MKI),(178),(AddSpecialEffect("Abilities\\Weapons\\FlyingMachine\\FlyingMachineImpact.mdl",x2,y2)))set d=150set a=225set x2=x+d*Cos(a*bj_DEGTORAD)set y2=y+d*Sin(a*bj_DEGTORAD)call SaveEffectHandle(XY,(MKI),(179),(AddSpecialEffect("Abilities\\Weapons\\FlyingMachine\\FlyingMachineImpact.mdl",x2,y2)))set d=275set a=270set x2=x+d*Cos(a*bj_DEGTORAD)set y2=y+d*Sin(a*bj_DEGTORAD)call SaveEffectHandle(XY,(MKI),(180),(AddSpecialEffect("Abilities\\Weapons\\FlyingMachine\\FlyingMachineImpact.mdl",x2,y2)))set d=150set a=305set x2=x+d*Cos(a*bj_DEGTORAD)set y2=y+d*Sin(a*bj_DEGTORAD)call SaveEffectHandle(XY,(MKI),(330),(AddSpecialEffect("Abilities\\Weapons\\FlyingMachine\\FlyingMachineImpact.mdl",x2,y2)))set d=275set a=360set x2=x+d*Cos(a*bj_DEGTORAD)set y2=y+d*Sin(a*bj_DEGTORAD)call SaveEffectHandle(XY,(MKI),(331),(AddSpecialEffect("Abilities\\Weapons\\FlyingMachine\\FlyingMachineImpact.mdl",x2,y2)))endifset t=nullset TLI=nullset QHI=nullset g=nullreturn falseendfunctionfunction K13 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer NGI=GetUnitAbilityLevel(TLI,1093678644)local real x1=(LoadReal(XY,(MKI),(6)))local real y1=(LoadReal(XY,(MKI),(7)))local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,x1,y1,0)local real x2local real y2local real dlocal real alocal integer icall QTI(QHI,1093744966)call SetUnitAbilityLevel(QHI,1093744966,NGI)if GetTriggerEvalCount(t)==1 thenset i=1loopexitwhen i>10set d=GetRandomReal(0,450)set a=GetRandomReal(0,360)set x2=x1+d*Cos(a*bj_DEGTORAD)set y2=y1+d*Sin(a*bj_DEGTORAD)set QHI=CreateUnit(GetOwningPlayer(TLI),1697656906,GetUnitX(TLI),GetUnitY(TLI),90)call IssuePointOrder(QHI,"attackground",x2,y2)call UnitApplyTimedLife(QHI,1112820806,0.5)set i=i+1endloopelsecall FlushChildHashtable(XY,(MKI))call MZI(t)set t=CreateTrigger()set MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveReal(XY,(MKI),(6),((x1)*1.0))call SaveReal(XY,(MKI),(7),((y1)*1.0))call SaveInteger(XY,(MKI),(5),(NGI))call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function KI3))call TriggerEvaluate(t)endifset TLI=nullset QHI=nullset t=nullreturn falseendfunctionfunction KO3 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local location l=GetSpellTargetLoc()local real x=GetLocationX(l)local real y=GetLocationY(l)call QJI(GetOwningPlayer(TLI),9.4,x,y,360)call TriggerRegisterTimerEvent(t,0.4,true)call TriggerAddCondition(t,Condition(function K13))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))call RemoveLocation(l)set t=nullset TLI=nullset l=nullendfunctionfunction K23 takes nothing returns booleanif GetSpellAbilityId()==1093678644 thencall KO3()endifreturn falseendfunctionfunction X91 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function K23))call RVI(1093744966)set t=nullendfunctionfunction K33 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local effect FX=(LoadEffectHandle(XY,(MKI),(32)))local player p=GetOwningPlayer(N0I)call UnitShareVision(TMI,p,false)call DestroyEffect(FX)call RemoveUnit(QHI)call UnitRemoveAbility(TMI,1110455880)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset N0I=nullset QHI=nullset TMI=nullset FX=nullset p=nullreturn falseendfunctionfunction K43 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local player p=GetOwningPlayer(N0I)local unit QHIlocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local string s="effects\\Snipe Target.mdx"if IsPlayerAlly(GetLocalPlayer(),p)==false and TGI(GetLocalPlayer())==false thenset s=""endifcall UnitShareVision(TMI,p,true)set QHI=CreateUnit(GetOwningPlayer(TMI),1697657170,0,0,0)call QTI(QHI,1093684809)call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget(s,TMI,"overhead")))call TriggerRegisterTimerEvent(t,4,false)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_SPELL_ENDCAST)call TriggerAddCondition(t,Condition(function K33))set t=nullset N0I=nullset TMI=nullset QHI=nullset p=nullendfunctionfunction K53 takes nothing returns booleanif GetSpellAbilityId()==1093678160 or GetSpellAbilityId()==1093747029 thencall K43()endifreturn falseendfunctionfunction XA1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CHANNEL)call TriggerAddCondition(t,Condition(function K53))set t=nullendfunctionfunction K63 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local location l=GetSpellTargetLoc()local real x=GetLocationX(l)local real y=GetLocationY(l)local unit QHI=CreateUnit(GetOwningPlayer(N0I),1697656883,x,y,0)local integer NGI=GetUnitAbilityLevel(N0I,1093685831)local real K73=(83+17*NGI)*0.01call SetUnitVertexColor(QHI,255,255,255,150)call UnitApplyTimedLife(QHI,1112820806,6)call SetUnitScale(QHI,K73,K73,K73)if NWI(GetOwningPlayer(N0I))thencall QTI(QHI,1093677369)call SetUnitAbilityLevel(QHI,1093677369,NGI)elsecall QTI(QHI,1093682487)call SetUnitAbilityLevel(QHI,1093682487,NGI)endifcall IssuePointOrder(QHI,"cloudoffog",x,y)call RemoveLocation(l)set N0I=nullset l=nullset QHI=nullendfunctionfunction K83 takes nothing returns booleanif GetSpellAbilityId()==1093685831 thencall S42()call K63()endifreturn falseendfunctionfunction XE1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function K83))endfunctionfunction K93 takes nothing returns booleanlocal unit TLI=GetAttacker()local integer NGI=GetUnitAbilityLevel(TLI,1093677130)if NGI>0 thencall UnitRemoveAbility(TLI,D2I[NGI])call UnitRemoveAbility(TLI,1093677130)call QTI(TLI,D2I[NGI])call QTI(TLI,1093677130)call SetUnitAbilityLevel(TLI,1093677130,NGI)endifset TLI=nullreturn falseendfunctionfunction KA3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093677130)if GetUnitAbilityLevel(TLI,1093684546)==0 thencall QTI(TLI,1093684546)endifif NGI==2 thencall UnitRemoveAbility(TLI,D2I[1])elseif NGI==3 thencall UnitRemoveAbility(TLI,D2I[1])call UnitRemoveAbility(TLI,D2I[2])endifcall SetUnitAbilityLevel(TLI,1093684546,NGI)call QTI(TLI,D2I[NGI])set TLI=nullendfunctionfunction KB3 takes nothing returns booleanif GetLearnedSkill()==1093677130 and IsUnitIllusion(GetTriggerUnit())==false thencall KA3()endifreturn falseendfunctionfunction XC1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function KB3))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function K93))set D2I[1]=1093817682set D2I[2]=1093817683set D2I[3]=1093817684set t=nullendfunctionfunction KC3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local real TSI=30*GetUnitAbilityLevel(TLI,1093684025)local trigger tlocal integer MKIlocal real x=GetUnitX(TMI)-75*Cos(GetUnitFacing(TMI)*bj_DEGTORAD)local real y=GetUnitY(TMI)-75*Sin(GetUnitFacing(TMI)*bj_DEGTORAD)call SetUnitX(TLI,x)call SetUnitY(TLI,y)call SetUnitFacing(TLI,GetUnitFacing(TMI))call DestroyEffect(AddSpecialEffect("war3mapImported\\BlinkStrike.mdx",x,y))if IsUnitEnemy(TMI,GetOwningPlayer(TLI))thencall TKI(TLI,TMI,1,TSI)call SaveBoolean(XY,(GetHandleId(TLI)),(332),(true))call IssueTargetOrder(TLI,"attack",TMI)endifset TLI=nullset TMI=nullset t=nullendfunctionfunction KD3 takes nothing returns booleanif GetSpellAbilityId()==1093684025 thencall KC3()endifreturn falseendfunctionfunction KE3 takes nothing returns booleanif GetSpellAbilityId()==1093684025 thencall DestroyEffect(AddSpecialEffect("war3mapImported\\BlinkStrike.mdx",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit())))endifreturn falseendfunctionfunction XF1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function KD3))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function KE3))set t=nullendfunctionfunction KF3 takes nothing returns nothinglocal unit TLI=GetAttacker()local unit TMI=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093682266)local boolean KG3=(LoadBoolean(XY,(GetHandleId(TLI)),(332)))local real d=RAbsBJ(GetUnitFacing(TMI)-GetUnitFacing(TLI))if d>180 thenset d=360-dendifif d<=105 or KG3 thencall SaveBoolean(XY,(GetHandleId(TLI)),(332),(false))if GetUnitAbilityLevel(TMI,1093678162)==0 thencall DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl",TMI,"chest"))call TKI(TLI,TMI,2,GetHeroAgi(TLI,true)*(0.25*NGI+0.25))endifendifset TLI=nullset TMI=nullendfunctionfunction KH3 takes nothing returns booleanif GetUnitAbilityLevel(GetAttacker(),1093682266)>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false thenif IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))==false or(IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==false and GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)/GetUnitState(GetTriggerUnit(),UNIT_STATE_MAX_LIFE)<0.5)thencall KF3()endifendifreturn falseendfunctionfunction XD1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function KH3))set t=nullendfunctionfunction KZ3 takes nothing returns nothingif A61(GetEnumUnit())thenreturnendifcall O41(GetEnumUnit(),D3I,1,7,1110458966)call UnitMakeAbilityPermanent(GetEnumUnit(),true,D3I)call SetPlayerAbilityAvailable(GetOwningPlayer(GetEnumUnit()),D3I,false)endfunctionfunction KV3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093814611)local group g=MDI()if NGI==1 thenset D3I=1093748278elseif NGI==2 thenset D3I=1093748279elseif NGI==3 thenset D3I=1093748275elseif NGI==4 thenset D3I=1093748277endifcall GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),925,Condition(function B71))call ForGroup(g,function KZ3)call MCI(g)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\BattleRoar\\RoarCaster.mdl",TLI,"overhead"))set TLI=nullset g=nullendfunctionfunction KW3 takes nothing returns booleanif GetSpellAbilityId()==1093814611 thencall KV3()endifreturn falseendfunctionfunction NB1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function KW3))set t=nullendfunctionfunction KX3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local integer MFI=(LoadInteger(XY,(MKI),(34)))if GetTriggerEventId()!=EVENT_PLAYER_UNIT_SPELL_EFFECT thenset MFI=MFI+1call SaveInteger(XY,(MKI),(34),(MFI))endifif(GetTriggerEventId()!=EVENT_PLAYER_UNIT_SPELL_EFFECT and MFI>1)or(GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT and CY1(GetSpellAbilityId())and GetSpellTargetUnit()==N0I)thenif(GetTriggerEventId()!=EVENT_PLAYER_UNIT_SPELL_EFFECT and MFI>1)thenif QPI(N0I)==false thencall UnitRemoveAbility(N0I,1093687119)call UnitRemoveAbility(N0I,1110454329)call UnitRemoveAbility(N0I,1110459472)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)endifelseif GetTriggerEventId()!=EVENT_PLAYER_UNIT_SPELL_EFFECT thencall DestroyEffect(AddSpecialEffectTarget("war3mapImported\\BattleCryCaster.mdx",N0I,"overhead"))call QTI(N0I,1093687119)call SetUnitAbilityLevel(N0I,1093687119,GetUnitAbilityLevel(N0I,1093752648))call UnitMakeAbilityPermanent(N0I,true,1093687119)call SetPlayerAbilityAvailable(GetOwningPlayer(N0I),1093687119,false)endifset t=nullset N0I=nullreturn falseendfunctionfunction KY3 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit N0I=GetTriggerUnit()call TriggerRegisterTimerEvent(t,25,false)call TriggerRegisterTimerEvent(t,0.31,false)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function KX3))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveInteger(XY,(MKI),(34),(0))set t=nullset N0I=nullendfunctionfunction KJ3 takes nothing returns booleanif GetSpellAbilityId()==1093752648 and GetUnitTypeId(GetTriggerUnit())==1211117617 thencall KY3()endifreturn falseendfunctionfunction NC1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function KJ3))set t=nullendfunctionfunction KK3 takes nothing returns nothingcall BQ1(D4I,GetEnumUnit(),2)call TKI(D4I,GetEnumUnit(),1,D5I*75+25)endfunctionfunction KL3 takes player p,unit TMI,integer NGI returns nothinglocal unit QHI=CreateUnit(p,1697656901,GetUnitX(TMI),GetUnitY(TMI),0)local integer QRIlocal group g=MDI()set D5I=NGIset CK=K1[GetPlayerId(p)]call GroupEnumUnitsInRange(g,GetUnitX(TMI),GetUnitY(TMI),280,Condition(function AT1))call GroupAddUnit(g,TMI)set D4I=QHIcall ForGroup(g,function KK3)call MCI(g)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\StormBolt\\StormBoltMissile.mdl",TMI,"origin"))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\StormBolt\\StormBoltMissile.mdl",TMI,"origin"))set QHI=nullset g=nullendfunctionfunction KM3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local player p=(LoadPlayerHandle(XY,(MKI),(54)))local integer TRI=(LoadInteger(XY,(MKI),(30)))local unit TMI=M6I(TRI)local integer NGI=(LoadInteger(XY,(MKI),(5)))local unit UII=(LoadUnitHandle(XY,(MKI),(45)))local real x=GetUnitX(UII)local real y=GetUnitY(UII)local real P6I=GetUnitX(TMI)local real P7I=GetUnitY(TMI)local real U1I=1000*0.035local real UOI=PUI(x,y,P6I,P7I)local real U2I=x+U1I*Cos(UOI*bj_DEGTORAD)local real U3I=y+U1I*Sin(UOI*bj_DEGTORAD)local boolean G2O=(LoadBoolean(XY,(MKI),(249)))call SetUnitX(UII,U2I)call SetUnitY(UII,U3I)call SetUnitFacing(UII,UOI)if((LoadInteger(XY,(GetHandleId((TMI))),((4422))))==1)==true thenset G2O=falsecall SaveBoolean(XY,(MKI),(249),(G2O))endifif QCI(P6I,P7I,U2I,U3I)<=U1I thenif G2O thencall KL3(p,TMI,NGI)endifcall KillUnit(UII)call M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TMI=nullset UII=nullreturn falseendfunctionfunction KN3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093744944)local unit TMI=GetSpellTargetUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit UII=CreateUnit(GetOwningPlayer(TLI),1747990353,GetUnitX(TLI),GetUnitY(TLI),PUI(GetUnitX(TLI),GetUnitY(TLI),GetUnitX(TMI),GetUnitY(TMI)))local boolean G2O=MBI(GetSpellTargetUnit())==falsecall SaveBoolean(XY,(MKI),(249),(G2O))call SavePlayerHandle(XY,(MKI),(54),(GetOwningPlayer(TLI)))call SaveInteger(XY,(MKI),(30),(M8I(TMI)))call SaveUnitHandle(XY,(MKI),(45),(UII))call SaveInteger(XY,(MKI),(5),(NGI))call TriggerRegisterTimerEvent(t,0.035,true)call TriggerAddCondition(t,Condition(function KM3))set t=nullset TLI=nullset TMI=nullset UII=nullendfunctionfunction KS3 takes nothing returns booleanif GetSpellAbilityId()==1093744944 thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_CAST thencall DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\Bolt\\BoltImpact.mdl",GetTriggerUnit(),"weapon"))elsecall KN3()endifendifreturn falseendfunctionfunction NA1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function KS3))set t=nullendfunctionfunction KT3 takes nothing returns booleanif((GetUnitTypeId(GetFilterUnit())==1848652103))thenreturn trueendifif((GetUnitTypeId(GetFilterUnit())==1848652099))thenreturn trueendifif((GetUnitTypeId(GetFilterUnit())==1848652088))thenreturn trueendifif((GetUnitTypeId(GetFilterUnit())==1848651828))thenreturn trueendifreturn falseendfunctionfunction KR3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit FXOlocal unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TLI),GetUnitY(TLI),0)local integer NGI=GetUnitAbilityLevel(TLI,GetSpellAbilityId())local group g=MDI()call GroupEnumUnitsOfPlayer(g,GetOwningPlayer(TLI),Condition(function KT3))set FXO=FirstOfGroup(g)call MCI(g)if GetSpellAbilityId()==1093748038 thencall QTI(QHI,1093681473)call SetUnitAbilityLevel(QHI,1093681473,NGI)elseif GetSpellAbilityId()==1093748037 thencall QTI(QHI,1093681474)call SetUnitAbilityLevel(QHI,1093681474,NGI)elseif GetSpellAbilityId()==1093748040 thencall QTI(QHI,1093681475)call SetUnitAbilityLevel(QHI,1093681475,NGI)elseif GetSpellAbilityId()==1093748041 thencall QTI(QHI,1093681476)call SetUnitAbilityLevel(QHI,1093681476,NGI)elseif GetSpellAbilityId()==1093748039 thencall QTI(QHI,1093681477)call SetUnitAbilityLevel(QHI,1093681477,NGI)endifcall IssueTargetOrder(QHI,"bloodlust",TLI)if FXO!=null and QPI(FXO)==false thencall IssueTargetOrder(QHI,"bloodlust",FXO)endifset g=nullset TLI=nullset FXO=nullset QHI=nullendfunctionfunction KP3 takes nothing returns booleanif GetSpellAbilityId()==1093748038 or GetSpellAbilityId()==1093748037 or GetSpellAbilityId()==1093748040 or GetSpellAbilityId()==1093748041 or GetSpellAbilityId()==1093748039 thencall KR3()endifreturn falseendfunctionfunction XG1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function KP3))set t=nullendfunctionfunction KQ3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit FXO=(LoadUnitHandle(XY,(MKI),(2)))local real KU3if GetTriggerEventId()==EVENT_UNIT_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamage()>2 and GetEventDamageSource()!=GetTriggerUnit()and NXI(GetOwningPlayer(GetEventDamageSource()))thencall SaveReal(XY,(MKI),(714),(((TimerGetElapsed(M)))*1.0))endifendifset KU3=(LoadReal(XY,(MKI),(714)))if KU3+3<(TimerGetElapsed(M))thenif(LoadInteger(XY,(MKI),(34)))==2 thencall SaveInteger(XY,(MKI),(34),(1))call SaveInteger(XY,(GetHandleId((FXO))),((4327)),(2))call SetPlayerAbilityAvailable(GetOwningPlayer(FXO),1093681463,true)endifelseif(LoadInteger(XY,(MKI),(34)))==1 thencall SaveInteger(XY,(MKI),(34),(2))call SaveInteger(XY,(GetHandleId((FXO))),((4327)),(1))call SetPlayerAbilityAvailable(GetOwningPlayer(FXO),1093681463,false)endifendifset t=nullset FXO=nullreturn falseendfunctionfunction L03 takes unit FXO returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.2,true)call TriggerRegisterUnitEvent(t,FXO,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,FXO,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function KQ3))call SaveUnitHandle(XY,(MKI),(2),(FXO))call SaveReal(XY,(MKI),(714),((0)*1.0))call SaveInteger(XY,(MKI),(34),(1))call SetPlayerAbilityAvailable(GetOwningPlayer(FXO),1093681463,true)set t=nullendfunctionfunction LI3 takes nothing returns booleanreturn(IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))and GetUnitAbilityLevel(GetFilterUnit(),1110459185)>0endfunctionfunction L13 takes nothing returns nothingcall TKI(D6I,GetEnumUnit(),2,30)endfunctionfunction LO3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit FXO=(LoadUnitHandle(XY,(MKI),(53)))local group g=MDI()set CK=FXOset D6I=FXOcall GroupEnumUnitsInRange(g,GetUnitX(FXO),GetUnitY(FXO),2000,Condition(function LI3))call ForGroup(g,function L13)call MCI(g)set t=nullset g=nullset FXO=nullreturn falseendfunctionfunction L23 takes nothing returns nothinglocal unit FXO=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.5,true)call TriggerAddCondition(t,Condition(function LO3))call SaveUnitHandle(XY,(MKI),(53),(FXO))set FXO=nullset t=nullendfunctionfunction L33 takes nothing returns booleanreturn GetLearnedSkill()==1093681461 and IsUnitIllusion(GetTriggerUnit())==falseendfunctionfunction L43 takes nothing returns booleanif QPI(GetFilterUnit())thenreturn falseendifif((GetUnitTypeId(GetFilterUnit())==1848652099))thenreturn trueendifif((GetUnitTypeId(GetFilterUnit())==1848652088))thenreturn trueendifif((GetUnitTypeId(GetFilterUnit())==1848651828))thenreturn trueendifreturn falseendfunctionfunction L53 takes nothing returns nothinglocal integer MKI=GetHandleId(GetOwningPlayer(GetTriggerUnit()))local unit L63=(LoadUnitHandle(XY,(MKI),(334)))local unit FXO=(LoadUnitHandle(XY,(MKI),(333)))if L63!=null and X0==false thencall UnitAddItem(FXO,UnitRemoveItemFromSlot(L63,0))call UnitAddItem(FXO,UnitRemoveItemFromSlot(L63,1))call UnitAddItem(FXO,UnitRemoveItemFromSlot(L63,2))call UnitAddItem(FXO,UnitRemoveItemFromSlot(L63,3))call UnitAddItem(FXO,UnitRemoveItemFromSlot(L63,4))call UnitAddItem(FXO,UnitRemoveItemFromSlot(L63,5))endifendfunctionfunction L73 takes nothing returns nothinglocal unit R7I=GetTriggerUnit()local player NJI=GetOwningPlayer(R7I)local location O4O=GetUnitLoc(R7I)local boolexpr PI1=Condition(function L43)local group GK1=MDI()local integer NGI=GetUnitAbilityLevel(R7I,1093681461)local integer MKI=GetHandleId(NJI)local integer L83local unit FXOlocal real EM3call GroupEnumUnitsOfPlayer(GK1,GetOwningPlayer(R7I),PI1)call DestroyBoolExpr(PI1)if(NGI==1)thencall L23()endifset L83=CountUnitsInGroup(GK1)if(L83==1)thenset FXO=FirstOfGroup(GK1)set EM3=GetUnitLifePercent(FXO)set O4O=GetUnitLoc(FXO)call ShowUnit(FXO,false)call KillUnit(FXO)if(NGI==2)thencall CreateNUnitsAtLoc(1,1848652088,GetOwningPlayer(GetTriggerUnit()),O4O,bj_UNIT_FACING)call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl")call L03(bj_lastCreatedUnit)elseif(NGI==3)thencall CreateNUnitsAtLoc(1,1848652099,GetOwningPlayer(GetTriggerUnit()),O4O,bj_UNIT_FACING)call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl")call L03(bj_lastCreatedUnit)elseif(NGI==4)thencall CreateNUnitsAtLoc(1,1848652103,GetOwningPlayer(GetTriggerUnit()),O4O,bj_UNIT_FACING)call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl")call L03(bj_lastCreatedUnit)endifcall SetUnitLifePercentBJ(bj_lastCreatedUnit,EM3)call SaveUnitHandle(XY,(MKI),(333),(bj_lastCreatedUnit))call L53()endifcall MCI(GK1)endfunctionfunction XW1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function L33))call TriggerAddAction(t,function L73)endfunctionfunction L93 takes nothing returns booleanreturn GetLearnedSkill()==1093681464 and IsUnitIllusion(GetTriggerUnit())==falseendfunctionfunction LA3 takes nothing returns nothingcall SetPlayerTechResearched(GetOwningPlayer(GetTriggerUnit()),1378889776,GetPlayerTechCount(GetOwningPlayer(GetTriggerUnit()),1378889776,true)+1)call SetPlayerTechResearched(GetOwningPlayer(GetTriggerUnit()),1378889777,GetPlayerTechCount(GetOwningPlayer(GetTriggerUnit()),1378889777,true)+1)endfunctionfunction XX1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function L93))call TriggerAddAction(t,function LA3)endfunctionfunction LB3 takes nothing returns booleanreturn GetSpellAbilityId()==1093681461endfunctionfunction LC3 takes nothing returns booleanif QPI(GetFilterUnit())thenreturn falseendifif((GetUnitTypeId(GetFilterUnit())==1848652103))thenreturn trueendifif((GetUnitTypeId(GetFilterUnit())==1848652099))thenreturn trueendifif((GetUnitTypeId(GetFilterUnit())==1848652088))thenreturn trueendifif((GetUnitTypeId(GetFilterUnit())==1848651828))thenreturn trueendifreturn falseendfunctionfunction LD3 takes nothing returns nothinglocal unit R7I=GetTriggerUnit()local player NJI=GetOwningPlayer(R7I)local location O4O=GetUnitLoc(R7I)local boolexpr PI1=Condition(function LC3)local group GK1=MDI()local integer NGI=GetUnitAbilityLevel(R7I,1093681461)local integer MKI=GetHandleId(NJI)local boolean LE3local unit FXOcall GroupEnumUnitsOfPlayer(GK1,GetOwningPlayer(R7I),PI1)set LE3=CountUnitsInGroup(GK1)==0if(NGI==1 and LE3)thencall CreateNUnitsAtLoc(1,1848651828,GetOwningPlayer(GetTriggerUnit()),O4O,bj_UNIT_FACING)call SaveUnitHandle(XY,(MKI),(333),(bj_lastCreatedUnit))call L53()call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl")call L03(bj_lastCreatedUnit)elseif(NGI==2 and LE3)thencall CreateNUnitsAtLoc(1,1848652088,GetOwningPlayer(GetTriggerUnit()),O4O,bj_UNIT_FACING)call SaveUnitHandle(XY,(MKI),(333),(bj_lastCreatedUnit))call L53()call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl")call L03(bj_lastCreatedUnit)elseif(NGI==3 and LE3)thencall CreateNUnitsAtLoc(1,1848652099,GetOwningPlayer(GetTriggerUnit()),O4O,bj_UNIT_FACING)call SaveUnitHandle(XY,(MKI),(333),(bj_lastCreatedUnit))call L53()call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl")call L03(bj_lastCreatedUnit)elseif(NGI==4 and LE3)thencall CreateNUnitsAtLoc(1,1848652103,GetOwningPlayer(GetTriggerUnit()),O4O,bj_UNIT_FACING)call SaveUnitHandle(XY,(MKI),(333),(bj_lastCreatedUnit))call L53()call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl")call L03(bj_lastCreatedUnit)elseif LE3==false thenset FXO=FirstOfGroup(GK1)call AddSpecialEffectTargetUnitBJ("chest",FXO,"Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl")call SetUnitState(FXO,UNIT_STATE_LIFE,GetUnitState(FXO,UNIT_STATE_MAX_LIFE))call SetUnitPosition(FXO,GetUnitX(R7I),GetUnitY(R7I))set FXO=nullendifcall SetUnitAbilityLevel(bj_lastCreatedUnit,1093679449,NGI)call MCI(GK1)call RemoveLocation(O4O)set R7I=nullset NJI=nullset O4O=nullset GK1=nullendfunctionfunction LF3 takes nothing returns nothinglocal unit R7I=GetTriggerUnit()local player NJI=GetOwningPlayer(R7I)local location O4O=GetUnitLoc(R7I)local boolexpr PI1=Condition(function LC3)local group GK1=MDI()local integer NGI=GetUnitAbilityLevel(R7I,1093681461)local integer MKI=GetHandleId(NJI)local boolean LE3local unit FXOcall GroupEnumUnitsOfPlayer(GK1,GetOwningPlayer(R7I),PI1)if CountUnitsInGroup(GK1)!=0 thenset FXO=FirstOfGroup(GK1)if FXO!=null and((LoadInteger(XY,(GetHandleId((FXO))),((4327))))==1)==true thencall R6I(R7I)call R1I(NJI,GetObjectName(1848659278))endifendifcall MCI(GK1)call RemoveLocation(O4O)endfunctionfunction XZ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function LB3))call TriggerAddAction(t,function LD3)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function LB3))call TriggerAddAction(t,function LF3)endfunctionfunction LG3 takes nothing returns booleanreturn GetSpellAbilityId()==1093681463endfunctionfunction LH3 takes nothing returns nothinglocal unit FXO=GetTriggerUnit()local unit FYO=K1[GetPlayerId(GetOwningPlayer(FXO))]call SetUnitX(FXO,GetUnitX(FYO)+GetRandomReal(25,50)*Cos(GetRandomReal(0,360)))call SetUnitY(FXO,GetUnitY(FYO)+GetRandomReal(25,50)*Sin(GetRandomReal(0,360)))endfunctionfunction XV1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function LG3))call TriggerAddAction(t,function LH3)endfunctionfunction LZ3 takes nothing returns booleanreturn(GetUnitTypeId(GetTriggerUnit())==1311781171 or GetUnitTypeId(GetTriggerUnit())==1311781199 or GetUnitTypeId(GetTriggerUnit())==1311781173 or GetUnitTypeId(GetTriggerUnit())==1311781172)and IsUnitIllusion(GetTriggerUnit())==falseendfunctionfunction LV3 takes nothing returns nothinglocal unit FXO=(LoadUnitHandle(XY,(GetHandleId(GetOwningPlayer(GetTriggerUnit()))),(333)))call KillUnit(FXO)endfunctionfunction XJ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_DEATH)call TriggerAddCondition(t,Condition(function LZ3))call TriggerAddAction(t,function LV3)endfunctionfunction LW3 takes unit TLI,unit TMI returns nothinglocal unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call MPI(TLI,4343,5)call UnitAddAbility(QHI,1093748570)call IssueTargetOrder(QHI,"ensnare",TMI)set QHI=nullendfunctionfunction LX3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamageSource()==TLI thencall DisableTrigger(t)call LW3(TLI,TMI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifelsecall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction LY3 takes nothing returns nothinglocal trigger t=CreateTrigger()local unit TMI=GetTriggerUnit()local unit TLI=GetAttacker()local integer MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,1,false)call TriggerAddCondition(t,Condition(function LX3))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(2),(TLI))set TMI=nullset TLI=nullset t=nullendfunctionfunction LJ3 takes nothing returns nothinglocal unit TLI=GetAttacker()if GetUnitTypeId(TLI)!=1848652103 and GetUnitTypeId(TLI)!=1848652099 thenreturnendifif((LoadInteger(XY,(GetHandleId((TLI))),((4342))))==1)==false and((LoadInteger(XY,(GetHandleId((TLI))),((4343))))==1)==false and GetRandomInt(0,100)<20 thencall MPI(TLI,4342,.3)call LY3()endifreturnendfunctionfunction LK3 takes nothing returns booleanreturn GetUnitTypeId(GetAttacker())==1848652103 or GetUnitTypeId(GetAttacker())==1848652099 or GetUnitTypeId(GetAttacker())==1848652088 or GetUnitTypeId(GetAttacker())==1848651828endfunctionfunction LL3 takes nothing returns nothinglocal unit FXO=GetAttacker()local unit FYO=K1[GetPlayerId(GetOwningPlayer(FXO))]if((GetUnitX(FYO)-GetUnitX(FXO))*(GetUnitX(FYO)-GetUnitX(FXO))+(GetUnitY(FYO)-GetUnitY(FXO))*(GetUnitY(FYO)-GetUnitY(FXO))>=(1100*1100))thencall IssueImmediateOrder(FXO,"stop")elsecall LJ3()endifendfunctionfunction XH1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function LK3))call TriggerAddAction(t,function LL3)endfunctionfunction LM3 takes nothing returns booleanreturn(GetUnitTypeId(GetTriggerUnit())==1848652103 or GetUnitTypeId(GetTriggerUnit())==1848652099 or GetUnitTypeId(GetTriggerUnit())==1848652088 or GetUnitTypeId(GetTriggerUnit())==1848651828)and IsUnitIllusion(GetTriggerUnit())==falseendfunctionfunction LN3 takes nothing returns nothinglocal location QB1if NZI(GetOwningPlayer(GetTriggerUnit()))thenset QB1=GetRectCenter(O4)elseset QB1=GetRectCenter(S3)endifif DJ1(GetEnumItem())==false thencall SetItemPositionLoc(GetEnumItem(),QB1)endifcall RemoveLocation(QB1)set QB1=nullendfunctionfunction LS3 takes nothing returns nothinglocal integer MKI=GetHandleId(GetOwningPlayer(GetTriggerUnit()))local unit L63=(LoadUnitHandle(XY,(MKI),(334)))local unit FXO=(LoadUnitHandle(XY,(MKI),(333)))local integer xlocal integer yif L63==null thenif NZI(GetOwningPlayer(FXO))thenset x=-6390set y=-5615elseset x=5875set y=5000endifset L63=CreateUnit(GetOwningPlayer(GetTriggerUnit()),1697657158,x,y,0)call SaveUnitHandle(XY,(MKI),(334),(L63))endifif DJ1(GetEnumItem())==false thencall UnitAddItem(L63,GetEnumItem())endifcall ShowUnit(L63,true)endfunctionfunction LT3 takes nothing returns nothinglocal integer CN1=CR1(GetEnumItem())if GetWidgetLife(GetEnumItem())>0 and CN1!=VG0 thenif X0==true thencall LN3()elsecall LS3()endifelseendifendfunctionfunction LR3 takes nothing returns nothinglocal location O4O=GetUnitLoc(GetTriggerUnit())local rect LP3=RectFromCenterSizeBJ(O4O,400.00,400.00)local unit FYO=K1[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]call SetHeroXP(FYO,(GetHeroXP(FYO)-(GetHeroXP(FYO)/(125-(25*GetUnitAbilityLevel(FYO,1093681461))))),false)call UnitDamageTargetBJ(GetKillingUnit(),FYO,(100.00*I2R(GetUnitAbilityLevel(FYO,1093681461))),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL)call EnumItemsInRectBJ(LP3,function LT3)call RemoveLocation(O4O)call RemoveRect(LP3)endfunctionfunction XY1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_DEATH)call TriggerAddCondition(t,Condition(function LM3))call TriggerAddAction(t,function LR3)endfunctionfunction LQ3 takes nothing returns booleanif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif NXI(GetOwningPlayer(GetEventDamageSource()))and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))==true and DJI==false thenif DKI==false thencall UnitRemoveAbility(GetTriggerUnit(),1110458957)call MZI(GetTriggeringTrigger())endifendifif DKI==true thenset DKI=falseendifif DJI==true thenset DJI=falseendifelsecall MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction LU3 takes nothing returns nothinglocal unit TMI=GetEnumUnit()local trigger t=CreateTrigger()call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerRegisterTimerEvent(t,6,false)call TriggerAddCondition(t,Condition(function LQ3))set TMI=nullset t=nullendfunctionfunction M03 takes nothing returns booleanreturn GetUnitAbilityLevel(GetFilterUnit(),1110458957)>0 and GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0endfunctionfunction MI3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local group g=MDI()call GroupEnumUnitsInRange(g,x,y,1000,Condition(function M03))call ForGroup(g,function LU3)call MCI(g)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset g=nullreturn falseendfunctionfunction M13 takes nothing returns nothingif D7I==1 or D7I==2 thencall TKI(GetTriggerUnit(),GetEnumUnit(),2,70+10*D8I)endifif D7I==1 or D7I==3 thencall TKI(GetTriggerUnit(),GetEnumUnit(),1,70+10*D8I)endifendfunctionfunction MO3 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)local unit QHI=CreateUnit(GetOwningPlayer(TLI),1747990362,x,y,0)local group g=MDI()local unit uset D8I=GetUnitAbilityLevel(TLI,1093747009)if((LoadInteger(XY,(GetHandleId((TLI))),((4270))))==1)==false thencall SetUnitTimeScale(QHI,2.5)call UnitApplyTimedLife(QHI,1112820806,2)set QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,x,y,0)call QTI(QHI,1093747001)call SetUnitAbilityLevel(QHI,1093747001,GetUnitAbilityLevel(TLI,1093747009))call IssueImmediateOrder(QHI,"stomp")call GroupEnumUnitsInRange(g,x,y,500,Condition(function AK1))set D7I=1call ForGroup(g,function M13)call MCI(g)call TriggerRegisterTimerEvent(t,0.65,false)call TriggerAddCondition(t,Condition(function MI3))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))elsecall SetUnitTimeScale(QHI,2.5)call UnitApplyTimedLife(QHI,1112820806,2)set QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,x,y,0)call QTI(QHI,1093747001)call SetUnitAbilityLevel(QHI,1093747001,GetUnitAbilityLevel(TLI,1093747009))call IssueImmediateOrder(QHI,"stomp")call GroupEnumUnitsInRange(g,x,y,500,Condition(function AK1))set D7I=2call ForGroup(g,function M13)call TriggerRegisterTimerEvent(t,0.65,false)call TriggerAddCondition(t,Condition(function MI3))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))set t=CreateTrigger()set MKI=GetHandleId(t)set u=(DYI[GetPlayerId(GetOwningPlayer((TLI)))])call IssueImmediateOrder(u,"stop")set x=GetUnitX(u)set y=GetUnitY(u)set QHI=CreateUnit(GetOwningPlayer(TLI),1747990362,x,y,0)call SetUnitTimeScale(QHI,2.5)call UnitApplyTimedLife(QHI,1112820806,2)set QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,x,y,0)call QTI(QHI,1093747001)call SetUnitAbilityLevel(QHI,1093747001,GetUnitAbilityLevel(TLI,1093747009))call IssueImmediateOrder(QHI,"stomp")call GroupEnumUnitsInRange(g,x,y,500,Condition(function AK1))set D7I=3call ForGroup(g,function M13)call MCI(g)call TriggerRegisterTimerEvent(t,0.65,false)call TriggerAddCondition(t,Condition(function MI3))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))call SetUnitAnimationByIndex(u,3)endifset t=nullset TLI=nullset QHI=nullset g=nullendfunctionfunction M23 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit QP1=(LoadUnitHandle(XY,(MKI),(335)))local boolean M33=(LoadBoolean(XY,(MKI),(336)))if GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST thencall SaveInteger(XY,(GetHandleId((TLI))),((4269)),(2))call SaveBoolean(XY,(GetHandleId(QP1)),(337),(true))if M33 thencall ShowUnit(QP1,false)call KillUnit(QP1)elsecall ShowUnit(QP1,false)call UnitRemoveAbility(QP1,1097625443)call ShowUnit(QP1,true)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)elseif M33 thencall SetUnitFacing(QP1,GetUnitFacing(TLI))endifendifset t=nullset QP1=nullreturn falseendfunctionfunction M43 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local unit QP1local boolean KillImagecall SaveBoolean(XY,(MKI),(336),(false))if((LoadInteger(XY,(GetHandleId((TLI))),((4270))))==1)==false thencall SaveBoolean(XY,(MKI),(336),(true))set QP1=CreateUnit(GetOwningPlayer(TLI),1747990357,GetUnitX(TLI),GetUnitY(TLI),GetUnitFacing(TLI))call QTI(QP1,1097625443)call QTI(QP1,1097167980)call SetUnitPosition(QP1,GetUnitX(TLI),GetUnitY(TLI))call SetUnitScale(QP1,1.4,1.4,1.4)elseset QP1=(DYI[GetPlayerId(GetOwningPlayer((TLI)))])call UnitAddAbility(QP1,1097625443)endifcall IssueImmediateOrder(QP1,"stop")call SaveInteger(XY,(GetHandleId((TLI))),((4269)),(1))call SetUnitAnimation(QP1,"spell slam")call QueueUnitAnimation(QP1,"spell slam")call SaveUnitHandle(XY,(MKI),(335),(QP1))call SaveUnitHandle(XY,(MKI),(2),(TLI))call TriggerRegisterTimerEvent(t,0.1,true)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_ENDCAST)call TriggerAddCondition(t,Condition(function M23))call SaveUnitHandle(XY,(MKI),(335),(QP1))set t=nullset TLI=nullset QP1=nullendfunctionfunction M53 takes nothing returns booleanlocal integer A3Oif GetSpellAbilityId()==1093747009 thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_FINISH thencall MO3()elsecall M43()endifendifreturn falseendfunctionfunction SB1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_FINISH)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function M53))set t=nullendfunctionfunction M63 takes nothing returns nothingif A61(GetEnumUnit())thenreturnendifif GetUnitAbilityLevel(GetEnumUnit(),1093747521)>0 thencall UnitRemoveAbility(GetEnumUnit(),1093747521)call UnitRemoveAbility(GetEnumUnit(),1110458960)endifif GetUnitAbilityLevel(GetEnumUnit(),1093747513)>0 thencall UnitRemoveAbility(GetEnumUnit(),1093747513)call UnitRemoveAbility(GetEnumUnit(),1110458960)endifif GetUnitAbilityLevel(GetEnumUnit(),1093747522)>0 thencall UnitRemoveAbility(GetEnumUnit(),1093747522)call UnitRemoveAbility(GetEnumUnit(),1110458960)endifif GetUnitAbilityLevel(GetEnumUnit(),1093747523)>0 thencall UnitRemoveAbility(GetEnumUnit(),1093747523)call UnitRemoveAbility(GetEnumUnit(),1110458960)endifcall ES1(GetEnumUnit(),0)endfunctionfunction M73 takes nothing returns nothingif A61(GetEnumUnit())thenreturnendifif D9I==1 thenif GetUnitAbilityLevel(GetEnumUnit(),1093747521)==0 thencall QTI(GetEnumUnit(),1093747521)endifelseif D9I==2 thenif GetUnitAbilityLevel(GetEnumUnit(),1093747513)==0 thencall QTI(GetEnumUnit(),1093747513)endifelseif D9I==3 thenif GetUnitAbilityLevel(GetEnumUnit(),1093747522)==0 thencall QTI(GetEnumUnit(),1093747522)endifelseif D9I==4 thenif GetUnitAbilityLevel(GetEnumUnit(),1093747523)==0 thencall QTI(GetEnumUnit(),1093747523)endifendifif IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)==true thencall ES1(GetEnumUnit(),R2I((I2R(GetHeroAgi(GetEnumUnit(),true))/7)*I2R(D9I)/4))endifendfunctionfunction M83 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local group M93=(LoadGroupHandle(XY,(MKI),(340)))local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)local group g=MDI()local group g2if TLI==null or GetUnitTypeId(TLI)!=1328558389 thencall FlushChildHashtable(XY,(MKI))call MZI(t)call MCI(M93)call MCI(g)return falseendifset CK=TLIset D9I=GetUnitAbilityLevel(TLI,1093747524)call GroupEnumUnitsInRange(g,x,y,300,Condition(function AT1))if((LoadInteger(XY,(GetHandleId((TLI))),((4270))))==1)==true thenset g2=MDI()call GroupEnumUnitsInRange(g2,GetUnitX((DYI[GetPlayerId(GetOwningPlayer((TLI)))])),GetUnitY((DYI[GetPlayerId(GetOwningPlayer((TLI)))])),300,Condition(function AT1))call GroupAddGroup(g2,g)call MCI(g2)set g2=nullendifcall GroupRemoveGroup(g,M93)call ForGroup(M93,function M63)if QPI(TLI)==false thencall ForGroup(g,function M73)endifcall SaveGroupHandle(XY,(MKI),(340),(g))call MCI(M93)set t=nullset TLI=nullset M93=nullreturn falseendfunctionfunction MA3 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local integer ilocal player pcall QTI(TLI,1093747537)call TriggerRegisterTimerEvent(t,0.3,true)call TriggerAddCondition(t,Condition(function M83))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveGroupHandle(XY,(MKI),(340),(MDI()))call SaveTriggerHandle(XY,(GetHandleId(TLI)),(338),(t))call SaveBoolean(XY,(GetHandleId(TLI)),(339),(true))set i=0loopexitwhen i>5set p=BO[i]call SetPlayerAbilityAvailable(p,1093747521,false)call SetPlayerAbilityAvailable(p,1093747513,false)call SetPlayerAbilityAvailable(p,1093747522,false)call SetPlayerAbilityAvailable(p,1093747523,false)set p=CO[i]call SetPlayerAbilityAvailable(p,1093747521,false)call SetPlayerAbilityAvailable(p,1093747513,false)call SetPlayerAbilityAvailable(p,1093747522,false)call SetPlayerAbilityAvailable(p,1093747523,false)set i=i+1endloopset t=nullset TLI=nullendfunctionfunction MB3 takes nothing returns booleanif GetLearnedSkill()==1093747524 and GetUnitAbilityLevel(GetTriggerUnit(),1093747524)==1 and IsUnitIllusion(GetTriggerUnit())==false thencall MA3()endifreturn falseendfunctionfunction SA1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function MB3))set t=nullendfunctionfunction MC3 takes nothing returns nothinglocal real x1=DCIlocal real y1=DDIlocal real x2=DEIlocal real y2=DFIlocal real x3=GetUnitX(GetEnumUnit())local real y3=GetUnitY(GetEnumUnit())local real u=((x3-x1)*(x2-x1)+(y3-y1)*(y2-y1))/((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))local real x4=x1+u*(x2-x1)local real y4=y1+u*(y2-y1)local real G43=GetUnitState(GetEnumUnit(),UNIT_STATE_MAX_LIFE)*0.35/2if IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)==true thencall SetUnitPosition(GetEnumUnit(),x4,y4)elsecall SetUnitX(GetEnumUnit(),x4)call SetUnitY(GetEnumUnit(),y4)endifcall IssueTargetOrder(DAI,"slow",GetEnumUnit())call TKI(DBI,GetEnumUnit(),1,G43)call TKI(DBI,GetEnumUnit(),2,G43)endfunctionfunction MD3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real x0=(LoadReal(XY,(MKI),(282)))local real y0=(LoadReal(XY,(MKI),(283)))local real a0=(LoadReal(XY,(MKI),(341)))local integer i=0local real xlocal real ylocal group g=MDI()local group SP2=MDI()local integer NGI=GetUnitAbilityLevel(TLI,1093746993)local integer JNO=(LoadInteger(XY,(MKI),(34)))call FlushChildHashtable(XY,(MKI))call MZI(t)set CK=TLIset DBI=TLIset DAI=CreateUnit(GetOwningPlayer(TLI),1697656901,x0,y0,0)call QTI(DAI,1093747525)call SetUnitAbilityLevel(DAI,1093747525,NGI)loopexitwhen i>JNOset x=x0+i*200*Cos(a0)set y=y0+i*200*Sin(a0)call PMI("Abilities\\Spells\\Orc\\EarthQuake\\EarthQuakeTarget.mdl",x,y,1.6)call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",x,y-250))call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",x,y))call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",x+250,y))call QEI(x,y,300)call GroupEnumUnitsInRange(g,x,y,325,Condition(function AT1))call GroupAddGroup(g,SP2)call GroupClear(g)set i=i+1endloopset DCI=x0set DDI=y0set DEI=xset DFI=ycall ForGroup(SP2,function MC3)call MCI(SP2)call MCI(g)set t=nullset TLI=nullreturn falseendfunctionfunction ME3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real a=(LoadReal(XY,(MKI),(137)))local real x0=(LoadReal(XY,(MKI),(282)))local real y0=(LoadReal(XY,(MKI),(283)))local real a0local real MF3local real MG3local real MH3local real MZ3local real MV3local real MW3local real MX3local real MY3local real MJ3local real MK3local real ML3local real MM3local real xlocal real ylocal ubersplat OD1local integer MFI=GetTriggerEvalCount(t)local integer JNO=(LoadInteger(XY,(MKI),(34)))set x=x0+200*MFI*Cos(a)set y=y0+200*MFI*Sin(a)set OD1=CreateUbersplat(x,y,"THNE",255,255,255,255,false,false)call SetUbersplatRenderAlways(OD1,true)set MF3=x+250*Cos(bj_DEGTORAD*(a*bj_RADTODEG-45))set MG3=y+250*Sin(bj_DEGTORAD*(a*bj_RADTODEG-45))set MH3=x+250*Cos(bj_DEGTORAD*(a*bj_RADTODEG+45))set MZ3=y+250*Sin(bj_DEGTORAD*(a*bj_RADTODEG+45))set MV3=x-125*Cos(bj_DEGTORAD*(a*bj_RADTODEG-45))set MW3=y-125*Sin(bj_DEGTORAD*(a*bj_RADTODEG-45))set MX3=x-125*Cos(bj_DEGTORAD*(a*bj_RADTODEG+45))set MY3=y-125*Sin(bj_DEGTORAD*(a*bj_RADTODEG+45))set MJ3=xset MK3=yset ML3=xset MM3=ycall QJI(GetOwningPlayer(TLI),4,x,y,500)call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",MF3,MG3))call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",MH3,MZ3))call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",MV3,MW3))call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",MX3,MY3))call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",MJ3,MK3))call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",ML3,MM3))if GetTriggerEvalCount(t)>JNO thenset x0=(LoadReal(XY,(MKI),(282)))set y0=(LoadReal(XY,(MKI),(283)))set a0=(LoadReal(XY,(MKI),(341)))call FlushChildHashtable(XY,(MKI))call MZI(t)set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.5,false)call TriggerAddCondition(t,Condition(function MD3))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(282),((x0)*1.0))call SaveReal(XY,(MKI),(283),((y0)*1.0))call SaveReal(XY,(MKI),(341),((a0)*1.0))call SaveInteger(XY,(MKI),(34),(JNO))endifset t=nullset TLI=nullreturn falseendfunctionfunction MN3 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local location l=GetSpellTargetLoc()local real x=GetLocationX(l)local real y=GetLocationY(l)local real a=Atan2(y-GetUnitY(TLI),x-GetUnitX(TLI))local real d=PAI(x,y,GetUnitX(TLI),GetUnitY(TLI))local integer JNO=11call TriggerRegisterTimerEvent(t,0.22,true)call TriggerAddCondition(t,Condition(function ME3))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(6),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(7),((GetUnitY(TLI))*1.0))call SaveReal(XY,(MKI),(137),((a)*1.0))call SaveReal(XY,(MKI),(282),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(283),((GetUnitY(TLI))*1.0))call SaveReal(XY,(MKI),(341),((a)*1.0))call SaveInteger(XY,(MKI),(34),(JNO))set t=nullset TLI=nullendfunctionfunction MS3 takes nothing returns booleanif GetSpellAbilityId()==1093746993 thencall MN3()endifreturn falseendfunctionfunction S81 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function MS3))set t=nullendfunctionfunction MT3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))call UnitRemoveAbility(TLI,1093815881)call UnitAddAbility(TLI,1093815881)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullreturn falseendfunctionfunction MR3 takes unit TLI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function MT3))call SaveUnitHandle(XY,(MKI),(2),(TLI))set t=nullendfunctionfunction MP3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)call EW1(TLI,0)set t=nullset TLI=nullreturn falseendfunctionfunction MQ3 takes unit TLI,unit QP1,unit MU3,integer N03,integer NI3 returns nothinglocal trigger tlocal integer MKIlocal unit QHIcall DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AbsorbMana\\AbsorbManaBirthMissile.mdl",QP1,"chest"))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AbsorbMana\\AbsorbManaBirthMissile.mdl",TLI,"chest"))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AbsorbMana\\AbsorbManaBirthMissile.mdl",TLI,"origin"))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AbsorbMana\\AbsorbManaBirthMissile.mdl",TLI,"hand,left"))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AbsorbMana\\AbsorbManaBirthMissile.mdl",TLI,"hand,right"))call ShowUnit(QP1,false)call KillUnit(QP1)call KillUnit(MU3)call SaveInteger(XY,(GetHandleId((TLI))),((4270)),(2))if NI3>0 or N03>0 thenset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,9.1,false)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function MP3))call SaveUnitHandle(XY,(MKI),(2),(TLI))set QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TLI),GetUnitY(TLI),0)call QTI(QHI,1093748537)call SetUnitAbilityLevel(QHI,1093748537,NI3)call IssueTargetOrder(QHI,"bloodlust",TLI)call EW1(TLI,N03)call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("war3mapImported\\RadianceHands.mdx",TLI,"weapon")))endifset t=nullset QHI=nullendfunctionfunction N13 takes nothing returns nothingif IsUnitInGroup(GetEnumUnit(),DGI)==false thenif IsUnitIllusion(GetEnumUnit())==false thenif IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)==true thenset DWI=DWI+(DVI*10)set DXI=DXI+5elseset DWI=DWI+(DVI*3)set DXI=DXI+1endifendifcall GroupAddUnit(DGI,GetEnumUnit())call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AbsorbMana\\AbsorbManaBirthMissile.mdl",GetEnumUnit(),"chest"))set DJI=trueset DKI=truecall TKI(DHI,GetEnumUnit(),1,DZI)set DJI=falseset DKI=falseendifendfunctionfunction NO3 takes real N23,real N33,real N43,real N53,real N63,real N73 returns reallocal real N83local real N93local real NA3local real NB3local real NC3local real ND3local real NE3local real REFLECTED_SCALED_V_Xlocal real REFLECTED_SCALED_V_Ylocal real NF3local real NG3local real NH3local real NZ3local real NV3local real NW3local real NX3local real NY3set NH3=N43-N63set NZ3=N53-N73set NV3=-1*NZ3set NW3=NH3set NX3=SquareRoot(NV3*NV3+NW3*NW3)set NV3=NV3/NX3set NW3=NW3/NX3set N83=N23-N43set N93=N33-N53set NA3=SquareRoot(N83*N83+N93*N93)set NB3=N83/NA3set NC3=N93/NA3set NY3=N83*NV3+N93*NW3set ND3=-1*N23+2*N43+2*NV3*NY3set NE3=-1*N33+2*N53+2*NW3*NY3set NF3=N63+N43-ND3set NG3=N73+N53-NE3return NF3endfunctionfunction NJ3 takes real N23,real N33,real N43,real N53,real N63,real N73 returns reallocal real N83local real N93local real NA3local real NB3local real NC3local real ND3local real NE3local real REFLECTED_SCALED_V_Xlocal real REFLECTED_SCALED_V_Ylocal real NF3local real NG3local real NH3local real NZ3local real NV3local real NW3local real NX3local real NY3set NH3=N43-N63set NZ3=N53-N73set NV3=-1*NZ3set NW3=NH3set NX3=SquareRoot(NV3*NV3+NW3*NW3)set NV3=NV3/NX3set NW3=NW3/NX3set N83=N23-N43set N93=N33-N53set NA3=SquareRoot(N83*N83+N93*N93)set NB3=N83/NA3set NC3=N93/NA3set NY3=N83*NV3+N93*NW3set ND3=-1*N23+2*N43+2*NV3*NY3set NE3=-1*N33+2*N53+2*NW3*NY3set NF3=N63+N43-ND3set NG3=N73+N53-NE3return NG3endfunctionfunction NK3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit QP1=(LoadUnitHandle(XY,(MKI),(335)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local real x0=(LoadReal(XY,(MKI),(282)))local real y0=(LoadReal(XY,(MKI),(283)))local real x1=GetUnitX(TLI)local real y1=GetUnitY(TLI)local real x2=GetUnitX(QP1)local real y2=GetUnitY(QP1)local real x3local real y3local real alocal group SP2=(LoadGroupHandle(XY,(MKI),(187)))local group glocal real dlocal integer NGI=GetUnitAbilityLevel(TLI,1093747000)local real NL3=(LoadReal(XY,(MKI),(342)))local real F21=(TimerGetElapsed(M))call SetUnitX(QHI,GetUnitX(QP1))call SetUnitY(QHI,GetUnitY(QP1))if GetTriggerEventId()==EVENT_UNIT_DEATH thencall MCI(SP2)call FlushChildHashtable(XY,(MKI))call MZI(t)call ShowUnit(QP1,false)call KillUnit(QP1)call KillUnit(QHI)call SaveInteger(XY,(GetHandleId((TLI))),((4270)),(2))if(LoadInteger(XY,(GetHandleId(TLI)),(704)))==0 or(LoadInteger(XY,(GetHandleId(TLI)),(704)))==1093747000 thencall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093747000,true)endifcall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093815881,false)elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT thenif GetSpellAbilityId()==1093815881 thencall IssueImmediateOrder(QP1,"stop")call SaveBoolean(XY,(MKI),(249),(true))call SetUnitAnimationByIndex(QP1,3)call MR3(GetTriggerUnit())elseif GetSpellAbilityId()==1093815371 thenif IssueImmediateOrder(TLI,"charm")thencall UnitRemoveAbility(QP1,1093815371)endifendifelseif PAI(x1,y1,x2,y2)<100 thencall MQ3(TLI,QP1,QHI,(LoadInteger(XY,(MKI),(344))),(LoadInteger(XY,(MKI),(345))))call MCI(SP2)call FlushChildHashtable(XY,(MKI))call MZI(t)if(LoadInteger(XY,(GetHandleId(TLI)),(704)))==0 or(LoadInteger(XY,(GetHandleId(TLI)),(704)))==1093747000 thencall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093747000,true)endifcall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093815881,false)elseif GetTriggerEvalCount(t)>400 or(LoadBoolean(XY,(MKI),(249)))==true thencall QTI(QP1,1097625443)if GetTriggerEvalCount(t)==401 and(LoadBoolean(XY,(MKI),(249)))==false thencall IssueImmediateOrder(QP1,"stop")call SetUnitAnimationByIndex(QP1,3)endifset g=MDI()set DVI=NGIset DWI=(LoadInteger(XY,(MKI),(344)))set DXI=(LoadInteger(XY,(MKI),(345)))set DZI=20+40*NGIset DHI=TLIset CK=TLIset DGI=SP2call GroupEnumUnitsInRange(g,GetUnitX(QP1),GetUnitY(QP1),300,Condition(function AT1))call ForGroup(g,function N13)call MCI(g)set g=nullcall SaveInteger(XY,(MKI),(344),(DWI))call SaveInteger(XY,(MKI),(345),(DXI))if((LoadInteger(XY,(GetHandleId((TLI))),((4269))))==1)==false thenset a=Atan2(y1-y2,x1-x2)call SetUnitFacing(QP1,a*bj_RADTODEG)set x3=GetUnitX(QP1)+12*Cos(a)set y3=GetUnitY(QP1)+12*Sin(a)call SetUnitX(QP1,RCI(x3))call SetUnitY(QP1,RGI(y3))call SaveReal(XY,(MKI),(282),((x1)*1.0))call SaveReal(XY,(MKI),(283),((y1)*1.0))endifelsecall SetUnitMoveSpeed(QP1,GetUnitMoveSpeed(TLI))call UnitRemoveAbility(QP1,1097625443)set g=MDI()set DVI=NGIset DWI=(LoadInteger(XY,(MKI),(344)))set DXI=(LoadInteger(XY,(MKI),(345)))set DZI=20+40*NGIset DHI=TLIset CK=TLIset DGI=SP2call GroupEnumUnitsInRange(g,GetUnitX(QP1),GetUnitY(QP1),300,Condition(function AT1))call ForGroup(g,function N13)call MCI(g)set g=nullcall SaveInteger(XY,(MKI),(344),(DWI))call SaveInteger(XY,(MKI),(345),(DXI))if x0!=x1 or y0!=y1 thenset NL3=F21call SaveReal(XY,(MKI),(342),((NL3)*1.0))endifif((LoadInteger(XY,(GetHandleId((TLI))),((4269))))==1)==false thenif NL3==F21 thenset x3=NO3(x0,y0,x1,y1,x2,y2)set y3=NJ3(x0,y0,x1,y1,x2,y2)set a=Atan2(y3-y2,x3-x2)*bj_RADTODEGcall SaveReal(XY,(MKI),(282),((x1)*1.0))call SaveReal(XY,(MKI),(283),((y1)*1.0))endifif(NL3+0.3)<F21 thencall SaveInteger(XY,(MKI),(343),(1))elseif(NL3+0.3)>F21 and(LoadInteger(XY,(MKI),(343)))==1 thencall SaveInteger(XY,(MKI),(343),(2))elseif(LoadInteger(XY,(MKI),(343)))==3 thencall SaveInteger(XY,(MKI),(343),(1))endifelsecall SaveInteger(XY,(MKI),(343),(3))endifendifset t=nullset TLI=nullset QP1=nullset SP2=nullset QHI=nullreturn falseendfunctionfunction NM3 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local real x0=GetUnitX(TLI)local real y0=GetUnitY(TLI)local location l=GetSpellTargetLoc()local real lx=GetLocationX(l)local real ly=GetLocationY(l)local real a=Atan2(ly-y0,lx-x0)local real d=RQI(PAI(x0,y0,lx,ly),300)local real x1=RCI(x0+d*Cos(a))local real y1=RGI(y0+d*Sin(a))local unit QP1=CreateUnit(GetOwningPlayer(TLI),1747990357,x1,y1,(a*bj_RADTODEG)-180)local unit QHI=CreateUnit(GetOwningPlayer(TLI),1865429572,x1,y1,(a*bj_RADTODEG)-180)call SetUnitMoveSpeed(QP1,GetUnitMoveSpeed(TLI))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AbsorbMana\\AbsorbManaBirthMissile.mdl",QP1,"chest"))if GetUnitAbilityLevel(TLI,1093747524)>0 thencall QTI(QP1,1093747537)endifif GetUnitAbilityLevel(TLI,1093747009)==0 thencall UnitRemoveAbility(QP1,1093815371)endifcall UnitAddAbility(TLI,1093815881)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093747000,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093815881,true)call RemoveLocation(l)set DYI[GetPlayerId(GetOwningPlayer(TLI))]=QP1call SaveInteger(XY,(GetHandleId((TLI))),((4270)),(1))call QTI(QP1,1098282348)call QTI(QP1,1097167980)if(LoadBoolean(XY,(GetHandleId(TLI)),(339)))==true thencall TriggerEvaluate((LoadTriggerHandle(XY,(MKI),(338))))endifcall TriggerRegisterTimerEvent(t,0.02,true)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)call TriggerRegisterUnitEvent(t,QP1,EVENT_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function NK3))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(335),(QP1))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveReal(XY,(MKI),(282),((x0)*1.0))call SaveReal(XY,(MKI),(283),((y0)*1.0))call SaveGroupHandle(XY,(MKI),(187),(MDI()))call SaveInteger(XY,(MKI),(343),(2))call SaveReal(XY,(MKI),(342),(((TimerGetElapsed(M))-5)*1.0))call SaveBoolean(XY,(MKI),(249),(false))set t=nullset TLI=nullset QP1=nullset QHI=nullendfunctionfunction NN3 takes nothing returns booleanif GetSpellAbilityId()==1093747000 thencall NM3()endifreturn falseendfunctionfunction S91 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function NN3))call RVI(1093748537)set t=nullendfunctionfunction NS3 takes nothing returns nothinglocal unit TMI=GetOrderTargetUnit()local real xlocal real yif GetTriggerEventId()==EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER thenset x=GetUnitX(GetOrderTargetUnit())set y=GetUnitY(GetOrderTargetUnit())elseset x=GetOrderPointX()set y=GetOrderPointY()endifif PAI(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),x,y)<700 thencall QWI(ZE,x,y)endifendfunctionfunction NT3 takes nothing returns booleanif GetIssuedOrderId()==852040 thencall NS3()endifreturn falseendfunctionfunction NR3 takes nothing returns nothinglocal trigger t=CreateTrigger()call TriggerRegisterPlayerUnitEvent(t,GetOwningPlayer(GetTriggerUnit()),EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER,Condition(function Q8I))call TriggerRegisterPlayerUnitEvent(t,GetOwningPlayer(GetTriggerUnit()),EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER,Condition(function Q8I))call TriggerAddCondition(t,Condition(function NT3))set t=nullendfunctionfunction NP3 takes nothing returns booleanif GetLearnedSkill()==1093678658 and GetUnitAbilityLevel(GetTriggerUnit(),1093678658)==1 and IsUnitIllusion(GetTriggerUnit())==false thencall NR3()endifreturn falseendfunctionfunction XN1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function NP3))set t=nullendfunctionfunction NQ3 takes nothing returns booleanreturn(GetLearnedSkill()==1093681483 or GetLearnedSkill()==1093748313)and IsUnitIllusion(GetTriggerUnit())==falseendfunctionfunction NU3 takes nothing returns nothingif(GetUnitAbilityLevel(GetTriggerUnit(),1093681483)==1 or GetUnitAbilityLevel(GetTriggerUnit(),1093748313)==1)thencall QTI(GetTriggerUnit(),1093752646)endifendfunctionfunction XK1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function NQ3))call TriggerAddAction(t,function NU3)endfunctionfunction S03 takes nothing returns booleanif(GetSpellAbilityId()==1093681485 or GetSpellAbilityId()==1093681459 or GetSpellAbilityId()==1093681460 or GetSpellAbilityId()==1093677652 or GetSpellAbilityId()==1093748314 or GetSpellAbilityId()==1093752646)thenreturn trueelseif GetSpellAbilityId()==1093681483 or GetSpellAbilityId()==1093748313 thenif GetUnitAbilityLevel(GetTriggerUnit(),1093752646)==0 thencall QTI(GetTriggerUnit(),1093752646)endifendifreturn falseendfunctionfunction SI3 takes nothing returns booleanif(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))==true)thenif(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false)thenif(GetUnitAbilityLevelSwapped(1093678162,GetFilterUnit())==0)thenreturn trueendifendifendifreturn falseendfunctionfunction S13 takes nothing returns nothingcall IssueImmediateOrder(GetEnumUnit(),"locustswarm")endfunctionfunction SO3 takes nothing returns nothingcall UnitDamageTargetBJ(GetTriggerUnit(),GetEnumUnit(),300.00,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE)endfunctionfunction S23 takes nothing returns nothingcall UnitDamageTargetBJ(GetTriggerUnit(),GetEnumUnit(),450.00,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE)endfunctionfunction S33 takes nothing returns nothingcall UnitDamageTargetBJ(GetTriggerUnit(),GetEnumUnit(),600.00,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE)endfunctionfunction S43 takes nothing returns nothingcall UnitDamageTargetBJ(GetTriggerUnit(),GetEnumUnit(),750.00,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE)endfunctionfunction S53 takes nothing returns booleanreturn GetOwningPlayer(GetFilterUnit())==DNI and GetUnitTypeId(GetFilterUnit())==DMI and QPI(GetFilterUnit())==falseendfunctionfunction S63 takes player p,integer SVI,real x,real y returns nothinglocal group g=MDI()set DNI=pset DMI=SVIcall GroupEnumUnitsInRange(g,x,y,716,Condition(function S53))call ForGroup(g,function S13)call MCI(g)set g=nullendfunctionfunction S73 takes nothing returns nothinglocal real x=GetUnitX(GetTriggerUnit())local real y=GetUnitY(GetTriggerUnit())local group GK1call DisableTrigger(DLI)set FN=trueif(GetSpellAbilityId()==1093681485)thencall PMI("Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl",x,y,5)call QJI(GetOwningPlayer(GetTriggerUnit()),3,x,y,500)set GK1=MDI()call GroupEnumUnitsInRange(GK1,x,y,425,Condition(function SI3))call ForGroup(GK1,function SO3)call RemoveUnit(GetTriggerUnit())call MCI(GK1)endifif(GetSpellAbilityId()==1093681459)thencall PMI("Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl",x,y,5)call QJI(GetOwningPlayer(GetTriggerUnit()),3,x,y,500)set GK1=MDI()call GroupEnumUnitsInRange(GK1,x,y,435,Condition(function SI3))call ForGroup(GK1,function S23)call RemoveUnit(GetTriggerUnit())call MCI(GK1)endifif(GetSpellAbilityId()==1093681460)thencall PMI("Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl",x,y,5)call QJI(GetOwningPlayer(GetTriggerUnit()),3,x,y,500)set GK1=MDI()call GroupEnumUnitsInRange(GK1,x,y,450,Condition(function SI3))call ForGroup(GK1,function S33)call RemoveUnit(GetTriggerUnit())call MCI(GK1)endifif(GetSpellAbilityId()==1093748314)thencall PMI("Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl",x,y,5)call QJI(GetOwningPlayer(GetTriggerUnit()),3,x,y,500)set GK1=MDI()call GroupEnumUnitsInRange(GK1,x,y,450,Condition(function SI3))call ForGroup(GK1,function S43)call RemoveUnit(GetTriggerUnit())call MCI(GK1)endifif(GetSpellAbilityId()==1093677652)thenset GK1=MDI()set bj_groupEnumTypeId=1865429304call GroupEnumUnitsOfPlayer(GK1,GetOwningPlayer(GetTriggerUnit()),filterGetUnitsOfPlayerAndTypeId)call ForGroup(GK1,function S13)call MCI(GK1)set GK1=MDI()set bj_groupEnumTypeId=1865429042call GroupEnumUnitsOfPlayer(GK1,GetOwningPlayer(GetTriggerUnit()),filterGetUnitsOfPlayerAndTypeId)call ForGroup(GK1,function S13)call MCI(GK1)set GK1=MDI()set bj_groupEnumTypeId=1865429058call GroupEnumUnitsOfPlayer(GK1,GetOwningPlayer(GetTriggerUnit()),filterGetUnitsOfPlayerAndTypeId)call ForGroup(GK1,function S13)call MCI(GK1)set GK1=MDI()set bj_groupEnumTypeId=1865429314call GroupEnumUnitsOfPlayer(GK1,GetOwningPlayer(GetTriggerUnit()),filterGetUnitsOfPlayerAndTypeId)call ForGroup(GK1,function S13)call MCI(GK1)endifif(GetSpellAbilityId()==1093752646)thenset x=GetSpellTargetX()set y=GetSpellTargetY()call S63(GetOwningPlayer(GetTriggerUnit()),1865429304,x,y)call S63(GetOwningPlayer(GetTriggerUnit()),1865429042,x,y)call S63(GetOwningPlayer(GetTriggerUnit()),1865429058,x,y)call S63(GetOwningPlayer(GetTriggerUnit()),1865429314,x,y)endifset FN=falsecall EnableTrigger(DLI)endfunctionfunction S83 takes nothing returns nothinglocal integer id=GetUnitTypeId(GetTriggerUnit())local real x=GetUnitX(GetTriggerUnit())local real y=GetUnitY(GetTriggerUnit())local group GK1if id==1865429304 thencall PMI("Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl",x,y,5)set GK1=MDI()call GroupEnumUnitsInRange(GK1,x,y,425,Condition(function SI3))call ForGroup(GK1,function SO3)call MCI(GK1)endifif id==1865429042 thencall PMI("Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl",x,y,5)set GK1=MDI()call GroupEnumUnitsInRange(GK1,x,y,435,Condition(function SI3))call ForGroup(GK1,function S23)call MCI(GK1)endifif id==1865429058 thencall PMI("Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl",x,y,5)set GK1=MDI()call GroupEnumUnitsInRange(GK1,x,y,450,Condition(function SI3))call ForGroup(GK1,function S33)call MCI(GK1)endifif id==1865429314 thencall PMI("Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl",x,y,5)set GK1=MDI()call GroupEnumUnitsInRange(GK1,x,y,450,Condition(function SI3))call ForGroup(GK1,function S43)call MCI(GK1)endifendfunctionfunction S93 takes nothing returns booleanlocal integer id=GetUnitTypeId(GetTriggerUnit())if id==1865429304 or id==1865429042 or id==1865429058 or id==1865429314 thencall S83()endifreturn falseendfunctionfunction XL1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddAction(t,function S73)call TriggerAddCondition(t,Condition(function S03))call O91("Units\\Creeps\\GoblinSapper\\GoblinSapperYesAttack1.wav")set DLI=CreateTrigger()call Q9I(DLI,EVENT_PLAYER_UNIT_DEATH)call TriggerAddCondition(DLI,Condition(function S93))endfunctionfunction SA3 takes nothing returns booleanif GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>0.5 and(GetUnitTypeId(GetFilterUnit())==1848651855 or GetUnitTypeId(GetFilterUnit())==1848651856 or GetUnitTypeId(GetFilterUnit())==1848651857 or GetUnitTypeId(GetFilterUnit())==1848651854)thenset DSI=DSI+1endifreturn falseendfunctionfunction SB3 takes nothing returns booleanlocal group g=MDI()set DSI=0call GroupEnumUnitsOfPlayer(g,GetTriggerPlayer(),Condition(function SA3))if DSI>0 thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10.00,GetObjectName(1848657475)+": "+I2S(DSI))endifcall MCI(g)set g=nullreturn falseendfunctionfunction SC3 takes nothing returns booleanif((GetUnitTypeId(GetTriggerUnit())==1848651855))thenreturn trueendifif((GetUnitTypeId(GetTriggerUnit())==1848651856))thenreturn trueendifif((GetUnitTypeId(GetTriggerUnit())==1848651857))thenreturn trueendifif((GetUnitTypeId(GetTriggerUnit())==1848651854))thenreturn trueendifif GetUnitTypeId(GetTriggerUnit())==1865429304 or GetUnitTypeId(GetTriggerUnit())==1865429042 or GetUnitTypeId(GetTriggerUnit())==1865429058 or GetUnitTypeId(GetTriggerUnit())==1865429314 thenif RI0[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]thenendifendifreturn falseendfunctionfunction SD3 takes nothing returns booleanif GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(GetTriggerUnit())thenif((GetUnitTypeId(GetFilterUnit())==1848651855))thenreturn trueendifif((GetUnitTypeId(GetFilterUnit())==1848651856))thenreturn trueendifif((GetUnitTypeId(GetFilterUnit())==1848651857))thenreturn trueendifif((GetUnitTypeId(GetFilterUnit())==1848651854))thenreturn trueendifendifreturn falseendfunctionfunction SE3 takes nothing returns booleanreturn(GetUnitTypeId(GetFilterUnit())==1211117637 or GetUnitTypeId(GetFilterUnit())==1211117639 or GetUnitTypeId(GetFilterUnit())==1211117638 or GetUnitTypeId(GetFilterUnit())==1160786000 or GetUnitTypeId(GetFilterUnit())==1311780930 or GetUnitTypeId(GetFilterUnit())==1430468144 or GetUnitTypeId(GetFilterUnit())==1162032951 or GetUnitTypeId(GetFilterUnit())==1429221456 or GetUnitTypeId(GetFilterUnit())==1160786510 or GetUnitTypeId(GetFilterUnit())==1160786511 or GetUnitTypeId(GetFilterUnit())==1328558390 or GetUnitTypeId(GetFilterUnit())==1328558391 or GetUnitTypeId(GetFilterUnit())==1160786502 or GetUnitTypeId(GetFilterUnit())==1211122767 or GetUnitTypeId(GetFilterUnit())==1311788343 or GetUnitTypeId(GetFilterUnit())==1311788354 or GetUnitTypeId(GetFilterUnit())==1311788355 or GetUnitTypeId(GetFilterUnit())==1311788367 or GetUnitTypeId(GetFilterUnit())==1311788353 or GetUnitTypeId(GetFilterUnit())==1311788375)and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(CK))endfunctionfunction SF3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit SG3=(LoadUnitHandle(XY,(MKI),(347)))local group gif GetTriggerEventId()==EVENT_UNIT_DEATH thencall DestroyEffect(AddSpecialEffect("war3mapImported\\NewGroundEX.mdx",GetUnitX(SG3),GetUnitY(SG3)))call FlushChildHashtable(XY,(MKI))call MZI(t)elseset g=MDI()set CK=SG3call GroupEnumUnitsInRange(g,GetUnitX(SG3),GetUnitY(SG3),200,Condition(function SE3))if FirstOfGroup(g)!=null thencall FlushChildHashtable(XY,(MKI))call MZI(t)call SetUnitExploded(SG3,true)call KillUnit(SG3)endifcall MCI(g)endifset t=nullset SG3=nullset g=nullreturn falseendfunctionfunction SH3 takes nothing returns nothinglocal integer MKI=GetHandleId(GetOwningPlayer(GetTriggerUnit()))local group GK1=MDI()local integer SZ3=(LoadInteger(XY,(MKI),(346)))local integer SV3=0local unit SW3local integer SX3local unit V11local integer SY3local integer SIIlocal integer S1Ilocal trigger t=CreateTrigger()call GroupEnumUnitsInRect(GK1,bj_mapInitialPlayableArea,Condition(function SD3))call TriggerRegisterTimerEvent(t,0.4,true)call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function SF3))call SaveUnitHandle(XY,(GetHandleId(t)),(347),(GetTriggerUnit()))set SZ3=(SZ3+1)call StartTimerBJ((LoadTimerHandle(XY,(MKI),(1500+SZ3))),false,15000.00)call SaveUnitHandle(XY,(MKI),(1600+SZ3),(GetTriggerUnit()))set SV3=CountUnitsInGroup(GK1)if(SV3>20)thenset SX3=99999set SII=1set S1I=SZ3loopexitwhen SII>S1Iset V11=(LoadUnitHandle(XY,(MKI),(1600+SII)))set SY3=R2I(TimerGetRemaining((LoadTimerHandle(XY,(MKI),(1500+SII)))))if(GetUnitState(V11,UNIT_STATE_LIFE)>0 and SY3<SX3)thenset SW3=V11set SX3=SY3endifset SII=SII+1endloopcall ExplodeUnitBJ(SW3)endifcall SaveInteger(XY,(MKI),(346),(SZ3))call MCI(GK1)endfunctionfunction XM1 takes nothing returns nothinglocal trigger t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,BO[1],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[1],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-st",true)call TriggerAddCondition(t,Condition(function SB3))set t=CreateTrigger()call TriggerRegisterEnterRectSimple(t,GetWorldBounds())call TriggerAddCondition(t,Condition(function SC3))call TriggerAddAction(t,function SH3)set t=nullendfunctionfunction SJ3 takes nothing returns booleanreturn GetSpellAbilityId()==1093678645endfunctionfunction SK3 takes nothing returns nothinglocal integer i=0local unit N0I=GetTriggerUnit()local item F9Olocal integer CN1loopexitwhen i>5set F9O=UnitItemInSlot(N0I,i)set CN1=DH1(F9O)if CN1==GH0 thencall DisableTrigger(L30)set VK=GetItemPlayer(F9O)call RemoveItem(F9O)set FK=DQ1(N0I,FK0[GG0],i)call SetItemPlayer(FK,VK,false)call SetItemUserData(FK,1)call EnableTrigger(L30)endifset i=i+1endloopset N0I=nullset F9O=nullendfunctionfunction SL3 takes nothing returns nothinglocal integer SII=0local integer S1I=5local integer array SM3local player array SN3local integer CN1local item E11call SaveReal(XY,(GetHandleId(GetTriggerUnit())),(785),((0)*1.0))call SK3()set SM3[0]=0set SM3[1]=0set SM3[2]=0set SM3[3]=0set SM3[4]=0set SM3[5]=0call DisableTrigger(L30)loopexitwhen SII>S1Iset CN1=DH1(UnitItemInSlot(GetTriggerUnit(),SII))if CN1==V90 or CN1==VA0 or CN1==VB0 or CN1==VC0 or CN1==VD0 or CN1==VE0 or CN1==VI0 or CN1==VL0 or CN1==VM0 or CN1==VN0 or CN1==ZV0 or CN1==W70 or CN1==WB0 or CN1==XI0 thenset SM3[SII]=GetItemTypeId(UnitItemInSlot(GetTriggerUnit(),SII))set SN3[SII]=GetItemPlayer(UnitItemInSlot(GetTriggerUnit(),SII))call RemoveItem(UnitItemInSlot(GetTriggerUnit(),SII))endifset SII=SII+1endloopcall UnitResetCooldown(GetTriggerUnit())set SII=0set S1I=5loopexitwhen SII>S1Iif SM3[SII]>0 thenset E11=CreateItem(SM3[SII],0,0)call SetItemPlayer(E11,SN3[SII],false)call SetItemUserData(E11,1)call UnitAddItem(GetTriggerUnit(),E11)endifset SII=SII+1endloopcall EnableTrigger(L30)set E11=nullendfunctionfunction XP1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_FINISH)call TriggerAddCondition(t,Condition(function SJ3))call TriggerAddAction(t,function SL3)endfunctionfunction SS3 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local unit QHI=CreateUnit(GetOwningPlayer(N0I),1697656901,GetUnitX(N0I),GetUnitY(N0I),0)local location l=GetSpellTargetLoc()local real x=GetLocationX(l)local real y=GetLocationY(l)local integer i=0local real a=0local real r=0local integer NGI=GetUnitAbilityLevel(N0I,1093681745)call QTI(QHI,1093678406)call SetUnitAbilityLevel(QHI,1093678406,NGI)loopexitwhen i>40exitwhen IssuePointOrder(QHI,"stampede",x+r*Cos(a),y+r*Sin(a))set i=i+1set a=a+0.4set r=r+10endloopcall RemoveLocation(l)set N0I=nullset QHI=nullset l=nullendfunctionfunction ST3 takes nothing returns booleanif GetSpellAbilityId()==1093681745 thencall SS3()endifreturn falseendfunctionfunction XT1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function ST3))set t=nullendfunctionfunction SR3 takes nothing returns booleanreturn(GetSpellAbilityId()==1093678137 or GetSpellAbilityId()==1093818178)and MBI(GetSpellTargetUnit())==falseendfunctionfunction SP3 takes nothing returns nothingcall UnitDamageTarget(GetTriggerUnit(),GetSpellTargetUnit(),GetUnitAbilityLevel(GetTriggerUnit(),GetSpellAbilityId())*80,true,false,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)endfunctionfunction XR1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function SR3))call TriggerAddAction(t,function SP3)endfunctionfunction SQ3 takes nothing returns booleanreturn(T6I(GetFilterUnit())==false and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(CK))and IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))and IsHeroUnitId(GetUnitTypeId(GetFilterUnit()))endfunctionfunction SU3 takes nothing returns nothinglocal unit TLI=CKlocal unit TMI=DKlocal integer NGI=GetUnitAbilityLevel(TLI,1093678405)if NGI==0 thenset NGI=GetUnitAbilityLevel(TLI,1093818177)endifcall TKI(TLI,TMI,1,25+75*NGI)set TLI=nullset TMI=nullendfunctionfunction T03 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=nulllocal group g=MDI()local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)local integer MFI=2if GetUnitAbilityLevel(TLI,1093678405)==0 thenset MFI=4endifset CK=TLIcall GroupEnumUnitsInRange(g,x,y,2500+25,Condition(function SQ3))loopexitwhen FirstOfGroup(g)==null or MFI==0set TMI=OG1(g,x,y)set MFI=MFI-1call GroupRemoveUnit(g,TMI)call U6I(TLI,TMI,1747993940,"SU3",1000,false)endloopcall MCI(g)set g=nullset TMI=nullset TLI=nullendfunctionfunction TI3 takes nothing returns booleanif GetSpellAbilityId()==1093678405 or GetSpellAbilityId()==1093818177 thencall T03()endifreturn falseendfunctionfunction XS1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function TI3))set t=nullendfunctionfunction T13 takes nothing returns nothingif IsUnitType(GetEnumUnit(),UNIT_TYPE_STRUCTURE)==true thencall TKI(DTI,GetEnumUnit(),1,DRI/3)elsecall TKI(DTI,GetEnumUnit(),1,DRI)endifendfunctionfunction TO3 takes unit TLI,real x,real y,real r,real d returns nothinglocal group g=MDI()set CK=TLIcall GroupEnumUnitsInRange(g,x,y,r,Condition(function B21))set DTI=TLIset DRI=dcall ForGroup(g,function T13)call MCI(g)set g=nullendfunctionfunction T23 takes nothing returns booleanif((GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))and T4I(GetFilterUnit())==false and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit()))thenreturn trueendifreturn falseendfunctionfunction T33 takes unit N0I returns unitlocal unit TLI=nulllocal group g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(N0I),GetUnitY(N0I),275,Condition(function T23))call GroupRemoveUnit(g,N0I)set TLI=GroupPickRandomUnit(g)call MCI(g)set CK=TLIset TLI=nullset g=nullreturn CKendfunctionfunction T43 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer MFI=GetTriggerEvalCount(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real x0=(LoadReal(XY,(MKI),(282)))local real y0=(LoadReal(XY,(MKI),(283)))local real x1=GetUnitX(TLI)local real y1=GetUnitY(TLI)local real x2=0local real y2=0local real NN2local real NS2local real NT2local real NR2local real U2Ilocal real U3Ilocal location lif TMI!=null thenset x2=GetUnitX(TMI)set y2=GetUnitY(TMI)endifif TMI==null or PAI(x0,y0,x2,y2)>1000 thenset x2=x0set y2=y0endifset NN2=PUI(x1,y1,x2,y2)set NS2=PAI(x1,y1,x2,y2)set NT2=NS2/IMaxBJ((51-MFI),1)set NR2=(MFI-25)*(MFI-25)set U2I=x1+NT2*Cos(NN2*bj_DEGTORAD)set U3I=y1+NT2*Sin(NN2*bj_DEGTORAD)if MFI<51 thenif T9I(TLI)==false thencall SetUnitFlyHeight(TLI,775-NR2,0)endifcall SetUnitPosition(TLI,U2I,U3I)elseif T9I(TLI)==false thencall SetUnitFlyHeight(TLI,GetUnitDefaultFlyHeight(TLI),0)endifcall PauseUnit(TLI,false)call SetUnitPathing(TLI,true)call SetUnitPosition(TLI,x2,y2)call SaveInteger(XY,(GetHandleId((TLI))),((4268)),(2))set l=Location(x2,y2)call TerrainDeformationRippleBJ(0.2,true,l,1.00,300.00,96.00,1,64.00)call RemoveLocation(l)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl",GetUnitX(TLI),GetUnitY(TLI)))if IsUnitAlly(TLI,GetOwningPlayer(N0I))thenelseif(DB1((N0I),FK0[K90])!=null)thencall TKI(N0I,TLI,1,(0.2+0.15*(GetUnitAbilityLevel(N0I,1093682009)+1))*75*GetUnitAbilityLevel(N0I,1093681754))elsecall TKI(N0I,TLI,1,(0.2+0.15*GetUnitAbilityLevel(N0I,1093682009))*75*GetUnitAbilityLevel(N0I,1093681754))endifendifcall QEI(x2,y2,300)call TO3(N0I,x2,y2,300,75*GetUnitAbilityLevel(N0I,1093681754))call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset N0I=nullset TLI=nullset TMI=nullset l=nullreturn falseendfunctionfunction T53 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local unit TLI=DPIlocal unit TMIlocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real xlocal real ycall SetUnitAnimationByIndex(N0I,4)call PauseUnit(TLI,true)call SetUnitPathing(TLI,false)if T9I(TLI)==false thencall QTI(TLI,1097691750)call UnitRemoveAbility(TLI,1097691750)endifcall SaveInteger(XY,(GetHandleId((TLI))),((4268)),(1))if GetSpellTargetItem()==null thenset TMI=GetSpellTargetUnit()set x=GetUnitX(TMI)set y=GetUnitY(TMI)elseset x=GetItemX(GetSpellTargetItem())set y=GetItemY(GetSpellTargetItem())set TMI=nullendifcall SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("Abilities\\Spells\\Human\\FlakCannons\\FlakTarget.mdl",TLI,"origin")))call SaveReal(XY,(MKI),(282),((x)*1.0))call SaveReal(XY,(MKI),(283),((y)*1.0))call TriggerRegisterTimerEvent(t,0.02,true)call TriggerAddCondition(t,Condition(function T43))set N0I=nullset TLI=nullset TMI=nullset t=nullendfunctionfunction T63 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local unit TLI=T33(N0I)local unit TMI=GetSpellTargetUnit()if GetSpellTargetItem()!=null and OUO(GetItemTypeId(GetSpellTargetItem()))==false thencall R6I(N0I)call R1I(GetOwningPlayer(N0I),GetObjectName(1848659507))endifset DPI=TLIif TLI==null thencall R6I(N0I)call R1I(GetOwningPlayer(N0I),GetObjectName(1848656961))elseif GetOwningPlayer(TMI)==GetOwningPlayer(N0I)thencall R6I(N0I)call R1I(GetOwningPlayer(N0I),GetObjectName(1848656729))endifset N0I=nullset TLI=nullset TMI=nullendfunctionfunction T73 takes nothing returns booleanif GetSpellAbilityId()==1093681754 thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_CAST thencall T63()elsecall T53()endifendifreturn falseendfunctionfunction Y01 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function T73))set t=nullendfunctionfunction T83 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()call OZ1(1093815115)endfunctionfunction T93 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer TA3=(LoadInteger(XY,(MKI),(375)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer MFIif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamageSource()==TLI and GetEventDamage()>20 thenset MFI=(LoadInteger(XY,(GetHandleId(TLI)),(674)))if((LoadInteger(XY,(GetHandleId((TLI))),((4297))))==1)==false thencall MPI(TLI,4297,0.1)call SaveInteger(XY,(GetHandleId(TLI)),(674),(MFI+1))endifcall FlushChildHashtable(XY,(MKI))call MZI(t)endifelsecall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullreturn falseendfunctionfunction TB3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local trigger t2local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer MFI=(LoadInteger(XY,(GetHandleId(TLI)),(674)))if GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED and MFI<6 thenif GetAttacker()==TLI and((LoadInteger(XY,(GetHandleId((TLI))),((4297))))==1)==false thenset t2=CreateTrigger()call TriggerRegisterUnitEvent(t2,GetTriggerUnit(),EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t2,1,false)call TriggerAddCondition(t2,Condition(function T93))call SaveUnitHandle(XY,(GetHandleId(t2)),(2),(TLI))endifendifif MFI>5 thencall SaveInteger(XY,(GetHandleId(GetTriggerUnit())),(674),(0))call UnitRemoveAbility(TLI,1093752625)if(LoadInteger(XY,(MKI),(34)))==1 thencall FlushChildHashtable(XY,(MKI))call MZI(t)endifendifif GetTriggerEventId()!=EVENT_PLAYER_UNIT_ATTACKED thencall SaveInteger(XY,(MKI),(34),(1))if MFI>5 thencall FlushChildHashtable(XY,(MKI))call MZI(t)endifcall UnitRemoveAbility(TLI,1093752391)if(DB1((TLI),FK0[K90])!=null)thencall QTI(TLI,1093752392)endifcall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093752392,true)endifset t=nullset TLI=nullreturn falseendfunctionfunction WarClub_Animation takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if GetTriggerEvalCount(t)==1 thencall SetUnitTimeScalePercent(TLI,250)elsecall SetUnitTimeScalePercent(TLI,100)call SetUnitAnimationByIndex(TLI,12)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullreturn falseendfunctionfunction TC3 takes nothing returns booleanlocal trigger tif GetSpellAbilityId()==1093752392 thencall MPI(GetTriggerUnit(),4296,29.9)call SetPlayerAbilityAvailable(GetOwningPlayer(GetTriggerUnit()),1093752392,false)call SetPlayerAbilityAvailable(GetOwningPlayer(GetTriggerUnit()),1093752391,true)call QTI(GetTriggerUnit(),1093752391)call SetPlayerAbilityAvailable(GetOwningPlayer(GetTriggerUnit()),1093752625,false)call QTI(GetTriggerUnit(),1093752625)call IssueTargetOrder(GetTriggerUnit(),"grabtree",GetSpellTargetDestructable())set t=CreateTrigger()call TriggerRegisterTimerEvent(t,30,false)call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function TB3))call SaveUnitHandle(XY,(GetHandleId(t)),(2),(GetTriggerUnit()))call SaveInteger(XY,(GetHandleId(t)),(34),(0))call SaveInteger(XY,(GetHandleId(GetTriggerUnit())),(674),(0))set t=nullelseif GetSpellAbilityId()==1093815105 thencall RemoveDestructable(GetSpellTargetDestructable())call ShowUnit(GetTriggerUnit(),false)call ShowUnit(GetTriggerUnit(),true)call UnitRemoveAbility(GetTriggerUnit(),1097625443)call UnitAddAbility(GetTriggerUnit(),1093815106)call UnitRemoveAbility(GetTriggerUnit(),1093815106)call UnitAddAbility(GetTriggerUnit(),1093815107)call UnitRemoveAbility(GetTriggerUnit(),1093815107)call AddUnitAnimationProperties(GetTriggerUnit(),"upgrade",false)endifreturn falseendfunctionfunction WarClub_Scan takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if(DB1((TLI),FK0[K90])!=null)thenif((LoadInteger(XY,(GetHandleId((TLI))),((4296))))==1)==false thenif GetUnitAbilityLevel(TLI,1093752392)==0 and GetUnitAbilityLevel(TLI,1093752391)==0 thencall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093752392,true)call QTI(TLI,1093752392)endifendifelsecall UnitRemoveAbility(TLI,1093752392)call UnitRemoveAbility(TLI,1093752391)endifset t=nullreturn falseendfunctionfunction DX2 takes nothing returns nothinglocal unit TLI=GMlocal unit TMI=HMlocal unit QHI=(LoadUnitHandle(XY,(GetHandleId(TLI)),(297)))call SaveUnitHandle(XY,(GetHandleId(TMI)),(297),(QHI))call SetUnitOwner(QHI,GetOwningPlayer(TMI),true)set TLI=nullset TMI=nullset QHI=nullendfunctionfunction I8O takes nothing returns nothinglocal unit N0I=JKlocal unit QHI=(LoadUnitHandle(XY,(GetHandleId(N0I)),(297)))if QHI!=null and GetUnitTypeId(QHI)==1697657174 thencall RemoveUnit(QHI)endifendfunctionfunction TD3 takes nothing returns booleanreturn GetLearnedSkill()==1093682009 and IsUnitIllusion(GetTriggerUnit())==falseendfunctionfunction TE3 takes nothing returns nothinglocal unit TF3=(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(298)))local integer NGI=GetUnitAbilityLevel(TF3,1093682009)if GetUnitState(TF3,UNIT_STATE_LIFE)>1 thencall SetUnitScale(TF3,0.5+0.25*NGI,0.5+0.25*NGI,0.5+0.25*NGI)endifendfunctionfunction TG3 takes nothing returns booleanlocal integer NGIif IsUnitIllusion(GetTriggerUnit())and(GetUnitTypeId(GetTriggerUnit())==1432580716 or GetUnitTypeId(GetTriggerUnit())==1429221720)thenset NGI=GetUnitAbilityLevel((LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(298))),1093682009)call SetUnitScale(GetTriggerUnit(),0.5+0.25*NGI,0.5+0.25*NGI,0.5+0.25*NGI)endifreturn falseendfunctionfunction TH3 takes nothing returns nothinglocal trigger tlocal unit TF3=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(TF3,1093682009)local unit QHIlocal unit N0I=GetTriggerUnit()local region L7Oif NGI==1 thenset QHI=CreateUnit(GetOwningPlayer(N0I),1697657174,0,0,0)call QTI(QHI,1093742658)call SaveUnitHandle(XY,(GetHandleId(N0I)),(297),(QHI))elseset QHI=(LoadUnitHandle(XY,(GetHandleId(N0I)),(297)))endifif NGI==2 thencall UnitRemoveAbility(QHI,1093742658)call QTI(QHI,1093742657)elseif NGI==3 thencall UnitRemoveAbility(QHI,1093742658)call UnitRemoveAbility(QHI,1093742657)call QTI(QHI,1093687891)endifcall SetPlayerTechResearched(GetOwningPlayer(TF3),1378889797,NGI)if NGI==1 thenset t=CreateTrigger()call TriggerAddAction(t,function TE3)call TriggerRegisterTimerEvent(t,2.00,true)call SaveUnitHandle(XY,(GetHandleId(t)),(298),(TF3))call SetUnitScale(TF3,0.5+0.25*NGI,0.5+0.25*NGI,0.5+0.25*NGI)set t=CreateTrigger()set L7O=CreateRegion()call RegionAddRect(L7O,GetWorldBounds())call TriggerRegisterEnterRegion(t,L7O,Condition(function Q8I))call TriggerAddCondition(t,Condition(function TG3))call SaveUnitHandle(XY,(GetHandleId(t)),(298),(TF3))set t=nullset L7O=nullset t=CreateTrigger()call SaveUnitHandle(XY,(GetHandleId(t)),(2),(TF3))call TriggerRegisterTimerEvent(t,0.5,true)set t=nullendifset N0I=nullset QHI=nullendfunctionfunction XQ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function TD3))call TriggerAddAction(t,function TH3)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function TC3))call T83()set t=nullendfunctionfunction TZ3 takes nothing returns booleanlocal unit TLI=GetTriggerUnit()local unit TMI=GetAttacker()local integer NGI=GetUnitAbilityLevel(TLI,1093744977)local unit QHIif GetRandomInt(1,100)<=(5+NGI*5)and P8I(TLI,TMI)<325 thenset QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call QTI(QHI,1093681750)call SetUnitAbilityLevel(QHI,1093681750,NGI)call IssueTargetOrder(QHI,"thunderbolt",TMI)set QHI=nullendifset TLI=nullset TMI=nullreturn falseendfunctionfunction TV3 takes nothing returns nothinglocal trigger t=CreateTrigger()local unit TLI=GetTriggerUnit()call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function TZ3))set t=nullset TLI=nullendfunctionfunction TW3 takes nothing returns booleanif GetLearnedSkill()==1093744977 and GetUnitAbilityLevel(GetTriggerUnit(),1093744977)==1 and IsUnitIllusion(GetTriggerUnit())==false thencall TV3()endifreturn falseendfunctionfunction YI1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function TW3))set t=nullendfunctionfunction TX3 takes nothing returns booleanif((LoadInteger(XY,(GetHandleId((GetFilterUnit()))),((4268))))==1)and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(DQI))==true thencall TKI(DQI,GetFilterUnit(),1,DUI)endifreturn falseendfunctionfunction TY3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local unit QHI=CreateUnit(GetOwningPlayer(N0I),1697656901,x,y,0)local integer NGI=GetUnitAbilityLevel(N0I,1093684300)local group g=MDI()call QTI(QHI,1093742666)call SetUnitAbilityLevel(QHI,1093742666,NGI)set DQI=N0Iif NGI==1 thenset DUI=25elseif NGI==2 thenset DUI=45elseif NGI==3 thenset DUI=65elseif NGI==4 thenset DUI=75endifcall GroupEnumUnitsInRange(g,x,y,275+24,Condition(function TX3))call MCI(g)if GetTriggerEvalCount(t)>6 thencall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset N0I=nullset QHI=nullset g=nullreturn falseendfunctionfunction TJ3 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local location l=GetSpellTargetLoc()local unit QHI=CreateUnit(GetOwningPlayer(N0I),1697656901,GetUnitX(N0I),GetUnitY(N0I),0)local integer NGI=GetUnitAbilityLevel(N0I,1093684300)call QTI(QHI,1093742669)call SetUnitAbilityLevel(QHI,1093742669,NGI)call IssuePointOrder(QHI,"clusterrockets",GetLocationX(l),GetLocationY(l))call TriggerRegisterTimerEvent(t,0.25,true)call TriggerAddCondition(t,Condition(function TY3))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveReal(XY,(MKI),(6),((GetLocationX(l))*1.0))call SaveReal(XY,(MKI),(7),((GetLocationY(l))*1.0))call TriggerEvaluate(t)call RemoveLocation(l)set N0I=nullset l=nullset t=nullset QHI=nullendfunctionfunction TK3 takes nothing returns booleanif GetSpellAbilityId()==1093684300 thencall TJ3()endifreturn falseendfunctionfunction XU1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function TK3))set t=nullendfunctionfunction TL3 takes nothing returns nothingif GetEnumUnit()==GetTriggerUnit()thencall O41(GetEnumUnit(),1093687365,EII,E0I,1110454338)elsecall O41(GetEnumUnit(),1093687365,EII,E0I,1110454338)endifcall SetPlayerAbilityAvailable(GetOwningPlayer(GetEnumUnit()),1093687365,false)endfunctionfunction TM3 takes nothing returns nothinglocal group g=MDI()set EII=GetUnitAbilityLevel(GetTriggerUnit(),1093748042)set E0I=7call GroupEnumUnitsInRange(g,0,0,9999,Condition(function BF1))call ForGroup(g,function TL3)call MCI(g)set g=nullendfunctionfunction TN3 takes nothing returns booleanif GetSpellAbilityId()==1093748042 thencall TM3()endifreturn falseendfunctionfunction YF1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function TN3))set t=nullendfunctionfunction TS3 takes nothing returns booleanreturn GetSpellAbilityId()==1093681733endfunctionfunction TT3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))call FlushChildHashtable(XY,(MKI))call MZI(t)call SetUnitAbilityLevel(TLI,1093679429,GetUnitAbilityLevel(TLI,1093681733))call UnitRemoveAbility(TLI,1110456665)set t=nullset TLI=nullreturn falseendfunctionfunction TR3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(2),(TLI))call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function TT3))set t=nullset TLI=nullendfunctionfunction YB1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_FINISH)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function TS3))call TriggerAddAction(t,function TR3)endfunctionfunction TP3 takes nothing returns booleanreturn GetLearnedSkill()==1093681733 and IsUnitIllusion(GetTriggerUnit())==falseendfunctionfunction TQ3 takes nothing returns nothingcall SetUnitAbilityLevel(GetTriggerUnit(),1093679429,GetUnitAbilityLevel(GetTriggerUnit(),1093681733))endfunctionfunction YC1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function TP3))call TriggerAddAction(t,function TQ3)endfunctionconstant function BeastRage_AbilityCode takes nothing returns integerreturn 1093685040endfunctionconstant function BeastRage_EffectCode takes nothing returns integerreturn 1093684826endfunctionfunction TU3 takes nothing returns booleanreturn GetUnitAbilityLevel(GetAttacker(),(1093685040))>0 and((LoadInteger(XY,(GetHandleId((GetAttacker()))),((4271))))==1)==falseendfunctionfunction R03 takes nothing returns nothinglocal unit FKO=GetAttacker()local unit TMI=GetTriggerUnit()local integer MKI=GetHandleId(FKO)local integer RI3=(LoadInteger(XY,(MKI),(237)))local unit R13=M6I(RI3)local integer TX2=RTI((LoadInteger(XY,(MKI),(236))),0)local integer NGI=GetUnitAbilityLevel(FKO,(1093685040))local integer RO3=1if R13!=TMI thenset TX2=1elseset TX2=RSI(TX2+1,1+4)endifif TX2>1 thenset RO3=TX2+4*(NGI-1)endifcall RLI(FKO,(1093684826),RO3)call SaveInteger(XY,(MKI),(236),(TX2))if R13!=TMI thencall M5I(RI3)set RI3=M8I(TMI)call SaveInteger(XY,(MKI),(237),(RI3))endifcall MPI(FKO,4271,0.4)endfunctionfunction YD1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function TU3))call TriggerAddAction(t,function R03)call RVI((1093684826))endfunctionfunction R23 takes unit TLI,unit TMI,unit QHI,integer NGI returns nothingcall SetUnitOwner(QHI,GetOwningPlayer(TMI),false)call SetUnitAbilityLevel(QHI,1093808463,NGI)call IssueTargetOrder(QHI,"curse",TMI)call TKI(TLI,TMI,1,25+50*NGI)call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",TMI,"overhead"))endfunctionfunction R33 takes nothing returns nothingif IsUnitInGroup(GetEnumUnit(),E3I)==false thencall GroupAddUnit(E3I,GetEnumUnit())call R23(E1I,GetEnumUnit(),EOI,E4I)endifendfunctionfunction R43 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)local unit R53=(LoadUnitHandle(XY,(MKI),(675)))local unit R63=(LoadUnitHandle(XY,(MKI),(676)))local real a=(LoadReal(XY,(MKI),(13)))local real d=(LoadReal(XY,(MKI),(433)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local group SP2=(LoadGroupHandle(XY,(MKI),(187)))local group g=MDI()if GetTriggerEvalCount(t)<=50 thenset a=a+20set d=d+7call SaveReal(XY,(MKI),(13),((a)*1.0))call SaveReal(XY,(MKI),(433),((d)*1.0))elseif GetTriggerEvalCount(t)<=100 thenset a=a+20set d=d-7call SaveReal(XY,(MKI),(13),((a)*1.0))call SaveReal(XY,(MKI),(433),((d)*1.0))endifcall SetUnitX(R53,RCI(x+d*Cos(a*bj_DEGTORAD)))call SetUnitY(R53,RGI(y+d*Sin(a*bj_DEGTORAD)))set a=a+180call SetUnitX(R63,RCI(x+d*Cos(a*bj_DEGTORAD)))call SetUnitY(R63,RGI(y+d*Sin(a*bj_DEGTORAD)))set CK=TLIset E1I=TLIset EOI=QHIset E3I=SP2set E4I=NGIcall GroupEnumUnitsInRange(g,GetUnitX(R53),GetUnitY(R53),125,Condition(function AT1))call ForGroup(g,function R33)set CK=TLIcall GroupEnumUnitsInRange(g,GetUnitX(R63),GetUnitY(R63),125,Condition(function AT1))call ForGroup(g,function R33)call MCI(g)if GetTriggerEvalCount(t)>100 thencall KillUnit(R53)call KillUnit(R63)call KillUnit(QHI)call MCI(SP2)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset R53=nullset R63=nullset QHI=nullreturn falseendfunctionfunction R73 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)local unit R53=CreateUnit(GetOwningPlayer(TLI),1697657433,x,y,0)local unit R63=CreateUnit(GetOwningPlayer(TLI),1697657433,x,y,0)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,x,y,0)call UnitAddAbility(QHI,1093808463)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveUnitHandle(XY,(MKI),(675),(R53))call SaveUnitHandle(XY,(MKI),(676),(R63))call SaveReal(XY,(MKI),(13),((0)*1.0))call SaveReal(XY,(MKI),(433),((0)*1.0))call SaveInteger(XY,(MKI),(5),(GetUnitAbilityLevel(TLI,1093808462)))call SaveGroupHandle(XY,(MKI),(187),(MDI()))call TriggerRegisterTimerEvent(t,0.03,true)call TriggerAddCondition(t,Condition(function R43))set TLI=nullset R53=nullset R63=nullset t=nullset QHI=nullendfunctionfunction R83 takes unit TLI,unit TMI,unit QHI,integer NGI returns nothingcall SetUnitOwner(QHI,GetOwningPlayer(TMI),false)call SetUnitAbilityLevel(QHI,1093808464,NGI)call IssueTargetOrder(QHI,"slow",TMI)call TKI(TLI,TMI,1,75)call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",TMI,"overhead"))endfunctionfunction R93 takes nothing returns nothingif IsUnitInGroup(GetEnumUnit(),E3I)==false and E2I!=null and QPI(E2I)==false thencall GroupAddUnit(E3I,GetEnumUnit())call R83(E1I,GetEnumUnit(),EOI,E4I)endifendfunctionfunction RA3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local unit R53=(LoadUnitHandle(XY,(MKI),(393)))local unit R63=(LoadUnitHandle(XY,(MKI),(394)))local unit RB3=(LoadUnitHandle(XY,(MKI),(395)))local unit RC3=(LoadUnitHandle(XY,(MKI),(396)))local unit RD3=(LoadUnitHandle(XY,(MKI),(397)))local real a=(LoadReal(XY,(MKI),(13)))-12.5local real d=(LoadReal(XY,(MKI),(433)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local unit RC2local group glocal group SP2=(LoadGroupHandle(XY,(MKI),(187)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))set d=d+900/20.0call SaveReal(XY,(MKI),(433),((d)*1.0))call SetUnitX(R53,RCI(x+d*Cos(a*bj_DEGTORAD)))call SetUnitY(R53,RGI(y+d*Sin(a*bj_DEGTORAD)))set a=a+6.25call SetUnitX(R63,RCI(x+d*Cos(a*bj_DEGTORAD)))call SetUnitY(R63,RGI(y+d*Sin(a*bj_DEGTORAD)))set a=a+6.25call SetUnitX(RB3,RCI(x+d*Cos(a*bj_DEGTORAD)))call SetUnitY(RB3,RGI(y+d*Sin(a*bj_DEGTORAD)))set a=a+6.25call SetUnitX(RC3,RCI(x+d*Cos(a*bj_DEGTORAD)))call SetUnitY(RC3,RGI(y+d*Sin(a*bj_DEGTORAD)))set a=a+6.25call SetUnitX(RD3,RCI(x+d*Cos(a*bj_DEGTORAD)))call SetUnitY(RD3,RGI(y+d*Sin(a*bj_DEGTORAD)))set E1I=TLIset EOI=QHIset E3I=SP2set E4I=NGIset RC2=R53if RC2!=null and QPI(RC2)==false thenset x=GetUnitX(RC2)set y=GetUnitY(RC2)set E2I=RC2set CK=TLIset g=MDI()call GroupEnumUnitsInRange(g,x,y,125,Condition(function AT1))call ForGroup(g,function R93)call MCI(g)endifset RC2=R63if RC2!=null and QPI(RC2)==false thenset x=GetUnitX(RC2)set y=GetUnitY(RC2)set E2I=RC2set CK=TLIset g=MDI()call GroupEnumUnitsInRange(g,x,y,125,Condition(function AT1))call ForGroup(g,function R93)call MCI(g)endifset RC2=RB3if RC2!=null and QPI(RC2)==false thenset x=GetUnitX(RC2)set y=GetUnitY(RC2)set E2I=RC2set CK=TLIset g=MDI()call GroupEnumUnitsInRange(g,x,y,125,Condition(function AT1))call ForGroup(g,function R93)call MCI(g)endifset RC2=RC3if RC2!=null and QPI(RC2)==false thenset x=GetUnitX(RC2)set y=GetUnitY(RC2)set E2I=RC2set CK=TLIset g=MDI()call GroupEnumUnitsInRange(g,x,y,125,Condition(function AT1))call ForGroup(g,function R93)call MCI(g)endifset RC2=RD3if RC2!=null and QPI(RC2)==false thenset x=GetUnitX(RC2)set y=GetUnitY(RC2)set E2I=RC2set CK=TLIset g=MDI()call GroupEnumUnitsInRange(g,x,y,125,Condition(function AT1))call ForGroup(g,function R93)call MCI(g)endifif GetTriggerEvalCount(t)>20 thencall KillUnit(R53)call KillUnit(R63)call KillUnit(RB3)call KillUnit(RC3)call KillUnit(RD3)call KillUnit(QHI)call MCI(SP2)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset R53=nullset R63=nullset RB3=nullset RC3=nullset RD3=nullset QHI=nullreturn falseendfunctionfunction RE3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local real x0=GetUnitX(TLI)local real y0=GetUnitY(TLI)local real x1=GetSpellTargetX()local real y1=GetSpellTargetY()local real a=PUI(x0,y0,x1,y1)local unit R53=CreateUnit(GetOwningPlayer(TLI),1697657434,x0,y0,a-12.5)local unit R63=CreateUnit(GetOwningPlayer(TLI),1697657434,x0,y0,a-6.25)local unit RB3=CreateUnit(GetOwningPlayer(TLI),1697657434,x0,y0,a)local unit RC3=CreateUnit(GetOwningPlayer(TLI),1697657434,x0,y0,a+6.25)local unit RD3=CreateUnit(GetOwningPlayer(TLI),1697657434,x0,y0,a+12.5)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,x0,y0,0)call UnitAddAbility(QHI,1093808464)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveUnitHandle(XY,(MKI),(393),(R53))call SaveUnitHandle(XY,(MKI),(394),(R63))call SaveUnitHandle(XY,(MKI),(395),(RB3))call SaveUnitHandle(XY,(MKI),(396),(RC3))call SaveUnitHandle(XY,(MKI),(397),(RD3))call SaveReal(XY,(MKI),(6),((x0)*1.0))call SaveReal(XY,(MKI),(7),((y0)*1.0))call SaveReal(XY,(MKI),(433),((0)*1.0))call SaveReal(XY,(MKI),(13),((a)*1.0))call SaveGroupHandle(XY,(MKI),(187),(MDI()))call SaveInteger(XY,(MKI),(5),(GetUnitAbilityLevel(TLI,1093808461)))call TriggerRegisterTimerEvent(t,0.03,true)call TriggerAddCondition(t,Condition(function RA3))set TLI=nullset R53=nullset R63=nullset RB3=nullset RC3=nullset RD3=nullset t=nullset QHI=nullendfunctionfunction RF3 takes nothing returns booleanif GetSpellAbilityId()==1093808461 thencall RE3()elseif GetSpellAbilityId()==1093808462 thencall R73()endifreturn falseendfunctionfunction RG3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer NGI=GetUnitAbilityLevel(TLI,1093808460)local player p=(LoadPlayerHandle(XY,(MKI),(54)))if GetUnitTypeId(TLI)==1311781175 or GetUnitTypeId(TLI)==1311781442 thenif((LoadInteger(XY,(GetHandleId((TLI))),((4416))))==1)==false or p!=GetOwningPlayer(TLI)thencall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093808462,true)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093808461,false)call SaveInteger(XY,(GetHandleId((TLI))),((4416)),(1))call SaveInteger(XY,(GetHandleId((TLI))),((4417)),(2))if p!=GetOwningPlayer(TLI)thencall SavePlayerHandle(XY,(MKI),(54),(GetOwningPlayer(TLI)))endifendifif GetUnitAbilityLevel(TLI,1093808462)!=NGI thencall SetUnitAbilityLevel(TLI,1093808462,NGI)endifelseif GetUnitTypeId(TLI)==1311781174 thenif((LoadInteger(XY,(GetHandleId((TLI))),((4417))))==1)==false or p!=GetOwningPlayer(TLI)thencall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093808462,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093808461,true)call SaveInteger(XY,(GetHandleId((TLI))),((4417)),(1))call SaveInteger(XY,(GetHandleId((TLI))),((4416)),(2))if p!=GetOwningPlayer(TLI)thencall SavePlayerHandle(XY,(MKI),(54),(GetOwningPlayer(TLI)))endifendifif GetUnitAbilityLevel(TLI,1093808461)!=NGI thencall SetUnitAbilityLevel(TLI,1093808461,NGI)endifendifset t=nullset TLI=nullreturn falseendfunctionfunction RH3 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()call QTI(TLI,1093808462)call QTI(TLI,1093808461)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093808462,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093808461,false)call SaveInteger(XY,(GetHandleId((TLI))),((4416)),(2))call SaveInteger(XY,(GetHandleId((TLI))),((4417)),(2))call TriggerRegisterTimerEvent(t,0.05,true)call TriggerAddCondition(t,Condition(function RG3))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SavePlayerHandle(XY,(MKI),(54),(GetOwningPlayer(TLI)))set t=nullset TLI=nullendfunctionfunction RZ3 takes nothing returns booleanif GetLearnedSkill()==1093808460 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093808460)==1 thencall RH3()endifreturn falseendfunctionfunction YE1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function RZ3))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function RF3))set t=nullendfunctionfunction RV3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local integer MFI=(LoadInteger(XY,(MKI),(34)))local integer JNO=2+NGIif GetTriggerEventId()==EVENT_UNIT_DEATH thencall UnitRemoveAbility(TLI,1093750323)call UnitRemoveAbility(TLI,1093750326)call UnitRemoveAbility(TLI,1093750327)call UnitRemoveAbility(TLI,1110459208)call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED thenif GetAttacker()==TLI thenset MFI=MFI+1call SaveInteger(XY,(MKI),(34),(MFI))if MFI>=JNO thencall UnitRemoveAbility(TLI,1093750323)call UnitRemoveAbility(TLI,1093750326)call UnitRemoveAbility(TLI,1093750327)call UnitRemoveAbility(TLI,1110459208)call FlushChildHashtable(XY,(MKI))call MZI(t)endifendifelseif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT thenif GetTriggerUnit()==TLI and GetSpellAbilityId()==1093750841 and(TimerGetElapsed(M))>(LoadReal(XY,(MKI),(442)))thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseif CY1(GetSpellAbilityId())and TLI==GetSpellTargetUnit()thencall UnitRemoveAbility(TLI,1093750323)call UnitRemoveAbility(TLI,1093750326)call UnitRemoveAbility(TLI,1093750327)call UnitRemoveAbility(TLI,1110459208)call FlushChildHashtable(XY,(MKI))call MZI(t)endifelsecall UnitRemoveAbility(TLI,1093750323)call UnitRemoveAbility(TLI,1093750326)call UnitRemoveAbility(TLI,1093750327)call UnitRemoveAbility(TLI,1110459208)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullreturn falseendfunctionfunction RW3 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093750841)call QTI(TLI,1093750323)call QTI(TLI,1093750326)call QTI(TLI,1093750327)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093750326,false)call TriggerRegisterTimerEvent(t,15,false)call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function RV3))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(34),(0))call SaveInteger(XY,(MKI),(5),(NGI))call SaveReal(XY,(MKI),(442),(((TimerGetElapsed(M))+1)*1.0))set t=nullset TLI=nullendfunctionfunction RX3 takes nothing returns booleanif GetSpellAbilityId()==1093750841 thencall RW3()endifreturn falseendfunctionfunction Y11 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function RX3))call RVI(1093750323)set t=nullendfunctionfunction RY3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer NGI=GetUnitAbilityLevel(TLI,1093684291)local integer BC2local integer RJ3if GetTriggerEventId()==EVENT_UNIT_DEATH or GetUnitAbilityLevel(TLI,1110454856)==0 or(GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT and TLI==GetSpellTargetUnit()and CY1(GetSpellAbilityId()))thencall FlushChildHashtable(XY,(MKI))call MZI(t)call UnitRemoveAbility(TLI,1110454856)call EW1(TLI,0)elseset BC2=R2I(GetUnitState(TLI,UNIT_STATE_LIFE)*(0.04+0.01*NGI))set RJ3=(LoadInteger(XY,(MKI),(238)))if BC2!=RJ3 thencall SaveInteger(XY,(MKI),(238),(BC2))call EW1(TLI,BC2)endifendifset t=nullset TLI=nullreturn falseendfunctionfunction RK3 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.25,true)call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_DEATH)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function RY3))call SaveUnitHandle(XY,(MKI),(2),(GetTriggerUnit()))call SaveInteger(XY,(MKI),(238),(0))set t=nullendfunctionfunction RL3 takes nothing returns booleanif GetSpellAbilityId()==1093684291 thencall RK3()endifreturn falseendfunctionfunction RM3 takes nothing returns booleanif GetUnitAbilityLevel(GetAttacker(),1110454856)>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))==false and GetUnitAbilityLevel(GetTriggerUnit(),1093678162)==0 thenendifreturn falseendfunctionfunction YO1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function RL3))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function RM3))set t=nullendfunctionfunction RN3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))call FlushChildHashtable(XY,(MKI))call MZI(t)call EY1(TLI,0)set TLI=nullreturn falseendfunctionfunction RS3 takes nothing returns nothinglocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer RT3=(LoadInteger(XY,(GetHandleId(TMI)),(824)))local real RR3=(LoadReal(XY,(GetHandleId(TMI)),(825)))local integer NGI=GetUnitAbilityLevel(TLI,1093818418)if GetTriggerEventId()==EVENT_WIDGET_DEATH or RR3<(TimerGetElapsed(M))thencall SaveInteger(XY,(GetHandleId(TMI)),(824),(0))call DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEventId()==EVENT_UNIT_ATTACKED thenset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.31,true)call TriggerAddCondition(t,Condition(function RN3))call SaveUnitHandle(XY,(MKI),(2),(TLI))call EY1(TLI,IMinBJ((10+5*NGI)*RT3,500))endifset t=nullset TLI=nullset TMI=nullendfunctionfunction RP3 takes nothing returns booleanif GetTriggerEventId()!=EVENT_UNIT_ATTACKED thencall RS3()endifif GetAttacker()==(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(2)))thencall RS3()endifreturn falseendfunctionfunction RQ3 takes unit TLI,unit TMI returns nothinglocal trigger tlocal integer MKIlocal integer RT3=(LoadInteger(XY,(GetHandleId(TMI)),(824)))local integer NGI=GetUnitAbilityLevel(TLI,1093818418)call SaveInteger(XY,(GetHandleId(TMI)),(824),(RT3+1))call SaveReal(XY,(GetHandleId(TMI)),(825),(((TimerGetElapsed(M))+15)*1.0))if RT3==0 thenset t=CreateTrigger()set MKI=GetHandleId(t)call SaveEffectHandle(XY,(MKI),(175),(AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\BattleRoar\\RoarTarget.mdl",TMI,"overhead")))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_ATTACKED)call TriggerRegisterDeathEvent(t,TMI)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function RP3))call SaveInteger(XY,(GetHandleId(TMI)),(824),(2))set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.31,true)call TriggerAddCondition(t,Condition(function RN3))call SaveUnitHandle(XY,(MKI),(2),(TLI))call EY1(TLI,IMinBJ((10+5*NGI),500))endifset t=nullendfunctionfunction RU3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))if GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamageSource()==TLI thencall DisableTrigger(t)call RQ3(TLI,TMI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifelsecall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction P03 takes nothing returns nothinglocal trigger t=CreateTrigger()local unit TMI=GetTriggerUnit()local unit TLI=GetAttacker()local integer MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,1,false)call TriggerAddCondition(t,Condition(function RU3))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))set TMI=nullset TLI=nullset t=nullendfunctionfunction PI3 takes nothing returns nothinglocal unit TLI=GetAttacker()if((LoadInteger(XY,(GetHandleId((TLI))),((4274))))==1)==false thencall MPI(TLI,4274,0.2)call P03()endifendfunctionfunction P13 takes nothing returns booleanif GetUnitAbilityLevel(GetAttacker(),1093818418)>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(14)))and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))thencall PI3()endifreturn falseendfunctionfunction PO3 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function P13))call SaveUnitHandle(XY,(GetHandleId(t)),(14),(GetTriggerUnit()))set t=nullendfunctionfunction P23 takes nothing returns booleanif GetLearnedSkill()==1093818418 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093818418)==1 thencall PO3()endifreturn falseendfunctionfunction Y21 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function P23))set t=nullendfunctionfunction P33 takes unit QHI,real x,real y,integer NGI returns nothingcall SetUnitPosition(QHI,x,y)call IssueImmediateOrder(QHI,"howlofterror")call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\HowlOfTerror\\HowlCaster.mdl",x,y))set QHI=nullendfunctionfunction P43 takes nothing returns booleanif(IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))and IsUnitInGroup(GetFilterUnit(),E5I)==false thencall GroupAddUnit(E5I,GetFilterUnit())if GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>E7I thencall SetUnitState(GetFilterUnit(),UNIT_STATE_LIFE,GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)-(E7I))elsecall TKI(E6I,GetFilterUnit(),1,E7I*1.33)endifendifreturn falseendfunctionfunction P53 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local real NN2=(LoadReal(XY,(MKI),(13)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local group WVO=(LoadGroupHandle(XY,(MKI),(133)))local group gif GetTriggerEvalCount(t)>10 thencall MCI(WVO)call FlushChildHashtable(XY,(MKI))call MZI(t)elseset E5I=WVOset E6I=TLIset E7I=NGI*20+10set CK=TLIset g=MDI()call GroupEnumUnitsInRange(g,x,y,325,Condition(function P43))call MCI(g)set g=nullcall P33(QHI,x,y,NGI)if ModuloInteger(GetTriggerEvalCount(t),2)==0 thencall KillUnit(CreateUnit(GetOwningPlayer(TLI),1697657409,x,y,0))endifset x=RCI(x+200*Cos(NN2*bj_DEGTORAD))set y=RGI(y+200*Sin(NN2*bj_DEGTORAD))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))endifset t=nullset TLI=nullset QHI=nullset WVO=nullreturn falseendfunctionfunction P63 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local location l=GetSpellTargetLoc()local real x1=GetUnitX(TLI)local real y1=GetUnitY(TLI)local real x2=GetLocationX(l)local real y2=GetLocationY(l)local real NN2=PUI(x1,y1,x2,y2)local integer NGI=GetUnitAbilityLevel(TLI,1093744463)local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,x1,y1,0)call QTI(QHI,1093681488)call SetUnitAbilityLevel(QHI,1093681488,NGI)call RemoveLocation(l)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveReal(XY,(MKI),(6),((x1)*1.0))call SaveReal(XY,(MKI),(7),((y1)*1.0))call SaveReal(XY,(MKI),(13),((NN2)*1.0))call SaveGroupHandle(XY,(MKI),(133),(MDI()))call TriggerRegisterTimerEvent(t,0.1,true)call TriggerAddCondition(t,Condition(function P53))set t=nullset TLI=nullset l=nullset QHI=nullendfunctionfunction P73 takes nothing returns booleanif GetSpellAbilityId()==1093744463 thencall P63()endifreturn falseendfunctionfunction Y41 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function P73))set t=nullendfunctionfunction P83 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real x1=(LoadReal(XY,(MKI),(64)))local real x2=(LoadReal(XY,(MKI),(66)))local real y1=(LoadReal(XY,(MKI),(65)))local real y2=(LoadReal(XY,(MKI),(67)))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathPact\\DeathPactTarget.mdl",TLI,"origin"))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathPact\\DeathPactTarget.mdl",TMI,"origin"))call SetUnitPosition(TLI,x2,y2)call MPI(TMI,4407,1)call SetUnitPosition(TMI,x1,y1)if IsUnitInRegion(YN,TMI)thencall OJ1(TMI)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction P93 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local real x1=GetUnitX(TLI)local real y1=GetUnitY(TLI)local real x2=GetUnitX(TMI)local real y2=GetUnitY(TMI)local trigger tlocal integer MKIif IsUnitAlly(TLI,GetOwningPlayer(TMI))==true or MBI(GetSpellTargetUnit())==false thenset t=CreateTrigger()set MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveReal(XY,(MKI),(64),((x1)*1.0))call SaveReal(XY,(MKI),(66),((x2)*1.0))call SaveReal(XY,(MKI),(65),((y1)*1.0))call SaveReal(XY,(MKI),(67),((y2)*1.0))call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function P83))call QII("SPLK",x1,y1,x2,y2,0.5,0,1,1,0.3)call QEI(x1,y1,300)call QEI(x2,y2,300)endifset TLI=nullset TMI=nullset t=nullendfunctionfunction PA3 takes nothing returns booleanif GetSpellAbilityId()==1093683534 or GetSpellAbilityId()==1093747031 thencall P93()endifreturn falseendfunctionfunction PB3 takes nothing returns nothingif(IsTerrainPathable(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),PATHING_TYPE_WALKABILITY))thencall R6I(GetTriggerUnit())call R1I(GetOwningPlayer(GetTriggerUnit()),GetObjectName(1848652610))endifendfunctionfunction PC3 takes nothing returns booleanif GetSpellAbilityId()==1093683534 or GetSpellAbilityId()==1093747031 thencall PB3()endifreturn falseendfunctionfunction Y51 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function PA3))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function PC3))set t=nullendfunctionfunction MagicMissle takes nothing returns nothingcall DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\ManaFlare\\ManaFlareMissile.mdl",GetTriggerUnit(),"weapon"))endfunctionfunction PD3 takes nothing returns booleanif GetSpellAbilityId()==1093677633 thencall DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\ManaFlare\\ManaFlareMissile.mdl",GetTriggerUnit(),"weapon"))endifreturn falseendfunctionfunction Y31 takes nothing returns nothinglocal trigger t=CreateTrigger()call TriggerAddCondition(t,Condition(function PD3))call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)set t=nullendfunctionfunction PE3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))if QPI(TLI)==false or GetTriggerEventId()==EVENT_WIDGET_DEATH thencall UnitRemoveAbility(TMI,1093818198)call UnitRemoveAbility(TMI,1093818201)call UnitRemoveAbility(TMI,1093818199)call UnitRemoveAbility(TMI,1093818200)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction PF3 takes nothing returns booleanlocal trigger tlocal integer MKIlocal unit TLI=GetTriggerUnit()local unit TMI=GetKillingUnit()local integer NGI=GetUnitAbilityLevel(TLI,1094934883)set TMI=G7O(TMI)if IsUnitType(TMI,UNIT_TYPE_HERO)==true thenset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,1,true)call TriggerRegisterDeathEvent(t,TMI)call TriggerAddCondition(t,Condition(function PE3))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))if NGI==1 thencall QTI(TMI,1093818198)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093818198,false)elseif NGI==2 thencall QTI(TMI,1093818201)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093818201,false)elseif NGI==3 thencall QTI(TMI,1093818199)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093818199,false)elseif NGI==4 thencall QTI(TMI,1093818200)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093818200,false)endifendifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction PG3 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function PF3))set TLI=nullset t=nullendfunctionfunction PH3 takes nothing returns booleanif GetLearnedSkill()==1094934883 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1094934883)==1 thencall PG3()endifreturn falseendfunctionfunction Y61 takes nothing returns nothinglocal trigger t=CreateTrigger()call TriggerAddCondition(t,Condition(function PH3))call Q9I(t,EVENT_PLAYER_HERO_SKILL)set t=nullendfunctionfunction PZ3 takes unit u returns nothinglocal unit N0I=K1[GetPlayerId(GetOwningPlayer(u))]local integer MKI=GetHandleId(N0I)local integer PV3local integer ilocal integer xlocal integer PW3local unit PX3if GetUnitTypeId(N0I)!=1160786265 thenreturnendifset PV3=(LoadInteger(XY,(MKI),(348)))set i=1loopexitwhen i>PV3set PW3=(LoadInteger(XY,(MKI),(7000+i)))set PX3=M6I(PW3)if PX3==u thenset x=iloopexitwhen x==PV3call SaveInteger(XY,(MKI),(7000+x),((LoadInteger(XY,(MKI),(7000+x+1)))))set x=x+1endloopset i=PV3endifset i=i+1endloopcall SaveInteger(XY,(MKI),(348),(PV3-1))set PX3=nullset N0I=nullendfunctionfunction PY3 takes unit u returns nothinglocal unit N0I=K1[GetPlayerId(GetOwningPlayer(u))]local integer MKI=GetHandleId(N0I)local integer PV3=(LoadInteger(XY,(MKI),(348)))call SaveReal(XY,(GetHandleId(u)),(786),(((TimerGetElapsed(M)))*1.0))set PV3=PV3+1call SaveInteger(XY,(MKI),(7000+PV3),(M8I(u)))call SaveInteger(XY,(MKI),(348),(PV3))if RI0[GetPlayerId(GetOwningPlayer(N0I))]thencall SelectUnitAddForPlayer(u,GetOwningPlayer(N0I))endifset N0I=nullendfunctionfunction WardenTrap_DeathMain takes nothing returns nothingcall PZ3(GetTriggerUnit())endfunctionfunction PJ3 takes unit u returns nothinglocal integer PK3=GetUnitAbilityLevel(u,1093685840)*3+2local integer MKI=GetHandleId(u)local integer PV3=(LoadInteger(XY,(MKI),(348)))local integer PW3=(LoadInteger(XY,(MKI),(7000+1)))local unit PX3=M6I(PW3)if PV3>=PK3 thencall PZ3(PX3)call RemoveUnit(PX3)endifset PX3=nullendfunctionfunction PL3 takes nothing returns nothinglocal unit QHI=CreateUnit(GetOwningPlayer(GetTriggerUnit()),1697656901,GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),0)call QTI(QHI,1093685845)call SetUnitAbilityLevel(QHI,1093685845,E8I)call IssueTargetOrder(QHI,"slow",GetEnumUnit())call QTI(QHI,1093686071)set QHI=nullendfunctionfunction PM3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)local group g=MDI()local real F21=(LoadReal(XY,(GetHandleId(TLI)),(786)))local real MC2=(TimerGetElapsed(M))-F21local integer NGI=1if MC2>4 thenset NGI=5elseif MC2>3 thenset NGI=4elseif MC2>2 thenset NGI=3elseif MC2>1 thenset NGI=2endifset E8I=NGIcall DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl",x,y))call GroupEnumUnitsInRange(g,x,y,400,Condition(function AK1))call ForGroup(g,function PL3)call MCI(g)call PZ3(TLI)call RemoveUnit(TLI)set g=nullset TLI=nullendfunctionfunction PN3 takes nothing returns booleanreturn GetOwningPlayer(GetFilterUnit())==VK and GetUnitTypeId(GetFilterUnit())==1697657392endfunctionfunction PS3 takes nothing returns nothinglocal real PT3=QCI(GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),QJ,UJ)local real PR3=QCI(GetUnitX(CK),GetUnitY(CK),QJ,UJ)if PT3<PR3 thenset CK=GetEnumUnit()endifendfunctionfunction PP3 takes nothing returns nothinglocal group g=MDI()set VK=GetOwningPlayer(GetTriggerUnit())call GroupEnumUnitsInRange(g,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),9000,Condition(function PN3))set CK=FirstOfGroup(g)set QJ=GetUnitX(GetTriggerUnit())set UJ=GetUnitY(GetTriggerUnit())call ForGroup(g,function PS3)call IssueImmediateOrder((CK),"locustswarm")call MCI(g)set g=nullendfunctionfunction WardenTrap_LearnMain takes nothing returns nothingcall QTI(GetTriggerUnit(),1093818442)endfunctionfunction PQ3 takes nothing returns nothinglocal location l=GetSpellTargetLoc()call QTI(GetTriggerUnit(),1093818442)call PJ3(GetTriggerUnit())call PY3(CreateUnit(GetOwningPlayer(GetTriggerUnit()),1697657392,GetLocationX(l),GetLocationY(l),0))call RemoveLocation(l)set l=nullendfunctionfunction PU3 takes nothing returns booleanif GetSpellAbilityId()==1093685840 thencall PQ3()endifif GetSpellAbilityId()==1093818442 thencall PP3()endifreturn falseendfunctionfunction Q03 takes nothing returns booleanif GetSpellAbilityId()==1093685841 thencall PM3()endifreturn falseendfunctionfunction QI3 takes nothing returns booleanif GetLearnedSkill()==1093685840 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093685840)==1 thencall QTI(GetTriggerUnit(),1093818442)endifreturn falseendfunctionfunction Q13 takes nothing returns booleanif GetUnitTypeId(GetDyingUnit())==1697657392 thencall PZ3(GetTriggerUnit())endifreturn falseendfunctionfunction N11 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function PU3))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_DEATH)call TriggerAddCondition(t,Condition(function Q13))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function Q03))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function QI3))set t=nullendfunctionfunction QO3 takes unit u,real Q23,real Q33,real Q43,real Q53,real Q63 returns booleanlocal real Q73=Q43-Q23local real Q83=Q53-Q33local real Q93=GetUnitX(u)-Q23local real QA3=GetUnitY(u)-Q33return Q63>=RAbsBJ(Q73*QA3-Q83*Q93)/RAbsBJ(Pow(Pow(Q73,2)+Pow(Q83,2),0.5))endfunctionfunction QB3 takes unit TLI,unit TMI,real TSI,real InitX,real InitY returns nothinglocal integer NGI=GetUnitAbilityLevel(TLI,1093685839)local real QC3=(300+20*NGI)*2local real QD3=80+25local unit QE3local real dxlocal real dylocal real QF3local real xlocal real ylocal group g=MDI()local boolean QG3local boolean QH3set dx=GetUnitX(TMI)-GetUnitX(TLI)set dy=GetUnitY(TMI)-GetUnitY(TLI)set QF3=Pow(Pow(dx,2)+Pow(dy,2),0.5)set x=GetUnitX(TMI)+(QC3/2-25)*(dx/QF3)set y=GetUnitY(TMI)+(QC3/2-25)*(dy/QF3)set CK=TLIset QJ=TSIcall GroupEnumUnitsInRange(g,x,y,Pow(Pow(QC3/2,2)+Pow(QD3/2,2),0.5),Condition(function AT1))call GroupRemoveUnit(g,TMI)set QE3=FirstOfGroup(g)loopexitwhen QE3==nullset QG3=QO3(QE3,GetUnitX(TLI),GetUnitY(TLI),GetUnitX(TMI),GetUnitY(TMI),QD3/2)set QH3=QO3(QE3,x,y,x-100,y+100*x*Pow(y,-1),0.01+QC3/2)if QG3 and QH3 thencall TKI(TLI,QE3,3,TSI)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\PriestMissile\\PriestMissile.mdl",QE3,"chest"))endifcall GroupRemoveUnit(g,QE3)set QE3=FirstOfGroup(g)endloopcall MCI(g)set QE3=nullset g=nullendfunctionfunction QZ3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer TRI=(LoadInteger(XY,(MKI),(30)))local unit TMI=M6I(TRI)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamageSource()==TLI and GetEventDamage()>1 and IsUnitIllusion(TMI)==false thencall DisableTrigger(t)call QB3(TLI,TMI,GetEventDamage(),(LoadReal(XY,(MKI),(349))),(LoadReal(XY,(MKI),(350))))call FlushChildHashtable(XY,(MKI))call MZI(t)endifelsecall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction QV3 takes nothing returns nothinglocal trigger t=CreateTrigger()local unit TMI=GetTriggerUnit()local unit TLI=GetAttacker()local integer MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,2.0,false)call TriggerAddCondition(t,Condition(function QZ3))call SaveInteger(XY,(MKI),(30),(M8I(TMI)))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(349),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(350),((GetUnitY(TLI))*1.0))set TMI=nullset TLI=nullset t=nullendfunctionfunction QW3 takes nothing returns nothinglocal unit TLI=GetAttacker()if((LoadInteger(XY,(GetHandleId((TLI))),((4272))))==1)==false thencall MPI(TLI,4272,0.4)call QV3()endifendfunctionfunction QX3 takes nothing returns booleanif GetUnitAbilityLevel(GetAttacker(),1093685839)>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(14)))thencall QW3()endifreturn falseendfunctionfunction QY3 takes nothing returns nothinglocal trigger tif GetUnitAbilityLevel(GetTriggerUnit(),1093685839)==1 thenset t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function QX3))call SaveUnitHandle(XY,(GetHandleId(t)),(14),(GetTriggerUnit()))endifcall SetPlayerTechResearched(GetOwningPlayer(GetTriggerUnit()),1382379618,GetUnitAbilityLevel(GetTriggerUnit(),1093685839))set t=nullendfunctionfunction QJ3 takes nothing returns booleanif GetLearnedSkill()==1093685839 and IsUnitIllusion(GetTriggerUnit())==false thencall QY3()endifreturn falseendfunctionfunction NI1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function QJ3))set t=nullendfunctionfunction QK3 takes nothing returns booleanlocal unit N0I=GetTriggerUnit()local integer MKI=GetHandleId(N0I)local integer OXO=(LoadInteger(XY,(MKI),(352)))if OXO>0 and GetTriggerEventId()!=EVENT_UNIT_DEATH thenif GetEventDamage()>5 thencall DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\PriestMissile\\PriestMissile.mdl",N0I,"right hand"))call PII(N0I,GetEventDamage())call SaveInteger(XY,(MKI),(352),(OXO-1))endifelsecall UnitRemoveAbility(N0I,1093685838)call UnitRemoveAbility(N0I,1110456394)call SaveInteger(XY,(MKI),(352),(0))endifset N0I=nullreturn falseendfunctionfunction QL3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local unit N0I=(LoadUnitHandle(XY,(GetHandleId(t)),(14)))local integer MKI=GetHandleId(N0I)local integer OXO=(LoadInteger(XY,(MKI),(351)))if GetTriggerEventId()==EVENT_UNIT_DEATH or(GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED and GetAttacker()==N0I and IsUnitAlly(GetAttacker(),GetOwningPlayer(GetTriggerUnit()))==false)thenif GetTriggerEventId()!=EVENT_UNIT_DEATH and OXO>0 and GetEventDamage()>0 thencall SaveInteger(XY,(MKI),(351),(OXO-1))elsecall UnitRemoveAbility(N0I,1093685830)call UnitRemoveAbility(N0I,1093685837)call UnitRemoveAbility(N0I,1110456393)call SaveInteger(XY,(MKI),(351),(0))endifendifset t=nullset N0I=nullreturn falseendfunctionfunction QM3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local unit N0I=(LoadUnitHandle(XY,(GetHandleId(t)),(14)))local integer MKI=GetHandleId(N0I)call SaveInteger(XY,(MKI),(352),(0))call SaveInteger(XY,(MKI),(351),(0))call UnitRemoveAbility(N0I,1093685830)call UnitRemoveAbility(N0I,1093685837)call UnitRemoveAbility(N0I,1093685838)call FlushChildHashtable(XY,(GetHandleId(t)))call MZI(t)set t=nullset N0I=nullreturn falseendfunctionfunction QN3 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local integer MKI=GetHandleId(N0I)local trigger t=CreateTrigger()call TriggerRegisterTimerEvent(t,17,false)call TriggerAddCondition(t,Condition(function QM3))call SaveUnitHandle(XY,(GetHandleId(t)),(14),(N0I))call QWI(FE,GetUnitX(N0I),GetUnitY(N0I))call QTI(N0I,1093685838)call SaveInteger(XY,(MKI),(352),(GetUnitAbilityLevel(N0I,1093748033)+2))call QTI(N0I,1093685830)call SetUnitAbilityLevel(N0I,1093685830,GetUnitAbilityLevel(N0I,1093748033))call QTI(N0I,1093685837)call SaveInteger(XY,(MKI),(351),(GetUnitAbilityLevel(N0I,1093748033)+2))set N0I=nullendfunctionfunction QS3 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local trigger tset t=CreateTrigger()call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function QK3))call SaveInteger(XY,(GetHandleId(N0I)),(352),(0))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function QL3))call SaveUnitHandle(XY,(GetHandleId(t)),(14),(N0I))call SaveInteger(XY,(GetHandleId(N0I)),(351),(0))set t=nullset N0I=nullendfunctionfunction QT3 takes nothing returns booleanif GetLearnedSkill()==1093748033 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093748033)==1 thencall QS3()endifreturn falseendfunctionfunction QR3 takes nothing returns booleanif GetSpellAbilityId()==1093748033 thencall QN3()endifreturn falseendfunctionfunction N01 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function QR3))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function QT3))set t=nullendfunctionfunction QP3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()call UnitRemoveAbility((LoadUnitHandle(XY,(GetHandleId(t)),(14))),1093685827)call FlushChildHashtable(XY,(GetHandleId(t)))call MZI(t)set t=nullreturn falseendfunctionfunction QQ3 takes unit TLI,unit TMI returns nothinglocal trigger t=CreateTrigger()call SaveUnitHandle(XY,(GetHandleId(t)),(14),(TMI))call TriggerRegisterTimerEvent(t,10,false)call TriggerAddCondition(t,Condition(function QP3))call QTI(TMI,1093685827)call SetUnitAbilityLevel(TMI,1093685827,GetUnitAbilityLevel(TLI,1093685846))call TKI(TLI,TMI,2,50*GetUnitAbilityLevel(TLI,1093685846))call Q5I(I2S(50*GetUnitAbilityLevel(TLI,1093685846)),1,TMI,0.03,255,0,0,255)call UnitRemoveAbility(TLI,1110456395)set t=nullendfunctionfunction QU3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer TRI=(LoadInteger(XY,(MKI),(30)))local unit TMI=M6I(TRI)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local trigger UI3=(LoadTriggerHandle(XY,(MKI),(353)))if GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamageSource()==TLI thencall DisableTrigger(t)call FlushChildHashtable(XY,(GetHandleId(UI3)))call MZI(UI3)call QQ3(TLI,TMI)call M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifelsecall M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TMI=nullset TLI=nullset UI3=nullreturn falseendfunctionfunction U13 takes unit TLI,unit TMI,trigger UI3 returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,2.0,false)call TriggerAddCondition(t,Condition(function QU3))call SaveInteger(XY,(MKI),(30),(M8I(TMI)))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveTriggerHandle(XY,(MKI),(353),(UI3))set t=nullendfunctionfunction UO3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))if GetTriggerEventId()==EVENT_UNIT_DEATH or GetTriggerEventId()==EVENT_UNIT_SPELL_CAST or(GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED and GetAttacker()==N0I and IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(N0I))==false)thenif GetTriggerEventId()!=EVENT_UNIT_DEATH and GetTriggerEventId()!=EVENT_UNIT_SPELL_CAST and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false thencall U13(N0I,GetTriggerUnit(),t)call UnitRemoveAbility(N0I,1110456395)call FlushChildHashtable(XY,(MKI))call MZI(t)endifif GetTriggerEventId()==EVENT_UNIT_DEATH or GetTriggerEventId()==EVENT_UNIT_SPELL_CAST thencall FlushChildHashtable(XY,(MKI))call MZI(t)endifelseif GetTriggerEventId()!=EVENT_PLAYER_UNIT_ATTACKED thenif x!=GetUnitX(N0I)or y!=GetUnitY(N0I)thencall UnitRemoveAbility(N0I,1110456395)call FlushChildHashtable(XY,(MKI))call MZI(t)endifendifset t=nullset N0I=nullreturn falseendfunctionfunction U23 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call DestroyEffect(AddSpecialEffectTarget("effects\\PurpleAura.mdx",N0I,"origin"))call QWI(UC,GetUnitX(N0I),GetUnitY(N0I))call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_SPELL_CAST)call TriggerRegisterTimerEvent(t,0.2,true)call TriggerAddCondition(t,Condition(function UO3))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveReal(XY,(MKI),(6),((GetUnitX(N0I))*1.0))call SaveReal(XY,(MKI),(7),((GetUnitY(N0I))*1.0))call IssueImmediateOrder(N0I,"holdposition")set t=nullset N0I=nullendfunctionfunction U33 takes nothing returns booleanif GetSpellAbilityId()==1093685846 thencall U23()endifreturn falseendfunctionfunction MU1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function U33))set t=nullendfunctionfunction U43 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local integer U53=(LoadInteger(XY,(MKI),(247)))call DestroyEffect(AddSpecialEffect("effects\\Tornado.mdx",GetUnitX(TLI),GetUnitY(TLI)))if GetTriggerEvalCount(t)>10*(2+0.75*NGI)or GetTriggerEventId()==EVENT_UNIT_DEATH thencall UnitRemoveAbility(TLI,U53)call UnitRemoveAbility(TLI,1110456663)call DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullreturn falseendfunctionfunction U63 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer NGI=GetUnitAbilityLevel(TLI,1093743689)local integer U53if NGI==1 thenset U53=1093743413elseif NGI==2 thenset U53=1093743183elseif NGI==3 thenset U53=1093743412elseif NGI==4 thenset U53=1093743417endifcall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),U53,false)call O11(TLI,U53,1,2+0.75*NGI)call TriggerRegisterTimerEvent(t,0.1,true)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function U43))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveInteger(XY,(MKI),(247),(U53))call SaveEffectHandle(XY,(MKI),(175),(AddSpecialEffectTarget("effects\\Tornado.mdx",TLI,"hand,left")))call SaveEffectHandle(XY,(MKI),(176),(AddSpecialEffectTarget("effects\\Tornado.mdx",TLI,"hand,right")))set TLI=nullset t=nullendfunctionfunction U73 takes nothing returns booleanif GetSpellAbilityId()==1093743689 thencall U63()endifreturn falseendfunctionfunction SI1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function U73))set t=nullendfunctionfunction U83 takes nothing returns nothinglocal destructable TMI=GetEnumDestructable()local real a=Atan2(GetDestructableY(TMI)-GetUnitY(CK),GetDestructableX(TMI)-GetUnitX(CK))local real GZO=RAbsBJ((QJ-a)*bj_RADTODEG)if(T5I(TMI)or GetDestructableTypeId(TMI)==1110454325)and GetDestructableLife(TMI)>1 and GZO<EBI and GZO<(ECI-5)thenset EBI=GZOset E9I=TMIendifset TMI=nullendfunctionfunction U93 takes unit UII,unit TLI,real NN2 returns destructablelocal real x=GetUnitX(UII)local real y=GetUnitY(UII)local rect r=Rect(x-EEI,y-EEI,x+EEI,y+EEI)set EBI=9999set CK=UIIset E9I=nullcall EnumDestructablesInRect(r,Condition(function LWI),function U83)call RemoveRect(r)set r=nullreturn E9Iendfunctionfunction UA3 takes nothing returns nothinglocal unit TMI=GetEnumUnit()local real a=Atan2(GetUnitY(TMI)-GetUnitY(CK),GetUnitX(TMI)-GetUnitX(CK))local real GZO=RAbsBJ((QJ-a)*bj_RADTODEG)if GZO<EBI and GZO<ECI and TMI!=DK thenset EBI=GZOset EAI=TMIendifset TMI=nullendfunctionfunction UB3 takes unit UII,unit TLI,real NN2 returns unitlocal group g=MDI()set EAI=nullset EBI=9999set CK=UIIset QJ=Atan2(GetUnitY(TLI)-EGI,GetUnitX(TLI)-EFI)set DK=TLIcall GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),EDI,Condition(function AU1))call ForGroup(g,function UA3)call MCI(g)set g=nullreturn EAIendfunctionfunction UC3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)if(LoadLightningHandle(XY,(MKI),(196)))!=null thencall DestroyLightning((LoadLightningHandle(XY,(MKI),(196))))endifcall FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullreturn falseendfunctionfunction UD3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit UII=(LoadUnitHandle(XY,(MKI),(45)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real UE3=(LoadReal(XY,(MKI),(248)))local real NN2=Atan2(GetUnitY(TMI)-GetUnitY(UII),GetUnitX(TMI)-GetUnitX(UII))local integer NGI=(LoadInteger(XY,(MKI),(5)))local real x=GetUnitX(UII)+50*Cos(NN2)local real y=GetUnitY(UII)+50*Sin(NN2)local unit UF3local destructable dlocal lightning QOIlocal unit QHIlocal boolean G2O=(LoadBoolean(XY,(MKI),(249)))if GetTriggerEventId()==EVENT_UNIT_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)call KillUnit(UII)elsecall SetUnitX(UII,x)call SetUnitY(UII,y)call SetUnitFacing(UII,NN2*bj_RADTODEG)if PAI(x,y,GetUnitX(TMI),GetUnitY(TMI))<45 thenset EFI=(LoadReal(XY,(MKI),(6)))set EGI=(LoadReal(XY,(MKI),(7)))call FlushChildHashtable(XY,(MKI))call MZI(t)if GetUnitTypeId(TMI)!=1848651852 and G2O thenset UF3=UB3(UII,TMI,UE3)set d=U93(UII,TMI,UE3)if UF3!=null thenset t=CreateTrigger()set MKI=GetHandleId(t)set QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call QTI(QHI,1093743177)call SetUnitAbilityLevel(QHI,1093743177,NGI+1)call IssueTargetOrder(QHI,"thunderbolt",TMI)set QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,GetUnitX(UF3),GetUnitY(UF3),0)call QTI(QHI,1093743177)call SetUnitAbilityLevel(QHI,1093743177,NGI+1)call IssueTargetOrder(QHI,"thunderbolt",UF3)call TriggerRegisterTimerEvent(t,0.25+NGI*0.75,false)call TriggerAddCondition(t,Condition(function UC3))set QOI=AddLightning("MFPB",true,GetUnitX(TMI),GetUnitY(TMI),GetUnitX(UF3),GetUnitY(UF3))call SetLightningColor(QOI,0.5,0.5,1,1)call SaveLightningHandle(XY,(MKI),(196),(QOI))elseif d!=null thenset t=CreateTrigger()set MKI=GetHandleId(t)set QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call QTI(QHI,1093743177)call SetUnitAbilityLevel(QHI,1093743177,NGI+1)call IssueTargetOrder(QHI,"thunderbolt",TMI)call TriggerRegisterTimerEvent(t,0.25+NGI*0.75,false)call TriggerAddCondition(t,Condition(function UC3))set QOI=AddLightning("MFPB",true,GetUnitX(TMI),GetUnitY(TMI),GetDestructableX(d),GetDestructableY(d))call SetLightningColor(QOI,0.5,0.5,1,1)call SaveLightningHandle(XY,(MKI),(196),(QOI))call SetDestructableAnimation(d,"stand hit")elseset QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call QTI(QHI,1093743177)call SetUnitAbilityLevel(QHI,1093743177,1)call IssueTargetOrder(QHI,"thunderbolt",TMI)endifendifcall KillUnit(UII)endifendifset t=nullset UII=nullset TMI=nullset QOI=nullset UF3=nullset d=nullset QHI=nullreturn falseendfunctionfunction UG3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local real NN2=Atan2(GetUnitY(TMI)-GetUnitY(TLI),GetUnitX(TMI)-GetUnitX(TLI))local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit UII=CreateUnit(GetOwningPlayer(TLI),1747990327,GetUnitX(TLI),GetUnitY(TLI),NN2*bj_RADTODEG)local integer NGI=GetUnitAbilityLevel(TLI,1093743178)local boolean G2O=MBI(GetSpellTargetUnit())==falsecall SaveUnitHandle(XY,(MKI),(45),(UII))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveReal(XY,(MKI),(248),((NN2)*1.0))call SaveBoolean(XY,(MKI),(249),(G2O))call SaveReal(XY,(MKI),(6),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(7),((GetUnitY(TLI))*1.0))call TriggerRegisterTimerEvent(t,0.033,true)call TriggerAddCondition(t,Condition(function UD3))call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)set TLI=nullset TMI=nullset t=nullendfunctionfunction UH3 takes nothing returns booleanif GetSpellAbilityId()==1093743178 thencall UG3()endifreturn falseendfunctionfunction S01 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function UH3))set t=nullendfunctionfunction UZ3 takes nothing returns nothingif IsUnitInGroup(GetEnumUnit(),EHI)==false and GetUnitAbilityLevel(GetEnumUnit(),1113815395)==0 thencall TKI((EZI),(GetEnumUnit()),1,(((EVI)*1.0))*Pow(0.9,(EXI))*Pow(0.99,(EWI)))call GroupAddUnit(EHI,GetEnumUnit())set EXI=EXI+1endifendfunctionfunction UV3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit UII=(LoadUnitHandle(XY,(MKI),(45)))local real P6I=(LoadReal(XY,(MKI),(47)))local real P7I=(LoadReal(XY,(MKI),(48)))local real NN2=(LoadReal(XY,(MKI),(13)))local real TSI=(LoadReal(XY,(MKI),(20)))local integer UW3=(LoadInteger(XY,(MKI),(354)))local integer UX3=(LoadInteger(XY,(MKI),(355)))local group SP2=(LoadGroupHandle(XY,(MKI),(187)))local real x=RCI(GetUnitX(UII)+(60*Pow(0.9,UX3)*Pow(0.99,UW3))*Cos(NN2))local real y=RGI(GetUnitY(UII)+(60*Pow(0.9,UX3)*Pow(0.99,UW3))*Sin(NN2))local group g=MDI()local real dif GetTriggerEvalCount(t)>2 thenset d=150elseset d=75endifcall DestroyEffect(AddSpecialEffect("effects\\Tornado.mdx",x,y))set UW3=UW3+QEI(x,y,75)call SaveInteger(XY,(MKI),(354),(UW3))set EHI=SP2set EZI=UIIset EVI=TSIset EWI=UW3set EXI=UX3set CK=UIIcall GroupEnumUnitsInRange(g,x,y,d,Condition(function AT1))call ForGroup(g,function UZ3)call MCI(g)call SaveInteger(XY,(MKI),(355),(EXI))call SetUnitX(UII,x)call SetUnitY(UII,y)if GetTriggerEvalCount(t)>29 thencall KillUnit(UII)call MCI(SP2)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset UII=nullset SP2=nullset g=nullreturn falseendfunctionfunction UY3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local real x2=(LoadReal(XY,(GetHandleId(TLI)),(356)))local real y2=(LoadReal(XY,(GetHandleId(TLI)),(357)))local real UJ3=RPI((TimerGetElapsed(M))-(LoadReal(XY,(GetHandleId(TLI)),(358))),1.0)local real NN2=Atan2(y2-GetUnitY(TLI),x2-GetUnitX(TLI))local trigger tlocal integer MKIlocal unit UIIlocal integer NGI=GetUnitAbilityLevel(TLI,1093743179)local real TSI=(40+80*NGI)*(UJ3)set t=CreateTrigger()set MKI=GetHandleId(t)set UII=CreateUnit(GetOwningPlayer(TLI),1747990328,GetUnitX(TLI),GetUnitY(TLI),NN2*bj_RADTODEG)set x2=GetUnitX(TLI)+1700*Cos(NN2)set y2=GetUnitY(TLI)+1700*Sin(NN2)call SaveUnitHandle(XY,(MKI),(45),(UII))call SaveReal(XY,(MKI),(47),((x2)*1.0))call SaveReal(XY,(MKI),(48),((y2)*1.0))call SaveReal(XY,(MKI),(13),((NN2)*1.0))call SaveReal(XY,(MKI),(20),((TSI)*1.0))call SaveInteger(XY,(MKI),(354),(0))call SaveInteger(XY,(MKI),(355),(0))call SaveGroupHandle(XY,(MKI),(187),(MDI()))call TriggerRegisterTimerEvent(t,0.02,true)call TriggerAddCondition(t,Condition(function UV3))set TLI=nullset t=nullset UII=nullendfunctionfunction UK3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))call SetUnitTimeScale(N0I,1)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset N0I=nullreturn falseendfunctionfunction UL3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))call SetUnitAnimation(N0I,"attack")call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset N0I=nullreturn falseendfunctionfunction UM3 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit N0I=GetTriggerUnit()local location l=GetSpellTargetLoc()local real x=GetLocationX(l)local real y=GetLocationY(l)call RemoveLocation(l)call SaveUnitHandle(XY,(MKI),(14),(N0I))call TriggerRegisterTimerEvent(t,0.,false)call TriggerAddCondition(t,Condition(function UL3))call SaveReal(XY,(GetHandleId(N0I)),(356),((x)*1.0))call SaveReal(XY,(GetHandleId(N0I)),(357),((y)*1.0))call SaveReal(XY,(GetHandleId(N0I)),(358),(((TimerGetElapsed(M)))*1.0))call SetUnitTimeScale(N0I,0.75)set t=CreateTrigger()set MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(14),(N0I))call TriggerRegisterTimerEvent(t,0.75,false)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function UK3))set t=nullset N0I=nullendfunctionfunction UN3 takes nothing returns booleanif GetSpellAbilityId()==1093743179 thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_CHANNEL thencall SaveBoolean(XY,(GetHandleId(GetTriggerUnit())),(360),(false))call UM3()elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT thencall SaveBoolean(XY,(GetHandleId(GetTriggerUnit())),(360),(true))elseif(LoadBoolean(XY,(GetHandleId(GetTriggerUnit())),(360)))==true thencall UY3()endifendifreturn falseendfunctionfunction S11 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_ENDCAST)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CHANNEL)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function UN3))set t=nullendfunctionfunction US3 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer TRI=(LoadInteger(XY,(MKI),(30)))local unit TMI=M6I(TRI)local real NT2=(LoadReal(XY,(MKI),(193)))local boolean OF3=(LoadBoolean(XY,(MKI),(15)))local integer NGIif GetTriggerEvalCount(t)==1 thencall TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)endifif GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED thenif GetAttacker()==TLI and GetTriggerUnit()==TMI thencall DestroyEffect(AddSpecialEffectTarget("effects\\Tornado.mdx",TLI,"hand,left"))call DestroyEffect(AddSpecialEffectTarget("effects\\Tornado.mdx",TLI,"hand,right"))if GetUnitAbilityLevel(TLI,1093743186)==0 thencall QTI(TLI,1093743186)set NGI=GetUnitAbilityLevel(TLI,1093747766)endifelseif GetAttacker()==TLI and GetTriggerUnit()!=TMI thencall UnitRemoveAbility(TLI,1093743186)call UnitRemoveAbility(TLI,1110456664)call UnitRemoveAbility(TLI,1093748299)call UnitRemoveAbility(TLI,1093748300)call UnitRemoveAbility(TLI,1093748298)endifelseif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamageSource()==TLI thencall SetUnitState(TMI,UNIT_STATE_LIFE,GetUnitState(TMI,UNIT_STATE_LIFE)+(NT2)*GetEventDamage())endifelseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT thenif GetSpellAbilityId()==1093743184 or GetSpellAbilityId()==1093747766 thencall M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifelsecall UnitRemoveAbility(TLI,1093743186)call UnitRemoveAbility(TLI,1110456664)call M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)call UnitRemoveAbility(TLI,1093748299)call UnitRemoveAbility(TLI,1093748300)call UnitRemoveAbility(TLI,1093748298)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction UT3 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer NGI=GetUnitAbilityLevel(TLI,1093743184)local real NT2=0.6-NGI*0.1local boolean OF3=falsecall UnitRemoveAbility(TLI,1093743186)call UnitRemoveAbility(TLI,1110456664)if NGI==0 thenset OF3=trueset NGI=GetUnitAbilityLevel(TLI,1093747766)set NT2=0.45-NGI*0.15endifcall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093743186,false)call QTI(TLI,1093743186)call IssueTargetOrder(TLI,"attack",TMI)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveBoolean(XY,(MKI),(15),(OF3))call SaveInteger(XY,(MKI),(30),(M8I(TMI)))call SaveReal(XY,(MKI),(193),((NT2)*1.0))call SaveInteger(XY,(MKI),(361),(0))call TriggerRegisterTimerEvent(t,20,false)call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function US3))set TLI=nullset TMI=nullset t=nullendfunctionfunction UR3 takes nothing returns booleanif(GetSpellAbilityId()==1093743184 or GetSpellAbilityId()==1093747766)and MBI(GetSpellTargetUnit())==false thencall UT3()endifreturn falseendfunctionfunction SO1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function UR3))set t=nullendfunctionfunction UP3 takes nothing returns booleanreturn IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and HK1(GetUnitTypeId(GetFilterUnit()))==false and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(EYI))==trueendfunctionfunction UQ3 takes nothing returns nothinglocal real x=GetUnitX(GetEnumUnit())local real y=GetUnitY(GetEnumUnit())local unit T8I=CreateUnit(GetOwningPlayer(EYI),1697657657,x,y,0)call UnitAddAbility(T8I,1093678419)call SetUnitAbilityLevel(T8I,1093678419,EJI)call IssueTargetOrder(T8I,"chainlightning",GetEnumUnit())call UnitApplyTimedLife(T8I,1112820806,3)call UnitAddAbility(T8I,1097625443)set T8I=nullendfunctionfunction UU3 takes nothing returns nothinglocal group g=MDI()set EYI=GetTriggerUnit()if GetSpellAbilityId()==1093810503 thenset EJI=GetUnitAbilityLevel(GetTriggerUnit(),1093810503)+4elseset EJI=GetUnitAbilityLevel(GetTriggerUnit(),1093810504)+7endifcall GroupEnumUnitsInRect(g,bj_mapInitialPlayableArea,Condition(function UP3))call ForGroup(g,function UQ3)call MCI(g)set g=nullendfunctionfunction I04 takes nothing returns booleanif GetSpellAbilityId()==1093810503 or GetSpellAbilityId()==1093810504 thencall UU3()endifreturn falseendfunctionfunction Y81 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function I04))set t=nullendfunctionconstant function StaticField_RawCode takes nothing returns integerreturn 1093684789endfunctionconstant function StaticField_LightningCode takes nothing returns integerreturn 1093818193endfunctionconstant function StaticField_ArcLightningCode takes nothing returns integerreturn 1093677616endfunctionconstant function StaticField_WrathOfGodCode takes nothing returns integerreturn 1093810503endfunctionconstant function StaticField_WrathOfGod2Code takes nothing returns integerreturn 1093810504endfunctionfunction II4 takes nothing returns booleanreturn(GetSpellAbilityId()==(1093818193)or GetSpellAbilityId()==(1093677616)or GetSpellAbilityId()==(1093810503)or GetSpellAbilityId()==(1093810504))and GetUnitAbilityLevel(GetTriggerUnit(),(1093684789))>0endfunctionfunction I14 takes nothing returns nothinglocal real IO4=GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)local real I24=0.03+0.02*GetUnitAbilityLevel(GetTriggerUnit(),(1093684789))local real TSI=IO4*I24call UnitDamageTarget(GetTriggerUnit(),GetEnumUnit(),TSI,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\ForkedLightning\\ForkedLightningTarget.mdl",GetEnumUnit(),"overhead"))endfunctionfunction I34 takes nothing returns booleanreturn GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==falseendfunctionfunction I44 takes nothing returns nothinglocal location O4O=GetUnitLoc(GetTriggerUnit())local group GK1=MDI()local real x=GetLocationX(O4O)local real y=GetLocationY(O4O)local boolexpr PI1=Condition(function I34)call GroupEnumUnitsInRange(GK1,x,y,1025,PI1)call ForGroup(GK1,function I14)call RemoveLocation(O4O)call MCI(GK1)endfunctionfunction Y71 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function II4))call TriggerAddAction(t,function I44)endfunctionfunction I54 takes nothing returns booleanreturn(T6I(GetFilterUnit())==false and IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))and IsHeroUnitId(GetUnitTypeId(GetFilterUnit()))endfunctionfunction I64 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local unit QHIlocal integer NGI=GetUnitAbilityLevel(TLI,1093818193)local real TSI=25+NGI*75local group glocal real xlocal real yif NGI>=3 thenset TSI=TSI+25endifif TMI==null thenset g=MDI()set x=GetSpellTargetX()set y=GetSpellTargetY()set CK=TLIcall GroupEnumUnitsInRange(g,x,y,325+25,Condition(function I54))set TMI=OG1(g,x,y)call MCI(g)set g=nullendifif TMI!=null thenset x=GetUnitX(TMI)set y=GetUnitY(TMI)call QGI(TLI,TMI)call TPI(TLI,TMI,1,TSI,0.25)endifset QHI=CreateUnit(GetOwningPlayer(TLI),1697656880,x,y,0)call QTI(QHI,1093678419)call UnitApplyTimedLife(QHI,1112820806,4.5)call SetUnitPathing(QHI,false)call QTI(QHI,1097625443)if TMI==null or IssueTargetOrder(QHI,"chainlightning",TMI)==false thenset TMI=CreateUnit(GetOwningPlayer(TLI),1697656899,x,y,0)call UnitApplyTimedLife(TMI,1112820806,0.2)call IssueTargetOrder(QHI,"chainlightning",TMI)endifset TLI=nullset TMI=nullset QHI=nullendfunctionfunction I74 takes nothing returns booleanif GetSpellAbilityId()==1093818193 and(GetSpellTargetUnit()==null or MBI(GetSpellTargetUnit())==false)thencall I64()endifreturn falseendfunctionfunction Y91 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function I74))set t=nullendfunctionfunction I84 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))call SetUnitX(QHI,GetUnitX(TLI))call SetUnitY(QHI,GetUnitY(TLI))if GetTriggerEvalCount(t)>80 thencall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset QHI=nullreturn falseendfunctionfunction I94 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697657411,GetUnitX(TLI),GetUnitY(TLI),0)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call QTI(QHI,1093748301)call SetUnitAbilityLevel(QHI,1093748301,GetUnitAbilityLevel(TLI,1093677616))call IssueTargetOrder(QHI,"chainlightning",TMI)call UnitApplyTimedLife(QHI,1112820806,10)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(19),(QHI))call TriggerRegisterTimerEvent(t,0.05,true)call TriggerAddCondition(t,Condition(function I84))set TLI=nullset TMI=nullset QHI=nullset t=nullendfunctionfunction IA4 takes nothing returns booleanif GetSpellAbilityId()==1093677616 and MBI(GetSpellTargetUnit())==false thencall I94()endifreturn falseendfunctionfunction YA1 takes nothing returns nothinglocal trigger t=CreateTrigger()call TriggerAddCondition(t,Condition(function IA4))call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)set t=nullendfunctionconstant function DeathCoil_AbilityCode takes nothing returns integerreturn 1093683507endfunctionfunction IB4 takes nothing returns booleanreturn GetSpellAbilityId()==(1093683507)and(IsUnitAlly(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))or MBI(GetSpellTargetUnit())==false)endfunctionfunction IC4 takes nothing returns nothinglocal timer t=GetExpiredTimer()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local real TSI=(LoadReal(XY,(MKI),(20)))call UnitDamageTarget(N0I,N0I,TSI,false,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)call FlushChildHashtable(XY,(MKI))call PauseTimer(t)call DestroyTimer(t)endfunctionfunction ID4 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local real TSI=50+50*GetUnitAbilityLevel(N0I,(1093683507))local real IE4=50+25*GetUnitAbilityLevel(N0I,(1093683507))local timer t=CreateTimer()local integer MKI=GetHandleId(t)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",TMI,"origin"))if IsUnitAlly(TMI,GetOwningPlayer(N0I))and GetUnitState(TMI,UNIT_STATE_LIFE)>1.00 thencall SetUnitState(TMI,UNIT_STATE_LIFE,GetUnitState(TMI,UNIT_STATE_LIFE)+TSI)elsecall UnitDamageTarget(N0I,TMI,TSI,false,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)endifcall SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveReal(XY,(MKI),(20),((IE4)*1.0))call TimerStart(t,0,false,function IC4)endfunctionfunction L31 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function IB4))call TriggerAddAction(t,function ID4)endfunctionfunction IF4 takes nothing returns nothinglocal unit QHI=CreateUnit(GetOwningPlayer(EKI),1697656901,GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),0)call QTI(QHI,1093684554)call SetUnitAbilityLevel(QHI,1093684554,ELI)call IssueTargetOrder(QHI,"forkedlightning",GetEnumUnit())set QHI=nullendfunctionfunction IG4 takes unit TLI,unit TMI,integer NGI returns nothinglocal group g=MDI()set CK=TLIset ELI=NGIset EKI=TLIcall GroupEnumUnitsInRange(g,GetUnitX(TMI),GetUnitY(TMI),700,Condition(function AN1))call ForGroup(g,function IF4)call MCI(g)set g=nullendfunctionfunction IH4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local real IZ4=(LoadReal(XY,(MKI),(362)))local unit TLIlocal integer TRI=(LoadInteger(XY,(MKI),(30)))local unit TMI=M6I(TRI)local integer NGIif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif((LoadInteger(XY,(GetHandleId((GetTriggerUnit()))),((4250))))==1)==false thenif IZ4<GetEventDamage()thenset TLI=(LoadUnitHandle(XY,(MKI),(2)))set NGI=(LoadInteger(XY,(MKI),(5)))call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call SaveBoolean(XY,(GetHandleId(TMI)),(363),(false))call M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)call PII(GetTriggerUnit(),IZ4)call IG4(TLI,GetTriggerUnit(),NGI)elseif GetEventDamage()>0 thencall PII(GetTriggerUnit(),GetEventDamage())call SaveReal(XY,(MKI),(362),((IZ4-GetEventDamage())*1.0))endifendifelseif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT thenif CY1(GetSpellAbilityId())==true and GetSpellTargetUnit()==TMI thenset TLI=(LoadUnitHandle(XY,(MKI),(2)))set NGI=(LoadInteger(XY,(MKI),(5)))call SaveBoolean(XY,(GetHandleId(TMI)),(363),(false))call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)call IG4(TLI,TMI,NGI)endifelseset TLI=(LoadUnitHandle(XY,(MKI),(2)))set NGI=(LoadInteger(XY,(MKI),(5)))call SaveBoolean(XY,(GetHandleId(TMI)),(363),(false))call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)call IG4(TLI,TMI,NGI)endifset t=nullreturn falseendfunctionfunction IV4 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TMI=GetSpellTargetUnit()local unit TLI=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093684550)local integer XVO=GetHandleId(TMI)local real IZ4if(LoadBoolean(XY,(XVO),(363)))==true thencall TriggerEvaluate((LoadTriggerHandle(XY,(XVO),(364))))endifcall UnitRemoveBuffs(TMI,false,true)call CG1(TMI,0,0)if NGI==1 thenset IZ4=110elseif NGI==2 thenset IZ4=140elseif NGI==3 thenset IZ4=170elseset IZ4=200endifcall SaveReal(XY,(MKI),(362),((IZ4)*1.0))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("war3mapImported\\Defensive Barrier big.mdx",TMI,"chest")))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveInteger(XY,(MKI),(30),(M8I(TMI)))call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerRegisterTimerEvent(t,15,false)call TriggerAddCondition(t,Condition(function IH4))call SaveTriggerHandle(XY,(XVO),(364),(t))call SaveBoolean(XY,(XVO),(363),(true))set t=nullset TMI=nullset TLI=nullendfunctionfunction IW4 takes nothing returns booleanif GetSpellAbilityId()==1093684550 thencall IV4()endifreturn falseendfunctionfunction IX4 takes nothing returns nothingif GetUnitAbilityLevel(GetSpellTargetUnit(),1112433775)>0 thencall R6I(GetTriggerUnit())call R1I(GetOwningPlayer(GetTriggerUnit()),GetObjectName(1848652617))endifendfunctionfunction IY4 takes nothing returns booleanif GetSpellAbilityId()==1093684550 thencall IX4()endifreturn falseendfunctionfunction L51 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function IY4))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function IW4))set t=nullendfunctionfunction IJ4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local trigger bt=(LoadTriggerHandle(XY,(MKI),(35)))if IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)thencall TriggerRegisterUnitEvent(bt,GetTriggerUnit(),EVENT_UNIT_DAMAGED)endifset t=nullset bt=nullreturn falseendfunctionfunction IK4 takes nothing returns nothingcall TriggerRegisterUnitEvent(ENI,GetEnumUnit(),EVENT_UNIT_DAMAGED)endfunctionfunction IL4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))if GetTriggerEventId()==EVENT_UNIT_DEATH or IssueImmediateOrder(N0I,"windwalk")thencall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset N0I=nullreturn falseendfunctionfunction IM4 takes unit N0I returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.5,true)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function IL4))call SaveUnitHandle(XY,(MKI),(14),(N0I))set t=nullendfunctionfunction IN4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=GetTriggerUnit()local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer NGI=GetUnitAbilityLevel(TLI,1093684819)local integer BP1=2+NGIlocal real QDOlocal boolean IS4=falseif NGI==0 thenset NGI=GetUnitAbilityLevel(TLI,1093747777)set BP1=4+1*NGIset IS4=trueendifif GetTriggerEventId()==EVENT_UNIT_DAMAGED and((LoadInteger(XY,(GetHandleId((TLI))),((4250))))==1)thenif N0I==TLI thencall PII(N0I,GetEventDamage())call PII(N0I,GetEventDamage())elseif IS4 and P8I(N0I,TLI)<900 and IsUnitAlly(N0I,GetOwningPlayer(TLI))thencall PII(N0I,GetEventDamage()*0.35)call PII(TLI,GetEventDamage()*0.35)endifelseif N0I==TLI and((GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and(GetSpellAbilityId()==1093684819 or GetSpellAbilityId()==1093747777))or(GetTriggerEventId()==EVENT_UNIT_DAMAGED and((LoadInteger(XY,(GetHandleId((N0I))),((4251))))==1)==false and GetUnitState(N0I,UNIT_STATE_LIFE)<400 and GetUnitAbilityLevel(N0I,1112433775)==0))thencall TimerStart(EZ0[GetPlayerId(GetOwningPlayer(N0I))],70-10*NGI,false,null)call MPI(N0I,4250,BP1)call MPI(N0I,4251,70-10*NGI)call UnitRemoveBuffs(N0I,false,true)call CG1(N0I,0,0)if GetTriggerEventId()==EVENT_UNIT_DAMAGED thencall DisableTrigger(t)set EMI=trueif IssueImmediateOrder(N0I,"windwalk")==false thencall IM4(N0I)endifset EMI=falsecall EnableTrigger(t)endifcall PKI("Abilities\\Spells\\Undead\\Unsummon\\UnsummonTarget.mdl",N0I,"origin",BP1)endifset t=nullset N0I=nullset TLI=nullreturn falseendfunctionfunction IT4 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local group glocal region rcall SaveUnitHandle(XY,(MKI),(2),(TLI))call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function IN4))set ENI=tset g=MDI()call GroupEnumUnitsInRange(g,0,0,999999,Condition(function BL1))call ForGroup(g,function IK4)call MCI(g)set t=CreateTrigger()set MKI=GetHandleId(t)call SaveTriggerHandle(XY,(MKI),(35),(ENI))set r=CreateRegion()call RegionAddRect(r,GetWorldBounds())call TriggerRegisterEnterRegion(t,r,Condition(function LWI))call TriggerAddCondition(t,Condition(function IJ4))set t=nullset TLI=nullset g=nullset r=nullendfunctionfunction IR4 takes nothing returns booleanif(GetLearnedSkill()==1093684819 or GetLearnedSkill()==1093747777)and IsUnitIllusion(GetTriggerUnit())==false and(GetUnitAbilityLevel(GetTriggerUnit(),1093684819)==1 or GetUnitAbilityLevel(GetTriggerUnit(),1093747777)==1)thencall IT4()endifreturn falseendfunctionfunction L61 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function IR4))set t=nullendfunctionconstant function MarkOfTheAbyss_AttackBuff takes nothing returns integerreturn 1110455862endfunctionconstant function MarkOfTheAbyss_EffectCode takes nothing returns integerreturn 1093684552endfunctionconstant function MarkOfTheAbyss_FrostmourneCode takes nothing returns integerreturn 1093684551endfunctionfunction IP4 takes nothing returns booleanreturn GetUnitAbilityLevel(GetTriggerUnit(),(1110455862))>0 or GetUnitAbilityLevel(GetAttacker(),(1093684551))>0endfunctionfunction IQ4 takes nothing returns nothinglocal unit FKO=GetAttacker()local unit TMI=GetTriggerUnit()local unit SourceHerolocal integer NGI=GetUnitAbilityLevel(FKO,(1093684551))local unit QHI=CreateUnit(GetOwningPlayer(FKO),1697656901,GetUnitX(FKO),GetUnitY(FKO),0)if NGI>0 thencall SaveInteger(XY,(GetHandleId(TMI)),(203),(NGI))elseset NGI=(LoadInteger(XY,(GetHandleId(TMI)),(203)))endifif IsUnitEnemy(TMI,GetOwningPlayer(FKO))==true thencall QTI(QHI,(1093684552))call SetUnitAbilityLevel(QHI,(1093684552),NGI)call IssueTargetOrder(QHI,"bloodlust",FKO)endifendfunctionfunction L41 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function IP4))call TriggerAddAction(t,function IQ4)endfunctionfunction IU4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local integer MFI=(LoadInteger(XY,(MKI),(34)))local real TSIlocal integer BP1local unit QT1if NGI==1 thenset TSI=15set BP1=10elseif NGI==2 thenset TSI=20set BP1=12elseif NGI==3 thenset TSI=25set BP1=14elseif NGI==4 thenset TSI=30set BP1=16endifif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT thenif GetTriggerEvalCount(t)>1 and GetSpellAbilityId()==1093686065 and MBI(GetSpellTargetUnit())==false and TMI==GetSpellTargetUnit()thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)endifelseif GetTriggerEventId()==EVENT_PLAYER_UNIT_DEATH thenset QT1=GetKillingUnit()if T7I(QT1)thenset QT1=(K1[GetPlayerId(GetOwningPlayer((QT1)))])endifif GetTriggerUnit()==TMI or QT1==TMI thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)call UnitRemoveAbility(TMI,1093752627)call UnitRemoveAbility(TMI,1110459471)endifelseset MFI=MFI+1call SaveInteger(XY,(MKI),(34),(MFI))if MFI==BP1 or GetUnitAbilityLevel(TMI,1110459471)==0 or T6I(TMI)==true thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)call UnitRemoveAbility(TMI,1093752627)call UnitRemoveAbility(TMI,1110459471)endifcall TKI(TLI,TMI,1,TSI)endifset t=nullset TLI=nullset TMI=nullset QT1=nullreturn falseendfunctionfunction O04 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093686065)local real TSIlocal real BP1call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Demon\\ReviveDemon\\ReviveDemon.mdl",TMI,"overhead"))call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093752627,false)call QTI(TMI,1093752627)call UnitMakeAbilityPermanent(TMI,true,1093752626)call TriggerRegisterTimerEvent(t,1,true)call Q9I(t,EVENT_PLAYER_UNIT_DEATH)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function IU4))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveInteger(XY,(MKI),(34),(0))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("Abilities\\Spells\\Other\\SoulBurn\\SoulBurnbuff.mdl",TMI,"overhead")))set TLI=nullset TMI=nullset t=nullendfunctionfunction OI4 takes nothing returns nothingif GetUnitAbilityLevel(GetEnumUnit(),1110459471)>0 thenset ESI=ESI+1endifendfunctionfunction O14 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local group g=MDI()set CK=TLIset ESI=0call GroupEnumUnitsInRange(g,0,0,9999,Condition(function AT1))call ForGroup(g,function OI4)call MCI(g)if ESI==0 thenif GetUnitAbilityLevel(TLI,1110459738)>0 thencall UnitRemoveAbility(TLI,1093812562)call UnitRemoveAbility(TLI,1093812563)call UnitRemoveAbility(TLI,1093812565)call UnitRemoveAbility(TLI,1093812564)call UnitRemoveAbility(TLI,1093812561)call UnitRemoveAbility(TLI,1093812560)call UnitRemoveAbility(TLI,1110459738)endifelseif ESI==1 thenif GetUnitAbilityLevel(TLI,1093812562)==0 thencall UnitRemoveAbility(TLI,1093812562)call UnitRemoveAbility(TLI,1093812563)call UnitRemoveAbility(TLI,1093812565)call UnitRemoveAbility(TLI,1093812564)call UnitRemoveAbility(TLI,1093812561)call UnitRemoveAbility(TLI,1093812560)call UnitRemoveAbility(TLI,1110459738)call UnitAddAbility(TLI,1093812562)endifelseif ESI==2 thenif GetUnitAbilityLevel(TLI,1093812563)==0 thencall UnitRemoveAbility(TLI,1093812562)call UnitRemoveAbility(TLI,1093812563)call UnitRemoveAbility(TLI,1093812565)call UnitRemoveAbility(TLI,1093812564)call UnitRemoveAbility(TLI,1093812561)call UnitRemoveAbility(TLI,1093812560)call UnitRemoveAbility(TLI,1110459738)call UnitAddAbility(TLI,1093812563)endifelseif ESI==3 thenif GetUnitAbilityLevel(TLI,1093812565)==0 thencall UnitRemoveAbility(TLI,1093812562)call UnitRemoveAbility(TLI,1093812563)call UnitRemoveAbility(TLI,1093812565)call UnitRemoveAbility(TLI,1093812564)call UnitRemoveAbility(TLI,1093812561)call UnitRemoveAbility(TLI,1093812560)call UnitRemoveAbility(TLI,1110459738)call UnitAddAbility(TLI,1093812565)endifelseif ESI==4 thenif GetUnitAbilityLevel(TLI,1093812564)==0 thencall UnitRemoveAbility(TLI,1093812562)call UnitRemoveAbility(TLI,1093812563)call UnitRemoveAbility(TLI,1093812565)call UnitRemoveAbility(TLI,1093812564)call UnitRemoveAbility(TLI,1093812561)call UnitRemoveAbility(TLI,1093812560)call UnitRemoveAbility(TLI,1110459738)call UnitAddAbility(TLI,1093812564)endifelseif ESI==5 thenif GetUnitAbilityLevel(TLI,1093812561)==0 thencall UnitRemoveAbility(TLI,1093812562)call UnitRemoveAbility(TLI,1093812563)call UnitRemoveAbility(TLI,1093812565)call UnitRemoveAbility(TLI,1093812564)call UnitRemoveAbility(TLI,1093812561)call UnitRemoveAbility(TLI,1093812560)call UnitRemoveAbility(TLI,1110459738)call UnitAddAbility(TLI,1093812561)endifelseif ESI>=6 thenif GetUnitAbilityLevel(TLI,1093812560)==0 thencall UnitRemoveAbility(TLI,1093812562)call UnitRemoveAbility(TLI,1093812563)call UnitRemoveAbility(TLI,1093812565)call UnitRemoveAbility(TLI,1093812564)call UnitRemoveAbility(TLI,1093812561)call UnitRemoveAbility(TLI,1093812560)call UnitRemoveAbility(TLI,1110459738)call UnitAddAbility(TLI,1093812560)endifendifset t=nullset TLI=nullreturn falseendfunctionfunction OO4 takes nothing returns booleanif GetSpellAbilityId()==1093686065 and MBI(GetSpellTargetUnit())==false thencall O04()endifreturn falseendfunctionfunction O24 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()call TriggerRegisterTimerEvent(t,0.1,true)call TriggerAddCondition(t,Condition(function O14))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093812562,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093812563,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093812565,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093812564,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093812561,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093812560,false)set t=nullendfunctionfunction O34 takes nothing returns booleanif GetLearnedSkill()==1093686065 and GetUnitAbilityLevel(GetTriggerUnit(),1093686065)==1 and IsUnitIllusion(GetTriggerUnit())==false thencall O24()endifreturn falseendfunctionfunction YG1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function OO4))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function O34))set t=nullendfunctionfunction O44 takes nothing returns booleanreturn(IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))and GetUnitAbilityLevel(GetFilterUnit(),1110454328)==0 and GetUnitAbilityLevel(GetFilterUnit(),1113815395)==0endfunctionfunction O54 takes integer MKI,integer O64 returns nothinglocal integer i=1loopexitwhen i>O64call DestroyEffect((LoadEffectHandle(XY,(MKI),(2700+i))))set i=i+1endloopendfunctionfunction O74 takes nothing returns nothingcall UnitWakeUp(GetEnumUnit())call IssueTargetOrder(GetEnumUnit(),"attack",ETI)endfunctionfunction O84 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local group g=(LoadGroupHandle(XY,(MKI),(220)))local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local integer O64=(LoadInteger(XY,(MKI),(365)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local integer MFI=(LoadInteger(XY,(MKI),(34)))if GetTriggerEventId()!=EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER and GetTriggerEventId()!=EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER and GetTriggerEventId()!=EVENT_PLAYER_UNIT_ISSUED_ORDER thenset MFI=MFI+1call SaveInteger(XY,(MKI),(34),(MFI))if MFI==(8+2*NGI)thencall UnitRemoveAbility(N0I,1093683509)call MCI(g)call O54(MKI,O64)call FlushChildHashtable(XY,(MKI))call MZI(t)elsecall DisableTrigger(t)set ETI=N0Icall ForGroup(g,function O74)call EnableTrigger(t)endifelseif IsUnitInGroup(GetTriggerUnit(),g)==true and UnitIsSleeping(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1110454328)==0 and GetIssuedOrderId()!=851973 and EMI==false thencall DisableTrigger(t)call IssueTargetOrder(GetTriggerUnit(),"attack",N0I)call EnableTrigger(t)endifendifset t=nullset g=nullset N0I=nullreturn falseendfunctionfunction O94 takes nothing returns nothingset TJ=TJ+1call SaveEffectHandle(XY,(KK),(2700+TJ),(AddSpecialEffectTarget("Abilities\\Weapons\\LavaSpawnMissile\\LavaSpawnBirthMissile.mdl",GetEnumUnit(),"chest")))endfunctionfunction OA4 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit N0I=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(N0I,1093683510)local group g=MDI()call QTI(N0I,1093683509)call SetUnitAbilityLevel(N0I,1093683509,NGI)set CK=N0Iset ETI=N0Iset TJ=0set KK=MKIcall GroupEnumUnitsInRange(g,GetUnitX(N0I),GetUnitY(N0I),325,Condition(function O44))call ForGroup(g,function O94)call ForGroup(g,function O74)call SaveInteger(XY,(MKI),(365),(TJ))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveGroupHandle(XY,(MKI),(220),(g))call SaveInteger(XY,(MKI),(5),(NGI))call SaveInteger(XY,(MKI),(34),(0))call TriggerRegisterTimerEvent(t,0.2,true)call Q9I(t,EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER)call Q9I(t,EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER)call Q9I(t,EVENT_PLAYER_UNIT_ISSUED_ORDER)call TriggerAddCondition(t,Condition(function O84))set t=nullset g=nullset N0I=nullendfunctionfunction OB4 takes nothing returns booleanif GetSpellAbilityId()==1093683510 thencall OA4()endifreturn falseendfunctionfunction YZ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function OB4))set t=nullendfunctionfunction OC4 takes nothing returns nothingcall DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl",GetEnumUnit(),"origin"))call TKI(GetTriggerUnit(),GetEnumUnit(),2,GetUnitAbilityLevel(GetTriggerUnit(),1093681974)*35+65)endfunctionfunction OD4 takes nothing returns nothinglocal group glocal unit N0I=GetTriggerUnit()local integer MFI=(LoadInteger(XY,(GetHandleId(N0I)),(823)))if GetRandomReal(0,100)<(MFI+1)*4.092 thenset g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(N0I),GetUnitY(N0I),300,Condition(function AM1))call ForGroup(g,function OC4)call SetUnitAnimation(N0I,"spin")call UUI(N0I,0.6)call MPI(N0I,4267,0.5-0.05*GetUnitAbilityLevel(GetTriggerUnit(),1093681974))call SaveInteger(XY,(GetHandleId(N0I)),(823),(0))call MCI(g)elsecall SaveInteger(XY,(GetHandleId(N0I)),(823),(MFI+1))endifset g=nullset N0I=nullendfunctionfunction OE4 takes nothing returns booleanif GetUnitAbilityLevel(GetTriggerUnit(),1110455120)>0 and IsUnitType(GetAttacker(),UNIT_TYPE_STRUCTURE)==false and IsUnitType(GetAttacker(),UNIT_TYPE_MECHANICAL)==false and GetUnitAbilityLevel(GetAttacker(),1093678162)==0 and IsUnitAlly(GetAttacker(),GetOwningPlayer(GetTriggerUnit()))==false and((LoadInteger(XY,(GetHandleId((GetTriggerUnit()))),((4267))))==1)==false thencall OD4()endifreturn falseendfunctionfunction YH1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function OE4))set t=nullendfunctionfunction OF4 takes nothing returns nothingcall SetPlayerAbilityAvailable(GetOwningPlayer(GetEnumUnit()),1093814595,false)call O41(GetEnumUnit(),1093814595,1,ERI,1110459990)endfunctionconstant function CullingBlade_RawCode takes nothing returns integerreturn 1093682482endfunctionfunction OG4 takes nothing returns booleanreturn GetSpellAbilityId()==(1093682482)or GetSpellAbilityId()==1093750098endfunctionfunction OH4 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local real IZ4=GetUnitState(TMI,UNIT_STATE_LIFE)local integer NGI=GetUnitAbilityLevel(N0I,(1093682482))local unit QHIlocal boolean OZ4=falselocal group glocal integer OV4=250local integer OW4=350local integer OX4=450set ERI=6if NGI==0 thenset NGI=GetUnitAbilityLevel(N0I,1093750098)set OZ4=trueset OV4=300set OW4=450set OX4=625set ERI=10endifif(IZ4<=OV4 and NGI==1)or(IZ4<=OW4 and NGI==2)or(IZ4<=OX4 and NGI==3)thenif IsUnitType(TMI,UNIT_TYPE_HERO)thenif OZ4 thencall UnitRemoveAbility(N0I,1093750098)call UnitAddAbility(N0I,1093750098)call SetUnitAbilityLevel(N0I,1093750098,NGI)elsecall UnitRemoveAbility(N0I,1093682482)call UnitAddAbility(N0I,1093682482)call SetUnitAbilityLevel(N0I,1093682482,NGI)endifendifcall PlaySoundOnUnitBJ(FC,100,TMI)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile.mdl",TMI,"overhead"))set QHI=CreateUnit(GetOwningPlayer(N0I),1697656901,0,0,0)call UnitRemoveBuffs(TMI,true,true)call UnitRemoveAbility(TMI,1097167980)call UnitDamageTarget(QHI,TMI,100000000.00,true,false,ATTACK_TYPE_MELEE,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\AxeUltiMSFX_01.mdx",N0I,"origin"))set g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(N0I),GetUnitY(N0I),925,Condition(function BD1))call ForGroup(g,function OF4)call MCI(g)set g=nullendifendfunctionfunction YV1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function OG4))call TriggerAddAction(t,function OH4)endfunctionfunction OY4 takes nothing returns booleanreturn GetSpellAbilityId()==1093683019 and MBI(GetSpellTargetUnit())==falseendfunctionfunction OJ4 takes nothing returns nothingcall UnitDamageTargetBJ(GetTriggerUnit(),GetSpellTargetUnit(),20+70*GetUnitAbilityLevel(GetTriggerUnit(),1093683019),ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC)if GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)>1 thencall SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+20+70*GetUnitAbilityLevel(GetTriggerUnit(),1093683019))endifcall DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIil\\AIilTarget.mdl",GetSpellTargetUnit(),"origin"))endfunctionfunction OK4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer TRI=(LoadInteger(XY,(MKI),(30)))local unit TMI=M6I(TRI)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local player p=(LoadPlayerHandle(XY,(MKI),(54)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local unit QHIif GetUnitAbilityLevel(TMI,1110454854)==0 thencall SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093678169,true)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093816121,false)call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED and GetTriggerUnit()==TMI thencall SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093678169,true)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093816121,false)call UnitRemoveAbility(TMI,1110454854)set QHI=CreateUnit(p,1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call QTI(QHI,1093678169)call SetUnitAbilityLevel(QHI,1093678169,NGI)call IssueTargetOrder(QHI,"sleep",GetAttacker())call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEventId()!=EVENT_PLAYER_UNIT_ATTACKED thenif GetUnitState(TMI,UNIT_STATE_LIFE)>21 thencall SetUnitState(TMI,UNIT_STATE_LIFE,GetUnitState(TMI,UNIT_STATE_LIFE)-20)elsecall SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093678169,true)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093816121,false)call UnitRemoveAbility(TMI,1110454854)call TKI(TLI,TMI,1,50)call FlushChildHashtable(XY,(MKI))call MZI(t)endifendifset t=nullset p=nullset QHI=nullset TMI=nullset TLI=nullreturn falseendfunctionfunction OL4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)set MKI=GetHandleId(t)call SaveInteger(XY,(MKI),(30),(M8I(TMI)))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SavePlayerHandle(XY,(MKI),(54),(GetOwningPlayer(TLI)))call SaveInteger(XY,(MKI),(5),(GetUnitAbilityLevel(TLI,1093678169)))call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function OK4))if GetUnitAbilityLevel(TMI,1093678169)>0 thencall SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093678169,false)call QTI(TMI,1093816121)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093816121,true)endifset NO0=truecall TKI(TLI,TMI,2,0)set NO0=falseset TLI=nullset TMI=nullset t=nullendfunctionfunction OM4 takes nothing returns booleanif GetSpellAbilityId()==1093678169 and T4I(GetSpellTargetUnit())==false thencall OL4()endifreturn falseendfunctionfunction ON4 takes nothing returns booleanif GetSpellAbilityId()==1093678169 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==true thenif GetOwningPlayer(GetTriggerUnit())!=GetOwningPlayer(GetSpellTargetUnit())and IsUnitAlly(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))and(LoadBoolean(XY,(GetHandleId(GetOwningPlayer(GetSpellTargetUnit()))),(139)))thencall R6I(GetTriggerUnit())call R1I(GetOwningPlayer(GetTriggerUnit()),GetObjectName(1848652600))endifendifreturn falseendfunctionfunction OS4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))call FlushChildHashtable(XY,(MKI))call MZI(t)call UnitRemoveAbility(TLI,1110454854)call UnitRemoveAbility(TLI,1093816121)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093678169,true)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093816121,false)set t=nullset TLI=nullreturn falseendfunctionfunction OT4 takes nothing returns booleanlocal trigger tif GetIssuedOrderId()==String2OrderIdBJ("manashieldon")and GetUnitAbilityLevel(GetTriggerUnit(),1093816121)>0 thenset t=CreateTrigger()call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function OS4))call SaveUnitHandle(XY,(GetHandleId(t)),(2),(GetTriggerUnit()))endifreturn falseendfunctionfunction YW1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function OM4))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function ON4))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ISSUED_ORDER)call TriggerAddCondition(t,Condition(function OT4))set t=nullendfunctionfunction OR4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real QDOlocal integer MFI=6local fogmodifier QYI=(LoadFogModifierHandle(XY,(MKI),(42)))if GetUnitAbilityLevel(TLI,1093747769)>0 thenset MFI=8endifif GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST thencall FogModifierStop(QYI)call DestroyFogModifier(QYI)call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEvalCount(t)>MFI thencall FogModifierStop(QYI)call DestroyFogModifier(QYI)call FlushChildHashtable(XY,(MKI))call MZI(t)call R6I(TLI)elseset QDO=RMinBJ(0.05*GetUnitState(TMI,UNIT_STATE_MAX_MANA),GetUnitState(TMI,UNIT_STATE_MANA))if GetUnitAbilityLevel(TLI,1093747769)>0 thenset QDO=RMinBJ(0.1*GetUnitState(TMI,UNIT_STATE_MAX_MANA),GetUnitState(TMI,UNIT_STATE_MANA))endifif QDO>0 thencall SetUnitState(TLI,UNIT_STATE_MANA,GetUnitState(TLI,UNIT_STATE_MANA)+QDO)call SetUnitState(TMI,UNIT_STATE_MANA,GetUnitState(TMI,UNIT_STATE_MANA)-QDO)endifendifset t=nullset TLI=nullset TMI=nullset QYI=nullreturn falseendfunctionfunction OP4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local fogmodifier QYI=CreateFogModifierRadius(GetOwningPlayer(TLI),FOG_OF_WAR_VISIBLE,GetUnitX(TMI),GetUnitY(TMI),350,true,true)call FogModifierStart(QYI)call UnitRemoveAbility(TMI,1110454854)call UnitRemoveAbility(TMI,1112896368)call UnitRemoveAbility(TMI,1114993524)call TriggerRegisterTimerEvent(t,1,true)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_ENDCAST)call TriggerAddCondition(t,Condition(function OR4))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveFogModifierHandle(XY,(MKI),(42),(QYI))set TLI=nullset TMI=nullset t=nullset QYI=nullendfunctionfunction OQ4 takes nothing returns booleanif GetSpellAbilityId()==1093677649 or GetSpellAbilityId()==1093747769 thencall OP4()endifreturn falseendfunctionfunction YX1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function OQ4))set t=nullendfunctionfunction OU4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real YSO=(LoadReal(XY,(GetHandleId(TMI)),(789)))call FlushChildHashtable(XY,(MKI))call MZI(t)if GetTriggerEventId()==EVENT_WIDGET_DEATH or YSO<(TimerGetElapsed(M))thencall UnitRemoveAbility(TMI,1093816135)call UnitRemoveAbility(TMI,1093816129)call UnitRemoveAbility(TMI,1093816134)call UnitRemoveAbility(TMI,1093816136)call UnitRemoveAbility(TMI,1110460229)endifset t=nullset TMI=nullreturn falseendfunctionfunction A04 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093816137)if NGI==1 thencall UnitRemoveAbility(TMI,1110460229)call UnitRemoveAbility(TMI,1093816129)call UnitRemoveAbility(TMI,1093816134)call UnitRemoveAbility(TMI,1093816136)call QTI(TMI,1093816135)call UnitMakeAbilityPermanent(TMI,true,1093816132)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093816135,false)elseif NGI==2 thencall UnitRemoveAbility(TMI,1110460229)call UnitRemoveAbility(TMI,1093816135)call UnitRemoveAbility(TMI,1093816134)call UnitRemoveAbility(TMI,1093816136)call QTI(TMI,1093816129)call UnitMakeAbilityPermanent(TMI,true,1093816133)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093816129,false)elseif NGI==3 thencall UnitRemoveAbility(TMI,1110460229)call UnitRemoveAbility(TMI,1093816135)call UnitRemoveAbility(TMI,1093816129)call UnitRemoveAbility(TMI,1093816136)call QTI(TMI,1093816134)call UnitMakeAbilityPermanent(TMI,true,1093816131)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093816134,false)elseif NGI==4 thencall UnitRemoveAbility(TMI,1110460229)call UnitRemoveAbility(TMI,1093816135)call UnitRemoveAbility(TMI,1093816129)call UnitRemoveAbility(TMI,1093816134)call QTI(TMI,1093816136)call UnitMakeAbilityPermanent(TMI,true,1093816130)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093816136,false)endifcall TriggerRegisterTimerEvent(t,20,false)call TriggerRegisterDeathEvent(t,TMI)call TriggerAddCondition(t,Condition(function OU4))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveReal(XY,(GetHandleId(TMI)),(789),((19.9+(TimerGetElapsed(M)))*1.0))set t=nullset TLI=nullset TMI=nullendfunctionfunction AI4 takes nothing returns booleanif GetSpellAbilityId()==1093816137 and MBI(GetSpellTargetUnit())==false thencall A04()endifreturn falseendfunctionfunction YY1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function AI4))set t=nullendfunctionfunction A14 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer MFI=(LoadInteger(XY,(GetHandleId(TMI)),(281)))local boolean AO4=(LoadBoolean(XY,(MKI),(280)))local real C11if GetTriggerEventId()==EVENT_UNIT_DEATH thencall SetUnitTurnSpeed(TMI,GetUnitDefaultTurnSpeed(TMI))call SaveInteger(XY,(GetHandleId(TMI)),(281),(0))call FlushChildHashtable(XY,(MKI))call MZI(t)call CG1(TMI,0,0)elseif MFI==0 thencall SetUnitTurnSpeed(TMI,GetUnitDefaultTurnSpeed(TMI))call SaveInteger(XY,(GetHandleId(TMI)),(281),(0))call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEventId()==EVENT_UNIT_DAMAGED and AO4==false thenif MFI>0 and GetUnitAbilityLevel(GetEventDamageSource(),1093748044)>0 and(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(2)))==GetEventDamageSource()thencall SaveBoolean(XY,(MKI),(280),(true))if F6I thencall DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\LordofFlameMissile\\LordofFlameMissile.mdl",TMI,"chest"))set C11=0.5*(5+5*GetUnitAbilityLevel(TLI,1093748044))*MFIelseif LU0==false and GetEventDamage()>12 thencall DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\LordofFlameMissile\\LordofFlameMissile.mdl",TMI,"chest"))set C11=(5+5*GetUnitAbilityLevel(TLI,1093748044))*MFIendifif IsUnitType(TMI,UNIT_TYPE_HERO)==false thenset C11=C11*0.5endifif F6I thencall TKI(TLI,TMI,1,C11)elseif LU0==false and GetEventDamage()>12 thencall TKI(TLI,TMI,1,C11)endifcall SaveBoolean(XY,(MKI),(280),(false))endifelsecall SetUnitTurnSpeed(TMI,GetUnitDefaultTurnSpeed(TMI)*0.3)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction A24 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real FNO=(LoadReal(XY,(GetHandleId(TMI)),(675)))local integer StickyCount=(LoadInteger(XY,(GetHandleId(TMI)),(281)))if(TimerGetElapsed(M))-FNO>=8 thencall SetUnitTurnSpeed(TMI,GetUnitDefaultTurnSpeed(TMI))call SaveInteger(XY,(GetHandleId(TMI)),(281),(0))call CG1(TMI,0,0)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction A34 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetEnumUnit()local trigger tlocal integer MKIlocal integer NGI=GetUnitAbilityLevel(TLI,1093748044)local integer MFI=IMinBJ((LoadInteger(XY,(GetHandleId(TMI)),(281)))+1,10)if T6I(TMI)thenset TLI=nullset TMI=nullreturnendifcall CG1(TMI,NGI,MFI)call SaveInteger(XY,(GetHandleId(TMI)),(281),(MFI))call SaveReal(XY,(GetHandleId(TMI)),(675),(((TimerGetElapsed(M)))*1.0))call SetUnitTurnSpeed(TMI,GetUnitDefaultTurnSpeed(TMI)*0.3)if IsUnitType(TMI,UNIT_TYPE_HERO)==true thencall Q7I(GetOwningPlayer(TLI),I2S(MFI)+"!",2,TMI,0.026,50,0,255,216)endifif MFI==1 thenset t=CreateTrigger()set MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveBoolean(XY,(MKI),(280),(false))call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function A14))endifset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,8,false)call TriggerAddCondition(t,Condition(function A24))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))set t=nullset TLI=nullset TMI=nullendfunctionfunction A44 takes nothing returns nothinglocal group g=MDI()local location l=GetSpellTargetLoc()local real x=GetLocationX(l)local real y=GetLocationY(l)local unit TLI=GetTriggerUnit()call GroupEnumUnitsInRange(g,x,y,400,Condition(function AK1))call ForGroup(g,function A34)call QJI(GetOwningPlayer(TLI),2,x,y,500)call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UndeadBlood\\UndeadBloodGargoyle.mdl",x,y))call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UndeadBlood\\UndeadBloodGargoyle.mdl",x,y+130))call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UndeadBlood\\UndeadBloodGargoyle.mdl",x,y-130))call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UndeadBlood\\UndeadBloodGargoyle.mdl",x+130,y))call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UndeadBlood\\UndeadBloodGargoyle.mdl",x+130,y+130))call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UndeadBlood\\UndeadBloodGargoyle.mdl",x+130,y-130))call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UndeadBlood\\UndeadBloodGargoyle.mdl",x-130,y))call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UndeadBlood\\UndeadBloodGargoyle.mdl",x-130,y+130))call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UndeadBlood\\UndeadBloodGargoyle.mdl",x-130,y-130))call RemoveLocation(l)call MCI(g)set g=nullset l=nullset TLI=nullendfunctionfunction A54 takes nothing returns booleanif GetSpellAbilityId()==1093748044 thencall A44()endifreturn falseendfunctionfunction S41 takes nothing returns nothinglocal integer ilocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function A54))set EPI[1]=1093752899set EPI[2]=1093752898set EPI[3]=1093752884set EPI[4]=1093752885set EPI[5]=1093752886set EPI[6]=1093752887set EPI[7]=1093752897set EPI[8]=1093752888set EPI[9]=1093752889set EPI[10]=1093752900set EQI[1]=1093752909set EQI[2]=1093752901set EQI[3]=1093752902set EQI[4]=1093752903set EQI[5]=1093752904set EQI[6]=1093752905set EQI[7]=1093752906set EQI[8]=1093752907set EQI[9]=1093752910set EQI[10]=1093752908set EUI[1]=1093752911set EUI[2]=1093752918set EUI[3]=1093752919set EUI[4]=1093752913set EUI[5]=1093752914set EUI[6]=1093752915set EUI[7]=1093752920set EUI[8]=1093752916set EUI[9]=1093752917set EUI[10]=1093752912set F0I[1]=1093752921set F0I[2]=1093752922set F0I[3]=1093753141set F0I[4]=1093753142set F0I[5]=1093753143set F0I[6]=1093753137set F0I[7]=1093753138set F0I[8]=1093753139set F0I[9]=1093753140set F0I[10]=1093753136set i=1loopexitwhen i>10call RVI(EPI[i])set i=i+1endloopset i=1loopexitwhen i>10call RVI(EQI[i])set i=i+1endloopset i=1loopexitwhen i>10call RVI(EUI[i])set i=i+1endloopset i=1loopexitwhen i>10call RVI(F0I[i])set i=i+1endloopset t=nullendfunctionfunction A64 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real a=(LoadReal(XY,(MKI),(137)))local real d=(LoadReal(XY,(MKI),(138)))local real x1=(LoadReal(XY,(MKI),(6)))local real y1=(LoadReal(XY,(MKI),(7)))local real x2local real y2local real xlocal real yif GetTriggerEventId()==EVENT_UNIT_DEATH or GetTriggerEvalCount(t)>10 thencall QEI(GetUnitX(TMI),GetUnitY(TMI),200)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)elseset x2=x1+d*Cos(a)set y2=y1+d*Sin(a)if(IsPointInRegion(XN,((x2)*1.0),((y2)*1.0)))==false thencall SaveReal(XY,(MKI),(6),((x2)*1.0))call SaveReal(XY,(MKI),(7),((y2)*1.0))set x=x2set y=y2elseset x=x1set y=y1endifif IsUnitType(TMI,UNIT_TYPE_HERO)==true thencall SetUnitPosition(TMI,x,y)elsecall SetUnitX(TMI,x)call SetUnitY(TMI,y)endifendifset t=nullset TMI=nullreturn falseendfunctionfunction A74 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetEnumUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093744982)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.03,true)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function A64))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveReal(XY,(MKI),(137),((Atan2(GetUnitY(TMI)-F3I,GetUnitX(TMI)-F2I))*1.0))call SaveReal(XY,(MKI),(138),((RQI((400-PAI(F2I,F3I,GetUnitX(TMI),GetUnitY(TMI))),10)/10)*1.0))call SaveReal(XY,(MKI),(6),((GetUnitX(TMI))*1.0))call SaveReal(XY,(MKI),(7),((GetUnitY(TMI))*1.0))set TLI=nullset TMI=nullset t=nullcall TKI(FII,GetEnumUnit(),1,FOI*75)endfunctionfunction A84 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real a=(LoadReal(XY,(MKI),(137)))local group g=MDI()local unit TMIlocal real x=GetUnitX(QHI)local real y=GetUnitY(QHI)local real A94=(LoadReal(XY,(MKI),(6)))local real AA4=(LoadReal(XY,(MKI),(7)))set x=RCI(x+36*Cos(a))set y=RGI(y+36*Sin(a))call SetUnitX(QHI,x)call SetUnitY(QHI,y)set CK=QHIcall GroupEnumUnitsInRange(g,x,y,125,Condition(function AU1))set TMI=FirstOfGroup(g)call MCI(g)if PAI(x,y,A94,AA4)<40 or GetTriggerEvalCount(t)>100 thenset TMI=nullset x=A94set y=AA4set FII=TLIset FOI=(LoadInteger(XY,(MKI),(5)))set F1I=TMIif TMI==null thenset F2I=xset F3I=yelseset F2I=GetUnitX(TMI)set F3I=GetUnitY(TMI)endifset g=MDI()call GroupEnumUnitsInRange(g,x,y,400,Condition(function AU1))if TMI!=null thencall GroupRemoveUnit(g,TMI)call BQ1(TLI,TMI,0.3)call TKI(FII,TMI,1,FOI*75)endifcall ForGroup(g,function A74)call KillUnit(QHI)call MCI(g)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TMI=nullset QHI=nullset TLI=nullset g=nullreturn falseendfunctionfunction AB4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local location l=GetSpellTargetLoc()local real x=GetLocationX(l)local real y=GetLocationY(l)local real a=Atan2(y-GetUnitY(TLI),x-GetUnitX(TLI))local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer NGI=GetUnitAbilityLevel(TLI,1093744982)local unit QHIcall RemoveLocation(l)set QHI=CreateUnit(GetOwningPlayer(TLI),1747993924,GetUnitX(TLI),GetUnitY(TLI),a*bj_RADTODEG)call SaveReal(XY,(MKI),(137),((a)*1.0))call SaveInteger(XY,(MKI),(5),(NGI))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))call TriggerRegisterTimerEvent(t,0.04,true)call TriggerAddCondition(t,Condition(function A84))set TLI=nullset QHI=nullset l=nullset t=nullendfunctionfunction AC4 takes nothing returns booleanif GetSpellAbilityId()==1093744982 thencall AB4()endifreturn falseendfunctionfunction S51 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function AC4))set t=nullendfunctionfunction AD4 takes nothing returns nothinglocal unit TLI=F4Ilocal unit XIO=GetEnumUnit()local unit TMIlocal group gif GetUnitCurrentOrder(XIO)==0 thenset g=MDI()set CK=XIOcall GroupEnumUnitsInRange(g,GetUnitX(XIO),GetUnitY(XIO),825,Condition(function AT1))set TMI=FirstOfGroup(g)if TMI!=null thencall GroupRemoveUnit(g,TMI)endifif FirstOfGroup(g)==null and TMI==TLI thencall IssueTargetOrder(XIO,"attack",TMI)endifcall MCI(g)set TMI=nullset g=nullendifset TLI=nullset XIO=nullendfunctionfunction AE4 takes unit TLI returns nothinglocal group g=MDI()set CK=TLIset F4I=TLIcall GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),1000,Condition(function BT1))call ForGroup(g,function AD4)call MCI(g)set g=nullendfunctionfunction AF4 takes nothing returns nothingcall TKI(F4I,GetEnumUnit(),1,F7I*10)endfunctionfunction AG4 takes unit TLI,integer MKI,integer MFI returns nothinglocal group g1=MDI()local group g2=MDI()local integer i=0set CK=TLIloopexitwhen i>MFIcall GroupEnumUnitsInRange(g2,(LoadReal(XY,(MKI),(2300+i))),(LoadReal(XY,(MKI),(2500+i))),225,Condition(function AT1))call GroupAddGroup(g2,g1)call GroupClear(g2)set i=i+1endloopcall MCI(g2)if FirstOfGroup(g1)!=null thenset F4I=TLIset F7I=GetUnitAbilityLevel(TLI,1093744986)set F5I=CreateUnit(GetOwningPlayer(TLI),1697656901,0,0,0)call QTI(F5I,1093744981)call SetUnitAbilityLevel(F5I,1093744981,F7I)call ForGroup(g1,function AF4)endifcall MCI(g1)set g1=nullset g2=nullendfunctionfunction AH4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real PI2=(LoadReal(XY,(MKI),(23)))local real P12=(LoadReal(XY,(MKI),(24)))local integer MFI=(LoadInteger(XY,(MKI),(34)))local integer ilocal real xlocal real yif GetTriggerEventId()==EVENT_UNIT_DEATH or GetTriggerEvalCount(t)>360 thenset i=0loopexitwhen i>MFIcall DestroyEffect((LoadEffectHandle(XY,(MKI),(2700+i))))set i=i+1endloopcall FlushChildHashtable(XY,(MKI))call MZI(t)elseset x=GetUnitX(TLI)set y=GetUnitY(TLI)if C2==true thencall AE4(TLI)endifif PAI(x,y,PI2,P12)>125 thenset MFI=MFI+1call SaveInteger(XY,(MKI),(34),(MFI))call SaveReal(XY,(MKI),(23),((x)*1.0))call SaveReal(XY,(MKI),(24),((y)*1.0))call SaveEffectHandle(XY,(MKI),(2700+MFI),(AddSpecialEffect("Environment\\LargeBuildingFire\\LargeBuildingFire1.mdl",x,y)))call SaveReal(XY,(MKI),(2300+MFI),((x)*1.0))call SaveReal(XY,(MKI),(2500+MFI),((y)*1.0))endifif ModuloInteger(GetTriggerEvalCount(t),10)==0 thenset F6I=truecall AG4(TLI,MKI,MFI)set F6I=falseendifcall QEI(GetUnitX(TLI),GetUnitY(TLI),100)endifreturn falseendfunctionfunction AZ4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.05,true)call TriggerAddCondition(t,Condition(function AH4))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveEffectHandle(XY,(MKI),(2700),(AddSpecialEffect("Environment\\LargeBuildingFire\\LargeBuildingFire1.mdl",GetUnitX(TLI),GetUnitY(TLI))))call SaveReal(XY,(MKI),(23),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(24),((GetUnitY(TLI))*1.0))call SaveReal(XY,(MKI),(2300),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(2500),((GetUnitY(TLI))*1.0))set TLI=nullset t=nullendfunctionfunction AV4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if QPI(TLI)thenreturn falseendifif GetUnitTypeId(TLI)==1328558390 thencall SetUnitFlyHeight(TLI,170,0)elseif GetUnitTypeId(TLI)==1328558391 thencall SetUnitFlyHeight(TLI,220,0)endifset t=nullset TLI=nullreturn falseendfunctionfunction AW4 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()call TriggerRegisterTimerEvent(t,2,true)call TriggerAddCondition(t,Condition(function AV4))call SaveUnitHandle(XY,(MKI),(2),(TLI))set t=nullset TLI=nullendfunctionfunction AX4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))call SetTerrainPathable(x,y,PATHING_TYPE_WALKABILITY,false)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullreturn falseendfunctionfunction AY4 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)call SetTerrainPathable(x,y,PATHING_TYPE_WALKABILITY,true)call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function AX4))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))set TLI=nullset t=nullendfunctionfunction AJ4 takes nothing returns booleanif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT thenif GetSpellAbilityId()==1093744986 thenif GetUnitTypeId(GetTriggerUnit())==1328558390 thencall AZ4()elseif IsTerrainPathable(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),PATHING_TYPE_WALKABILITY)thencall AY4()endifendifelseif GetLearnedSkill()==1093744986 and GetUnitAbilityLevel(GetTriggerUnit(),1093744986)==1 and IsUnitIllusion(GetTriggerUnit())==false thencall AW4()endifendifreturn falseendfunctionfunction S61 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function AJ4))set t=nullendfunctionfunction AK4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local real d=PAI(GetUnitX(TLI),GetUnitY(TLI),GetUnitX(TMI),GetUnitY(TMI))local real alocal real BP1=(LoadReal(XY,(MKI),(57)))local real x0=(LoadReal(XY,(MKI),(282)))local real y0=(LoadReal(XY,(MKI),(283)))local real x1local real y1if GetTriggerEventId()==EVENT_UNIT_DEATH or GetTriggerEvalCount(t)>R2I(20*BP1)thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)call KillUnit(QHI)call SetUnitPathing(TMI,true)call AE1(TLI)call QEI(GetUnitX(TMI),GetUnitY(TMI),175)elsecall SetUnitX(QHI,GetUnitX(TLI))call SetUnitY(QHI,GetUnitY(TLI))if PAI(x0,y0,GetUnitX(TLI),GetUnitY(TLI))>400 thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)call KillUnit(QHI)call SetUnitPathing(TMI,true)call AE1(TLI)call QEI(GetUnitX(TMI),GetUnitY(TMI),175)elsecall SaveReal(XY,(MKI),(282),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(283),((GetUnitY(TLI))*1.0))if d>300 thenset a=Atan2(GetUnitY(TMI)-GetUnitY(TLI),GetUnitX(TMI)-GetUnitX(TLI))set x1=GetUnitX(TLI)+300*Cos(a)set y1=GetUnitY(TLI)+300*Sin(a)if(IsPointInRegion(XN,((x1)*1.0),((y1)*1.0)))==false thencall SetUnitX(TMI,x1)call SetUnitY(TMI,y1)endifendifendifendifset t=nullset TLI=nullset TMI=nullset QHI=nullreturn falseendfunctionfunction AL4 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local unit QHI=CreateUnit(GetOwningPlayer(TLI),1966092377,GetUnitX(TLI),GetUnitY(TLI),0)local integer NGI=GetUnitAbilityLevel(TLI,1093744975)if NGI==0 thenset NGI=GetUnitAbilityLevel(TLI,1093750102)+2endifcall QTI(QHI,1093744974)call SetUnitAbilityLevel(QHI,1093744974,GetUnitAbilityLevel(TLI,1093744975))call IssueTargetOrder(QHI,"magicleash",TMI)call SetUnitPathing(QHI,false)call SetUnitPathing(TMI,false)call AC1(TLI)call TriggerRegisterTimerEvent(t,0.05,true)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function AK4))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveReal(XY,(MKI),(57),((2.5+NGI*0.5)*1.0))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("Abilities\\Spells\\Human\\AerialShackles\\AerialShacklesTarget.mdl",TMI,"chest")))call SaveReal(XY,(MKI),(282),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(283),((GetUnitY(TLI))*1.0))set t=nullset TLI=nullset TMI=nullset QHI=nullendfunctionfunction AM4 takes nothing returns booleanif(GetSpellAbilityId()==1093744975 or GetSpellAbilityId()==1093750102)and MBI(GetSpellTargetUnit())==false and GetUnitTypeId(GetSpellTargetUnit())!=1848651852 thencall AL4()endifreturn falseendfunctionfunction S71 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function AM4))set t=nullendfunctionfunction AN4 takes unit TLI,unit TMI,real NT2 returns nothingcall SetUnitState(TLI,UNIT_STATE_LIFE,GetUnitState(TLI,UNIT_STATE_LIFE)+GetUnitState(TMI,UNIT_STATE_MAX_LIFE)*NT2)call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\HeroBloodElfBlood.mdl",TLI,"overhead"))endfunctionfunction AS4 takes nothing returns booleanif QPI(GetFilterUnit())==false and GetUnitAbilityLevel(GetFilterUnit(),1093684293)>0 and IsUnitEnemy(F8I,GetOwningPlayer(GetFilterUnit()))thencall AN4(GetFilterUnit(),F8I,GetUnitAbilityLevel(GetFilterUnit(),1093684293)*0.1)endifreturn falseendfunctionfunction AT4 takes unit TLI,unit TMI,integer NGI returns nothinglocal group g=MDI()set F8I=TMIcall GroupEnumUnitsInRange(g,GetUnitX(TMI),GetUnitY(TMI),350,Condition(function AS4))call MCI(g)set F8I=nullset g=nullendfunctionfunction AR4 takes nothing returns booleanlocal unit TLI=GetKillingUnit()local unit TMI=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093684293)if IsUnitIllusion(TMI)==false and IsUnitType(TMI,UNIT_TYPE_STRUCTURE)==false and GetUnitTypeId(TMI)!=1848651852 and GetUnitAbilityLevel(TLI,1112433775)==0 thenif IsUnitType(TMI,UNIT_TYPE_HERO)==false thenif NGI>0 thencall AN4(TLI,TMI,NGI*0.05+0.05)endifelseif NGI>0 thencall AN4(TLI,TMI,NGI*0.1)elsecall AT4(TLI,TMI,NGI)endifendifendifset TLI=nullset TMI=nullreturn falseendfunctionfunction YJ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_DEATH)call TriggerAddCondition(t,Condition(function AR4))set t=nullendfunctionfunction AP4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local real PI2=(LoadReal(XY,(MKI),(23)))local real P12=(LoadReal(XY,(MKI),(24)))local real x=GetUnitX(TMI)local real y=GetUnitY(TMI)local real d=SquareRoot((PI2-x)*(PI2-x)+(P12-y)*(P12-y))local real G43=0.2*NGI*dlocal integer X22=(LoadInteger(XY,(MKI),(25)))if GetTriggerEventId()==EVENT_WIDGET_DEATH thencall UnitRemoveAbility(TMI,1093683528)call UnitRemoveAbility(TMI,1110456396)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullset TMI=nullreturn falseendifif d>1300 thenset G43=0endifif G43>5 thencall DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",TMI,"origin"))endifif((LoadInteger(XY,(GetHandleId((TMI))),((2485))))==1)and G43>=GetUnitState(TMI,UNIT_STATE_LIFE)-2 thenset G43=GetUnitState(TMI,UNIT_STATE_LIFE)-2endifif T4I(TMI)thenset G43=0endifif G43>0 and QPI(TMI)==false and A81(TMI)==false thencall TKI(TLI,TMI,6,G43)endifcall SaveReal(XY,(MKI),(23),((x)*1.0))call SaveReal(XY,(MKI),(24),((y)*1.0))call SaveInteger(XY,(MKI),(25),(X22+1))if QPI(TMI)thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseif X22>4*(6+NGI)thencall UnitRemoveAbility(TMI,1093683528)call UnitRemoveAbility(TMI,1110456396)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction AQ4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer NGI=GetUnitAbilityLevel(TLI,1093684296)local real TSI=50+100*NGIcall QTI(TMI,1093683528)call SetUnitAbilityLevel(TMI,1093683528,NGI)call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",TMI,"chest"))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveReal(XY,(MKI),(23),((GetUnitX(TMI))*1.0))call SaveReal(XY,(MKI),(24),((GetUnitY(TMI))*1.0))call SaveInteger(XY,(MKI),(25),(0))call TriggerRegisterTimerEvent(t,0.25,true)call TriggerAddCondition(t,Condition(function AP4))call TriggerRegisterDeathEvent(t,TMI)if((LoadInteger(XY,(GetHandleId((TMI))),((2485))))==1)and TSI>=GetUnitState(TMI,UNIT_STATE_LIFE)-2 thenset TSI=GetUnitState(TMI,UNIT_STATE_LIFE)-2endifif T4I(TMI)thenset TSI=0endifcall TKI(TLI,TMI,6,TSI)set TLI=nullset TMI=nullset t=nullendfunctionfunction AU4 takes nothing returns booleanif GetSpellAbilityId()==1093684296 and MBI(GetSpellTargetUnit())==false thencall AQ4()endifreturn falseendfunctionfunction YK1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function AU4))set t=nullendfunctionfunction B04 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real FM1=(LoadReal(XY,(MKI),(6)))local real FN1=(LoadReal(XY,(MKI),(7)))call FL1(TLI,FM1,FN1,FW1(TLI))call SaveReal(XY,(MKI),(6),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(7),((GetUnitY(TLI))*1.0))set t=nullset TLI=nullreturn falseendfunctionfunction BI4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer i=0local player ploopexitwhen i>5set p=BO[i]if FZI[GetPlayerId(p)]==null or IsPlayerAlly(GetOwningPlayer(TLI),p)==true or A91(FZI[GetPlayerId(p)])thencall SetUnitX(FHI[GetPlayerId(p)],TYI(TLI))call SetUnitY(FHI[GetPlayerId(p)],TJI(TLI))elseif IsUnitVisible(FZI[GetPlayerId(p)],GetOwningPlayer(TLI))==false thencall KillUnit(CreateUnit(GetOwningPlayer(TLI),1865429571,GetUnitX(FZI[GetPlayerId(p)]),GetUnitY(FZI[GetPlayerId(p)]),0))endifcall SetUnitX(FHI[GetPlayerId(p)],GetUnitX(FZI[GetPlayerId(p)]))call SetUnitY(FHI[GetPlayerId(p)],GetUnitY(FZI[GetPlayerId(p)]))endifset p=CO[i]if FZI[GetPlayerId(p)]==null or IsPlayerAlly(GetOwningPlayer(TLI),p)==true or A91(FZI[GetPlayerId(p)])thencall SetUnitX(FHI[GetPlayerId(p)],TYI(TLI))call SetUnitY(FHI[GetPlayerId(p)],TJI(TLI))elseif IsUnitVisible(FZI[GetPlayerId(p)],GetOwningPlayer(TLI))==false thencall KillUnit(CreateUnit(GetOwningPlayer(TLI),1865429571,GetUnitX(FZI[GetPlayerId(p)]),GetUnitY(FZI[GetPlayerId(p)]),0))endifcall SetUnitX(FHI[GetPlayerId(p)],GetUnitX(FZI[GetPlayerId(p)]))call SetUnitY(FHI[GetPlayerId(p)],GetUnitY(FZI[GetPlayerId(p)]))endifset i=i+1endloopset p=nullset t=nullset TLI=nullreturn falseendfunctionfunction B14 takes unit TMI,player p,boolean G2O returns nothingif G2O thenset FZI[GetPlayerId(GetOwningPlayer(TMI))]=TMIelseset FZI[GetPlayerId(GetOwningPlayer(TMI))]=nullendifendfunctionfunction BO4 takes nothing returns nothinglocal unit QHIif AG1(GetEnumUnit())==false thencall UnitRemoveAbility(GetEnumUnit(),1113875828)call B14(GetEnumUnit(),GetOwningPlayer(FFI),true)elsecall B14(GetEnumUnit(),GetOwningPlayer(FFI),true)if GetUnitAbilityLevel(GetEnumUnit(),1113875828)==0 and GetUnitAbilityLevel(GetEnumUnit(),1110454356)==0 and GetUnitAbilityLevel(GetEnumUnit(),1110454348)==0 thenset QHI=CreateUnit(GetOwningPlayer(FFI),1697656901,GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),0)call UnitAddAbility(QHI,1093817943)call IssueImmediateOrderById(QHI,852625)set QHI=nullendifendifendfunctionfunction B24 takes nothing returns nothinglocal real W03=0.5if QPI(FFI)==true or IsUnitInGroup(GetEnumUnit(),FEI)==false or GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)/GetUnitState(GetEnumUnit(),UNIT_STATE_MAX_LIFE)>W03 or(GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)/GetUnitState(GetEnumUnit(),UNIT_STATE_MAX_LIFE)>W03/2 and AG1(GetEnumUnit())==true)thencall GroupRemoveUnit(FDI,GetEnumUnit())call B14(GetEnumUnit(),GetOwningPlayer(FFI),false)call UnitRemoveAbility(GetEnumUnit(),1113875828)endifendfunctionfunction B34 takes nothing returns nothinglocal real W03if QPI(FFI)==false and IsUnitInGroup(GetEnumUnit(),FDI)==false and IsUnitIllusion(GetEnumUnit())==false thenset W03=0.5if GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)/GetUnitState(GetEnumUnit(),UNIT_STATE_MAX_LIFE)<W03 and AG1(GetEnumUnit())==false thencall GroupAddUnit(FDI,GetEnumUnit())elseif GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)/GetUnitState(GetEnumUnit(),UNIT_STATE_MAX_LIFE)<W03/2 thencall GroupAddUnit(FDI,GetEnumUnit())endifendifendfunctionfunction B44 takes unit TLI,integer NGI,integer CH1 returns nothinglocal integer i=1if CH1>0 thenif NGI==1 thencall UnitRemoveAbility(TLI,1110459701)call UnitRemoveAbility(TLI,1110459700)call UnitRemoveAbility(TLI,1110459702)elseif NGI==2 thencall UnitRemoveAbility(TLI,1110455634)call UnitRemoveAbility(TLI,1110459700)call UnitRemoveAbility(TLI,1110459702)elseif NGI==3 thencall UnitRemoveAbility(TLI,1110455634)call UnitRemoveAbility(TLI,1110459701)call UnitRemoveAbility(TLI,1110459702)elseif NGI==4 thencall UnitRemoveAbility(TLI,1110455634)call UnitRemoveAbility(TLI,1110459701)call UnitRemoveAbility(TLI,1110459700)endifelsecall UnitRemoveAbility(TLI,1110455634)call UnitRemoveAbility(TLI,1110459701)call UnitRemoveAbility(TLI,1110459700)call UnitRemoveAbility(TLI,1110459702)endifloopexitwhen i>5if i!=CH1 or NGI!=1 thencall UnitRemoveAbility(TLI,F9I[i])elseif GetUnitAbilityLevel(TLI,F9I[i])==0 thencall UnitRemoveAbility(TLI,1110455634)call UnitAddAbility(TLI,F9I[i])endifset i=i+1endloopset i=1loopexitwhen i>5if i!=CH1 or NGI!=2 thencall UnitRemoveAbility(TLI,FAI[i])elseif GetUnitAbilityLevel(TLI,FAI[i])==0 thencall UnitRemoveAbility(TLI,1110459701)call UnitAddAbility(TLI,FAI[i])endifset i=i+1endloopset i=1loopexitwhen i>5if i!=CH1 or NGI!=3 thencall UnitRemoveAbility(TLI,FBI[i])elseif GetUnitAbilityLevel(TLI,FBI[i])==0 thencall UnitRemoveAbility(TLI,1110459700)call UnitAddAbility(TLI,FBI[i])endifset i=i+1endloopset i=1loopexitwhen i>5if i!=CH1 or NGI!=4 thencall UnitRemoveAbility(TLI,FCI[i])elseif GetUnitAbilityLevel(TLI,FCI[i])==0 thencall UnitRemoveAbility(TLI,1110459702)call UnitAddAbility(TLI,FCI[i])endifset i=i+1endloopendfunctionfunction B54 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local group B64=(LoadGroupHandle(XY,(MKI),(22)))local group g=MDI()local integer NGI=GetUnitAbilityLevel(TLI,1093683512)local integer CH1set CK=TLIset FFI=TLIset FDI=B64set FGI=NGIcall GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),25+25000,Condition(function BW1))call ForGroup(g,function B34)set FEI=gcall ForGroup(FDI,function B24)call ForGroup(FDI,function BO4)if FirstOfGroup(FDI)==null thencall EW1(TLI,0)call UnitRemoveAbility(TLI,1093808436)call B44(TLI,NGI,0)call SaveInteger(XY,(GetHandleId(TLI)),(814),(0))elseset CH1=CountUnitsInGroup(FDI)call EW1(TLI,(5+10*(NGI-1))*CH1)call QTI(TLI,1093808436)call B44(TLI,NGI,RSI(CH1,5))call SaveInteger(XY,(GetHandleId(TLI)),(814),(CH1))endifcall MCI(g)set t=nullset TLI=nullset g=nullset B64=nullreturn falseendfunctionfunction B74 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local player pcall TriggerRegisterTimerEvent(t,0.25,true)call TriggerAddCondition(t,Condition(function B54))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveGroupHandle(XY,(MKI),(22),(MDI()))set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.04,true)call TriggerAddCondition(t,Condition(function BI4))call SaveUnitHandle(XY,(MKI),(2),(TLI))set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.005,true)call TriggerAddCondition(t,Condition(function B04))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(6),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(7),((GetUnitY(TLI))*1.0))set p=BO[1]set FHI[GetPlayerId(p)]=CreateUnit(GetOwningPlayer(TLI),1865429570,TYI(TLI),TJI(TLI),0)set FZI[GetPlayerId(p)]=nullset p=BO[2]set FHI[GetPlayerId(p)]=CreateUnit(GetOwningPlayer(TLI),1865429570,TYI(TLI),TJI(TLI),0)set FZI[GetPlayerId(p)]=nullset p=BO[3]set FHI[GetPlayerId(p)]=CreateUnit(GetOwningPlayer(TLI),1865429570,TYI(TLI),TJI(TLI),0)set FZI[GetPlayerId(p)]=nullset p=BO[4]set FHI[GetPlayerId(p)]=CreateUnit(GetOwningPlayer(TLI),1865429570,TYI(TLI),TJI(TLI),0)set FZI[GetPlayerId(p)]=nullset p=BO[5]set FHI[GetPlayerId(p)]=CreateUnit(GetOwningPlayer(TLI),1865429570,TYI(TLI),TJI(TLI),0)set FZI[GetPlayerId(p)]=nullset p=CO[1]set FHI[GetPlayerId(p)]=CreateUnit(GetOwningPlayer(TLI),1865429570,TYI(TLI),TJI(TLI),0)set FZI[GetPlayerId(p)]=nullset p=CO[2]set FHI[GetPlayerId(p)]=CreateUnit(GetOwningPlayer(TLI),1865429570,TYI(TLI),TJI(TLI),0)set FZI[GetPlayerId(p)]=nullset p=CO[3]set FHI[GetPlayerId(p)]=CreateUnit(GetOwningPlayer(TLI),1865429570,TYI(TLI),TJI(TLI),0)set FZI[GetPlayerId(p)]=nullset p=CO[4]set FHI[GetPlayerId(p)]=CreateUnit(GetOwningPlayer(TLI),1865429570,TYI(TLI),TJI(TLI),0)set FZI[GetPlayerId(p)]=nullset p=CO[5]set FHI[GetPlayerId(p)]=CreateUnit(GetOwningPlayer(TLI),1865429570,TYI(TLI),TJI(TLI),0)set FZI[GetPlayerId(p)]=nullset t=nullset TLI=nullendfunctionfunction B84 takes nothing returns booleanif GetLearnedSkill()==1093683512 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093683512)==1 thencall B74()endifreturn falseendfunctionfunction YM1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function B84))set F9I[1]=1093817656set F9I[2]=1093808215set F9I[3]=1093817657set F9I[4]=1093817654set F9I[5]=1093817655set FAI[1]=1093817667set FAI[2]=1093817668set FAI[3]=1093817665set FAI[4]=1093817666set FAI[5]=1093808218set FBI[1]=1093817670set FBI[2]=1093817669set FBI[3]=1093817671set FBI[4]=1093817672set FBI[5]=1093808216set FCI[1]=1093817676set FCI[2]=1093817676set FCI[3]=1093808217set FCI[4]=1093817674set FCI[5]=1093817673set t=nullendfunctionfunction B94 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local integer NGI=GetUnitAbilityLevel(TLI,1093818425)if GetTriggerEventId()==EVENT_WIDGET_DEATH or GetTriggerEvalCount(t)>20*(5+NGI)thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call FlushChildHashtable(XY,(MKI))call MZI(t)elsecall SetUnitX(QHI,GetUnitX(TMI))call SetUnitY(QHI,GetUnitY(TMI))call IssueTargetOrder(QHI,"soulburn",TMI)if ModuloInteger(GetTriggerEvalCount(t),20)==0 thencall TKI(TLI,TMI,1,20)endifendifset t=nullset TLI=nullset TMI=nullset QHI=nullreturn falseendfunctionfunction BA4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local unit QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)local trigger tlocal integer MKIcall UnitAddAbility(QHI,1093817422)call IssueTargetOrderById(QHI,852275,TMI)if IsUnitAlly(TLI,GetOwningPlayer(TMI))==false thencall UnitRemoveAbility(TMI,1097167980)endifcall UnitAddAbility(QHI,1093818424)call SetUnitAbilityLevel(QHI,1093818424,GetUnitAbilityLevel(TLI,1093818425))set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.05,true)call TriggerRegisterDeathEvent(t,TMI)call TriggerAddCondition(t,Condition(function B94))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveEffectHandle(XY,(MKI),(175),(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\TrollBerserk\\HeadhunterWEAPONSLeft.mdl",TMI,"hand,right")))call SaveEffectHandle(XY,(MKI),(176),(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\TrollBerserk\\HeadhunterWEAPONSLeft.mdl",TMI,"hand,left")))call TriggerEvaluate(t)set t=nullset TLI=nullset TMI=nullset QHI=nullendfunctionfunction BB4 takes nothing returns booleanif GetSpellAbilityId()==1093818425 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==true thenif IsUnitEnemy(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))==false or MBI(GetSpellTargetUnit())==false thencall BA4()endifendifreturn falseendfunctionfunction BC4 takes nothing returns booleanif GetSpellAbilityId()==1093818425 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==true and GetSpellTargetUnit()!=GetTriggerUnit()and IsUnitAlly(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))and(LoadBoolean(XY,(GetHandleId(GetOwningPlayer(GetSpellTargetUnit()))),(139)))thencall R6I(GetTriggerUnit())call R1I(GetOwningPlayer(GetTriggerUnit()),GetObjectName(1848652600))endifreturn falseendfunctionfunction YL1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function BC4))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function BB4))set t=nullendfunctionfunction BD4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit BE4=CreateUnit(GetOwningPlayer(TLI),1865429043,GetSpellTargetX(),GetSpellTargetY(),GetRandomReal(0,360))local integer MKI=GetHandleId(TLI)local integer NGI=GetUnitAbilityLevel(TLI,1093681735)local integer BF4=(LoadInteger(XY,(MKI),(279)))local unit BG4=(LoadUnitHandle(XY,(MKI),(1400+1)))local integer x=1set BF4=BF4+1call SaveUnitHandle(XY,(MKI),(1400+BF4),(BE4))call SetUnitAbilityLevel(BE4,1093681734,NGI)if(BF4>NGI*2)thencall KillUnit(BG4)loopexitwhen x==BF4call SaveUnitHandle(XY,(MKI),(1400+x),((LoadUnitHandle(XY,(MKI),(1400+x+1)))))set x=x+1endloopset BF4=BF4-1endifcall SaveInteger(XY,(MKI),(279),(BF4))set TLI=nullset BE4=nullset BG4=nullendfunctionfunction BH4 takes nothing returns booleanif GetSpellAbilityId()==1093681735 thencall BD4()endifreturn falseendfunctionfunction BZ4 takes unit BV4 returns nothinglocal integer MKI=GetHandleId(BV4)local integer NGI=GetUnitAbilityLevel(BV4,1093681735)local integer BF4=(LoadInteger(XY,(MKI),(279)))local integer x=1local unit DV2loopexitwhen x>BF4set DV2=(LoadUnitHandle(XY,(MKI),(1400+x)))call SetUnitAbilityLevel(DV2,1093681734,NGI)set x=x+1endloopendfunctionfunction BW4 takes nothing returns booleanreturn GetLearnedSkill()==1093681735 and IsUnitIllusion(GetTriggerUnit())==falseendfunctionfunction BX4 takes nothing returns nothinglocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit BV4=(LoadUnitHandle(XY,(MKI),(366)))local integer BY4=GetHandleId(K1[GetPlayerId(GetOwningPlayer(BV4))])local integer BF4=(LoadInteger(XY,(BY4),(279)))local integer x=1local boolean BJ4=falselocal player BK4local boolean BL4=falseif BV4==null thencall FlushChildHashtable(XY,(GetHandleId(GetTriggeringTrigger())))call MZI(GetTriggeringTrigger())elseif(LoadReal(XY,(GetHandleId(BV4)),(785)))+3>(TimerGetElapsed(M))thenset BL4=trueendifloopexitwhen x>BF4 or BJ4==trueset BJ4=IsUnitInRange(BV4,(LoadUnitHandle(XY,(BY4),(1400+x))),900)set x=x+1endloopif BJ4==false thencall UnitRemoveAbility(BV4,1110454595)endifif IsUnitType(BV4,UNIT_TYPE_HERO)==true thenif GetUnitAbilityLevel(BV4,1110454595)>0 thencall QTI(BV4,1093677617)if NZI(GetOwningPlayer(BV4))thenset BK4=CO[0]elseset BK4=BO[0]endifif BL4==false thencall QTI(BV4,1097167976)call SetUnitPathing(BV4,false)if RFI(GetUnitX(BV4))!=GetUnitX(BV4)or RZI(GetUnitY(BV4))!=GetUnitY(BV4)thencall SetUnitX(BV4,RFI(GetUnitX(BV4)))call SetUnitY(BV4,RZI(GetUnitY(BV4)))endifelsecall UnitRemoveAbility(BV4,1097167976)call SetUnitPathing(BV4,true)endifset BK4=nullelsecall UnitRemoveAbility(BV4,1093677617)call UnitRemoveAbility(BV4,1097167976)call SetUnitPathing(BV4,true)endifelseif GetUnitAbilityLevel(BV4,1110454595)>0 thencall QTI(BV4,1093810499)elsecall UnitRemoveAbility(BV4,1093810499)endifendifendifset BV4=nullendfunctionfunction BM4 takes unit BV4 returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.2,true)call TriggerAddAction(t,function BX4)call SaveUnitHandle(XY,(MKI),(366),(BV4))set t=nullendfunctionfunction BN4 takes nothing returns booleanif GetUnitTypeId(GetSummonedUnit())==1848652101 or GetUnitTypeId(GetSummonedUnit())==1848652089 thencall BM4(GetSummonedUnit())endifreturn falseendfunctionfunction BS4 takes nothing returns nothinglocal unit R7I=GetTriggerUnit()local trigger tif(GetUnitAbilityLevel(R7I,1093681735)==1)thencall BM4(R7I)elsecall BZ4(R7I)endifset R7I=nullendfunctionfunction YN1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function BW4))call TriggerAddAction(t,function BS4)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SUMMON)call TriggerAddCondition(t,Condition(function BN4))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function BH4))endfunctionfunction BT4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))if GetTriggerEventId()!=EVENT_PLAYER_UNIT_SPELL_EFFECT or(GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT and CY1(GetSpellAbilityId())and GetSpellTargetUnit()==N0I)thenif QPI(N0I)==false thencall UnitRemoveAbility(N0I,1093687122)call UnitRemoveAbility(N0I,1110454597)endifcall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset N0I=nullreturn falseendfunctionfunction BR4 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit N0I=GetTriggerUnit()call TriggerRegisterTimerEvent(t,14,false)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function BT4))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("Abilities\\Spells\\Items\\VampiricPotion\\VampPotionCaster.mdl",N0I,"origin")))call QTI(N0I,1093687122)call SetUnitAbilityLevel(N0I,1093687122,GetUnitAbilityLevel(N0I,1093687121))call SetPlayerAbilityAvailable(GetOwningPlayer(N0I),1093687122,false)endfunctionfunction BP4 takes nothing returns booleanif GetSpellAbilityId()==1093687121 thencall BR4()endifreturn falseendfunctionfunction YS1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function BP4))set t=nullendfunctionfunction BQ4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))if GetTriggerEvalCount(t)>300 thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetUnitAbilityLevel(TMI,1110459703)>0 thencall FlushChildHashtable(XY,(MKI))call MZI(t)call TKI(TLI,TMI,1,GetUnitAbilityLevel(TLI,1093681736)*75)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction BU4 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()call TriggerRegisterTimerEvent(t,0.01,true)call TriggerAddCondition(t,Condition(function BQ4))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))set t=nullset TLI=nullset TMI=nullendfunctionfunction C04 takes nothing returns booleanif GetSpellAbilityId()==1093681736 thencall BU4()endifreturn falseendfunctionfunction YT1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function C04))set t=nullendfunctionfunction CI4 takes nothing returns booleanreturn GetSpellAbilityId()==1093678389endfunctionfunction C14 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local real TSI=(LoadReal(XY,(MKI),(20)))local integer BP1=(LoadInteger(XY,(MKI),(188)))local texttag ttif GetTriggerEventId()!=EVENT_UNIT_DAMAGED thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetEventDamageSource()==QHI thenset tt=CreateTextTag()call Q5I(I2S(BP1),BP1,TMI,0.03,127,127,255,255)call SetTextTagText(tt,"+"+I2S(R2I(TSI)),0.025)call SetTextTagPosUnit(tt,TMI,10)call SetTextTagColor(tt,255,0,0,255)call SetTextTagVelocity(tt,0,0.0355)call SetTextTagFadepoint(tt,2)call SetTextTagPermanent(tt,false)call SetTextTagLifespan(tt,2)if IsUnitVisible(TMI,GetLocalPlayer())or TGI(GetLocalPlayer())thencall SetTextTagVisibility(tt,true)elsecall SetTextTagVisibility(tt,false)endifcall TKI(TLI,TMI,1,TSI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullset tt=nullreturn falseendfunctionfunction CO4 takes nothing returns nothinglocal integer NGI=GetUnitAbilityLevel(GetTriggerUnit(),1093678389)local integer C24local unit R7I=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local location O4O=GetUnitLoc(R7I)local real TSIlocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit QHI=CreateUnit(GetOwningPlayer(R7I),1697656901,GetUnitX(R7I),GetUnitY(R7I),0)if NGI==1 thenset C24=GetRandomInt(1,2)if C24==1 thenset TSI=GetRandomReal(100,200)elseif C24==2 thenset TSI=GetRandomReal(1,100)endifelseif NGI==2 thenset C24=GetRandomInt(1,3)if C24==1 thenset TSI=GetRandomReal(170,225)elseif C24==2 thenset TSI=GetRandomReal(110,170)elseif C24==3 thenset TSI=GetRandomReal(50,110)endifelseif NGI==3 thenset C24=GetRandomInt(1,4)if C24==1 thenset TSI=GetRandomReal(195,250)elseif C24==2 thenset TSI=GetRandomReal(155,195)elseif C24==3 thenset TSI=GetRandomReal(115,155)elseif C24==4 thenset TSI=GetRandomReal(75,115)endifelseif NGI==4 thenset C24=GetRandomInt(2,4)if C24==2 thenset TSI=GetRandomReal(225,275)elseif C24==3 thenset TSI=GetRandomReal(175,225)elseif C24==4 thenset TSI=GetRandomReal(100,175)endifendifcall TriggerRegisterTimerEvent(t,10,false)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function C14))call SaveUnitHandle(XY,(MKI),(2),(R7I))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveReal(XY,(MKI),(20),((TSI)*1.0))if(NGI==4)thenendifcall SaveInteger(XY,(MKI),(188),(C24))call QTI(QHI,1093678165)call SetUnitAbilityLevel(QHI,1093678165,C24)call IssueTargetOrder(QHI,"thunderbolt",TMI)set t=nullendfunctionfunction YQ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function CI4))call TriggerAddAction(t,function CO4)endfunctionfunction C34 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))call FlushChildHashtable(XY,(MKI))call MZI(t)call EW1(TLI,0)set t=nullset TLI=nullreturn falseendfunctionfunction C44 takes nothing returns booleanif GetUnitTypeId(GetFilterUnit())==GetUnitTypeId(FYI)and GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(FYI)and IsUnitIllusion(GetFilterUnit())==true thencall SetUnitX(GetFilterUnit(),FWI)call SetUnitY(GetFilterUnit(),FXI)call IssueTargetOrder(GetFilterUnit(),"attack",FJI)endifreturn falseendfunctionfunction C54 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local real P4I=GetUnitX(TLI)local real P5I=GetUnitY(TLI)local real P6I=GetUnitX(TMI)local real P7I=GetUnitY(TMI)local real NN2=PUI(P4I,P5I,P6I,P7I)local real P3I=PAI(P4I,P5I,P6I,P7I)local real d=GetRandomReal(P3I*0.3,P3I*0.8)local integer NGI=GetUnitAbilityLevel(TLI,1093685847)local real U2I=P4I+d*Cos(NN2*bj_DEGTORAD)local real U3I=P5I+d*Sin(NN2*bj_DEGTORAD)local unit u=CreateUnit(GetOwningPlayer(TLI),FVI,U2I,U3I,0)local unit u2local group glocal trigger tlocal integer MKIcall SetUnitX(TLI,U2I)call SetUnitY(TLI,U3I)call SetUnitFacing(TLI,-NN2)call PlaySoundOnUnitBJ(CC,100,TMI)if IsUnitEnemy(TMI,GetOwningPlayer(TLI))and GetUnitTypeId(TMI)!=1848651852 thenset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,1.2,false)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function C34))call SaveUnitHandle(XY,(MKI),(2),(TLI))set t=nullcall EW1(TLI,25*NGI)set U2I=P4I+(d-25)*Cos(NN2*bj_DEGTORAD)set U3I=P5I+(d-25)*Sin(NN2*bj_DEGTORAD)call MPI(TMI,4405,1)call SetUnitX(TMI,U2I)call SetUnitY(TMI,U3I)call SetUnitFacing(TMI,NN2)call IssueTargetOrder(TLI,"attack",TMI)set g=MDI()set FWI=U2Iset FXI=U3Iset FYI=TLIset FJI=TMIcall GroupEnumUnitsInRange(g,P4I,P5I,1400,Condition(function C44))call MCI(g)set u2=CreateUnit(GetOwningPlayer(TLI),FVI,U2I,U3I,0)call KillUnit(u2)endifcall KillUnit(u)set TLI=nullset TMI=nullset u=nullset u2=nullset g=nullendfunctionfunction C64 takes nothing returns booleanif GetSpellAbilityId()==1093685847 thencall C54()endifreturn falseendfunctionfunction C74 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local unit u=CreateUnit(GetOwningPlayer(N0I),FVI,GetUnitX(N0I),GetUnitY(N0I),0)call PlaySoundOnUnitBJ(CC,100,N0I)call KillUnit(u)call FlushChildHashtable(XY,(MKI))call MZI(t)set u=nullset t=nullset N0I=nullreturn falseendfunctionfunction C84 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerAddCondition(t,Condition(function C74))call TriggerRegisterTimerEvent(t,0.3,false)call SaveUnitHandle(XY,(MKI),(14),(GetTriggerUnit()))set t=nullendfunctionfunction C94 takes nothing returns booleanif GetSpellAbilityId()==1093685847 thencall C84()endifreturn falseendfunctionfunction YR1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function C64))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function C94))set t=nullendfunctionfunction CA4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TLI),GetUnitY(TLI),0)call FlushChildHashtable(XY,(MKI))call MZI(t)call QTI(QHI,1093818423)call IssueTargetOrderById(QHI,852274,TLI)set t=nullset TLI=nullreturn falseendfunctionfunction CB4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger tlocal integer MKIif GetRandomInt(0,1)==0 thenset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.65,false)call TriggerAddCondition(t,Condition(function CA4))call SaveUnitHandle(XY,(MKI),(2),(TLI))endifset t=nullset TLI=nullendfunctionfunction CC4 takes nothing returns booleanif GetSpellAbilityId()==1093677903 thencall CB4()endifreturn falseendfunctionfunction YP1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function CC4))set t=nullendfunctionfunction CD4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()if GetUnitAbilityLevel(TLI,1095263841)==0 thencall QTI(TLI,1095263841)if GetUnitAbilityLevel(TLI,1112504171)>0 thencall UnitRemoveAbility(TLI,1112504171)endifendifcall SetUnitAbilityLevel(TLI,1095263841,GetUnitAbilityLevel(TLI,1093817679))set TLI=nullendfunctionfunction CE4 takes nothing returns booleanif GetLearnedSkill()==1093817679 and IsUnitIllusion(GetTriggerUnit())==false thencall CD4()endifreturn falseendfunctionfunction LO1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function CE4))set t=nullendfunctionfunction CF4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real CG4=GetUnitState(TLI,UNIT_STATE_LIFE)call UnitRemoveAbility(TLI,1093751344)call UnitRemoveAbility(TLI,1110459445)call EW1(TLI,0)call EK1(TLI,0)call SetUnitState(TLI,UNIT_STATE_LIFE,CG4)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullreturn falseendfunctionfunction CH4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer NGI=GetUnitAbilityLevel(TLI,1093678161)local real CZ4=GetUnitState(TMI,UNIT_STATE_LIFE)local real CG4=GetUnitState(TLI,UNIT_STATE_LIFE)local integer CV4=R2I((0.035+0.015*NGI)*CZ4)local integer CW4=R2I((0.35+0.15*NGI)*CZ4)call EW1(TLI,CV4)call EK1(TLI,CW4)call QTI(TLI,1093751344)call SetUnitState(TMI,UNIT_STATE_LIFE,1)call TKI(TLI,TMI,2,20)call TKI(TLI,TMI,1,20)call TKI(TLI,TMI,3,20)call SetUnitState(TLI,UNIT_STATE_LIFE,CG4+CW4)call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",TMI,"chest"))call SaveUnitHandle(XY,(MKI),(2),(TLI))call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerRegisterTimerEvent(t,35,false)call TriggerAddCondition(t,Condition(function CF4))set TLI=nullset TMI=nullset t=nullendfunctionfunction CX4 takes nothing returns booleanif GetSpellAbilityId()==1093678161 and GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)>0.5 and T4I(GetSpellTargetUnit())==false thencall CH4()endifreturn falseendfunctionfunction L21 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function CX4))set t=nullendfunctionfunction CY4 takes integer x returns booleanreturn x==1093678680 or x==1093681489 or x==1093743695 or x==1093684805 or x==1093743695 or x==1093747504 or x==1093686082endfunctionfunction CJ4 takes nothing returns booleanreturn(GetLearnedSkill()==1093683526)and(IsUnitIllusion(GetTriggerUnit())==false)endfunctionfunction CK4 takes nothing returns booleanreturn GetUnitAbilityLevel(GetTriggerUnit(),1110455896)>0 and(SGI(GetSpellAbilityId())or GetSpellAbilityId()==1093685065)and CY4(GetSpellAbilityId())==false and HN1(GetSpellAbilityId())==falseendfunctionfunction CL4 takes nothing returns nothinglocal integer MKI=GetHandleId(GetTriggeringTrigger())local unit R7I=GetTriggerUnit()local unit CM4=(LoadUnitHandle(XY,(MKI),(254)))local integer UE2=GetUnitAbilityLevel(CM4,1093683526)if GetRandomInt(1,100)<=UE2*10 and P2I(R7I,CM4,1400)thencall SetUnitState(R7I,UNIT_STATE_MANA,GetUnitState(R7I,UNIT_STATE_MANA)+0.25*GetUnitState(R7I,UNIT_STATE_MAX_MANA))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\ReplenishMana\\ReplenishManaCasterOverhead.mdl",R7I,"overhead"))endifendfunctionfunction CN4 takes nothing returns nothinglocal unit R7I=GetTriggerUnit()local integer UE2=GetUnitAbilityLevel(R7I,1093683526)local trigger tif(UE2==1)thenset t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function CK4))call TriggerAddAction(t,function CL4)call SaveUnitHandle(XY,(GetHandleId(t)),(254),(R7I))endifif(UE2==1)thencall QTI(R7I,1093685068)elseif(UE2==2)thencall QTI(R7I,1093685069)elseif(UE2==3)thencall QTI(R7I,1093685070)elseif(UE2==4)thencall QTI(R7I,1093685064)endifendfunctionfunction LG1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function CJ4))call TriggerAddAction(t,function CN4)endfunctionfunction CS4 takes nothing returns booleanlocal real dif GetUnitAbilityLevel(GetTriggerUnit(),1110455897)>0 and GetUnitAbilityLevel(GetEventDamageSource(),1093685065)>0 and(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(2)))==GetEventDamageSource()thencall UnitRemoveAbility(GetTriggerUnit(),1110455897)set d=0.01*(5+GetUnitAbilityLevel(GetEventDamageSource(),1093685065))*(GetUnitState(GetEventDamageSource(),UNIT_STATE_MANA)+100)if(IsUnitType(GetTriggerUnit(),UNIT_TYPE_SUMMONED)==true or IsUnitIllusion(GetTriggerUnit()))and GetUnitTypeId(GetTriggerUnit())!=1848651828 and GetUnitTypeId(GetTriggerUnit())!=1848652088 and GetUnitTypeId(GetTriggerUnit())!=1848652099 and GetUnitTypeId(GetTriggerUnit())!=1848652103 and GetUnitTypeId(GetTriggerUnit())!=1848651861 and GetUnitTypeId(GetTriggerUnit())!=1848651865 and GetUnitTypeId(GetTriggerUnit())!=1848651866 thenset d=d+100*GetUnitAbilityLevel(GetEventDamageSource(),1093685065)endifcall Q5I("+"+I2S(R2I(d)),1,GetTriggerUnit(),0.023,191,64,255,216)if(GetRandomInt(1,100)<=GetUnitAbilityLevel(GetEventDamageSource(),1093683526)*10)and((LoadBoolean(XY,(GetHandleId(GetTriggeringTrigger())),(264)))==false)thencall SetUnitState(GetEventDamageSource(),UNIT_STATE_MANA,GetUnitState(GetEventDamageSource(),UNIT_STATE_MANA)+0.25*GetUnitState(GetEventDamageSource(),UNIT_STATE_MAX_MANA))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\ReplenishMana\\ReplenishManaCasterOverhead.mdl",GetEventDamageSource(),"overhead"))endifcall DisableTrigger(GetTriggeringTrigger())call TKI(GetEventDamageSource(),GetTriggerUnit(),3,d)call FlushChildHashtable(XY,(GetHandleId(GetTriggeringTrigger())))call MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction CT4 takes nothing returns nothinglocal trigger tlocal unit TMIlocal unit TLIif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT thenset TMI=GetSpellTargetUnit()set TLI=GetTriggerUnit()elseset TMI=GetTriggerUnit()set TLI=GetAttacker()endifif IsUnitIllusion(TLI)==false thenset t=CreateTrigger()if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT thencall SaveBoolean(XY,(GetHandleId(t)),(264),(true))elsecall SaveBoolean(XY,(GetHandleId(t)),(264),(false))endifcall SaveUnitHandle(XY,(GetHandleId(t)),(2),(TLI))call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function CS4))endifset t=nullset TMI=nullset TLI=nullendfunctionfunction CR4 takes nothing returns booleanif GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED thenif GetUnitAbilityLevel(GetAttacker(),1093685065)>0 and(LoadBoolean(XY,(GetHandleId(GetTriggeringTrigger())),(263)))and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(14)))thencall CT4()endifelseif GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER thenif(GetIssuedOrderId()==OrderId("poisonarrows"))thencall SaveBoolean(XY,(GetHandleId(GetTriggeringTrigger())),(263),(true))elseif(GetIssuedOrderId()==OrderId("unpoisonarrows"))thencall SaveBoolean(XY,(GetHandleId(GetTriggeringTrigger())),(263),(false))endifelseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()==1093685065 thencall CT4()endifreturn falseendfunctionfunction CP4 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_SPELL_EFFECT)call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_ISSUED_ORDER)call TriggerAddCondition(t,Condition(function CR4))call SaveUnitHandle(XY,(GetHandleId(t)),(14),(GetTriggerUnit()))set t=nullendfunctionfunction CQ4 takes nothing returns booleanif GetLearnedSkill()==1093685065 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093685065)==1 thencall CP4()endifreturn falseendfunctionfunction LH1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function CQ4))set t=nullendfunctionfunction CU4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer D04=(LoadInteger(XY,(MKI),(262)))call SetHeroInt(TMI,GetHeroInt(TMI,false)+D04,true)call SetHeroInt(TLI,GetHeroInt(TLI,false)-D04,true)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction DI4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))call SaveInteger(XY,(GetHandleId((TMI))),((4303)),(2))call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call SetUnitInvulnerable(TMI,false)call PauseUnit(TMI,false)call ShowUnit(TMI,true)call ClearSelectionForPlayer(GetOwningPlayer(TMI))call SelectUnitAddForPlayer(TMI,GetOwningPlayer(TMI))call RemoveSavedHandle(XY,(GetHandleId(TLI)),(748))call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction D14 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093685066)local integer D04=RSI(GetHeroInt(TMI,false),2+NGI*2)local trigger tlocal integer MKIlocal unit QHI=CreateUnit(GetOwningPlayer(TMI),1865429305,GetUnitX(TMI),GetUnitY(TMI),0)call UnitApplyTimedLife(QHI,1112820806,(NGI+1))if(IsUnitEnemy(TMI,GetOwningPlayer(TLI)))==false or MBI(GetSpellTargetUnit())==false thencall SaveInteger(XY,(GetHandleId((TMI))),((4303)),(1))set t=CreateTrigger()set MKI=GetHandleId(t)call SelectUnitRemoveForPlayer(TMI,GetOwningPlayer(TMI))call SetUnitInvulnerable(TMI,true)call PauseUnit(TMI,true)call ShowUnit(TMI,false)call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffect("Abilities\\Spells\\Demon\\DarkConversion\\ZombifyTarget.mdl",GetUnitX(TMI),GetUnitY(TMI))))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call TriggerRegisterTimerEvent(t,NGI,false)call TriggerAddCondition(t,Condition(function DI4))if(IsUnitEnemy(TMI,GetOwningPlayer(TLI)))==true thencall SaveUnitHandle(XY,(GetHandleId(TLI)),(748),(TMI))call SetHeroInt(TMI,GetHeroInt(TMI,false)-D04,true)call SetHeroInt(TLI,GetHeroInt(TLI,false)+D04,true)set t=CreateTrigger()set MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(262),(D04))call TriggerRegisterTimerEvent(t,60,false)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function CU4))endifendifset TLI=nullset TMI=nullset t=nullendfunctionfunction DO4 takes nothing returns booleanif GetSpellAbilityId()==1093685066 thencall D14()endifreturn falseendfunctionfunction D24 takes nothing returns nothingif IsUnitAlly(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))and(LoadBoolean(XY,(GetHandleId(GetOwningPlayer(GetSpellTargetUnit()))),(139)))and GetSpellTargetUnit()!=GetTriggerUnit()thencall R6I(GetTriggerUnit())call R1I(GetOwningPlayer(GetTriggerUnit()),GetObjectName(1848652600))endifendfunctionfunction D34 takes nothing returns booleanif GetSpellAbilityId()==1093685066 thencall D24()endifreturn falseendfunctionfunction LZ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function DO4))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function D34))set t=nullendfunctionfunction D44 takes nothing returns booleanreturn GetSpellAbilityId()==1093685067 or GetSpellAbilityId()==1093752407endfunctionfunction D54 takes nothing returns nothinglocal unit TMI=GetEnumUnit()local unit CM4=GetTriggerUnit()local integer D64=GetHeroInt(CM4,true)-GetHeroInt(TMI,true)local integer array D74local integer NGI=GetUnitAbilityLevel(CM4,1093685067)local integer D84=7+1*NGIif NGI==0 thenset NGI=GetUnitAbilityLevel(CM4,1093752407)set D84=7+1*NGI+1endifset D74[1]=10set D74[2]=30set D74[3]=50if(D64>0)thencall UnitDamageTarget(CM4,TMI,D64*D84,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)call Q5I(I2S(R2I(D64*D84)),3,TMI,0.023,216,30,30,216)if(D64<D74[NGI])thencall DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Feedback\\SpellBreakerAttack.mdl",TMI,"overhead"))call SetUnitState(TMI,UNIT_STATE_MANA,GetUnitState(TMI,UNIT_STATE_MANA)*.25)endifendifendfunctionfunction D94 takes nothing returns booleanif(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true)thenif(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))thenreturn trueendifendifreturn falseendfunctionfunction DA4 takes nothing returns nothinglocal unit R7I=GetTriggerUnit()local integer UE2=GetUnitAbilityLevel(R7I,1093685067)local real x=GetLocationX(GetSpellTargetLoc())local real y=GetLocationY(GetSpellTargetLoc())local group GK1=MDI()local integer C61=0local unit DB4=(LoadUnitHandle(XY,(GetHandleId(R7I)),(748)))if UE2==0 thenset UE2=GetUnitAbilityLevel(R7I,1093752407)endifcall DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl",x,y))loopexitwhen C61>=360call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl",x+(200+UE2*50)*Cos(C61*bj_DEGTORAD),y+(200+UE2*50)*Sin(C61*bj_DEGTORAD)))set C61=C61+45endloopcall GroupEnumUnitsInRange(GK1,x,y,300+UE2*100,Condition(function D94))if DB4!=null and PAI(x,y,GetUnitX(DB4),GetUnitY(DB4))<(300+UE2*100)thencall SetUnitInvulnerable(DB4,false)call GroupAddUnit(GK1,DB4)endifcall ForGroup(GK1,function D54)if DB4!=null and QPI(DB4)==false thencall SetUnitInvulnerable(DB4,true)endifcall MCI(GK1)endfunctionfunction LV1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function D44))call TriggerAddAction(t,function DA4)endfunctionfunction DC4 takes nothing returns nothingcall TKI(FKI,GetEnumUnit(),1,FLI)endfunctionfunction DD4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local group glocal integer MFI=(LoadInteger(XY,(MKI),(34)))if GetTriggerEvalCount(t)>200 or GetTriggerEventId()==EVENT_UNIT_DEATH or(GetTriggerEvalCount(t)>1 and GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()==1093685575 and GetSpellTargetUnit()==TMI)thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(31))))call FlushChildHashtable(XY,(MKI))call MZI(t)elseset MFI=MFI+1call SaveInteger(XY,(MKI),(34),(MFI))set g=MDI()set CK=TLIset FKI=TLIset FLI=1.0+2.0*GetUnitAbilityLevel(TLI,1093685575)call GroupEnumUnitsInRange(g,GetUnitX(TMI),GetUnitY(TMI),275,Condition(function AT1))call GroupRemoveUnit(g,TMI)call ForGroup(g,function DC4)call MCI(g)set TMI=nullendifset t=nullset TLI=nullset g=nullreturn falseendfunctionfunction DE4 takes nothing returns nothinglocal trigger t=CreateTrigger()local effect fx=AddSpecialEffectTarget("war3mapImported\\NewSoulArmor.mdx",GetSpellTargetUnit(),"chest")local integer MKI=GetHandleId(t)call QWI(TC,GetUnitX(GetSpellTargetUnit()),GetUnitY(GetSpellTargetUnit()))call SaveUnitHandle(XY,(MKI),(2),(GetTriggerUnit()))call SaveUnitHandle(XY,(MKI),(17),(GetSpellTargetUnit()))call SaveEffectHandle(XY,(MKI),(31),(fx))call TriggerRegisterTimerEvent(t,0.1,true)call TriggerRegisterUnitEvent(t,GetSpellTargetUnit(),EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function DD4))set t=nullset fx=nullendfunctionfunction DF4 takes nothing returns booleanif GetSpellAbilityId()==1093685575 thencall DE4()endifreturn falseendfunctionfunction M91 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function DF4))set t=nullendfunctionfunction DG4 takes unit u returns booleanreturn GetUnitAbilityLevel(u,1110454858)>0 or GetUnitAbilityLevel(u,1112896368)>0 or GetUnitAbilityLevel(u,1114993524)>0 or THI(u)endfunctionfunction DH4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local integer NGIlocal unit TLIlocal unit TMIlocal real x1local real y1local real dlocal real aif GetTriggerEventId()==EVENT_UNIT_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseset TMI=(LoadUnitHandle(XY,(MKI),(17)))set d=(LoadReal(XY,(MKI),(138)))set x=(LoadReal(XY,(MKI),(6)))set y=(LoadReal(XY,(MKI),(7)))set a=(LoadReal(XY,(MKI),(137)))set x1=GetUnitX(TMI)+d/15*Cos(a)set y1=GetUnitY(TMI)+d/15*Sin(a)if IsUnitType(TMI,UNIT_TYPE_HERO)==true thencall SetUnitPosition(TMI,x1,y1)elsecall SetUnitX(TMI,x1)call SetUnitY(TMI,y1)endifif GetTriggerEvalCount(t)>15 thenset TLI=(LoadUnitHandle(XY,(MKI),(2)))set NGI=(LoadInteger(XY,(MKI),(5)))call FlushChildHashtable(XY,(MKI))call MZI(t)call TKI(TLI,TMI,1,NGI*40)set TLI=nullendifset TMI=nullendifset t=nullreturn falseendfunctionfunction DZ4 takes nothing returns nothinglocal trigger tlocal integer MKIlocal unit TLI=GetTriggerUnit()local unit TMI=GetEnumUnit()if DG4(TMI)==false thenset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerRegisterTimerEvent(t,0.025,true)call TriggerAddCondition(t,Condition(function DH4))call SaveReal(XY,(MKI),(6),((FMI)*1.0))call SaveReal(XY,(MKI),(7),((FNI)*1.0))call SaveReal(XY,(MKI),(138),((PAI(FMI,FNI,GetUnitX(TMI),GetUnitY(TMI)))*1.0))call SaveReal(XY,(MKI),(137),((Atan2(FNI-GetUnitY(TMI),FMI-GetUnitX(TMI)))*1.0))call SaveInteger(XY,(MKI),(5),(FSI))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))endifset t=nullset TLI=nullset TMI=nullendfunctionfunction DV4 takes nothing returns nothinglocal group g=MDI()local location l=GetSpellTargetLoc()local real x=GetLocationX(l)local real y=GetLocationY(l)local integer NGI=GetUnitAbilityLevel(GetTriggerUnit(),1093685573)local real r=150+100*NGI+25set CK=GetTriggerUnit()call QWI(FE,x,y)call DestroyEffect(AddSpecialEffect("war3mapImported\\Star Aura.mdx",x,y))call GroupEnumUnitsInRange(g,x,y,r,Condition(function AU1))set FMI=xset FNI=yset FSI=NGIcall ForGroup(g,function DZ4)call QEI(x,y,200)call RemoveLocation(l)call MCI(g)set l=nullset g=nullendfunctionfunction DW4 takes nothing returns booleanif GetSpellAbilityId()==1093685573 thencall DV4()endifreturn falseendfunctionfunction DX4 takes nothing returns nothinglocal location l=GetSpellTargetLoc()local real x=GetLocationX(l)local real y=GetLocationY(l)if QFI(x,y)==false or(IsPointInRegion(XN,((x)*1.0),((y)*1.0)))thencall R6I(GetTriggerUnit())call R1I(GetOwningPlayer(GetTriggerUnit()),GetObjectName(1848652619))endifcall RemoveLocation(l)set l=nullendfunctionfunction DY4 takes nothing returns booleanif GetSpellAbilityId()==1093685573 thencall DX4()endifreturn falseendfunctionfunction M81 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function DW4))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function DY4))set t=nullendfunctionfunction DJ4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))call UnitRemoveAbility(TMI,1110456151)call UnitRemoveAbility(TMI,1113746543)call UnitRemoveAbility(TMI,1110455858)call UnitRemoveAbility(TMI,1110455861)call UnitRemoveAbility(TMI,1113813619)call UnitRemoveAbility(TMI,1110454582)call UnitRemoveAbility(TMI,1110455634)return falseendfunctionfunction DK4 takes nothing returns nothinglocal trigger t=CreateTrigger()call TriggerRegisterTimerEvent(t,GetUnitAbilityLevel(GetTriggerUnit(),1093685815)*1.5+1.5,false)call TriggerAddCondition(t,Condition(function DJ4))call SaveUnitHandle(XY,(GetHandleId(t)),(17),(GetSpellTargetUnit()))call QWI(UD,GetUnitX(GetSpellTargetUnit()),GetUnitY(GetSpellTargetUnit()))call DestroyEffect(AddSpecialEffectTarget("effects\\Surge.mdx",GetSpellTargetUnit(),"origin"))endfunctionfunction DL4 takes nothing returns booleanif GetSpellAbilityId()==1093685815 thencall DK4()endifreturn falseendfunctionfunction MA1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function DL4))set t=nullendfunctionfunction DM4 takes boolean OF3 returns booleanlocal integer MKI=GetHandleId(GetTriggeringTrigger())local unit DN4=(LoadUnitHandle(XY,(MKI),(259)))local unit TMI=GetTriggerUnit()local unit DS4=CreateUnit(GetOwningPlayer(DN4),1697657171,GetUnitX(TMI),GetUnitY(TMI),0)local unit N0I=K1[GetPlayerId(GetOwningPlayer(DN4))]local integer NGI=GetUnitAbilityLevel(N0I,1093685579)if NGI==0 thenset NGI=GetUnitAbilityLevel(N0I,1093808465)endifcall SetUnitAbilityLevel(DN4,1093685580,NGI)set FTI=GetUnitX(TMI)set FRI=GetUnitY(TMI)set FPI=TMIif OF3 thencall SetUnitAbilityLevel(DN4,1093685580,3+NGI)call IssueTargetOrderById(DN4,852274,TMI)call TKI(DN4,TMI,1,150)elsecall IssueTargetOrderById(DN4,852274,TMI)call TKI(DN4,TMI,1,150)endifcall UnitApplyTimedLife(DS4,1112820806,0.5)call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\MirrorImage\\MirrorImageCaster.mdl",GetUnitX(TMI),GetUnitY(TMI)))set DN4=nullset TMI=nullreturn falseendfunctionfunction DT4 takes nothing returns booleanlocal group gif IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer((LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(259)))))and HK1(GetUnitTypeId(GetFilterUnit()))==false thenset g=(LoadGroupHandle(XY,(GetHandleId(GetTriggeringTrigger())),(257)))if IsUnitInGroup(GetFilterUnit(),g)==false thencall GroupAddUnit(g,GetFilterUnit())call DM4(false)endifendifset g=nullreturn falseendfunctionfunction DR4 takes nothing returns booleanlocal group gif IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer((LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(259)))))and HK1(GetUnitTypeId(GetFilterUnit()))==false thenset g=(LoadGroupHandle(XY,(GetHandleId(GetTriggeringTrigger())),(257)))if IsUnitInGroup(GetFilterUnit(),g)==false thencall GroupAddUnit(g,GetFilterUnit())call DM4(true)endifendifset g=nullreturn falseendfunctionfunction WallOfReplica_FindSource takes nothing returns nothingif GetPlayerId(GetOwningPlayer(GetEnumUnit()))==TJ thencall GroupAddUnit(HK,GetEnumUnit())endifendfunctionfunction DP4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)call GroupRemoveUnit((LoadGroupHandle(XY,(MKI),(257))),(LoadUnitHandle(XY,(MKI),(261))))call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\MirrorImage\\MirrorImageCaster.mdl",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit())))call FlushChildHashtable(XY,(MKI))call DisableTrigger(t)set t=nullreturn falseendfunctionfunction DQ4 takes nothing returns booleanlocal unit DN4=GetSummoningUnit()local unit QP1=GetSummonedUnit()local integer MKI=GetHandleId(DN4)local integer DU4=(LoadInteger(XY,(MKI),(260)))local trigger t=CreateTrigger()call SetUnitVertexColor(QP1,255,255,255,100)call TriggerRegisterUnitEvent(t,QP1,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function DP4))call SaveGroupHandle(XY,(GetHandleId(t)),(257),((LoadGroupHandle(XY,(MKI),(257)))))call SaveUnitHandle(XY,(GetHandleId(t)),(261),(FPI))set DU4=DU4+1call SaveInteger(XY,(MKI),(260),(DU4))call SaveInteger(XY,(MKI),(2800+DU4),(M8I(QP1)))call SaveTriggerHandle(XY,(MKI),(2900+DU4),(t))call SetUnitX(QP1,FTI)call SetUnitY(QP1,FRI)set DN4=nullset QP1=nullreturn falseendfunctionfunction E04 takes nothing returns nothingcall RemoveUnit(GetEnumUnit())endfunctionfunction EI4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer A83=GetHandleId(t)local trigger E14=(LoadTriggerHandle(XY,(A83),(255)))local integer XVO=GetHandleId(E14)local trigger EO4=(LoadTriggerHandle(XY,(XVO),(256)))local group E24=(LoadGroupHandle(XY,(XVO),(257)))local group E34=(LoadGroupHandle(XY,(XVO),(258)))local unit DN4=(LoadUnitHandle(XY,(XVO),(259)))local integer E44=GetHandleId(DN4)local integer DU4=(LoadInteger(XY,(E44),(260)))local integer E54local integer ilocal unit ucall ForGroup(E34,function E04)set i=1loopexitwhen i>DU4set E54=(LoadInteger(XY,(E44),(2800+i)))set u=M6I(E54)call FlushChildHashtable(XY,(GetHandleId((LoadTriggerHandle(XY,(E44),(2900+i))))))call MZI((LoadTriggerHandle(XY,(E44),(2900+i))))if IsUnitIllusion(u)thencall DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\MirrorImage\\MirrorImageCaster.mdl",GetUnitX(u),GetUnitY(u)))call RemoveUnit(u)call M5I(E54)endifset i=i+1endloopcall FlushChildHashtable(XY,(A83))call FlushChildHashtable(XY,(XVO))call FlushChildHashtable(XY,(E44))call RemoveUnit(DN4)call MCI(E24)call MCI(E34)call MZI(E14)call MZI(EO4)call MZI(t)set t=nullset E14=nullset EO4=nullset E24=nullset E34=nullset DN4=nullset u=nullreturn falseendfunctionfunction E64 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local location l=GetSpellTargetLoc()local real x=GetLocationX(l)local real y=GetLocationY(l)local real E74=GetUnitFacing(N0I)-45local unit DN4=CreateUnit(GetOwningPlayer(N0I),1747988559,x,y,E74)local unit ulocal real RJ2local real RK2local integer ilocal real C61local trigger t=CreateTrigger()local group g1=MDI()local integer MKI=GetHandleId(t)local group g2=MDI()local trigger E14=tlocal integer NGI=GetUnitAbilityLevel(N0I,1093685579)local boolean OF3=falseif NGI==0 thenset OF3=trueset NGI=GetUnitAbilityLevel(N0I,1093808465)endifcall SetUnitAbilityLevel(DN4,1093685580,NGI)call QWI(GE,x,y)call SaveGroupHandle(XY,(MKI),(257),(g1))call SaveGroupHandle(XY,(GetHandleId(DN4)),(257),(g1))call SaveGroupHandle(XY,(MKI),(258),(g2))call SaveUnitHandle(XY,(MKI),(259),(DN4))call SaveInteger(XY,(GetHandleId(DN4)),(260),(0))set i=0loopexitwhen i>39set RJ2=x+(500-25*i)*Cos((E74-45)*bj_DEGTORAD)set RK2=y+(500-25*i)*Sin((E74-45)*bj_DEGTORAD)set u=CreateUnit(GetOwningPlayer(N0I),1747988560,RJ2,RK2,E74)call SetUnitPathing(u,false)call SetUnitX(u,RJ2)call SetUnitY(u,RK2)call GroupAddUnit(g2,u)call TriggerRegisterUnitInRange(t,u,17,Condition(function LWI))set i=i+1endloopif OF3 thencall TriggerAddCondition(t,Condition(function DR4))elsecall TriggerAddCondition(t,Condition(function DT4))endifset t=CreateTrigger()call TriggerRegisterUnitEvent(t,DN4,EVENT_UNIT_SUMMON)call TriggerAddCondition(t,Condition(function DQ4))call SaveTriggerHandle(XY,(MKI),(256),(t))set t=CreateTrigger()call TriggerRegisterTimerEvent(t,15*NGI,false)call TriggerAddCondition(t,Condition(function EI4))call SaveTriggerHandle(XY,(GetHandleId(t)),(255),(E14))call RemoveLocation(l)set N0I=nullset l=nullset u=nullset t=nullset E14=nullset g1=nullset g2=nullset DN4=nullendfunctionfunction E84 takes nothing returns booleanif GetSpellAbilityId()==1093685579 or GetSpellAbilityId()==1093808465 thencall E64()endifreturn falseendfunctionfunction MB1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function E84))set t=nullendfunctionfunction E94 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer EA4=(LoadInteger(XY,(MKI),(29)))if GetTriggerEventId()==EVENT_UNIT_DEATH thenif(LoadBoolean(XY,(MKI),(276)))==false and GetTriggerUnit()==(LoadUnitHandle(XY,(MKI),(2)))thencall SaveBoolean(XY,(MKI),(276),(true))call SetHeroStr((LoadUnitHandle(XY,(MKI),(2))),GetHeroStr((LoadUnitHandle(XY,(MKI),(2))),false)-EA4,true)elseif(LoadBoolean(XY,(MKI),(277)))==false and GetTriggerUnit()==(LoadUnitHandle(XY,(MKI),(17)))thencall SaveBoolean(XY,(MKI),(277),(true))call SetHeroStr((LoadUnitHandle(XY,(MKI),(17))),GetHeroStr((LoadUnitHandle(XY,(MKI),(17))),false)+EA4,true)endifelseif(LoadBoolean(XY,(MKI),(276)))==false thencall SaveBoolean(XY,(MKI),(276),(true))call SetHeroStr((LoadUnitHandle(XY,(MKI),(2))),GetHeroStr((LoadUnitHandle(XY,(MKI),(2))),false)-EA4,true)endifif(LoadBoolean(XY,(MKI),(277)))==false thencall SaveBoolean(XY,(MKI),(277),(true))call SetHeroStr((LoadUnitHandle(XY,(MKI),(17))),GetHeroStr((LoadUnitHandle(XY,(MKI),(17))),false)+EA4,true)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullreturn falseendfunctionfunction EB4 takes nothing returns nothinglocal unit TLI=FQIlocal unit TMI=GetEnumUnit()local integer EA4local integer NGI=FUIlocal trigger tlocal integer MKIif IsUnitType(TMI,UNIT_TYPE_HERO)==true and HK1(GetUnitTypeId(TMI))==false thenset EA4=IMinBJ(GetHeroStr(TMI,false)-1,4)set t=CreateTrigger()set MKI=GetHandleId(t)call SetHeroStr(TLI,GetHeroStr(TLI,false)+EA4,true)call SetHeroStr(TMI,GetHeroStr(TMI,false)-EA4,true)call TriggerRegisterTimerEvent(t,40,false)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function E94))call SaveBoolean(XY,(MKI),(276),(false))call SaveBoolean(XY,(MKI),(277),(false))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(29),(EA4))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\RaiseSkeletonWarrior\\RaiseSkeleton.mdl",TLI,"origin"))endifcall TKI(TLI,TMI,1,40*NGI-20)set TLI=nullset TMI=nullset t=nullendfunctionfunction EC4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local location l=GetSpellTargetLoc()local real x=GetLocationX(l)local real y=GetLocationY(l)local group g=MDI()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer NGI=GetUnitAbilityLevel(TLI,1093743955)local unit QHI=CreateUnit(GetOwningPlayer(TLI),1747990346,x,y,0)call DestroyEffect(AddSpecialEffect("effects\\DecayGreen_Groundonly_1.mdx",x,y))call RemoveLocation(l)set CK=TLIset FQI=TLIset FUI=NGIcall GroupEnumUnitsInRange(g,x,y,325+25,Condition(function AU1))call ForGroup(g,function EB4)call MCI(g)call KillUnit(QHI)set TLI=nullset l=nullset g=nullset t=nullset QHI=nullendfunctionfunction ED4 takes nothing returns booleanif GetSpellAbilityId()==1093743955 thencall EC4()endifreturn falseendfunctionfunction MK1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function ED4))set t=nullendfunctionfunction EE4 takes nothing returns nothingif GOI<=G2I thenset GOI=GOI+1call GroupAddUnit(G0I,GetEnumUnit())endifendfunctionfunction EF4 takes unit TLI,unit TMI returns nothingcall QII("SPLK",GetUnitX(TLI),GetUnitY(TLI),GetUnitX(TMI),GetUnitY(TMI),0.1,0.6,0.44,.9,0.6)endfunctionfunction EG4 takes nothing returns nothingcall SetUnitState(G1I,UNIT_STATE_LIFE,GetUnitState(G1I,UNIT_STATE_LIFE)+25)if GetUnitTypeId(GetEnumUnit())!=1848657461 thencall IJ1(GetEnumUnit(),25)endifcall EF4(GetEnumUnit(),G1I)endfunctionfunction EH4 takes nothing returns nothingcall TKI(GII,G1I,1,25)if GetUnitTypeId(GetEnumUnit())!=1848657461 thencall IJ1(GetEnumUnit(),25)endifcall EF4(GetEnumUnit(),G1I)endfunctionfunction EZ4 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local group g=MDI()local integer EV4=GetUnitAbilityLevel(N0I,1093685813)*5set G0I=MDI()set GOI=0set G2I=EV4set CK=N0Icall GroupEnumUnitsInRange(g,GetUnitX(N0I),GetUnitY(N0I),1300+25,Condition(function BN1))call GroupRemoveUnit(g,N0I)call GroupRemoveUnit(g,GetSpellTargetUnit())call ForGroup(g,function EE4)call MCI(g)set g=G0Iset G1I=GetSpellTargetUnit()set GII=N0Iif IsUnitAlly(G1I,GetOwningPlayer(N0I))thencall ForGroup(g,function EG4)elsecall ForGroup(g,function EH4)endifcall MCI(g)set N0I=nullset g=nullendfunctionfunction EW4 takes nothing returns booleanif GetSpellAbilityId()==1093685813 and(IsUnitType(GetSpellTargetUnit(),UNIT_TYPE_STRUCTURE)==false or GetOwningPlayer(GetSpellTargetUnit())==GetOwningPlayer(GetTriggerUnit()))thencall EZ4()endifreturn falseendfunctionfunction MM1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function EW4))set t=nullendfunctionfunction EX4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer TRI=(LoadInteger(XY,(MKI),(30)))local unit TMI=M6I(TRI)local unit EY4=(LoadUnitHandle(XY,(MKI),(269)))local real IO4=GetUnitState(TMI,UNIT_STATE_LIFE)local real EJ4=GetUnitState(TMI,UNIT_STATE_MAX_LIFE)if GetTriggerEventId()==EVENT_UNIT_DEATH thencall M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)if GetTriggerUnit()==TMI thencall KillUnit(EY4)endifelseif Q2==true thencall M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)call PauseUnit(EY4,true)elseif GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER or GetTriggerEventId()==EVENT_UNIT_ISSUED_POINT_ORDER or GetTriggerEventId()==EVENT_UNIT_ISSUED_TARGET_ORDER thencall DisableTrigger(t)call IssueTargetOrder(EY4,"attack",TMI)call EnableTrigger(t)elseif(IO4<(100*G4I)or IO4/EJ4<(0.15+0.05*G4I))and GetUnitAbilityLevel(EY4,1110458702)==0 thencall IssueTargetOrder(G5I[GetPlayerId(GetOwningPlayer(EY4))],"bloodlust",EY4)elseif IsUnitVisible(TMI,GetOwningPlayer(EY4))==false thenif(LoadBoolean(XY,(MKI),(270)))==true thenif(LoadBoolean(XY,(MKI),(271)))==true thenif(LoadBoolean(XY,(MKI),(272)))==true thencall FlushChildHashtable(XY,(MKI))call MZI(t)call KillUnit(EY4)elsecall SaveBoolean(XY,(MKI),(272),(true))endifelsecall SaveBoolean(XY,(MKI),(271),(true))endifelsecall SaveBoolean(XY,(MKI),(270),(true))endifelsecall SaveBoolean(XY,(MKI),(270),(false))call SaveBoolean(XY,(MKI),(271),(false))call SaveBoolean(XY,(MKI),(272),(false))endifset t=nullset TMI=nullset EY4=nullreturn falseendfunctionfunction EK4 takes nothing returns booleanlocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TMI=GetEnumUnit()local unit EY4=CreateUnit(G3I,1848657461,GetUnitX(TMI),GetUnitY(TMI),0)call IssueTargetOrder(EY4,"attack",TMI)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,EY4,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,EY4,EVENT_UNIT_ISSUED_ORDER)call TriggerRegisterUnitEvent(t,EY4,EVENT_UNIT_ISSUED_POINT_ORDER)call TriggerRegisterUnitEvent(t,EY4,EVENT_UNIT_ISSUED_TARGET_ORDER)call TriggerRegisterTimerEvent(t,0.5,true)call TriggerAddCondition(t,Condition(function EX4))call SaveInteger(XY,(MKI),(30),(M8I(TMI)))call SaveUnitHandle(XY,(MKI),(269),(EY4))call SaveInteger(XY,(MKI),(5),(G4I))set t=nullset TMI=nullset EY4=nullreturn falseendfunctionfunction EL4 takes nothing returns booleanif GetUnitTypeId(GetFilterUnit())==1848657461 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1 thencall KillUnit(GetFilterUnit())endifreturn falseendfunctionfunction EM4 takes player p returns nothinglocal group g=MDI()call GroupEnumUnitsOfPlayer(g,p,Condition(function EL4))call MCI(g)set g=nullendfunctionfunction EN4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit ES4=(LoadUnitHandle(XY,(MKI),(266)))local unit ET4=(LoadUnitHandle(XY,(MKI),(267)))local unit ER4=(LoadUnitHandle(XY,(MKI),(268)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local group glocal player GF2if NZI(GetOwningPlayer(TLI))thenset GF2=CO[0]elseset GF2=BO[0]endifif GetTriggerEventId()==EVENT_UNIT_DEATH thenif(LoadBoolean(XY,(MKI),(265)))thencall QJI(GF2,.4,GetUnitX(TLI),GetUnitY(TLI),600)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)call ShowUnit(TLI,false)call RemoveUnit(ES4)call RemoveUnit(ET4)call RemoveUnit(ER4)call EM4(GetOwningPlayer(TLI))elseif IsUnitVisible(TLI,GF2)thencall SaveBoolean(XY,(MKI),(265),(true))endifset g=MDI()set CK=TLIset G3I=GetOwningPlayer(TLI)set G4I=NGIcall GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),25+200+200*NGI,Condition(function AN1))if Q2==false thencall ForGroup(g,function EK4)endifcall MCI(g)set g=nullendifset t=nullset TLI=nullset ES4=nullset ET4=nullset ER4=nullreturn falseendfunctionfunction EP4 takes nothing returns nothinglocal location l=GetSpellTargetLoc()local real x=GetLocationX(l)local real y=GetLocationY(l)local unit TLIlocal real RJ2local real RK2local real EQ4local unit ES4local unit ET4local unit ER4local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer NGI=GetUnitAbilityLevel(GetTriggerUnit(),1093743958)local integer idif NGI==1 thenset TLI=CreateUnit(GetOwningPlayer(GetTriggerUnit()),1848657482,x,y,0)elseif NGI==2 thenset TLI=CreateUnit(GetOwningPlayer(GetTriggerUnit()),1848657481,x,y,0)elseif NGI==3 thenset TLI=CreateUnit(GetOwningPlayer(GetTriggerUnit()),1848657462,x,y,0)elseset TLI=CreateUnit(GetOwningPlayer(GetTriggerUnit()),1848657480,x,y,0)endifcall QWI(TF,x,y)set id=GetPlayerId(GetOwningPlayer(TLI))if G5I[id]==null thenset G5I[id]=CreateUnit(GetOwningPlayer(TLI),1697657174,x,y,0)call QTI(G5I[id],1093744438)endifcall SetUnitPosition(TLI,RCI(x),RGI(y))call UnitApplyTimedLife(TLI,1112820806,10+5*NGI)call RemoveLocation(l)call QEI(x,y,300)set RJ2=x+200*Cos(0*bj_DEGTORAD)set RK2=y+200*Sin(0*bj_DEGTORAD)set EQ4=PUI(RJ2,RK2,x,y)set ES4=CreateUnit(GetOwningPlayer(TLI),1747990344,RJ2,RK2,EQ4)call SetUnitAnimation(ES4,"Stand Work Gold")call QueueUnitAnimation(ES4,"Stand Work Gold")call QueueUnitAnimation(ES4,"Stand Work Gold")call QueueUnitAnimation(ES4,"Stand Work Gold")call QueueUnitAnimation(ES4,"Stand Work Gold")call QueueUnitAnimation(ES4,"Stand Work Gold")call QueueUnitAnimation(ES4,"Stand Work Gold")call QueueUnitAnimation(ES4,"Stand Work Gold")call QueueUnitAnimation(ES4,"Stand Work Gold")call QueueUnitAnimation(ES4,"Stand Work Gold")call QueueUnitAnimation(ES4,"Stand Work Gold")call QueueUnitAnimation(ES4,"Stand Work Gold")call QueueUnitAnimation(ES4,"Stand Work Gold")call QueueUnitAnimation(ES4,"Stand Work Gold")call QueueUnitAnimation(ES4,"Stand Work Gold")call QueueUnitAnimation(ES4,"Stand Work Gold")call QueueUnitAnimation(ES4,"Stand Work Gold")call QueueUnitAnimation(ES4,"Stand Work Gold")set RJ2=x+200*Cos(120*bj_DEGTORAD)set RK2=y+200*Sin(120*bj_DEGTORAD)set EQ4=PUI(RJ2,RK2,x,y)set ET4=CreateUnit(GetOwningPlayer(TLI),1747990344,RJ2,RK2,EQ4)call SetUnitAnimation(ET4,"Stand Work Gold")call QueueUnitAnimation(ET4,"Stand Work Gold")call QueueUnitAnimation(ET4,"Stand Work Gold")call QueueUnitAnimation(ET4,"Stand Work Gold")call QueueUnitAnimation(ET4,"Stand Work Gold")call QueueUnitAnimation(ET4,"Stand Work Gold")call QueueUnitAnimation(ET4,"Stand Work Gold")call QueueUnitAnimation(ET4,"Stand Work Gold")call QueueUnitAnimation(ET4,"Stand Work Gold")call QueueUnitAnimation(ET4,"Stand Work Gold")call QueueUnitAnimation(ET4,"Stand Work Gold")call QueueUnitAnimation(ET4,"Stand Work Gold")call QueueUnitAnimation(ET4,"Stand Work Gold")call QueueUnitAnimation(ET4,"Stand Work Gold")call QueueUnitAnimation(ET4,"Stand Work Gold")call QueueUnitAnimation(ET4,"Stand Work Gold")call QueueUnitAnimation(ET4,"Stand Work Gold")set RJ2=x+200*Cos(240*bj_DEGTORAD)set RK2=y+200*Sin(240*bj_DEGTORAD)set EQ4=PUI(RJ2,RK2,x,y)set ER4=CreateUnit(GetOwningPlayer(TLI),1747990344,RJ2,RK2,EQ4)call SetUnitAnimation(ER4,"Stand Work Gold")call QueueUnitAnimation(ER4,"Stand Work Gold")call QueueUnitAnimation(ER4,"Stand Work Gold")call QueueUnitAnimation(ER4,"Stand Work Gold")call QueueUnitAnimation(ER4,"Stand Work Gold")call QueueUnitAnimation(ER4,"Stand Work Gold")call QueueUnitAnimation(ER4,"Stand Work Gold")call QueueUnitAnimation(ER4,"Stand Work Gold")call QueueUnitAnimation(ER4,"Stand Work Gold")call QueueUnitAnimation(ER4,"Stand Work Gold")call QueueUnitAnimation(ER4,"Stand Work Gold")call QueueUnitAnimation(ER4,"Stand Work Gold")call QueueUnitAnimation(ER4,"Stand Work Gold")call QueueUnitAnimation(ER4,"Stand Work Gold")call QueueUnitAnimation(ER4,"Stand Work Gold")call QueueUnitAnimation(ER4,"Stand Work Gold")call SetUnitAnimation(TLI,"Stand Work")call QueueUnitAnimation(TLI,"Stand Work")call QueueUnitAnimation(TLI,"Stand Work")call QueueUnitAnimation(TLI,"Stand Work")call QueueUnitAnimation(TLI,"Stand Work")call QueueUnitAnimation(TLI,"Stand Work")call QueueUnitAnimation(TLI,"Stand Work")call QueueUnitAnimation(TLI,"Stand Work")call QueueUnitAnimation(TLI,"Stand Work")call QueueUnitAnimation(TLI,"Stand Work")call QueueUnitAnimation(TLI,"Stand Work")call QueueUnitAnimation(TLI,"Stand Work")call QueueUnitAnimation(TLI,"Stand Work")call QueueUnitAnimation(TLI,"Stand Work")call QueueUnitAnimation(TLI,"Stand Work")call QueueUnitAnimation(TLI,"Stand Work")call QueueUnitAnimation(TLI,"Stand Work")call QueueUnitAnimation(TLI,"Stand Work")call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerRegisterTimerEvent(t,3,true)call TriggerAddCondition(t,Condition(function EN4))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(266),(ES4))call SaveUnitHandle(XY,(MKI),(267),(ET4))call SaveUnitHandle(XY,(MKI),(268),(ER4))call SaveInteger(XY,(MKI),(5),(NGI))call SaveBoolean(XY,(MKI),(265),(false))call TriggerEvaluate(t)set TLI=nullset ES4=nullset ET4=nullset ER4=nullset l=nullendfunctionfunction EU4 takes nothing returns booleanif GetSpellAbilityId()==1093743958 thencall EP4()endifreturn falseendfunctionfunction ML1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function EU4))set t=nullendfunctionfunction F04 takes unit N3I returns booleanif DB1(N3I,FK0[JB0])!=null thenreturn trueendifreturn falseendfunctionfunction FleshGolem_ValidCorpse takes nothing returns booleanif GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and QPI(GetFilterUnit())==true thenset G6I=G6I+1endifreturn falseendfunctionfunction FI4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer NGI=GetUnitAbilityLevel(TLI,1093743946)call SetUnitAbilityLevel(TLI,1093743947,NGI)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullreturn falseendfunctionfunction F14 takes nothing returns nothingif IsUnitType(CK,UNIT_TYPE_HERO)==true thenif F04(DK)thencall SetUnitState(DK,UNIT_STATE_LIFE,GetUnitState(DK,UNIT_STATE_LIFE)+GetUnitState(DK,UNIT_STATE_MAX_LIFE)*0.10)elsecall SetUnitState(DK,UNIT_STATE_LIFE,GetUnitState(DK,UNIT_STATE_LIFE)+GetUnitState(DK,UNIT_STATE_MAX_LIFE)*0.06)endifelseif F04(DK)thencall SetUnitState(DK,UNIT_STATE_LIFE,GetUnitState(DK,UNIT_STATE_LIFE)+GetUnitState(DK,UNIT_STATE_MAX_LIFE)*0.03)elsecall SetUnitState(DK,UNIT_STATE_LIFE,GetUnitState(DK,UNIT_STATE_LIFE)+GetUnitState(DK,UNIT_STATE_MAX_LIFE)*0.02)endifendifendfunctionfunction FO4 takes nothing returns booleanlocal trigger t2=GetTriggeringTrigger()local integer XVO=GetHandleId(t2)local trigger t1=(LoadTriggerHandle(XY,(XVO),(274)))local integer A83=GetHandleId(t1)local unit TLI=(LoadUnitHandle(XY,(XVO),(2)))local unit TMIlocal real dlocal real alocal boolean F24=(LoadBoolean(XY,(XVO),(273)))if(GetTriggerEventId()==EVENT_UNIT_DEATH and GetTriggerUnit()==TLI)or(GetTriggerEventId()!=EVENT_UNIT_DAMAGED and GetTriggerEventId()!=EVENT_UNIT_DEATH)thencall FlushChildHashtable(XY,(A83))call FlushChildHashtable(XY,(XVO))call MZI(t1)call MZI(t2)elseif GetTriggerEventId()==EVENT_UNIT_DEATH thenif IsUnitIllusion(GetDyingUnit())==false thencall U6I(GetDyingUnit(),TLI,1747990361,"F14",600,false)endifelseif F24==false thenset TMI=GetTriggerUnit()set d=P8I(TLI,TMI)if d<775 and GetEventDamage()>4 thenif F04(TLI)thenset a=20+5*G7Ielseset a=15+5*G7Iendifif d>200 thenset a=a-15*((d-150)/(775-150))endifcall SaveBoolean(XY,(XVO),(273),(true))call TKI(GetEventDamageSource(),GetTriggerUnit(),7,GetEventDamage()*a/100)call SaveBoolean(XY,(XVO),(273),(false))endifendifset t2=nullset t1=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction F34 takes nothing returns booleanlocal trigger t1=GetTriggeringTrigger()local integer A83=GetHandleId(t1)local trigger t2=(LoadTriggerHandle(XY,(A83),(275)))local integer XVO=GetHandleId(t2)local unit TMI=GetTriggerUnit()local unit TLI=(LoadUnitHandle(XY,(A83),(2)))if IsUnitEnemy(TLI,GetOwningPlayer(TMI))==true and IsUnitType(TMI,UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(TMI,1093678162)==0 thenif(LoadBoolean(XY,(XVO),(GetHandleId(TMI))))==false thencall TriggerRegisterUnitEvent(t2,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t2,TMI,EVENT_UNIT_DEATH)call SaveBoolean(XY,(XVO),(GetHandleId(TMI)),(true))endifendifset t1=nullset t2=nullset TMI=nullset TLI=nullreturn falseendfunctionfunction F44 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t1=CreateTrigger()local integer A83=GetHandleId(t1)local trigger t2=CreateTrigger()local integer XVO=GetHandleId(t2)local trigger t3=CreateTrigger()local integer E44=GetHandleId(t3)local integer NGI=GetUnitAbilityLevel(TLI,1093743946)set G7I=NGIcall TriggerRegisterUnitInRange(t1,TLI,750,Condition(function LWI))call TriggerAddCondition(t1,Condition(function F34))call SaveTriggerHandle(XY,(A83),(275),(t2))call SaveUnitHandle(XY,(A83),(2),(TLI))call TriggerRegisterTimerEvent(t2,30,false)call TriggerRegisterUnitEvent(t2,TLI,EVENT_UNIT_DEATH)call TriggerAddCondition(t2,Condition(function FO4))call SaveTriggerHandle(XY,(XVO),(274),(t1))call SaveUnitHandle(XY,(XVO),(2),(TLI))call SaveBoolean(XY,(XVO),(273),(false))call TriggerRegisterTimerEvent(t3,0.01,false)call TriggerAddCondition(t3,Condition(function FI4))call SaveUnitHandle(XY,(E44),(2),(TLI))set TLI=nullset t1=nullset t2=nullset t3=nullendfunctionfunction F54 takes nothing returns booleanif GetSpellAbilityId()==1093743946 and GetUnitTypeId(GetTriggerUnit())==1211117650 thencall F44()endifreturn falseendfunctionfunction MN1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function F54))call RVI(1093743947)set t=nullendfunctionfunction F64 takes nothing returns nothingif IsUnitInGroup(GetEnumUnit(),G9I)==false and T6I(GetEnumUnit())==false thencall GroupAddUnit(G9I,GetEnumUnit())call SetPlayerAbilityAvailable(GetOwningPlayer(GetEnumUnit()),GAI,false)call O41(GetEnumUnit(),GAI,1,3,1110455633)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\SpellShieldAmulet\\SpellShieldCaster.mdl",GetEnumUnit(),"overhead"))endifendfunctionfunction F74 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local real x2=(LoadReal(XY,(MKI),(66)))local real y2=(LoadReal(XY,(MKI),(67)))local real a=(LoadReal(XY,(MKI),(137)))local integer MFI=GetTriggerEvalCount(t)local real x=GetUnitX(N0I)local real y=GetUnitY(N0I)local real PI2=(LoadReal(XY,(MKI),(23)))local real P12=(LoadReal(XY,(MKI),(24)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local group g=MDI()local group SP2=(LoadGroupHandle(XY,(MKI),(187)))local integer NGI=GetUnitAbilityLevel(N0I,1093684299)if PAI(x,y,x2,y2)<=G8I thenset x=x2set y=y2elseset x=RCI(PI2+65*Cos(a*bj_DEGTORAD))set y=RGI(P12+65*Sin(a*bj_DEGTORAD))endifif NGI==1 thenset GAI=1093810497elseif NGI==2 thenset GAI=1093810489elseif NGI==3 thenset GAI=1093810498elseif NGI==4 thenset GAI=1093810488endifset CK=N0Iset G9I=SP2call GroupEnumUnitsInRange(g,x,y,325,Condition(function AT1))call ForGroup(g,function F64)call MCI(g)call SaveReal(XY,(MKI),(23),((x)*1.0))call SaveReal(XY,(MKI),(24),((y)*1.0))call SetUnitPosition(N0I,x,y)if(x==x2 and y==y2)or MFI>40 thencall SetUnitX(QHI,x)call SetUnitY(QHI,y)call IssueImmediateOrder(QHI,"thunderclap")call MCI(SP2)call FlushChildHashtable(XY,(MKI))call MZI(t)call SetUnitAnimation(N0I,"stand")call SetUnitPathing(N0I,true)call SetUnitInvulnerable(N0I,false)if GetUnitTypeId(N0I)==1160786520 thencall SetUnitVertexColor(N0I,255,255,255,255)elsecall SetUnitVertexColor(N0I,0,255,150,255)endifcall SaveInteger(XY,(GetHandleId((N0I))),((4261)),(2))endifset t=nullset N0I=nullset QHI=nullreturn falseendfunctionfunction F84 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local location llocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real x1=GetUnitX(N0I)local real y1=GetUnitY(N0I)local real x2local real y2local real alocal unit QHI=CreateUnit(GetOwningPlayer(N0I),1697656901,x1,y1,0)if GetSpellTargetUnit()==null thenset l=GetSpellTargetLoc()elseset l=GetUnitLoc(GetSpellTargetUnit())endifset x2=GetLocationX(l)set y2=GetLocationY(l)set a=PUI(x1,y1,x2,y2)call RemoveLocation(l)call SetUnitAnimationByIndex(N0I,0)call SetUnitPathing(N0I,false)call SetUnitInvulnerable(N0I,true)call SetUnitVertexColor(N0I,0,0,0,255)call SaveInteger(XY,(GetHandleId((N0I))),((4261)),(1))call SaveReal(XY,(MKI),(66),((RCI(x2))*1.0))call SaveReal(XY,(MKI),(67),((RGI(y2))*1.0))call SaveReal(XY,(MKI),(23),((x1)*1.0))call SaveReal(XY,(MKI),(24),((y1)*1.0))call SaveReal(XY,(MKI),(137),((a)*1.0))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveGroupHandle(XY,(MKI),(187),(MDI()))call QTI(QHI,1093684289)call SetUnitAbilityLevel(QHI,1093684289,GetUnitAbilityLevel(N0I,1093684299))call TriggerRegisterTimerEvent(t,0.025,true)call TriggerAddCondition(t,Condition(function F74))set N0I=nullset l=nullset t=nullset QHI=nullendfunctionfunction F94 takes nothing returns booleanif GetSpellAbilityId()==1093684299 thencall F84()endifreturn falseendfunctionfunction YU1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function F94))set t=nullendfunctionfunction FA4 takes nothing returns booleanreturn GetLearnedSkill()==1093682010 and IsUnitIllusion(GetTriggerUnit())==falseendfunctionfunction FB4 takes nothing returns nothinglocal unit R7I=GetTriggerUnit()local real TSI=GetEventDamage()if(TSI>0)and GetUnitState(R7I,UNIT_STATE_LIFE)>1 and GetUnitAbilityLevel(R7I,1112433775)==0 thenif(GetRandomInt(1,100)<=(5+(5*GetUnitAbilityLevel(R7I,1093682010))))thencall SetUnitState(R7I,UNIT_STATE_LIFE,GetUnitState(R7I,UNIT_STATE_LIFE)+TSI)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\WingedSerpentMissile\\WingedSerpentMissile.mdl",R7I,"hand,left"))endifendifendfunctionfunction FC4 takes nothing returns nothinglocal trigger tif GetUnitAbilityLevel(GetTriggerUnit(),1093682010)==1 thenset t=CreateTrigger()call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_DAMAGED)call TriggerAddAction(t,function FB4)endifendfunctionfunction JI1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function FA4))call TriggerAddAction(t,function FC4)endfunctionconstant function Chronosphere_RawCode takes nothing returns integerreturn 1093683761endfunctionconstant function Chronosphere_SphereCode takes nothing returns integerreturn 1966092364endfunctionfunction FD4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit FE4=(LoadUnitHandle(XY,(MKI),(19)))local real FM1=(LoadReal(XY,(MKI),(6)))local real FN1=(LoadReal(XY,(MKI),(7)))if FE4==null or TLI==null thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseif P8I(TLI,FE4)<475 thencall SaveInteger(XY,(GetHandleId((TLI))),((4423)),(1))call FL1(TLI,FM1,FN1,1000.)elsecall SaveInteger(XY,(GetHandleId((TLI))),((4423)),(2))endifcall SaveReal(XY,(MKI),(6),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(7),((GetUnitY(TLI))*1.0))endifset t=nullset TLI=nullset FE4=nullreturn falseendfunctionfunction FF4 takes unit TLI,unit FE4 returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(19),(FE4))call SaveReal(XY,(MKI),(6),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(7),((GetUnitY(TLI))*1.0))call TriggerRegisterTimerEvent(t,0.005,true)call TriggerAddCondition(t,Condition(function FD4))set t=nullendfunctionfunction FG4 takes nothing returns booleanif GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(GCI)and GetUnitTypeId(GetFilterUnit())==GetUnitTypeId(GCI)thencall FF4(GetFilterUnit(),GBI)endifreturn falseendfunctionfunction FH4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit FE4=(LoadUnitHandle(XY,(MKI),(19)))local unit u=GetTriggerUnit()if FE4==null thencall FlushChildHashtable(XY,(MKI))call MZI(t)set TLI=nullset u=nullreturn falseendifif GetOwningPlayer(u)==GetOwningPlayer(TLI)and GetUnitTypeId(u)==GetUnitTypeId(TLI)thencall FF4(u,FE4)endifset TLI=nullset FE4=nullset u=nullreturn falseendfunctionfunction FZ4 takes nothing returns booleanreturn GetSpellAbilityId()==(1093683761)or GetSpellAbilityId()==1093747767endfunctionfunction FV4 takes nothing returns nothinglocal timer t=GetExpiredTimer()local integer MKI=GetHandleId(t)local unit FE4=(LoadUnitHandle(XY,(MKI),(19)))call PauseTimer(t)call FlushChildHashtable(XY,(MKI))call DestroyTimer(t)endfunctionfunction FW4 takes unit N3I returns booleanlocal integer ID=GetUnitTypeId(N3I)return ID==1869836340 or ID==1865429048 or ID==1865429049 or ID==1700946284 or ID==1697657398 or ID==1970107511 or ID==1966092370 or ID==1162032181endfunctionfunction FX4 takes nothing returns booleanreturn GetOwningPlayer(GetFilterUnit())!=GetOwningPlayer(XO)and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 or FW4(GetFilterUnit()))endfunctionfunction FY4 takes nothing returns nothingif GetUnitTypeId(GetEnumUnit())!=1162032181 thencall PauseUnit(GetEnumUnit(),true)call SetUnitTimeScale(GetEnumUnit(),0)call UnitRemoveAbility(GetEnumUnit(),1112896364)call UnitRemoveAbility(GetEnumUnit(),1112896368)call UnitRemoveAbility(GetEnumUnit(),1112896372)call SaveInteger(XY,(GetHandleId((GetEnumUnit()))),((4306)),(1))endifendfunctionfunction FJ4 takes nothing returns nothingif GetUnitTypeId(GetEnumUnit())!=1162032181 thencall SaveInteger(XY,(GetHandleId((GetEnumUnit()))),((4306)),(2))call PauseUnit(GetEnumUnit(),false)call SetUnitTimeScale(GetEnumUnit(),1)endifendfunctionfunction FK4 takes nothing returns nothinglocal timer t=GetExpiredTimer()local integer MKI=GetHandleId(t)local unit FE4=(LoadUnitHandle(XY,(MKI),(19)))local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local group FL4=(LoadGroupHandle(XY,(MKI),(220)))local integer TX2=(LoadInteger(XY,(MKI),(28)))local real P6I=GetUnitX(FE4)local real P7I=GetUnitY(FE4)local boolexpr PI1=Condition(function FX4)local group DW3=MDI()local integer BP1=35+NGI*5if GetUnitAbilityLevel(N0I,1093747767)>0 thenset BP1=30+NGI*10endifcall ForGroup(FL4,function FJ4)set XO=N0Icall GroupEnumUnitsInRange(DW3,P6I,P7I,475,PI1)call GroupClear(FL4)call GroupAddGroup(DW3,FL4)call ForGroup(DW3,function FY4)call MCI(DW3)set TX2=TX2+1call SaveInteger(XY,(MKI),(28),(TX2))if TX2>BP1 thenif Q2==false thencall ForGroup(FL4,function FJ4)endifcall RemoveUnit(FE4)call MCI(FL4)call PauseTimer(t)call FlushChildHashtable(XY,(MKI))call DestroyTimer(t)endifendfunctionfunction FM4 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(N0I,(1093683761))local location TMI=GetSpellTargetLoc()local real P6I=GetLocationX(TMI)local real P7I=GetLocationY(TMI)local unit FE4=CreateUnit(GetOwningPlayer(N0I),(1966092364),P6I,P7I,0)local timer t=CreateTimer()local integer MKI=GetHandleId(t)local group FL4=MDI()local group glocal trigger FN4if NGI==0 thenset NGI=GetUnitAbilityLevel(N0I,1093747767)endifcall SaveUnitHandle(XY,(GetHandleId(t)),(19),(FE4))call TimerStart(t,0.8,false,function FV4)set t=CreateTimer()set MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(19),(FE4))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveGroupHandle(XY,(MKI),(220),(FL4))call SaveInteger(XY,(MKI),(28),(0))call SaveInteger(XY,(MKI),(5),(NGI))call TimerStart(t,0.1,true,function FK4)call RemoveLocation(TMI)set GBI=FE4set GCI=N0Iset g=MDI()call GroupEnumUnitsInRange(g,0,0,25000,Condition(function FG4))call MCI(g)set FN4=CreateTrigger()set MKI=GetHandleId(FN4)call SaveUnitHandle(XY,(MKI),(2),(N0I))call SaveUnitHandle(XY,(MKI),(19),(FE4))call TriggerRegisterEnterRectSimple(FN4,GetWorldBounds())call TriggerAddCondition(FN4,Condition(function FH4))set g=nullset FN4=nullendfunctionfunction J11 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function FZ4))call TriggerAddAction(t,function FM4)endfunctionfunction FS4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if GetTriggerEventId()==EVENT_UNIT_DEATH or GetUnitAbilityLevel(TLI,1110459186)==0 thencall FlushChildHashtable(XY,(MKI))call MZI(t)call SetUnitTimeScale(TLI,1)call SaveInteger(XY,(GetHandleId((TLI))),((4280)),(2))elsecall DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AbsorbMana\\AbsorbManaBirthMissile.mdl",TLI,"origin"))endifset t=nullset TLI=nullreturn falseendfunctionfunction FT4 takes unit TLI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SetUnitTimeScale(TLI,0)call SaveInteger(XY,(GetHandleId((TLI))),((4280)),(1))call TriggerRegisterTimerEvent(t,0.1,true)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function FS4))call SaveUnitHandle(XY,(MKI),(2),(TLI))if((LoadInteger(XY,(GetHandleId((TLI))),((4306))))==1)==true thencall TKI(GDI,TLI,1,30+10*GetUnitAbilityLevel(GDI,1093679153))endifset t=nullendfunctionfunction FR4 takes nothing returns booleanif GetUnitAbilityLevel(GetFilterUnit(),1110459186)>0 and((LoadInteger(XY,(GetHandleId((GetFilterUnit()))),((4280))))==1)==false thencall FT4(GetFilterUnit())endifreturn falseendfunctionfunction FP4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local group g=MDI()set GDI=TLIcall GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),450,Condition(function FR4))call MCI(g)set t=nullset TLI=nullset g=nullreturn falseendfunctionfunction FQ4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.1,true)call TriggerAddCondition(t,Condition(function FP4))call SaveUnitHandle(XY,(MKI),(2),(TLI))set t=nullset TLI=nullendfunctionfunction FU4 takes nothing returns booleanif GetLearnedSkill()==1093679153 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093679153)==1 thencall FQ4()endifreturn falseendfunctionfunction J01 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function FU4))set t=nullendfunctionfunction G04 takes unit u,real GI4 returns nothinglocal integer d=R2I(GI4)local integer array blocal integer a=dlocal integer c=1local integer i=0local integer DG1local real GZOset GFI[0]=1093808968set GFI[1]=1093808971set GFI[2]=1093808972set GFI[3]=1093808970set GFI[4]=1093808969set GFI[5]=1093808973if d<1 thencall UnitRemoveAbility(u,GFI[0])call UnitRemoveAbility(u,GFI[1])call UnitRemoveAbility(u,GFI[2])call UnitRemoveAbility(u,GFI[3])call UnitRemoveAbility(u,GFI[4])call UnitRemoveAbility(u,GFI[5])returnendifloopexitwhen c==0set c=a/2set b[i]=a-c*2set a=cset i=i+1endloopset DG1=5set i=0loopexitwhen i>DG1if b[i]==1 thencall QTI(u,GFI[i])call SetPlayerAbilityAvailable(GetOwningPlayer(u),GFI[i],false)elsecall UnitRemoveAbility(u,GFI[i])endifset i=i+1endloopendfunctionfunction G14 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=GetUnitAbilityLevel(TLI,1093808967)local real FNO=(LoadReal(XY,(GetHandleId(TMI)),(682)))local integer MFI=(LoadInteger(XY,(GetHandleId(TMI)),(683)))-1call G04(TMI,MFI*NGI)call SaveInteger(XY,(GetHandleId(TMI)),(683),(MFI))call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction GO4 takes unit TLI,unit TMI returns nothinglocal integer NGI=GetUnitAbilityLevel(TLI,1093808967)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer MFI=(LoadInteger(XY,(GetHandleId(TMI)),(683)))+1call G04(TMI,MFI*NGI)call SaveInteger(XY,(GetHandleId(TMI)),(683),(MFI))call SaveReal(XY,(GetHandleId(TMI)),(682),(((TimerGetElapsed(M))+GEI-0.01)*1.0))call TriggerRegisterTimerEvent(t,GEI,false)call TriggerRegisterDeathEvent(t,TMI)call TriggerAddCondition(t,Condition(function G14))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AbsorbMana\\AbsorbManaBirthMissile.mdl",TMI,"origin"))set t=nullendfunctionfunction G24 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer TRI=(LoadInteger(XY,(MKI),(30)))local unit TMI=M6I(TRI)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamageSource()==TLI thencall DisableTrigger(t)if GetUnitAbilityLevel(TMI,1093678162)==0 thencall GO4(TLI,TMI)endifcall M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifelsecall M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction G34 takes nothing returns nothinglocal trigger t=CreateTrigger()local unit TMI=GetTriggerUnit()local unit TLI=GetAttacker()local integer MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,1,false)call TriggerAddCondition(t,Condition(function G24))call SaveInteger(XY,(MKI),(30),(M8I(TMI)))call SaveUnitHandle(XY,(MKI),(2),(TLI))set TMI=nullset TLI=nullset t=nullendfunctionfunction G44 takes nothing returns nothinglocal unit TLI=GetAttacker()if((LoadInteger(XY,(GetHandleId((TLI))),((4307))))==1)==false thencall MPI(TLI,4307,0.3)call G34()endifendfunctionfunction G54 takes nothing returns booleanif GetUnitAbilityLevel(GetAttacker(),1093808967)>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(14)))and GetUnitTypeId(GetTriggerUnit())!=1848651852 and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))thencall G44()endifreturn falseendfunctionfunction G64 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function G54))call SaveUnitHandle(XY,(GetHandleId(t)),(14),(GetTriggerUnit()))set t=nullendfunctionfunction G74 takes nothing returns booleanif GetLearnedSkill()==1093808967 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093808967)==1 thencall G64()endifreturn falseendfunctionfunction JO1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function G74))set t=nullendfunctionfunction G84 takes nothing returns nothinglocal real G94=RQI(RPI(GetUnitState(GetEnumUnit(),UNIT_STATE_MANA),GZI),0)local real GA4=G94*0.5if T6I(GetEnumUnit())==false and G94>0 and THI(GetEnumUnit())==false thenif GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)>(GA4+0.5)thencall SetUnitState(GetEnumUnit(),UNIT_STATE_LIFE,GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)-GA4)elsecall SetUnitState(GetEnumUnit(),UNIT_STATE_LIFE,1)call TKI(GVI,GetEnumUnit(),1,GA4)endifcall SetUnitState(GetEnumUnit(),UNIT_STATE_MANA,GetUnitState(GetEnumUnit(),UNIT_STATE_MANA)-G94)if(IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO))thencall SetUnitState(GVI,UNIT_STATE_MANA,GetUnitState(GVI,UNIT_STATE_MANA)+G94*0.5)endifendifendfunctionfunction GB4 takes unit TLI,unit QHI,integer GC4,integer GD4 returns nothinglocal group g=MDI()set GVI=TLIset CK=TLIset GZI=GC4*75+25call GroupEnumUnitsInRange(g,GetUnitX(QHI),GetUnitY(QHI),700,Condition(function AT1))call ForGroup(g,function G84)call MCI(g)set g=nullendfunctionfunction GE4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer MFI=GetTriggerEvalCount(t)local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit GF4local real GG4=2.9local real GH4=GGI+(GHI-GGI)*MFI/(GG4/0.05)call SetUnitScale(QHI,GH4,GH4,GH4)if MFI>(GG4/0.05)thencall GB4(TLI,QHI,(LoadInteger(XY,(MKI),(3000))),(LoadInteger(XY,(MKI),(3002))))set GF4=CreateUnit(GetOwningPlayer(QHI),1697657167,GetUnitX(QHI),GetUnitY(QHI),0)call SetUnitTimeScale(GF4,0.3)call RemoveUnit(QHI)call KillUnit(GF4)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset QHI=nullset GF4=nullreturn falseendfunctionfunction GZ4 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local location l=GetSpellTargetLoc()local unit TLI=GetTriggerUnit()local real x=GetLocationX(l)local real y=GetLocationY(l)local real a=Atan2(y-GetUnitY(TLI),x-GetUnitX(TLI))local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697657165,x,y,a*bj_RADTODEG)call TriggerRegisterTimerEvent(t,0.05,true)call TriggerAddCondition(t,Condition(function GE4))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(3000),((LoadInteger(XY,(GetHandleId(TLI)),(3000)))))call SaveInteger(XY,(MKI),(3001),((LoadInteger(XY,(GetHandleId(TLI)),(3001)))))call SaveInteger(XY,(MKI),(3002),((LoadInteger(XY,(GetHandleId(TLI)),(3002)))))call RemoveLocation(l)set t=nullset l=nullset TLI=nullendfunctionfunction GV4 takes nothing returns booleanif GetSpellAbilityId()==1093686867 thencall GZ4()endifreturn falseendfunctionfunction GW4 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function GV4))set t=nullendfunctionfunction GX4 takes unit TLI,unit TMI,integer GC4,integer GY4 returns nothinglocal unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)local unit GJ4=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)local real GK4=0.5+0.3*GY4if GY4==7 thenset GK4=2.5endifcall QTI(QHI,1093687371)call SetUnitAbilityLevel(QHI,1093687371,GY4)call IssueTargetOrder(QHI,"cyclone",TMI)call TPI(GJ4,TMI,1,70+(GC4+GC4+GY4)*15.0,GK4)set QHI=nullset GJ4=nullendfunctionfunction GL4 takes nothing returns nothingif IsUnitInGroup(GetEnumUnit(),HK)==false thencall GroupAddUnit(HK,GetEnumUnit())call GX4(CK,GetEnumUnit(),TJ,RJ)endifendfunctionfunction GM4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local real x2=(LoadReal(XY,(MKI),(66)))local real y2=(LoadReal(XY,(MKI),(67)))local real a=(LoadReal(XY,(MKI),(137)))local integer GC4=(LoadInteger(XY,(MKI),(3000)))local integer GY4=(LoadInteger(XY,(MKI),(3001)))local group g=(LoadGroupHandle(XY,(MKI),(22)))local real x=GetUnitX(QHI)+25*Cos(a)local real y=GetUnitY(QHI)+25*Sin(a)local group GN4=MDI()local real P3I=PAI(x,y,x2,y2)if P3I<=30 thenset x=x2set y=y2endifcall SetUnitX(QHI,RCI(x))call SetUnitY(QHI,RCI(y))set CK=QHIset HK=gset TJ=GC4set RJ=GY4call GroupEnumUnitsInRange(GN4,x,y,200+25,Condition(function AT1))call ForGroup(GN4,function GL4)call MCI(GN4)if P3I<=30 or GetTriggerEvalCount(t)>125 thencall MCI(g)call KillUnit(QHI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset QHI=nullset g=nullset GN4=nullreturn falseendfunctionfunction GS4 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local location l=GetSpellTargetLoc()local unit TLI=GetTriggerUnit()local real x=GetLocationX(l)local real y=GetLocationY(l)local real a=Atan2(y-GetUnitY(TLI),x-GetUnitX(TLI))local unit QHIset x=GetUnitX(TLI)set y=GetUnitY(TLI)set QHI=CreateUnit(GetOwningPlayer(TLI),1848652117,x,y,a*bj_RADTODEG)call TriggerRegisterTimerEvent(t,0.025,true)call TriggerAddCondition(t,Condition(function GM4))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveReal(XY,(MKI),(66),((x+(400+400.0*(LoadInteger(XY,(GetHandleId((TLI))),(3000))))*Cos(a))*1.0))call SaveReal(XY,(MKI),(67),((y+(400+400.0*(LoadInteger(XY,(GetHandleId((TLI))),(3000))))*Sin(a))*1.0))call SaveInteger(XY,(MKI),(3000),((LoadInteger(XY,(GetHandleId(TLI)),(3000)))))call SaveInteger(XY,(MKI),(3001),((LoadInteger(XY,(GetHandleId(TLI)),(3001)))))call SaveReal(XY,(MKI),(137),((a)*1.0))call SaveGroupHandle(XY,(MKI),(22),(MDI()))call RemoveLocation(l)set t=nullset l=nullset TLI=nullendfunctionfunction GT4 takes nothing returns booleanif GetSpellAbilityId()==1093686859 thencall GS4()endifreturn falseendfunctionfunction GR4 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function GT4))call RYI(1093687371,GetRandomReal(1,25))set t=nullendfunctionfunction GP4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))call UnitRemoveAbility(TMI,1093686858)call UnitRemoveAbility(TMI,1093742649)if GetUnitAbilityLevel(TMI,1093686858)==0 or GetUnitAbilityLevel(TMI,1093742649)==0 thencall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TMI=nullreturn falseendfunctionfunction GQ4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)call UnitRemoveAbility(TMI,1093686858)call UnitRemoveAbility(TMI,1093742649)if GetUnitAbilityLevel(TMI,1093686858)>0 or GetUnitAbilityLevel(TMI,1093742649)>0 thenset t=CreateTrigger()set MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(17),(TMI))call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function GP4))endifset t=nullset TMI=nullreturn falseendfunctionfunction GU4 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit N0I=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer GC4=(LoadInteger(XY,(GetHandleId(N0I)),(3000)))local integer GD4=(LoadInteger(XY,(GetHandleId(N0I)),(3002)))call QTI(TMI,1093686858)call SetUnitAbilityLevel(TMI,1093686858,GC4)call QTI(TMI,1093742649)call SetUnitAbilityLevel(TMI,1093742649,GD4)call TriggerRegisterTimerEvent(t,9,false)call TriggerAddCondition(t,Condition(function GQ4))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIsp\\SpeedTarget.mdl",TMI,"origin")))set t=nullset N0I=nullset TMI=nullendfunctionfunction H04 takes nothing returns booleanif GetSpellAbilityId()==1093686865 thencall GU4()endifreturn falseendfunctionfunction HI4 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function H04))call RYI(1093686858,GetRandomReal(1,25))call RYI(1093742649,GetRandomReal(1,25))set t=nullendfunctionfunction H14 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))if GetUnitAbilityLevel(N0I,1110456408)==0 thencall KillUnit(QHI)call FlushChildHashtable(XY,(MKI))call MZI(t)elsecall SetUnitAbilityLevel(QHI,1093686856,(LoadInteger(XY,(GetHandleId(N0I)),(3001))))call SetUnitX(QHI,GetUnitX(N0I))call SetUnitY(QHI,GetUnitY(N0I))endifset t=nullset QHI=nullset N0I=nullreturn falseendfunctionfunction HO4 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit N0I=GetTriggerUnit()local unit QHI=CreateUnit(GetOwningPlayer(N0I),1697657174,GetUnitX(N0I),GetUnitY(N0I),0)call QTI(QHI,1093686856)call SetUnitAbilityLevel(QHI,1093686856,(LoadInteger(XY,(GetHandleId(N0I)),(3001))))call TriggerRegisterTimerEvent(t,0.05,true)call TriggerAddCondition(t,Condition(function H14))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveUnitHandle(XY,(MKI),(14),(N0I))set t=nullset N0I=nullendfunctionfunction H24 takes nothing returns booleanif GetSpellAbilityId()==1093687372 thencall HO4()endifreturn falseendfunctionfunction H34 takes unit N0I returns nothingif GetUnitAbilityLevel(N0I,1093687372)>0 thencall SetUnitAbilityLevel(N0I,1093687372,(LoadInteger(XY,(GetHandleId(N0I)),(3000))))endifendfunctionfunction H44 takes nothing returns booleanif IsUnitIllusion(GetTriggerUnit())==false thencall H34(GetTriggerUnit())endifreturn falseendfunctionfunction H54 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function H24))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function H44))call RYI(1093686856,GetRandomReal(1,25))set t=nullendfunctionfunction H64 takes unit TLI,unit TMI,integer GC4 returns nothinglocal unit QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call QTI(QHI,1093686868)call SetUnitAbilityLevel(QHI,1093686868,GC4)call IssueTargetOrder(QHI,"drunkenhaze",TMI)set QHI=nullendfunctionfunction H74 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real NN2=(LoadReal(XY,(MKI),(13)))local real NT2=(LoadReal(XY,(MKI),(193)))local integer GC4=(LoadInteger(XY,(MKI),(3000)))local integer GY4=(LoadInteger(XY,(MKI),(3001)))local integer JNO=GY4*25/3local real xlocal real ylocal integer MFI=GetTriggerEvalCount(t)if MFI>JNO/3 thencall SaveReal(XY,(MKI),(193),((NT2*0.98)*1.0))endifif MFI>JNO or GetTriggerEventId()==EVENT_UNIT_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)if GetTriggerEventId()!=EVENT_UNIT_DEATH thencall H64(TLI,TMI,GC4)endifelseset x=RCI(GetUnitX(TMI)+NT2*Cos(NN2))set y=RGI(GetUnitY(TMI)+NT2*Sin(NN2))call QEI(x,y,150)call SetUnitPosition(TMI,x,y)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction H84 takes unit TLI,unit TMI,integer GC4,integer GY4,integer GD4 returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real NN2=Atan2(GetUnitY(TMI)-GetUnitY(TLI),GetUnitX(TMI)-GetUnitX(TLI))call TKI(TLI,TMI,1,GD4*40)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveReal(XY,(MKI),(13),((NN2)*1.0))call SaveReal(XY,(MKI),(193),((6)*1.0))call SaveInteger(XY,(MKI),(3000),(GC4))call SaveInteger(XY,(MKI),(3001),(GY4))call TriggerRegisterTimerEvent(t,0.03,true)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function H74))set t=nullendfunctionfunction H94 takes nothing returns nothingif IsUnitInGroup(GetEnumUnit(),HK)==false and T6I(GetEnumUnit())==false thencall GroupAddUnit(HK,GetEnumUnit())call H84(CK,GetEnumUnit(),TJ,RJ,PJ)endifendfunctionfunction HA4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local real a=(LoadReal(XY,(MKI),(137)))local real x2=(LoadReal(XY,(MKI),(66)))local real y2=(LoadReal(XY,(MKI),(67)))local group g=(LoadGroupHandle(XY,(MKI),(22)))local integer GC4=(LoadInteger(XY,(MKI),(3000)))local integer GY4=(LoadInteger(XY,(MKI),(3001)))local integer GD4=(LoadInteger(XY,(MKI),(3002)))local real x=GetUnitX(QHI)local real y=GetUnitY(QHI)local group g2if PAI(x,y,x2,y2)<100 thenset x=x2set y=y2elseset x=x+33*Cos(a)set y=y+33*Sin(a)endifcall SetUnitX(QHI,RCI(x))call SetUnitY(QHI,RGI(y))set g2=MDI()set CK=QHIset HK=gset TJ=GC4set RJ=GY4set PJ=GD4call GroupEnumUnitsInRange(g2,x,y,200,Condition(function AT1))call ForGroup(g2,function H94)call MCI(g2)if(x==x2 and y==y2)or GetTriggerEvalCount(t)>35 thenset g2=MDI()set CK=QHIset HK=gset TJ=GC4set RJ=GY4set PJ=GD4call GroupEnumUnitsInRange(g2,x,y,250,Condition(function AT1))call ForGroup(g2,function H94)call MCI(g2)call FlushChildHashtable(XY,(MKI))call MZI(t)call KillUnit(QHI)call MCI(g)endifset t=nullset QHI=nullset g=nullset g2=nullreturn falseendfunctionfunction HB4 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local location l=GetSpellTargetLoc()local unit TLI=GetTriggerUnit()local real x=GetLocationX(l)local real y=GetLocationY(l)local real a=Atan2(y-GetUnitY(TLI),x-GetUnitX(TLI))local unit QHI=CreateUnit(GetOwningPlayer(TLI),1848652120,GetUnitX(TLI),GetUnitY(TLI),a*bj_RADTODEG)call TriggerRegisterTimerEvent(t,0.03,true)call TriggerAddCondition(t,Condition(function HA4))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveReal(XY,(MKI),(137),((a)*1.0))call SaveReal(XY,(MKI),(66),((GetUnitX(TLI)+1000*Cos(a))*1.0))call SaveReal(XY,(MKI),(67),((GetUnitY(TLI)+1000*Sin(a))*1.0))call SaveGroupHandle(XY,(MKI),(22),(MDI()))call SaveInteger(XY,(MKI),(3000),((LoadInteger(XY,(GetHandleId(TLI)),(3000)))))call SaveInteger(XY,(MKI),(3001),((LoadInteger(XY,(GetHandleId(TLI)),(3001)))))call SaveInteger(XY,(MKI),(3002),((LoadInteger(XY,(GetHandleId(TLI)),(3002)))))call RemoveLocation(l)set t=nullset l=nullset TLI=nullendfunctionfunction HC4 takes nothing returns booleanif GetSpellAbilityId()==1093686861 thencall HB4()endifreturn falseendfunctionfunction HD4 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function HC4))call RYI(1093686868,GetRandomReal(1,25))set t=nullendfunctionfunction HE4 takes unit N0I returns reallocal integer GD4=(LoadInteger(XY,(GetHandleId(N0I)),(3002)))return(80+GD4*35.0)/2endfunctionfunction HF4 takes unit N0I returns reallocal integer GC4=(LoadInteger(XY,(GetHandleId(N0I)),(3000)))local integer GY4=(LoadInteger(XY,(GetHandleId(N0I)),(3001)))local integer GD4=(LoadInteger(XY,(GetHandleId(N0I)),(3002)))return 325+GC4*175.0endfunctionfunction HG4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer TRI=(LoadInteger(XY,(MKI),(30)))local unit TMI=M6I(TRI)local real TSI=(LoadReal(XY,(MKI),(20)))local effect FX=(LoadEffectHandle(XY,(MKI),(32)))local integer MFI=GetTriggerEvalCount(t)call TKI(TLI,TMI,1,TSI)if MFI==3 thencall M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)call DestroyEffect(FX)endifset t=nullset TLI=nullset TMI=nullset FX=nullreturn falseendfunctionfunction HH4 takes unit TLI,unit TMI,real TSI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(30),(M8I(TMI)))call SaveReal(XY,(MKI),(20),((TSI)*1.0))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("Environment\\SmallBuildingFire\\SmallBuildingFire2.mdl",TMI,"chest")))call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function HG4))set t=nullendfunctionfunction HZ4 takes nothing returns nothingcall HH4(CK,GetEnumUnit(),QJ/5)call TKI(CK,GetEnumUnit(),1,QJ)endfunctionfunction HV4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local real a=(LoadReal(XY,(MKI),(137)))local integer MFI=GetTriggerEvalCount(t)-26local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real U2Ilocal real U3Ilocal unit QHIlocal group gif MFI==1 thenset QHI=CreateUnit(GetOwningPlayer(TLI),1697657164,x,y,a*bj_RADTODEG)call SaveUnitHandle(XY,(MKI),(19),(QHI))elseif MFI>1 thenset QHI=(LoadUnitHandle(XY,(MKI),(19)))endifif MFI>0 thenset U2I=RCI(GetUnitX(QHI)+15*Cos(a))set U3I=RGI(GetUnitY(QHI)+15*Sin(a))call SetUnitX(QHI,U2I)call SetUnitY(QHI,U3I)if(MFI>1 and ModuloInteger(MFI,10)==0)or MFI==1 thenset g=MDI()set CK=TLIset QJ=HE4(TLI)call GroupEnumUnitsInRange(g,U2I,U3I,300,Condition(function AT1))call ForGroup(g,function HZ4)call MCI(g)call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl",U2I,U3I))endifif MFI>HF4(TLI)/16.6 thencall FlushChildHashtable(XY,(MKI))call MZI(t)call KillUnit(QHI)endifendifset t=nullset g=nullset QHI=nullset TLI=nullreturn falseendfunctionfunction HW4 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local location l=GetSpellTargetLoc()local unit TLI=GetTriggerUnit()local real x=GetLocationX(l)local real y=GetLocationY(l)local real a=Atan2(y-GetUnitY(TLI),x-GetUnitX(TLI))local unit HX4=CreateUnit(GetOwningPlayer(TLI),1697657163,x,y,a*bj_RADTODEG)call SetUnitTimeScale(HX4,0.58)call UnitApplyTimedLife(HX4,1112820806,1.75)call TriggerRegisterTimerEvent(t,0.05,true)call TriggerAddCondition(t,Condition(function HV4))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))call SaveReal(XY,(MKI),(137),((a)*1.0))call RemoveLocation(l)set t=nullset l=nullset TLI=nullendfunctionfunction HY4 takes nothing returns booleanif GetSpellAbilityId()==1093686862 thencall HW4()endifreturn falseendfunctionfunction HJ4 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function HY4))set t=nullendfunctionfunction HK4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer TRI=(LoadInteger(XY,(MKI),(30)))local unit TMI=M6I(TRI)local real FNO=(LoadReal(XY,(GetHandleId(TMI)),(3007)))if FNO+5<=(TimerGetElapsed(M))thencall UnitRemoveAbility(TMI,1093686871)endifcall M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TMI=nullreturn falseendfunctionfunction HL4 takes unit TMI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer NGI=GetUnitAbilityLevel(TMI,1093686871)if NGI==0 thencall QTI(TMI,1093686871)endifcall SetUnitAbilityLevel(TMI,1093686871,NGI+1)call SaveInteger(XY,(MKI),(30),(M8I(TMI)))call SaveReal(XY,(GetHandleId(TMI)),(3007),(((TimerGetElapsed(M)))*1.0))call TriggerRegisterTimerEvent(t,5,false)call TriggerAddCondition(t,Condition(function HK4))set t=nullendfunctionfunction HM4 takes nothing returns booleanlocal real dif GetUnitAbilityLevel(GetTriggerUnit(),1110456625)>0 and GetUnitAbilityLevel(GetEventDamageSource(),1093686870)>0 and(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(2)))==GetEventDamageSource()thencall UnitRemoveAbility(GetTriggerUnit(),1110456625)call DisableTrigger(GetTriggeringTrigger())call HL4(GetTriggerUnit())call FlushChildHashtable(XY,(GetHandleId(GetTriggeringTrigger())))call MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction HN4 takes nothing returns nothinglocal trigger tlocal unit TMIlocal unit TLIif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT thenset TMI=GetSpellTargetUnit()set TLI=GetTriggerUnit()elseset TMI=GetTriggerUnit()set TLI=GetAttacker()endifif IsUnitIllusion(TLI)==false thenset t=CreateTrigger()call SaveUnitHandle(XY,(GetHandleId(t)),(2),(TLI))call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function HM4))endifset t=nullset TMI=nullset TLI=nullendfunctionfunction HS4 takes nothing returns booleanif GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED thenif GetUnitAbilityLevel(GetAttacker(),1093686870)>0 and(LoadBoolean(XY,(GetHandleId(GetTriggeringTrigger())),(3008)))and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(2)))thencall HN4()endifelseif GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER thenif(GetIssuedOrderId()==OrderId("poisonarrows"))thencall SaveBoolean(XY,(GetHandleId(GetTriggeringTrigger())),(3008),(true))elseif(GetIssuedOrderId()==OrderId("unpoisonarrows"))thencall SaveBoolean(XY,(GetHandleId(GetTriggeringTrigger())),(3008),(false))endifelseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()==1093686870 thencall HN4()endifreturn falseendfunctionfunction HT4 takes unit TLI returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_ISSUED_ORDER)call TriggerAddCondition(t,Condition(function HS4))call SaveUnitHandle(XY,(GetHandleId(t)),(2),(TLI))call SaveBoolean(XY,(GetHandleId(t)),(3008),(true))set t=nullendfunctionfunction HR4 takes nothing returns nothingcall KillUnit(GetEnumUnit())endfunctionfunction HP4 takes nothing returns booleanif GetUnitTypeId(GetFilterUnit())==1848652343 thenreturn trueendifreturn falseendfunctionfunction HQ4 takes player p returns nothinglocal group g=MDI()call GroupEnumUnitsOfPlayer(g,p,Condition(function HP4))call ForGroup(g,function HR4)call MCI(g)set g=nullendfunctionfunction HU4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit QHIlocal integer GY4=(LoadInteger(XY,(GetHandleId(TLI)),(3001)))local integer GD4=(LoadInteger(XY,(GetHandleId(TLI)),(3002)))call HQ4(GetOwningPlayer(TLI))set QHI=CreateUnit(GetOwningPlayer(TLI),1848652343,GetUnitX(TLI),GetUnitY(TLI),GetUnitFacing(TLI))call SetUnitColor(QHI,GetPlayerColor(BO[0]))call AddSpecialEffectTarget("Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl",QHI,"chest")call UnitApplyTimedLife(QHI,1112820806,10+10*GY4)call SetUnitAbilityLevel(QHI,1093686870,GD4)call HT4(QHI)if RI0[GetPlayerId(GetOwningPlayer(TLI))]thencall SelectUnitAddForPlayer(QHI,GetOwningPlayer(TLI))endifif GY4>3 and GD4>3 thenset QHI=CreateUnit(GetOwningPlayer(TLI),1848652343,GetUnitX(TLI),GetUnitY(TLI),GetUnitFacing(TLI))call SetUnitColor(QHI,GetPlayerColor(BO[0]))call AddSpecialEffectTarget("Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl",QHI,"chest")call UnitApplyTimedLife(QHI,1112820806,10+10*GY4)call SetUnitAbilityLevel(QHI,1093686870,GD4)call HT4(QHI)if RI0[GetPlayerId(GetOwningPlayer(TLI))]thencall SelectUnitAddForPlayer(QHI,GetOwningPlayer(TLI))endifendifcall SetPlayerTechResearched(GetOwningPlayer(TLI),1378889799,GD4)call SetPlayerTechResearched(GetOwningPlayer(TLI),1378889800,GY4)set TLI=nullset QHI=nullendfunctionfunction Z04 takes nothing returns booleanif GetSpellAbilityId()==1093686863 thencall HU4()endifreturn falseendfunctionfunction ZI4 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function Z04))call RYI(1093686870,GetRandomReal(1,25))call RYI(1093686871,GetRandomReal(1,25))set t=nullendfunctionfunction Z14 takes unit TLI returns integerlocal integer NGI=(LoadInteger(XY,(GetHandleId(TLI)),(3001)))if NGI==1 thenreturn 1093808944elseif NGI==2 thenreturn 1093808730elseif NGI==3 thenreturn 1093808729elseif NGI==4 thenreturn 1093808725elseif NGI==5 thenreturn 1093808726elseif NGI==6 thenreturn 1093808727elseif NGI==7 thenreturn 1093808728endifreturn 1093808944endfunctionfunction ZO4 takes unit TMI returns nothingcall UnitRemoveAbility(TMI,1093808944)call UnitRemoveAbility(TMI,1093808730)call UnitRemoveAbility(TMI,1093808729)call UnitRemoveAbility(TMI,1093808725)call UnitRemoveAbility(TMI,1093808726)call UnitRemoveAbility(TMI,1093808727)call UnitRemoveAbility(TMI,1093808728)call UnitRemoveAbility(TMI,1110456410)endfunctionfunction Z24 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real YSO=(LoadReal(XY,(GetHandleId(TMI)),(681)))call FlushChildHashtable(XY,(MKI))call MZI(t)if GetTriggerEventId()==EVENT_WIDGET_DEATH or YSO<(TimerGetElapsed(M))thencall ZO4(TMI)endifset t=nullset TMI=nullreturn falseendfunctionfunction Z34 takes nothing returns nothinglocal unit TLI=CKlocal unit TMI=GetEnumUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real YSO=(LoadReal(XY,(GetHandleId(TMI)),(681)))if YSO<(TimerGetElapsed(M))thencall QTI(TMI,Z14(TLI))endifcall SaveReal(XY,(GetHandleId(TMI)),(681),(((TimerGetElapsed(M))+2)*1.0))call SaveUnitHandle(XY,(MKI),(17),(TMI))call TriggerRegisterTimerEvent(t,2.01,false)call TriggerRegisterDeathEvent(t,TMI)call TriggerAddCondition(t,Condition(function Z24))set t=nullset TLI=nullendfunctionfunction Z44 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real P4I=(LoadReal(XY,(MKI),(6)))local real P5I=(LoadReal(XY,(MKI),(7)))local real a=(LoadReal(XY,(MKI),(137)))local real BP1=(LoadReal(XY,(MKI),(57)))local real xlocal real ylocal integer i=1local integer MFI=GetTriggerEvalCount(t)local group gif MFI*0.1>BP1 thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseset g=MDI()set CK=TLIloopexitwhen i>7set x=P4I+80*i*Cos((a+90)*bj_DEGTORAD)set y=P5I+80*i*Sin((a+90)*bj_DEGTORAD)call GroupEnumUnitsInRange(g,x,y,105,Condition(function AU1))call ForGroup(g,function Z34)set x=P4I+80*i*Cos((a-90)*bj_DEGTORAD)set y=P5I+80*i*Sin((a-90)*bj_DEGTORAD)call GroupEnumUnitsInRange(g,x,y,105,Condition(function AU1))call ForGroup(g,function Z34)set i=i+1endloopcall MCI(g)set g=nullendifset t=nullset TLI=nullreturn falseendfunctionfunction Z54 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local real a=GetUnitFacing(TLI)local integer i=1local unit QHIlocal real xlocal real ylocal real P4I=GetUnitX(TLI)+225*Cos(a*bj_DEGTORAD)local real P5I=GetUnitY(TLI)+225*Sin(a*bj_DEGTORAD)local integer GY4=(LoadInteger(XY,(GetHandleId(TLI)),(3001)))local integer GD4=(LoadInteger(XY,(GetHandleId(TLI)),(3002)))local real BP1=1.5+1.5*GY4local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)loopexitwhen i>7set x=P4I+80*i*Cos((a+90)*bj_DEGTORAD)set y=P5I+80*i*Sin((a+90)*bj_DEGTORAD)set QHI=CreateUnit(GetOwningPlayer(TLI),1966092367,x,y,GetRandomReal(0,360))call SetUnitAbilityLevel(QHI,1395667016,GY4)call SetUnitAbilityLevel(QHI,1093687374,GD4)call SetUnitAnimation(QHI,"birth")call QueueUnitAnimation(QHI,"stand")call UnitApplyTimedLife(QHI,1112820806,BP1)set x=P4I+80*i*Cos((a-90)*bj_DEGTORAD)set y=P5I+80*i*Sin((a-90)*bj_DEGTORAD)set QHI=CreateUnit(GetOwningPlayer(TLI),1966092367,x,y,GetRandomReal(0,360))call SetUnitAbilityLevel(QHI,1395667016,GY4)call SetUnitAbilityLevel(QHI,1093687374,GD4)call SetUnitAnimation(QHI,"birth")call QueueUnitAnimation(QHI,"stand")call UnitApplyTimedLife(QHI,1112820806,BP1)set i=i+1endloopcall TriggerAddCondition(t,Condition(function Z44))call TriggerRegisterTimerEvent(t,0.1,true)call SaveReal(XY,(MKI),(6),((P4I)*1.0))call SaveReal(XY,(MKI),(7),((P5I)*1.0))call SaveReal(XY,(MKI),(137),((a)*1.0))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(57),((BP1)*1.0))set QHI=nullset TLI=nullset t=nullendfunctionfunction Z64 takes nothing returns booleanif GetSpellAbilityId()==1093686864 thencall Z54()endifreturn falseendfunctionfunction Z74 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function Z64))call RYI(1395667016,GetRandomReal(1,25))call RYI(1093687374,GetRandomReal(1,25))set t=nullendfunctionfunction Z84 takes nothing returns nothingif T4I(GetEnumUnit())==false thencall TKI(CK,GetEnumUnit(),3,QJ)endifendfunctionfunction Z94 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local real TSI=(LoadReal(XY,(MKI),(20)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local group g=MDI()local integer MFIset CK=N0Icall GroupEnumUnitsInRange(g,x,y,200,Condition(function AT1))set MFI=CountUnitsInGroup(g)if MFI<1 thenset MFI=1endifset QJ=TSI/MFIcall ForGroup(g,function Z84)call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",x,y))call MCI(g)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset N0I=nullset g=nullreturn falseendfunctionfunction ZA4 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit N0I=GetTriggerUnit()local location l=GetSpellTargetLoc()local real x=GetLocationX(l)local real y=GetLocationY(l)local real TSI=(LoadInteger(XY,(GetHandleId(N0I)),(3002)))*62.5+12.5+25local string s=""if IsPlayerAlly(GetLocalPlayer(),GetOwningPlayer(N0I))==true or(C2 and(GetLocalPlayer()==DO0 or GetLocalPlayer()==D20))thenset s="Abilities\\Spells\\Items\\VampiricPotion\\VampPotionCaster.mdl"endifcall QJI(GetOwningPlayer(N0I),5.7,x,y,400)call TriggerRegisterTimerEvent(t,1.7,false)call TriggerAddCondition(t,Condition(function Z94))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))call SaveReal(XY,(MKI),(20),((TSI)*1.0))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffect(s,x,y)))call RemoveLocation(l)set t=nullset N0I=nullset l=nullendfunctionfunction ZB4 takes nothing returns booleanif GetSpellAbilityId()==1093686855 thencall ZA4()endifreturn falseendfunctionfunction ZC4 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function ZB4))set t=nullendfunctionfunction ZD4 takes unit TLI,unit TMI,integer NGI returns nothinglocal unit QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call QTI(QHI,1093686857)call IssueTargetOrder(QHI,"thunderbolt",TMI)if T6I(TMI)==false thencall TKI(TLI,TMI,1,NGI*7)endifset QHI=nullendfunctionfunction ZE4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer TRI=(LoadInteger(XY,(MKI),(30)))local unit TMI=M6I(TRI)local integer NGI=(LoadInteger(XY,(MKI),(5)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamage()>10 and((LoadInteger(XY,(GetHandleId((t))),((4263))))==1)==false and GetOwningPlayer(GetEventDamageSource())!=GetOwningPlayer(GetTriggerUnit())thencall DisableTrigger(t)call ZD4(TLI,TMI,NGI)call EnableTrigger(t)call MLI(t,4263,0.8-NGI*0.0285)endifelsecall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TMI=nullset TLI=nullreturn falseendfunctionfunction ZF4 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit N0I=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=(LoadInteger(XY,(GetHandleId(N0I)),(3001)))call TriggerRegisterTimerEvent(t,2.5+NGI*0.5,false)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function ZE4))call SaveInteger(XY,(MKI),(30),(M8I(TMI)))call SaveInteger(XY,(MKI),(5),(NGI))call SaveUnitHandle(XY,(MKI),(2),(N0I))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("Abilities\\Weapons\\SpiritOfVengeanceMissile\\SpiritOfVengeanceMissile.mdl",TMI,"overhead")))call ZD4(N0I,TMI,NGI)set t=nullset N0I=nullset TMI=nullendfunctionfunction ZG4 takes nothing returns booleanif GetSpellAbilityId()==1093686874 thencall ZF4()endifreturn falseendfunctionfunction ZH4 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function ZG4))call RYI(1093686857,GetRandomReal(1,25))set t=nullendfunctionfunction ZZ4 takes unit N0I returns nothinglocal integer MKI=GetHandleId(N0I)local boolean ZV4=(LoadBoolean(XY,(MKI),(3003)))local trigger tif ZV4 thencall SaveBoolean(XY,(MKI),(3003),(false))set t=(LoadTriggerHandle(XY,(MKI),(3006)))call FlushChildHashtable(XY,(GetHandleId(t)))call MZI(t)endifset t=nullendfunctionfunction ZW4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local integer NGI=(LoadInteger(XY,(MKI),(5)))call SetUnitState(N0I,UNIT_STATE_LIFE,GetUnitState(N0I,UNIT_STATE_LIFE)+NGI*1)return falseendfunctionfunction ZX4 takes unit N0I,integer NGI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(N0I)call SaveBoolean(XY,(MKI),(3003),(true))call SaveTriggerHandle(XY,(MKI),(3006),(t))call SaveUnitHandle(XY,(GetHandleId(t)),(14),(N0I))call SaveInteger(XY,(GetHandleId(t)),(5),(NGI))call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function ZW4))set t=nullendfunctionfunction ZY4 takes nothing returns nothinglocal integer ZJ4=0local unit N0I=GetTriggerUnit()local integer MKI=GetHandleId(N0I)local integer ZK4=(LoadInteger(XY,(MKI),(3013)))local integer ZL4=(LoadInteger(XY,(MKI),(3014)))local integer ZM4=(LoadInteger(XY,(MKI),(3015)))local integer ZN4=(LoadInteger(XY,(MKI),(3016)))local integer ZS4=(LoadInteger(XY,(MKI),(3017)))if ZK4==3 and ZL4==0 and ZM4==0 thenset ZJ4=1elseif ZK4==2 and ZL4==1 and ZM4==0 thenset ZJ4=2elseif ZK4==2 and ZL4==0 and ZM4==1 thenset ZJ4=3elseif ZK4==1 and ZL4==2 and ZM4==0 thenset ZJ4=4elseif ZK4==1 and ZL4==1 and ZM4==1 thenset ZJ4=5elseif ZK4==1 and ZL4==0 and ZM4==2 thenset ZJ4=6elseif ZK4==0 and ZL4==1 and ZM4==2 thenset ZJ4=7elseif ZK4==0 and ZL4==2 and ZM4==1 thenset ZJ4=8elseif ZK4==0 and ZL4==0 and ZM4==3 thenset ZJ4=9elseif ZK4==0 and ZL4==3 and ZM4==0 thenset ZJ4=10endifif GWI[ZJ4]==ZS4 thenreturnendifif ZN4!=0 and ZS4!=0 thencall SetPlayerAbilityAvailable(GetOwningPlayer(N0I),ZN4,false)call SetPlayerAbilityAvailable(GetOwningPlayer(N0I),ZS4,false)set ZN4=ZS4set ZS4=GWI[ZJ4]call SetPlayerAbilityAvailable(GetOwningPlayer(N0I),ZN4,true)call SetPlayerAbilityAvailable(GetOwningPlayer(N0I),ZS4,true)elseif ZN4==0 and ZS4!=0 thencall SetPlayerAbilityAvailable(GetOwningPlayer(N0I),ZS4,false)set ZN4=ZS4set ZS4=GWI[ZJ4]call SetPlayerAbilityAvailable(GetOwningPlayer(N0I),ZN4,true)call SetPlayerAbilityAvailable(GetOwningPlayer(N0I),ZS4,true)elseset ZS4=GWI[ZJ4]call SetPlayerAbilityAvailable(GetOwningPlayer(N0I),ZS4,true)endifcall SaveInteger(XY,(MKI),(3016),(ZN4))call SaveInteger(XY,(MKI),(3017),(ZS4))call H34(N0I)set N0I=nullendfunctionfunction ZT4 takes unit N0I returns nothinglocal integer MKI=GetHandleId(N0I)local integer ZK4=(LoadInteger(XY,(MKI),(3013)))local integer ZL4=(LoadInteger(XY,(MKI),(3014)))local integer ZM4=(LoadInteger(XY,(MKI),(3015)))local integer GC4=GetUnitAbilityLevel(N0I,1093808472)local integer GY4=GetUnitAbilityLevel(N0I,1093808471)local integer GD4=GetUnitAbilityLevel(N0I,1093808470)call UnitRemoveAbility(N0I,1093687108)call UnitRemoveAbility(N0I,1093686853)call ZZ4(N0I)call UnitRemoveAbility(N0I,1093686839)if ZK4>0 thencall QTI(N0I,1093687108)call QTI(N0I,1093686853)call SetUnitAbilityLevel(N0I,1093687108,ZK4*GC4)call SetUnitAbilityLevel(N0I,1093686853,ZK4*GC4)call SetPlayerAbilityAvailable(GetOwningPlayer(N0I),1093687108,false)endifif ZL4>0 thencall ZX4(N0I,ZL4*GY4)endifif ZM4>0 thencall QTI(N0I,1093686839)call SetUnitAbilityLevel(N0I,1093686839,ZM4*GD4)endifendfunctionfunction ZR4 takes unit N0I,integer ZK4,integer ZL4,integer ZM4 returns nothinglocal integer Orb1=0local integer Orb2=0local integer Orb3=0local integer ZP4local integer ZQ4local integer ZU4local integer V04local integer VI4local integer V14local integer VO4local integer V24local integer V34call UnitRemoveAbility(N0I,1093682254)call UnitRemoveAbility(N0I,1093682247)call UnitRemoveAbility(N0I,1093683544)call UnitRemoveAbility(N0I,1093683505)call UnitRemoveAbility(N0I,1093683504)call UnitRemoveAbility(N0I,1093683290)call UnitRemoveAbility(N0I,1093683523)call UnitRemoveAbility(N0I,1093683522)call UnitRemoveAbility(N0I,1093683524)call UnitRemoveAbility(N0I,1093808707)call UnitRemoveAbility(N0I,1093808708)call UnitRemoveAbility(N0I,1093808709)call UnitRemoveAbility(N0I,1093808710)call UnitRemoveAbility(N0I,1093808711)call UnitRemoveAbility(N0I,1093808712)call UnitRemoveAbility(N0I,1093808713)call UnitRemoveAbility(N0I,1093808714)call UnitRemoveAbility(N0I,1093808715)if DE1(N0I,JT0)==null thenset ZP4=1093682254set ZQ4=1093682247set ZU4=1093683544set V04=1093683505set VI4=1093683504set V14=1093683290set VO4=1093683523set V24=1093683522set V34=1093683524elseset ZP4=1093808707set ZQ4=1093808708set ZU4=1093808709set V04=1093808710set VI4=1093808711set V14=1093808712set VO4=1093808713set V24=1093808714set V34=1093808715endifif ZK4==1 and ZL4==0 and ZM4==0 thencall QTI(N0I,ZP4)elseif ZK4==0 and ZL4==1 and ZM4==0 thencall QTI(N0I,V04)elseif ZK4==0 and ZL4==0 and ZM4==1 thencall QTI(N0I,VO4)elseif ZK4==2 and ZL4==0 and ZM4==0 thencall QTI(N0I,ZP4)call QTI(N0I,ZQ4)elseif ZK4==1 and ZL4==1 and ZM4==0 thencall QTI(N0I,ZP4)call QTI(N0I,VI4)elseif ZK4==1 and ZL4==0 and ZM4==1 thencall QTI(N0I,ZP4)call QTI(N0I,V24)elseif ZK4==0 and ZL4==2 and ZM4==0 thencall QTI(N0I,V04)call QTI(N0I,VI4)elseif ZK4==0 and ZL4==1 and ZM4==1 thencall QTI(N0I,V04)call QTI(N0I,V24)elseif ZK4==0 and ZL4==0 and ZM4==2 thencall QTI(N0I,VO4)call QTI(N0I,V24)elseif ZK4==3 and ZL4==0 and ZM4==0 thencall QTI(N0I,ZP4)call QTI(N0I,ZQ4)call QTI(N0I,ZU4)elseif ZK4==2 and ZL4==1 and ZM4==0 thencall QTI(N0I,ZP4)call QTI(N0I,ZQ4)call QTI(N0I,V14)elseif ZK4==2 and ZL4==0 and ZM4==1 thencall QTI(N0I,ZP4)call QTI(N0I,ZQ4)call QTI(N0I,V34)elseif ZK4==1 and ZL4==2 and ZM4==0 thencall QTI(N0I,ZP4)call QTI(N0I,VI4)call QTI(N0I,V14)elseif ZK4==1 and ZL4==1 and ZM4==1 thencall QTI(N0I,ZP4)call QTI(N0I,VI4)call QTI(N0I,V34)elseif ZK4==1 and ZL4==0 and ZM4==2 thencall QTI(N0I,ZP4)call QTI(N0I,V24)call QTI(N0I,V34)elseif ZK4==0 and ZL4==1 and ZM4==2 thencall QTI(N0I,VO4)call QTI(N0I,V24)call QTI(N0I,V14)elseif ZK4==0 and ZL4==2 and ZM4==1 thencall QTI(N0I,V04)call QTI(N0I,VI4)call QTI(N0I,V34)elseif ZK4==0 and ZL4==0 and ZM4==3 thencall QTI(N0I,VO4)call QTI(N0I,V24)call QTI(N0I,V34)elseif ZK4==0 and ZL4==3 and ZM4==0 thencall QTI(N0I,V04)call QTI(N0I,VI4)call QTI(N0I,V14)endifendfunctionfunction V44 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local integer MKI=GetHandleId(N0I)local integer V54=GetSpellAbilityId()local integer V64=(LoadInteger(XY,(MKI),(3010)))local integer V74=(LoadInteger(XY,(MKI),(3011)))local integer V84=(LoadInteger(XY,(MKI),(3012)))local integer ZK4=0local integer ZL4=0local integer ZM4=0set V64=V74set V74=V84set V84=V54if V64==1093808472 thenset ZK4=ZK4+1elseif V64==1093808471 thenset ZL4=ZL4+1elseif V64==1093808470 thenset ZM4=ZM4+1endifif V74==1093808472 thenset ZK4=ZK4+1elseif V74==1093808471 thenset ZL4=ZL4+1elseif V74==1093808470 thenset ZM4=ZM4+1endifif V84==1093808472 thenset ZK4=ZK4+1elseif V84==1093808471 thenset ZL4=ZL4+1elseif V84==1093808470 thenset ZM4=ZM4+1endifcall SaveInteger(XY,(MKI),(3010),(V64))call SaveInteger(XY,(MKI),(3011),(V74))call SaveInteger(XY,(MKI),(3012),(V84))call SaveInteger(XY,(MKI),(3013),(ZK4))call SaveInteger(XY,(MKI),(3014),(ZL4))call SaveInteger(XY,(MKI),(3015),(ZM4))call ZR4(N0I,ZK4,ZL4,ZM4)call ZT4(N0I)call H34(N0I)endfunctionfunction D5O takes nothing returns nothinglocal unit N0I=CKlocal integer MKI=GetHandleId(N0I)local integer V64=(LoadInteger(XY,(MKI),(3010)))local integer V74=(LoadInteger(XY,(MKI),(3011)))local integer V84=(LoadInteger(XY,(MKI),(3012)))local integer ZK4=0local integer ZL4=0local integer ZM4=0if V64==1093808472 thenset ZK4=ZK4+1elseif V64==1093808471 thenset ZL4=ZL4+1elseif V64==1093808470 thenset ZM4=ZM4+1endifif V74==1093808472 thenset ZK4=ZK4+1elseif V74==1093808471 thenset ZL4=ZL4+1elseif V74==1093808470 thenset ZM4=ZM4+1endifif V84==1093808472 thenset ZK4=ZK4+1elseif V84==1093808471 thenset ZL4=ZL4+1elseif V84==1093808470 thenset ZM4=ZM4+1endifcall ZR4(N0I,ZK4,ZL4,ZM4)set N0I=nullendfunctionfunction V94 takes nothing returns booleanif IsUnitIllusion(GetTriggerUnit())==false and(GetLearnedSkill()==1093808472 or GetLearnedSkill()==1093808471 or GetLearnedSkill()==1093808470)thencall ZT4(GetTriggerUnit())if GetLearnedSkill()==1093808472 thencall SetHeroAgi(GetTriggerUnit(),GetHeroAgi(GetTriggerUnit(),false)+2,true)call SaveInteger(XY,(GetHandleId(GetTriggerUnit())),(3000),(GetUnitAbilityLevel(GetTriggerUnit(),1093808472)))endifif GetLearnedSkill()==1093808471 thencall SetHeroStr(GetTriggerUnit(),GetHeroStr(GetTriggerUnit(),false)+2,true)call SaveInteger(XY,(GetHandleId(GetTriggerUnit())),(3001),(GetUnitAbilityLevel(GetTriggerUnit(),1093808471)))endifif GetLearnedSkill()==1093808470 thencall SetHeroInt(GetTriggerUnit(),GetHeroInt(GetTriggerUnit(),false)+2,true)call SaveInteger(XY,(GetHandleId(GetTriggerUnit())),(3002),(GetUnitAbilityLevel(GetTriggerUnit(),1093808470)))endifendifreturn falseendfunctionfunction VA4 takes nothing returns booleanif GetSpellAbilityId()==1093808472 or GetSpellAbilityId()==1093808471 or GetSpellAbilityId()==1093808470 thencall V44()elseif GetSpellAbilityId()==1093808473 or GetSpellAbilityId()==1093748565 thencall ZY4()endifreturn falseendfunctionfunction P71 takes nothing returns nothinglocal unit N0I=CKlocal integer i=1local integer UWIif GetUnitTypeId(N0I)!=1211117653 thenreturnendifloopexitwhen i>11set UWI=GWI[i]call QTI(N0I,UWI)call SetPlayerAbilityAvailable(GetOwningPlayer(N0I),UWI,false)set i=i+1endloopset N0I=nullendfunctionfunction VB4 takes nothing returns booleanif GetUnitTypeId(GetTriggerUnit())==1211117653 and IsUnitIllusion(GetTriggerUnit())==false thenset CK=GetTriggerUnit()call P71()elseif(GetUnitTypeId(GetTriggerUnit())==1432510828 or GetUnitTypeId(GetTriggerUnit())==1160786520)and IsUnitIllusion(GetTriggerUnit())==false thenset CK=GetTriggerUnit()call ExecuteFunc("VC4")elseif GetUnitTypeId(GetTriggerUnit())==1211117641 and IsUnitIllusion(GetTriggerUnit())==false thenset CK=GetTriggerUnit()call ExecuteFunc("VD4")endifreturn falseendfunctionfunction N91 takes nothing returns nothinglocal trigger t=CreateTrigger()call RVI((GWI[1]))call RVI((GWI[2]))call RVI((GWI[3]))call RVI((GWI[4]))call RVI((GWI[5]))call RVI((GWI[6]))call RVI((GWI[7]))call RVI((GWI[8]))call RVI((GWI[9]))call RVI((GWI[10]))call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function VA4))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function V94))set t=nullcall PDI(bj_FORCE_ALL_PLAYERS,15.00,GetObjectName(1848653383))call RYI(1093687375,GetRandomReal(1,25))call RYI(1093687108,GetRandomReal(1,25))call RYI(1093686853,GetRandomReal(1,25))call RYI(1093686839,GetRandomReal(1,25))call RYI(1093808470,GetRandomReal(1,25))call RYI(1093808472,GetRandomReal(1,25))call RYI(1093808471,GetRandomReal(1,25))call GW4()call GR4()call HI4()call H54()call HD4()call HJ4()call ZI4()call Z74()call ZC4()call ZH4()endfunctionfunction VE4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local real TSIif NGI==1 thenset TSI=15elseif NGI==2 thenset TSI=30elseif NGI==3 thenset TSI=40elseif NGI==4 thenset TSI=50endifif GetTriggerEvalCount(t)==3 or GetTriggerEvalCount(t)==4 thencall TKI(TLI,TMI,1,TSI)endifif GetTriggerEvalCount(t)==4 thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call UnitRemoveAbility(TMI,1093752403)call UnitRemoveAbility(TMI,1110459470)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction VF4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=GetUnitAbilityLevel(TLI,1095267426)if GetTriggerEventId()!=EVENT_UNIT_DAMAGED thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetEventDamageSource()==TLI and GetEventDamage()==0 thencall FlushChildHashtable(XY,(MKI))call MZI(t)set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function VE4))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("Environment\\LargeBuildingFire\\LargeBuildingFire1.mdl",TMI,"chest")))call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093752403,false)call QTI(TMI,1093752403)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction VG4 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local real d=P8I(TLI,TMI)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,6,false)call TriggerAddCondition(t,Condition(function VF4))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))set t=nullset TLI=nullset TMI=nullendfunctionfunction VH4 takes nothing returns nothingcall DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIfb\\AIfbSpecialArt.mdl",GetTriggerUnit(),"weapon"))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIfb\\AIfbSpecialArt.mdl",GetTriggerUnit(),"hand"))endfunctionfunction VZ4 takes nothing returns booleanif GetSpellAbilityId()==1095267426 thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_CAST thencall VH4()elseif MBI(GetSpellTargetUnit())==false thencall VG4()endifendifreturn falseendfunctionfunction NY1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function VZ4))set t=nullendfunctionfunction VV4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))call SelectUnitForPlayerSingle(TLI,GetOwningPlayer(TLI))call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullreturn falseendfunctionfunction VW4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer NGI=GetUnitAbilityLevel(TLI,1093677401)local real BP1=360-100*NGIlocal unit QHIif NGI==3 thenendifif TimerGetRemaining(EZ0[GetPlayerId(GetOwningPlayer(TLI))])==0 and GetUnitState(TLI,UNIT_STATE_MANA)>=140 thenset QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TLI),GetUnitY(TLI),0)call UnitAddAbility(QHI,1093809972)call IssueImmediateOrder(QHI,"thunderclap")call TimerStart(EZ0[GetPlayerId(GetOwningPlayer(TLI))],BP1,false,null)set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,3+0.01,false)call TriggerAddCondition(t,Condition(function VV4))call SaveUnitHandle(XY,(MKI),(2),(TLI))endifset t=nullset TLI=nullset QHI=nullreturn falseendfunctionfunction VX4 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()call TriggerRegisterDeathEvent(t,TLI)call TriggerAddCondition(t,Condition(function VW4))call SaveUnitHandle(XY,(MKI),(2),(TLI))set t=nullset TLI=nullendfunctionfunction VY4 takes nothing returns booleanif GetLearnedSkill()==1093677401 and GetUnitAbilityLevel(GetTriggerUnit(),1093677401)==1 and IsUnitIllusion(GetTriggerUnit())==false thencall VX4()endifreturn falseendfunctionfunction NK1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function VY4))set t=nullendfunctionfunction VJ4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=GetUnitAbilityLevel(TLI,1093817136)local real VK4=(LoadReal(XY,(MKI),(797)))local real VL4=(LoadReal(XY,(MKI),(798)))if GetTriggerEventId()==EVENT_WIDGET_DEATH thencall SaveInteger(XY,(GetHandleId((TLI))),((4338)),(2))call QTI(TLI,1093816922)call SetUnitAbilityLevel(TLI,1093816922,NGI)call DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call FlushChildHashtable(XY,(MKI))call MZI(t)elseif VK4>0 thencall SaveInteger(XY,(GetHandleId((TLI))),((4338)),(2))if GetUnitTypeId(TLI)==1313026096 thencall QTI(TLI,1093816922)call SetUnitAbilityLevel(TLI,1093816922,NGI)endifcall DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call FlushChildHashtable(XY,(MKI))call MZI(t)if QPI(TLI)==false thencall SetUnitState(TLI,UNIT_STATE_LIFE,RQI(1,GetUnitState(TLI,UNIT_STATE_LIFE)-VK4))endifif QPI(TMI)==false thencall SetUnitState(TMI,UNIT_STATE_LIFE,GetUnitState(TMI,UNIT_STATE_LIFE)+VK4)endifelseset VK4=GetUnitState(TMI,UNIT_STATE_MAX_LIFE)*0.2call SetUnitState(TLI,UNIT_STATE_LIFE,GetUnitState(TLI,UNIT_STATE_LIFE)+VK4)call SetUnitState(TMI,UNIT_STATE_LIFE,RQI(1,GetUnitState(TMI,UNIT_STATE_LIFE)-VK4))call SaveReal(XY,(MKI),(797),((VK4)*1.0))call SaveReal(XY,(MKI),(798),((VL4)*1.0))endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction VM4 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()call TriggerRegisterTimerEvent(t,0.01,false)call TriggerRegisterTimerEvent(t,7,false)call TriggerRegisterDeathEvent(t,TLI)call TriggerAddCondition(t,Condition(function VJ4))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveReal(XY,(MKI),(797),((0)*1.0))call SaveReal(XY,(MKI),(798),((0)*1.0))call SaveEffectHandle(XY,(MKI),(175),(AddSpecialEffectTarget("war3mapImported\\MortalStrikeCaster.mdx",TLI,"overhead")))call SaveEffectHandle(XY,(MKI),(176),(AddSpecialEffectTarget("war3mapImported\\MortalStrikeTarget.mdx",TMI,"overhead")))call SaveInteger(XY,(GetHandleId((TLI))),((4338)),(1))call UnitRemoveAbility(TLI,1093816922)set t=nullset TLI=nullset TMI=nullendfunctionfunction VN4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(GetTriggerUnit(),1093817136)if NGI==1 thencall QTI(TLI,1093816922)elseif((LoadInteger(XY,(GetHandleId((TLI))),((4338))))==1)==false thencall SetUnitAbilityLevel(TLI,1093816922,NGI)endifcall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093816922,false)set TLI=nullendfunctionfunction VS4 takes nothing returns booleanif GetTriggerEventId()==EVENT_PLAYER_HERO_SKILL thenif GetLearnedSkill()==1093817136 and IsUnitIllusion(GetTriggerUnit())==false thencall VN4()endifelseif GetSpellAbilityId()==1093817136 thenif MBI(GetSpellTargetUnit())==false thencall VM4()endifendifendifreturn falseendfunctionfunction NJ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function VS4))set t=nullendfunctionfunction VT4 takes unit u returns booleanreturn GetUnitTypeId(u)==1160785973 or GetUnitTypeId(u)==1211117637 or GetUnitTypeId(u)==1211117639 or GetUnitTypeId(u)==1211119684 or GetUnitTypeId(u)==1211119683 or GetUnitTypeId(u)==1211119668 or GetUnitTypeId(u)==1211119682 or GetUnitTypeId(u)==1160786511endfunctionfunction VR4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=(LoadInteger(XY,(MKI),(5)))if GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamageSource()==TLI and GetEventDamage()>0 thencall SetUnitState(TLI,UNIT_STATE_LIFE,GetUnitState(TLI,UNIT_STATE_LIFE)+GetEventDamage()*(0.1+0.05*NGI))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\VampiricAura\\VampiricAuraTarget.mdl",TLI,"origin"))call FlushChildHashtable(XY,(MKI))call MZI(t)endifelsecall FlushChildHashtable(XY,(MKI))call MZI(t)endifreturn falseendfunctionfunction VP4 takes unit TLI,unit TMI,integer NGI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,2.5,false)call TriggerAddCondition(t,Condition(function VR4))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(5),(NGI))set t=nullendfunctionfunction VQ4 takes nothing returns booleanif(VT4(GetAttacker())==true or IsUnitIllusion(GetAttacker())==true)and GetUnitAbilityLevel(GetAttacker(),1110460249)>0 and((LoadInteger(XY,(GetHandleId((GetAttacker()))),((4419))))==1)==false and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))thencall VP4(GetAttacker(),GetTriggerUnit(),(LoadInteger(XY,(GetHandleId(GetAttacker())),(819))))call MPI(GetAttacker(),4419,0.25)endifreturn falseendfunctionfunction VU4 takes nothing returns nothingif GKI or(QPI(GetEnumUnit())or IsUnitInRangeXY(GetEnumUnit(),GetUnitX(GYI),GetUnitY(GYI),900)==false or IsUnitType(GetEnumUnit(),UNIT_TYPE_RANGED_ATTACKER)==false)thencall GroupRemoveUnit(GXI,GetEnumUnit())call UnitRemoveAbility(GetEnumUnit(),1093817932)if IsUnitType(GetEnumUnit(),UNIT_TYPE_RANGED_ATTACKER)==false thencall UnitRemoveAbility(GetEnumUnit(),1110460249)call UnitRemoveAbility(GetEnumUnit(),1110460468)endifendifendfunctionfunction W04 takes nothing returns nothingif IsUnitType(GetEnumUnit(),UNIT_TYPE_RANGED_ATTACKER)and IsUnitInGroup(GetEnumUnit(),GXI)==false thencall GroupAddUnit(GXI,GetEnumUnit())endifendfunctionfunction WI4 takes unit N3I,integer PSI returns booleanlocal item OT1local boolean DN1=falselocal boolean DS1=trueset OT1=CreateItem(PSI,GetUnitX(N3I),GetUnitY(N3I))if GetUnitAbilityLevel(N3I,1095331446)==0 thenset DN1=truecall QTI(N3I,1095331446)endifif UnitAddItem(N3I,OT1)==false thencall RemoveItem(OT1)set DS1=falseelseif GetWidgetLife(OT1)>0 thencall RemoveItem(OT1)set DS1=falseelsecall RemoveItem(OT1)endifif DN1 thencall UnitRemoveAbility(N3I,1095331446)endifset OT1=nullreturn DS1endfunctionfunction W14 takes nothing returns nothinglocal unit TMI=GetEnumUnit()if VT4(TMI)or IsUnitIllusion(TMI)==true thencall UnitRemoveAbility(TMI,1110460468)call QTI(TMI,1093817932)call SaveInteger(XY,(GetHandleId(TMI)),(819),(GJI))elsecall UnitRemoveAbility(TMI,1093817932)call UnitRemoveAbility(TMI,1110460249)call DisableTrigger(L30)call WI4(TMI,GLI[GJI])call EnableTrigger(L30)endifset TMI=nullendfunctionfunction WO4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local group B64=(LoadGroupHandle(XY,(MKI),(22)))local group gif GetTriggerEventId()==EVENT_WIDGET_DEATH or TLI==null thenset GKI=truecall ForGroup(B64,function VU4)call MCI(B64)call FlushChildHashtable(XY,(MKI))call MZI(t)elseset GXI=B64set GJI=GetUnitAbilityLevel(TLI,1096114550)set GKI=falseset GYI=TLIset CK=TLIcall ForGroup(B64,function VU4)set g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),900+25,Condition(function BC1))call ForGroup(g,function W04)call MCI(g)set g=nullcall ForGroup(B64,function W14)endifset t=nullset TLI=nullset B64=nullreturn falseendfunctionfunction W24 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()if IsUnitIllusion(TLI)thencall TriggerRegisterDeathEvent(t,TLI)call TriggerRegisterTimerEvent(t,1,true)elsecall TriggerRegisterTimerEvent(t,0.2,true)endifcall TriggerAddCondition(t,Condition(function WO4))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveGroupHandle(XY,(MKI),(22),(MDI()))set t=nullset TLI=nullendfunctionfunction W34 takes nothing returns booleanif GetLearnedSkill()==1096114550 and GetUnitAbilityLevel(GetTriggerUnit(),1096114550)==1 thencall W24()endifreturn falseendfunctionfunction NL1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function W34))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function VQ4))set GLI[1]=1227903297set GLI[2]=1227903298set GLI[3]=1227903299set GLI[4]=1227903300set t=nullendfunctionconstant function Poof_RawCode takes nothing returns integerreturn 1093684792endfunctionconstant function Poof_PrimaryUnitCode takes nothing returns integerreturn 1211117641endfunctionconstant function Poof_SecondaryUnitCode takes nothing returns integerreturn 1211117642endfunctionfunction W44 takes unit N3I returns booleanreturn(GetUnitTypeId(N3I)==(1211117641)or GetUnitTypeId(N3I)==(1211117642)or GetUnitTypeId(N3I)==GetUnitTypeId(GetTriggerUnit()))and GetUnitState(N3I,UNIT_STATE_LIFE)>0.5 and GetOwningPlayer(N3I)==GetOwningPlayer(GetTriggerUnit())endfunctionfunction W54 takes nothing returns booleanreturn GetSpellAbilityId()==(1093684792)endfunctionfunction W64 takes nothing returns booleanreturn W44(GetFilterUnit())endfunctionfunction W74 takes nothing returns nothinglocal unit EO2=GetEnumUnit()local real W84=P9I(EO2,X3)if W84<JO thenset JO=W84set XO=EO2endifendfunctionfunction W94 takes nothing returns booleanreturn IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0endfunctionfunction WA4 takes nothing returns nothingcall DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Feedback\\ArcaneTowerAttack.mdl",GetEnumUnit(),"origin"))call UnitDamageTarget(GetTriggerUnit(),GetEnumUnit(),JO,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE,WEAPON_TYPE_WHOKNOWS)endfunctionfunction WB4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local location UG2local real xlocal real ylocal real P4I=GetUnitX(TLI)local real P5I=GetUnitY(TLI)local group GK1local boolexpr PI1local boolean WC4=falseif TMI!=null and W44(TMI)thenset x=GetUnitX(TMI)set y=GetUnitY(TMI)set WC4=trueelseset PI1=Condition(function W64)set GK1=MDI()call GroupEnumUnitsInRange(GK1,0,0,999999,PI1)if TMI!=null thenset UG2=GetUnitLoc(TMI)elseset UG2=GetSpellTargetLoc()endifset XO=FirstOfGroup(GK1)if XO!=null thenset WC4=truecall GroupRemoveUnit(GK1,XO)set JO=P9I(XO,UG2)set X3=UG2call ForGroup(GK1,function W74)set TMI=XOset x=GetUnitX(TMI)set y=GetUnitY(TMI)endifcall MCI(GK1)call RemoveLocation(UG2)endifif WC4 thencall DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Other\\ToonBoom\\ToonBoom.mdl",P4I,P5I))call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Other\\ToonBoom\\ToonBoom.mdl",x,y))call SetUnitX(TLI,x)call SetUnitY(TLI,y)set JO=60+GetUnitAbilityLevel(GetTriggerUnit(),(1093684792))*20set PI1=Condition(function W94)set GK1=MDI()call GroupEnumUnitsInRange(GK1,P4I,P5I,400,PI1)call ForGroup(GK1,function WA4)call MCI(GK1)set GK1=MDI()call GroupEnumUnitsInRange(GK1,x,y,400,PI1)call ForGroup(GK1,function WA4)call MCI(GK1)endifendfunctionfunction WD4 takes nothing returns booleanreturn GetSpellAbilityId()==(1093684792)endfunctionfunction WE4 takes nothing returns nothingcall SetUnitAnimationByIndex((LoadUnitHandle(XY,(GetHandleId(GetExpiredTimer())),(221))),2)endfunctionfunction WF4 takes nothing returns nothinglocal timer t=CreateTimer()call SetUnitAnimationByIndex(GetTriggerUnit(),2)call SaveUnitHandle(XY,(GetHandleId(t)),(221),(GetTriggerUnit()))call TimerStart(t,1,false,function WE4)endfunctionfunction M01 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer i=1call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CHANNEL)call TriggerAddCondition(t,Condition(function WD4))call TriggerAddAction(t,function WF4)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function W54))call TriggerAddAction(t,function WB4)loopexitwhen i>5call SetPlayerAbilityAvailable(BO[i],1093816641,false)call SetPlayerAbilityAvailable(CO[i],1093816641,false)set i=i+1endloopendfunctionconstant function Trap_CastCode takes nothing returns integerreturn 1093684802endfunctionconstant function Trap_EffectCode takes nothing returns integerreturn 1093684803endfunctionconstant function Trap_Projectile takes nothing returns integerreturn 1747988547endfunctionconstant function Trap_DummyNet takes nothing returns integerreturn 1747988537endfunctionconstant function Trap_Radius takes nothing returns integerreturn 245endfunctionfunction WG4 takes nothing returns booleanreturn GetSpellAbilityId()==(1093684802)endfunctionfunction WH4 takes nothing returns booleanreturn T6I(GetFilterUnit())==false and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(XO))and(AG1(GetFilterUnit())==false or IsUnitVisible(GetFilterUnit(),GetOwningPlayer(XO))==true)and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>0.5 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and GetUnitTypeId(GetFilterUnit())!=1848651852endfunctionfunction WZ4 takes nothing returns nothinglocal unit QHI=CreateUnit(GetOwningPlayer(GetEnumUnit()),1697656901,JO,Y3,0)call QTI(QHI,(1093684803))call IssueTargetOrder(QHI,"ensnare",GetEnumUnit())endfunctionfunction WV4 takes unit UII,real x,real y returns nothinglocal boolexpr PI1=Condition(function WH4)local group GK1=MDI()set XO=UIIcall GroupEnumUnitsInRange(GK1,x,y,(245),PI1)set JO=xset Y3=ycall ForGroup(GK1,function WZ4)call MCI(GK1)endfunctionfunction WW4 takes nothing returns nothinglocal timer t=GetExpiredTimer()local integer MKI=GetHandleId(t)local unit UII=(LoadUnitHandle(XY,(MKI),(45)))local real P6I=(LoadReal(XY,(MKI),(47)))local real P7I=(LoadReal(XY,(MKI),(48)))local real NN2=(LoadReal(XY,(MKI),(13)))local real P4I=GetUnitX(UII)local real P5I=GetUnitY(UII)local real U2I=GetUnitX(UII)+30*Cos(NN2)local real U3I=GetUnitY(UII)+30*Sin(NN2)if(U2I-P6I)*(U2I-P6I)+(U3I-P7I)*(U3I-P7I)<1200 thencall SetUnitX(UII,P6I)call SetUnitY(UII,P7I)call WV4(UII,P6I,P7I)call PauseTimer(t)call FlushChildHashtable(XY,(MKI))call KillUnit(UII)call DestroyTimer(t)elsecall SetUnitX(UII,U2I)call SetUnitY(UII,U3I)endifendfunctionfunction WX4 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local location UG2=GetSpellTargetLoc()local real P6I=RCI(GetLocationX(UG2))local real P7I=RGI(GetLocationY(UG2))local real P4I=RCI(GetUnitX(N0I))local real P5I=RGI(GetUnitY(N0I))local unit UII=CreateUnit(GetOwningPlayer(N0I),(1747988547),P4I,P5I,0)local real NN2=Atan2(P7I-P5I,P6I-P4I)local timer t=CreateTimer()local integer MKI=GetHandleId(t)call SetUnitScale(UII,2,2,2)call SaveUnitHandle(XY,(MKI),(45),(UII))call SaveReal(XY,(MKI),(47),((P6I)*1.0))call SaveReal(XY,(MKI),(48),((P7I)*1.0))call SaveReal(XY,(MKI),(13),((NN2)*1.0))call TimerStart(t,0.035,true,function WW4)call RemoveLocation(UG2)endfunctionfunction MI1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddAction(t,function WX4)call TriggerAddCondition(t,Condition(function WG4))endfunctionfunction WY4 takes unit u returns booleanreturn GetUnitTypeId(u)==1211117641 or GetUnitTypeId(u)==1211117642endfunctionconstant function DoubleTrouble_RawCode takes nothing returns integerreturn 1093684567endfunctionconstant function DoubleTrouble_PrimaryUnitCode takes nothing returns integerreturn 1211117641endfunctionconstant function DoubleTrouble_SecondaryUnitCode takes nothing returns integerreturn 1211117642endfunctionconstant function DoubleTrouble_Ability1 takes nothing returns integerreturn 1093684792endfunctionconstant function DoubleTrouble_Ability2 takes nothing returns integerreturn 1093684802endfunctionconstant function DoubleTrouble_Ability3 takes nothing returns integerreturn 1093684791endfunctionconstant function DoubleTrouble_Item9 takes nothing returns integerreturn FK0[HN0]endfunctionconstant function DoubleTrouble_Item8 takes nothing returns integerreturn FK0[HM0]endfunctionconstant function DoubleTrouble_Item7 takes nothing returns integerreturn FK0[XI0]endfunctionconstant function DoubleTrouble_Item6 takes nothing returns integerreturn FK0[WL0]endfunctionconstant function DoubleTrouble_Item5 takes nothing returns integerreturn FK0[ZG0]endfunctionconstant function DoubleTrouble_Item4 takes nothing returns integerreturn FK0[ZH0]endfunctionconstant function DoubleTrouble_Item3 takes nothing returns integerreturn FK0[ZZ0]endfunctionconstant function DoubleTrouble_Item2 takes nothing returns integerreturn FK0[ZF0]endfunctionconstant function DoubleTrouble_Item1 takes nothing returns integerreturn FK0[FU0]endfunctionfunction WJ4 takes unit N3I returns booleanreturn GetUnitTypeId(N3I)==(1211117641)or GetUnitTypeId(N3I)==(1211117642)endfunctionfunction DoubleTrouble_IsKoboldCondition takes nothing returns booleanreturn GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(XO)and GetFilterUnit()!=XO and(GetUnitTypeId(GetFilterUnit())==(1211117641)or GetUnitTypeId(GetFilterUnit())==(1211117642))endfunctionfunction DoubleTrouble_UnshareXPCondition takes nothing returns booleanreturn IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitAlly(GetFilterUnit(),GetOwningPlayer(XO))==true and WJ4(GetFilterUnit())==falseendfunctionfunction DoubleTrouble_UnshareXPGive takes nothing returns nothingcall AddHeroXP(GetEnumUnit(),YO,true)endfunctionfunction WK4 takes nothing returns nothinglocal integer WL4=GetHandleId(GetTriggeringTrigger())local player NJI=(LoadPlayerHandle(XY,(WL4),(370)))local integer WM4=GetHandleId(NJI)local unit ZJ1=(LoadUnitHandle(XY,(WM4),(699)))local unit ZK1=(LoadUnitHandle(XY,(WM4),(700)))local unit ZL1=(LoadUnitHandle(XY,(WM4),(701)))local unit ZM1=(LoadUnitHandle(XY,(WM4),(702)))local unit ZN1=(LoadUnitHandle(XY,(WM4),(703)))local integer WN4=GetUnitAbilityLevel(ZJ1,1096904043)*2local integer W93=GetHeroAgi(ZJ1,false)local integer WS4=GetHeroAgi(ZJ1,true)-W93-WN4local integer WA3=GetHeroStr(ZJ1,false)local integer WT4=GetHeroStr(ZJ1,true)-WA3-WN4local integer WR4=GetHeroInt(ZJ1,false)local integer WP4=GetHeroInt(ZJ1,true)-WR4-WN4local real WQ4=0local integer WU4local integer X04local integer XI4if GTI thenset WQ4=1.0endifset WU4=R2I(W93+WS4*WQ4)set X04=R2I(WA3+WT4*WQ4)set XI4=R2I(WR4+WP4*WQ4)if GetUnitState(ZJ1,UNIT_STATE_LIFE)>1 thenif ZK1!=null thencall SetHeroAgi(ZK1,WU4,false)call SetHeroStr(ZK1,X04,false)call SetHeroInt(ZK1,XI4,false)endifif ZL1!=null thencall SetHeroAgi(ZL1,WU4,false)call SetHeroStr(ZL1,X04,false)call SetHeroInt(ZL1,XI4,false)endifif ZM1!=null thencall SetHeroAgi(ZM1,WU4,false)call SetHeroStr(ZM1,X04,false)call SetHeroInt(ZM1,XI4,false)endifif ZN1!=null thencall SetHeroAgi(ZN1,WU4,false)call SetHeroStr(ZN1,X04,false)call SetHeroInt(ZN1,XI4,false)endifendifendfunctionfunction X14 takes nothing returns nothinglocal integer WL4=GetHandleId(GetTriggeringTrigger())local player NJI=(LoadPlayerHandle(XY,(WL4),(370)))local integer WM4=GetHandleId(NJI)local unit ZJ1=(LoadUnitHandle(XY,(WM4),(699)))local unit ZK1=(LoadUnitHandle(XY,(WM4),(700)))local unit ZL1=(LoadUnitHandle(XY,(WM4),(701)))local unit ZM1=(LoadUnitHandle(XY,(WM4),(702)))local unit ZN1=(LoadUnitHandle(XY,(WM4),(703)))local integer XO4=GetHandleId(ZJ1)local integer X24=GetHandleId(ZK1)local integer X34=GetHandleId(ZL1)local integer X44=GetHandleId(ZM1)local integer X54=GetHandleId(ZN1)local integer X64=(LoadInteger(XY,(XO4),(367)))local integer X74=(LoadInteger(XY,(XO4),(368)))local integer X84=(LoadInteger(XY,(X24),(367)))local integer X94=(LoadInteger(XY,(X24),(368)))local integer XA4=(LoadInteger(XY,(X34),(367)))local integer XB4=(LoadInteger(XY,(X34),(368)))local integer XC4=(LoadInteger(XY,(X44),(367)))local integer XD4=(LoadInteger(XY,(X44),(368)))local integer XE4=(LoadInteger(XY,(X54),(367)))local integer XF4=(LoadInteger(XY,(X54),(368)))local integer XG4=GetHeroXP(ZJ1)local integer XH4=GetHeroXP(ZK1)local integer XZ4=GetHeroXP(ZL1)local integer XV4=GetHeroXP(ZM1)local integer XW4=GetHeroXP(ZN1)local integer XX4=XG4-X64-X74local integer XY4=XH4-X84-X94local integer XJ4=XZ4-XA4-XB4local integer XK4=XV4-XC4-XD4local integer XL4=XW4-XE4-XF4if GetUnitState(ZJ1,UNIT_STATE_LIFE)>1 thenset X64=X64+XX4set X84=X84+XY4set XA4=XA4+XJ4set XC4=XC4+XK4set XE4=XE4+XL4if ZJ1!=null thencall AddHeroXP(ZK1,XX4,false)if GetHeroXP(ZK1)!=XH4 thenset X94=X94+XX4endifcall AddHeroXP(ZL1,XX4,false)if GetHeroXP(ZL1)!=XZ4 thenset XB4=XB4+XX4endifcall AddHeroXP(ZM1,XX4,false)if GetHeroXP(ZM1)!=XV4 thenset XD4=XD4+XX4endifcall AddHeroXP(ZN1,XX4,false)if GetHeroXP(ZN1)!=XW4 thenset XF4=XF4+XX4endifendifif ZK1!=null thencall AddHeroXP(ZJ1,XY4,false)if GetHeroXP(ZJ1)!=XG4 thenset X74=X74+XY4endifcall AddHeroXP(ZL1,XY4,false)if GetHeroXP(ZL1)!=XZ4 thenset XB4=XB4+XY4endifcall AddHeroXP(ZM1,XY4,false)if GetHeroXP(ZM1)!=XV4 thenset XD4=XD4+XY4endifcall AddHeroXP(ZN1,XY4,false)if GetHeroXP(ZN1)!=XW4 thenset XF4=XF4+XY4endifendifif ZL1!=null thencall AddHeroXP(ZK1,XJ4,false)if GetHeroXP(ZK1)!=XH4 thenset X94=X94+XJ4endifcall AddHeroXP(ZJ1,XJ4,false)if GetHeroXP(ZJ1)!=XG4 thenset X74=X74+XJ4endifcall AddHeroXP(ZM1,XJ4,false)if GetHeroXP(ZM1)!=XV4 thenset XD4=XD4+XJ4endifcall AddHeroXP(ZN1,XJ4,false)if GetHeroXP(ZN1)!=XW4 thenset XF4=XF4+XJ4endifendifif ZM1!=null thencall AddHeroXP(ZK1,XK4,false)if GetHeroXP(ZK1)!=XH4 thenset X94=X94+XK4endifcall AddHeroXP(ZL1,XK4,false)if GetHeroXP(ZL1)!=XZ4 thenset XB4=XB4+XK4endifcall AddHeroXP(ZJ1,XK4,false)if GetHeroXP(ZJ1)!=XG4 thenset X74=X74+XK4endifcall AddHeroXP(ZN1,XK4,false)if GetHeroXP(ZN1)!=XW4 thenset XF4=XF4+XK4endifendifif ZN1!=null thencall AddHeroXP(ZK1,XL4,false)if GetHeroXP(ZK1)!=XH4 thenset X94=X94+XL4endifcall AddHeroXP(ZL1,XL4,false)if GetHeroXP(ZL1)!=XZ4 thenset XB4=XB4+XL4endifcall AddHeroXP(ZJ1,XL4,false)if GetHeroXP(ZJ1)!=XG4 thenset X74=X74+XL4endifcall AddHeroXP(ZM1,XL4,false)if GetHeroXP(ZM1)!=XV4 thenset XD4=XD4+XL4endifendifcall SaveInteger(XY,(XO4),(367),(X64))call SaveInteger(XY,(XO4),(368),(X74))call SaveInteger(XY,(X24),(367),(X84))call SaveInteger(XY,(X24),(368),(X94))call SaveInteger(XY,(X34),(367),(XA4))call SaveInteger(XY,(X34),(368),(XB4))call SaveInteger(XY,(X44),(367),(XC4))call SaveInteger(XY,(X44),(368),(XD4))call SaveInteger(XY,(X54),(367),(XE4))call SaveInteger(XY,(X54),(368),(XF4))endifendfunctionfunction XM4 takes nothing returns booleanreturn WJ4(GetTriggerUnit())and IsUnitIllusion(GetTriggerUnit())==falseendfunctionfunction XN4 takes nothing returns nothinglocal unit IQ1=GetTriggerUnit()local integer MKI=GetHandleId(GetOwningPlayer(IQ1))local unit ZJ1=(LoadUnitHandle(XY,(MKI),(699)))local unit ZK1=(LoadUnitHandle(XY,(MKI),(700)))local unit ZL1=(LoadUnitHandle(XY,(MKI),(701)))local unit ZM1=(LoadUnitHandle(XY,(MKI),(702)))local unit ZN1=(LoadUnitHandle(XY,(MKI),(703)))local boolean QD1=falsecall DisableTrigger(AG)if ZJ1!=null and ZJ1!=IQ1 thencall KillUnit(ZJ1)endifif ZK1!=null and ZK1!=IQ1 thencall KillUnit(ZK1)endifif ZL1!=null and ZL1!=IQ1 thencall KillUnit(ZL1)endifif ZM1!=null and ZM1!=IQ1 thencall KillUnit(ZM1)endifif ZN1!=null and ZN1!=IQ1 thencall KillUnit(ZN1)endifcall EnableTrigger(AG)endfunctionfunction XS4 takes nothing returns booleanreturn WJ4(GetTriggerUnit())and IsUnitIllusion(GetTriggerUnit())==falseendfunctionfunction XT4 takes unit XR4,unit N0I returns nothinglocal trigger t=(LoadTriggerHandle(XY,(GetHandleId(GetOwningPlayer(N0I))),(369)))local integer i=0local boolean XP4=falselocal boolean XQ4=falselocal boolean XU4=falselocal boolean Y04=falselocal boolean YI4=falselocal boolean Y14=falselocal boolean YO4=falselocal boolean Y24=falselocal boolean Y34=falsecall DisableTrigger(t)call DisableTrigger(L30)loopexitwhen i>5if GetItemTypeId(UnitItemInSlot(N0I,i))==(FK0[FU0])thenset XP4=trueendifif GetItemTypeId(UnitItemInSlot(N0I,i))==(FK0[ZF0])thenset XQ4=trueendifif GetItemTypeId(UnitItemInSlot(N0I,i))==(FK0[ZZ0])thenset XU4=trueendifif GetItemTypeId(UnitItemInSlot(N0I,i))==(FK0[ZH0])thenset Y04=trueendifif GetItemTypeId(UnitItemInSlot(N0I,i))==(FK0[ZG0])thenset YI4=trueendifif GetItemTypeId(UnitItemInSlot(N0I,i))==(FK0[WL0])thenset Y14=trueendifif GetItemTypeId(UnitItemInSlot(N0I,i))==(FK0[XI0])thenset YO4=trueendifif GetItemTypeId(UnitItemInSlot(N0I,i))==(FK0[HM0])thenset Y24=trueendifif GetItemTypeId(UnitItemInSlot(N0I,i))==(FK0[HN0])thenset Y34=trueendifset i=i+1endloopif Y34 thencall UnitAddItem(XR4,CreateItem((FK0[HN0]),0,0))elseif Y24 thencall UnitAddItem(XR4,CreateItem((FK0[HM0]),0,0))elseif YO4 thencall UnitAddItem(XR4,CreateItem((FK0[XI0]),0,0))elseif Y14 thencall UnitAddItem(XR4,CreateItem((FK0[WL0]),0,0))elseif YI4 thencall UnitAddItem(XR4,CreateItem((FK0[ZG0]),0,0))elseif Y04 thencall UnitAddItem(XR4,CreateItem((FK0[ZH0]),0,0))elseif XU4 thencall UnitAddItem(XR4,CreateItem((FK0[ZZ0]),0,0))elseif XQ4 thencall UnitAddItem(XR4,CreateItem((FK0[ZF0]),0,0))elseif XP4 thencall UnitAddItem(XR4,CreateItem((FK0[FU0]),0,0))endifcall EnableTrigger(t)call EnableTrigger(L30)endfunctionfunction Y44 takes nothing returns nothinglocal unit ZS1=GetTriggerUnit()local integer i=0local boolean XP4=falselocal boolean XQ4=falselocal boolean XU4=falselocal boolean Y04=falselocal boolean YI4=falselocal boolean Y14=falselocal boolean YO4=falselocal boolean Y24=falselocal boolean Y34=falselocal integer WM4=GetHandleId(GetOwningPlayer(ZS1))local unit ZJ1=(LoadUnitHandle(XY,(WM4),(699)))local unit ZK1=(LoadUnitHandle(XY,(WM4),(700)))local unit ZL1=(LoadUnitHandle(XY,(WM4),(701)))local unit ZM1=(LoadUnitHandle(XY,(WM4),(702)))local unit ZN1=(LoadUnitHandle(XY,(WM4),(703)))local integer E11local boolean Y54=falselocal integer Y64=0local integer Y74=0local integer Y84=0local integer Y94=0local integer YA4=0local integer YB4=0local integer YC4=0local integer YD4=0local integer YE4=0call DisableTrigger(GetTriggeringTrigger())if GetUnitTypeId(ZS1)==(1211117642)thencall UnitRemoveItemFromSlot(ZS1,0)call EnableTrigger(GetTriggeringTrigger())returnendifif not(GetItemTypeId(GetManipulatedItem())==(FK0[FU0])or GetItemTypeId(GetManipulatedItem())==(FK0[ZF0])or GetItemTypeId(GetManipulatedItem())==(FK0[ZZ0])or GetItemTypeId(GetManipulatedItem())==(FK0[ZH0])or GetItemTypeId(GetManipulatedItem())==(FK0[ZG0])or GetItemTypeId(GetManipulatedItem())==(FK0[WL0])or GetItemTypeId(GetManipulatedItem())==(FK0[XI0])or GetItemTypeId(GetManipulatedItem())==(FK0[HM0])or GetItemTypeId(GetManipulatedItem())==(FK0[HN0]))thencall EnableTrigger(GetTriggeringTrigger())returnendifcall DisableTrigger(L30)if GetTriggerEventId()==EVENT_PLAYER_UNIT_DROP_ITEM thenset Y54=trueendifloopexitwhen i>5set E11=GetItemTypeId(UnitItemInSlot(ZS1,i))if E11==(FK0[FU0])thenset Y64=Y64+1if(not(Y54 and E11==GetItemTypeId(GetManipulatedItem())))or(Y64>1 and E11==GetItemTypeId(GetManipulatedItem()))thenset XP4=trueendifendifif E11==(FK0[ZF0])thenset Y74=Y74+1if(not(Y54 and E11==GetItemTypeId(GetManipulatedItem())))or(Y74>1 and E11==GetItemTypeId(GetManipulatedItem()))thenset XQ4=trueendifendifif E11==(FK0[ZZ0])thenset Y84=Y84+1if(not(Y54 and E11==GetItemTypeId(GetManipulatedItem())))or(Y84>1 and E11==GetItemTypeId(GetManipulatedItem()))thenset XU4=trueendifendifif E11==(FK0[ZH0])thenset Y94=Y94+1if(not(Y54 and E11==GetItemTypeId(GetManipulatedItem())))or(Y94>1 and E11==GetItemTypeId(GetManipulatedItem()))thenset Y04=trueendifendifif E11==(FK0[ZG0])thenset YA4=YA4+1if(not(Y54 and E11==GetItemTypeId(GetManipulatedItem())))or(YA4>1 and E11==GetItemTypeId(GetManipulatedItem()))thenset YI4=trueendifendifif E11==(FK0[WL0])thenset YB4=YB4+1if(not(Y54 and E11==GetItemTypeId(GetManipulatedItem())))or(YB4>1 and E11==GetItemTypeId(GetManipulatedItem()))thenset Y14=trueendifendifif E11==(FK0[XI0])thenset YC4=YC4+1if(not(Y54 and E11==GetItemTypeId(GetManipulatedItem())))or(YC4>1 and E11==GetItemTypeId(GetManipulatedItem()))thenset YO4=trueendifendifif E11==(FK0[HM0])thenset YD4=YD4+1if(not(Y54 and E11==GetItemTypeId(GetManipulatedItem())))or(YD4>1 and E11==GetItemTypeId(GetManipulatedItem()))thenset Y24=trueendifendifif E11==(FK0[HN0])thenset YE4=YE4+1if(not(Y54 and E11==GetItemTypeId(GetManipulatedItem())))or(YD4>1 and E11==GetItemTypeId(GetManipulatedItem()))thenset Y34=trueendifendifset i=i+1endloopcall RemoveItem(UnitRemoveItemFromSlot(ZK1,0))if ZL1!=null thencall RemoveItem(UnitRemoveItemFromSlot(ZL1,0))endifif ZM1!=null thencall RemoveItem(UnitRemoveItemFromSlot(ZM1,0))endifif ZN1!=null thencall RemoveItem(UnitRemoveItemFromSlot(ZN1,0))endifif Y34 thencall UnitAddItem(ZK1,CreateItem((FK0[HN0]),0,0))if ZL1!=null thencall UnitAddItem(ZL1,CreateItem((FK0[HN0]),0,0))endifif ZM1!=null thencall UnitAddItem(ZM1,CreateItem((FK0[HN0]),0,0))endifif ZN1!=null thencall UnitAddItem(ZN1,CreateItem((FK0[HN0]),0,0))endifelseif Y24 thencall UnitAddItem(ZK1,CreateItem((FK0[HM0]),0,0))if ZL1!=null thencall UnitAddItem(ZL1,CreateItem((FK0[HM0]),0,0))endifif ZM1!=null thencall UnitAddItem(ZM1,CreateItem((FK0[HM0]),0,0))endifif ZN1!=null thencall UnitAddItem(ZN1,CreateItem((FK0[HM0]),0,0))endifelseif YO4 thencall UnitAddItem(ZK1,CreateItem((FK0[XI0]),0,0))if ZL1!=null thencall UnitAddItem(ZL1,CreateItem((FK0[XI0]),0,0))endifif ZM1!=null thencall UnitAddItem(ZM1,CreateItem((FK0[XI0]),0,0))endifif ZN1!=null thencall UnitAddItem(ZN1,CreateItem((FK0[XI0]),0,0))endifelseif Y14 thencall UnitAddItem(ZK1,CreateItem((FK0[WL0]),0,0))if ZL1!=null thencall UnitAddItem(ZL1,CreateItem((FK0[WL0]),0,0))endifif ZM1!=null thencall UnitAddItem(ZM1,CreateItem((FK0[WL0]),0,0))endifif ZN1!=null thencall UnitAddItem(ZN1,CreateItem((FK0[WL0]),0,0))endifelseif YI4 thencall UnitAddItem(ZK1,CreateItem((FK0[ZG0]),0,0))if ZL1!=null thencall UnitAddItem(ZL1,CreateItem((FK0[ZG0]),0,0))endifif ZM1!=null thencall UnitAddItem(ZM1,CreateItem((FK0[ZG0]),0,0))endifif ZN1!=null thencall UnitAddItem(ZN1,CreateItem((FK0[ZG0]),0,0))endifelseif Y04 thencall UnitAddItem(ZK1,CreateItem((FK0[ZH0]),0,0))if ZL1!=null thencall UnitAddItem(ZL1,CreateItem((FK0[ZH0]),0,0))endifif ZM1!=null thencall UnitAddItem(ZM1,CreateItem((FK0[ZH0]),0,0))endifif ZN1!=null thencall UnitAddItem(ZN1,CreateItem((FK0[ZH0]),0,0))endifelseif XU4 thencall UnitAddItem(ZK1,CreateItem((FK0[ZZ0]),0,0))if ZL1!=null thencall UnitAddItem(ZL1,CreateItem((FK0[ZZ0]),0,0))endifif ZM1!=null thencall UnitAddItem(ZM1,CreateItem((FK0[ZZ0]),0,0))endifif ZN1!=null thencall UnitAddItem(ZN1,CreateItem((FK0[ZZ0]),0,0))endifelseif XQ4 thencall UnitAddItem(ZK1,CreateItem((FK0[ZF0]),0,0))if ZL1!=null thencall UnitAddItem(ZL1,CreateItem((FK0[ZF0]),0,0))endifif ZM1!=null thencall UnitAddItem(ZM1,CreateItem((FK0[ZF0]),0,0))endifif ZN1!=null thencall UnitAddItem(ZN1,CreateItem((FK0[ZF0]),0,0))endifelseif XP4 thencall UnitAddItem(ZK1,CreateItem((FK0[FU0]),0,0))if ZL1!=null thencall UnitAddItem(ZL1,CreateItem((FK0[FU0]),0,0))endifif ZM1!=null thencall UnitAddItem(ZM1,CreateItem((FK0[FU0]),0,0))endifif ZN1!=null thencall UnitAddItem(ZN1,CreateItem((FK0[FU0]),0,0))endifendifcall EnableTrigger(GetTriggeringTrigger())call EnableTrigger(L30)endfunctionfunction YF4 takes unit YG4,integer YH4 returns nothinglocal integer WM4=GetHandleId(GetOwningPlayer(YG4))local unit ZJ1=(LoadUnitHandle(XY,(WM4),(699)))local unit ZK1=(LoadUnitHandle(XY,(WM4),(700)))local unit ZL1=(LoadUnitHandle(XY,(WM4),(701)))local unit ZM1=(LoadUnitHandle(XY,(WM4),(702)))local unit ZN1=(LoadUnitHandle(XY,(WM4),(703)))if ZJ1!=null and ZJ1!=YG4 thencall SelectHeroSkill(ZJ1,YH4)endifif ZK1!=null and ZK1!=YG4 thencall SelectHeroSkill(ZK1,YH4)endifif ZL1!=null and ZL1!=YG4 thencall SelectHeroSkill(ZL1,YH4)endifif ZM1!=null and ZM1!=YG4 thencall SelectHeroSkill(ZM1,YH4)endifif ZN1!=null and ZN1!=YG4 thencall SelectHeroSkill(ZN1,YH4)endifendfunctionfunction YZ4 takes integer QRI,unit E02,unit EI2 returns nothinglocal integer SII=1local integer S1I=GetUnitAbilityLevel(E02,QRI)loopexitwhen SII>S1Icall SelectHeroSkill(EI2,QRI)set SII=SII+1endloopendfunctionfunction YV4 takes unit XR4,unit YW4 returns nothingcall AddHeroXP(XR4,GetHeroXP(YW4),false)call SaveInteger(XY,(GetHandleId(XR4)),(368),(GetHeroXP(YW4)))call SaveInteger(XY,(GetHandleId(XR4)),(367),(0))call YZ4((1093684792),YW4,XR4)call YZ4((1093684802),YW4,XR4)call YZ4((1093684791),YW4,XR4)call YZ4(1096904043,YW4,XR4)call YZ4((1093684567),YW4,XR4)call YZ4(1093809987,YW4,XR4)endfunctionfunction YX4 takes unit ZK1,unit ZL1,integer YH4,integer Y64,integer Y74 returns nothingif Y64>Y74 thencall SelectHeroSkill(ZL1,YH4)elseif Y74>Y64 thencall SelectHeroSkill(ZK1,YH4)endifendfunctionfunction YY4 takes unit ZK1,unit ZL1 returns nothinglocal integer XH4=GetHeroXP(ZK1)local integer XZ4=GetHeroXP(ZL1)local integer X24=GetHandleId(ZK1)local integer X34=GetHandleId(ZL1)local integer X94=(LoadInteger(XY,(X24),(368)))local integer XB4=(LoadInteger(XY,(X34),(368)))local integer DV2if XH4>XZ4 thenset DV2=XH4-XZ4call AddHeroXP(ZL1,DV2,true)if XZ4!=GetHeroXP(ZL1)thencall SaveInteger(XY,(X34),(368),(XB4+DV2))endifelseif XH4<XZ4 thenset DV2=XZ4-XH4call AddHeroXP(ZK1,DV2,true)if XH4!=GetHeroXP(ZK1)thencall SaveInteger(XY,(X24),(368),(X94+DV2))endifendifendfunctionfunction YJ4 takes unit ZK1,unit ZL1 returns nothinglocal integer YK4=GetUnitAbilityLevel(ZK1,(1093684792))local integer YL4=GetUnitAbilityLevel(ZK1,(1093684802))local integer YM4=GetUnitAbilityLevel(ZK1,(1093684791))local integer YN4=GetUnitAbilityLevel(ZK1,(1093684567))local integer YS4=GetUnitAbilityLevel(ZK1,1096904043)local integer YT4=GetUnitAbilityLevel(ZK1,1093809987)local integer YR4=GetUnitAbilityLevel(ZL1,(1093684792))local integer YP4=GetUnitAbilityLevel(ZL1,(1093684802))local integer YQ4=GetUnitAbilityLevel(ZL1,(1093684791))local integer YU4=GetUnitAbilityLevel(ZL1,(1093684567))local integer J04=GetUnitAbilityLevel(ZL1,1096904043)local integer JI4=GetUnitAbilityLevel(ZL1,1093809987)call YY4(ZK1,ZL1)call YX4(ZK1,ZL1,(1093684792),YK4,YR4)call YX4(ZK1,ZL1,(1093684802),YL4,YP4)call YX4(ZK1,ZL1,(1093684791),YM4,YQ4)call YX4(ZK1,ZL1,(1093684567),YN4,YU4)call YX4(ZK1,ZL1,1093809987,YT4,JI4)call YX4(ZK1,ZL1,1096904043,YS4,J04)endfunctionfunction J14 takes unit ZK1,unit ZL1 returns nothingif ZK1!=null and ZL1!=null thencall YJ4(ZK1,ZL1)endifendfunctionfunction JO4 takes nothing returns nothinglocal integer WM4=GetHandleId((LoadPlayerHandle(XY,(GetHandleId(GetTriggeringTrigger())),(370))))local unit ZJ1=(LoadUnitHandle(XY,(WM4),(699)))local unit ZK1=(LoadUnitHandle(XY,(WM4),(700)))local unit ZL1=(LoadUnitHandle(XY,(WM4),(701)))local unit ZM1=(LoadUnitHandle(XY,(WM4),(702)))local unit ZN1=(LoadUnitHandle(XY,(WM4),(703)))call DisableTrigger(GNI)call J14(ZJ1,ZK1)call J14(ZJ1,ZL1)call J14(ZJ1,ZM1)call J14(ZJ1,ZN1)call J14(ZK1,ZL1)call J14(ZK1,ZM1)call J14(ZK1,ZN1)call J14(ZL1,ZM1)call J14(ZL1,ZN1)call J14(ZM1,ZN1)call EnableTrigger(GNI)endfunctionfunction J24 takes nothing returns nothinglocal trigger t=CreateTrigger()call TriggerRegisterTimerEvent(t,0.2,true)call TriggerAddAction(t,function JO4)call SavePlayerHandle(XY,(GetHandleId(t)),(370),(GetOwningPlayer(GetTriggerUnit())))endfunctionfunction J34 takes unit TLI returns nothinglocal trigger tcall SaveUnitHandle(XY,(GetHandleId(GetOwningPlayer(TLI))),(699),(TLI))call SaveInteger(XY,(GetHandleId(TLI)),(367),(GetHeroXP(TLI)))call SaveInteger(XY,(GetHandleId(TLI)),(368),(0))set t=CreateTrigger()call TriggerRegisterTimerEvent(t,0.1,true)call TriggerAddAction(t,function X14)call SavePlayerHandle(XY,(GetHandleId(t)),(370),(GetOwningPlayer(TLI)))call SaveTriggerHandle(XY,(GetHandleId(GetOwningPlayer(TLI))),(371),(t))set t=CreateTrigger()call TriggerRegisterTimerEvent(t,0.3,true)call TriggerAddAction(t,function WK4)call SavePlayerHandle(XY,(GetHandleId(t)),(370),(GetOwningPlayer(TLI)))call SaveTriggerHandle(XY,(GetHandleId(GetOwningPlayer(TLI))),(372),(t))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_DEATH)call TriggerAddAction(t,function XN4)call TriggerAddCondition(t,Condition(function XM4))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)call Q9I(t,EVENT_PLAYER_UNIT_DROP_ITEM)call TriggerAddAction(t,function Y44)call TriggerAddCondition(t,Condition(function XS4))call SaveTriggerHandle(XY,(GetHandleId(GetOwningPlayer(TLI))),(369),(t))call ExecuteFunc("J24")endfunctionfunction J44 takes unit TLI,boolean DKO returns nothinglocal player NJI=GetOwningPlayer(TLI)local integer MKI=GetHandleId(NJI)local unit XR4set GSI=GSI+1if GSI==1 thencall J34(TLI)endifcall TriggerExecute((LoadTriggerHandle(XY,(GetHandleId(GetOwningPlayer(TLI))),(371))))call TriggerExecute((LoadTriggerHandle(XY,(GetHandleId(GetOwningPlayer(TLI))),(372))))if DKO==false thencall YF4(TLI,1093684567)call YF4(TLI,1093809987)endifset XR4=CreateUnit(GetOwningPlayer(TLI),1211117642,GetUnitX(TLI),GetUnitY(TLI),0)call YV4(XR4,TLI)call XT4(XR4,TLI)call SaveUnitHandle(XY,(MKI),(699+GSI),(XR4))endfunctionfunction ZLO takes nothing returns nothingif GTI==false thenset GTI=truecall DisableTrigger(GNI)call J44(CK,true)call EnableTrigger(GNI)endifendfunctionfunction J54 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if IsUnitIllusion(GetTriggerUnit())==false and GetOwningPlayer(GetTriggerUnit())==GetOwningPlayer(TLI)and WY4(GetTriggerUnit())thenif GetLearnedSkill()==1093684567 or GetLearnedSkill()==1093809987 thencall DisableTrigger(GetTriggeringTrigger())call J44(GetTriggerUnit(),false)call EnableTrigger(GetTriggeringTrigger())elseif GetLearnedSkill()==1096904043 or GetLearnedSkill()==1093684792 or GetLearnedSkill()==1093684802 or GetLearnedSkill()==1093684791 thencall TriggerExecute((LoadTriggerHandle(XY,(GetHandleId(GetOwningPlayer(GetTriggerUnit()))),(371))))call TriggerExecute((LoadTriggerHandle(XY,(GetHandleId(GetOwningPlayer(GetTriggerUnit()))),(372))))call DisableTrigger(GetTriggeringTrigger())call YF4(GetTriggerUnit(),GetLearnedSkill())call EnableTrigger(GetTriggeringTrigger())endifendifreturn falseendfunctionfunction VD4 takes nothing returns nothinglocal unit TLI=CKlocal integer MKIset GMI=CreateTrigger()set GNI=GMIset MKI=GetHandleId(GMI)call Q9I(GMI,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(GMI,Condition(function J54))call SaveUnitHandle(XY,(MKI),(2),(TLI))set TLI=nullendfunctionfunction J64 takes nothing returns nothinglocal location l=GetSpellTargetLoc()call PMI("Abilities\\Spells\\Orc\\EarthQuake\\EarthQuakeTarget.mdl",GetLocationX(l),GetLocationY(l),2)call TerrainDeformationRippleBJ(0.3,false,l,0,300,100,0.4,20)call RemoveLocation(l)set l=nullendfunctionfunction J74 takes nothing returns booleanif GetSpellAbilityId()==1093678679 thencall J64()endifreturn falseendfunctionfunction J21 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function J74))endfunctionfunction GenericCondition_BasicsAndStructureNoInvul takes nothing returns booleanreturn GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and QPI(GetFilterUnit())==false and A81(GetFilterUnit())==falseendfunctionfunction J84 takes nothing returns booleanreturn IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and QPI(GetFilterUnit())==false and A81(GetFilterUnit())==false)endfunctionfunction J94 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local group glocal unit ulocal real dlocal real alocal real RJ2local real RK2local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))if GetTriggerEvalCount(t)>32 thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseset g=MDI()set CK=N0Icall GroupEnumUnitsInRange(g,GetUnitX(N0I),GetUnitY(N0I),500,Condition(function J84))set u=GroupPickRandomUnit(g)if u==null thenset d=GetRandomReal(175,400)set a=GetRandomReal(0,6)set RJ2=GetUnitX(N0I)+d*Cos(a)set RK2=GetUnitY(N0I)+d*Sin(a)call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\SteamTank\\SteamTankImpact.mdl",RJ2,RK2))elsecall DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\SteamTank\\SteamTankImpact.mdl",u,"origin"))call TKI(QHI,u,5,12.5*NGI)endifcall MCI(g)endifset u=nullset g=nullset t=nullset N0I=nullreturn falseendfunctionfunction JA4 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit N0I=GetTriggerUnit()local unit QHI=CreateUnit(GetOwningPlayer(N0I),1697656901,GetUnitX(N0I),GetUnitY(N0I),0)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\RocketMissile\\RocketMissile.mdl",N0I,"hand right"))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveInteger(XY,(MKI),(5),(GetUnitAbilityLevel(N0I,1093808212)))call TriggerRegisterTimerEvent(t,0.25,true)call TriggerAddCondition(t,Condition(function J94))set t=nullset N0I=nullendfunctionfunction JB4 takes nothing returns booleanif GetSpellAbilityId()==1093808212 thencall JA4()endifreturn falseendfunctionfunction J31 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function JB4))endfunctionfunction JC4 takes unit TLI,unit TMI returns nothingcall O41(TMI,1093818202,1,0.5,1110460470)endfunctionfunction JD4 takes nothing returns nothinglocal real dif IsUnitInGroup(GetEnumUnit(),GQI)==false thenset d=P8I(GetEnumUnit(),GPI)if d<GUI thenset GUI=dset GRI=GetEnumUnit()endifendifendfunctionfunction JE4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local group SP2=(LoadGroupHandle(XY,(MKI),(187)))local real x=GetUnitX(TMI)local real y=GetUnitY(TMI)local group g=MDI()local integer NGI=GetUnitAbilityLevel(TLI,1093678678)call GroupAddUnit(SP2,TMI)call JC4(TLI,TMI)set CK=TLIset GRI=nullset GPI=TMIset GQI=SP2set GUI=999999call GroupEnumUnitsInRange(g,x,y,650+25,Condition(function B01))call ForGroup(g,function JD4)call MCI(g)if GRI==null or GetTriggerEvalCount(t)>3+NGI thencall MCI(SP2)call FlushChildHashtable(XY,(MKI))call MZI(t)elseset TMI=GRIcall SaveUnitHandle(XY,(MKI),(17),(TMI))endifset g=nullset t=nullset TLI=nullset TMI=nullset SP2=nullreturn falseendfunctionfunction JF4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local group SP2=MDI()call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveGroupHandle(XY,(MKI),(187),(SP2))call TriggerRegisterTimerEvent(t,0.25,true)call TriggerAddCondition(t,Condition(function JE4))set TLI=nullset TMI=nullset t=nullendfunctionfunction JG4 takes nothing returns booleanif GetSpellAbilityId()==1093678678 and MBI(GetSpellTargetUnit())==false thencall JF4()endifreturn falseendfunctionfunction J41 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function JG4))set t=nullendfunctionfunction JH4 takes nothing returns nothinglocal unit TLI=H0Ilocal unit TMI=GetEnumUnit()call TKI(TLI,TMI,1,HII)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",TMI,"origin"))set TLI=nullset TMI=nullendfunctionfunction JZ4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer NGI=GetUnitAbilityLevel(TLI,1093808454)local group gif NGI!=0 thenif NGI==1 thenset HII=80elseif NGI==2 thenset HII=120elseset HII=160endifelseset NGI=GetUnitAbilityLevel(TLI,1093808455)if NGI==1 thenset HII=100elseif NGI==2 thenset HII=160elseset HII=220endifendifif GetTriggerEventId()==EVENT_WIDGET_DEATH or GetUnitState(TLI,UNIT_STATE_MANA)<20*NGI or(LoadInteger(XY,(GetHandleId(TLI)),(704)))==-1 or(GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and(GetSpellAbilityId()==1093808456 or GetSpellAbilityId()==1093809992))thenif(LoadInteger(XY,(GetHandleId(TLI)),(704)))==0 or(LoadInteger(XY,(GetHandleId(TLI)),(704)))==1093808454 thencall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093808454,true)endifif(LoadInteger(XY,(GetHandleId(TLI)),(704)))==0 or(LoadInteger(XY,(GetHandleId(TLI)),(704)))==1093808455 thencall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093808455,true)endifcall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093808456,false)call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEventId()!=EVENT_UNIT_SPELL_EFFECT thencall SetUnitState(TLI,UNIT_STATE_MANA,GetUnitState(TLI,UNIT_STATE_MANA)-20*NGI)set CK=TLIset H0I=TLIset g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),475,Condition(function AT1))call ForGroup(g,function JH4)call MCI(g)set g=nullendifset t=nullreturn falseendfunctionfunction JV4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",TLI,"origin"))call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093808454,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093808455,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093808456,true)call UnitAddAbility(TLI,1093808456)call TriggerRegisterTimerEvent(t,1,true)call TriggerRegisterDeathEvent(t,TLI)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function JZ4))call SaveUnitHandle(XY,(MKI),(2),(TLI))call TriggerEvaluate(t)set TLI=nullset t=nullendfunctionfunction JW4 takes nothing returns booleanif GetSpellAbilityId()==1093808454 or GetSpellAbilityId()==1093808455 thencall JV4()endifreturn falseendfunctionfunction J51 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function JW4))set t=nullendfunctionfunction JX4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real YSO=(LoadReal(XY,(GetHandleId(TMI)),(813)))call FlushChildHashtable(XY,(MKI))call MZI(t)if GetTriggerEventId()==EVENT_WIDGET_DEATH or YSO<(TimerGetElapsed(M))thencall UnitRemoveAbility(TMI,1093817649)call UnitRemoveAbility(TMI,1110460246)call UnitRemoveAbility(TMI,1093817650)call UnitRemoveAbility(TMI,1110460247)call UnitRemoveAbility(TMI,1093817652)endifset t=nullset TMI=nullreturn falseendfunctionfunction JY4 takes unit TMI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real BP1=3.0local integer JJ4=1093817650local integer JK4=1110460247if IsUnitType(TMI,UNIT_TYPE_HERO)thenset BP1=2.0endifif IsUnitType(TMI,UNIT_TYPE_MELEE_ATTACKER)==true thenset JJ4=1093817649set JK4=1110460246endifcall QTI(TMI,JJ4)call QTI(TMI,JK4)call QTI(TMI,1093817652)call TriggerRegisterDeathEvent(t,TMI)call TriggerRegisterTimerEvent(t,BP1,false)call TriggerAddCondition(t,Condition(function JX4))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveReal(XY,(GetHandleId(TMI)),(813),(((TimerGetElapsed(M))+BP1-0.1)*1.0))set t=nullendfunctionfunction JL4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real YSO=(LoadReal(XY,(GetHandleId(TMI)),(812)))if GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED thenif GetTriggerUnit()==TMI thencall JY4(GetAttacker())endifelseif(TimerGetElapsed(M))>YSO thencall UnitRemoveAbility(TMI,1093817648)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction JM4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger tlocal integer MKIlocal integer BP1=40local integer NGI=GetUnitAbilityLevel(TLI,1093679186)local real YSO=(LoadReal(XY,(GetHandleId(TMI)),(812)))call SaveReal(XY,(GetHandleId(TMI)),(812),(((TimerGetElapsed(M))+BP1)*1.0))call QTI(TMI,1093817648)call SetUnitAbilityLevel(TMI,1093817648,NGI)if YSO<(TimerGetElapsed(M))thenset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,1,true)call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function JL4))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))endifset TLI=nullset TMI=nullset t=nullendfunctionfunction JN4 takes nothing returns booleanif GetSpellAbilityId()==1093679186 thencall JM4()endifreturn falseendfunctionfunction J61 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function JN4))set t=nullendfunctionfunction JS4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit HO3=(LoadUnitHandle(XY,(MKI),(374)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local integer JT4=(LoadInteger(XY,(MKI),(233)))local integer JNO=(LoadInteger(XY,(MKI),(12)))local unit QHIlocal group glocal real alocal real xlocal real ylocal integer CC1=(LoadInteger(XY,(MKI),(720)))if CC1>0 thenset CC1=CC1-1call SaveInteger(XY,(MKI),(720),(CC1))return falseendifif PAI(GetUnitX(HO3),GetUnitY(HO3),GetUnitX(TMI),GetUnitY(TMI))>20 thenset a=PUI(GetUnitX(HO3),GetUnitY(HO3),GetUnitX(TMI),GetUnitY(TMI))call SetUnitFacing(HO3,a)set x=GetUnitX(HO3)+13.5*Cos(a*bj_DEGTORAD)set y=GetUnitY(HO3)+13.5*Sin(a*bj_DEGTORAD)call SetUnitX(HO3,x)call SetUnitY(HO3,y)elseif QPI(TMI)==false thenset QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call QTI(QHI,1093679409)call SetUnitAbilityLevel(QHI,1093679409,NGI)call IssueTargetOrder(QHI,"frostnova",TMI)endifif JT4>JNO thencall RemoveUnit(HO3)call FlushChildHashtable(XY,(MKI))call MZI(t)elseset g=MDI()set CK=TLIcall GroupEnumUnitsInRange(g,GetUnitX(TMI),GetUnitY(TMI),600,Condition(function AN1))call GroupRemoveUnit(g,TMI)set TMI=GroupPickRandomUnit(g)call MCI(g)if TMI==null thencall RemoveUnit(HO3)call FlushChildHashtable(XY,(MKI))call MZI(t)elsecall SaveInteger(XY,(MKI),(720),(10))call SaveInteger(XY,(MKI),(233),(JT4+1))call SaveUnitHandle(XY,(MKI),(17),(TMI))endifendifendifset t=nullset TLI=nullset TMI=nullset HO3=nullset QHI=nullset g=nullreturn falseendfunctionfunction JR4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093678420)local integer JNO=10local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit HO3if GetSpellAbilityId()==1093679176 thenset NGI=GetUnitAbilityLevel(TLI,1093679176)+1set JNO=100000endifset HO3=CreateUnit(GetOwningPlayer(TLI),1697656889,GetUnitX(TLI),GetUnitY(TLI),0)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(374),(HO3))call SaveInteger(XY,(MKI),(5),(NGI))call SaveInteger(XY,(MKI),(233),(1))call SaveInteger(XY,(MKI),(12),(JNO))call SaveInteger(XY,(MKI),(720),(0))call TriggerRegisterTimerEvent(t,0.02,true)call TriggerAddCondition(t,Condition(function JS4))set TLI=nullset TMI=nullset HO3=nullset t=nullendfunctionfunction JP4 takes nothing returns booleanif GetSpellAbilityId()==1093678420 or GetSpellAbilityId()==1093679176 thencall JR4()endifreturn falseendfunctionfunction J71 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function JP4))set t=nullendfunctionfunction JQ4 takes nothing returns nothingif ON1(GetUnitTypeId(GetEnumUnit()))==false thenset H1I=H1I+1endifendfunctionfunction JU4 takes nothing returns nothingif ON1(GetUnitTypeId(GetFilterUnit()))==false thencall AddHeroXP(GetEnumUnit(),HOI,true)endifendfunctionfunction K04 takes unit TMI returns nothinglocal group g=MDI()local integer KI4=IEO(TMI)set H1I=0set CK=TMIcall GroupEnumUnitsInRange(g,GetUnitX(TMI),GetUnitY(TMI),1300+25,Condition(function BW1))call ForGroup(g,function JQ4)if H1I>0 thenset HOI=KI4/H1Icall ForGroup(g,function JU4)endifcall MCI(g)set H1I=0set CK=TMIset g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(TMI),GetUnitY(TMI),1300+25,Condition(function BG1))call ForGroup(g,function JQ4)if H1I>0 thenset HOI=KI4/H1Icall ForGroup(g,function JU4)endifcall MCI(g)set g=nullendfunctionfunction K14 takes unit u,integer d returns nothinglocal texttag t=CreateTextTag()call SetTextTagText(t,"+"+I2S(d)+" "+GetObjectName(1848659025),0.03)call SetTextTagPosUnit(t,u,0)call SetTextTagColorBJ(t,50,75,255,15)call SetTextTagVelocity(t,0,0.035)call SetTextTagFadepoint(t,3)call SetTextTagLifespan(t,2.5)call SetTextTagPermanent(t,false)call SetTextTagVisibility(t,false)call SetTextTagVisibility(t,true)if IsUnitVisible(u,GetLocalPlayer())or TGI(GetLocalPlayer())thencall SetTextTagVisibility(t,true)elsecall SetTextTagVisibility(t,false)endifset t=nullendfunctionfunction KO4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093678387)local real QDO=GetUnitState(TMI,UNIT_STATE_LIFE)*(NGI*0.15+0.1)call SetUnitState(TLI,UNIT_STATE_MANA,GetUnitState(TLI,UNIT_STATE_MANA)+QDO)call K14(TMI,R2I(QDO))call K04(TMI)call KillUnit(TMI)set TLI=nullset TMI=nullendfunctionfunction K24 takes nothing returns booleanif GetSpellAbilityId()==1093678387 and T4I(GetSpellTargetUnit())==false thencall KO4()endifreturn falseendfunctionfunction J81 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function K24))set t=nullendfunctionfunction K34 takes nothing returns nothinglocal location llocal unit N0I=GetTriggerUnit()local real x1=GetUnitX(N0I)local real y1=GetUnitY(N0I)local real alocal real x2local real y2local integer NGI=GetUnitAbilityLevel(N0I,1093687349)local real TSIlocal real BP1local unit CC1=nullif GetSpellTargetUnit()!=null thenset l=GetUnitLoc(GetSpellTargetUnit())elseset l=GetSpellTargetLoc()endifset x2=GetLocationX(l)set y2=GetLocationY(l)set a=Atan2(y2-y1,x2-x1)set x2=x1+700*Cos(a)set y2=y1+700*Sin(a)if NGI==1 thenset TSI=60set BP1=0.5elseif NGI==2 thenset TSI=130set BP1=1elseif NGI==3 thenset TSI=200set BP1=1.5elseif NGI==4 thenset TSI=260set BP1=2endifif GetSpellTargetUnit()!=null and MBI(GetSpellTargetUnit())thenset CC1=GetSpellTargetUnit()endifcall CB1(N0I,CC1,TSI,BP1,0.52,x1,y1,x2,y2,150,null,true,1600)call RemoveLocation(l)set l=nullset N0I=nullendfunctionfunction K44 takes nothing returns booleanif GetSpellAbilityId()==1093687349 thencall K34()endifreturn falseendfunctionfunction ND1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function K44))call RVI(1093687350)set t=nullendfunctionfunction K54 takes nothing returns booleanif(GetSpellAbilityId()==1093679413 or GetSpellAbilityId()==1093679447)and T6I(GetSpellTargetUnit())thencall R6I(GetTriggerUnit())call R1I(GetOwningPlayer(GetTriggerUnit()),GetObjectName(1848659026))endifreturn falseendfunctionfunction NE1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function K54))set t=nullendfunctionfunction K64 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))call FlushChildHashtable(XY,(MKI))call MZI(t)if GetTriggerEventId()==EVENT_WIDGET_DEATH thencall KillUnit(QHI)endifcall DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",N0I,"origin"))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\FeralSpirit\\feralspirittarget.mdl",N0I,"origin"))call UnitRemoveAbility(N0I,1093687875)call UnitRemoveAbility(N0I,1110454358)set t=nullset N0I=nullset QHI=nullreturn falseendfunctionfunction K74 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))call FlushChildHashtable(XY,(MKI))call MZI(t)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",N0I,"origin"))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\FeralSpirit\\feralspirittarget.mdl",N0I,"origin"))set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,18-0.1,false)call TriggerRegisterDeathEvent(t,N0I)call TriggerAddCondition(t,Condition(function K64))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveUnitHandle(XY,(MKI),(19),(QHI))set t=nullset N0I=nullset QHI=nullreturn falseendfunctionfunction K84 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit N0I=GetTriggerUnit()local unit QHI=CreateUnit(GetOwningPlayer(N0I),1697657174,0,0,0)local real BP1=18call QTI(QHI,1093687875)call UnitApplyTimedLife(QHI,1112820806,BP1)call IS1(N0I,BP1,175)call TriggerRegisterTimerEvent(t,0.1,false)call TriggerAddCondition(t,Condition(function K74))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveUnitHandle(XY,(MKI),(19),(QHI))set t=nullset N0I=nullendfunctionfunction K94 takes nothing returns booleanif GetSpellAbilityId()==1093679411 and GetUnitTypeId(GetTriggerUnit())==1429221432 thencall K84()endifreturn falseendfunctionfunction NV1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function K94))set t=nullendfunctionfunction DW2 takes nothing returns nothinglocal unit TLI=GMlocal unit TMI=HMlocal unit QHI=(LoadUnitHandle(XY,(GetHandleId(TLI)),(219)))call SaveUnitHandle(XY,(GetHandleId(TLI)),(219),(QHI))call SetUnitOwner(QHI,GetOwningPlayer(TMI),true)set TLI=nullset TMI=nullset QHI=nullendfunctionfunction I7O takes nothing returns nothinglocal unit N0I=JKlocal unit QHI=(LoadUnitHandle(XY,(GetHandleId(N0I)),(219)))if QHI!=null and GetUnitTypeId(QHI)==1697657174 thencall RemoveUnit(QHI)endifendfunctionfunction KA4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if QHI!=null and GetUnitTypeId(QHI)==1697657174 thenif QPI(TLI)==false thencall SetUnitX(QHI,GetUnitX(TLI))call SetUnitY(QHI,GetUnitY(TLI))endifendifset t=nullset QHI=nullset TLI=nullreturn falseendfunctionfunction KB4 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(N0I,1093677893)local unit QHIlocal trigger tlocal integer MKIif NGI==1 thenset QHI=CreateUnit(GetOwningPlayer(N0I),1697657174,0,0,0)call QTI(QHI,1093687882)call SaveUnitHandle(XY,(GetHandleId(N0I)),(219),(QHI))set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerAddCondition(t,Condition(function KA4))call TriggerRegisterTimerEvent(t,0.2,true)call SaveUnitHandle(XY,(MKI),(2),(N0I))call SaveUnitHandle(XY,(MKI),(19),(QHI))elseset QHI=(LoadUnitHandle(XY,(GetHandleId(N0I)),(219)))endifif NGI==2 thencall UnitRemoveAbility(QHI,1093687882)call QTI(QHI,1093687881)elseif NGI==3 thencall UnitRemoveAbility(QHI,1093687882)call UnitRemoveAbility(QHI,1093687881)call QTI(QHI,1093687880)elseif NGI==4 thencall UnitRemoveAbility(QHI,1093687882)call UnitRemoveAbility(QHI,1093687881)call UnitRemoveAbility(QHI,1093687880)call QTI(QHI,1093687879)endifset N0I=nullset QHI=nullendfunctionfunction KC4 takes nothing returns booleanif GetLearnedSkill()==1093677893 and IsUnitIllusion(GetTriggerUnit())==false thencall KB4()endifreturn falseendfunctionfunction NW1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function KC4))set t=nullendfunctionfunction KD4 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local unit QHIlocal integer i=1local boolean T1I=NZI(GetOwningPlayer(N0I))local player plocal integer KE4local integer KF4local integer NGI=GetUnitAbilityLevel(N0I,1093687878)if NGI==1 thenset KE4=1093742644set KF4=1093742647elseif NGI==2 thenset KE4=1093742641set KF4=1093742646elseif NGI==3 thenset KE4=1093742642set KF4=1093742645elseif NGI==4 thenset KE4=1093742643set KF4=1093742648endifloopexitwhen i>5if T1I thenset p=BO[i]elseset p=CO[i]endifset QHI=CreateUnit(p,1697657174,0,0,0)call QTI(QHI,KE4)call QTI(QHI,KF4)call UnitApplyTimedLife(QHI,1112820806,10)set i=i+1endloopset N0I=nullset QHI=nullset p=nullendfunctionfunction KG4 takes nothing returns booleanif GetSpellAbilityId()==1093687878 thencall KD4()endifreturn falseendfunctionfunction NX1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function KG4))set t=nullendfunctionfunction KH4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093679412)local integer KZ4=GetHeroLevel(TMI)local real TSI=GetUnitState(TMI,UNIT_STATE_MAX_LIFE)*0.2if ModuloInteger(KZ4,7-NGI)==0 or KZ4==25 thencall TKI(TLI,TMI,1,TSI)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Demon\\DemonBoltImpact\\DemonBoltImpact.mdl",TMI,"chest"))endifset TLI=nullset TMI=nullendfunctionfunction KV4 takes nothing returns booleanif GetSpellAbilityId()==1093679412 thencall KH4()endifreturn falseendfunctionfunction J91 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function KV4))set t=nullendfunctionfunction KW4 takes unit TLI returns nothingcall UnitRemoveAbility(TLI,1093750609)call UnitRemoveAbility(TLI,1093750610)call UnitRemoveAbility(TLI,1093750611)call UnitRemoveAbility(TLI,1093750612)call UnitRemoveAbility(TLI,1093750613)call UnitRemoveAbility(TLI,1093750614)call UnitRemoveAbility(TLI,1093750615)call UnitRemoveAbility(TLI,1093750616)call UnitRemoveAbility(TLI,1093750617)call UnitRemoveAbility(TLI,1395667021)call UnitRemoveAbility(TLI,1093750618)call UnitRemoveAbility(TLI,1395667022)call UnitRemoveAbility(TLI,1093750832)call UnitRemoveAbility(TLI,1093750833)call UnitRemoveAbility(TLI,1093750839)call UnitRemoveAbility(TLI,1093750849)call UnitRemoveAbility(TLI,1093750835)call UnitRemoveAbility(TLI,1093750836)call UnitRemoveAbility(TLI,1093750837)call UnitRemoveAbility(TLI,1093750838)call UnitRemoveAbility(TLI,1093812551)endfunctionfunction KX4 takes unit TLI,unit TMI returns nothinglocal integer KY4=GetUnitTypeId(TMI)local integer KJ4=0local integer KK4=0if KY4==1848658008 thenset KJ4=1093750609elseif KY4==1852796263 thenset KJ4=1093750610elseif KY4==1852207221 thenset KJ4=1093750611elseif KY4==1853060204 thenset KJ4=1093750612elseif KY4==1853055348 thenset KJ4=1093750613elseif KY4==1853060200 thenset KJ4=1093750614set KK4=1093750615elseif KY4==1848651859 thenset KJ4=1093750616set KK4=1093750617elseif KY4==1852534636 thenset KJ4=1395667021elseif KY4==1852207976 thenset KJ4=1093750618set KK4=1093812551elseif KY4==1852010091 thenset KJ4=1395667022set KK4=1093750832elseif KY4==1852272243 thenset KJ4=1093750833elseif KY4==1852270641 thenset KJ4=1093750839set KK4=1093750849elseif KY4==1852798821 thenset KJ4=1093750835set KK4=1093750836elseif KY4==1852077175 thenset KJ4=1093750837set KK4=1093750838elseif KY4==1853320295 thenset KJ4=1093750617endifif KJ4!=0 thencall KW4(TLI)call QTI(TLI,KJ4)endifif KK4!=0 thencall QTI(TLI,KK4)endifendfunctionfunction KL4 takes real KM4 returns stringlocal string c1="|c00ff0303"local string c="||"local string p=" "local string s=c1+c+"|r"local string DR1if KM4>85 thenset DR1=s+p+s+p+s+p+s+p+s+p+s+p+selseif KM4>70 thenset DR1=s+p+s+p+s+p+s+p+s+p+s+p+celseif KM4>55 thenset DR1=s+p+s+p+s+p+s+p+s+p+c+p+celseif KM4>40 thenset DR1=s+p+s+p+s+p+s+p+c+p+c+p+celseif KM4>25 thenset DR1=s+p+s+p+s+p+c+p+c+p+c+p+celseif KM4>10 thenset DR1=s+p+s+p+c+p+c+p+c+p+c+p+celseif KM4>0 thenset DR1=s+p+c+p+c+p+c+p+c+p+c+p+celseset DR1=c+p+c+p+c+p+c+p+c+p+c+p+cendifreturn DR1endfunctionfunction KN4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local integer KS4=(LoadInteger(XY,(MKI),(230)))local real HP=(LoadReal(XY,(MKI),(232)))local texttag tt=(LoadTextTagHandle(XY,(MKI),(231)))local integer MFI=GetTriggerEvalCount(t)local real KT4=RQI(HP-MFI,0)local boolean KR4=truecall SetTextTagText(tt,KL4(100*KT4/HP),0.018)call SetTextTagPosUnit(tt,N0I,0)if IsUnitVisible(N0I,GetLocalPlayer())==false and TGI(GetLocalPlayer())==false thenset KR4=falseendifcall SetTextTagVisibility(tt,KR4)if KT4==0 thencall I81(GetOwningPlayer(N0I),N0I,25*NGI)endifif KT4==0 or GetTriggerEventId()==EVENT_UNIT_DEATH thencall SetPlayerAbilityAvailable(GetOwningPlayer(N0I),1093742674,true)call UnitRemoveAbility(N0I,1093742675)call FlushChildHashtable(XY,(MKI))call MZI(t)call DestroyTextTag(tt)endifset t=nullset N0I=nullreturn falseendfunctionfunction KP4 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(N0I,1093742674)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real HP=GetUnitState(TMI,UNIT_STATE_LIFE)local integer CL3=GetUnitLevel(TMI)local integer KS4=GetUnitTypeId(TMI)local texttag tt=CreateTextTag()local boolean KR4=truelocal unit QHI=CreateUnit(GetOwningPlayer(N0I),1697656901,0,0,0)call QII("SPLK",GetUnitX(N0I),GetUnitY(N0I),GetUnitX(TMI),GetUnitY(TMI),0.1,0.1,0.2,.9,0.5)call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\Devour\\DevourEffectArt.mdl",GetUnitX(TMI),GetUnitY(TMI)))if IsUnitVisible(N0I,GetLocalPlayer())==false thenset KR4=falseendifcall KX4(N0I,TMI)call SetTextTagText(tt,KL4(100),0.018)call SetTextTagPosUnit(tt,N0I,0)call SetTextTagVisibility(tt,KR4)call SetTextTagPermanent(tt,true)call SetPlayerAbilityAvailable(GetOwningPlayer(N0I),1093742674,false)call QTI(N0I,1093742675)call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveTextTagHandle(XY,(MKI),(231),(tt))call SaveInteger(XY,(MKI),(230),(KS4))call SaveInteger(XY,(MKI),(5),(NGI))call SaveReal(XY,(MKI),(232),((HP)*1.0))call TriggerRegisterTimerEvent(t,0.05,true)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function KN4))call ShowUnit(TMI,false)call UnitRemoveBuffs(TMI,true,true)call UnitRemoveAbility(TMI,1097167980)call UnitDamageTarget(QHI,TMI,100000000.00,true,false,ATTACK_TYPE_MELEE,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)set t=nullset N0I=nullset TMI=nullendfunctionfunction KQ4 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(N0I,1093742674)local integer CL3=GetUnitLevel(TMI)if(GetOwningPlayer(TMI)!=BO[0]and GetOwningPlayer(TMI)!=CO[0])and((NGI==1 and CL3>2)or(NGI==2 and CL3>4)or(NGI==3 and CL3>5)or(NGI==4 and CL3>6))thenendifset N0I=nullset TMI=nullendfunctionfunction KU4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer id=(LoadInteger(XY,(MKI),(34)))call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullreturn falseendfunctionfunction L04 takes nothing returns nothinglocal integer id=GetSpellAbilityId()local trigger tlocal integer MKIif id==1093750609 or id==1093750610 or id==1093750611 or id==1093750612 or id==1093750613 or id==1093750614 or id==1093750615 or id==1093750616 or id==1093750617 or id==1395667021 or id==1093750618 or id==1395667022 or id==1093750832 or id==1093750833 or id==1093750834 or id==1093750835 or id==1093750836 or id==1093750837 or id==1093750838 thenset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_DEATH)call TriggerRegisterTimerEvent(t,1,false)call TriggerAddCondition(t,Condition(function KU4))call SaveUnitHandle(XY,(MKI),(2),(GetTriggerUnit()))call SaveInteger(XY,(MKI),(34),(id))set t=nullendifendfunctionfunction LI4 takes nothing returns booleanif GetSpellAbilityId()==1093742674 thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_CAST thencall KQ4()elsecall KP4()endifelseif GetUnitTypeId(GetTriggerUnit())==1430467634 thencall L04()endifreturn falseendfunctionfunction JA1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function LI4))set t=nullendfunctionfunction L14 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))call UnitRemoveAbility(TLI,1093750604)call UnitRemoveAbility(TLI,1093750606)call UnitRemoveAbility(TLI,1093750607)call UnitRemoveAbility(TLI,1093750605)call UnitRemoveAbility(TLI,1110455370)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullreturn falseendfunctionfunction LO4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer NGI=GetUnitAbilityLevel(TLI,1093750608)if NGI==1 thencall QTI(TLI,1093750604)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093750604,false)elseif NGI==2 thencall QTI(TLI,1093750606)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093750606,false)elseif NGI==3 thencall QTI(TLI,1093750607)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093750607,false)elseif NGI==4 thencall QTI(TLI,1093750605)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093750605,false)endifcall TriggerRegisterTimerEvent(t,8+2*NGI,false)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function L14))call SaveUnitHandle(XY,(MKI),(2),(TLI))set TLI=nullset t=nullendfunctionfunction L24 takes nothing returns booleanif GetSpellAbilityId()==1093750608 thencall LO4()endifreturn falseendfunctionfunction JB1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function L24))set t=nullendfunctionfunction L34 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer MFI=(LoadInteger(XY,(MKI),(34)))if P8I(TLI,TMI)>900 or QPI(TLI)==true thenset MFI=MFI+1call SaveInteger(XY,(MKI),(34),(MFI))endifif MFI>16*10 thencall UnitRemoveAbility(TMI,1112433775)call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetUnitAbilityLevel(TMI,1112433775)==0 thencall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction L44 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call UnitRemoveBuffs(TMI,true,false)call TriggerRegisterTimerEvent(t,0.1,true)call TriggerAddCondition(t,Condition(function L34))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(34),(0))set TLI=nullset TMI=nullset t=nullendfunctionfunction L54 takes nothing returns booleanif GetSpellAbilityId()==1093681458 thenif MBI(GetSpellTargetUnit())==false thencall L44()endifendifreturn falseendfunctionfunction JC1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function L54))set t=nullendfunctionfunction L64 takes nothing returns booleanlocal real xlocal real yif(IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))thenset x=H2I+GetRandomReal(20,70)*Cos(GetUnitFacing(GetTriggerUnit())*bj_DEGTORAD)set y=H3I+GetRandomReal(20,70)*Sin(GetUnitFacing(GetTriggerUnit())*bj_DEGTORAD)call SetUnitPosition(GetFilterUnit(),x,y)endifreturn falseendfunctionfunction L74 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local real x=GetUnitX(N0I)local real y=GetUnitY(N0I)local group g=MDI()local unit QHI=CreateUnit(GetOwningPlayer(N0I),1697656901,x,y,0)local integer NGI=GetUnitAbilityLevel(N0I,1093810508)set H2I=GetUnitX(N0I)+100*Cos(GetUnitFacing(N0I)*bj_DEGTORAD)set H3I=GetUnitY(N0I)+100*Sin(GetUnitFacing(N0I)*bj_DEGTORAD)call GroupEnumUnitsInRange(g,x,y,410+24,Condition(function L64))call MCI(g)call QTI(QHI,1093678662)call SetUnitAbilityLevel(QHI,1093678662,NGI)call IssueImmediateOrder(QHI,"stomp")set N0I=nullset g=nullendfunctionfunction L84 takes nothing returns booleanif GetSpellAbilityId()==1093810508 thencall L74()endifreturn falseendfunctionfunction JD1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function L84))set t=nullendfunctionfunction L94 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))if GetUnitAbilityLevel(TMI,1110454357)==0 or GetTriggerEventId()==EVENT_UNIT_DEATH thencall UnitRemoveAbility(TMI,1093751088)call UnitRemoveAbility(TMI,1093751089)call UnitRemoveAbility(TMI,1093751090)call UnitRemoveAbility(TMI,1093751091)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TMI=nullreturn falseendfunctionfunction LA4 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093677879)local integer UWIif NGI==1 thenset UWI=1093751088elseif NGI==2 thenset UWI=1093751089elseif NGI==3 thenset UWI=1093751090elseif NGI==4 thenset UWI=1093751091endifcall SetPlayerAbilityAvailable(GetOwningPlayer(TMI),UWI,false)call QTI(TMI,UWI)call TriggerRegisterTimerEvent(t,1,true)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function L94))call SaveUnitHandle(XY,(MKI),(17),(TMI))set t=nullset TLI=nullset TMI=nullendfunctionfunction LB4 takes nothing returns booleanif GetSpellAbilityId()==1093677879 thencall LA4()endifreturn falseendfunctionfunction JE1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function LB4))set t=nullendfunctionfunction LC4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))call UnitRemoveAbility(TMI,1093751094)call UnitRemoveAbility(TMI,1110459224)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TMI=nullreturn falseendfunctionfunction LD4 takes unit TLI,unit TMI,integer NGI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SetUnitPathing(TMI,true)call TriggerRegisterTimerEvent(t,2.5,false)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function LC4))call SaveUnitHandle(XY,(MKI),(17),(TMI))call QTI(TMI,1093751094)call UnitMakeAbilityPermanent(TMI,true,1093751094)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093751094,false)call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\HumanBloodKnight.mdl",TMI,"chest"))call TKI(TLI,TMI,1,70*NGI)set t=nullendfunctionfunction LE4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit LF4=(LoadUnitHandle(XY,(MKI),(393)))local unit LG4=(LoadUnitHandle(XY,(MKI),(394)))local unit LH4=(LoadUnitHandle(XY,(MKI),(395)))local unit LZ4=(LoadUnitHandle(XY,(MKI),(396)))local unit LV4=(LoadUnitHandle(XY,(MKI),(397)))local unit LW4=(LoadUnitHandle(XY,(MKI),(398)))local unit LX4=(LoadUnitHandle(XY,(MKI),(399)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local real P6I=(LoadReal(XY,(MKI),(47)))local real P7I=(LoadReal(XY,(MKI),(48)))local real NN2=(LoadReal(XY,(MKI),(13)))local real PO2=(LoadReal(XY,(MKI),(6)))local real P22=(LoadReal(XY,(MKI),(7)))local real U2I=REI(PO2+19*Cos(NN2))local real U3I=RHI(P22+19*Sin(NN2))local group glocal integer LY4=(LoadInteger(XY,(MKI),(12)))local location lcall SetUnitPosition(TLI,U2I,U3I)call SetUnitFacing(TLI,NN2*bj_RADTODEG)call SaveReal(XY,(MKI),(6),((U2I)*1.0))call SaveReal(XY,(MKI),(7),((U3I)*1.0))if ModuloInteger(GetTriggerEvalCount(t),4)==0 thencall DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",U2I,U3I))endifif GetTriggerEvalCount(t)==2 thencall SetUnitAnimationByIndex(TLI,3)endifif LF4==null or LG4==null or LH4==null or LZ4==null or LV4==null or LW4==null or LX4==null thenset CK=TLIset g=MDI()call GroupEnumUnitsInRange(g,U2I,U3I,125+25,Condition(function BX1))if FirstOfGroup(g)!=null thenif LF4!=null thencall GroupRemoveUnit(g,LF4)endifif LG4!=null thencall GroupRemoveUnit(g,LG4)endifif LH4!=null thencall GroupRemoveUnit(g,LH4)endifif LZ4!=null thencall GroupRemoveUnit(g,LZ4)endifif LV4!=null thencall GroupRemoveUnit(g,LV4)endifif LW4!=null thencall GroupRemoveUnit(g,LW4)endifif LX4!=null thencall GroupRemoveUnit(g,LX4)endifif FirstOfGroup(g)!=null thenif LF4==null thenset LF4=FirstOfGroup(g)call SetUnitPathing(LF4,false)call MPI(LF4,4404,5)elseif LG4==null thenset LG4=FirstOfGroup(g)call SetUnitPathing(LG4,false)call MPI(LG4,4404,5)elseif LH4==null thenset LH4=FirstOfGroup(g)call SetUnitPathing(LH4,false)call MPI(LH4,4404,5)elseif LZ4==null thenset LZ4=FirstOfGroup(g)call SetUnitPathing(LZ4,false)call MPI(LZ4,4404,5)elseif LV4==null thenset LV4=FirstOfGroup(g)call SetUnitPathing(LV4,false)call MPI(LV4,4404,5)elseif LW4==null thenset LW4=FirstOfGroup(g)call SetUnitPathing(LW4,false)call MPI(LW4,4404,5)elseif LX4==null thenset LX4=FirstOfGroup(g)call SetUnitPathing(LX4,false)call MPI(LX4,4404,5)endifendifendifcall MCI(g)set g=nullendifcall SaveUnitHandle(XY,(MKI),(393),(LF4))call SaveUnitHandle(XY,(MKI),(394),(LG4))call SaveUnitHandle(XY,(MKI),(395),(LH4))call SaveUnitHandle(XY,(MKI),(396),(LZ4))call SaveUnitHandle(XY,(MKI),(397),(LV4))call SaveUnitHandle(XY,(MKI),(398),(LW4))call SaveUnitHandle(XY,(MKI),(399),(LX4))if LF4!=null thencall SetUnitPosition(LF4,U2I,U3I)endifif LG4!=null thencall SetUnitPosition(LG4,U2I,U3I)endifif LH4!=null thencall SetUnitPosition(LH4,U2I,U3I)endifif LZ4!=null thencall SetUnitPosition(LZ4,U2I,U3I)endifif LV4!=null thencall SetUnitPosition(LV4,U2I,U3I)endifif LW4!=null thencall SetUnitPosition(LW4,U2I,U3I)endifif LX4!=null thencall SetUnitPosition(LX4,U2I,U3I)endifif ModuloInteger(GetTriggerEvalCount(t),3)==0 thencall QEI(U2I,U3I,200)endifif GetTriggerEventId()==EVENT_UNIT_DEATH or GetTriggerEvalCount(t)>LY4 thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call SetUnitAnimationByIndex(TLI,0)call SetUnitTimeScale(TLI,1.0)call SetUnitPathing(TLI,true)call FlushChildHashtable(XY,(MKI))call MZI(t)if LF4!=null thenif IsPointInRegion(XN,GetUnitX(LF4),GetUnitY(LF4))==true thenset l=AA1(GetUnitX(LF4),GetUnitY(LF4))call SetUnitX(LF4,REI(GetLocationX(l)))call SetUnitY(LF4,RHI(GetLocationY(l)))call RemoveLocation(l)set l=nullendifcall LD4(TLI,LF4,NGI)call QEI(GetUnitX(LF4),GetUnitY(LF4),300)endifif LG4!=null thenif IsPointInRegion(XN,GetUnitX(LG4),GetUnitY(LG4))==true thenset l=AA1(GetUnitX(LG4),GetUnitY(LG4))call SetUnitX(LG4,REI(GetLocationX(l)))call SetUnitY(LG4,RHI(GetLocationY(l)))call RemoveLocation(l)set l=nullendifcall LD4(TLI,LG4,NGI)call QEI(GetUnitX(LG4),GetUnitY(LG4),300)endifif LH4!=null thenif IsPointInRegion(XN,GetUnitX(LH4),GetUnitY(LH4))==true thenset l=AA1(GetUnitX(LH4),GetUnitY(LH4))call SetUnitX(LH4,REI(GetLocationX(l)))call SetUnitY(LH4,RHI(GetLocationY(l)))call RemoveLocation(l)set l=nullendifcall LD4(TLI,LH4,NGI)call QEI(GetUnitX(LH4),GetUnitY(LH4),300)endifif LZ4!=null thenif IsPointInRegion(XN,GetUnitX(LZ4),GetUnitY(LZ4))==true thenset l=AA1(GetUnitX(LZ4),GetUnitY(LZ4))call SetUnitX(LZ4,REI(GetLocationX(l)))call SetUnitY(LZ4,RHI(GetLocationY(l)))call RemoveLocation(l)set l=nullendifcall LD4(TLI,LZ4,NGI)call QEI(GetUnitX(LZ4),GetUnitY(LZ4),300)endifif LV4!=null thenif IsPointInRegion(XN,GetUnitX(LV4),GetUnitY(LV4))==true thenset l=AA1(GetUnitX(LV4),GetUnitY(LV4))call SetUnitX(LV4,REI(GetLocationX(l)))call SetUnitY(LV4,RHI(GetLocationY(l)))call RemoveLocation(l)set l=nullendifcall LD4(TLI,LV4,NGI)call QEI(GetUnitX(LV4),GetUnitY(LV4),300)endifif LW4!=null thenif IsPointInRegion(XN,GetUnitX(LW4),GetUnitY(LW4))==true thenset l=AA1(GetUnitX(LW4),GetUnitY(LW4))call SetUnitX(LW4,REI(GetLocationX(l)))call SetUnitY(LW4,RHI(GetLocationY(l)))call RemoveLocation(l)set l=nullendifcall LD4(TLI,LW4,NGI)call QEI(GetUnitX(LW4),GetUnitY(LW4),300)endifif LX4!=null thenif IsPointInRegion(XN,GetUnitX(LX4),GetUnitY(LX4))==true thenset l=AA1(GetUnitX(LX4),GetUnitY(LX4))call SetUnitX(LX4,REI(GetLocationX(l)))call SetUnitY(LX4,RHI(GetLocationY(l)))call RemoveLocation(l)set l=nullendifcall LD4(TLI,LX4,NGI)call QEI(GetUnitX(LX4),GetUnitY(LX4),300)endifif LF4!=null and QPI(LF4)==false thencall IssueTargetOrder(TLI,"attack",LF4)elseif LG4!=null and QPI(LG4)==false thencall IssueTargetOrder(TLI,"attack",LG4)elseif LH4!=null and QPI(LH4)==false thencall IssueTargetOrder(TLI,"attack",LH4)elseif LZ4!=null and QPI(LZ4)==false thencall IssueTargetOrder(TLI,"attack",LZ4)elseif LV4!=null and QPI(LV4)==false thencall IssueTargetOrder(TLI,"attack",LV4)elseif LW4!=null and QPI(LW4)==false thencall IssueTargetOrder(TLI,"attack",LW4)elseif LX4!=null and QPI(LX4)==false thencall IssueTargetOrder(TLI,"attack",LX4)endifcall QEI(U2I,U3I,375)if IsPointInRegion(XN,GetUnitX(TLI),GetUnitY(TLI))==true thenset l=AA1(GetUnitX(TLI),GetUnitY(TLI))call SetUnitX(TLI,REI(GetLocationX(l)))call SetUnitY(TLI,RHI(GetLocationY(l)))call RemoveLocation(l)set l=nullendifendifset t=nullset TLI=nullreturn falseendfunctionfunction LJ4 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real P6I=REI(GetSpellTargetX())local real P7I=RHI(GetSpellTargetY())local unit TLI=GetTriggerUnit()local real P4I=GetUnitX(TLI)local real P5I=GetUnitY(TLI)local integer NGI=GetUnitAbilityLevel(TLI,1093751364)local real a=PUI(P4I,P5I,P6I,P7I)*bj_DEGTORADlocal real P3I=600+150*NGI+25if PAI(P4I,P5I,P6I,P7I)>P3I thenset P6I=REI(P4I+P3I*Cos(a))set P7I=RHI(P5I+P3I*Sin(a))endifcall SetUnitPathing(TLI,false)call SetUnitAnimationByIndex(TLI,3)call SetUnitTimeScale(TLI,1.5)call TriggerRegisterTimerEvent(t,0.02,true)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function LE4))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveUnitHandle(XY,(MKI),(393),(null))call SaveUnitHandle(XY,(MKI),(394),(null))call SaveUnitHandle(XY,(MKI),(395),(null))call SaveUnitHandle(XY,(MKI),(396),(null))call SaveUnitHandle(XY,(MKI),(397),(null))call SaveUnitHandle(XY,(MKI),(398),(null))call SaveUnitHandle(XY,(MKI),(399),(null))call SaveReal(XY,(MKI),(47),((P6I)*1.0))call SaveReal(XY,(MKI),(48),((P7I)*1.0))call SaveReal(XY,(MKI),(6),((P4I)*1.0))call SaveReal(XY,(MKI),(7),((P5I)*1.0))call SaveReal(XY,(MKI),(13),((Atan2(P7I-P5I,P6I-P4I))*1.0))call SaveInteger(XY,(MKI),(12),(R2I(PAI(P4I,P5I,P6I,P7I)/19.0)))call SaveEffectHandle(XY,(MKI),(175),(AddSpecialEffectTarget("war3mapImported\\SkewerTuskGlow_1.mdx",TLI,"head")))set t=nullset TLI=nullendfunctionfunction LK4 takes nothing returns booleanif GetSpellAbilityId()==1093751364 thencall LJ4()endifreturn falseendfunctionfunction LL4 takes nothing returns booleanif GetSpellAbilityId()==1093751364 thencall SetUnitAnimationByIndex(GetTriggerUnit(),7)endifreturn falseendfunctionfunction JF1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function LK4))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function LL4))set t=nullendfunctionfunction MysticSnake_DoNothing takes nothing returns nothingendfunctionfunction LM4 takes nothing returns booleanlocal real dif IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false and GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitAlly(GetFilterUnit(),GetOwningPlayer(H5I))==true and IsUnitInGroup(GetFilterUnit(),H7I)==false and AH1(GetFilterUnit(),GetOwningPlayer(H6I))==true thenset d=PAI(GetUnitX(GetFilterUnit()),GetUnitY(GetFilterUnit()),GetUnitX(H5I),GetUnitY(H5I))if d<H8I thenset H4I=GetFilterUnit()set H8I=dendifendifreturn falseendfunctionfunction LN4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local integer TRI=(LoadInteger(XY,(MKI),(30)))local unit TMI=M6I(TRI)local group SP2=(LoadGroupHandle(XY,(MKI),(187)))local real LS4=(LoadReal(XY,(MKI),(222)))local real LT4=(LoadReal(XY,(MKI),(223)))local real LR4=(LoadReal(XY,(MKI),(224)))local real QDOlocal group glocal real alocal real xlocal real ylocal integer LP4=GetUnitAbilityLevel(TLI,1093747028)set a=Atan2(GetUnitY(TMI)-GetUnitY(QHI),GetUnitX(TMI)-GetUnitX(QHI))if TLI==TMI thenset x=GetUnitX(QHI)+25*Cos(a)set y=GetUnitY(QHI)+25*Sin(a)elseset x=GetUnitX(QHI)+15*Cos(a)set y=GetUnitY(QHI)+15*Sin(a)endifcall SetUnitX(QHI,x)call SetUnitY(QHI,y)if PAI(x,y,GetUnitX(TMI),GetUnitY(TMI))<60 thencall SetUnitX(QHI,GetUnitX(TMI))call SetUnitY(QHI,GetUnitY(TMI))if TLI==TMI thencall SetUnitState(TLI,UNIT_STATE_MANA,GetUnitState(TLI,UNIT_STATE_MANA)+LS4)call KillUnit(QHI)call MCI(SP2)call FlushChildHashtable(XY,(MKI))call MZI(t)elseif AG1(TMI)==false or IsUnitVisible(TMI,GetOwningPlayer(QHI))==true thenif(GetUnitAbilityLevel(TMI,1093817420)>0)thencall TKI(TLI,TMI,3,((40+40*NGI)+0.25*LR4*(40+40*NGI))/(1.2+0.1*LP4))elsecall TKI(TLI,TMI,1,(40+40*NGI)+0.25*LR4*(40+40*NGI))endifset LR4=LR4+1if GetUnitState(TMI,UNIT_STATE_MANA)>0 thenset QDO=RMinBJ(GetUnitState(TMI,UNIT_STATE_MANA),(10+10*NGI)+0.25*LT4*(10+10*NGI))call SetUnitState(TMI,UNIT_STATE_MANA,GetUnitState(TMI,UNIT_STATE_MANA)-QDO)call QWI(RE,GetUnitX(TMI),GetUnitY(TMI))set LS4=LS4+QDOset LT4=LT4+1endifendifcall SaveReal(XY,(MKI),(222),((LS4)*1.0))call SaveReal(XY,(MKI),(224),((LR4)*1.0))call SaveReal(XY,(MKI),(223),((LT4)*1.0))set g=MDI()set H4I=nullset H5I=TMIset H7I=SP2set H8I=99999set H6I=TLIcall GroupEnumUnitsInRange(g,GetUnitX(TMI),GetUnitY(TMI),500,Condition(function LM4))call MCI(g)if H4I==null or LR4==(2+NGI)thencall SaveInteger(XY,(MKI),(30),(M8I(TLI)))elsecall SaveInteger(XY,(MKI),(30),(M8I(H4I)))call GroupAddUnit(SP2,H4I)endifendifcall M5I(TRI)endifset t=nullset TLI=nullset TMI=nullset g=nullreturn falseendfunctionfunction LQ4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093682994)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local group g=MDI()local real LR4=0local real LT4=0local real QDO=0local real LS4=0local unit QHI=CreateUnit(GetOwningPlayer(TLI),1747990832,GetUnitX(TLI),GetUnitY(TLI),GetUnitFacing(TLI))call QWI(TE,GetUnitX(TLI),GetUnitY(TLI))call TriggerRegisterTimerEvent(t,0.03,true)call TriggerAddCondition(t,Condition(function LN4))call SaveGroupHandle(XY,(MKI),(187),(g))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveInteger(XY,(MKI),(30),(M8I(TMI)))call SaveInteger(XY,(MKI),(34),(0))call SaveReal(XY,(MKI),(222),((LS4)*1.0))call SaveReal(XY,(MKI),(224),((LR4)*1.0))call SaveReal(XY,(MKI),(223),((LT4)*1.0))call GroupAddUnit(g,TMI)set TLI=nullset TMI=nullset t=nullset g=nullendfunctionfunction LU4 takes nothing returns booleanif GetSpellAbilityId()==1093682994 thencall LQ4()endifreturn falseendfunctionfunction JH1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function LU4))set t=nullendfunctionfunction M04 takes nothing returns nothinglocal unit TMI=GetEnumUnit()call SaveReal(XY,(GetHandleId(TMI)),(799),((0)*1.0))set TMI=nullendfunctionfunction MI4 takes nothing returns nothinglocal unit TMI=GetEnumUnit()call UnitRemoveAbility(TMI,1093817139)call UnitRemoveAbility(TMI,1093817421)call UnitRemoveAbility(TMI,1110458961)call SetUnitTurnSpeed(TMI,GetUnitDefaultTurnSpeed(TMI))set TMI=nullendfunctionfunction M14 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=GetUnitAbilityLevel(TLI,1093747028)if GetTriggerEventId()==EVENT_UNIT_DAMAGED thencall DisableTrigger(t)call TKI(GetEventDamageSource(),TMI,7,GetEventDamage()*(0.2+0.1*NGI))call EnableTrigger(t)if QPI(TMI)==true thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)call UnitRemoveAbility(TMI,1093817137)call UnitRemoveAbility(TMI,1093817420)endifelsecall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)call UnitRemoveAbility(TMI,1093817137)call UnitRemoveAbility(TMI,1093817420)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction MO4 takes unit TLI,unit TMI returns nothinglocal trigger tlocal integer MKIlocal unit QHIif IsUnitIllusion(TMI)==true thencall KillUnit(TMI)returnendifset t=CreateTrigger()set MKI=GetHandleId(t)set QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call UnitAddAbility(QHI,1093817140)call IssueTargetOrder(QHI,"thunderbolt",TMI)call TriggerRegisterDeathEvent(t,TMI)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,3,false)call TriggerAddCondition(t,Condition(function M14))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\EtherealForm\\SpiritWalkerChange.mdl",TMI,"chest")))call QTI(TMI,1093817137)call QTI(TMI,1093817420)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093817137,false)set t=nullendfunctionfunction M24 takes nothing returns nothinglocal unit TMI=GetEnumUnit()call SaveReal(XY,(GetHandleId(TMI)),(799),(((LoadReal(XY,(GetHandleId(TMI)),(799)))+0.02)*1.0))if GetUnitAbilityLevel(TMI,1093817139)==0 thencall QTI(TMI,1093817139)call QTI(TMI,1093817421)call SetUnitTurnSpeed(TMI,GetUnitDefaultTurnSpeed(TMI)*0.5)endifif(LoadReal(XY,(GetHandleId(TMI)),(799)))==2.0 thencall MO4(H9I,TMI)endifset TMI=nullendfunctionfunction M34 takes unit TLI,unit TMI returns booleanlocal real a=PQI(TMI,TLI)local real FN3=GetUnitFacing(TMI)local real c1local real c2local real d1=-1.0local real d2=-1.0local real e1local real e2local real f1=-1.0local real f2=-1.0set c1=RMaxBJ(FN3-85,0)set c2=FN3if FN3-85<=0 thenset d1=360-(85-(c2-c1))set d2=360endifset e1=FN3set e2=RMinBJ(FN3+85,360)if FN3+85>=360 thenset f1=0set f2=0+(85-(e2-e1))endifif a<0 thenset a=a+360elseif a>360 thenset a=a-360endifif(a>c1 and a<c2)or(d1!=-1 and a>d1 and a<d2)or(a>e1 and a<e2)or(f1!=-1 and a>f1 and a<f2)thenreturn trueendifreturn falseendfunctionfunction M44 takes nothing returns booleanreturn(IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))and M34(CK,GetFilterUnit())endfunctionfunction M54 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer NGI=GetUnitAbilityLevel(TLI,1093747028)local group g1=MDI()local group g2=MDI()local group SP2=(LoadGroupHandle(XY,(MKI),(187)))set HAI=SP2set H9I=TLIset CK=TLIcall GroupEnumUnitsInRange(g1,GetUnitX(TLI),GetUnitY(TLI),1025,Condition(function M44))call ForGroup(g1,function M24)call GroupAddGroup(g1,SP2)call GroupAddGroup(SP2,g2)call GroupRemoveGroup(g1,g2)call MCI(g1)call MCI(g2)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))if GetTriggerEvalCount(t)>R2I(HBI/0.02)thencall MZI(t)call FlushChildHashtable(XY,(MKI))call ForGroup(SP2,function MI4)call ForGroup(SP2,function M04)call MCI(SP2)elsecall SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\EtherealForm\\SpiritWalkerChange.mdl",TLI,"chest")))endifset TLI=nullset g1=nullset g2=nullset SP2=nullset t=nullreturn falseendfunctionfunction M64 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.02,true)call TriggerAddCondition(t,Condition(function M54))call SaveUnitHandle(XY,(MKI),(2),(GetTriggerUnit()))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\EtherealForm\\SpiritWalkerChange.mdl",GetTriggerUnit(),"chest")))call SaveGroupHandle(XY,(MKI),(187),(MDI()))call TriggerEvaluate(t)set t=nullendfunctionfunction M74 takes nothing returns booleanif GetSpellAbilityId()==1093747028 thencall M64()endifreturn falseendfunctionfunction JZ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function M74))set t=nullendfunctionfunction M84 takes nothing returns booleanif GetSpellAbilityId()==1093747504 thencall SetPlayerAbilityAvailable(GetOwningPlayer(GetTriggerUnit()),1093748052,false)call SetPlayerAbilityAvailable(GetOwningPlayer(GetTriggerUnit()),1093748051,false)call SetPlayerAbilityAvailable(GetOwningPlayer(GetTriggerUnit()),1093748049,false)call SetPlayerAbilityAvailable(GetOwningPlayer(GetTriggerUnit()),1093748050,false)call SetPlayerAbilityAvailable(GetOwningPlayer(GetTriggerUnit()),1093818188,false)call SetPlayerAbilityAvailable(GetOwningPlayer(GetTriggerUnit()),1093808966,false)call SetPlayerAbilityAvailable(GetOwningPlayer(GetTriggerUnit()),1093818187,false)call SetPlayerAbilityAvailable(GetOwningPlayer(GetTriggerUnit()),1093818186,false)endifreturn falseendfunctionfunction JG1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function M84))set t=nullendfunctionfunction M94 takes integer MFI,unit TLI,unit TMI returns nothinglocal unit QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)if MFI==0 thencall IssueTargetOrder(TLI,"attack",TMI)elseif MFI==1 thencall QTI(QHI,1093686344)call SetUnitAbilityLevel(QHI,1093686344,1)call IssueTargetOrder(QHI,"slow",TMI)elseif MFI==2 thencall QTI(QHI,1093686344)call SetUnitAbilityLevel(QHI,1093686344,1)call IssueTargetOrder(QHI,"slow",TMI)elseif MFI==3 thencall QTI(QHI,1093686344)call SetUnitAbilityLevel(QHI,1093686344,2)call IssueTargetOrder(QHI,"slow",TMI)elseif MFI==4 thencall QTI(QHI,1093686344)call SetUnitAbilityLevel(QHI,1093686344,3)call IssueTargetOrder(QHI,"slow",TMI)elseif MFI==5 thencall QTI(QHI,1093686344)call SetUnitAbilityLevel(QHI,1093686344,4)call IssueTargetOrder(QHI,"slow",TMI)elseif MFI==6 thencall QTI(QHI,1093686344)call SetUnitAbilityLevel(QHI,1093686344,5)call IssueTargetOrder(QHI,"slow",TMI)endifset QHI=nullendfunctionfunction MA4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer NGI=(LoadInteger(XY,(MKI),(5)))local integer MFI=(LoadInteger(XY,(MKI),(34)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer TRI=(LoadInteger(XY,(MKI),(30)))local unit TMI=M6I(TRI)local real U32=(10.0+NGI*5.0)/100.0if GetTriggerEventId()!=EVENT_UNIT_DAMAGED thenset MFI=MFI+1call M94(MFI,TLI,TMI)if MFI==9 thencall M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)elsecall SaveInteger(XY,(MKI),(34),(MFI))endifelseif TAI(GetEventDamage())and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))and IsUnitType(GetEventDamageSource(),UNIT_TYPE_STRUCTURE)==false thenif IsUnitType(GetEventDamageSource(),UNIT_TYPE_HERO)or GetUnitAbilityLevel(GetEventDamageSource(),1093678162)==0 thencall SetUnitState(GetEventDamageSource(),UNIT_STATE_LIFE,GetUnitState(GetEventDamageSource(),UNIT_STATE_LIFE)+GetEventDamage()*U32)elsecall SetUnitState(K1[GetPlayerId(GetOwningPlayer(GetEventDamageSource()))],UNIT_STATE_LIFE,GetUnitState(K1[GetPlayerId(GetOwningPlayer(GetEventDamageSource()))],UNIT_STATE_LIFE)+GetEventDamage()*U32)endifcall DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\VampiricAura\\VampiricAuraTarget.mdl",GetEventDamageSource(),"origin"))endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction MB4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call M94(0,TLI,TMI)call SaveInteger(XY,(MKI),(375),(0))call SaveInteger(XY,(MKI),(5),(GetUnitAbilityLevel(TLI,1093744948)))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(30),(M8I(TMI)))call TriggerRegisterTimerEvent(t,1,true)call TriggerRegisterTimerEvent(t,0.01,false)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function MA4))set t=nullset TLI=nullset TMI=nullendfunctionfunction MC4 takes nothing returns booleanif GetSpellAbilityId()==1093744948 and MBI(GetSpellTargetUnit())==false thencall MB4()endifreturn falseendfunctionfunction N81 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function MC4))set t=nullcall RVI(1093686344)endfunctionfunction Snatch_Damage takes nothing returns nothingcall TKI(HCI,GetEnumUnit(),1,HDI*125+25)call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Naga\\NagaBlood\\NagaBloodWindserpent.mdl",GetEnumUnit(),"overhead"))endfunctionfunction Snatch_Process takes nothing returns nothinglocal integer MKI=GetHandleId(GetTriggeringTrigger())local unit TLI=CKlocal unit TMI=DKlocal real TSI=(LoadReal(XY,(MKI),(20)))call TKI(TLI,TMI,1,TSI)call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Naga\\NagaBlood\\NagaBloodWindserpent.mdl",TMI,"overhead"))set TLI=nullset TMI=nullendfunctionfunction MD4 takes nothing returns nothinglocal unit TLI=HCIlocal unit TMI=GetEnumUnit()local integer NGI=HDIlocal trigger t=U6I(TLI,TMI,1747993670,"ME4",600,false)local integer MKI=GetHandleId(t)call SaveReal(XY,(MKI),(20),((NGI*125+25)*1.0))set TLI=nullset TMI=nullendfunctionfunction MF4 takes unit TLI,unit TMI,integer NGI returns nothinglocal group g=MDI()set CK=TLIset HCI=TLIset HDI=NGIcall GroupEnumUnitsInRange(g,GetUnitX(TMI),GetUnitY(TMI),700+25,Condition(function AT1))call ForGroup(g,function MD4)call MCI(g)set g=nullendfunctionfunction MG4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local integer NGI=(LoadInteger(XY,(MKI),(5)))if GetTriggerEventId()==EVENT_WIDGET_DEATH thencall UnitShareVision(TMI,GetOwningPlayer(N0I),false)call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Human\\HumanLargeDeathExplode\\HumanLargeDeathExplode.mdl",GetUnitX(TMI),GetUnitY(TMI)))call SetUnitPosition(N0I,GetUnitX(TMI),GetUnitY(TMI))call PauseUnit(N0I,false)call ShowUnit(N0I,true)call SetUnitPathing(N0I,true)call ClearSelectionForPlayer(GetOwningPlayer(N0I))call SelectUnitForPlayerSingle(N0I,GetOwningPlayer(N0I))call SetUnitInvulnerable(N0I,false)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(177))))call RemoveUnit(QHI)call FlushChildHashtable(XY,(MKI))call MZI(t)call MF4(N0I,TMI,NGI)call SaveInteger(XY,(GetHandleId((N0I))),((4310)),(2))elseif IsUnitType(TMI,UNIT_TYPE_HERO)==true and IsUnitEnemy(TMI,GetOwningPlayer(N0I))==true thencall UnitShareVision(TMI,GetOwningPlayer(N0I),false)call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Human\\HumanLargeDeathExplode\\HumanLargeDeathExplode.mdl",GetUnitX(TMI),GetUnitY(TMI)))call SetUnitPosition(N0I,GetUnitX(TMI),GetUnitY(TMI))call PauseUnit(N0I,false)call ShowUnit(N0I,true)call SetUnitPathing(N0I,true)call ClearSelectionForPlayer(GetOwningPlayer(N0I))call SelectUnitForPlayerSingle(N0I,GetOwningPlayer(N0I))call SetUnitInvulnerable(N0I,false)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(177))))call RemoveUnit(QHI)call FlushChildHashtable(XY,(MKI))call MZI(t)call MF4(N0I,TMI,NGI)call SaveInteger(XY,(GetHandleId((N0I))),((4310)),(2))elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()==1093686104 thencall DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Human\\HumanLargeDeathExplode\\HumanLargeDeathExplode.mdl",GetUnitX(TMI),GetUnitY(TMI)))if IsUnitEnemy(TMI,GetOwningPlayer(N0I))thencall SetUnitState(N0I,UNIT_STATE_LIFE,GetUnitState(N0I,UNIT_STATE_LIFE)+GetUnitState(TMI,UNIT_STATE_LIFE))endifcall UnitShareVision(TMI,GetOwningPlayer(N0I),false)call SetUnitPosition(N0I,GetUnitX(TMI),GetUnitY(TMI))call PauseUnit(N0I,false)call ShowUnit(N0I,true)call SetUnitPathing(N0I,true)call SetUnitAnimation(N0I,"Stand Victory")call UUI(N0I,1.5)call ClearSelectionForPlayer(GetOwningPlayer(N0I))call SelectUnitForPlayerSingle(N0I,GetOwningPlayer(N0I))call SetUnitInvulnerable(N0I,false)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(177))))call RemoveUnit(QHI)call FlushChildHashtable(XY,(MKI))call MZI(t)call MF4(N0I,TMI,NGI)if IsUnitEnemy(TMI,GetOwningPlayer(N0I))thencall UnitRemoveBuffs(TMI,true,true)call CG1(TMI,0,0)call TKI(N0I,TMI,1,100000)call TKI(N0I,TMI,2,100000)call TKI(N0I,TMI,3,100000)endifcall SaveInteger(XY,(GetHandleId((N0I))),((4310)),(2))elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_SELECTED and GetTriggerUnit()==TMI thencall ClearSelectionForPlayer(GetOwningPlayer(N0I))call SelectUnitAddForPlayer(QHI,GetOwningPlayer(N0I))elsecall SetUnitPosition(N0I,GetUnitX(TMI),GetUnitY(TMI))endifset t=nullset TMI=nullset N0I=nullreturn falseendfunctionfunction MH4 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit QHI=CreateUnit(GetOwningPlayer(N0I),1697657136,7260,-7732,0)local string MZ4="Objects\\Spawnmodels\\Naga\\NagaBlood\\NagaBloodWindserpent.mdl"local string MV4="Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBase.mdl"local string MW4="Abilities\\Spells\\Other\\Aneu\\AneuTarget.mdl"if IsPlayerEnemy(GetLocalPlayer(),GetOwningPlayer(N0I))and TGI(GetLocalPlayer())==false thenset MZ4=""set MV4=""set MW4=""endifcall UnitRemoveBuffs(N0I,true,true)call CG1(N0I,0,0)call SetUnitInvulnerable(QHI,true)call QTI(QHI,1093686104)call ClearSelectionForPlayer(GetOwningPlayer(N0I))call SelectUnitForPlayerSingle(QHI,GetOwningPlayer(N0I))call UnitShareVision(TMI,GetOwningPlayer(N0I),true)call SetUnitInvulnerable(N0I,true)call ShowUnit(N0I,false)call PauseUnit(N0I,true)call SetUnitPathing(N0I,false)call DestroyEffect(AddSpecialEffectTarget(MZ4,TMI,"overhead"))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget(MV4,TMI,"overhead")))call SaveEffectHandle(XY,(MKI),(177),(AddSpecialEffectTarget(MW4,TMI,"overhead")))call SaveInteger(XY,(MKI),(5),(GetUnitAbilityLevel(N0I,1093686103)))call TriggerRegisterDeathEvent(t,TMI)call TriggerRegisterPlayerUnitEvent(t,GetOwningPlayer(N0I),EVENT_PLAYER_UNIT_SELECTED,Condition(function LWI))call TriggerRegisterUnitEvent(t,QHI,EVENT_UNIT_SPELL_EFFECT)call TriggerRegisterTimerEvent(t,0.2,true)call TriggerAddCondition(t,Condition(function MG4))call SaveInteger(XY,(GetHandleId((N0I))),((4310)),(1))set t=nullset N0I=nullset TMI=nullendfunctionfunction MX4 takes nothing returns booleanif GetSpellAbilityId()==1093686103 thencall MH4()endifreturn falseendfunctionfunction MY4 takes nothing returns booleanif GetSpellAbilityId()==1093686103 and IsUnitEnemy(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))and(IsUnitType(GetSpellTargetUnit(),UNIT_TYPE_HERO)==true or IsUnitIllusion(GetSpellTargetUnit()))thencall R6I(GetTriggerUnit())call R1I(GetOwningPlayer(GetTriggerUnit()),GetObjectName(1848659030))endifreturn falseendfunctionfunction N71 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function MX4))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function MY4))set t=nullendfunctionfunction MJ4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))if GetUnitTypeId(N0I)==1160786520 thencall SetUnitVertexColor(N0I,255,255,255,255)elsecall SetUnitVertexColor(N0I,100,100,100,255)endifcall DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call UnitRemoveAbility(N0I,1093686098)call UnitRemoveAbility(N0I,1093686100)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset N0I=nullreturn falseendfunctionfunction MK4 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit N0I=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(N0I,1093817428)call SetUnitVertexColor(N0I,0,0,0,255)call SetPlayerAbilityAvailable(GetOwningPlayer(N0I),1093686100,false)call QTI(N0I,1093686100)call QTI(N0I,1093686098)call SetUnitAbilityLevel(N0I,1093686098,NGI)call CG1(N0I,0,0)call UnitRemoveAbility(N0I,1112044643)call UnitRemoveAbility(N0I,1110454869)call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveEffectHandle(XY,(MKI),(175),(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\Bloodlust\\BloodlustTarget.mdl",N0I,"right hand")))call SaveEffectHandle(XY,(MKI),(176),(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\Bloodlust\\BloodlustTarget.mdl",N0I,"left hand")))call TriggerRegisterTimerEvent(t,2+NGI,false)call TriggerAddCondition(t,Condition(function MJ4))set N0I=nullset t=nullendfunctionfunction ML4 takes nothing returns booleanif GetSpellAbilityId()==1093817428 thencall MK4()endifreturn falseendfunctionfunction N61 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function ML4))set t=nullendfunctionfunction MM4 takes unit TLI,unit TMI returns nothinglocal integer NGI=GetUnitAbilityLevel(TLI,1093686099)local real TSI=(0.03+0.01*NGI)*GetUnitState(TMI,UNIT_STATE_LIFE)if GetUnitAbilityLevel(TMI,1093678162)==0 and GetUnitAbilityLevel(TLI,1112433775)==0 thencall TKI(TLI,TMI,2,TSI)call SetUnitState(TLI,UNIT_STATE_LIFE,TSI+GetUnitState(TLI,UNIT_STATE_LIFE))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\VampiricAura\\VampiricAuraTarget.mdl",TLI,"origin"))endifendfunctionfunction MN4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer TRI=(LoadInteger(XY,(MKI),(30)))local unit TMI=M6I(TRI)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamageSource()==TLI thencall DisableTrigger(t)call MM4(TLI,TMI)call M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifelsecall M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction MS4 takes nothing returns nothinglocal trigger t=CreateTrigger()local unit TMI=GetTriggerUnit()local unit TLI=GetAttacker()local integer MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,1,false)call TriggerAddCondition(t,Condition(function MN4))call SaveInteger(XY,(MKI),(30),(M8I(TMI)))call SaveUnitHandle(XY,(MKI),(2),(TLI))set TMI=nullset TLI=nullset t=nullendfunctionfunction MT4 takes nothing returns nothinglocal unit TLI=GetAttacker()if((LoadInteger(XY,(GetHandleId((TLI))),((4274))))==1)==false thencall MPI(TLI,4274,0.4)call MS4()endifendfunctionfunction MR4 takes nothing returns booleanif GetUnitAbilityLevel(GetAttacker(),1093686099)>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(14)))and GetUnitTypeId(GetTriggerUnit())!=1848651852 and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))thencall MT4()endifreturn falseendfunctionfunction MP4 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function MR4))call SaveUnitHandle(XY,(GetHandleId(t)),(14),(GetTriggerUnit()))set t=nullendfunctionfunction MQ4 takes nothing returns booleanif GetLearnedSkill()==1093686099 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093686099)==1 thencall MP4()endifreturn falseendfunctionfunction N51 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function MQ4))set t=nullendfunctionfunction MU4 takes nothing returns nothinglocal unit TMI=GetEnumUnit()local unit TLI=HEIlocal real YIO=GetUnitState(TMI,UNIT_STATE_LIFE)local real N04=GetUnitState(TMI,UNIT_STATE_MAX_LIFE)local real NI4=((0.003+0.003*HFI)*N04)/2if YIO<NI4 thencall SetUnitState(TMI,UNIT_STATE_LIFE,1)call TKI(TLI,TMI,3,100)call TKI(TLI,TMI,1,100)call TKI(TLI,TMI,2,100)elsecall SetUnitState(TMI,UNIT_STATE_LIFE,RQI(GetUnitState(TMI,UNIT_STATE_LIFE)-NI4,1))endifset TMI=nullset TLI=nullendfunctionfunction N14 takes nothing returns booleanreturn(IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))and GetUnitAbilityLevel(GetFilterUnit(),1110456372)>0endfunctionfunction NO4 takes nothing returns booleanlocal integer MKI=GetHandleId(GetTriggeringTrigger())local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local group gif QPI(TLI)==false thenset g=MDI()set CK=TLIset HEI=TLIset HFI=GetUnitAbilityLevel(TLI,1093677390)call GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),1225,Condition(function N14))call ForGroup(g,function MU4)call MCI(g)endifset g=nullset TLI=nullreturn falseendfunctionfunction N24 takes nothing returns nothinglocal trigger t=CreateTrigger()call TriggerRegisterTimerEvent(t,0.5,true)call TriggerAddCondition(t,Condition(function NO4))call SaveUnitHandle(XY,(GetHandleId(t)),(2),(GetTriggerUnit()))set t=nullendfunctionfunction N34 takes nothing returns booleanif GetLearnedSkill()==1093677390 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093677390)==1 thencall N24()endifreturn falseendfunctionfunction JY1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function N34))set t=nullendfunctionfunction N44 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer NGI=GetUnitAbilityLevel(TLI,1093678640)local real N54=2*NGIlocal real N64=NGIlocal integer U32=(LoadInteger(XY,(MKI),(34)))if NGI==4 thenset N54=10endifset N64=N64*U32set N54=N54*U32call SetUnitState(TLI,UNIT_STATE_MANA,GetUnitState(TLI,UNIT_STATE_MANA)+N54)call SetUnitState(TLI,UNIT_STATE_LIFE,GetUnitState(TLI,UNIT_STATE_LIFE)+N64)if GetTriggerEvalCount(t)>5 or GetTriggerEventId()==EVENT_WIDGET_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullreturn falseendfunctionfunction N74 takes unit TLI returns nothinglocal integer NGI=GetUnitAbilityLevel(TLI,1093678640)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\ReplenishMana\\SpiritTouchTarget.mdl",TLI,"origin"))call TriggerRegisterTimerEvent(t,1,true)call TriggerRegisterDeathEvent(t,TLI)call TriggerAddCondition(t,Condition(function N44))call SaveUnitHandle(XY,(MKI),(2),(TLI))if IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==true thencall SaveInteger(XY,(MKI),(34),(10))elsecall SaveInteger(XY,(MKI),(34),(1))endifset t=nullendfunctionfunction N84 takes nothing returns booleanif GetUnitAbilityLevel(GetKillingUnit(),1110454866)>0 thencall N74(GetKillingUnit())elseif((LoadInteger(XY,(GetHandleId((GetTriggerUnit()))),((4333))))==1)thencall N74(HZI)endifreturn falseendfunctionfunction JV1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_DEATH)call TriggerAddCondition(t,Condition(function N84))set t=nullendfunctionfunction ME4 takes nothing returns nothinglocal integer MKI=GetHandleId(GetTriggeringTrigger())local unit TLI=CKlocal unit TMI=DKlocal real TSI=(LoadReal(XY,(MKI),(20)))local real J23=(LoadReal(XY,(MKI),(21)))if IsUnitAlly(TMI,GetOwningPlayer(TLI))thencall SetUnitState(TMI,UNIT_STATE_LIFE,GetUnitState(TMI,UNIT_STATE_LIFE)+J23)elsecall TKI(TLI,TMI,1,TSI)endifset TLI=nullset TMI=nullendfunctionfunction N94 takes nothing returns nothinglocal trigger t=U6I(CK,GetEnumUnit(),1747988567,"ME4",400,false)local integer MKI=GetHandleId(t)call SaveReal(XY,(MKI),(20),((QJ)*1.0))call SaveReal(XY,(MKI),(21),((UJ)*1.0))set t=nullendfunctionfunction NA4 takes nothing returns nothingcall N94()endfunctionfunction NB4 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local group g=MDI()local integer NGI=GetUnitAbilityLevel(N0I,HGI)local real rlocal real TSIlocal real J23if NGI==1 thenset TSI=75set J23=70set r=500elseif NGI==2 thenset TSI=125set J23=90set r=500elseif NGI==3 thenset TSI=200set J23=110set r=500elseif NGI==4 thenset TSI=275set J23=130set r=500endifset CK=N0Iset QJ=TSIset UJ=J23call GroupEnumUnitsInRange(g,GetUnitX(N0I),GetUnitY(N0I),r,Condition(function BJ1))call GroupRemoveUnit(g,N0I)call ForGroup(g,function NA4)call MCI(g)call SetUnitState(N0I,UNIT_STATE_LIFE,GetUnitState(N0I,UNIT_STATE_LIFE)+J23)set N0I=nullset g=nullendfunctionfunction NC4 takes nothing returns booleanif GetSpellAbilityId()==HGI thencall NB4()endifreturn falseendfunctionfunction JW1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function NC4))set t=nullendfunctionfunction ND4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real U32=(LoadReal(XY,(MKI),(680)))local integer NE4=GetUnitAbilityLevel(TLI,1093679184)call FlushChildHashtable(XY,(MKI))call MZI(t)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",TMI,"origin"))if NE4>0 thenset HHI=truecall TKI(TLI,TMI,1,U32*(GetUnitState(TMI,UNIT_STATE_MAX_LIFE)-GetUnitState(TMI,UNIT_STATE_LIFE)))set HHI=falseelsecall TKI(TLI,TMI,1,U32*(GetUnitState(TMI,UNIT_STATE_MAX_LIFE)-GetUnitState(TMI,UNIT_STATE_LIFE)))endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction NF4 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NG4=GetUnitAbilityLevel(TLI,1093678647)local integer NH4=GetUnitAbilityLevel(TLI,1093679184)local real U32if NG4==1 thenset U32=0.4elseif NG4==2 or NH4==1 thenset U32=0.6elseif NG4==3 or NH4==2 thenset U32=0.9elseif NH4==3 thenset U32=1.2endifcall SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveReal(XY,(MKI),(680),((U32)*1.0))call TriggerRegisterTimerEvent(t,1.5,false)call TriggerAddCondition(t,Condition(function ND4))call MPI(TMI,4333,1.5)if NH4>0 thencall MPI(TMI,4418,1.51)endifset HZI=TLIset t=nullset TLI=nullset TMI=nullendfunctionfunction NZ4 takes nothing returns booleanif(GetSpellAbilityId()==1093678647 or GetSpellAbilityId()==1093679184)and MBI(GetSpellTargetUnit())==false thencall NF4()endifreturn falseendfunctionfunction JX1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function NZ4))set t=nullendfunctionfunction NV4 takes nothing returns nothinglocal location llocal unit N0I=GetTriggerUnit()local real x1=GetUnitX(N0I)local real y1=GetUnitY(N0I)local real alocal real x2local real y2local integer NGI=GetUnitAbilityLevel(N0I,1093687351)local real TSIlocal real BP1local unit CC1=nullif GetSpellTargetUnit()!=null thenset l=GetUnitLoc(GetSpellTargetUnit())elseset l=GetSpellTargetLoc()endifset x2=GetLocationX(l)set y2=GetLocationY(l)set a=Atan2(y2-y1,x2-x1)set x2=x1+700*Cos(a)set y2=y1+700*Sin(a)if NGI==1 thenset TSI=80set BP1=0.75elseif NGI==2 thenset TSI=140set BP1=1.25elseif NGI==3 thenset TSI=200set BP1=1.75elseif NGI==4 thenset TSI=260set BP1=2.25endifif GetSpellTargetUnit()!=null and MBI(GetSpellTargetUnit())thenset CC1=GetSpellTargetUnit()endifcall CB1(N0I,CC1,TSI,BP1,0.52,x1,y1,x2,y2,150,null,true,1600)call RemoveLocation(l)set l=nullset N0I=nullendfunctionfunction NW4 takes nothing returns booleanif GetSpellAbilityId()==1093687351 thencall NV4()endifreturn falseendfunctionfunction NF1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function NW4))call RVI(1093687350)set t=nullendfunctionfunction NX4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093748789)local real r=GetHeroInt(TMI,true)*(3+0.5*NGI)local integer TQ2=IMinBJ(R2I(r),R2I(GetUnitState(TMI,UNIT_STATE_MANA)))call SetUnitState(TMI,UNIT_STATE_MANA,GetUnitState(TMI,UNIT_STATE_MANA)-TQ2)call TKI(TLI,TMI,1,TQ2)call O81("MBUR",TLI,TMI,1,1,1,1,0.5)call Q5I("-"+I2S(TQ2),3,TMI,0.023,82,82,255,255)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\ManaBurn\\ManaBurnTarget.mdl",TMI,"chest"))set TLI=nullset TMI=nullendfunctionfunction NY4 takes nothing returns booleanif GetSpellAbilityId()==1093748789 and MBI(GetSpellTargetUnit())==false thencall NX4()endifreturn falseendfunctionfunction NG1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function NY4))set t=nullendfunctionfunction NJ4 takes nothing returns nothingcall IssueTargetOrder(HVI,"soulburn",GetEnumUnit())endfunctionfunction NK4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,x,y,0)local group g=MDI()set HVI=QHIcall QTI(QHI,1093748551)call GroupEnumUnitsInRange(g,x,y,325,Condition(function AK1))call ForGroup(g,function NJ4)call MCI(g)call KillUnit(TLI)call SetUnitAnimation(TLI,"death")call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UndeadLargeDeathExplode\\UndeadLargeDeathExplode.mdl",x,y))set TLI=nullset QHI=nullset g=nullendfunctionfunction NL4 takes nothing returns booleanif GetSpellAbilityId()==1093748808 thencall NK4()endifreturn falseendfunctionfunction NH1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function NL4))call RVI(1093748551)set t=nullendfunctionfunction NM4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMIlocal integer NGI=GetUnitAbilityLevel(TLI,1093815119)local group SP2=(LoadGroupHandle(XY,(MKI),(22)))if GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamage()>0 and IsPlayerEnemy(GetOwningPlayer(GetEventDamageSource()),GetOwningPlayer(TLI))==true thenif NXI(GetOwningPlayer(GetEventDamageSource()))and TAI(GetEventDamage())thenset TMI=GetEventDamageSource()if GetUnitAbilityLevel(TMI,1093678162)>0 thenset TMI=K1[GetPlayerId(GetOwningPlayer(TMI))]endifif IsUnitInGroup(TMI,SP2)==false thencall GroupAddUnit(SP2,TMI)call PII(TLI,GetEventDamage())if QPI(TMI)==false thencall BQ1(TLI,TMI,0.6*NGI)call TKI(TLI,TMI,3,GetEventDamage())endifendifendifendifelsecall UnitRemoveAbility(TLI,1093815120)call MCI(SP2)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullreturn falseendfunctionfunction NN4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,2.25,false)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function NM4))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveGroupHandle(XY,(MKI),(22),(MDI()))call QTI(TLI,1093815120)set TLI=nullset t=nullendfunctionfunction NS4 takes nothing returns booleanif GetSpellAbilityId()==1093815119 thencall NN4()endifreturn falseendfunctionfunction NZ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function NS4))set t=nullendfunctionconstant function Shadowraze_RawCode1 takes nothing returns integerreturn 1093682521endfunctionconstant function Shadowraze_RawCode2 takes nothing returns integerreturn 1093682760endfunctionconstant function Shadowraze_RawCode3 takes nothing returns integerreturn 1093682736endfunctionconstant function Shadowraze_Area takes nothing returns integerreturn 275endfunctionfunction NT4 takes nothing returns booleanreturn GetSpellAbilityId()==(1093682521)or GetSpellAbilityId()==(1093682760)or GetSpellAbilityId()==(1093682736)endfunctionfunction NR4 takes nothing returns booleanreturn IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and GetUnitAbilityLevel(GetFilterUnit(),1093678162)!=1endfunctionfunction NP4 takes nothing returns nothingcall UnitDamageTarget(GetTriggerUnit(),GetEnumUnit(),75*GetUnitAbilityLevel(GetTriggerUnit(),GetSpellAbilityId()),true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_DEATH,WEAPON_TYPE_WHOKNOWS)endfunctionfunction NQ4 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local unit QHIlocal group GK1=MDI()local boolexpr PI1=Condition(function NR4)local real KRI=GetUnitFacing(N0I)local real xlocal real yif GetSpellAbilityId()==(1093682521)thenset x=GetUnitX(N0I)+200*Cos(KRI*bj_DEGTORAD)set y=GetUnitY(N0I)+200*Sin(KRI*bj_DEGTORAD)set QHI=CreateUnit(GetOwningPlayer(N0I),1697656886,x,y,0)call UnitApplyTimedLife(QHI,1112820806,2)call GroupEnumUnitsInRange(GK1,x,y,(275),PI1)call ForGroup(GK1,function NP4)call GroupClear(GK1)endifif GetSpellAbilityId()==(1093682760)thenset x=GetUnitX(N0I)+450*Cos(KRI*bj_DEGTORAD)set y=GetUnitY(N0I)+450*Sin(KRI*bj_DEGTORAD)set QHI=CreateUnit(GetOwningPlayer(N0I),1697656886,x,y,0)call UnitApplyTimedLife(QHI,1112820806,2)call GroupEnumUnitsInRange(GK1,x,y,(275),PI1)call ForGroup(GK1,function NP4)call GroupClear(GK1)endifif GetSpellAbilityId()==(1093682736)thenset x=GetUnitX(N0I)+700*Cos(KRI*bj_DEGTORAD)set y=GetUnitY(N0I)+700*Sin(KRI*bj_DEGTORAD)set QHI=CreateUnit(GetOwningPlayer(N0I),1697656886,x,y,0)call UnitApplyTimedLife(QHI,1112820806,2)call GroupEnumUnitsInRange(GK1,x,y,(275),PI1)call ForGroup(GK1,function NP4)call GroupClear(GK1)endifcall MCI(GK1)endfunctionfunction JK1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddAction(t,function NQ4)call TriggerAddCondition(t,Condition(function NT4))endfunctionfunction NU4 takes nothing returns nothingif(GetLearnedSkill()==1093682521)thenif(GetUnitAbilityLevelSwapped(1093682521,GetTriggerUnit())==1)thencall UnitAddAbility(GetTriggerUnit(),1093682736)call UnitAddAbility(GetTriggerUnit(),1093682760)elsecall SetUnitAbilityLevelSwapped(1093682736,GetTriggerUnit(),GetUnitAbilityLevelSwapped(1093682521,GetTriggerUnit()))call SetUnitAbilityLevelSwapped(1093682760,GetTriggerUnit(),GetUnitAbilityLevelSwapped(1093682521,GetTriggerUnit()))endifendifif(GetLearnedSkill()==1093681746)thenif(GetUnitAbilityLevelSwapped(1093681746,GetTriggerUnit())==1)thencall UnitAddAbility(GetTriggerUnit(),1093682001)endifendifendfunctionfunction NL takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddAction(t,function NU4)endfunctionfunction S04 takes nothing returns booleanreturn GetSpellAbilityId()==1093810506 or GetSpellAbilityId()==1093750096endfunctionfunction SI4 takes unit R7I,integer S14 returns nothinglocal integer SO4=S14local integer S24local integer S1Ilocal location O4O=GetUnitLoc(GetTriggerUnit())local location QH2local integer NGI=GetUnitAbilityLevelSwapped(1093810506,GetTriggerUnit())if NGI==0 thenreturnendifset SO4=SO4/2set S24=1set S1I=SO4loopexitwhen S24>S1Iset QH2=KNI(O4O,50.00,(I2R(S24)*(360/SO4)))call CreateNUnitsAtLoc(1,1697656899,GetOwningPlayer(R7I),O4O,bj_UNIT_FACING)call UnitAddAbility(bj_lastCreatedUnit,1093683271)call SetUnitAbilityLevelSwapped(1093683271,bj_lastCreatedUnit,NGI)call UnitApplyTimedLifeBJ(2.00,1112820806,bj_lastCreatedUnit)call IssuePointOrderLoc(bj_lastCreatedUnit,"carrionswarm",QH2)call SetUnitPathing(bj_lastCreatedUnit,false)call SetUnitInvulnerable(bj_lastCreatedUnit,true)call UnitAddAbility(bj_lastCreatedUnit,1097625443)call RemoveLocation(QH2)set S24=S24+1endloopcall RemoveLocation(O4O)endfunctionfunction S34 takes nothing returns nothinglocal integer SO4=(LoadInteger(XY,(GetHandleId(GetTriggerUnit())),(710)))local unit R7I=GetTriggerUnit()call SI4(R7I,SO4)set R7I=nullendfunctionfunction JL1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function S04))call TriggerAddAction(t,function S34)endfunctionfunction S44 takes nothing returns booleanreturn GetSpellAbilityId()==1093810506 or GetSpellAbilityId()==1093750096endfunctionfunction S54 takes nothing returns booleanif(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==true)thenreturn falseendifif(GetUnitAbilityLevelSwapped(1093678162,GetFilterUnit())==1)thenreturn falseendifif(IsUnitAliveBJ(GetFilterUnit())==false)thenreturn falseendifif(GetUnitTypeId(GetFilterUnit())==1865429043)thenreturn falseendifif(IsUnitEnemy(GetFilterUnit(),GetTriggerPlayer())==false)thenreturn falseendifif(GetTriggerUnit()==GetFilterUnit())thenreturn falseendifif(IsUnitVisible(GetFilterUnit(),GetTriggerPlayer())==false)thenreturn falseendifreturn trueendfunctionfunction S64 takes nothing returns nothinglocal unit R7I=GetTriggerUnit()local location O4O=GetUnitLoc(R7I)local integer NGI=GetUnitAbilityLevelSwapped(1093810506,GetTriggerUnit())if NGI==0 thenset NGI=GetUnitAbilityLevelSwapped(1093750096,GetTriggerUnit())endifcall CreateNUnitsAtLoc(1,1697656899,GetOwningPlayer(GetEnumUnit()),O4O,bj_UNIT_FACING)call UnitAddAbility(bj_lastCreatedUnit,1093683272)call SetUnitAbilityLevelSwapped(1093683272,bj_lastCreatedUnit,NGI)call UnitApplyTimedLifeBJ(2.00,1112820806,bj_lastCreatedUnit)call IssueTargetOrder(bj_lastCreatedUnit,"cripple",GetEnumUnit())call SetUnitPathing(bj_lastCreatedUnit,false)call SetUnitInvulnerable(bj_lastCreatedUnit,true)call UnitAddAbility(bj_lastCreatedUnit,1097625443)call RemoveLocation(O4O)endfunctionfunction S74 takes nothing returns nothinglocal unit R7I=GetTriggerUnit()local location O4O=GetUnitLoc(R7I)local integer NGI=GetUnitAbilityLevelSwapped(1093810506,GetTriggerUnit())if NGI==0 thenset NGI=GetUnitAbilityLevelSwapped(1093750096,GetTriggerUnit())endifcall CreateNUnitsAtLoc(1,1697656899,GetOwningPlayer(GetEnumUnit()),O4O,bj_UNIT_FACING)call UnitAddAbility(bj_lastCreatedUnit,1093683272)call SetUnitAbilityLevelSwapped(1093683272,bj_lastCreatedUnit,NGI)call UnitApplyTimedLifeBJ(2.00,1112820806,bj_lastCreatedUnit)call IssueTargetOrder(bj_lastCreatedUnit,"cripple",GetEnumUnit())call SetUnitPathing(bj_lastCreatedUnit,false)call SetUnitInvulnerable(bj_lastCreatedUnit,true)call UnitAddAbility(bj_lastCreatedUnit,1097625443)call RemoveLocation(O4O)endfunctionfunction S84 takes nothing returns nothinglocal unit R7I=GetTriggerUnit()local location O4O=GetUnitLoc(R7I)local integer NGI=GetUnitAbilityLevelSwapped(1093810506,GetTriggerUnit())if NGI==0 thenset NGI=GetUnitAbilityLevelSwapped(1093750096,GetTriggerUnit())endifcall CreateNUnitsAtLoc(1,1697656899,GetOwningPlayer(GetEnumUnit()),O4O,bj_UNIT_FACING)call UnitAddAbility(bj_lastCreatedUnit,1093683272)call SetUnitAbilityLevelSwapped(1093683272,bj_lastCreatedUnit,NGI)call UnitApplyTimedLifeBJ(2.00,1112820806,bj_lastCreatedUnit)call IssueTargetOrder(bj_lastCreatedUnit,"cripple",GetEnumUnit())call SetUnitPathing(bj_lastCreatedUnit,false)call SetUnitInvulnerable(bj_lastCreatedUnit,true)call UnitAddAbility(bj_lastCreatedUnit,1097625443)call RemoveLocation(O4O)endfunctionfunction S94 takes nothing returns nothinglocal location O4O=GetUnitLoc(GetTriggerUnit())local unit R7I=GetTriggerUnit()local group GK1set GK1=MDI()call GroupEnumUnitsInRangeOfLoc(GK1,O4O,700,Condition(function S54))call ForGroup(GK1,function S64)call MCI(GK1)set GK1=MDI()call GroupEnumUnitsInRangeOfLoc(GK1,O4O,400,Condition(function S54))call ForGroup(GK1,function S74)call MCI(GK1)set GK1=MDI()call GroupEnumUnitsInRangeOfLoc(GK1,O4O,200,Condition(function S54))call ForGroup(GK1,function S84)call MCI(GK1)call RemoveLocation(O4O)endfunctionfunction JM1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function S44))call TriggerAddAction(t,function S94)endfunctionfunction SA4 takes nothing returns nothinglocal integer MKI=GetHandleId(GetTriggeringTrigger())local unit TLI=DKlocal unit TMI=CKlocal integer SO4=GetUnitAbilityLevel(TLI,1093682001)local integer SB4local integer NGI=GetUnitAbilityLevel(TLI,1093681746)if NGI==1 thenset SB4=12elseif NGI==2 thenset SB4=20elseif NGI==3 thenset SB4=28elseset SB4=36endifset SB4=SB4+1if IsUnitType(TMI,UNIT_TYPE_HERO)==false thenset SO4=SO4+1elseset SO4=SO4+12endifset SO4=IMinBJ(SB4,SO4)call SetUnitAbilityLevel(TLI,1093682001,SO4)call SaveInteger(XY,(GetHandleId(TLI)),(710),(SO4))set TLI=nullendfunctionfunction SC4 takes nothing returns nothinglocal integer SO4local integer NGIlocal integer SB4local trigger tlocal integer MKIlocal unit TLI=GetKillingUnit()if GetUnitTypeId(TLI)==1697656899 thenset TLI=K1[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]endifset SO4=GetUnitAbilityLevel(TLI,1093682001)set NGI=GetUnitAbilityLevel(TLI,1093681746)if NGI==1 thenset SB4=12elseif NGI==2 thenset SB4=20elseif NGI==3 thenset SB4=28elseset SB4=36endifif SO4<=SB4 thenset t=U6I(GetTriggerUnit(),TLI,1747993426,"SA4",500,false)set MKI=GetHandleId(t)set t=nullcall DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\ZigguratMissile\\ZigguratMissile.mdl",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit())))endifendfunctionfunction SD4 takes nothing returns nothinglocal integer SE4=(LoadInteger(XY,(GetHandleId(GetTriggerUnit())),(710)))call SaveInteger(XY,(GetHandleId(GetTriggerUnit())),(710),(R2I(GetUnitAbilityLevel(GetTriggerUnit(),1093682001)*0.5)+1))call SetUnitAbilityLevel(GetTriggerUnit(),1093682001,R2I(GetUnitAbilityLevel(GetTriggerUnit(),1093682001)*0.5)+1)call SI4(GetTriggerUnit(),SE4-(LoadInteger(XY,(GetHandleId(GetTriggerUnit())),(710))))endfunctionfunction SF4 takes nothing returns booleanif GetUnitAbilityLevel(GetKillingUnit(),1093681746)>0 and IsUnitIllusion(GetTriggerUnit())==false thencall SC4()elseif GetUnitAbilityLevel(K1[GetPlayerId(GetOwningPlayer(GetKillingUnit()))],1093681746)>0 and GetUnitTypeId(GetKillingUnit())==1697656899 thencall SC4()endifif GetUnitAbilityLevel(GetTriggerUnit(),1093681746)>0 and IsUnitIllusion(GetTriggerUnit())==false thencall SD4()endifreturn falseendfunctionfunction SG4 takes nothing returns booleanlocal unit N0I=K1[GetPlayerId(GetTriggerPlayer())]local integer SH4=GetUnitAbilityLevel(N0I,1093682001)-1local integer SZ4=0local integer NGI=GetUnitAbilityLevel(N0I,1093681746)if NGI==1 thenset SZ4=12elseif NGI==2 thenset SZ4=20elseif NGI==3 thenset SZ4=28elseif NGI==4 thenset SZ4=36endifset SH4=IMaxBJ(IMinBJ(SH4,SZ4),0)if GetUnitTypeId(N0I)==1315334514 thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10.00,GetObjectName(1848658757)+" "+I2S(SH4)+"/"+I2S(SZ4))endifreturn falseendfunctionfunction JJ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_DEATH)call TriggerAddCondition(t,Condition(function SF4))set t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,BO[1],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[1],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-st",true)call TriggerAddCondition(t,Condition(function SG4))set t=nullendfunctionfunction SV4 takes nothing returns booleanreturn GetSpellAbilityId()==1093677640endfunctionfunction SW4 takes nothing returns nothinglocal unit QHIif(R8I()==false)thenset QHI=CreateUnit(GetOwningPlayer(GetTriggerUnit()),1697656901,GetUnitX(GetSpellTargetUnit()),GetUnitY(GetSpellTargetUnit()),bj_UNIT_FACING)call QTI(QHI,1093677650)call IssueTargetOrder(QHI,"slow",GetSpellTargetUnit())elseset QHI=CreateUnit(GetOwningPlayer(GetTriggerUnit()),1697656901,GetUnitX(GetSpellTargetUnit()),GetUnitY(GetSpellTargetUnit()),bj_UNIT_FACING)call QTI(QHI,1093748785)call IssueTargetOrder(QHI,"slow",GetSpellTargetUnit())endifendfunctionfunction JS1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function SV4))call TriggerAddAction(t,function SW4)endfunctionfunction SX4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))call ResetUnitAnimation(TLI)call RemoveUnit(QHI)call FlushChildHashtable(XY,(MKI))call MZI(t)set TLI=nullset QHI=nullset t=nullreturn falseendfunctionfunction SY4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit QHI=CreateUnit(GetOwningPlayer(TLI),1966092617,GetUnitX(TLI),GetUnitY(TLI),GetUnitFacing(TLI))local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_ENDCAST)call TriggerAddCondition(t,Condition(function SX4))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SetUnitVertexColorBJ(QHI,0,0,0,75)call SetUnitAnimation(QHI,"spell third")set TLI=nullset QHI=nullset t=nullendfunctionfunction SJ4 takes nothing returns booleanif GetSpellAbilityId()==1093679171 and GetUnitAbilityLevel(GetTriggerUnit(),1093679171)<5 thencall SY4()endifreturn falseendfunctionfunction JT1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function SJ4))set t=nullendfunctionfunction SK4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullreturn falseendfunctionfunction SL4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer BP1local integer NGI=GetUnitAbilityLevel(TLI,1093677899)if NGI==0 thenset NGI=GetUnitAbilityLevel(TLI,1093747248)endifif NGI==1 thenset BP1=25elseif NGI==2 thenset BP1=50elseif NGI==3 thenset BP1=80endifcall TriggerRegisterTimerEvent(t,BP1,false)call TriggerAddCondition(t,Condition(function SK4))set TLI=nullset t=nullendfunctionfunction SM4 takes nothing returns booleanif GetSpellAbilityId()==1093677899 or GetSpellAbilityId()==1093747248 thencall SL4()endifreturn falseendfunctionfunction JR1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function SM4))set t=nullendfunctionfunction SN4 takes nothing returns booleanreturn(GetLearnedSkill()==1093679158 or GetLearnedSkill()==1093679173)and IsUnitIllusion(GetTriggerUnit())==falseendfunctionfunction SS4 takes nothing returns booleanlocal integer MKI=GetHandleId(GetTriggeringTrigger())local unit ST4=(LoadUnitHandle(XY,(MKI),(304)))local unit HJ3=(LoadUnitHandle(XY,(MKI),(305)))if ST4==null or QPI(ST4)or R8I()or DB1(ST4,FK0[JL0])==null thencall ShowUnit(HJ3,false)elsecall ShowUnit(HJ3,true)call SetUnitX(HJ3,GetUnitX(ST4))call SetUnitY(HJ3,GetUnitY(ST4))endifif GetOwningPlayer(HJ3)!=GetOwningPlayer(ST4)thencall SetUnitOwner(HJ3,GetOwningPlayer(ST4),true)endifreturn falseendfunctionfunction SR4 takes nothing returns nothinglocal integer MKI=GetHandleId(GetTriggeringTrigger())local unit ST4=(LoadUnitHandle(XY,(MKI),(304)))if ST4!=null and R8I()and QPI(ST4)==false thencall UnitRemoveAbility(ST4,1093742902)call UnitRemoveAbility(ST4,1093742903)call SetUnitAbilityLevel(ST4,1395667009,5)call SetUnitAbilityLevel(ST4,1093679171,5)elseif ST4!=null and R8I()==false and QPI(ST4)==false thencall QTI(ST4,1093742902)call QTI(ST4,1093742903)call SetUnitAbilityLevel(ST4,1395667009,GetUnitAbilityLevel(ST4,1093679158))call SetUnitAbilityLevel(ST4,1093679171,GetUnitAbilityLevel(ST4,1093679173))endifendfunctionfunction SP4 takes nothing returns nothinglocal integer MKI=GetHandleId(GetTriggerUnit())local trigger tif((LoadBoolean(XY,(MKI),(306)))==false)thencall SaveBoolean(XY,(MKI),(306),(true))set t=CreateTrigger()call TriggerRegisterTimerEventPeriodic(t,2.00)call TriggerRegisterGameStateEventTimeOfDay(t,LESS_THAN,6.00)call TriggerRegisterGameStateEventTimeOfDay(t,GREATER_THAN,18.00)call TriggerAddAction(t,function SR4)call SaveUnitHandle(XY,(GetHandleId(t)),(304),(GetTriggerUnit()))set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.5,true)call TriggerAddCondition(t,Condition(function SS4))call SaveUnitHandle(XY,(MKI),(304),(GetTriggerUnit()))call SaveUnitHandle(XY,(MKI),(305),(CreateUnit(GetOwningPlayer(GetTriggerUnit()),1865429313,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),0)))endifif(GetLearnedSkill()==1093679158)thencall QTI(GetTriggerUnit(),1395667009)if(R8I())thencall SetUnitAbilityLevel(GetTriggerUnit(),1395667009,5)elsecall SetUnitAbilityLevel(GetTriggerUnit(),1395667009,GetUnitAbilityLevel(GetTriggerUnit(),1093679158))endifendifif(GetLearnedSkill()==1093679173)thencall UnitAddAbility(GetTriggerUnit(),1093679171)if(R8I())thencall SetUnitAbilityLevel(GetTriggerUnit(),1093679171,5)elsecall SetUnitAbilityLevel(GetTriggerUnit(),1093679171,GetUnitAbilityLevel(GetTriggerUnit(),1093679173))endifendifendfunctionfunction JN1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function SN4))call TriggerAddAction(t,function SP4)endfunctionfunction SQ4 takes nothing returns nothinglocal integer MKI=GetHandleId(GetTriggeringTrigger())local unit TLI=CKlocal unit TMI=DKlocal integer NGI=(LoadInteger(XY,(MKI),(5)))local real TSI=20+NGI*40local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)local integer SU4=GetUnitAbilityLevel(TLI,1093677905)if IsUnitType(TMI,UNIT_TYPE_HERO)==true thenset TSI=TSI/2endifif SU4>0 and GetRandomReal(0,100)<15 thenset TSI=TSI*(1.5+SU4)call Q5I(I2S(R2I(TSI))+"!",3,TMI,0.02,255,0,0,255)endifcall QTI(QHI,1093687628)call SetUnitAbilityLevel(QHI,1093687628,NGI)call IssueTargetOrder(QHI,"slow",TMI)call TKI(TLI,TMI,3,TSI)set TLI=nullset TMI=nullset QHI=nullendfunctionfunction T04 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger t=U6I(N0I,TMI,1747988784,"SQ4",1200,true)local integer MKI=GetHandleId(t)call SaveInteger(XY,(MKI),(5),(GetUnitAbilityLevel(N0I,1093687629)))set N0I=nullset TMI=nullset t=nullendfunctionfunction TI4 takes nothing returns booleanif GetSpellAbilityId()==1093687629 and MBI(GetSpellTargetUnit())==false thencall T04()endifreturn falseendfunctionfunction JQ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function TI4))set t=nullendfunctionfunction T14 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer TRI=(LoadInteger(XY,(MKI),(30)))local unit TMI=M6I(TRI)local integer MFI=(LoadInteger(XY,(MKI),(34)))if GetTriggerEventId()==EVENT_UNIT_DEATH thencall UnitRemoveAbility(TLI,1093747535)call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED thenif GetTriggerUnit()!=TMI and GetAttacker()==TLI thencall UnitRemoveAbility(TLI,1093747535)call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerUnit()==TMI and GetAttacker()==TLI thenset MFI=MFI+1call SaveInteger(XY,(MKI),(34),(MFI))if MFI==4 thencall UnitRemoveAbility(TLI,1093747535)call FlushChildHashtable(XY,(MKI))call MZI(t)endifendifelsecall UnitRemoveAbility(TLI,1093747535)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullreturn falseendfunctionfunction TO4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093685324)local trigger tlocal integer MKIcall DestroyEffect(AddSpecialEffect("war3mapImported\\PhantomStrike.mdx",GetUnitX(TLI),GetUnitY(TLI)))call SetUnitX(TLI,GetUnitX(TMI))call SetUnitY(TLI,GetUnitY(TMI))if IsUnitAlly(TLI,GetOwningPlayer(TMI))==false thenset t=CreateTrigger()set MKI=GetHandleId(t)call QTI(TLI,1093747535)call IssueTargetOrder(TLI,"attack",TMI)call TriggerRegisterTimerEvent(t,3,false)call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function T14))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(30),(M8I(TMI)))endifset TLI=nullset TMI=nullset t=nullendfunctionfunction T24 takes nothing returns booleanif GetSpellAbilityId()==1093685324 thencall TO4()endifreturn falseendfunctionfunction JU1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function T24))set t=nullendfunctionfunction T34 takes unit TLI,boolean LH2 returns nothinglocal integer NGI=GetUnitAbilityLevel(TLI,1093677904)if LH2==false thencall UnitRemoveAbility(TLI,1093743430)call UnitRemoveAbility(TLI,1110458674)elsecall QTI(TLI,1093743430)endifendfunctionfunction T44 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local group glocal integer MFI=(LoadInteger(XY,(MKI),(34)))local boolean T54=(LoadBoolean(XY,(MKI),(674)))set MFI=MFI+1call SaveInteger(XY,(MKI),(34),(MFI))if TLI!=null and QPI(TLI)==false and GetUnitAbilityLevel(TLI,1093677904)>0 thenset CK=TLIset g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),1625,Condition(function AR1))if FirstOfGroup(g)==null thenif T54==true and MFI>7 thenset T54=falsecall SaveBoolean(XY,(MKI),(674),(T54))set MFI=0call SaveInteger(XY,(MKI),(34),(MFI))endifif T54==false thenset MFI=0call SaveInteger(XY,(MKI),(34),(MFI))call SaveInteger(XY,(GetHandleId((TLI))),((4302)),(2))call T34(TLI,false)call SetUnitVertexColorBJ(TLI,100,100,100,0)if GetUnitAbilityLevel(TLI,1093808211)==0 thencall UnitSetUsesAltIcon(TLI,false)endifendifelseif T54==false and MFI>7 thenset T54=trueset MFI=0call SaveBoolean(XY,(MKI),(674),(T54))call SaveInteger(XY,(MKI),(34),(MFI))endifif T54==true thenset MFI=0call SaveInteger(XY,(MKI),(34),(MFI))call SaveInteger(XY,(GetHandleId((TLI))),((4302)),(1))call T34(TLI,true)call SetUnitVertexColorBJ(TLI,100,100,100,75)if IsPlayerEnemy(GetOwningPlayer(TLI),GetLocalPlayer())==true and TGI(GetLocalPlayer())==false thencall UnitSetUsesAltIcon(TLI,true)elsecall UnitSetUsesAltIcon(TLI,false)endifendifendifcall MCI(g)set g=nullendifset t=nullset TLI=nullreturn falseendfunctionfunction T64 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()call TriggerRegisterTimerEvent(t,0.1,true)call TriggerAddCondition(t,Condition(function T44))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(34),(0))call SaveBoolean(XY,(MKI),(674),(false))set t=nullset TLI=nullendfunctionfunction T74 takes nothing returns booleanif GetLearnedSkill()==1093677904 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093677904)==1 thencall T64()endifreturn falseendfunctionfunction JP1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function T74))set t=nullendfunctionfunction T84 takes nothing returns nothinglocal unit QHIif IsUnitInGroup(GetEnumUnit(),HK)==false thencall GroupAddUnit(HK,GetEnumUnit())set QHI=CreateUnit(GetOwningPlayer(GetEnumUnit()),1697656901,GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),0)call QTI(QHI,1093685833)call SetUnitAbilityLevel(QHI,1093685833,GetUnitAbilityLevel(HYI,1093685825))call IssueTargetOrder(QHI,"ensnare",GetEnumUnit())call TKI(HYI,GetEnumUnit(),1,100)endifset QHI=nullendfunctionfunction T94 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer ilocal group g=(LoadGroupHandle(XY,(MKI),(22)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local group C51=MDI()local unit R7I=(LoadUnitHandle(XY,(MKI),(221)))set CK=R7Iset HYI=R7Icall GroupEnumUnitsInRange(C51,x,y,300,Condition(function AT1))set HK=gcall ForGroup(C51,function T84)call MCI(C51)if GetTriggerEvalCount(t)>HWI*10 thenset i=1loopexitwhen i>16call DestroyEffect((LoadEffectHandle(XY,(MKI),(2700+i))))set i=i+1endloopcall MCI(g)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset g=nullset C51=nullset R7I=nullreturn falseendfunctionfunction TA4 takes nothing returns nothinglocal integer i=1local location l=GetSpellTargetLoc()local real TB4=GetLocationX(l)local real TC4=GetLocationY(l)local real xlocal real ylocal integer WG2=16local string fx="Abilities\\Spells\\Undead\\Graveyard\\GraveMarker.mdl"local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local group g=MDI()call QWI(EC,TB4,TC4)call TriggerRegisterTimerEvent(t,0.1,true)call TriggerAddCondition(t,Condition(function T94))call SaveGroupHandle(XY,(MKI),(22),(g))call SaveUnitHandle(XY,(MKI),(221),(GetTriggerUnit()))call SaveReal(XY,(MKI),(6),((TB4)*1.0))call SaveReal(XY,(MKI),(7),((TC4)*1.0))loopexitwhen i>WG2set x=TB4+HXI*Cos(i*360/WG2*bj_DEGTORAD)set y=TC4+HXI*Sin(i*360/WG2*bj_DEGTORAD)call SaveEffectHandle(XY,(MKI),(2700+i),(AddSpecialEffect(fx,x,y)))if i==1 or i==5 or i==9 or i==13 thenset x=TB4+275*Cos(i*360/WG2*bj_DEGTORAD)set y=TC4+275*Sin(i*360/WG2*bj_DEGTORAD)endifset i=i+1endloopset t=nullset g=nullendfunctionfunction TD4 takes nothing returns booleanif GetSpellAbilityId()==1093685825 thencall TA4()endifreturn falseendfunctionfunction MZ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function TD4))set t=nullendfunctionfunction TE4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit QHI=(LoadUnitHandle(XY,(MKI),(393)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local integer N5O=90local integer MFI=(LoadInteger(XY,(MKI),(34)))if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()==1093815618 thencall KillUnit(QHI)call MZI(t)call FlushChildHashtable(XY,(MKI))elseset MFI=MFI+1call SaveInteger(XY,(MKI),(34),(MFI))endifif NGI==1 thenset N5O=160elseif NGI==2 thenset N5O=120endifcall SetUnitX(QHI,GetUnitX(TLI))call SetUnitY(QHI,GetUnitY(TLI))if MFI>N5O thencall KillUnit(QHI)call MZI(t)call FlushChildHashtable(XY,(MKI))elseif MFI>30 thencall UnitRemoveAbility(QHI,1097625443)call ShowUnit(QHI,true)call QTI(QHI,1097625443)endifset t=nullset QHI=nullset TLI=nullreturn falseendfunctionfunction TF4 takes nothing returns nothingcall DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Items\\AIil\\AIilTarget.mdl",GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit())))call MPI(GetEnumUnit(),4406,1)call SetUnitPosition(GetEnumUnit(),QJ,UJ)call PanCameraToTimedForPlayer(GetOwningPlayer(GetEnumUnit()),QJ,UJ,0)call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Items\\AIil\\AIilTarget.mdl",GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit())))endfunctionfunction TG4 takes unit TLI,unit TMI returns nothinglocal group g=MDI()call DestroyEffect(AddSpecialEffect("Doodads\\Cinematic\\ShimmeringPortal\\ShimmeringPortal.mdl",GetUnitX(TLI),GetUnitY(TLI)))call DestroyEffect(AddSpecialEffect("Doodads\\Cinematic\\ShimmeringPortal\\ShimmeringPortal.mdl",GetUnitX(TMI),GetUnitY(TMI)))set QJ=GetUnitX(TMI)set UJ=GetUnitY(TMI)set CK=TLIcall GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),475,Condition(function BG1))call ForGroup(g,function TF4)call MCI(g)set g=nullendfunctionfunction TH4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))if GetTriggerEventId()==EVENT_UNIT_DEATH or TMI==null or QPI(TMI)thencall MZI(t)call FlushChildHashtable(XY,(MKI))call UnitRemoveType(TMI,UNIT_TYPE_PEON)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093685808,true)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093815618,false)call R1I(GetOwningPlayer(TLI),GetObjectName(1848652614))elseif TLI==null or QPI(TLI)thencall MZI(t)call FlushChildHashtable(XY,(MKI))call UnitRemoveType(TMI,UNIT_TYPE_PEON)call R1I(GetOwningPlayer(TLI),GetObjectName(1848652615))call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093685808,true)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093815618,false)elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT thenif GetSpellAbilityId()==1093815618 thencall MZI(t)call FlushChildHashtable(XY,(MKI))call UnitRemoveType(TMI,UNIT_TYPE_PEON)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093685808,true)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093815618,false)endifelsecall MZI(t)call FlushChildHashtable(XY,(MKI))call UnitRemoveType(TMI,UNIT_TYPE_PEON)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093685808,true)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093815618,false)call TG4(TLI,TMI)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction TZ4 takes nothing returns booleanlocal real dif IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))==false or GetUnitAbilityLevel(GetFilterUnit(),1093678162)>0 or GetOwningPlayer(GetFilterUnit())==Player(15)thenreturn falseendifif(QPI(GetFilterUnit()))thenreturn falseendifif IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)or(TJ>0 and OA2(GetFilterUnit()))thenset d=PAI(UJ,IK,GetUnitX(GetFilterUnit()),GetUnitY(GetFilterUnit()))if d<QJ thenset QJ=dset CK=GetFilterUnit()endifendifreturn falseendfunctionfunction TV4 takes unit TLI returns unitlocal location llocal group glocal real xlocal real yset l=GetSpellTargetLoc()set x=GetLocationX(l)set y=GetLocationY(l)set g=MDI()set TJ=GetUnitAbilityLevel(TLI,1093685808)set CK=nullset QJ=9999set UJ=xset IK=ycall GroupEnumUnitsInRange(g,x,y,4000,Condition(function TZ4))call MCI(g)call RemoveLocation(l)set l=nullset g=nullreturn CKendfunctionfunction TW4 takes unit TLI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TMI=GetSpellTargetUnit()local real xlocal real ylocal unit uif TMI==null thenset TMI=TV4(TLI)endifif TMI==null thencall R1I(GetOwningPlayer(TLI),GetObjectName(1848652616))returnendifcall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093685808,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093815618,true)call QTI(TLI,1093815618)call TriggerRegisterTimerEvent(t,6-GetUnitAbilityLevel(TLI,1093685808),false)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function TH4))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("war3mapImported\\DarkHands.mdl",TMI,"overhead")))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call UnitAddType(TMI,UNIT_TYPE_PEON)set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,.03,true)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function TE4))call SaveInteger(XY,(MKI),(5),(GetUnitAbilityLevel(TLI,1093685808)))call SaveUnitHandle(XY,(MKI),(2),(TLI))set u=CreateUnit(GetOwningPlayer(TLI),1747990840,GetUnitX(TLI),GetUnitY(TLI),0)call SaveUnitHandle(XY,(MKI),(393),(u))call ShowUnit(u,false)set t=nullset TMI=nullendfunctionfunction TX4 takes nothing returns nothinglocal unit TMI=GetSpellTargetUnit()local unit N0I=GetTriggerUnit()if TMI!=null thenif IsUnitAlly(TMI,GetOwningPlayer(N0I))==false thencall R6I(N0I)call R1I(GetOwningPlayer(N0I),GetObjectName(1848652849))elseif GetUnitAbilityLevel(N0I,1093685808)>0 and OA2(TMI)==false thencall R6I(N0I)call R1I(GetOwningPlayer(N0I),GetObjectName(1848652849))endifendifif TMI==null thenset TMI=TV4(N0I)endifif TMI==null thencall R6I(N0I)call R1I(GetOwningPlayer(N0I),GetObjectName(1848652848))endifset TMI=nullset N0I=nullendfunctionfunction TY4 takes nothing returns booleanif GetSpellAbilityId()==1093685808 thencall TX4()endifreturn falseendfunctionfunction TJ4 takes nothing returns booleanif GetSpellAbilityId()==1093685808 thencall TW4(GetTriggerUnit())endifreturn falseendfunctionfunction MG1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function TY4))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function TJ4))set t=nullcall IK1(1747990836)call IK1(1747990837)call IK1(1747990838)endfunctionfunction TK4 takes nothing returns nothingcall TKI(HKI,GetEnumUnit(),1,HJI)endfunctionfunction TL4 takes nothing returns nothingcall SetUnitState(GetEnumUnit(),UNIT_STATE_LIFE,GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)+HJI*0.5)endfunctionfunction TM4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local group g=MDI()local real r1=600local real r2=600local unit TN4set x=GetUnitX(N0I)set y=GetUnitY(N0I)call GroupEnumUnitsInRange(g,x,y,r1,Condition(function BS1))set TN4=FirstOfGroup(g)call MCI(g)if TN4==null thenif(LoadBoolean(XY,(MKI),(307)))==true and(LoadBoolean(XY,(MKI),(308)))==true thencall UnitRemoveAbility(N0I,1093810227)call FlushChildHashtable(XY,(MKI))call MZI(t)elseif(LoadBoolean(XY,(MKI),(307)))==false thencall SaveBoolean(XY,(MKI),(307),(true))elsecall SaveBoolean(XY,(MKI),(308),(true))endifendifelseset x=GetUnitX(TN4)set y=GetUnitY(TN4)call SaveBoolean(XY,(MKI),(307),(false))call SaveBoolean(XY,(MKI),(308),(false))call FlushChildHashtable(XY,(GetHandleId(TN4)))call DestroyEffect(AddSpecialEffect("war3mapImported\\CorpseExplosion.mdx",x,y))call RemoveUnit(TN4)set g=MDI()set CK=N0Iset HKI=N0Iset HJI=20*GetUnitAbilityLevel(N0I,1093810232)call GroupEnumUnitsInRange(g,x,y,r2,Condition(function AT1))call ForGroup(g,function TK4)set CK=N0Icall GroupEnumUnitsInRange(g,x,y,r2,Condition(function BC1))call ForGroup(g,function TL4)call MCI(g)endifset g=nullset N0I=nullset TN4=nullset t=nullreturn falseendfunctionfunction TS4 takes nothing returns nothinglocal real x=GetUnitX(GetTriggerUnit())local real y=GetUnitY(GetTriggerUnit())local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call QWI(QF,x,y)call TriggerRegisterTimerEvent(t,1.5,true)call TriggerAddCondition(t,Condition(function TM4))call QTI(GetTriggerUnit(),1093810227)call SaveUnitHandle(XY,(MKI),(14),(GetTriggerUnit()))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))call SaveBoolean(XY,(MKI),(307),(false))call SaveBoolean(XY,(MKI),(308),(false))set t=nullendfunctionfunction TT4 takes nothing returns booleanif GetSpellAbilityId()==1093810232 thencall TS4()endifreturn falseendfunctionfunction MH1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function TT4))set t=nullendfunctionfunction TR4 takes nothing returns nothingendfunctionfunction TP4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local group g=MDI()set CK=TLIset HLI=GetUnitAbilityLevel(TLI,1093677385)*10+10call GroupEnumUnitsInRange(g,GetUnitX(QHI),GetUnitY(QHI),475,Condition(function BC1))call ForGroup(g,function TR4)call MCI(g)if GetTriggerEvalCount(t)==5 thencall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset QHI=nullreturn falseendfunctionfunction TQ4 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local real x=GetSpellTargetX()local real y=GetSpellTargetY()local integer NGI=GetUnitAbilityLevel(TLI,1093677385)local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,x,y,0)call TriggerAddCondition(t,Condition(function TP4))call TriggerRegisterTimerEvent(t,1,true)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(19),(QHI))call QTI(QHI,1093809714)call SetUnitAbilityLevel(QHI,1093809714,NGI)call IssuePointOrder(QHI,"rainoffire",x,y)set TLI=nullset QHI=nullendfunctionfunction TU4 takes nothing returns booleanif GetSpellAbilityId()==1093677385 thencall TQ4()endifreturn falseendfunctionfunction MV1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function TU4))set t=nullendfunctionfunction R04 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=GetUnitAbilityLevel(TLI,1093809233)local integer W53local real RI4local real R14=3+NGIif GetTriggerEventId()==EVENT_WIDGET_DEATH or GetTriggerEvalCount(t)>4*R14 thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)call UnitRemoveAbility(TMI,1093809242)call UnitRemoveAbility(TMI,1093809456)call UnitRemoveAbility(TMI,1093809240)call UnitRemoveAbility(TMI,1093809457)call UnitRemoveAbility(TMI,1093809241)call UnitRemoveAbility(TMI,1110459720)elseset RI4=100*GetUnitState(TMI,UNIT_STATE_LIFE)/GetUnitState(TMI,UNIT_STATE_MAX_LIFE)if RI4<20 thenset W53=5elseif RI4<40 thenset W53=4elseif RI4<60 thenset W53=3elseif RI4<80 thenset W53=2elseset W53=1endifif W53==1 thenif GetUnitAbilityLevel(TMI,1093809242)==0 thencall UnitRemoveAbility(TMI,1093809456)call UnitRemoveAbility(TMI,1093809240)call UnitRemoveAbility(TMI,1093809457)call UnitRemoveAbility(TMI,1093809241)call UnitRemoveAbility(TMI,1110459720)call UnitAddAbility(TMI,1093809242)endifelseif W53==2 thenif GetUnitAbilityLevel(TMI,1093809456)==0 thencall UnitRemoveAbility(TMI,1093809242)call UnitRemoveAbility(TMI,1093809240)call UnitRemoveAbility(TMI,1093809457)call UnitRemoveAbility(TMI,1093809241)call UnitRemoveAbility(TMI,1110459720)call UnitAddAbility(TMI,1093809456)endifelseif W53==3 thenif GetUnitAbilityLevel(TMI,1093809240)==0 thencall UnitRemoveAbility(TMI,1093809242)call UnitRemoveAbility(TMI,1093809456)call UnitRemoveAbility(TMI,1093809457)call UnitRemoveAbility(TMI,1093809241)call UnitRemoveAbility(TMI,1110459720)call UnitAddAbility(TMI,1093809240)endifelseif W53==4 thenif GetUnitAbilityLevel(TMI,1093809457)==0 thencall UnitRemoveAbility(TMI,1093809242)call UnitRemoveAbility(TMI,1093809456)call UnitRemoveAbility(TMI,1093809240)call UnitRemoveAbility(TMI,1093809241)call UnitRemoveAbility(TMI,1110459720)call UnitAddAbility(TMI,1093809457)endifelseif W53==5 thenif GetUnitAbilityLevel(TMI,1093809241)==0 thencall UnitRemoveAbility(TMI,1093809242)call UnitRemoveAbility(TMI,1093809456)call UnitRemoveAbility(TMI,1093809240)call UnitRemoveAbility(TMI,1093809457)call UnitRemoveAbility(TMI,1110459720)call UnitAddAbility(TMI,1093809241)endifendifcall TKI(TLI,TMI,1,0.01*4*0.25*GetUnitState(TMI,UNIT_STATE_MAX_LIFE))if ModuloInteger(GetTriggerEvalCount(t),4)==0 thencall CreateCorpse(GetOwningPlayer(TLI),1969711215,GetUnitX(TMI),GetUnitY(TMI),0)endifendifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction RO4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093809233)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("effects\\EntanglingBonesTarget.mdx",TMI,"chest")))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call TriggerRegisterTimerEvent(t,0.25,true)call TriggerRegisterDeathEvent(t,TMI)call TriggerAddCondition(t,Condition(function R04))call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093809242,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093809456,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093809240,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093809457,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093809241,false)set TLI=nullset TMI=nullset t=nullendfunctionfunction R24 takes nothing returns booleanif GetSpellAbilityId()==1093809233 and MBI(GetSpellTargetUnit())==false thencall RO4()endifreturn falseendfunctionfunction MW1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function R24))set t=nullendfunctionfunction R34 takes unit TLI,integer R44 returns nothingcall SaveInteger(XY,(GetHandleId(TLI)),(687),(R44))call UnitRemoveAbility(TLI,1093809496)call UnitRemoveAbility(TLI,1093809497)call UnitRemoveAbility(TLI,1093809498)call UnitRemoveAbility(TLI,1093809492)call UnitRemoveAbility(TLI,1093809494)call UnitRemoveAbility(TLI,1093809493)call UnitRemoveAbility(TLI,1093809491)call UnitRemoveAbility(TLI,1093809490)call UnitRemoveAbility(TLI,1093809495)call UnitRemoveAbility(TLI,1093809712)call UnitRemoveAbility(TLI,1093809741)call UnitRemoveAbility(TLI,1093809740)call UnitRemoveAbility(TLI,1093809735)call UnitRemoveAbility(TLI,1093809736)call UnitRemoveAbility(TLI,1093809734)call UnitRemoveAbility(TLI,1093809733)call UnitRemoveAbility(TLI,1093809462)call UnitRemoveAbility(TLI,1093809737)call UnitRemoveAbility(TLI,1093809738)call UnitRemoveAbility(TLI,1093809739)call UnitRemoveAbility(TLI,1093809732)if R44==0 thencall UnitAddAbility(TLI,1093809741)endifif R44==1 thencall QTI(TLI,1093809496)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093809496,false)call UnitAddAbility(TLI,1093809740)elseif R44==2 thencall QTI(TLI,1093809497)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093809497,false)call UnitAddAbility(TLI,1093809735)elseif R44==3 thencall QTI(TLI,1093809498)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093809498,false)call UnitAddAbility(TLI,1093809736)elseif R44==4 thencall QTI(TLI,1093809492)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093809492,false)call UnitAddAbility(TLI,1093809734)elseif R44==5 thencall QTI(TLI,1093809494)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093809494,false)call UnitAddAbility(TLI,1093809733)elseif R44==6 thencall QTI(TLI,1093809493)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093809493,false)call UnitAddAbility(TLI,1093809462)elseif R44==7 thencall QTI(TLI,1093809491)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093809491,false)call UnitAddAbility(TLI,1093809737)elseif R44==8 thencall QTI(TLI,1093809490)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093809490,false)call UnitAddAbility(TLI,1093809738)elseif R44==9 thencall QTI(TLI,1093809495)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093809495,false)call UnitAddAbility(TLI,1093809739)elseif R44==10 thencall QTI(TLI,1093809712)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093809712,false)call UnitAddAbility(TLI,1093809732)endifendfunctionfunction R54 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer R44=(LoadInteger(XY,(GetHandleId(TLI)),(687)))local group glocal unit TN4local integer NGI=GetUnitAbilityLevel(TLI,1093809713)local integer R64=2+2*NGIif R44<R64 and QPI(TLI)==false thenset g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),925,Condition(function BS1))set TN4=FirstOfGroup(g)call MCI(g)if TN4!=null thenset R44=R44+1call R34(TLI,R44)call U6I((TN4),(TLI),1747993654,"CorpseCollector_FX_Nothing",400,false)call RemoveUnit(TN4)endifendifset t=nullset TLI=nullset TN4=nullreturn falseendfunctionfunction R74 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()call TriggerRegisterTimerEvent(t,4,true)call TriggerAddCondition(t,Condition(function R54))call SaveUnitHandle(XY,(MKI),(2),(TLI))set t=nullset TLI=nullendfunctionfunction R84 takes nothing returns nothingcall TKI(HMI,GetEnumUnit(),1,HNI)endfunctionfunction R94 takes unit TLI,integer NGI,real P6I,real P7I,integer R44,boolean BC2 returns nothinglocal group g=MDI()set HMI=TLIset HNI=30*R44if BC2 thenset HNI=HNI+10*R44endifset CK=TLIcall GroupEnumUnitsInRange(g,P6I,P7I,350,Condition(function AT1))call ForGroup(g,function R84)call MCI(g)endfunctionfunction RA4 takes unit TLI,real PO2,real P22 returns booleanlocal real P6I=(LoadReal(XY,(GetHandleId(TLI)),(690)))local real P7I=(LoadReal(XY,(GetHandleId(TLI)),(691)))if P6I==0 and P7I==0 thenreturn falseendifif PAI(PO2,P22,P6I,P7I)<425 thenreturn trueendifreturn falseendfunctionfunction RB4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer R44=(LoadInteger(XY,(MKI),(34)))local integer NGI=GetUnitAbilityLevel(TLI,1093809713)local integer i=1local unit QHIlocal real P6I=(LoadReal(XY,(MKI),(47)))local real P7I=(LoadReal(XY,(MKI),(48)))local real xlocal real ylocal real a=(LoadReal(XY,(MKI),(137)))local boolean BC2=(LoadBoolean(XY,(MKI),(688)))local boolean RC4=(LoadBoolean(XY,(MKI),(689)))local real RD4=(LoadReal(XY,(MKI),(549)))local real RE4=(LoadReal(XY,(MKI),(567)))set RD4=RCI(RD4+10*Cos(a))set RE4=RGI(RE4+10*Sin(a))call SaveReal(XY,(MKI),(549),((RD4)*1.0))call SaveReal(XY,(MKI),(567),((RE4)*1.0))if BC2==false thenset BC2=RA4(TLI,RD4,RE4)if BC2==true thencall SaveBoolean(XY,(MKI),(688),(BC2))endifendifif BC2 and RC4==false thenset RC4=truecall SaveBoolean(XY,(MKI),(689),(RC4))loopexitwhen i>R44set QHI=(LoadUnitHandle(XY,(MKI),(393+i)))call SaveEffectHandle(XY,(MKI),(609+i),(AddSpecialEffectTarget("war3mapImported\\CorpseFire.mdx",QHI,"origin")))set i=i+1endloopendifset i=1if PAI(RD4,RE4,P6I,P7I)<15 thenloopexitwhen i>R44if BC2 thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(609+i))))endifcall KillUnit((LoadUnitHandle(XY,(MKI),(393+i))))set i=i+1endloopcall FlushChildHashtable(XY,(MKI))call MZI(t)call R94(TLI,NGI,P6I,P7I,R44,BC2)elseloopexitwhen i>R44set QHI=(LoadUnitHandle(XY,(MKI),(393+i)))set x=(LoadReal(XY,(MKI),(549+i)))set y=(LoadReal(XY,(MKI),(567+i)))set x=RCI(x+10*Cos(a))set y=RGI(y+10*Sin(a))call SaveReal(XY,(MKI),(549+i),((x)*1.0))call SaveReal(XY,(MKI),(567+i),((y)*1.0))call SetUnitX(QHI,x)call SetUnitY(QHI,y)set i=i+1endloopendifset t=nullset QHI=nullset TLI=nullreturn falseendfunctionfunction RF4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local real P6I=GetSpellTargetX()local real P7I=GetSpellTargetY()local integer NGI=GetUnitAbilityLevel(TLI,1093809713)local integer R44=(LoadInteger(XY,(GetHandleId(TLI)),(687)))local integer i=1local unit QHIlocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)local real a=PUI(GetUnitX(TLI),GetUnitY(TLI),P6I,P7I)*bj_DEGTORADcall SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(34),(R44))call SaveReal(XY,(MKI),(47),((P6I)*1.0))call SaveReal(XY,(MKI),(48),((P7I)*1.0))call SaveReal(XY,(MKI),(137),((a)*1.0))call SaveReal(XY,(MKI),(549),((x)*1.0))call SaveReal(XY,(MKI),(567),((y)*1.0))call SaveBoolean(XY,(MKI),(688),(false))call SaveBoolean(XY,(MKI),(689),(false))loopexitwhen i>R44set QHI=CreateUnit(GetOwningPlayer(TLI),1747993655,x+GetRandomInt(-200,200),y+GetRandomInt(-200,200),0)call SaveUnitHandle(XY,(MKI),(393+i),(QHI))call SaveReal(XY,(MKI),(549+i),((GetUnitX(QHI))*1.0))call SaveReal(XY,(MKI),(567+i),((GetUnitY(QHI))*1.0))set i=i+1endloopcall TriggerRegisterTimerEvent(t,0.02,true)call TriggerAddCondition(t,Condition(function RB4))call R34(TLI,0)set TLI=nullset t=nullset QHI=nullendfunctionfunction RG4 takes nothing returns booleanif GetSpellAbilityId()==1093809713 thencall RF4()endifreturn falseendfunctionfunction RH4 takes nothing returns booleanif GetLearnedSkill()==1093809713 and GetUnitAbilityLevel(GetTriggerUnit(),1093809713)==1 and IsUnitIllusion(GetTriggerUnit())==false thencall R74()endifreturn falseendfunctionfunction MX1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function RG4))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function RH4))set t=nullendfunctionfunction RZ4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local unit GF4if GetTriggerEventId()==EVENT_UNIT_SPELL_FINISH thencall FlushChildHashtable(XY,(MKI))call MZI(t)call KillUnit(QHI)call UnitApplyTimedLife(QHI,1112820806,0.1)elseif QPI(QHI)thencall FlushChildHashtable(XY,(MKI))call MZI(t)elsecall SaveReal(XY,(MKI),(6),((GetUnitX(QHI))*1.0))call SaveReal(XY,(MKI),(7),((GetUnitY(QHI))*1.0))if x!=GetUnitX(QHI)or y!=GetUnitY(QHI)thencall UnitRemoveAbility(QHI,1093815348)elsecall UnitAddAbility(QHI,1093815348)endifendifreturn falseendfunctionfunction RV4 takes nothing returns booleanreturn GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(HSI)and GetUnitTypeId(GetFilterUnit())==1966092633endfunctionfunction RW4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit QHI=CreateUnit(GetOwningPlayer(TLI),1966092633,GetUnitX(TLI)+100,GetUnitY(TLI)+100,0)local group glocal integer NGI=GetUnitAbilityLevel(TLI,1093815350)local real F21local unit RX4local unit RY4call TriggerRegisterUnitEvent(t,QHI,EVENT_UNIT_SPELL_FINISH)call TriggerRegisterTimerEvent(t,0.1,true)call TriggerAddCondition(t,Condition(function RZ4))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveReal(XY,(MKI),(6),((GetUnitX(QHI))*1.0))call SaveReal(XY,(MKI),(7),((GetUnitY(QHI))*1.0))call UnitAddAbility(QHI,1093815348)call SetUnitAbilityLevel(QHI,1093815349,GetUnitAbilityLevel(TLI,1093815350))call SaveReal(XY,(GetHandleId(QHI)),(34),(((TimerGetElapsed(M)))*1.0))set HSI=TLIset g=MDI()call GroupEnumUnitsInRange(g,0,0,99999,Condition(function RV4))if CountUnitsInGroup(g)>NGI+1 thenset RY4=FirstOfGroup(g)set F21=(LoadReal(XY,(GetHandleId(RY4)),(34)))set RX4=RY4call GroupRemoveUnit(g,RY4)loopexitwhen RY4==nullif F21>(LoadReal(XY,(GetHandleId(RY4)),(34)))thenset F21=(LoadReal(XY,(GetHandleId(RY4)),(34)))set RX4=RY4endifset RY4=FirstOfGroup(g)call GroupRemoveUnit(g,RY4)endloopcall KillUnit(RX4)endifcall MCI(g)set g=nullset QHI=nullset TLI=nullset t=nullendfunctionfunction RJ4 takes nothing returns booleanif GetSpellAbilityId()==1093815350 thencall RW4()endifreturn falseendfunctionfunction MY1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function RJ4))endfunctionfunction RK4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer BC2=(LoadInteger(XY,(MKI),(34)))call SaveInteger(XY,(GetHandleId(TLI)),(783),((LoadInteger(XY,(GetHandleId(TLI)),(783)))-BC2))call FlushChildHashtable(XY,(MKI))call MZI(t)set TLI=nullset t=nullreturn falseendfunctionfunction RL4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit QK1=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(TLI,1095328612)local integer BC2local integer CH1if IsUnitInRange(TLI,QK1,900+25)and QPI(TLI)==false and IsUnitAlly(TLI,GetOwningPlayer(QK1))==false and GetUnitTypeId(QK1)!=1848657461 and IsUnitIllusion(QK1)==false and HK1(GetUnitTypeId(QK1))==false and GetUnitAbilityLevel(QK1,1093678162)==0 thenset CH1=(LoadInteger(XY,(GetHandleId(TLI)),(783)))if IsUnitType(QK1,UNIT_TYPE_HERO)==true thenset BC2=30elseset BC2=5endifset CH1=CH1+BC2call SaveInteger(XY,(GetHandleId(TLI)),(783),(CH1))set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,25+NGI*5,false)call TriggerRegisterDeathEvent(t,TLI)call TriggerAddCondition(t,Condition(function RK4))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(34),(BC2))endifset t=nullset TLI=nullset QK1=nullreturn falseendfunctionfunction RM4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer CH1=(LoadInteger(XY,(GetHandleId(TLI)),(783)))local integer RJ3=(LoadInteger(XY,(MKI),(238)))if RJ3!=CH1 thencall EW1(TLI,CH1)call SaveInteger(XY,(MKI),(238),(CH1))endifset t=nullset TLI=nullreturn falseendfunctionfunction RN4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call Q9I(t,EVENT_PLAYER_UNIT_DEATH)call TriggerAddCondition(t,Condition(function RL4))call SaveUnitHandle(XY,(MKI),(2),(TLI))set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.25,true)call TriggerAddCondition(t,Condition(function RM4))call SaveUnitHandle(XY,(MKI),(2),(TLI))set TLI=nullset t=nullendfunctionfunction RS4 takes nothing returns booleanif GetLearnedSkill()==1095328612 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1095328612)==1 thencall RN4()endifreturn falseendfunctionfunction MJ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function RS4))set t=nullendfunctionfunction RT4 takes nothing returns booleanreturn GetUnitAbilityLevel(GetTriggerUnit(),1093678667)>0endfunctionfunction RR4 takes nothing returns nothingif(GetIssuedOrderId()==String2OrderIdBJ("immolation"))thencall QTI(GetTriggerUnit(),1093681498)endifif(GetIssuedOrderId()==String2OrderIdBJ("unimmolation"))thencall UnitRemoveAbility(GetTriggerUnit(),1093681498)endifendfunctionfunction K01 takes nothing returns nothinglocal trigger t=CreateTrigger()call QBI(t,EVENT_PLAYER_UNIT_ISSUED_ORDER)call TriggerAddCondition(t,Condition(function RT4))call TriggerAddAction(t,function RR4)endfunctionfunction RP4 takes nothing returns nothinglocal integer MKI=GetHandleId(GetEnumUnit())if GetTriggerUnit()!=GetEnumUnit()thencall SaveInteger(XY,(MKI),(672),((LoadInteger(XY,(MKI),(672)))+1))endifendfunctionfunction RQ4 takes nothing returns booleanreturn GetUnitTypeId(GetFilterUnit())==1429221446 and IsUnitIllusion(GetFilterUnit())==false and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))==trueendfunctionfunction RU4 takes nothing returns booleanlocal group gif IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==true and HK1(GetUnitTypeId(GetTriggerUnit()))==false and IsUnitIllusion(GetTriggerUnit())==false thenset g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),475,Condition(function RQ4))if GetUnitTypeId(GetKillingUnit())==1429221446 thencall GroupAddUnit(g,GetKillingUnit())endifcall ForGroup(g,function RP4)call MCI(g)set g=nullendifreturn falseendfunctionfunction P04 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if GetTriggerEvalCount(t)==1 thencall ShowUnit(TLI,false)elseif GetTriggerEvalCount(t)>80 thencall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullreturn falseendfunctionfunction PI4 takes nothing returns booleanlocal unit QHIlocal unit TLIlocal unit QK1local trigger tlocal integer MKIif GetUnitTypeId(GetTriggerUnit())==1429221446 thenset TLI=GetTriggerUnit()set QK1=GetKillingUnit()if TLI==QK1 thenset QHI=CreateUnit(GetOwningPlayer(TLI),1747993154,GetUnitX(TLI),GetUnitY(TLI),GetUnitFacing(TLI))call SetUnitTimeScale(QHI,0.75)call UnitApplyTimedLife(QHI,1112820806,1.0)call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Undead\\UndeadBlood\\UndeadBloodAbomination.mdl",QHI,"origin"))set QHI=nullcall SetSoundPosition(PE,GetUnitX(TLI),GetUnitY(TLI),50)call SetSoundVolumeBJ(PE,100)call PlaySoundBJ(PE)call SetSoundPosition(UE,GetUnitX(TLI),GetUnitY(TLI),50)call SetSoundVolumeBJ(UE,100)call PlaySoundBJ(UE)set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,.1,true)call TriggerAddCondition(t,Condition(function P04))call SaveUnitHandle(XY,(MKI),(2),(TLI))set t=nullendifset TLI=nullset QK1=nullendifreturn falseendfunctionfunction P14 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local unit TLI=(LoadUnitHandle(XY,(GetHandleId(t)),(2)))local integer MKI=GetHandleId(TLI)local integer PO4=(LoadInteger(XY,(MKI),(672)))local integer P24=(LoadInteger(XY,(MKI),(673)))local integer NGI=GetUnitAbilityLevel(TLI,1093678660)local integer P34=R2I(I2R(PO4)*(0.5+0.5*NGI))if P34>P24 thencall ModifyHeroStat(0,TLI,0,P34-P24)call SaveInteger(XY,(MKI),(673),(P34))call Q5I("+"+I2S(P34-P24)+" "+GetObjectName(1848659274),3,TLI,0.023,0,255,0,230)endifset t=nullset TLI=nullreturn falseendfunctionfunction P44 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.5,true)call TriggerAddCondition(t,Condition(function P14))call SaveUnitHandle(XY,(MKI),(2),(TLI))set TLI=nullset t=nullendfunctionfunction P54 takes nothing returns booleanif GetLearnedSkill()==1093678660 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093678660)==1 thencall P44()endifreturn falseendfunctionfunction P64 takes nothing returns booleanif GetUnitTypeId(K1[GetPlayerId(GetTriggerPlayer())])==1429221446 thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10.00,GetObjectName(1848654162)+" "+I2S((LoadInteger(XY,(GetHandleId(K1[GetPlayerId(GetTriggerPlayer())])),(673))))+" "+GetObjectName(1848654163))endifreturn falseendfunctionfunction KI1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function P54))set t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,BO[1],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[1],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-st",true)call TriggerAddCondition(t,Condition(function P64))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_DEATH)call TriggerAddCondition(t,Condition(function PI4))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_DEATH)call TriggerAddCondition(t,Condition(function RU4))set t=nullendfunctionfunction P74 takes unit TLI,unit TMI returns nothinglocal unit QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)local unit GF4=CreateUnit(GetOwningPlayer(TLI),1697657409,GetUnitX(TMI),GetUnitY(TMI),0)call QTI(QHI,1093685338)call IssueTargetOrder(QHI,"thunderbolt",TMI)call UnitApplyTimedLife(QHI,1112820806,1)call UnitApplyTimedLife(GF4,1112820806,1)set QHI=nullset GF4=nullendfunctionfunction P84 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer P94=(LoadInteger(XY,(MKI),(376)))local boolean PA4=(LoadBoolean(XY,(MKI),(377)))local unit TMIlocal unit PB4=(LoadUnitHandle(XY,(MKI),(2100+P94)))if PA4 thenset TMI=(LoadUnitHandle(XY,(MKI),(17)))call SetUnitX(TMI,GetUnitX(PB4))call SetUnitY(TMI,GetUnitY(PB4))endifcall RemoveUnit(PB4)set P94=P94-1call SaveInteger(XY,(MKI),(376),(P94))if P94==0 thencall FlushChildHashtable(XY,(MKI))call MZI(t)if IsUnitInRegion(YN,TMI)thencall OJ1(TMI)endifendifset t=nullset TMI=nullreturn falseendfunctionfunction PC4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer P94=(LoadInteger(XY,(MKI),(376)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local real NN2=(LoadReal(XY,(MKI),(13)))local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local trigger OX3=(LoadTriggerHandle(XY,(MKI),(11)))local integer OZ3=GetHandleId(OX3)local group glocal unit ulocal real xlocal real ylocal real zif P94<10+5*NGI thenset P94=P94+1call SaveInteger(XY,(MKI),(376),(P94))set x=GetUnitX(N0I)+P94*40*Cos(NN2*bj_DEGTORAD)set y=GetUnitY(N0I)+P94*40*Sin(NN2*bj_DEGTORAD)call SaveUnitHandle(XY,(OZ3),(2100+P94),(CreateUnit(GetOwningPlayer(N0I),1966092360,x,y,NN2)))set g=MDI()call GroupEnumUnitsInRange(g,x,y,125,Condition(function BY1))call GroupRemoveUnit(g,N0I)set u=GroupPickRandomUnit(g)call MCI(g)if u!=null thencall FlushChildHashtable(XY,(MKI))call MZI(t)call TriggerRegisterTimerEvent(OX3,0.03,true)call TriggerAddCondition(OX3,Condition(function P84))call SaveInteger(XY,(OZ3),(376),(P94))call SaveBoolean(XY,(OZ3),(377),(true))call SaveUnitHandle(XY,(OZ3),(17),(u))if IsUnitEnemy(u,GetOwningPlayer(N0I))thenif IsUnitType(u,UNIT_TYPE_HERO)==true thencall E71("HA_Hits"+I2S(GetPlayerId(GetOwningPlayer(N0I))),HTI[GetPlayerId(GetOwningPlayer(N0I))])set HTI[GetPlayerId(GetOwningPlayer(N0I))]=HTI[GetPlayerId(GetOwningPlayer(N0I))]+1call MPI(N0I,4400,1.5)endifset HRI[GetPlayerId(GetOwningPlayer(N0I))]=HRI[GetPlayerId(GetOwningPlayer(N0I))]+1call E71("HA_Total"+I2S(GetPlayerId(GetOwningPlayer(N0I))),HRI[GetPlayerId(GetOwningPlayer(N0I))])call P74(N0I,u)call TKI(N0I,u,3,90*NGI)call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",u,"origin"))endifendifelsecall FlushChildHashtable(XY,(MKI))call MZI(t)set HRI[GetPlayerId(GetOwningPlayer(N0I))]=HRI[GetPlayerId(GetOwningPlayer(N0I))]+1call TriggerRegisterTimerEvent(OX3,0.03,true)call TriggerAddCondition(OX3,Condition(function P84))call SaveInteger(XY,(OZ3),(376),(P94))call SaveBoolean(XY,(OZ3),(377),(false))endifset t=nullset N0I=nullset OX3=nullset g=nullset u=nullreturn falseendfunctionfunction PD4 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local location l=GetSpellTargetLoc()local real NN2=PUI(GetUnitX(N0I),GetUnitY(N0I),GetLocationX(l),GetLocationY(l))local integer NGI=GetUnitAbilityLevel(N0I,1093678665)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveInteger(XY,(MKI),(5),(NGI))call SaveReal(XY,(MKI),(13),((NN2)*1.0))call SaveInteger(XY,(MKI),(376),(0))call SaveTriggerHandle(XY,(MKI),(11),(CreateTrigger()))call TriggerRegisterTimerEvent(t,0.03,true)call TriggerAddCondition(t,Condition(function PC4))call RemoveLocation(l)set N0I=nullset l=nullset t=nullendfunctionfunction PE4 takes nothing returns booleanif GetSpellAbilityId()==1093678665 thencall PD4()endifreturn falseendfunctionfunction PF4 takes nothing returns booleanlocal integer VF3=HTI[GetPlayerId(GetTriggerPlayer())]local integer P1I=HRI[GetPlayerId(GetTriggerPlayer())]if GetUnitTypeId(K1[GetPlayerId(GetTriggerPlayer())])==1429221446 and P1I>0 thencall DisplayTimedTextToPlayer(GetTriggerPlayer(),0,U2,10.00,GetObjectName(1848657228)+" "+R2S(I2R(VF3)/I2R(P1I)*100)+"% ("+I2S(VF3)+"/"+I2S(P1I)+")")endifreturn falseendfunctionfunction K11 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function PE4))set t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,BO[1],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-stats",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-stats",true)call TriggerRegisterPlayerChatEvent(t,BO[1],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[2],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[3],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[4],"-st",true)call TriggerRegisterPlayerChatEvent(t,BO[5],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[1],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[2],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[3],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[4],"-st",true)call TriggerRegisterPlayerChatEvent(t,CO[5],"-st",true)call TriggerAddCondition(t,Condition(function PF4))set t=nullendfunctionfunction PG4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local real TSI=(25+50*NGI)+(1.0)*GetHeroStr(TLI,true)local integer MFI=(LoadInteger(XY,(MKI),(34)))if GetTriggerEventId()==EVENT_UNIT_DEATH or GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST thenif GetTriggerEventId()==EVENT_UNIT_DEATH or(GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST and GetSpellAbilityId()==1093747544)thencall FlushChildHashtable(XY,(MKI))call MZI(t)endifelseif GetTriggerEvalCount(t)>4 thencall FlushChildHashtable(XY,(MKI))call MZI(t)call R6I(TLI)elseif NGI>0 thenset MFI=MFI+1if(MFI<4 and IsUnitType(TMI,UNIT_TYPE_HERO)==true)or(MFI<8 and IsUnitType(TMI,UNIT_TYPE_HERO)==false)thencall SetUnitState(TLI,UNIT_STATE_LIFE,GetUnitState(TLI,UNIT_STATE_LIFE)+TSI)call TKI(TLI,TMI,1,TSI)endifcall SaveInteger(XY,(MKI),(34),(MFI))endifendifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction PH4 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093747544)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_ENDCAST)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function PG4))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveInteger(XY,(MKI),(34),(0))call TriggerEvaluate(t)set t=nullset TLI=nullset TMI=nullendfunctionfunction PZ4 takes nothing returns booleanif GetSpellAbilityId()==1093747544 and MBI(GetSpellTargetUnit())==false thencall PH4()endifreturn falseendfunctionfunction KO1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function PZ4))set t=nullendfunctionfunction PV4 takes nothing returns booleanif(GetUnitTypeId(GetSummonedUnit())==1865429068)thenreturn trueendifif(GetUnitTypeId(GetSummonedUnit())==1865429069)thenreturn trueendifif(GetUnitTypeId(GetSummonedUnit())==1865429070)thenreturn trueendifif(GetUnitTypeId(GetSummonedUnit())==1865429071)thenreturn trueendifreturn falseendfunctionfunction PW4 takes unit N3I,real TSI returns nothinglocal real P1I=GetUnitState(N3I,UNIT_STATE_MAX_LIFE)local real POI=GetUnitState(N3I,UNIT_STATE_LIFE)if TSI>0 thenif TSI>(P1I-POI)thenif TSI>=POI thencall SetUnitState(N3I,UNIT_STATE_LIFE,P1I)call P0I(N3I,TSI-(P1I-POI))elsecall P0I(N3I,TSI)endifelsecall SetUnitState(N3I,UNIT_STATE_LIFE,GetUnitState(N3I,UNIT_STATE_LIFE)+TSI)endifendifendfunctionfunction PX4 takes nothing returns nothingendfunctionfunction PY4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local group gif GetTriggerEventId()==EVENT_WIDGET_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif IsUnitType(GetEventDamageSource(),UNIT_TYPE_HERO)==true thencall PW4(QHI,GetEventDamage()-1)elsecall PW4(QHI,GetEventDamage()-0.25)endifelseset g=MDI()set CK=QHIcall GroupEnumUnitsInRange(g,GetUnitX(QHI),GetUnitY(QHI),400+300*4+25,Condition(function AT1))call ForGroup(g,function PX4)call MCI(g)set g=nullendifset t=nullset QHI=nullreturn falseendfunctionfunction PJ4 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit QHI=GetSummonedUnit()call TriggerRegisterDeathEvent(t,QHI)call TriggerRegisterTimerEvent(t,1,true)call TriggerRegisterUnitEvent(t,QHI,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function PY4))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveInteger(XY,(MKI),(5),(GetUnitAbilityLevel(GetSummoningUnit(),1093679428)))call SetUnitAbilityLevelSwapped(1093679188,GetSummonedUnit(),GetUnitAbilityLevelSwapped(1093679428,GetSummoningUnit()))call SetUnitAbilityLevelSwapped(1093681990,GetSummonedUnit(),GetUnitAbilityLevelSwapped(1093679428,GetSummoningUnit()))call IssueImmediateOrder(GetSummonedUnit(),"manaflareon")endfunctionfunction NW takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SUMMON)call TriggerAddCondition(t,Condition(function PV4))call TriggerAddAction(t,function PJ4)endfunctionfunction PK4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))if GetTriggerEventId()!=EVENT_UNIT_DAMAGED thencall FlushChildHashtable(XY,(MKI))call MZI(t)elsecall DisableTrigger(t)if IsUnitAlly(TLI,GetOwningPlayer(TMI))==true thencall PII(TMI,GetEventDamage()*0.107)elsecall TKI(GetEventDamageSource(),TMI,1,GetEventDamage()*0.071/1.4)endifcall EnableTrigger(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction PL4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))call SetUnitVertexColor(TMI,255,255,255,255)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TMI=nullreturn falseendfunctionfunction PM4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)local integer NGI=GetUnitAbilityLevel(TLI,1093817412)local trigger tlocal integer MKIcall UnitAddAbility(QHI,1093681989)call SetUnitAbilityLevel(QHI,1093681989,NGI)call IssueTargetOrder(QHI,"banish",TMI)if GetUnitTypeId(TMI)==1848657482 or GetUnitTypeId(TMI)==1848657481 or GetUnitTypeId(TMI)==1848657462 or GetUnitTypeId(TMI)==1848657480 thenset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,1.5+0.5*NGI,false)call TriggerRegisterDeathEvent(t,TMI)call TriggerAddCondition(t,Condition(function PL4))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SetUnitVertexColor(TMI,50,255,50,150)call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffect("Abilities\\Spells\\Undead\\Cripple\\CrippleTarget.mdl",GetUnitX(TMI),GetUnitY(TMI))))set t=nullendifset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,1.5+0.5*NGI,false)call TriggerAddCondition(t,Condition(function PK4))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))set TLI=nullset TMI=nullset QHI=nullendfunctionfunction PN4 takes nothing returns booleanif GetSpellAbilityId()==1093817412 thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_CAST thenif(IsUnitType(GetSpellTargetUnit(),UNIT_TYPE_STRUCTURE)==false and T6I(GetSpellTargetUnit())==false)or GetUnitTypeId(GetSpellTargetUnit())==1848657482 or GetUnitTypeId(GetSpellTargetUnit())==1848657481 or GetUnitTypeId(GetSpellTargetUnit())==1848657462 or GetUnitTypeId(GetSpellTargetUnit())==1848657480 thenelsecall R6I(GetTriggerUnit())call R1I(GetOwningPlayer(GetTriggerUnit()),GetObjectName(1848658745))endifelsecall PM4()endifendifreturn falseendfunctionfunction K21 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function PN4))set t=nullendfunctionfunction PS4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=GetUnitAbilityLevel(TLI,1093681987)local real EJ3=80+40*NGIif NGI==0 thenset NGI=GetUnitAbilityLevel(TLI,1093677658)set EJ3=120+60*NGIendifset EJ3=EJ3*0.25if GetUnitAbilityLevel(TLI,1113875308)==0 or(GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST and(GetSpellAbilityId()==1093681987 or GetSpellAbilityId()==1093677658))thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEventId()!=EVENT_UNIT_SPELL_ENDCAST thenif GetUnitState(TLI,UNIT_STATE_LIFE)+EJ3>=GetUnitState(TLI,UNIT_STATE_MAX_LIFE)thencall SetUnitState(TLI,UNIT_STATE_MANA,GetUnitState(TLI,UNIT_STATE_MANA)+EJ3+GetUnitState(TLI,UNIT_STATE_LIFE)-GetUnitState(TLI,UNIT_STATE_MAX_LIFE))endifendifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction PT4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.25,true)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_ENDCAST)call TriggerAddCondition(t,Condition(function PS4))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))set TLI=nullset TMI=nullset t=nullendfunctionfunction PR4 takes nothing returns booleanif(GetSpellAbilityId()==1093681987 or GetSpellAbilityId()==1093677658)and IsUnitType(GetSpellTargetUnit(),UNIT_TYPE_HERO)thencall PT4()endifreturn falseendfunctionfunction K31 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function PR4))set t=nullendfunctionfunction PP4 takes unit TLI,unit TMI returns nothinglocal real PQ4=20+40*HQIlocal real PU4=70+30*HQIlocal real C11=(PQ4+PU4*Z0I/700)*0.5call TKI(TLI,TMI,1,C11)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\ChimaeraLightningMissile\\ChimaeraLightningMissile.mdl",TMI,"chest"))endfunctionfunction Q04 takes nothing returns nothinglocal unit TMI=GetEnumUnit()local group WVO=HPIlocal unit TLI=HUIif IsUnitInGroup(TMI,WVO)==false thencall GroupAddUnit(WVO,TMI)call PP4(TLI,TMI)endifset TMI=nullset WVO=nullset TLI=nullendfunctionfunction QI4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local group WVO=(LoadGroupHandle(XY,(MKI),(133)))local effect fxlocal integer MFI=GetTriggerEvalCount(t)local real xlocal real x0=GetUnitX(TLI)local real ylocal real y0=GetUnitY(TLI)local integer ilocal integer dlocal group g=MDI()call SetUnitX(QHI,GetUnitX(TLI))call SetUnitY(QHI,GetUnitY(TLI))set HPI=WVOset HUI=TLIset HQI=GetUnitAbilityLevel(TLI,1093748023)if MFI>20 thenset d=21*36+(20-MFI)*36set Z0I=dset i=0loopexitwhen i>36set x=x0+d*Cos(360*i/36*bj_DEGTORAD)set y=y0+d*Sin(360*i/36*bj_DEGTORAD)set CK=TLIcall GroupEnumUnitsInRange(g,x,y,100,Condition(function BO1))call ForGroup(g,function Q04)set i=i+1endloopelseset d=MFI*36set Z0I=dset i=0loopexitwhen i>36set x=x0+d*Cos(360*i/36*bj_DEGTORAD)set y=y0+d*Sin(360*i/36*bj_DEGTORAD)set CK=TLIcall GroupEnumUnitsInRange(g,x,y,100,Condition(function BO1))call ForGroup(g,function Q04)set i=i+1endloopendifcall MCI(g)if MFI==40 thencall KillUnit(QHI)call MCI(WVO)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)elseif MFI==20 thencall GroupClear(WVO)set fx=nullendifset t=nullset QHI=nullset WVO=nullset TLI=nullset g=nullreturn falseendfunctionfunction Q14 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local real x=GetUnitX(N0I)local real y=GetUnitY(N0I)local unit QHI=CreateUnit(GetOwningPlayer(N0I),1747990834,x,y,0)local integer i=0local integer GC2=36local group WVO=MDI()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("effects\\Lightning_Ball_Tail_FX.mdx",N0I,"origin")))call SaveGroupHandle(XY,(MKI),(133),(WVO))call SaveUnitHandle(XY,(MKI),(2),(N0I))call SaveUnitHandle(XY,(MKI),(19),(QHI))call TriggerRegisterTimerEvent(t,0.06,true)call TriggerAddCondition(t,Condition(function QI4))set t=nullset QHI=nullset N0I=nullendfunctionfunction QO4 takes nothing returns booleanif GetSpellAbilityId()==1093748023 thencall Q14()endifreturn falseendfunctionfunction M41 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function QO4))set t=nullendfunctionfunction Q24 takes integer Q34 returns booleanreturn Q34!=1093679446 and Q34!=1093677622 and Q34!=1093684314 and Q34!=1093685582 and Q34!=1093685065 and Q34!=1093682265 and Q34!=1093752642 and Q34!=1095263841endfunctionfunction Q44 takes unit SKI,unit TLI,unit TMI,integer NGI returns nothinglocal unit QHI=CreateUnit(GetOwningPlayer(SKI),1697656901,GetUnitX(TLI),GetUnitY(TLI),0)call QTI(QHI,1093747019)call SetUnitAbilityLevel(QHI,1093747019,NGI)call IssueTargetOrder(QHI,"chainlightning",TMI)call QTI(QHI,1093744708)call SetUnitAbilityLevel(QHI,1093744708,NGI)call IssueTargetOrder(QHI,"purge",TMI)set QHI=nullendfunctionfunction Q54 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer NGIif GetSpellTargetUnit()==TLI and Q24(GetSpellAbilityId())==true and IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(TLI))==false and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==true thenset NGI=GetUnitAbilityLevel(TLI,1093748022)call Q44(TLI,TLI,GetTriggerUnit(),NGI)endifset t=nullset TLI=nullreturn falseendfunctionfunction Q64 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function Q54))call SaveUnitHandle(XY,(MKI),(2),(TLI))set TLI=nullset t=nullendfunctionfunction Q74 takes nothing returns booleanif GetLearnedSkill()==1093748022 and GetUnitAbilityLevel(GetTriggerUnit(),1093748022)==1 and IsUnitIllusion(GetTriggerUnit())==false thencall Q64()endifreturn falseendfunctionfunction M51 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function Q74))set t=nullendfunctionfunction Q84 takes unit u,integer d returns nothinglocal integer array blocal integer a=dlocal integer c=1local integer i=0local integer DG1if d<1 thencall UnitRemoveAbility(u,ZII[0])call UnitRemoveAbility(u,ZII[1])call UnitRemoveAbility(u,ZII[2])call UnitRemoveAbility(u,ZII[3])call UnitRemoveAbility(u,ZII[4])call UnitRemoveAbility(u,ZII[5])call UnitRemoveAbility(u,ZII[6])call UnitRemoveAbility(u,ZII[7])returnendifloopexitwhen c==0set c=a/2set b[i]=a-c*2set a=cset i=i+1endloopset DG1=iset i=0loopexitwhen i>DG1if b[i]==1 thencall QTI(u,ZII[i])elsecall UnitRemoveAbility(u,ZII[i])endifset i=i+1endloopendfunctionfunction Q94 takes unit u,integer d returns nothinglocal integer array blocal integer a=dlocal integer c=1local integer i=0local integer DG1if d<1 thencall UnitRemoveAbility(u,Z1I[0])call UnitRemoveAbility(u,Z1I[1])call UnitRemoveAbility(u,Z1I[2])call UnitRemoveAbility(u,Z1I[3])call UnitRemoveAbility(u,Z1I[4])call UnitRemoveAbility(u,Z1I[5])call UnitRemoveAbility(u,Z1I[6])call UnitRemoveAbility(u,Z1I[7])returnendifloopexitwhen c==0set c=a/2set b[i]=a-c*2set a=cset i=i+1endloopset DG1=iset i=0loopexitwhen i>DG1if b[i]==1 thencall QTI(u,Z1I[i])elsecall UnitRemoveAbility(u,Z1I[i])endifset i=i+1endloopendfunctionfunction QA4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))if GetTriggerEventId()==EVENT_UNIT_DEATH thenif GetTriggerUnit()==TLI thencall Q84(TLI,0)call SaveUnitHandle(XY,(MKI),(2),(null))elsecall Q94(TMI,0)call SaveUnitHandle(XY,(MKI),(17),(null))endifelseif TLI!=null thencall Q84(TLI,0)endifif TMI!=null thencall Q94(TMI,0)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction QB4 takes unit TLI,unit TMI,unit TC2 returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)if TC2==null thencall TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))elseif TC2==TMI thencall Q94(TMI,0)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(null))elsecall Q84(TLI,0)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call SaveUnitHandle(XY,(MKI),(2),(null))call SaveUnitHandle(XY,(MKI),(17),(TMI))endifcall TriggerRegisterTimerEvent(t,18,false)call TriggerAddCondition(t,Condition(function QA4))endfunctionfunction QC4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local lightning QOI=(LoadLightningHandle(XY,(MKI),(196)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local integer MFI=GetTriggerEvalCount(t)local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))call MoveLightning(QOI,true,GetUnitX(TLI),GetUnitY(TLI),GetUnitX(TMI),GetUnitY(TMI))call SetUnitX(QHI,GetUnitX(TMI))call SetUnitY(QHI,GetUnitY(TMI))if PAI(GetUnitX(TLI),GetUnitY(TLI),GetUnitX(TMI),GetUnitY(TMI))>700 or GetTriggerEventId()==EVENT_UNIT_DEATH thencall DestroyLightning(QOI)call KillUnit(QHI)if GetTriggerEventId()==EVENT_UNIT_DEATH thencall QB4(TLI,TMI,GetTriggerUnit())elsecall QB4(TLI,TMI,null)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)elseif MFI>160 thencall DestroyLightning(QOI)call KillUnit(QHI)call QB4(TLI,TMI,null)call FlushChildHashtable(XY,(MKI))call MZI(t)elseif ModuloInteger(MFI,20)==0 or MFI==1 thencall Q84(TLI,(NGI*7)*R2I(MFI/20))call Q94(TMI,(NGI*7)*R2I(MFI/20))endifset t=nullset TLI=nullset TMI=nullset QOI=nullset QHI=nullreturn falseendfunctionfunction QD4 takes unit TLI,unit TMI,lightning QOI,unit QHI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer NGI=GetUnitAbilityLevel(TLI,1093747792)call TriggerRegisterTimerEvent(t,0.05,true)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function QC4))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveLightningHandle(XY,(MKI),(196),(QOI))call SaveUnitHandle(XY,(MKI),(19),(QHI))set t=nullendfunctionfunction QE4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local lightning QOI=(LoadLightningHandle(XY,(MKI),(196)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local real x0=GetUnitX(TLI)local real y0=GetUnitY(TLI)local real x1=(LoadReal(XY,(MKI),(64)))local real y1=(LoadReal(XY,(MKI),(65)))local real a=(LoadReal(XY,(MKI),(137)))local unit TMI=nulllocal group g=MDI()set x1=RCI(x1+25*Cos(a))set y1=RGI(y1+25*Sin(a))call SaveReal(XY,(MKI),(64),((x1)*1.0))call SaveReal(XY,(MKI),(65),((y1)*1.0))call MoveLightning(QOI,true,x0,y0,x1,y1)call SetUnitX(QHI,x1)call SetUnitY(QHI,y1)set CK=TLIcall GroupEnumUnitsInRange(g,x1,y1,225,Condition(function BW1))set TMI=FirstOfGroup(g)call MCI(g)if TMI!=null thencall QD4(TLI,TMI,QOI,QHI)call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEvalCount(t)>25 or GetTriggerEventId()==EVENT_UNIT_DEATH thencall DestroyLightning(QOI)call KillUnit(QHI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset QOI=nullset TMI=nullset g=nullset QHI=nullreturn falseendfunctionfunction QF4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger tlocal integer MKIlocal location llocal lightning QOI=AddLightning("CLSB",true,GetUnitX(TLI),GetUnitY(TLI),GetUnitX(TLI),GetUnitY(TLI))local unit QHI=CreateUnit(GetOwningPlayer(TLI),1747990584,GetUnitX(TLI),GetUnitY(TLI),0)call SetLightningColor(QOI,0.3,0.5,1,1)if TMI==null thenset l=GetSpellTargetLoc()set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.02,true)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function QE4))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveLightningHandle(XY,(MKI),(196),(QOI))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveReal(XY,(MKI),(137),((Atan2(GetLocationY(l)-GetUnitY(TLI),GetLocationX(l)-GetUnitX(TLI)))*1.0))call SaveReal(XY,(MKI),(64),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(65),((GetUnitY(TLI))*1.0))call RemoveLocation(l)set l=nullset t=nullelsecall QD4(TLI,TMI,QOI,QHI)endifset TMI=nullendfunctionfunction QG4 takes nothing returns booleanif GetSpellAbilityId()==1093747792 thencall QF4()endifreturn falseendfunctionfunction M61 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function QG4))set t=nullset ZII[0]=1093747798set ZII[1]=1093747793set ZII[2]=1093747794set ZII[3]=1093747795set ZII[4]=1093747796set ZII[5]=1093747797set ZII[6]=1093747799set ZII[7]=1093747800set Z1I[0]=1093748020set Z1I[1]=1093748019set Z1I[2]=1093748018set Z1I[3]=1093748017set Z1I[4]=1093748016set Z1I[5]=1093748021set Z1I[6]=1093747802set Z1I[7]=1093747801endfunctionfunction QH4 takes integer MKI returns nothinglocal integer i=1local integer SJ2=(LoadInteger(XY,(MKI),(136)))local unit TMIlocal integer TRIif SJ2==0 thenreturnendifloopexitwhen i>SJ2set TRI=(LoadInteger(XY,(MKI),(2200+i)))set TMI=M6I(TRI)call M5I(TRI)call UnitRemoveAbility(TMI,GN[0])call UnitRemoveAbility(TMI,GN[1])call UnitRemoveAbility(TMI,GN[2])call UnitRemoveAbility(TMI,GN[3])call UnitRemoveAbility(TMI,GN[4])call UnitRemoveAbility(TMI,GN[5])set i=i+1endloopset TMI=nullendfunctionfunction QZ4 takes unit TMI,integer MKI returns nothinglocal integer TRI=M8I(TMI)local integer SJ2=(LoadInteger(XY,(MKI),(136)))set SJ2=SJ2+1call SaveInteger(XY,(MKI),(136),(SJ2))call SaveInteger(XY,(MKI),(2200+SJ2),(TRI))endfunctionfunction QV4 takes unit u returns integerreturn GetUnitAbilityLevel(u,GN[0])*1+GetUnitAbilityLevel(u,GN[1])*2+GetUnitAbilityLevel(u,GN[2])*4+GetUnitAbilityLevel(u,GN[3])*8+GetUnitAbilityLevel(u,GN[4])*16endfunctionfunction QW4 takes unit u,integer d returns nothinglocal integer array blocal integer a=dlocal integer c=1local integer i=0local integer DG1if d<1 thencall UnitRemoveAbility(u,GN[0])call UnitRemoveAbility(u,GN[1])call UnitRemoveAbility(u,GN[2])call UnitRemoveAbility(u,GN[3])call UnitRemoveAbility(u,GN[4])call UnitRemoveAbility(u,GN[5])returnendifloopexitwhen c==0set c=a/2set b[i]=a-c*2set a=cset i=i+1endloopset DG1=iset i=0loopexitwhen i>DG1if b[i]==1 thencall QTI(u,GN[i])elsecall UnitRemoveAbility(u,GN[i])endifset i=i+1endloopendfunctionfunction QX4 takes unit u,integer d returns nothingif IsUnitType(u,UNIT_TYPE_STRUCTURE)==false thencall QW4(u,d+QV4(u))call QZ4(u,Z5I)endifendfunctionfunction QY4 takes unit TLI,unit QHI,unit TMI,integer NGI returns nothingcall IssueTargetOrder(QHI,"chainlightning",TMI)call TPI(TLI,TMI,2,(50+25*NGI)/2.0,0.3)call QX4(TMI,1)endfunctionfunction QJ4 takes nothing returns booleanif(IsUnitVisible(GetFilterUnit(),GetOwningPlayer(CK))and IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false))and GetUnitTypeId(GetFilterUnit())!=1848651852 thenif GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)<Z4I thenset Z4I=GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)set Z3I=GetFilterUnit()endifendifreturn falseendfunctionfunction QK4 takes nothing returns booleanif(IsUnitVisible(GetFilterUnit(),GetOwningPlayer(CK))and IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and QPI(GetFilterUnit())==false))and GetUnitTypeId(GetFilterUnit())!=1701670775 and GetUnitTypeId(GetFilterUnit())!=1970956647 and GetUnitTypeId(GetFilterUnit())!=1848651852 thenif GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)<Z4I thenset Z4I=GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)set Z3I=GetFilterUnit()endifendifreturn falseendfunctionfunction QL4 takes unit TLI,unit QHI,integer NGI returns nothinglocal group g=MDI()set Z3I=nullset Z4I=999999set ZOI=30+30*NGIset Z2I=TLIset CK=TLIif GetUnitAbilityLevel(TLI,1093752150)>0 thencall GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),525,Condition(function QK4))elsecall GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),525,Condition(function QJ4))endifcall MCI(g)if Z3I!=null thencall QY4(TLI,QHI,Z3I,NGI)endifset g=nullendfunctionfunction QM4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local integer MFI=GetTriggerEvalCount(t)local real W53if GetTriggerEventId()==EVENT_UNIT_DEATH thencall QH4(MKI)call FlushChildHashtable(XY,(MKI))call MZI(t)if GetTriggerUnit()==TLI thencall KillUnit(QHI)endifelseif GetUnitAbilityLevel(TLI,1093752150)>0 thenif NGI==1 thenset W53=0.55elseif NGI==2 thenset W53=0.45elseset W53=0.35endifelseif NGI==1 thenset W53=0.7elseif NGI==2 thenset W53=0.6elseset W53=0.5endifendifset W53=W53/0.05if ModuloInteger(MFI,R2I(W53))==0 or MFI==1 thenset Z5I=MKIcall QL4(TLI,QHI,NGI)endifcall SetUnitX(QHI,GetUnitX(TLI))call SetUnitY(QHI,GetUnitY(TLI))endifset t=nullset TLI=nullreturn falseendfunctionfunction QN4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093747023)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit QHI=CreateUnit(GetOwningPlayer(TLI),1747990577,GetUnitX(TLI),GetUnitY(TLI),0)if NGI==0 thenset NGI=GetUnitAbilityLevel(TLI,1093752150)endifcall UnitApplyTimedLife(QHI,1112820806,30)call SetUnitAbilityLevel(QHI,1093747786,NGI)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,QHI,EVENT_UNIT_DEATH)call TriggerRegisterTimerEvent(t,0.05,true)call TriggerAddCondition(t,Condition(function QM4))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(5),(NGI))set TLI=nullset t=nullendfunctionfunction QS4 takes nothing returns booleanif GetSpellAbilityId()==1093747023 or GetSpellAbilityId()==1093752150 thencall QN4()endifreturn falseendfunctionfunction M71 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function QS4))set t=nullset GN[0]=1093747787set GN[1]=1093747788set GN[2]=1093747790set GN[3]=1093747789set GN[4]=1093747791endfunctionfunction QT4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))call SetUnitPosition(N0I,x,y)call SetUnitAnimation(N0I,"morph ALTERNATE")call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset N0I=nullreturn falseendfunctionfunction QR4 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(N0I,1093678671)local location llocal real NN2local real x=GetUnitX(N0I)local real y=GetUnitY(N0I)local real P6Ilocal real P7Ilocal real A94local real AA4local real CasterXlocal real CasterYlocal integer CasterAbilitylocal unit QHIlocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real TSIlocal real BP1=1.65local unit CC1=nullif NGI==1 thenset TSI=100elseif NGI==2 thenset TSI=160elseif NGI==3 thenset TSI=220elseif NGI==4 thenset TSI=280endifif GetSpellTargetUnit()!=null thenset l=GetUnitLoc(GetSpellTargetUnit())elseset l=GetSpellTargetLoc()endifset P6I=GetLocationX(l)set P7I=GetLocationY(l)call RemoveLocation(l)set NN2=PUI(x,y,P6I,P7I)call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveReal(XY,(MKI),(6),((P6I)*1.0))call SaveReal(XY,(MKI),(7),((P7I)*1.0))call TriggerRegisterTimerEvent(t,PAI(x,y,P6I,P7I)/2000,false)call TriggerAddCondition(t,Condition(function QT4))if PAI(x,y,P6I,P7I)<150 thenset P6I=x+150*Cos(NN2*bj_DEGTORAD)set P7I=y+150*Sin(NN2*bj_DEGTORAD)endifif GetSpellTargetUnit()!=null and MBI(GetSpellTargetUnit())thenset CC1=GetSpellTargetUnit()endifcall CB1(N0I,CC1,TSI,BP1,0.52,x,y,P6I,P7I,175,null,true,1600)set QHI=nullset l=nullset N0I=nullset t=nullendfunctionfunction QP4 takes nothing returns booleanif GetSpellAbilityId()==1093678671 thencall QR4()endifreturn falseendfunctionfunction K41 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function QP4))call RVI(1093687350)set t=nullendfunctionfunction QQ4 takes nothing returns nothingcall TKI(Z7I,GetEnumUnit(),1,110)call IssueTargetOrder(Z8I,"slow",GetEnumUnit())endfunctionfunction QU4 takes unit TLI,real x,real y,integer NGI,integer UI4 returns nothinglocal group g=MDI()local real rlocal string fxif UI4==8 thenset r=675elseif UI4==9 thenset r=700elseif UI4==10 thenset r=725elseset r=250+50*UI4endifif UI4<4 thenset fx="war3mapImported\\EpiPulse_1_4.mdx"elseif UI4<8 thenset fx="war3mapImported\\EpiPulse_5_8.mdx"elseset fx="war3mapImported\\EpiPulse_9_12.mdx"endifcall DestroyEffect(AddSpecialEffect(fx,x,y))set CK=TLIset Z7I=TLIset Z8I=Z6I[GetPlayerId(GetOwningPlayer(TLI))]call GroupEnumUnitsInRange(g,x,y,r,Condition(function AT1))call ForGroup(g,function QQ4)call MCI(g)call I01(0.03,false,x,y,150+100*UI4,150+100*UI4,72,0.03,512)set g=nullendfunctionfunction U14 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local player p=(LoadPlayerHandle(XY,(MKI),(54)))local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local real PI2=(LoadReal(XY,(MKI),(23)))local real P12=(LoadReal(XY,(MKI),(24)))local boolean OF3=(LoadBoolean(XY,(MKI),(15)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local integer X22=(LoadInteger(XY,(MKI),(25)))local integer UO4=4+NGI*2local real x=PI2local real y=P12if OF3 thenset UO4=UO4+2endifif X22>UO4 thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseif N0I!=null and QPI(N0I)==false thenset x=GetUnitX(N0I)set y=GetUnitY(N0I)endifcall QU4(N0I,x,y,NGI,X22)call SaveInteger(XY,(MKI),(25),(X22+1))call SaveReal(XY,(MKI),(23),((x)*1.0))call SaveReal(XY,(MKI),(24),((y)*1.0))endifset t=nullset p=nullset N0I=nullreturn falseendfunctionfunction U24 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local player p=GetOwningPlayer(N0I)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer NGI=GetUnitAbilityLevel(N0I,1093678674)local boolean OF3=falseif NGI==0 thenset OF3=trueset NGI=GetUnitAbilityLevel(N0I,1093747252)endifif NZI(p)thenset Z6I[GetPlayerId(p)]=CreateUnit(CO[0],1697656901,GetUnitX(N0I),GetUnitY(N0I),0)elseset Z6I[GetPlayerId(p)]=CreateUnit(BO[0],1697656901,GetUnitX(N0I),GetUnitY(N0I),0)endifcall QTI(Z6I[GetPlayerId(p)],1093744450)call SaveUnitHandle(XY,(MKI),(14),(N0I))call SavePlayerHandle(XY,(MKI),(54),(GetOwningPlayer(N0I)))call SaveReal(XY,(MKI),(23),((GetUnitX(N0I))*1.0))call SaveReal(XY,(MKI),(24),((GetUnitY(N0I))*1.0))call SaveInteger(XY,(MKI),(5),(NGI))call SaveInteger(XY,(MKI),(25),(2))call SaveBoolean(XY,(MKI),(15),(OF3))call TriggerRegisterTimerEvent(t,0.35,true)call TriggerAddCondition(t,Condition(function U14))call QU4(N0I,GetUnitX(N0I),GetUnitY(N0I),NGI,1)set N0I=nullset t=nullendfunctionfunction U34 takes nothing returns booleanif GetSpellAbilityId()==1093678674 or GetSpellAbilityId()==1093747252 thencall U24()endifreturn falseendfunctionfunction K51 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_FINISH)call TriggerAddCondition(t,Condition(function U34))call RVI(1093744450)set t=nullendfunctionfunction U44 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))if((LoadInteger(XY,(GetHandleId((N0I))),((4299))))==1)==false thencall UnitRemoveAbility(N0I,1110455378)endifcall RemoveUnit((LoadUnitHandle(XY,(MKI),(379))))call RemoveUnit((LoadUnitHandle(XY,(MKI),(380))))call RemoveUnit((LoadUnitHandle(XY,(MKI),(381))))call RemoveUnit((LoadUnitHandle(XY,(MKI),(382))))call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset N0I=nullreturn falseendfunctionfunction U54 takes unit N0I,integer NGI,unit U64,unit U74,unit U84,unit U94 returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real BP1set BP1=1.5call SaveInteger(XY,(GetHandleId((N0I))),((4299)),(2))call TriggerRegisterTimerEvent(t,BP1,false)call TriggerAddCondition(t,Condition(function U44))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveUnitHandle(XY,(MKI),(379),(U64))call SaveUnitHandle(XY,(MKI),(380),(U74))call SaveUnitHandle(XY,(MKI),(381),(U84))call SaveUnitHandle(XY,(MKI),(382),(U94))set t=nullendfunctionfunction UA4 takes nothing returns booleanif(IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))thencall TKI(ZAI,GetFilterUnit(),1,Z9I)endifreturn falseendfunctionfunction UB4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local unit U64=(LoadUnitHandle(XY,(MKI),(379)))local unit U74=(LoadUnitHandle(XY,(MKI),(380)))local unit U84=(LoadUnitHandle(XY,(MKI),(381)))local unit U94=(LoadUnitHandle(XY,(MKI),(382)))local integer NGI=GetUnitAbilityLevel(N0I,1093683248)local integer MFI=GetTriggerEvalCount(t)local group glocal integer UC4=550if GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST or MFI>NGI*20/0.5 thencall U54(N0I,NGI,U64,U74,U84,U94)call FlushChildHashtable(XY,(MKI))call MZI(t)elseset g=MDI()set CK=N0Iset ZAI=N0Iset Z9I=NGI*25*0.5call GroupEnumUnitsInRange(g,GetUnitX(N0I),GetUnitY(N0I),UC4,Condition(function UA4))call MCI(g)endifset t=nullset N0I=nullset U64=nullset U74=nullset U84=nullset U94=nullset g=nullreturn falseendfunctionfunction UD4 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit U64=CreateUnit(GetOwningPlayer(N0I),1697656913,GetUnitX(N0I)+150,GetUnitY(N0I)+150,0)local unit U74=CreateUnit(GetOwningPlayer(N0I),1697656913,GetUnitX(N0I)+150,GetUnitY(N0I)-150,0)local unit U84=CreateUnit(GetOwningPlayer(N0I),1697656913,GetUnitX(N0I)-150,GetUnitY(N0I)+150,0)local unit U94=CreateUnit(GetOwningPlayer(N0I),1697656913,GetUnitX(N0I)-150,GetUnitY(N0I)-150,0)local integer NGI=GetUnitAbilityLevel(N0I,1093683248)local unit QHI=CreateUnit(GetOwningPlayer(N0I),1697656901,GetUnitX(N0I),GetUnitY(N0I),0)call SaveInteger(XY,(GetHandleId((N0I))),((4299)),(1))call QTI(QHI,1093683279)call SetUnitAbilityLevel(QHI,1093683279,NGI)call IssueTargetOrder(QHI,"invisibility",N0I)call TriggerRegisterTimerEvent(t,0.5,true)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_SPELL_ENDCAST)call TriggerAddCondition(t,Condition(function UB4))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveUnitHandle(XY,(MKI),(379),(U64))call SaveUnitHandle(XY,(MKI),(380),(U74))call SaveUnitHandle(XY,(MKI),(381),(U84))call SaveUnitHandle(XY,(MKI),(382),(U94))call SetUnitTimeScale(U64,0)call SetUnitTimeScale(U74,0)call SetUnitTimeScale(U84,0)call SetUnitTimeScale(U94,0)set t=nullset N0I=nullset QHI=nullset U64=nullset U74=nullset U84=nullset U94=nullendfunctionfunction UE4 takes nothing returns booleanif GetSpellAbilityId()==1093683248 thencall UD4()endifreturn falseendfunctionfunction K61 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function UE4))set t=nullendfunctionfunction UF4 takes nothing returns nothingcall TKI(ZBI,GetEnumUnit(),2,50*ZCI)endfunctionfunction UG4 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,x,y,0)local group g=MDI()local integer NGI=GetUnitAbilityLevel(TLI,1093810507)call QTI(QHI,1093684537)call SetUnitAbilityLevel(QHI,1093684537,NGI)call IssueImmediateOrder(QHI,"thunderclap")call QTI(QHI,1093677399)call SetUnitAbilityLevel(QHI,1093677399,NGI)call IssueImmediateOrder(QHI,"stomp")set ZBI=TLIset ZCI=NGIcall GroupEnumUnitsInRange(g,x,y,350+25,Condition(function AK1))call ForGroup(g,function UF4)call MCI(g)set TLI=nullset QHI=nullset g=nullendfunctionfunction UH4 takes nothing returns booleanif GetSpellAbilityId()==1093810507 thencall UG4()endifreturn falseendfunctionfunction K71 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function UH4))set t=nullendfunctionfunction UZ4 takes unit TLI,unit TMI returns nothinglocal integer NGI=GetUnitAbilityLevel(TLI,1093683786)local real TSI=40+20*NGIif GetUnitAbilityLevel(TMI,1093678162)==0 thencall TKI(TLI,TMI,2,TSI)endifendfunctionfunction UV4 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer TRI=(LoadInteger(XY,(MKI),(30)))local unit TMI=M6I(TRI)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamageSource()==TLI and GetEventDamage()>0 and GetEventDamage()<=0.02 and GetUnitAbilityLevel(TMI,1110460231)>0 thencall DisableTrigger(t)call UZ4(TLI,TMI)call M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifelsecall M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction UW4 takes nothing returns nothinglocal trigger t=CreateTrigger()local unit TMI=GetTriggerUnit()local unit TLI=GetAttacker()local integer MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,1,false)call TriggerAddCondition(t,Condition(function UV4))call SaveInteger(XY,(MKI),(30),(M8I(TMI)))call SaveUnitHandle(XY,(MKI),(2),(TLI))set TMI=nullset TLI=nullset t=nullendfunctionfunction UX4 takes nothing returns nothinglocal unit TLI=GetAttacker()if((LoadInteger(XY,(GetHandleId((TLI))),((4274))))==1)==false thencall MPI(TLI,4274,0.1)call UW4()endifendfunctionfunction UY4 takes nothing returns booleanif GetUnitAbilityLevel(GetAttacker(),1093683786)>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(14)))and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))thencall UX4()endifreturn falseendfunctionfunction UJ4 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function UY4))call SaveUnitHandle(XY,(GetHandleId(t)),(14),(GetTriggerUnit()))set t=nullendfunctionfunction UK4 takes nothing returns booleanif GetLearnedSkill()==1093683786 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093683786)==1 thencall UJ4()endifreturn falseendfunctionfunction K81 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function UK4))set t=nullendfunctionfunction SpectralDagger_CastCode takes nothing returns integerreturn 1093683287endfunctionfunction SpectralDagger_PositiveEffect takes nothing returns integerreturn 1093683506endfunctionfunction SpectralDagger_NegativeEffect takes nothing returns integerreturn 1093683289endfunctionfunction SpectralDagger_PositiveBuff takes nothing returns integerreturn 1110455351endfunctionfunction SpectralDagger_ShadowPathUnit takes nothing returns integerreturn 1747988530endfunctionfunction SpectralDagger_DaggerUnit takes nothing returns integerreturn 1747988531endfunctionfunction UL4 takes nothing returns nothinglocal timer t=GetExpiredTimer()local integer MKI=GetHandleId(t)local unit R7I=(LoadUnitHandle(XY,(MKI),(221)))local unit UM4=(LoadUnitHandle(XY,(MKI),(383)))local unit QHIlocal real BP1=(LoadReal(XY,(MKI),(57)))local integer NGI=GetUnitAbilityLevel(UM4,(1093683287))local real UN4=(LoadReal(XY,(MKI),(6)))local real US4=(LoadReal(XY,(MKI),(7)))local real U2I=GetUnitX(R7I)local real U3I=GetUnitY(R7I)if(U2I-UN4)*(U2I-UN4)+(U3I-US4)*(U3I-US4)>900 thenset QHI=CreateUnit(GetOwningPlayer(UM4),(1747988530),GetUnitX(R7I),GetUnitY(R7I),0)call SetUnitAbilityLevel(QHI,(1093683506),NGI)call SetUnitAbilityLevel(QHI,(1093683289),NGI)call UnitApplyTimedLife(QHI,1112820806,7)call SaveReal(XY,(MKI),(6),((U2I)*1.0))call SaveReal(XY,(MKI),(7),((U3I)*1.0))endifset BP1=BP1+0.2call SaveReal(XY,(MKI),(57),((BP1)*1.0))if BP1>7 or GetUnitState(R7I,UNIT_STATE_LIFE)<1 thencall PauseTimer(t)call FlushChildHashtable(XY,(MKI))endifendfunctionfunction UT4 takes nothing returns nothinglocal unit TMI=GetEnumUnit()local sound R0Ilocal timer tlocal integer MKIcall UnitDamageTarget(XO,TMI,JO,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)call GroupAddUnit(B2,TMI)if IsUnitType(TMI,UNIT_TYPE_HERO)==true thenset t=CreateTimer()set MKI=GetHandleId(t)set R0I=CreateSound("Sounds\\Spectral Dagger.mp3",false,true,true,10,10,"DefaultEAXON")call SetSoundPosition(R0I,GetUnitX(TMI),GetUnitY(TMI),0)call SetSoundDistanceCutoff(R0I,700)call StartSound(R0I)call KillSoundWhenDone(R0I)call SaveUnitHandle(XY,(MKI),(221),(TMI))call SaveUnitHandle(XY,(MKI),(383),(XO))call SaveReal(XY,(MKI),(6),((GetUnitX(TMI))*1.0))call SaveReal(XY,(MKI),(7),((GetUnitY(TMI))*1.0))call TimerStart(t,0.2,true,function UL4)endifendfunctionfunction UR4 takes nothing returns booleanreturn IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(XO))and IsUnitInGroup(GetFilterUnit(),B2)==false and GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==falseendfunctionfunction UP4 takes nothing returns nothinglocal timer t=GetExpiredTimer()local integer MKI=GetHandleId(t)local group WVO=(LoadGroupHandle(XY,(MKI),(133)))local group GK1=MDI()local boolexpr PI1=Condition(function UR4)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local unit UII=(LoadUnitHandle(XY,(MKI),(45)))local integer TRI=(LoadInteger(XY,(MKI),(30)))local unit TMI=M6I(TRI)local real P6I=GetUnitX(TMI)local real P7I=GetUnitY(TMI)local real P4I=GetUnitX(UII)local real P5I=GetUnitY(UII)local real NN2=Atan2(P7I-P5I,P6I-P4I)local real U2I=RCI(GetUnitX(UII)+30*Cos(NN2))local real U3I=RGI(GetUnitY(UII)+30*Sin(NN2))local unit QHIlocal integer NGI=GetUnitAbilityLevel(N0I,(1093683287))if(LoadBoolean(XY,(MKI),(384)))thencall SaveBoolean(XY,(MKI),(384),(false))set QHI=CreateUnit(GetOwningPlayer(N0I),(1747988530),P4I,P5I,0)call SetUnitAbilityLevel(QHI,(1093683506),NGI)call SetUnitAbilityLevel(QHI,(1093683289),NGI)call UnitApplyTimedLife(QHI,1112820806,12)elsecall SaveBoolean(XY,(MKI),(384),(true))endifcall SetUnitX(UII,U2I)call SetUnitY(UII,U3I)call SetUnitFacing(UII,NN2*bj_RADTODEG)set B2=WVOset XO=N0Iset JO=50*GetUnitAbilityLevel(N0I,(1093683287))call GroupEnumUnitsInRange(GK1,U2I,U3I,150,PI1)call ForGroup(GK1,function UT4)call MCI(GK1)if(U2I-P6I)*(U2I-P6I)+(U3I-P7I)*(U3I-P7I)<1600 thencall PauseTimer(t)call M5I(TRI)call FlushChildHashtable(XY,(MKI))call KillUnit(UII)call MCI(WVO)endifendfunctionfunction UQ4 takes nothing returns nothinglocal timer t=GetExpiredTimer()local integer MKI=GetHandleId(t)local group WVO=(LoadGroupHandle(XY,(MKI),(133)))local group GK1=MDI()local boolexpr PI1=Condition(function UR4)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local unit UII=(LoadUnitHandle(XY,(MKI),(45)))local real P6I=(LoadReal(XY,(MKI),(47)))local real P7I=(LoadReal(XY,(MKI),(48)))local real P4I=GetUnitX(UII)local real P5I=GetUnitY(UII)local real NN2=(LoadReal(XY,(MKI),(13)))local real U2I=RCI(GetUnitX(UII)+30*Cos(NN2))local real U3I=RGI(GetUnitY(UII)+30*Sin(NN2))local unit QHIlocal integer NGI=GetUnitAbilityLevel(N0I,(1093683287))if(LoadBoolean(XY,(MKI),(384)))thencall SaveBoolean(XY,(MKI),(384),(false))set QHI=CreateUnit(GetOwningPlayer(N0I),(1747988530),P4I,P5I,0)call SetUnitAbilityLevel(QHI,(1093683506),NGI)call SetUnitAbilityLevel(QHI,(1093683289),NGI)call UnitApplyTimedLife(QHI,1112820806,12)elsecall SaveBoolean(XY,(MKI),(384),(true))endifcall SetUnitX(UII,U2I)call SetUnitY(UII,U3I)set B2=WVOset XO=N0Iset JO=50*GetUnitAbilityLevel(N0I,(1093683287))call GroupEnumUnitsInRange(GK1,U2I,U3I,150,PI1)call ForGroup(GK1,function UT4)call MCI(GK1)if(U2I-P6I)*(U2I-P6I)+(U3I-P7I)*(U3I-P7I)<1600 thencall PauseTimer(t)call FlushChildHashtable(XY,(MKI))call KillUnit(UII)call MCI(WVO)endifendfunctionfunction UU4 takes unit R7I,integer L9I returns booleanif(GetItemTypeId(UnitItemInSlot(R7I,L9I))==1886613604)thenreturn trueendifif(GetItemTypeId(UnitItemInSlot(R7I,L9I))==1868983399)thenreturn trueendifreturn falseendfunctionfunction I05 takes nothing returns nothinglocal timer t=GetExpiredTimer()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local real BP1=(LoadReal(XY,(MKI),(57)))local integer SII=0loopexitwhen SII>5if UU4(N0I,SII)thenif GetUnitAbilityLevel(N0I,(1110455351))==0 thencall SetItemDropOnDeath(UnitItemInSlot(N0I,SII),true)if GetItemTypeId(UnitItemInSlot(N0I,SII))==1868983399 thencall SetItemDroppable(UnitItemInSlot(N0I,SII),true)endifelsecall SetItemDropOnDeath(UnitItemInSlot(N0I,SII),false)if GetItemTypeId(UnitItemInSlot(N0I,SII))==1868983399 thencall SetItemDroppable(UnitItemInSlot(N0I,SII),false)endifendifendifset SII=SII+1endloopset BP1=BP1+0.2call SaveReal(XY,(MKI),(57),((BP1)*1.0))if GetUnitAbilityLevel(N0I,(1110455351))==0 thencall SetUnitPathing(N0I,true)elsecall SetUnitPathing(N0I,false)endifif BP1>30 thencall PauseTimer(t)call FlushChildHashtable(XY,(MKI))call SetUnitPathing(N0I,true)set SII=0loopexitwhen SII>5if UU4(N0I,SII)thencall SetItemDropOnDeath(UnitItemInSlot(N0I,SII),true)if GetItemTypeId(UnitItemInSlot(N0I,SII))==1868983399 thencall SetItemDroppable(UnitItemInSlot(N0I,SII),true)endifendifset SII=SII+1endloopendifendfunctionfunction II5 takes nothing returns booleanreturn GetSpellAbilityId()==(1093683287)endfunctionfunction I15 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local real P4I=RCI(GetUnitX(N0I))local real P5I=RGI(GetUnitY(N0I))local unit UII=CreateUnit(GetOwningPlayer(N0I),(1747988531),P4I,P5I,0)local timer t=CreateTimer()local integer MKI=GetHandleId(t)local group WVO=MDI()local location UG2local real NN2local real P6Ilocal real P7Icall SetUnitPathing(UII,false)call SaveGroupHandle(XY,(MKI),(133),(WVO))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveUnitHandle(XY,(MKI),(45),(UII))if TMI!=null thencall SaveInteger(XY,(MKI),(30),(M8I(TMI)))call TimerStart(t,0.035,true,function UP4)elseset UG2=GetSpellTargetLoc()set P6I=GetLocationX(UG2)set P7I=GetLocationY(UG2)set NN2=Atan2(P7I-P5I,P6I-P4I)call SetUnitFacing(UII,NN2*bj_RADTODEG)set P6I=RCI(P4I+2100*Cos(NN2))set P7I=RGI(P5I+2100*Sin(NN2))call SaveReal(XY,(MKI),(47),((P6I)*1.0))call SaveReal(XY,(MKI),(48),((P7I)*1.0))call SaveReal(XY,(MKI),(13),((NN2)*1.0))call TimerStart(t,0.035,true,function UQ4)endifset t=CreateTimer()set MKI=GetHandleId(t)call SetUnitPathing(N0I,false)call SaveUnitHandle(XY,(MKI),(14),(N0I))call TimerStart(t,0.2,true,function I05)endfunctionfunction L71 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function II5))call TriggerAddAction(t,function I15)call CreateSound("Sounds\\Spectral Dagger.mp3",false,false,false,10,10,"DefaultEAXON")call RVI((1093683506))call RVI((1093683289))endfunctionconstant function Desolate_AbilityId takes nothing returns integerreturn 1093682776endfunctionfunction IO5 takes nothing returns booleanreturn IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==true and GetUnitAbilityLevel(GetAttacker(),(1093682776))>0endfunctionfunction I25 takes nothing returns booleanreturn IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==falseendfunctionfunction I35 takes nothing returns nothinglocal unit FKO=GetAttacker()local unit QK2=GetTriggerUnit()local group GK1=MDI()local boolexpr PI1=Condition(function I25)local integer MKIcall GroupEnumUnitsInRange(GK1,GetUnitX(QK2),GetUnitY(QK2),325+25,PI1)call GroupRemoveUnit(GK1,QK2)if FirstOfGroup(GK1)==null thenset MKI=GetHandleId(FKO)if((LoadInteger(XY,(GetHandleId((FKO))),((4275))))==1)==false thencall UnitDamageTarget(FKO,QK2,5+15*GetUnitAbilityLevel(FKO,(1093682776)),true,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_DIVINE,WEAPON_TYPE_WHOKNOWS)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayTarget.mdl",QK2,"overhead"))call MPI(FKO,4275,0.3)endifendifcall MCI(GK1)endfunctionfunction L81 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function IO5))call TriggerAddAction(t,function I35)endfunctionfunction I45 takes nothing returns nothinglocal real d=P8I(GetTriggerUnit(),GetEnumUnit())-25local real GN2=0if d<300 thenset GN2=1elseif d<1000 thenset GN2=(1000-d)/700endifif GN2>0 thenset N20[GetPlayerId(GetOwningPlayer(GetEnumUnit()))]=truecall TKI(GetTriggerUnit(),GetEnumUnit(),3,ZDI*GN2)set N20[GetPlayerId(GetOwningPlayer(GetEnumUnit()))]=falsecall DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayDamage.mdl",GetEnumUnit(),"chest"))endifendfunctionfunction I55 takes nothing returns booleanlocal unit N0I=GetTriggerUnit()local real TSI=GetEventDamage()local integer NGI=GetUnitAbilityLevel(N0I,1093684801)local group gif TAI(TSI)and GetUnitAbilityLevel(N0I,1112433775)==0 thenset g=MDI()set ZDI=TSI*(0.06+0.04*NGI)call PII(N0I,ZDI)call GroupEnumUnitsInRange(g,GetUnitX(N0I),GetUnitY(N0I),1025,Condition(function AK1))call ForGroup(g,function I45)call MCI(g)endifset N0I=nullset g=nullreturn falseendfunctionfunction I65 takes nothing returns nothinglocal trigger t=CreateTrigger()local unit N0I=GetTriggerUnit()call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function I55))set t=nullset N0I=nullendfunctionfunction I75 takes nothing returns booleanif GetLearnedSkill()==1093684801 and GetUnitAbilityLevel(GetTriggerUnit(),1093684801)==1 and IsUnitIllusion(GetTriggerUnit())==false thencall I65()endifreturn falseendfunctionfunction L91 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function I75))set t=nullendfunctionconstant function Haunt_AbilityCode takes nothing returns integerreturn 1093683257endfunctionconstant function Haunt_ImageCode takes nothing returns integerreturn 1093684793endfunctionconstant function Haunt_ImageBuffCode takes nothing returns integerreturn 1110455884endfunctionconstant function Haunt_RealityCode takes nothing returns integerreturn 1093683265endfunctionfunction I85 takes nothing returns booleanreturn GetSpellAbilityId()==(1093683257)endfunctionfunction I95 takes nothing returns nothinglocal unit TMI=GetEnumUnit()local unit N0I=GetTriggerUnit()local unit QHI=CreateUnit(GetOwningPlayer(N0I),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call SaveUnitHandle(XY,(GetHandleId(QHI)),(387),(TMI))call QTI(QHI,(1093684793))call SetUnitAbilityLevel(QHI,(1093684793),GetUnitAbilityLevel(N0I,(1093683257)))call IssueTargetOrderById(QHI,852274,N0I)endfunctionfunction IA5 takes nothing returns booleanreturn IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))endfunctionfunction IB5 takes nothing returns nothinglocal integer MKI=GetHandleId(GetTriggeringTrigger())local unit QP1=(LoadUnitHandle(XY,(MKI),(386)))local unit TMI=(LoadUnitHandle(XY,(MKI),(387)))local integer IC5=(LoadInteger(XY,(MKI),(385)))if GetTriggerEventId()!=EVENT_UNIT_DEATH and GetTriggerEventId()!=EVENT_UNIT_ISSUED_TARGET_ORDER and GetTriggerEventId()!=EVENT_UNIT_ISSUED_POINT_ORDER thenset IC5=IC5+1call SaveInteger(XY,(MKI),(385),(IC5))endifif GetTriggerEventId()==EVENT_UNIT_DEATH thencall DisableTrigger(GetTriggeringTrigger())call FlushChildHashtable(XY,(GetHandleId(GetTriggeringTrigger())))call SaveInteger(XY,(MKI),(385),(IC5))if TMI==GetTriggerUnit()thencall KillUnit(QP1)endifelseif IsUnitPaused(QP1)==false thenif IC5==2 thencall SetUnitVertexColor(QP1,255,255,255,255)endifif IC5>1 thencall DisableTrigger(GetTriggeringTrigger())call IssueTargetOrder(QP1,"attack",TMI)call EnableTrigger(GetTriggeringTrigger())elsecall DisableTrigger(GetTriggeringTrigger())call IssueTargetOrderById(QP1,851986,TMI)call EnableTrigger(GetTriggeringTrigger())endifendifendfunctionfunction ID5 takes nothing returns booleanreturn GetUnitAbilityLevel(GetSummonedUnit(),(1110455884))>0endfunctionfunction IE5 takes nothing returns nothinglocal unit QHI=GetSummoningUnit()local unit QP1=GetSummonedUnit()local unit TMI=(LoadUnitHandle(XY,(GetHandleId(QHI)),(387)))local trigger t=CreateTrigger()call SaveUnitHandle(XY,(GetHandleId(K1[GetPlayerId(GetOwningPlayer(QHI))])),(7100+GetHandleId(QP1)),(TMI))call SetUnitPathing(QP1,false)call SetUnitMoveSpeed(QP1,400)call SetUnitX(QP1,GetUnitX(TMI))call SetUnitY(QP1,GetUnitY(TMI))call IssueTargetOrderById(QP1,851986,TMI)call SetUnitVertexColor(QP1,255,255,255,50)call TriggerRegisterUnitEvent(t,QP1,EVENT_UNIT_ISSUED_TARGET_ORDER)call TriggerRegisterUnitEvent(t,QP1,EVENT_UNIT_ISSUED_POINT_ORDER)call TriggerRegisterUnitEvent(t,QP1,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerRegisterTimerEvent(t,0.5,true)call TriggerAddAction(t,function IB5)call DestroyEffect(AddSpecialEffect("units\\nightelf\\SpiritOfVengeance\\SpiritOfVengeance.mdl",GetUnitX(QP1),GetUnitY(QP1)))call SaveUnitHandle(XY,(GetHandleId(t)),(387),(TMI))call SaveUnitHandle(XY,(GetHandleId(t)),(386),(QP1))call SaveInteger(XY,(GetHandleId(t)),(385),(0))call FlushChildHashtable(XY,(GetHandleId(QHI)))endfunctionfunction IF5 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local group GK1=MDI()local boolexpr PI1=Condition(function IA5)local sound R0Icall QTI(GetTriggerUnit(),(1093683265))call SetUnitPathing(N0I,false)call GroupEnumUnitsInRect(GK1,bj_mapInitialPlayableArea,PI1)call ForGroup(GK1,function I95)call SetUnitPathing(N0I,true)if FirstOfGroup(GK1)!=null thenset R0I=CreateSound("Abilities\\Spells\\Other\\ANsa\\SacrificeUnit.wav",false,false,false,10,10,"DefaultEAXON")call StartSound(R0I)call KillSoundWhenDone(R0I)endifcall MCI(GK1)endfunctionfunction IG5 takes nothing returns booleanreturn GetLearnedSkill()==(1093683257)and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),(1093683257))==1endfunctionfunction IH5 takes nothing returns nothingcall QTI(GetTriggerUnit(),(1093683265))endfunctionfunction LA1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function I85))call TriggerAddAction(t,function IF5)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SUMMON)call TriggerAddCondition(t,Condition(function ID5))call TriggerAddAction(t,function IE5)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function IG5))call TriggerAddAction(t,function IH5)call CreateSound("Abilities\\Spells\\Other\\ANsa\\SacrificeUnit.wav",false,false,false,10,10,"DefaultEAXON")call RVI((1093684793))endfunctionfunction IZ5 takes nothing returns booleanreturn GetUnitAbilityLevel(GetFilterUnit(),1110455884)>0endfunctionfunction IV5 takes nothing returns nothinglocal real P3I=P9I(GetEnumUnit(),GetSpellTargetLoc())if P3I<JO thenset XO=GetEnumUnit()set JO=P3Iendifendfunctionfunction IW5 takes nothing returns unitlocal group GK1=MDI()set XO=nullset JO=9999999call GroupEnumUnitsOfPlayer(GK1,GetOwningPlayer(GetTriggerUnit()),Condition(function IZ5))call ForGroup(GK1,function IV5)set ZEI=GK1set GK1=nullreturn XOendfunctionfunction Reality_KillOtherImages takes nothing returns nothingcall KillUnit(GetEnumUnit())endfunctionfunction IX5 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local unit TMI=IW5()local unit WRO=(LoadUnitHandle(XY,(GetHandleId(N0I)),(7100+GetHandleId(TMI))))local real P6Ilocal real P7Iif TMI==null thencall R1I(GetOwningPlayer(N0I),GetObjectName(1848652634))elseset P6I=GetUnitX(TMI)set P7I=GetUnitY(TMI)call KillUnit(TMI)call MCI(ZEI)set ZEI=nullcall SetUnitX(N0I,P6I)call SetUnitY(N0I,P7I)if PAI(GetCameraEyePositionX(),GetCameraEyePositionY(),GetUnitX(TMI),GetUnitY(TMI))>1400 thencall PanCameraToTimedForPlayer(GetOwningPlayer(N0I),P6I,P7I,0)endifcall IssueTargetOrder(N0I,"attack",WRO)endifset N0I=nullset TMI=nullendfunctionfunction IY5 takes nothing returns booleanif GetSpellAbilityId()==1093683265 thencall IX5()endifreturn falseendfunctionfunction LB1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function IY5))set t=nullendfunctionfunction IJ5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer NGI=GetUnitAbilityLevel(TLI,1093682515)local integer BC2local integer RJ3if NGI>0 and QPI(TLI)==false thenset BC2=R2I(GetUnitMoveSpeed(TLI)*0.04*NGI)set RJ3=(LoadInteger(XY,(MKI),(238)))if BC2!=RJ3 thencall SaveInteger(XY,(MKI),(238),(BC2))endifendifset t=nullset TLI=nullreturn falseendfunctionfunction IK5 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.5,true)call TriggerAddCondition(t,Condition(function IJ5))call SaveUnitHandle(XY,(MKI),(2),(GetTriggerUnit()))call SaveInteger(XY,(MKI),(238),(0))set t=nullendfunctionfunction IL5 takes nothing returns booleanif GetLearnedSkill()==1093682515 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093682515)==1 thencall IK5()endifreturn falseendfunctionfunction KA1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function IL5))set t=nullendfunctionfunction IM5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real YSO=(LoadReal(XY,(GetHandleId(TLI)),(685)))call FlushChildHashtable(XY,(MKI))call MZI(t)if YSO<(TimerGetElapsed(M))or GetTriggerEventId()==EVENT_WIDGET_DEATH thencall SaveReal(XY,(GetHandleId(TLI)),(685),((0)*1.0))call UnitRemoveAbility(TLI,1093809224)call UnitRemoveAbility(TLI,1110459715)endifset t=nullset TLI=nullreturn falseendfunctionfunction IN5 takes unit TLI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call QTI(TLI,1093809224)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093809224,false)call SaveReal(XY,(GetHandleId(TLI)),(685),(((TimerGetElapsed(M))+ZFI-0.01)*1.0))call TriggerRegisterTimerEvent(t,ZFI,false)call TriggerRegisterDeathEvent(t,TLI)call TriggerAddCondition(t,Condition(function IM5))call SaveUnitHandle(XY,(MKI),(2),(TLI))set t=nullendfunctionfunction IS5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real NN2=(LoadReal(XY,(MKI),(13)))local real x=GetUnitX(TMI)local real y=GetUnitY(TMI)local integer MFI=GetTriggerEvalCount(t)local real NT2=(LoadReal(XY,(MKI),(193)))local integer JNO=(LoadInteger(XY,(MKI),(12)))if MFI>35 thencall SaveReal(XY,(MKI),(193),((NT2*0.98)*1.0))endifif GetTriggerEventId()==EVENT_UNIT_DEATH or MFI>JNO thencall FlushChildHashtable(XY,(MKI))call MZI(t)elsecall DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\FlakCannons\\FlakTarget.mdl",x,y))call QEI(x,y,150)set x=RCI(x+NT2*Cos(NN2))set y=RGI(y+NT2*Sin(NN2))if(IsPointInRegion(XN,((x)*1.0),((y)*1.0)))==false thencall SetUnitX(TMI,x)call SetUnitY(TMI,y)endifif MFI==1 and(LoadBoolean(XY,(MKI),(698)))==false thencall IssueTargetOrder(TLI,"attack",TMI)endifendifset t=nullset TMI=nullreturn falseendfunctionfunction IT5 takes unit TLI,unit TMI,boolean IR5,boolean IP5 returns nothinglocal trigger tlocal integer MKIlocal real NN2=Atan2(GetUnitY(TMI)-GetUnitY(TLI),GetUnitX(TMI)-GetUnitX(TLI))local integer NGI=GetUnitAbilityLevel(TLI,1093682997)local unit QHIif IR5 thenendifif NGI>0 and GetUnitAbilityLevel(TLI,1112433775)==0 thenset QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call QTI(QHI,1093752657)call SetUnitAbilityLevel(QHI,1093752657,NGI)if IssueTargetOrder(QHI,"thunderbolt",TMI)thenset t=CreateTrigger()set MKI=GetHandleId(t)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile_mini.mdl",TLI,"weapon"))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveReal(XY,(MKI),(13),((NN2)*1.0))call SaveReal(XY,(MKI),(193),((2)*1.0))call SaveBoolean(XY,(MKI),(698),(IP5))call SaveInteger(XY,(MKI),(12),(80+20*NGI))call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerRegisterTimerEvent(t,0.01,true)call TriggerAddCondition(t,Condition(function IS5))call TKI(TLI,TMI,1,GetUnitMoveSpeed(TLI)*0.1*NGI)call IN5(TLI)endifif IP5==false thencall MPI(TLI,4276,1.5)endifendifset t=nullset TLI=nullset TMI=nullset QHI=nullendfunctionfunction IQ5 takes nothing returns booleanif GetUnitAbilityLevel(GetAttacker(),1093682997)>0 and IsUnitIllusion(GetAttacker())==false and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitTypeId(GetTriggerUnit())!=1848651852 and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))and GetRandomInt(1,100)<=17 and((LoadInteger(XY,(GetHandleId((GetAttacker()))),((4276))))==1)==false thencall IT5(GetAttacker(),GetTriggerUnit(),false,false)endifreturn falseendfunctionfunction KB1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function IQ5))set t=nullendfunctionfunction IU5 takes nothing returns nothingif IsUnitInGroup(GetEnumUnit(),ZWI)==false thencall GroupAddUnit(ZWI,GetEnumUnit())call IT5(ZHI,GetEnumUnit(),false,true)endifendfunctionfunction O05 takes integer id returns booleanif id==1093750840 or id==1093682515 or id==1093682996 or id==1093747768 or id==1093682997 or id==1096904043 thenreturn trueendifif id==852002 or id==852003 or id==852004 or id==852005 or id==852006 or id==852007 thenreturn trueendifif id>1000000 thenreturn trueendifreturn falseendfunctionfunction OI5 takes nothing returns booleanif(IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(ZHI))==true thenif P8I(ZZI,GetFilterUnit())<ZVI thenset ZVI=P8I(ZZI,GetFilterUnit())set ZGI=GetFilterUnit()endifendifreturn falseendfunctionfunction O15 takes unit TLI,unit TMI returns unitlocal group g=MDI()set CK=TLIset ZHI=TLIset ZGI=nullset ZVI=999999set ZZI=TMIcall GroupEnumUnitsInRange(g,GetUnitX(TMI),GetUnitY(TMI),4000,Condition(function OI5))call MCI(g)set g=nullreturn ZGIendfunctionfunction OO5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local real W03=(550+50*NGI)*0.02local real PI2=(LoadReal(XY,(MKI),(23)))local real P12=(LoadReal(XY,(MKI),(24)))local real xlocal real ylocal real alocal real dlocal string fxlocal group gif(GetTriggerEventId()==EVENT_WIDGET_DEATH and GetTriggerUnit()==TLI)or GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER or GetTriggerEventId()==EVENT_UNIT_ISSUED_POINT_ORDER or GetTriggerEventId()==EVENT_UNIT_ISSUED_TARGET_ORDER or A11(TLI)or(LoadReal(XY,(MKI),(442)))<(TimerGetElapsed(M))thenif(GetTriggerEventId()!=EVENT_UNIT_ISSUED_ORDER and GetTriggerEventId()!=EVENT_UNIT_ISSUED_POINT_ORDER and GetTriggerEventId()!=EVENT_UNIT_ISSUED_TARGET_ORDER)or((GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER or GetTriggerEventId()==EVENT_UNIT_ISSUED_POINT_ORDER or GetTriggerEventId()==EVENT_UNIT_ISSUED_TARGET_ORDER)and O05(GetIssuedOrderId())==false)thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(177))))call UnitRemoveAbility(TMI,1093809228)call UnitRemoveAbility(TMI,1110459716)call MCI((LoadGroupHandle(XY,(MKI),(187))))call FlushChildHashtable(XY,(MKI))call MZI(t)call SetUnitTimeScale(TLI,1)call KillUnit(QHI)call SetUnitPathing(TLI,true)call SetUnitVertexColor(TLI,255,255,255,255)call UnitRemoveAbility(TLI,1093744441)call QEI(GetUnitX(TLI),GetUnitY(TLI),200)if GetTriggerEventId()!=EVENT_WIDGET_DEATH thencall ResetUnitAnimation(TLI)endifendifelseif GetTriggerEventId()==EVENT_WIDGET_DEATH and GetTriggerUnit()==TMI thenset fx=""if IsPlayerAlly(GetLocalPlayer(),GetOwningPlayer(TLI))or TGI(GetLocalPlayer())thenset fx="Abilities\\Spells\\Other\\HowlOfTerror\\HowlTarget.mdl"endifcall UnitRemoveAbility(TMI,1093809228)call UnitRemoveAbility(TMI,1110459716)set TMI=O15(TLI,TMI)if TMI!=null thencall SaveUnitHandle(XY,(MKI),(17),(TMI))call DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call SaveEffectHandle(XY,(MKI),(175),(AddSpecialEffectTarget(fx,TMI,"overhead")))call SaveEffectHandle(XY,(MKI),(176),(AddSpecialEffectTarget(fx,TMI,"overhead")))call SaveReal(XY,(MKI),(442),(((TimerGetElapsed(M))+50)*1.0))call TriggerRegisterDeathEvent(t,TMI)elsecall DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(177))))call UnitRemoveAbility(TMI,1093809228)call UnitRemoveAbility(TMI,1110459716)call MCI((LoadGroupHandle(XY,(MKI),(187))))call FlushChildHashtable(XY,(MKI))call MZI(t)call SetUnitTimeScale(TLI,1)call KillUnit(QHI)call SetUnitPathing(TLI,true)call ResetUnitAnimation(TLI)call SetUnitVertexColor(TLI,255,255,255,255)call UnitRemoveAbility(TLI,1093744441)call SetUnitPosition(TLI,GetUnitX(TLI),GetUnitY(TLI))call QEI(GetUnitX(TLI),GetUnitY(TLI),500)endifelseset d=PAI(GetUnitX(TLI),GetUnitY(TLI),GetUnitX(TMI),GetUnitY(TMI))if d<100 thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(177))))call UnitRemoveAbility(TMI,1093809228)call UnitRemoveAbility(TMI,1110459716)call MCI((LoadGroupHandle(XY,(MKI),(187))))call FlushChildHashtable(XY,(MKI))call MZI(t)call SetUnitTimeScale(TLI,1)call KillUnit(QHI)set QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call UnitAddAbility(QHI,1093683027)call SetUnitAbilityLevel(QHI,1093683027,NGI)call IssueTargetOrder(QHI,"thunderbolt",TMI)call SetUnitPathing(TLI,true)call SetUnitVertexColor(TLI,255,255,255,255)call UnitRemoveAbility(TLI,1093744441)call SetUnitPosition(TLI,GetUnitX(TLI),GetUnitY(TLI))call QEI(GetUnitX(TLI),GetUnitY(TLI),200)set ZXI=NGIcall IssueTargetOrder(TLI,"attack",TMI)elseif GetTriggerEvalCount(t)==1 thencall DisableTrigger(t)call IssueImmediateOrder(TLI,"holdposition")call EnableTrigger(t)endifif ModuloInteger(GetTriggerEvalCount(t),65)==0 thenif GetUnitTypeId(TLI)==1160786520 thencall SetUnitAnimationByIndex(TLI,1)elsecall SetUnitAnimationByIndex(TLI,2)endifendifset a=PQI(TLI,TMI)*bj_DEGTORADcall SetUnitFacing(TLI,a*bj_RADTODEG)set x=PI2+W03*Cos(a)set y=P12+W03*Sin(a)call SetUnitX(TLI,x)call SetUnitY(TLI,y)call SetUnitX(QHI,GetUnitX(TMI))call SetUnitY(QHI,GetUnitY(TMI))call SaveReal(XY,(MKI),(23),((x)*1.0))call SaveReal(XY,(MKI),(24),((y)*1.0))set ZWI=(LoadGroupHandle(XY,(MKI),(187)))set g=MDI()set CK=TLIset ZHI=TLIcall GroupEnumUnitsInRange(g,x,y,325,Condition(function AT1))set ZXI=NGIcall ForGroup(g,function IU5)call MCI(g)set g=nullif d<3000 and GetUnitAbilityLevel(TMI,1093809228)==0 thenendifendifendifset t=nullset TLI=nullset TMI=nullset QHI=nullreturn falseendfunctionfunction O25 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local unit QHI=CreateUnit(GetOwningPlayer(TLI),1865429073,GetUnitX(TMI),GetUnitY(TMI),0)local integer NGI=GetUnitAbilityLevel(TLI,1093750840)local string fx=""if IsPlayerAlly(GetLocalPlayer(),GetOwningPlayer(TLI))or TGI(GetLocalPlayer())thenset fx="Abilities\\Spells\\Other\\HowlOfTerror\\HowlTarget.mdl"call PingMinimapEx(GetUnitX(TMI),GetUnitY(TMI),2,255,255,255,false)endifcall IssueTargetOrder(TLI,"move",TMI)call SetUnitPathing(TLI,false)if GetUnitTypeId(TLI)==1160786520 thencall SetUnitAnimationByIndex(TLI,1)elsecall SetUnitAnimationByIndex(TLI,2)endifcall SetUnitTimeScale(TLI,2.5)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093744441,false)call SetUnitVertexColor(TLI,255,255,255,100)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveReal(XY,(MKI),(442),(((TimerGetElapsed(M))+50)*1.0))call SaveReal(XY,(MKI),(23),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(24),((GetUnitY(TLI))*1.0))call SaveEffectHandle(XY,(MKI),(175),(AddSpecialEffectTarget(fx,TMI,"overhead")))call SaveEffectHandle(XY,(MKI),(176),(AddSpecialEffectTarget(fx,TMI,"overhead")))call SaveEffectHandle(XY,(MKI),(177),(AddSpecialEffectTarget("war3mapImported\\ShockwaveMissilePurple.mdx",TLI,"origin")))call SaveGroupHandle(XY,(MKI),(187),(MDI()))call TriggerRegisterTimerEvent(t,0.02,true)call TriggerRegisterDeathEvent(t,TLI)call TriggerRegisterDeathEvent(t,TMI)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_ISSUED_ORDER)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_ISSUED_POINT_ORDER)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_ISSUED_TARGET_ORDER)call TriggerAddCondition(t,Condition(function OO5))set t=nullset TLI=nullset TMI=nullset QHI=nullendfunctionfunction O35 takes nothing returns booleanif GetSpellAbilityId()==1093750840 and MBI(GetSpellTargetUnit())==false thencall O25()endifreturn falseendfunctionfunction K91 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function O35))set t=nullcall RVI(1093687350)endfunctionfunction O45 takes unit TLI,unit TMI returns nothinglocal trigger tlocal integer MKIlocal real NN2=Atan2(GetUnitY(TMI)-GetUnitY(TLI),GetUnitX(TMI)-GetUnitX(TLI))local integer NGI=4call IT5(TLI,TMI,true,true)set t=nullendfunctionfunction O55 takes nothing returns nothingcall O45(ZYI,GetEnumUnit())endfunctionfunction O65 takes unit TLI,unit Targer returns nothinglocal group g=MDI()set CK=TLIset ZYI=TLIcall GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),275,Condition(function AT1))call ForGroup(g,function O55)call MCI(g)set g=nullendfunctionfunction O75 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer MFI=GetTriggerEvalCount(t)local integer O85local integer NGIlocal real NN2local real PI2=(LoadReal(XY,(MKI),(23)))local real P12=(LoadReal(XY,(MKI),(24)))local real x=GetUnitX(TMI)local real y=GetUnitY(TMI)local real d=PAI(x,y,PI2,P12)call SaveReal(XY,(MKI),(23),((x)*1.0))call SaveReal(XY,(MKI),(24),((y)*1.0))if GetTriggerEventId()==EVENT_UNIT_DEATH or MFI==200 or d>1800 thencall SetUnitVertexColor(TLI,255,255,255,255)call UnitShareVision(TMI,GetOwningPlayer(TLI),false)call UnitRemoveAbility(TLI,1093744441)call FlushChildHashtable(XY,(MKI))call MZI(t)elseif MFI<100 thenset O85=MFIelseset O85=200-MFIendifcall SetUnitVertexColor(TLI,255,255,255,255*(100-O85)/100)if MFI==100 thenset NGI=(LoadInteger(XY,(MKI),(5)))set NN2=Atan2(GetUnitY(TMI)-GetUnitY(TLI),GetUnitX(TMI)-GetUnitX(TLI))call SetUnitPosition(TLI,GetUnitX(TMI)+80*Cos(NN2),GetUnitY(TMI)+80*Sin(NN2))call SetUnitAnimation(TLI,"attack")call IssueTargetOrder(TLI,"attack",TMI)if GetUnitAbilityLevel(TLI,1093682996)>0 thencall O45(TLI,TMI)elsecall O65(TLI,TMI)endifcall TKI(TLI,TMI,1,50+100*NGI)endifendifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction O95 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093682996)if NGI==0 thenset NGI=GetUnitAbilityLevel(TLI,1093747768)endifcall UnitShareVision(TMI,GetOwningPlayer(TLI),true)call IssueImmediateOrder(TLI,"halt")call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveReal(XY,(MKI),(23),((GetUnitX(TMI))*1.0))call SaveReal(XY,(MKI),(24),((GetUnitY(TMI))*1.0))call TriggerRegisterTimerEvent(t,0.001,true)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function O75))call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093744441,false)set t=nullset TLI=nullset TMI=nullendfunctionfunction OA5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))call SetUnitAnimation(TLI,"spell morph")call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullreturn falseendfunctionfunction OB5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))call UnitShareVision(TMI,GetOwningPlayer(TLI),false)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction OC5 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()call SaveUnitHandle(XY,(MKI),(2),(TLI))call TriggerRegisterTimerEvent(t,0.,true)call TriggerAddCondition(t,Condition(function OA5))set t=CreateTrigger()set MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(GetSpellTargetUnit()))call TriggerRegisterTimerEvent(t,1.,true)call TriggerAddCondition(t,Condition(function OB5))call UnitShareVision(GetSpellTargetUnit(),GetOwningPlayer(TLI),true)set t=nullset TLI=nullendfunctionfunction OD5 takes nothing returns booleanif GetSpellAbilityId()==1093682996 or GetSpellAbilityId()==1093747768 thenif MBI(GetSpellTargetUnit())==false thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT thencall O95()elsecall OC5()endifendifendifreturn falseendfunctionfunction KC1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CHANNEL)call TriggerAddCondition(t,Condition(function OD5))set t=nullendfunctionfunction OE5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093809973)if NGI==1 thencall QTI(TLI,1093809974)elseif NGI==2 thencall UnitRemoveAbility(TLI,1093809974)call QTI(TLI,1093809977)elseif NGI==3 thencall UnitRemoveAbility(TLI,1093809974)call UnitRemoveAbility(TLI,1093809977)call QTI(TLI,1093809975)elseif NGI==4 thencall UnitRemoveAbility(TLI,1093809974)call UnitRemoveAbility(TLI,1093809977)call UnitRemoveAbility(TLI,1093809975)call QTI(TLI,1093809976)endifset TLI=nullendfunctionfunction OF5 takes nothing returns booleanif GetLearnedSkill()==1093809973 and IsUnitIllusion(GetTriggerUnit())==false thencall OE5()endifreturn falseendfunctionfunction KF1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function OF5))set t=nullendfunctionfunction Sunder_SwitchConditions takes nothing returns booleanreturn GetSpellAbilityId()==1093678930endfunctionfunction OG5 takes nothing returns nothinglocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real OH5=(LoadReal(XY,(MKI),(295)))local real OZ5=(LoadReal(XY,(MKI),(296)))local integer NGI=GetUnitAbilityLevel(TLI,1093678929)local real OV5=0.33if NGI==2 thenset OV5=0.28elseif NGI==3 thenset OV5=0.23endifif GetSpellTargetUnit()==TLI thencall SetUnitState(TLI,UNIT_STATE_LIFE,RMaxBJ(GetUnitState(TLI,UNIT_STATE_MAX_LIFE)*OZ5*0.01,GetUnitState(TLI,UNIT_STATE_MAX_LIFE)*OV5))endifif GetSpellTargetUnit()==TMI thencall SetUnitLifePercentBJ(TMI,OH5)if GetUnitLifePercent(TMI)<25.00 and NGI==1 and GetUnitState(TMI,UNIT_STATE_LIFE)>1 thencall SetUnitLifePercentBJ(TMI,25.00)endifif GetUnitLifePercent(TMI)<20.00 and NGI==2 and GetUnitState(TMI,UNIT_STATE_LIFE)>1 thencall SetUnitLifePercentBJ(TMI,20.00)endifif GetUnitLifePercent(TMI)<15.00 and NGI==3 and GetUnitState(TMI,UNIT_STATE_LIFE)>1 thencall SetUnitLifePercentBJ(TMI,15.00)endifendifif GetTriggerEvalCount(t)==2 thencall FlushChildHashtable(XY,(MKI))call MZI(t)endifset TLI=nullset TMI=nullset t=nullendfunctionfunction OW5 takes nothing returns booleanif GetSpellAbilityId()==1093678930 thencall OG5()endifreturn falseendfunctionfunction OX5 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local unit QHIcall SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveReal(XY,(MKI),(295),((GetUnitLifePercent(TLI))*1.0))call SaveReal(XY,(MKI),(296),((GetUnitLifePercent(TMI))*1.0))call TriggerAddCondition(t,Condition(function OW5))set QHI=CreateUnit(GetOwningPlayer(TMI),1697656921,GetUnitX(TMI),GetUnitY(TMI),0)call TriggerRegisterUnitEvent(t,QHI,EVENT_UNIT_SPELL_EFFECT)call QTI(QHI,1093678930)call IssueTargetOrder(QHI,"thunderbolt",TLI)call ShowUnit(QHI,false)call SetUnitPathing(QHI,false)call SetUnitInvulnerable(QHI,true)call UnitApplyTimedLife(QHI,1112820806,0.2)set QHI=CreateUnit(GetOwningPlayer(TLI),1697656921,GetUnitX(TLI),GetUnitY(TLI),0)call TriggerRegisterUnitEvent(t,QHI,EVENT_UNIT_SPELL_EFFECT)call QTI(QHI,1093678930)call IssueTargetOrder(QHI,"thunderbolt",TMI)call ShowUnit(QHI,false)call SetUnitPathing(QHI,false)call SetUnitInvulnerable(QHI,true)call UnitApplyTimedLife(QHI,1112820806,0.2)set t=nullset TLI=nullset TMI=nullset QHI=nullendfunctionfunction OY5 takes nothing returns booleanif GetSpellAbilityId()==1093678929 thencall OX5()endifreturn falseendfunctionfunction KD1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function OY5))endfunctionfunction OJ5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit QP1=(LoadUnitHandle(XY,(MKI),(335)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))if GetTriggerEventId()==EVENT_WIDGET_DEATH thencall UnitRemoveAbility(TMI,1093809751)call UnitRemoveAbility(TMI,1110459722)call FlushChildHashtable(XY,(MKI))call MZI(t)if GetTriggerUnit()!=QP1 thencall KillUnit(QP1)endifelsecall IssueTargetOrder(QP1,"attack",TMI)if T6I(TMI)thencall UnitRemoveAbility(TMI,1093809751)call UnitRemoveAbility(TMI,1110459722)endifendifset t=nullset QP1=nullset TMI=nullreturn falseendfunctionfunction OK5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local unit QP1if GetSummoningUnit()==QHI thencall FlushChildHashtable(XY,(MKI))call MZI(t)set QP1=GetSummonedUnit()set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterDeathEvent(t,QP1)call TriggerRegisterDeathEvent(t,TMI)call TriggerRegisterTimerEvent(t,0.2,true)call TriggerAddCondition(t,Condition(function OJ5))call SaveUnitHandle(XY,(MKI),(335),(QP1))call SaveUnitHandle(XY,(MKI),(17),(TMI))call UnitAddAbility(QP1,1097625443)call SetUnitPosition(QP1,GetUnitX(TMI)+100,GetUnitY(TMI)+100)call IssueTargetOrder(QP1,"attack",TMI)call SetUnitMoveSpeed(QP1,522)call SetUnitVertexColorBJ(QP1,100,100,100,60)endifset t=nullset TMI=nullset TLI=nullset QHI=nullreturn falseendfunctionfunction OL5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093815130)local integer idlocal unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TLI),GetUnitY(TLI),0)local trigger tlocal integer MKIcall SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093809751,false)if A61(TMI)==false thencall O41(TMI,1093809751,1,1.5+NGI,1110459722)endifset t=CreateTrigger()set MKI=GetHandleId(t)call Q9I(t,EVENT_PLAYER_UNIT_SUMMON)call TriggerAddCondition(t,Condition(function OK5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(19),(QHI))call QTI(QHI,1093809227)call SetUnitAbilityLevel(QHI,1093809227,NGI)call IssueTargetOrderById(QHI,852274,TMI)set TLI=nullset TMI=nullset QHI=nullset t=nullcall QWI(MF,GetUnitX(TMI),GetUnitY(TMI))set TLI=nullendfunctionfunction OM5 takes nothing returns booleanif GetSpellAbilityId()==1093815130 thencall OL5()endifreturn falseendfunctionfunction KE1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function OM5))set t=nullendfunctionfunction ON5 takes nothing returns nothinglocal unit TLI=GetSummoningUnit()local unit QP1=GetSummonedUnit()call SelectUnitAddForPlayer(QP1,GetOwningPlayer(TLI))call UnitAddAbility(QP1,1093815129)call UnitRemoveAbility(QP1,1093815129)call SetUnitState(QP1,UNIT_STATE_LIFE,GetUnitState(QP1,UNIT_STATE_MAX_LIFE))call SetUnitPosition(QP1,GetUnitX(QP1),GetUnitY(QP1))set TLI=nullset QP1=nullendfunctionfunction OS5 takes nothing returns booleanif GetUnitAbilityLevel(GetSummonedUnit(),1110459721)>0 thencall ON5()endifreturn falseendfunctionfunction OT5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit QHIlocal integer NGI=GetUnitAbilityLevel(TLI,1093815128)set QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TLI),GetUnitY(TLI),0)call QTI(QHI,1093679185)call SetUnitAbilityLevel(QHI,1093679185,NGI)call IssueTargetOrderById(QHI,852274,TLI)set TLI=nullset QHI=nullendfunctionfunction OR5 takes nothing returns booleanif GetSpellAbilityId()==1093815128 and GetUnitTypeId(GetTriggerUnit())==1164277353 thencall OT5()endifreturn falseendfunctionfunction KZ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function OR5))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SUMMON)call TriggerAddCondition(t,Condition(function OS5))set t=nullendfunctionfunction OP5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local integer NGI=(LoadInteger(XY,(MKI),(5)))if GetTriggerEventId()==EVENT_UNIT_DEATH or GetTriggerEvalCount(t)>(4*(4+NGI))or T6I(TMI)or P8I(TLI,TMI)>700 thencall FlushChildHashtable(XY,(MKI))call MZI(t)call KillUnit(QHI)elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT thenif GetTriggerEvalCount(t)>1 and GetSpellAbilityId()==1093751361 thencall FlushChildHashtable(XY,(MKI))call MZI(t)call UnitRemoveAbility(TLI,1093751361)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093750856,true)call KillUnit(QHI)endifelseif IsUnitVisible(TMI,GetOwningPlayer(TLI))==false thenif(LoadInteger(XY,(MKI),(34)))==1 thencall FlushChildHashtable(XY,(MKI))call MZI(t)call KillUnit(QHI)elsecall SaveInteger(XY,(MKI),(34),(1))endifelsecall SaveInteger(XY,(MKI),(34),(0))if IsUnitAlly(TLI,GetOwningPlayer(TMI))==false thencall SetUnitState(TLI,UNIT_STATE_LIFE,GetUnitState(TLI,UNIT_STATE_LIFE)+NGI*25.0/4.0)elsecall SetUnitState(TMI,UNIT_STATE_LIFE,GetUnitState(TMI,UNIT_STATE_LIFE)+NGI*50.0/4.0)endifendifset t=nullset TLI=nullset TMI=nullset QHI=nullreturn falseendfunctionfunction OQ5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))if GetTriggerEventId()==EVENT_UNIT_DEATH thencall UnitRemoveAbility(TLI,1093751361)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093750856,true)call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEvalCount(t)==1 thencall IssueImmediateOrderById(TLI,851993)endifif IsUnitAlly(TLI,GetOwningPlayer(TMI))==false thencall SetUnitX(QHI,GetUnitX(TLI))call SetUnitY(QHI,GetUnitY(TLI))elsecall SetUnitX(QHI,GetUnitX(TMI))call SetUnitY(QHI,GetUnitY(TMI))endifendifset t=nullset TLI=nullset TMI=nullset QHI=nullreturn falseendfunctionfunction OU5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093750856)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit QHIif IsUnitAlly(TLI,GetOwningPlayer(TMI))==false thenset QHI=CreateUnit(GetOwningPlayer(TLI),1966092615,0,0,0)call QTI(QHI,1093678156)call SetUnitAbilityLevel(QHI,1093678156,NGI)call SetUnitX(QHI,GetUnitX(TLI))call SetUnitY(QHI,GetUnitY(TLI))call IssueTargetOrderById(QHI,852487,TMI)elsecall QTI(TLI,1093751361)call UnitMakeAbilityPermanent(TLI,true,1093751361)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093750856,false)set QHI=CreateUnit(DO,1966092615,0,0,0)call QTI(QHI,1093678156)call SetUnitAbilityLevel(QHI,1093678156,NGI)call SetUnitX(QHI,GetUnitX(TMI))call SetUnitY(QHI,GetUnitY(TMI))call IssueTargetOrderById(QHI,852487,TLI)endifcall TriggerRegisterTimerEvent(t,0.25,true)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function OP5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveInteger(XY,(MKI),(34),(0))set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.01,true)call TriggerRegisterUnitEvent(t,QHI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function OQ5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(19),(QHI))set TLI=nullset TMI=nullset t=nullendfunctionfunction A05 takes nothing returns booleanif GetSpellAbilityId()==1093750856 and GetUnitTypeId(GetSpellTargetUnit())!=1848651852 and(IsUnitAlly(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))or MBI(GetSpellTargetUnit())==false)thencall OU5()endifreturn falseendfunctionfunction KH1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function A05))endfunctionfunction AI5 takes nothing returns booleanreturn GetSpellAbilityId()==1093683252endfunctionfunction A15 takes nothing returns nothinglocal unit R7I=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(R7I,1093683252)local unit QHI=CreateUnit(GetOwningPlayer(R7I),1697656901,GetUnitX(R7I),GetUnitY(R7I),0)call UnitAddAbility(QHI,1093814862)call SetUnitAbilityLevel(QHI,1093814862,NGI)call IssueTargetOrderById(QHI,852274,R7I)endfunctionfunction KG1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function AI5))call TriggerAddAction(t,function A15)endfunctionfunction AO5 takes nothing returns booleanreturn GetSpellAbilityId()==1093678134 and MBI(GetSpellTargetUnit())==falseendfunctionfunction A25 takes nothing returns nothinglocal unit t=GetSpellTargetUnit()local real A35=(60.00+(50.00*I2R(GetUnitAbilityLevelSwapped(1093678134,GetTriggerUnit()))))call UnitDamageTargetBJ(GetTriggerUnit(),t,A35,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_COLD)call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",t,"chest"))endfunctionfunction KW1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function AO5))call TriggerAddAction(t,function A25)endfunctionfunction A45 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=GetEventDamageSource()local integer NGI=GetUnitAbilityLevel(TLI,1093678149)local real d=GetEventDamage()local real P1I=(LoadReal(XY,(MKI),(412)))local real FNO=(LoadReal(XY,(MKI),(411)))local real A55=650-50*NGIif NXI(GetOwningPlayer(TMI))thenif(FNO+ZJI)<(TimerGetElapsed(M))thenset P1I=0endifset FNO=(TimerGetElapsed(M))set P1I=P1I+dif P1I>A55 and GetUnitAbilityLevel(TLI,1112433775)==0 thenset P1I=0call CW1(TLI)call CG1(TLI,0,0)call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",TLI,"origin"))endifcall SaveReal(XY,(MKI),(412),((P1I)*1.0))call SaveReal(XY,(MKI),(411),((FNO)*1.0))endifset t=nullset TLI=nullreturn falseendfunctionfunction A65 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function A45))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(412),((0)*1.0))call SaveReal(XY,(MKI),(411),(((TimerGetElapsed(M)))*1.0))set t=nullset TLI=nullendfunctionfunction A75 takes nothing returns booleanif GetLearnedSkill()==1093678149 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093678149)==1 thencall A65()endifreturn falseendfunctionfunction KV1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function A75))set t=nullendfunctionfunction A85 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local group g=(LoadGroupHandle(XY,(MKI),(22)))call MCI(g)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset g=nullreturn falseendfunctionfunction A95 takes group g returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SaveGroupHandle(XY,(MKI),(22),(g))call TriggerRegisterTimerEvent(t,10,false)call TriggerAddCondition(t,Condition(function A85))set t=nullendfunctionfunction AA5 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local unit QHIlocal integer i=1local real x1=GetUnitX(N0I)local real y1=GetUnitY(N0I)local real x2local real y2local real TSIlocal real BP1local integer NGI=GetUnitAbilityLevel(N0I,1093810505)local group g=MDI()local real d=500if NGI==1 thenset BP1=1.5set TSI=200elseif NGI==2 thenset BP1=1.8set TSI=325elseif NGI==3 thenset BP1=2.25set TSI=450endifloopexitwhen i>16set x2=x1+(800)*Cos(22.5*i*bj_DEGTORAD)set y2=y1+(800)*Sin(22.5*i*bj_DEGTORAD)call CB1(N0I,null,TSI,BP1,0.52,x1,y1,x2,y2,250,g,false,775)set i=i+1endloopcall A95(g)set N0I=nullset QHI=nullset g=nullendfunctionfunction AB5 takes nothing returns booleanif GetSpellAbilityId()==1093810505 thencall AA5()endifreturn falseendfunctionfunction KX1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function AB5))call RVI(1093687350)set t=nullendfunctionfunction AC5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real YSO=(LoadReal(XY,(GetHandleId(TMI)),(715)))call FlushChildHashtable(XY,(MKI))call MZI(t)if GetTriggerEventId()==EVENT_WIDGET_DEATH or YSO<(TimerGetElapsed(M))thencall UnitRemoveAbility(TMI,1093808696)call UnitRemoveAbility(TMI,1110459704)endifset t=nullset TMI=nullreturn falseendfunctionfunction AD5 takes unit TMI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call QTI(TMI,1093808696)call TriggerRegisterDeathEvent(t,TMI)call TriggerRegisterTimerEvent(t,6,false)call TriggerAddCondition(t,Condition(function AC5))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveReal(XY,(GetHandleId(TMI)),(715),((5.9+(TimerGetElapsed(M)))*1.0))set t=nullendfunctionfunction AE5 takes nothing returns nothingif GetUnitTypeId(GetEnumUnit())==1848651852 thenreturnendifif A61(GetEnumUnit())==false thencall AD5(GetEnumUnit())endifcall SetPlayerAbilityAvailable(GetOwningPlayer(GetEnumUnit()),1093808696,false)call TKI(ZKI,GetEnumUnit(),2,25+50*ZLI)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\CrushingWave\\CrushingWaveDamage.mdl",GetEnumUnit(),"chest"))endfunctionfunction AF5 takes nothing returns nothinglocal group g=MDI()local unit TLI=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093808694)set CK=TLIset ZLI=NGIset ZKI=TLIcall GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),425,Condition(function BO1))call ForGroup(g,function AE5)call MCI(g)set g=nullset TLI=nullendfunctionfunction AG5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))call FlushChildHashtable(XY,(MKI))call MZI(t)call SetUnitTimeScale(TLI,1)set t=nullset TLI=nullreturn falseendfunctionfunction AH5 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()call TriggerRegisterTimerEvent(t,0.3,false)call TriggerRegisterDeathEvent(t,TLI)call TriggerAddCondition(t,Condition(function AG5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SetUnitTimeScale(TLI,2)set t=nullset TLI=nullendfunctionfunction AZ5 takes nothing returns booleanif GetSpellAbilityId()==1093808694 thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT thencall AF5()elsecall AH5()endifendifreturn falseendfunctionfunction KY1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function AZ5))set t=nullendfunctionconstant function Healing_RawCode takes nothing returns integerreturn 1093685074endfunctionfunction AV5 takes nothing returns booleanreturn GetSpellAbilityId()==(1093685074)endfunctionfunction AW5 takes nothing returns booleanreturn IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(XO))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0endfunctionfunction AX5 takes nothing returns nothingcall TKI(XO,GetEnumUnit(),2,JO)endfunctionfunction AY5 takes unit TLI,unit TMI,real TSI returns nothinglocal group GK1=MDI()local boolexpr PI1=Condition(function AW5)set XO=TLIset JO=TSIcall GroupEnumUnitsInRange(GK1,GetUnitX(TMI),GetUnitY(TMI),185+25,PI1)call ForGroup(GK1,function AX5)call MCI(GK1)endfunctionfunction AJ5 takes nothing returns booleanreturn IsUnitInGroup(GetFilterUnit(),B2)==false and IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and QPI(GetFilterUnit())==false and GetFilterUnit()!=ZMIendfunctionfunction AK5 takes group AL5,unit AM5,unit TLI,unit OriginalTargetreturns returns unitlocal group GK1=MDI()local boolexpr PI1=Condition(function AJ5)local unit AN5=nulllocal unit AS5set B2=AL5set XO=TLIcall GroupEnumUnitsInRange(GK1,GetUnitX(AM5),GetUnitY(AM5),500,PI1)set AS5=FirstOfGroup(GK1)set AN5=AS5loopexitwhen AS5==nullif GetUnitState(AS5,UNIT_STATE_LIFE)!=GetUnitState(AS5,UNIT_STATE_MAX_LIFE)thenif AS5!=TLI and IsUnitType(AS5,UNIT_TYPE_HERO)==true and IsUnitType(AN5,UNIT_TYPE_HERO)==false thenset AN5=AS5elseif AS5!=TLI and GetUnitState(AS5,UNIT_STATE_LIFE)<GetUnitState(AN5,UNIT_STATE_LIFE)and IsUnitType(AS5,UNIT_TYPE_HERO)==true and IsUnitType(AN5,UNIT_TYPE_HERO)==true thenset AN5=AS5elseif AS5!=TLI and IsUnitType(AN5,UNIT_TYPE_HERO)==false and GetUnitState(AS5,UNIT_STATE_LIFE)<GetUnitState(AN5,UNIT_STATE_LIFE)thenset AN5=AS5elseif AS5==TLI thenset AN5=AS5endifendifcall GroupRemoveUnit(GK1,AS5)set AS5=FirstOfGroup(GK1)endloopcall MCI(GK1)return AN5endfunctionfunction AT5 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local string AR5="Abilities\\Spells\\Undead\\ReplenishMana\\ReplenishManaCaster.mdl"local string AP5="origin"local unit array AQ5local integer xlocal integer i=1local integer NGI=GetUnitAbilityLevel(N0I,(1093685074))local real TSI=60+NGI*20local group AL5=MDI()local integer AU5local boolean B05=falseset ZMI=N0Iif NGI==1 thenset AU5=3elseif NGI==2 thenset AU5=4elseif NGI==3 thenset AU5=5elseif NGI==4 thenset AU5=6endifcall SetUnitState(N0I,UNIT_STATE_LIFE,GetUnitState(N0I,UNIT_STATE_LIFE)+TSI)call AY5(N0I,N0I,TSI)call GroupAddUnit(AL5,N0I)call PKI(AR5,N0I,AP5,2)if TMI==N0I thenset AQ5[i]=AK5(AL5,N0I,N0I,TMI)elseset AQ5[i]=TMIendifif AQ5[i]==null thencall MCI(AL5)returnendifcall SetUnitState(AQ5[i],UNIT_STATE_LIFE,GetUnitState(AQ5[i],UNIT_STATE_LIFE)+TSI)call AY5(N0I,AQ5[i],TSI)call GroupAddUnit(AL5,AQ5[i])call PKI(AR5,AQ5[i],AP5,2)call QII("SPLK",GetUnitX(N0I),GetUnitY(N0I),GetUnitX(AQ5[i]),GetUnitY(AQ5[i]),0.3,0.5,0.9,1,0.7)set i=2loopexitwhen i>AU5 or B05set AQ5[i]=AK5(AL5,AQ5[i-1],N0I,TMI)if AQ5[i]==null thenset B05=trueelsecall GroupAddUnit(AL5,AQ5[i])call PKI(AR5,AQ5[i],AP5,2)call SetUnitState(AQ5[i],UNIT_STATE_LIFE,GetUnitState(AQ5[i],UNIT_STATE_LIFE)+TSI)call AY5(N0I,AQ5[i],TSI)call QII("SPLK",GetUnitX(AQ5[i-1]),GetUnitY(AQ5[i-1]),GetUnitX(AQ5[i]),GetUnitY(AQ5[i]),0.3,0.5,0.9,1,0.7)set i=i+1endifendloopcall MCI(AL5)endfunctionfunction M11 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function AV5))call TriggerAddAction(t,function AT5)endfunctionconstant function BlowDart_RawCode takes nothing returns integerreturn 1093818422endfunctionconstant function BlowDart_SlowCode takes nothing returns integerreturn 1093684810endfunctionconstant function BlowDart_StunCode takes nothing returns integerreturn 1093684811endfunctionconstant function BlowDart_IconCode takes nothing returns integerreturn 1093685079endfunctionfunction BI5 takes nothing returns booleanreturn GetSpellAbilityId()==(1093818422)and MBI(GetSpellTargetUnit())==falseendfunctionfunction B15 takes unit TLI,unit TMI,integer NGI returns nothinglocal unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call QTI(QHI,(1093684810))call SetUnitAbilityLevel(QHI,(1093684810),NGI)call IssueTargetOrder(QHI,"slow",TMI)endfunctionfunction BO5 takes nothing returns nothinglocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=GetUnitAbilityLevel(TLI,(1093818422))local integer X22=GetTriggerExecCount(t)local real TSI=8+6*NGIlocal unit QHI=(LoadUnitHandle(XY,(MKI),(19)))if NGI==1 thencall QTI(TMI,(1093685079))if X22==1 thencall B15(TLI,TMI,1)endifif X22==2 thencall B15(TLI,TMI,1)endifif X22>2 thencall TKI(QHI,TMI,2,TSI)endifif X22==8 thencall UnitRemoveAbility(TMI,(1093685079))call FlushChildHashtable(XY,(MKI))call MZI(t)endifendifif NGI==2 thencall QTI(TMI,(1093685079))if X22==1 thencall B15(TLI,TMI,1)endifif X22==2 thencall B15(TLI,TMI,2)endifif X22>2 thencall TKI(QHI,TMI,2,TSI)endifif X22==8 thencall UnitRemoveAbility(TMI,(1093685079))call FlushChildHashtable(XY,(MKI))call MZI(t)endifendifif NGI==3 thencall QTI(TMI,(1093685079))if X22==1 thencall B15(TLI,TMI,2)endifif X22==2 thencall B15(TLI,TMI,3)endifif X22>2 thencall TKI(QHI,TMI,2,TSI)endifif X22==8 thencall UnitRemoveAbility(TMI,(1093685079))call FlushChildHashtable(XY,(MKI))call MZI(t)endifendifif NGI==4 thencall QTI(TMI,(1093685079))if X22==1 thencall B15(TLI,TMI,2)endifif X22==2 thencall BQ1(TLI,TMI,1.0)endifif X22>2 thencall TKI(QHI,TMI,2,TSI)endifif X22==8 thencall UnitRemoveAbility(TMI,(1093685079))call FlushChildHashtable(XY,(MKI))call MZI(t)endifendifset QHI=nullendfunctionfunction B25 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=CKlocal unit TMI=DKlocal unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddAction(t,function BO5)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(19),(QHI))call B15(TLI,TMI,1)set QHI=nullendfunctionfunction B35 takes nothing returns nothinglocal trigger t=U6I(GetTriggerUnit(),GetSpellTargetUnit(),1747993937,"B25",1300,true)local integer MKI=GetHandleId(t)set t=nullendfunctionfunction MO1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function BI5))call TriggerAddAction(t,function B35)call RVI((1093684810))call RVI((1093684811))endfunctionfunction B45 takes nothing returns nothinglocal unit TMI=GetEnumUnit()if QPI(TMI)==false thencall UnitRemoveAbility(TMI,1093684821)call UnitRemoveAbility(TMI,1093684823)elseif IsUnitType(TMI,UNIT_TYPE_HERO)==true thencall UPI(TMI,1093684821,5.1)call UPI(TMI,1093684823,5.1)endifset TMI=nullendfunctionfunction B55 takes nothing returns nothinglocal unit TMI=GetEnumUnit()if QPI(TMI)==false thenif IsUnitAlly(TMI,VK)==false thenif TJ==0 thencall QTI(TMI,1093684821)elsecall SetUnitAbilityLevel(TMI,1093684821,R2I(ZNI*(TJ+1)))endifelseif TJ==0 thencall QTI(TMI,1093684823)elsecall SetUnitAbilityLevel(TMI,1093684823,R2I(ZNI*(TJ+1)))endifendifendifset TMI=nullendfunctionfunction B65 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local group g=(LoadGroupHandle(XY,(MKI),(22)))local player p=(LoadPlayerHandle(XY,(MKI),(54)))local integer MFI=GetTriggerEvalCount(t)local integer BP1=(LoadInteger(XY,(MKI),(188)))local real B75=(LoadReal(XY,(MKI),(68)))set ZNI=B75set VK=pset TJ=MFIif MFI>=BP1/1.0 thencall ForGroup(g,function B45)call MCI(g)call FlushChildHashtable(XY,(MKI))call MZI(t)elsecall ForGroup(g,function B55)endifset t=nullset g=nullset p=nullreturn falseendfunctionfunction B85 takes nothing returns nothingcall PKI(XK,GetEnumUnit(),"chest",3)call PKI(XK,GetEnumUnit(),"chest",3)call PKI(XK,GetEnumUnit(),"right hand",3)call PKI(XK,GetEnumUnit(),"left hand",3)endfunctionfunction B95 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local location l=GetSpellTargetLoc()local group g=MDI()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer NGI=GetUnitAbilityLevel(N0I,1093742673)local integer BP1=24local real B75=0.5+0.25*NGIlocal real x=GetLocationX(l)local real y=GetLocationY(l)local unit QHI=CreateUnit(GetOwningPlayer(N0I),1747988535,x,y,0)local integer a=0local boolean OF3=falseif NGI==0 thenset NGI=GetUnitAbilityLevel(N0I,1093747778)set BP1=24set B75=0.75+0.25*NGIset OF3=trueendifcall RemoveLocation(l)set XK=""set TJ=BP1set a=255set XK="Abilities\\Weapons\\AvengerMissile\\AvengerMissile.mdl"call SetUnitVertexColor(QHI,255,255,255,a)call UnitApplyTimedLife(QHI,1112820806,5)if OF3 thencall GroupEnumUnitsInRange(g,x,y,800,Condition(function BK1))elsecall GroupEnumUnitsInRange(g,x,y,600,Condition(function BK1))endifcall ForGroup(g,function B85)call SaveGroupHandle(XY,(MKI),(22),(g))call SavePlayerHandle(XY,(MKI),(54),(GetOwningPlayer(N0I)))call SaveInteger(XY,(MKI),(188),(BP1))call SaveReal(XY,(MKI),(68),((B75)*1.0))call TriggerRegisterTimerEvent(t,1.0,true)call TriggerAddCondition(t,Condition(function B65))call TriggerEvaluate(t)set N0I=nullset l=nullset g=nullset t=nullendfunctionfunction BA5 takes nothing returns booleanif GetSpellAbilityId()==1093742673 or GetSpellAbilityId()==1093747778 thencall B95()endifreturn falseendfunctionfunction M21 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function BA5))call RVI(1093684821)call RVI(1093684823)set t=nullendfunctionfunction BB5 takes string Q3I,unit TMI,unit N0I returns nothinglocal texttag tt=CreateTextTag()call SetTextTagText(tt,Q3I,0.033)call SetTextTagPosUnit(tt,TMI,64)call SetTextTagColor(tt,160,0,255,255)call SetTextTagVelocity(tt,0,0.0355)call SetTextTagFadepoint(tt,0.15)call SetTextTagPermanent(tt,false)call SetTextTagLifespan(tt,0.65)if IsUnitAlly(N0I,GetLocalPlayer())or TGI(GetLocalPlayer())thencall SetTextTagVisibility(tt,true)elsecall SetTextTagVisibility(tt,false)endifset tt=nullendfunctionfunction BC5 takes real BP1 returns stringif BP1>4.5 thenreturn"5.0"elseif BP1>4.0 thenreturn"4.5"elseif BP1>3.5 thenreturn"4.0"elseif BP1>3.0 thenreturn"3.5"elseif BP1>2.5 thenreturn"3.0"elseif BP1>2.0 thenreturn"2.5"elseif BP1>1.5 thenreturn"2.0"elseif BP1>1.0 thenreturn"1.5"elseif BP1>0.5 thenreturn"1.0"elseif BP1>0.0 thenreturn"0.5"elsereturn"0.0"endifreturn" "endfunctionfunction BD5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer MFI=GetTriggerEvalCount(t)if MFI>11 thencall FlushChildHashtable(XY,(MKI))call MZI(t)elsecall BB5(BC5(5.5-0.5*MFI),TMI,TMI)endifset t=nullset TMI=nullreturn falseendfunctionfunction BE5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real TSI=(LoadReal(XY,(MKI),(20)))local real BF5=RQI(GetUnitState(TMI,UNIT_STATE_LIFE)-TSI,1)local real BG5=(LoadReal(XY,(GetHandleId(TMI)),(243)))call SetUnitState(TMI,UNIT_STATE_LIFE,BF5)call SaveReal(XY,(GetHandleId(TMI)),(243),((BG5-TSI)*1.0))call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TMI=nullreturn falseendfunctionfunction BH5 takes unit TMI,real TSI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real BG5=(LoadReal(XY,(GetHandleId(TMI)),(243)))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveReal(XY,(MKI),(20),((TSI)*1.0))call SaveReal(XY,(GetHandleId(TMI)),(243),((BG5+TSI)*1.0))call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function BE5))set t=nullendfunctionfunction BZ5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMIlocal real IZ4local real TSIlocal integer MFI=GetTriggerEvalCount(t)local real BG5local real BV5=(LoadReal(XY,(MKI),(389)))local real BW5=(LoadReal(XY,(MKI),(390)))if BV5!=(TimerGetElapsed(M))thenset BV5=(TimerGetElapsed(M))set BW5=0call SaveReal(XY,(MKI),(389),((BV5)*1.0))call SaveReal(XY,(MKI),(390),((BW5)*1.0))endifif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenset TMI=GetTriggerUnit()set BG5=(LoadReal(XY,(GetHandleId(TMI)),(243)))set IZ4=GetUnitState(TMI,UNIT_STATE_LIFE)set TSI=GetEventDamage()if((IZ4-BG5-BW5)-TSI)<1 thencall SetUnitState(TMI,UNIT_STATE_LIFE,IZ4+TSI+BW5)call BH5(TMI,TSI)elseset BW5=BW5+TSIcall SaveReal(XY,(MKI),(390),((BW5)*1.0))endifelsecall SaveInteger(XY,(GetHandleId(((LoadUnitHandle(XY,(MKI),(17)))))),((2485)),(2))call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call UnitRemoveAbility((LoadUnitHandle(XY,(MKI),(17))),1093808457)call UnitRemoveAbility((LoadUnitHandle(XY,(MKI),(17))),1110456132)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset TMI=nullset t=nullreturn falseendfunctionfunction BX5 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()call QTI(TMI,1093808457)call TriggerRegisterTimerEvent(t,5,false)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function BZ5))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("war3mapImported\\DarkHands.mdx",TMI,"overhead")))call SaveReal(XY,(GetHandleId(TMI)),(243),((0)*1.0))call SaveReal(XY,(MKI),(389),(((TimerGetElapsed(M)))*1.0))call SaveReal(XY,(MKI),(390),((0)*1.0))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(GetHandleId((TMI))),((2485)),(1))set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.5,true)call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function BD5))call SaveUnitHandle(XY,(MKI),(17),(TMI))set t=nullset TLI=nullset TMI=nullendfunctionfunction BY5 takes nothing returns booleanif GetSpellAbilityId()==1093742668 thencall BX5()endifreturn falseendfunctionfunction M31 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function BY5))set t=nullendfunctionfunction BJ5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=(LoadInteger(XY,(MKI),(5)))if GetTriggerEvalCount(t)>5 or GetUnitAbilityLevel(TMI,1110458705)==0 or GetTriggerEventId()==EVENT_WIDGET_DEATH thencall MZI(t)call FlushChildHashtable(XY,(MKI))elsecall TKI(TLI,TMI,1,30*NGI-30)call Q5I(I2S(30*NGI-30),3,TMI,0.025,160,255,0,230)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction BK5 takes unit TLI,unit TMI,integer NGI returns nothinglocal unit QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)local trigger tlocal integer MKIcall QTI(QHI,1093744462)call SetUnitAbilityLevel(QHI,1093744462,NGI)if IssueTargetOrder(QHI,"shadowstrike",TMI)thencall TKI(TLI,TMI,1,25*NGI)call Q5I(I2S(25*NGI)+"!",3,TMI,0.025,160,255,0,230)if NGI>1 thenset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,3,true)call TriggerRegisterDeathEvent(t,TMI)call TriggerAddCondition(t,Condition(function BJ5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(5),(NGI))set t=nullendifendifset QHI=nullendfunctionfunction BL5 takes nothing returns nothinglocal unit TMI=GetEnumUnit()if IsUnitInGroup(TMI,HK)==false thencall BK5(ZTI,TMI,ZSI)call GroupAddUnit(HK,TMI)endifset TMI=nullendfunctionfunction BM5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local group g=(LoadGroupHandle(XY,(MKI),(22)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local real NN2=(LoadReal(XY,(MKI),(13)))local group DW3local real xlocal real ylocal real BN5local real BS5local real NT2=30local unit BT5set ZSI=NGIif GetTriggerEvalCount(t)>28 thencall MCI(g)call FlushChildHashtable(XY,(MKI))call MZI(t)call ShowUnit(QHI,false)call KillUnit(QHI)elseset x=GetUnitX(QHI)set y=GetUnitY(QHI)set DW3=MDI()set HK=gset CK=N0Iset ZTI=N0Icall GroupEnumUnitsInRange(DW3,x,y,150,Condition(function BO1))call ForGroup(DW3,function BL5)call MCI(DW3)set BN5=RCI(x+NT2*Cos(NN2*bj_DEGTORAD))set BS5=RGI(y+NT2*Sin(NN2*bj_DEGTORAD))call SetUnitX(QHI,BN5)call SetUnitY(QHI,BS5)if ModuloInteger(GetTriggerEvalCount(t),3)==0 thenset BT5=CreateUnit(GetOwningPlayer(QHI),1865429335,BN5,BS5,0)call KillUnit(BT5)set BT5=nullendifendifset t=nullset g=nullset DW3=nullset QHI=nullset N0I=nullreturn falseendfunctionfunction BR5 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local group g=MDI()local unit N0I=GetTriggerUnit()local location l=GetSpellTargetLoc()local real x1=GetUnitX(N0I)local real y1=GetUnitY(N0I)local real x2=GetLocationX(l)local real y2=GetLocationY(l)local real NN2=PUI(x1,y1,x2,y2)local integer NGI=GetUnitAbilityLevel(N0I,1093744435)local unit QHI=CreateUnit(GetOwningPlayer(N0I),1747990347,x1,y1,NN2)call QWI(VE,x1,y1)call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveGroupHandle(XY,(MKI),(22),(g))call SaveReal(XY,(MKI),(13),((NN2)*1.0))call SaveUnitHandle(XY,(MKI),(14),(N0I))call TriggerRegisterTimerEvent(t,0.025,true)call TriggerAddCondition(t,Condition(function BM5))call RemoveLocation(l)set t=nullset QHI=nullset g=nullset N0I=nullset l=nullendfunctionfunction BP5 takes nothing returns booleanif GetSpellAbilityId()==1093744435 thencall BR5()endifreturn falseendfunctionfunction KJ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function BP5))set t=nullendfunctionfunction BQ5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real TSI=(LoadReal(XY,(MKI),(20)))local real BP1=(LoadReal(XY,(MKI),(57)))local real RI4=0.75if IsUnitType(TMI,UNIT_TYPE_HERO)==false and IsUnitIllusion(TMI)==false thenset RI4=1.0endifif GetUnitState(TMI,UNIT_STATE_LIFE)<=TSI*RI4 thenset TSI=RQI(GetUnitState(TMI,UNIT_STATE_LIFE)/RI4-2,0)endifif GetTriggerEventId()==EVENT_WIDGET_DEATH thencall UnitRemoveAbility(TMI,1093752629)call UnitRemoveAbility(TMI,1110454840)call MZI(t)call FlushChildHashtable(XY,(MKI))elseset BP1=BP1-1call SaveReal(XY,(MKI),(57),((BP1)*1.0))call TKI(TLI,TMI,1,TSI)if BP1<=0 thencall UnitRemoveAbility(TMI,1093752629)call UnitRemoveAbility(TMI,1110454840)call MZI(t)call FlushChildHashtable(XY,(MKI))endifendifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction BU5 takes unit TMI,unit TLI,real BP1,real TSI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call QTI(TMI,1093752629)call TriggerRegisterDeathEvent(t,TMI)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function BQ5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveReal(XY,(MKI),(20),((TSI)*1.0))call SaveReal(XY,(MKI),(57),((BP1)*1.0))call TriggerEvaluate(t)set t=nullendfunctionfunction C05 takes nothing returns nothingif GetUnitAbilityLevel(GetEnumUnit(),1093752629)==0 thencall BU5(GetEnumUnit(),ZRI,ZPI,ZQI)endifendfunctionfunction CI5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit UII=(LoadUnitHandle(XY,(MKI),(45)))local real BP1=(LoadReal(XY,(MKI),(57)))local real TSI=(LoadReal(XY,(MKI),(20)))local group gif GetTriggerEventId()==EVENT_WIDGET_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseset g=MDI()set CK=TLIset ZRI=TLIset ZPI=BP1set ZQI=TSIcall GroupEnumUnitsInRange(g,GetUnitX(UII),GetUnitY(UII),256+25,Condition(function BI1))call ForGroup(g,function C05)call MCI(g)set g=nullendifset t=nullset TLI=nullset UII=nullreturn falseendfunctionfunction C15 takes unit UII,unit TLI,integer NGI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real BP1=12local real TSI=36if NGI==2 thenset BP1=14set TSI=58elseif NGI==3 thenset BP1=15set TSI=81elseif NGI==4 thenset BP1=16set TSI=108endifcall TriggerRegisterTimerEvent(t,0.03,true)call TriggerRegisterDeathEvent(t,UII)call TriggerAddCondition(t,Condition(function CI5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(45),(UII))call SaveReal(XY,(MKI),(20),((TSI)*1.0))call SaveReal(XY,(MKI),(57),((BP1)*1.0))set t=nullendfunctionfunction CO5 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local integer C25local integer i=1local real x=GetUnitX(N0I)local real y=GetUnitY(N0I)local unit QHIif GetSpellAbilityId()==1093677363 thenset C25=GetUnitAbilityLevel(N0I,1093677363)elseset C25=GetUnitAbilityLevel(N0I,1093681462)+1endifloopexitwhen i>18set QHI=CreateUnit(GetOwningPlayer(N0I),1697657143,x,y,0)call IssuePointOrder(QHI,"move",x+675*Cos(i*20*bj_DEGTORAD),y+675*Sin(i*20*bj_DEGTORAD))call UnitApplyTimedLife(QHI,1112820806,1.15)call C15(QHI,N0I,C25)set i=i+1endloopset N0I=nullset QHI=nullendfunctionfunction C35 takes nothing returns booleanif GetSpellAbilityId()==1093677363 or GetSpellAbilityId()==1093681462 thencall CO5()endifreturn falseendfunctionfunction KK1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function C35))set t=nullendfunctionfunction C45 takes nothing returns nothinglocal unit TLI=GetSummoningUnit()local unit TMI=GetSummonedUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093684569)if NGI>0 thencall QTI(TMI,1093684569)call SetUnitAbilityLevel(TMI,1093684569,NGI)endifset TLI=nullset TMI=nullendfunctionfunction C55 takes nothing returns booleanlocal integer SVI=GetUnitTypeId(GetSummonedUnit())if SVI==1865429076 or SVI==1865429077 or SVI==1865429078 or SVI==1865429079 thencall C45()endifreturn falseendfunctionfunction KL1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SUMMON)call TriggerAddCondition(t,Condition(function C55))set t=nullendfunctionfunction C65 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))call EW1(TLI,0)call SaveInteger(XY,(GetHandleId((TLI))),((4277)),(2))set t=nullset TLI=nullreturn falseendfunctionfunction C75 takes unit FKO,unit TMI returns nothinglocal real KM4=100*GetUnitState(TMI,UNIT_STATE_LIFE)/GetUnitState(TMI,UNIT_STATE_MAX_LIFE)local real BC2=2.5*GetUnitAbilityLevel(FKO,1093746995)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer FinalBonuscall SaveInteger(XY,(GetHandleId((FKO))),((4277)),(1))call TriggerRegisterTimerEvent(t,0.35,false)call TriggerAddCondition(t,Condition(function C65))call SaveUnitHandle(XY,(MKI),(2),(FKO))if IsUnitType(TMI,UNIT_TYPE_HERO)==false thenset BC2=BC2/2endifif KM4>80 thencall EW1(FKO,R2I(BC2))elseif KM4>60 thencall EW1(FKO,R2I(BC2*2))elseif KM4>40 thencall EW1(FKO,R2I(BC2*2*2))elseif KM4>20 thencall EW1(FKO,R2I(BC2*2*2*2))elsecall EW1(FKO,R2I(BC2*2*2*2*2))endifset t=nullendfunctionfunction C85 takes nothing returns booleanif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_CAST thenif GetSpellAbilityId()==1093679446 and GetUnitAbilityLevel(GetTriggerUnit(),1093746995)>0 thencall C75(GetTriggerUnit(),GetSpellTargetUnit())endifelseif GetUnitAbilityLevel(GetAttacker(),1093746995)>0 and IsUnitIllusion(GetAttacker())==false and IsUnitEnemy(GetAttacker(),GetOwningPlayer(GetTriggerUnit()))==true and((LoadInteger(XY,(GetHandleId((GetAttacker()))),((4277))))==1)==false thencall C75(GetAttacker(),GetTriggerUnit())endifendifreturn falseendfunctionfunction KM1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function C85))set t=nullendfunctionfunction C95 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local real YSO=(LoadReal(XY,(GetHandleId(TMI)),(684)))if GetTriggerEventId()==EVENT_WIDGET_DEATH or YSO<(TimerGetElapsed(M))or T6I(TMI)thencall FlushChildHashtable(XY,(MKI))call MZI(t)call SaveReal(XY,(GetHandleId(TMI)),(684),((0)*1.0))call UnitRemoveAbility(TMI,1093808983)call UnitRemoveAbility(TMI,1093808981)call UnitRemoveAbility(TMI,1093808982)call UnitRemoveAbility(TMI,1093808984)call UnitRemoveAbility(TMI,1110459713)elsecall TKI(TLI,TMI,1,5+5*NGI)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction CA5 takes unit TLI,unit TMI returns nothinglocal trigger tlocal integer MKIlocal real YSO=(LoadReal(XY,(GetHandleId(TMI)),(684)))local integer NGI=GetUnitAbilityLevel(TLI,1093684557)if YSO>(TimerGetElapsed(M))thencall SaveReal(XY,(GetHandleId(TMI)),(684),(((TimerGetElapsed(M))+ZUI)*1.0))elseset t=CreateTrigger()set MKI=GetHandleId(t)call SaveReal(XY,(GetHandleId(TMI)),(684),(((TimerGetElapsed(M))+ZUI)*1.0))call TriggerRegisterTimerEvent(t,1,true)call TriggerRegisterDeathEvent(t,TMI)call TriggerAddCondition(t,Condition(function C95))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(5),(NGI))if A61(TMI)==false thenif NGI==1 thencall QTI(TMI,1093808983)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093808983,false)elseif NGI==2 thencall QTI(TMI,1093808981)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093808981,false)elseif NGI==3 thencall QTI(TMI,1093808982)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093808982,false)elseif NGI==4 thencall QTI(TMI,1093808984)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093808984,false)endifendifendifset t=nullset TLI=nullset TMI=nullendfunctionfunction CB5 takes nothing returns booleanlocal unit TLI=GetTriggerUnit()local unit TMI=GetEventDamageSource()if T7I(TMI)thenset TMI=(K1[GetPlayerId(GetOwningPlayer((TMI)))])endifif IsUnitType(TMI,UNIT_TYPE_STRUCTURE)==false and IsUnitEnemy(TLI,GetOwningPlayer(TMI))and T6I(TMI)==false and GetUnitAbilityLevel(TLI,1112433775)==0 thencall CA5(TLI,TMI)endifreturn falseendfunctionfunction CC5 takes nothing returns nothinglocal trigger t=CreateTrigger()call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function CB5))call SaveUnitHandle(XY,(GetHandleId(t)),(14),(GetTriggerUnit()))set t=nullendfunctionfunction CD5 takes nothing returns booleanif GetLearnedSkill()==1093684557 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093684557)==1 thencall CC5()endifreturn falseendfunctionfunction KN1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function CD5))set t=nullendfunctionfunction CE5 takes nothing returns nothinglocal unit TMI=GetSpellTargetUnit()call UnitRemoveAbility(TMI,1111847784)call UnitRemoveAbility(TMI,1110458705)set TMI=nullendfunctionfunction CF5 takes nothing returns booleanif GetSpellAbilityId()==1093679152 or GetSpellAbilityId()==1093752154 thencall CE5()endifreturn falseendfunctionfunction KS1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function CF5))set t=nullendfunctionfunction CG5 takes nothing returns booleanreturn GetSpellAbilityId()==1093679192endfunctionfunction CH5 takes nothing returns nothinglocal location O4O=GetUnitLoc(GetSpellAbilityUnit())call CreateNUnitsAtLocFacingLocBJ(1,1697656901,GetOwningPlayer(GetSpellAbilityUnit()),O4O,O4O)call RemoveLocation(O4O)call UnitAddAbility(bj_lastCreatedUnit,1093679427)call SetUnitAbilityLevelSwapped(1093679427,bj_lastCreatedUnit,GetUnitAbilityLevelSwapped(1093679192,GetSpellAbilityUnit()))call IssueTargetOrder(bj_lastCreatedUnit,"bloodlust",GetSpellAbilityUnit())endfunctionfunction KR1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function CG5))call TriggerAddAction(t,function CH5)endfunctionfunction CZ5 takes unit TMI,integer CV5 returns nothingcall UnitRemoveAbility(TMI,1093750067)call UnitRemoveAbility(TMI,1093750068)call UnitRemoveAbility(TMI,1093750083)call UnitRemoveAbility(TMI,1093750071)call UnitRemoveAbility(TMI,1093750072)call UnitRemoveAbility(TMI,1093750073)call UnitRemoveAbility(TMI,1093750081)call UnitRemoveAbility(TMI,1093750069)call UnitRemoveAbility(TMI,1093750082)call UnitRemoveAbility(TMI,1093750070)if CV5==1 thencall QTI(TMI,1093750067)elseif CV5==2 thencall QTI(TMI,1093750068)elseif CV5==3 thencall QTI(TMI,1093750083)elseif CV5==4 thencall QTI(TMI,1093750071)elseif CV5==5 thencall QTI(TMI,1093750072)elseif CV5==6 thencall QTI(TMI,1093750073)elseif CV5==7 thencall QTI(TMI,1093750081)elseif CV5==8 thencall QTI(TMI,1093750069)elseif CV5==9 thencall QTI(TMI,1093750082)elseif CV5==10 thencall QTI(TMI,1093750070)endifendfunctionfunction GravekeepersCloakEnemy_Decay takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer CV5call FlushChildHashtable(XY,(MKI))call MZI(t)set MKI=GetHandleId(TMI)set CV5=(LoadInteger(XY,(MKI),(427)))set CV5=RTI(CV5-1,0)call SaveInteger(XY,(MKI),(427),(CV5))call CZ5(TMI,CV5)set t=nullset TMI=nullreturn falseendfunctionfunction CW5 takes unit TLI,integer NGI,integer CX5 returns nothingcall UnitRemoveAbility(TLI,1093749586)call UnitRemoveAbility(TLI,1093749587)call UnitRemoveAbility(TLI,1093749585)call UnitRemoveAbility(TLI,1093749584)call UnitRemoveAbility(TLI,1093749553)call UnitRemoveAbility(TLI,1093749591)call UnitRemoveAbility(TLI,1093749592)call UnitRemoveAbility(TLI,1093749593)call UnitRemoveAbility(TLI,1093749812)call UnitRemoveAbility(TLI,1093749811)call UnitRemoveAbility(TLI,1093749810)call UnitRemoveAbility(TLI,1093749809)call UnitRemoveAbility(TLI,1093749816)call UnitRemoveAbility(TLI,1093749815)call UnitRemoveAbility(TLI,1093749817)call UnitRemoveAbility(TLI,1093749826)if NGI==1 thenif CX5==1 thencall QTI(TLI,1093749586)elseif CX5==2 thencall QTI(TLI,1093749587)elseif CX5==3 thencall QTI(TLI,1093749585)elseif CX5==4 thencall QTI(TLI,1093749584)endifelseif NGI==2 thenif CX5==1 thencall QTI(TLI,1093749553)elseif CX5==2 thencall QTI(TLI,1093749591)elseif CX5==3 thencall QTI(TLI,1093749592)elseif CX5==4 thencall QTI(TLI,1093749593)endifelseif NGI==3 thenif CX5==1 thencall QTI(TLI,1093749812)elseif CX5==2 thencall QTI(TLI,1093749811)elseif CX5==3 thencall QTI(TLI,1093749810)elseif CX5==4 thencall QTI(TLI,1093749809)endifelseif NGI==4 thenif CX5==1 thencall QTI(TLI,1093749816)elseif CX5==2 thencall QTI(TLI,1093749815)elseif CX5==3 thencall QTI(TLI,1093749817)elseif CX5==4 thencall QTI(TLI,1093749826)endifendifendfunctionfunction CY5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer CJ5=(LoadInteger(XY,(MKI),(426)))local unit TLI=(LoadUnitHandle(XY,(CJ5),(2)))local integer CX5=(LoadInteger(XY,(CJ5),(425)))local integer NGI=GetUnitAbilityLevel(TLI,1093686872)set CX5=RSI(CX5+1,4)call SaveInteger(XY,(CJ5),(425),(CX5))call CW5(TLI,NGI,CX5)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullreturn falseendfunctionfunction CK5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer CX5=(LoadInteger(XY,(MKI),(425)))local integer NGI=GetUnitAbilityLevel(GetTriggerUnit(),1093686872)if GetEventDamage()>2 and GetEventDamageSource()!=GetTriggerUnit()and NXI(GetOwningPlayer(GetEventDamageSource()))thenif CX5>0 thenendifset CX5=RTI(CX5-1,0)call SaveInteger(XY,(MKI),(425),(CX5))call CW5(TLI,NGI,CX5)set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,14-2*NGI,false)call TriggerAddCondition(t,Condition(function CY5))call SaveInteger(XY,(MKI),(426),(GetHandleId(GetTriggeringTrigger())))endifset t=nullset TLI=nullreturn falseendfunctionfunction CL5 takes nothing returns nothinglocal trigger tlocal integer MKIlocal unit TLI=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(GetTriggerUnit(),1093686872)if NGI==1 thenset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function CK5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(425),(4))endifcall CW5(TLI,NGI,4)set t=nullset TLI=nullendfunctionfunction CM5 takes nothing returns booleanif GetLearnedSkill()==1093686872 and IsUnitIllusion(GetTriggerUnit())==false thencall CL5()endifreturn falseendfunctionfunction CN5 takes player p returns nothingcall SetPlayerAbilityAvailable(p,1093749586,false)call SetPlayerAbilityAvailable(p,1093749587,false)call SetPlayerAbilityAvailable(p,1093749585,false)call SetPlayerAbilityAvailable(p,1093749584,false)call SetPlayerAbilityAvailable(p,1093749589,false)call SetPlayerAbilityAvailable(p,1093749590,false)call SetPlayerAbilityAvailable(p,1093749553,false)call SetPlayerAbilityAvailable(p,1093749591,false)call SetPlayerAbilityAvailable(p,1093749592,false)call SetPlayerAbilityAvailable(p,1093749593,false)call SetPlayerAbilityAvailable(p,1093749594,false)call SetPlayerAbilityAvailable(p,1093749588,false)call SetPlayerAbilityAvailable(p,1093749812,false)call SetPlayerAbilityAvailable(p,1093749811,false)call SetPlayerAbilityAvailable(p,1093749810,false)call SetPlayerAbilityAvailable(p,1093749809,false)call SetPlayerAbilityAvailable(p,1093749808,false)call SetPlayerAbilityAvailable(p,1093749813,false)call SetPlayerAbilityAvailable(p,1093749816,false)call SetPlayerAbilityAvailable(p,1093749815,false)call SetPlayerAbilityAvailable(p,1093749817,false)call SetPlayerAbilityAvailable(p,1093749826,false)call SetPlayerAbilityAvailable(p,1093749825,false)call SetPlayerAbilityAvailable(p,1093749814,false)call SetPlayerAbilityAvailable(p,1093749832,false)call SetPlayerAbilityAvailable(p,1093750067,false)call SetPlayerAbilityAvailable(p,1093750068,false)call SetPlayerAbilityAvailable(p,1093750083,false)call SetPlayerAbilityAvailable(p,1093750071,false)call SetPlayerAbilityAvailable(p,1093750072,false)call SetPlayerAbilityAvailable(p,1093750073,false)call SetPlayerAbilityAvailable(p,1093750081,false)call SetPlayerAbilityAvailable(p,1093750069,false)call SetPlayerAbilityAvailable(p,1093750082,false)call SetPlayerAbilityAvailable(p,1093750070,false)endfunctionfunction KQ1 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer i=0local player pcall Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function CM5))loopexitwhen i>5set p=BO[i]call CN5(p)set p=CO[i]call CN5(p)set i=i+1endloopset t=nullendfunctionfunction CS5 takes nothing returns nothinglocal integer NGIlocal unit TLI=GetTriggerUnit()local unit QHIif GetUnitTypeId(TLI)==1966092599 or GetUnitTypeId(TLI)==1966092601 or GetUnitTypeId(TLI)==1966092600 or GetUnitTypeId(TLI)==1966092609 or GetUnitTypeId(TLI)==1966092610 or GetUnitTypeId(TLI)==1966092611 or GetUnitTypeId(TLI)==1966092629 or GetUnitTypeId(TLI)==1966092630 or GetUnitTypeId(TLI)==1966092631 thenreturnendifset QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TLI),GetUnitY(TLI),0)if GetUnitTypeId(TLI)==1966092596 or GetUnitTypeId(TLI)==1966092612 or GetUnitTypeId(TLI)==1966092626 thenset NGI=1elseif GetUnitTypeId(TLI)==1966092597 or GetUnitTypeId(TLI)==1966092613 or GetUnitTypeId(TLI)==1966092627 thenset NGI=2elseset NGI=3endifcall QTI(QHI,1093750342)call SetUnitAbilityLevel(QHI,1093750342,NGI)call IssueImmediateOrder(QHI,"stomp")set TLI=nullset QHI=nullendfunctionfunction CT5 takes unit CR5,integer OXO,integer NGI returns nothinglocal integer CP5if NGI==1 thenset CP5=8elseif NGI==2 thenset CP5=14elseif NGI==3 thenset CP5=22endifcall EW1(CR5,OXO*CP5)endfunctionfunction CQ5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit CR5=(LoadUnitHandle(XY,(MKI),(2)))local unit TLI=CR5local integer NGI=(LoadInteger(XY,(MKI),(5)))local integer TX2=(LoadInteger(XY,(MKI),(28)))local integer OXO=(LoadInteger(XY,(MKI),(194)))if GetTriggerEventId()==EVENT_UNIT_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED thenif GetAttacker()==CR5 thenset OXO=IMaxBJ(OXO-1,0)call SaveInteger(XY,(MKI),(194),(OXO))call CT5(CR5,OXO,NGI)endifelseset TX2=TX2+1call SaveInteger(XY,(MKI),(28),(TX2))if ModuloInteger(TX2,15)==0 thenset OXO=IMinBJ(OXO+1,7)call SaveInteger(XY,(MKI),(194),(OXO))endifif GetUnitTypeId(TLI)==1966092599 or GetUnitTypeId(TLI)==1966092601 or GetUnitTypeId(TLI)==1966092600 or GetUnitTypeId(TLI)==1966092609 or GetUnitTypeId(TLI)==1966092610 or GetUnitTypeId(TLI)==1966092611 or GetUnitTypeId(TLI)==1966092629 or GetUnitTypeId(TLI)==1966092630 or GetUnitTypeId(TLI)==1966092631 thenset OXO=7call SaveInteger(XY,(MKI),(194),(OXO))endifcall CT5(CR5,OXO,NGI)if GetUnitTypeId(CR5)==1966092599 or GetUnitTypeId(CR5)==1966092601 or GetUnitTypeId(CR5)==1966092600 or GetUnitTypeId(CR5)==1966092609 or GetUnitTypeId(CR5)==1966092610 or GetUnitTypeId(CR5)==1966092611 or GetUnitTypeId(CR5)==1966092629 or GetUnitTypeId(CR5)==1966092630 or GetUnitTypeId(CR5)==1966092631 thencall SetUnitState(CR5,UNIT_STATE_LIFE,GetUnitState(CR5,UNIT_STATE_LIFE)+31.25+18.75*NGI)endifendifset t=nullset CR5=nullreturn falseendfunctionfunction CU5 takes nothing returns booleanif GetUnitTypeId(GetFilterUnit())==1966092596 or GetUnitTypeId(GetFilterUnit())==1966092597 or GetUnitTypeId(GetFilterUnit())==1966092598 or GetUnitTypeId(GetFilterUnit())==1966092612 or GetUnitTypeId(GetFilterUnit())==1966092613 or GetUnitTypeId(GetFilterUnit())==1966092614 or GetUnitTypeId(GetFilterUnit())==1966092626 or GetUnitTypeId(GetFilterUnit())==1966092627 or GetUnitTypeId(GetFilterUnit())==1966092628 or GetUnitTypeId(GetFilterUnit())==1966092599 or GetUnitTypeId(GetFilterUnit())==1966092601 or GetUnitTypeId(GetFilterUnit())==1966092600 or GetUnitTypeId(GetFilterUnit())==1966092609 or GetUnitTypeId(GetFilterUnit())==1966092610 or GetUnitTypeId(GetFilterUnit())==1966092611 or GetUnitTypeId(GetFilterUnit())==1966092629 or GetUnitTypeId(GetFilterUnit())==1966092630 or GetUnitTypeId(GetFilterUnit())==1966092631 thencall KillUnit(GetFilterUnit())endifreturn falseendfunctionfunction D05 takes nothing returns nothinglocal group g=MDI()local unit TLI=GetTriggerUnit()local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)local integer NGI=GetUnitAbilityLevel(TLI,1093750341)local unit DI5local unit D15local unit DO5local trigger tlocal integer MKIlocal boolean OZ4=falsecall GroupEnumUnitsOfPlayer(g,GetOwningPlayer(TLI),Condition(function CU5))call MCI(g)if NGI==0 thenset NGI=GetUnitAbilityLevel(TLI,1093814599)set OZ4=trueendifif NGI==1 thenset DI5=CreateUnit(GetOwningPlayer(TLI),1966092596,x+75,y+75,GetUnitFacing(TLI))set D15=CreateUnit(GetOwningPlayer(TLI),1966092612,x-75,y-75,GetUnitFacing(TLI))elseif NGI==2 thenset DI5=CreateUnit(GetOwningPlayer(TLI),1966092597,x+75,y+75,GetUnitFacing(TLI))set D15=CreateUnit(GetOwningPlayer(TLI),1966092613,x-75,y-75,GetUnitFacing(TLI))elseif NGI==3 thenset DI5=CreateUnit(GetOwningPlayer(TLI),1966092598,x+75,y+75,GetUnitFacing(TLI))set D15=CreateUnit(GetOwningPlayer(TLI),1966092614,x-75,y-75,GetUnitFacing(TLI))endifcall SelectUnitAddForPlayer(DI5,GetOwningPlayer(TLI))call SelectUnitAddForPlayer(D15,GetOwningPlayer(TLI))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\RaiseSkeletonWarrior\\RaiseSkeleton.mdl",DI5,"origin"))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\RaiseSkeletonWarrior\\RaiseSkeleton.mdl",D15,"origin"))set t=CreateTrigger()set MKI=GetHandleId(t)call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerRegisterTimerEvent(t,1,true)call TriggerRegisterUnitEvent(t,DI5,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function CQ5))call SaveUnitHandle(XY,(MKI),(2),(DI5))call SaveInteger(XY,(MKI),(5),(NGI))call SaveInteger(XY,(MKI),(28),(0))call SaveInteger(XY,(MKI),(194),(7))call CT5(DI5,7,NGI)set t=CreateTrigger()set MKI=GetHandleId(t)call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerRegisterTimerEvent(t,1,true)call TriggerRegisterUnitEvent(t,D15,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function CQ5))call SaveUnitHandle(XY,(MKI),(2),(D15))call SaveInteger(XY,(MKI),(5),(NGI))call SaveInteger(XY,(MKI),(28),(0))call SaveInteger(XY,(MKI),(194),(7))call CT5(D15,7,NGI)if OZ4 thenif NGI==1 thenset DO5=CreateUnit(GetOwningPlayer(TLI),1966092626,x+75,y,GetUnitFacing(TLI))elseif NGI==2 thenset DO5=CreateUnit(GetOwningPlayer(TLI),1966092627,x+75,y,GetUnitFacing(TLI))elseif NGI==3 thenset DO5=CreateUnit(GetOwningPlayer(TLI),1966092628,x+75,y,GetUnitFacing(TLI))endifcall SelectUnitAddForPlayer(DO5,GetOwningPlayer(TLI))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\RaiseSkeletonWarrior\\RaiseSkeleton.mdl",DO5,"origin"))set t=CreateTrigger()set MKI=GetHandleId(t)call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerRegisterTimerEvent(t,1,true)call TriggerRegisterUnitEvent(t,DO5,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function CQ5))call SaveUnitHandle(XY,(MKI),(2),(DO5))call SaveInteger(XY,(MKI),(5),(NGI))call SaveInteger(XY,(MKI),(28),(0))call SaveInteger(XY,(MKI),(194),(7))call CT5(DO5,7,NGI)endifset g=nullset TLI=nullset DI5=nullset D15=nullendfunctionfunction D25 takes nothing returns booleanif GetSpellAbilityId()==1093750341 or GetSpellAbilityId()==1093814599 thencall D05()elseif GetSpellAbilityId()==1093750338 or GetSpellAbilityId()==1093750339 or GetSpellAbilityId()==1093750340 or GetSpellAbilityId()==1093750348 or GetSpellAbilityId()==1093750349 or GetSpellAbilityId()==1093750350 or GetSpellAbilityId()==1093814618 or GetSpellAbilityId()==1093814832 or GetSpellAbilityId()==1093814833 thencall CS5()endifreturn falseendfunctionfunction KT1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function D25))set t=nullendfunctionfunction D35 takes unit TLI,integer WLO,integer D45 returns nothinglocal string c1="|c0000cc00"local string c="||"local string p=" "local string s=c1+"|||r"local string DR1local boolean KR4=falselocal texttag tt=(LoadTextTagHandle(XY,(GetHandleId(TLI)),(451)))if WLO==0 thenset DR1=" "elseif D45==1 thenif WLO==0 thenset DR1=c+p+c+p+celseif WLO==1 thenset DR1=s+p+c+p+celseif WLO==2 thenset DR1=s+p+s+p+celseif WLO==3 thenset DR1=s+p+s+p+sendifelseif D45==2 thenif WLO==0 thenset DR1=c+p+c+p+c+p+celseif WLO==1 thenset DR1=s+p+c+p+c+p+celseif WLO==2 thenset DR1=s+p+s+p+c+p+celseif WLO==3 thenset DR1=s+p+s+p+s+p+celseif WLO==4 thenset DR1=s+p+s+p+s+p+sendifelseif D45==3 thenif WLO==0 thenset DR1=c+p+c+p+c+p+c+p+celseif WLO==1 thenset DR1=s+p+c+p+c+p+c+p+celseif WLO==2 thenset DR1=s+p+s+p+c+p+c+p+celseif WLO==3 thenset DR1=s+p+s+p+s+p+c+p+celseif WLO==4 thenset DR1=s+p+s+p+s+p+s+p+celseif WLO==5 thenset DR1=s+p+s+p+s+p+s+p+sendifelseif D45==4 thenif WLO==0 thenset DR1=c+p+c+p+c+p+c+p+c+p+celseif WLO==1 thenset DR1=s+p+c+p+c+p+c+p+c+p+celseif WLO==2 thenset DR1=s+p+s+p+c+p+c+p+c+p+celseif WLO==3 thenset DR1=s+p+s+p+s+p+c+p+c+p+celseif WLO==4 thenset DR1=s+p+s+p+s+p+s+p+c+p+celseif WLO==5 thenset DR1=s+p+s+p+s+p+s+p+s+p+celseif WLO==6 thenset DR1=s+p+s+p+s+p+s+p+s+p+sendifendifcall SetTextTagText(tt,DR1,0.023)if GetOwningPlayer(TLI)==GetLocalPlayer()thenset KR4=trueendifif QPI(TLI)thenset KR4=falseendifcall SetTextTagPosUnit(tt,TLI,0)call SetTextTagVisibility(tt,KR4)call SetTextTagPermanent(tt,true)endfunctionfunction D55 takes unit N0I,integer NGI returns nothinglocal integer D45=GetUnitAbilityLevel(N0I,1093750337)call D35(N0I,NGI,D45)if NGI==0 or((LoadInteger(XY,(GetHandleId((N0I))),((2484))))==1)==true thencall UnitRemoveAbility(N0I,1093750583)call UnitRemoveAbility(N0I,1093750584)call UnitRemoveAbility(N0I,1093750585)call QTI(N0I,1093750577)call UnitRemoveAbility(N0I,1093750578)call UnitRemoveAbility(N0I,1093750362)call UnitRemoveAbility(N0I,1093750329)call UnitRemoveAbility(N0I,1093750361)call UnitRemoveAbility(N0I,1093750576)call UnitRemoveAbility(N0I,1093750579)call UnitRemoveAbility(N0I,1093684306)call UnitRemoveAbility(N0I,1093687632)call UnitRemoveAbility(N0I,1093685063)call UnitRemoveAbility(N0I,1093687631)call UnitRemoveAbility(N0I,1093684806)call UnitRemoveAbility(N0I,1093684548)elseif NGI==1 thencall UnitRemoveAbility(N0I,1093750583)call UnitRemoveAbility(N0I,1093750584)call UnitRemoveAbility(N0I,1093750585)call UnitRemoveAbility(N0I,1093750577)call QTI(N0I,1093750578)call UnitRemoveAbility(N0I,1093750362)call UnitRemoveAbility(N0I,1093750329)call UnitRemoveAbility(N0I,1093750361)call UnitRemoveAbility(N0I,1093750576)call UnitRemoveAbility(N0I,1093750579)call QTI(N0I,1093684306)call UnitRemoveAbility(N0I,1093687632)call UnitRemoveAbility(N0I,1093685063)call UnitRemoveAbility(N0I,1093687631)call UnitRemoveAbility(N0I,1093684806)call UnitRemoveAbility(N0I,1093684548)elseif NGI==2 thencall UnitRemoveAbility(N0I,1093750583)call UnitRemoveAbility(N0I,1093750584)call UnitRemoveAbility(N0I,1093750585)call UnitRemoveAbility(N0I,1093750577)call UnitRemoveAbility(N0I,1093750578)call QTI(N0I,1093750362)call UnitRemoveAbility(N0I,1093750329)call UnitRemoveAbility(N0I,1093750361)call UnitRemoveAbility(N0I,1093750576)call UnitRemoveAbility(N0I,1093750579)call UnitRemoveAbility(N0I,1093684306)call QTI(N0I,1093687632)call UnitRemoveAbility(N0I,1093685063)call UnitRemoveAbility(N0I,1093687631)call UnitRemoveAbility(N0I,1093684806)call UnitRemoveAbility(N0I,1093684548)elseif NGI==3 thencall UnitRemoveAbility(N0I,1093750583)call UnitRemoveAbility(N0I,1093750584)call UnitRemoveAbility(N0I,1093750585)call UnitRemoveAbility(N0I,1093684306)call UnitRemoveAbility(N0I,1093687632)call QTI(N0I,1093685063)call UnitRemoveAbility(N0I,1093687631)call UnitRemoveAbility(N0I,1093684806)call UnitRemoveAbility(N0I,1093684548)call UnitRemoveAbility(N0I,1093750577)call UnitRemoveAbility(N0I,1093750578)call UnitRemoveAbility(N0I,1093750362)call UnitRemoveAbility(N0I,1093750329)call UnitRemoveAbility(N0I,1093750361)call UnitRemoveAbility(N0I,1093750576)call UnitRemoveAbility(N0I,1093750579)if D45==1 thencall QTI(N0I,1093750583)elsecall QTI(N0I,1093750329)endifelseif NGI==4 thencall UnitRemoveAbility(N0I,1093750583)call UnitRemoveAbility(N0I,1093750584)call UnitRemoveAbility(N0I,1093750585)call UnitRemoveAbility(N0I,1093684306)call UnitRemoveAbility(N0I,1093687632)call UnitRemoveAbility(N0I,1093685063)call QTI(N0I,1093687631)call UnitRemoveAbility(N0I,1093684806)call UnitRemoveAbility(N0I,1093684548)call UnitRemoveAbility(N0I,1093750577)call UnitRemoveAbility(N0I,1093750578)call UnitRemoveAbility(N0I,1093750362)call UnitRemoveAbility(N0I,1093750329)call UnitRemoveAbility(N0I,1093750361)call UnitRemoveAbility(N0I,1093750576)call UnitRemoveAbility(N0I,1093750579)if D45==2 thencall QTI(N0I,1093750584)elsecall QTI(N0I,1093750361)endifelseif NGI==5 thencall UnitRemoveAbility(N0I,1093750583)call UnitRemoveAbility(N0I,1093750584)call UnitRemoveAbility(N0I,1093750585)call UnitRemoveAbility(N0I,1093750577)call UnitRemoveAbility(N0I,1093750578)call UnitRemoveAbility(N0I,1093750362)call UnitRemoveAbility(N0I,1093750329)call UnitRemoveAbility(N0I,1093750361)call QTI(N0I,1093750576)call UnitRemoveAbility(N0I,1093750579)call UnitRemoveAbility(N0I,1093684306)call UnitRemoveAbility(N0I,1093687632)call UnitRemoveAbility(N0I,1093685063)call UnitRemoveAbility(N0I,1093687631)call QTI(N0I,1093684806)call UnitRemoveAbility(N0I,1093684548)call UnitRemoveAbility(N0I,1093750577)call UnitRemoveAbility(N0I,1093750578)call UnitRemoveAbility(N0I,1093750362)call UnitRemoveAbility(N0I,1093750329)call UnitRemoveAbility(N0I,1093750361)call UnitRemoveAbility(N0I,1093750576)call UnitRemoveAbility(N0I,1093750579)if D45==3 thencall QTI(N0I,1093750585)elsecall QTI(N0I,1093750576)endifelseif NGI==6 thencall UnitRemoveAbility(N0I,1093750583)call UnitRemoveAbility(N0I,1093750584)call UnitRemoveAbility(N0I,1093750585)call UnitRemoveAbility(N0I,1093750577)call UnitRemoveAbility(N0I,1093750578)call UnitRemoveAbility(N0I,1093750362)call UnitRemoveAbility(N0I,1093750329)call UnitRemoveAbility(N0I,1093750361)call UnitRemoveAbility(N0I,1093750576)call QTI(N0I,1093750579)call UnitRemoveAbility(N0I,1093684306)call UnitRemoveAbility(N0I,1093687632)call UnitRemoveAbility(N0I,1093685063)call UnitRemoveAbility(N0I,1093687631)call UnitRemoveAbility(N0I,1093684806)call QTI(N0I,1093684548)endifif(GetUnitAbilityLevel(N0I,1093750337)+2)==NGI thencall QTI(N0I,1093750346)elsecall UnitRemoveAbility(N0I,1093750346)endifendfunctionfunction D65 takes unit TLI,real TSI returns nothinglocal integer NGI=0local real D75=110if TSI>D75*6 thenset NGI=6elseif TSI>D75*5 thenset NGI=5elseif TSI>D75*4 thenset NGI=4elseif TSI>D75*3 thenset NGI=3elseif TSI>D75*2 thenset NGI=2elseif TSI>D75*1 thenset NGI=1endifset NGI=RSI(NGI,2+GetUnitAbilityLevel(TLI,1093750337))call SaveInteger(XY,(GetHandleId(TLI)),(450),(NGI))call D55(TLI,NGI)endfunctionfunction D85 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer D45=GetUnitAbilityLevel(TLI,1093750337)call D35(TLI,(LoadInteger(XY,(GetHandleId((TLI))),(450))),D45)call D65(TLI,(LoadReal(XY,(GetHandleId(TLI)),(443))))set t=nullset TLI=nullreturn falseendfunctionfunction D95 takes nothing returns nothinglocal integer MKI=GetHandleId(GetTriggeringTrigger())local unit TLI=CKlocal unit TMI=DKlocal real TSI=(LoadReal(XY,(MKI),(20)))if IsUnitAlly(TMI,GetOwningPlayer(TLI))==false thenset VII=truecall TKI(TLI,TMI,1,TSI)set VII=falseelsecall SetUnitState(TMI,UNIT_STATE_LIFE,GetUnitState(TMI,UNIT_STATE_LIFE)+TSI)endifset TLI=nullset TMI=nullendfunctionfunction DA5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))call D65(TLI,(LoadReal(XY,(GetHandleId(TLI)),(443))))call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullreturn falseendfunctionfunction DB5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=(LoadInteger(XY,(GetHandleId((TLI))),(450)))local trigger t=U6I(TLI,TMI,1747993157,"D95",1000,false)local integer MKI=GetHandleId(t)call SaveReal(XY,(MKI),(20),((20+NGI*65)*1.0))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AntiMagicShell\\AntiMagicShell.mdl",TLI,"chest"))call SaveReal(XY,(GetHandleId(TLI)),(443),((0)*1.0))call D65(TLI,0)call MPI(TLI,2484,4)set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerAddCondition(t,Condition(function DA5))call TriggerRegisterTimerEvent(t,4,false)call SaveUnitHandle(XY,(MKI),(2),(TLI))set TLI=nullset TMI=nullset t=nullendfunctionfunction DC5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real TSI=(LoadReal(XY,(MKI),(20)))if GetTriggerEventId()!=EVENT_UNIT_SPELL_EFFECT or(GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()==1093750337)thenif GetTriggerEventId()!=EVENT_UNIT_SPELL_EFFECT thencall SaveReal(XY,(GetHandleId(TLI)),(443),(((LoadReal(XY,(GetHandleId(TLI)),(443)))-TSI)*1.0))endifcall D65(TLI,(LoadReal(XY,(GetHandleId(TLI)),(443))))call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullreturn falseendfunctionfunction DD5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local integer MKI=GetHandleId(TLI)local texttag tt=CreateTextTag()local boolean KR4=falselocal trigger t=CreateTrigger()call TriggerRegisterTimerEvent(t,0.05,true)call TriggerAddCondition(t,Condition(function D85))call SaveUnitHandle(XY,(GetHandleId(t)),(2),(TLI))if GetOwningPlayer(TLI)==GetLocalPlayer()thenset KR4=trueendifcall SetTextTagText(tt," ",0.023)call SetTextTagPosUnit(tt,TLI,0)call SetTextTagVisibility(tt,KR4)call SetTextTagPermanent(tt,true)set V0I[GetPlayerId(GetOwningPlayer(TLI))]=TLIcall SaveReal(XY,(MKI),(443),((0)*1.0))call D65(TLI,0)call SaveTextTagHandle(XY,(MKI),(451),(tt))set TLI=nullset t=nullset tt=nullendfunctionfunction DE5 takes unit DF5,unit DG5 returns nothinglocal real TSI=GetEventDamage()local integer NGI=GetUnitAbilityLevel(DF5,1093750337)local real DH5=(LoadReal(XY,(GetHandleId(DF5)),(443)))local trigger tlocal integer MKIif P8I(DF5,DG5)<1400 and VII==false thenif TAI(TSI)and GetEventDamage()>2 and GetEventDamageSource()!=GetTriggerUnit()and(NXI(GetOwningPlayer(GetEventDamageSource()))or GetUnitTypeId(GetEventDamageSource())==1848651852)thenset DH5=DH5+TSIcall SaveReal(XY,(GetHandleId(DF5)),(443),((DH5)*1.0))set t=CreateTrigger()set MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(2),(DF5))call SaveReal(XY,(MKI),(20),((TSI)*1.0))call TriggerRegisterTimerEvent(t,6,false)call TriggerRegisterUnitEvent(t,DF5,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,DF5,EVENT_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function DC5))call D65(DF5,DH5)endifendifset t=nullendfunctionfunction DZ5 takes nothing returns nothinglocal integer i=0loopexitwhen i>12if V0I[i]!=null thencall DE5(V0I[i],GetTriggerUnit())endifset i=i+1endloopendfunctionfunction DV5 takes nothing returns booleanif GetLearnedSkill()==1093750337 and GetUnitAbilityLevel(GetTriggerUnit(),1093750337)==1 and IsUnitIllusion(GetTriggerUnit())==false thencall DD5()endifreturn falseendfunctionfunction DW5 takes nothing returns booleanif GetSpellAbilityId()==1093750337 thencall DB5()endifreturn falseendfunctionfunction KP1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function DV5))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function DW5))set t=nullcall Q7O("DZ5")endfunctionconstant function Upheaval_RawCode takes nothing returns integerreturn 1093678672endfunctionconstant function Upheaval_EffectCode takes nothing returns integerreturn 1093683781endfunctionconstant function Upheaval_EffectModel takes nothing returns integerreturn 1697657159endfunctionfunction DX5 takes nothing returns booleanreturn GetSpellAbilityId()==(1093678672)endfunctionfunction DY5 takes nothing returns booleanreturn IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(XO))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1endfunctionfunction DJ5 takes nothing returns nothinglocal unit TMI=GetEnumUnit()local unit QHI=CreateUnit(GetOwningPlayer(XO),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call QTI(QHI,(1093683781))call SetUnitAbilityLevel(QHI,(1093683781),YO)call IssueTargetOrder(QHI,"slow",TMI)endfunctionfunction DK5 takes unit QHI,unit N0I returns nothinglocal group GK1=MDI()local boolexpr PI1=Condition(function DY5)set XO=N0Icall GroupEnumUnitsInRange(GK1,GetUnitX(QHI),GetUnitY(QHI),675,PI1)call ForGroup(GK1,function DJ5)call MCI(GK1)endfunctionfunction DL5 takes nothing returns nothinglocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0Ilocal unit QHI=(LoadUnitHandle(XY,(MKI),(19)))if GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST thencall KillUnit(QHI)call FlushChildHashtable(XY,(MKI))call MZI((t))elseif GetTriggerEvalCount(t)>32 thencall KillUnit(QHI)call FlushChildHashtable(XY,(MKI))call MZI((t))call R6I((LoadUnitHandle(XY,(MKI),(14))))elsecall SetUnitAnimation(QHI,"birth")set N0I=(LoadUnitHandle(XY,(MKI),(14)))set YO=GetTriggerExecCount(t)*GetUnitAbilityLevel(N0I,(1093678672))/2call DK5(QHI,N0I)endifset t=nullset QHI=nullset N0I=nullendfunctionfunction DM5 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local location O4O=GetSpellTargetLoc()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real x=GetLocationX(O4O)local real y=GetLocationY(O4O)local unit QHI=CreateUnit(GetOwningPlayer(N0I),(1697657159),x,y,0)call RemoveLocation(O4O)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_SPELL_ENDCAST)call TriggerRegisterTimerEvent(t,0.5,true)call TriggerAddAction(t,function DL5)call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveUnitHandle(XY,(MKI),(19),(QHI))endfunctionfunction LM1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddAction(t,function DM5)call TriggerAddCondition(t,Condition(function DX5))call RVI((1093683781))endfunctionconstant function FatalBonds_RawCode takes nothing returns integerreturn 1093683765endfunctionconstant function FatalBonds_IconAbility takes nothing returns integerreturn 1093683769endfunctionconstant function FatalBonds_Icon takes nothing returns integerreturn 1093685298endfunctionfunction DN5 takes nothing returns booleanreturn GetSpellAbilityId()==(1093683765)endfunctionfunction DS5 takes nothing returns nothingcall QTI(GetEnumUnit(),(1093685298))endfunctionfunction DT5 takes nothing returns nothingcall UnitRemoveAbility(GetEnumUnit(),(1093685298))endfunctionfunction DR5 takes unit DP5,unit DQ5 returns nothingif DP5!=null and DQ5!=null thencall QII("CLPB",GetUnitX(DP5),GetUnitY(DP5),GetUnitX(DQ5),GetUnitY(DQ5),0.7,0.1,0.9,1,0.3)endifendfunctionfunction DU5 takes nothing returns nothinglocal unit N0I=(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(14)))local real TSI=0.2*GetEventDamage()set TSI=RPI(TSI,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE))if GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)>1 and GetEnumUnit()!=GetTriggerUnit()thenif GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)<TSI thencall TKI(N0I,GetEnumUnit(),3,TSI)elsecall IJ1(GetEnumUnit(),TSI)endifendifendfunctionfunction E05 takes nothing returns nothinglocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local group GK1=(LoadGroupHandle(XY,(MKI),(220)))if GetTriggerEventId()!=EVENT_UNIT_DAMAGED thencall ForGroup(GK1,function DT5)call FlushChildHashtable(XY,(MKI))call MCI(GK1)call MZI((t))elseif GetEventDamage()>10 and GetEventDamage()<6000 thencall DisableTrigger(t)call ForGroup(GK1,function DU5)call EnableTrigger(t)endifendfunctionfunction EI5 takes nothing returns booleanreturn IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1endfunctionfunction E15 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local group GK1=MDI()local integer NGI=GetUnitAbilityLevel(N0I,(1093683765))local boolexpr PI1=Condition(function EI5)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer i=2local group GN4=MDI()local unit array EO5local string E25="Abilities\\Spells\\Undead\\Curse\\CurseTarget.mdl"call SaveUnitHandle(XY,(MKI),(14),(N0I))call DR5(N0I,TMI)call PKI(E25,TMI,"overhead",25)set EO5[1]=TMIcall SaveUnitHandle(XY,(MKI),(246),(EO5[1]))call TriggerRegisterUnitEvent(t,EO5[1],EVENT_UNIT_DAMAGED)call GroupEnumUnitsInRange(GK1,GetUnitX(TMI),GetUnitY(TMI),600,PI1)call GroupRemoveUnit(GK1,TMI)call GroupAddUnit(GN4,TMI)call SaveGroupHandle(XY,(MKI),(220),(GN4))loopexitwhen i>(2+NGI)or FirstOfGroup(GK1)==nullset EO5[i]=OG1(GK1,GetUnitX(TMI),GetUnitY(TMI))call DR5(EO5[i-1],EO5[i])call TriggerRegisterUnitEvent(t,EO5[i],EVENT_UNIT_DAMAGED)call GroupAddUnit(GN4,EO5[i])call GroupRemoveUnit(GK1,EO5[i])call PKI(E25,EO5[i],"overhead",25)set i=i+1endloopcall SaveInteger(XY,(MKI),(245),(i-1))set YO=GetUnitAbilityLevel(N0I,(1093683765))call ForGroup(GN4,function DS5)call TriggerRegisterTimerEvent(t,25,false)call TriggerAddAction(t,function E05)call MCI(GK1)endfunctionfunction LN1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function DN5))call TriggerAddAction(t,function E15)call RVI((1093683769))endfunctionfunction E35 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=GetUnitAbilityLevel(TLI,1093681491)if GetTriggerEvalCount(t)>11 or GetTriggerEventId()==EVENT_UNIT_DEATH thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call UnitRemoveAbility(TMI,1093744459)call UnitRemoveAbility(TMI,1110458704)call FlushChildHashtable(XY,(MKI))call MZI(t)elsecall TKI(TLI,TMI,1,NGI*10+5)endifset TLI=nullset TMI=nullset t=nullreturn falseendfunctionfunction E45 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=GetUnitAbilityLevel(TLI,1093681491)if GetTriggerEvalCount(t)>11 or GetTriggerEventId()==EVENT_UNIT_DEATH thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call UnitRemoveAbility(TMI,1093685296)call UnitRemoveAbility(TMI,1110456115)call FlushChildHashtable(XY,(MKI))call MZI(t)elsecall PGI(TMI,NGI*10+5)endifset TLI=nullset TMI=nullset t=nullreturn falseendfunctionfunction E55 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,1,true)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(2),(TLI))if IsUnitAlly(TMI,GetOwningPlayer(TLI))thencall TriggerAddCondition(t,Condition(function E45))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("Abilities\\Spells\\Items\\StaffOfSanctuary\\Staff_Sanctuary_Target.mdl",TMI,"chest")))call QTI(TMI,1093685296)elseif MBI(GetSpellTargetUnit())==false thencall TriggerAddCondition(t,Condition(function E35))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\Voodoo\\VoodooAuraTarget.mdl",TMI,"overhead")))call QTI(TMI,1093744459)endifset TLI=nullset TMI=nullset t=nullendfunctionfunction E65 takes nothing returns booleanif GetSpellAbilityId()==1093681491 thencall E55()endifreturn falseendfunctionfunction LS1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function E65))call RVI(1093685296)call RVI(1093744459)set t=nullendfunctionfunction E75 takes nothing returns nothingcall TKI(V1I,GetEnumUnit(),1,20+10*VOI)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Immolation\\ImmolationDamage.mdl",GetEnumUnit(),"head"))endfunctionfunction E85 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer NGIlocal integer SVI=GetUnitTypeId(TLI)local group gif SVI==1848651861 or SVI==1848658773 thenset NGI=1elseif SVI==1848651865 or SVI==1848658774 thenset NGI=2elseif SVI==1848651866 or SVI==1848658775 thenset NGI=3endifif GetTriggerEventId()==EVENT_UNIT_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseset CK=TLIset V1I=TLIset VOI=NGIset g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),275,Condition(function AT1))call ForGroup(g,function E75)call MCI(g)set g=nullendifset t=nullset TLI=nullreturn falseendfunctionfunction E95 takes unit u returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,1,true)call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function E85))call SaveUnitHandle(XY,(MKI),(2),(u))set t=nullendfunctionfunction EA5 takes nothing returns booleanlocal integer SVI=GetUnitTypeId(GetTriggerUnit())if SVI==1848651861 or SVI==1848658773 or SVI==1848651865 or SVI==1848658774 or SVI==1848651866 or SVI==1848658775 thencall E95(GetTriggerUnit())endifreturn falseendfunctionfunction EB5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local real IO3=(LoadReal(XY,(MKI),(191)))local real I23=(LoadReal(XY,(MKI),(192)))local integer NGI=GetUnitAbilityLevel(TLI,1395667029)local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,IO3,I23,0)call QTI(QHI,1395667029)call SetUnitAbilityLevel(QHI,1395667029,NGI)call IssuePointOrderById(QHI,852224,x,y)call FlushChildHashtable(XY,(MKI))call MZI(t)set TLI=nullset QHI=nullset t=nullreturn falseendfunctionfunction EC5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.3,false)call TriggerAddCondition(t,Condition(function EB5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(6),((GetSpellTargetX())*1.0))call SaveReal(XY,(MKI),(7),((GetSpellTargetY())*1.0))call SaveReal(XY,(MKI),(191),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(192),((GetUnitY(TLI))*1.0))set TLI=nullset t=nullendfunctionfunction ED5 takes nothing returns booleanif GetSpellAbilityId()==1395667029 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==true thencall EC5()endifreturn falseendfunctionfunction LT1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function ED5))set t=CreateTrigger()call TriggerRegisterEnterRectSimple(t,GetWorldBounds())call TriggerAddCondition(t,Condition(function EA5))set t=nullendfunctionfunction EE5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))if GetUnitAbilityLevel(N0I,1112041075)==0 thencall UnitRemoveAbility(N0I,1093681977)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset N0I=nullreturn falseendfunctionfunction EF5 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit N0I=GetTriggerUnit()call QTI(N0I,1093681977)call SetUnitAbilityLevel(N0I,1093681977,GetUnitAbilityLevel(N0I,1093681985))call SaveUnitHandle(XY,(MKI),(14),(N0I))call TriggerRegisterTimerEvent(t,0.2,true)call TriggerAddCondition(t,Condition(function EE5))set N0I=nullset t=nullendfunctionfunction EG5 takes nothing returns booleanif GetSpellAbilityId()==1093681985 thencall EF5()endifreturn falseendfunctionfunction KU1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function EG5))endfunctionfunction EH5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)call SetUnitState((LoadUnitHandle(XY,(MKI),(26))),UNIT_STATE_MANA,(LoadReal(XY,(MKI),(242))))call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullreturn falseendfunctionfunction EZ5 takes unit u,real EV5 returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function EH5))call SaveUnitHandle(XY,(MKI),(26),(u))call SaveReal(XY,(MKI),(242),((EV5)*1.0))set t=nullendfunctionfunction EW5 takes nothing returns booleanreturn GetSpellAbilityId()==1093682004endfunctionfunction EX5 takes nothing returns nothinglocal integer MKI=GetHandleId(GetTriggerUnit())local real IZ4=RQI((LoadReal(XY,(MKI),(7200+1))),1)local real QDO=RQI((LoadReal(XY,(MKI),(7250+1))),1)local real x=(LoadReal(XY,(MKI),(7300+1)))local real y=(LoadReal(XY,(MKI),(7350+1)))local unit R7I=GetTriggerUnit()if(LoadReal(XY,(MKI),(7200+1)))>1 and GetUnitState(R7I,UNIT_STATE_LIFE)>1 thencall AddSpecialEffect("Abilities\\Spells\\NightElf\\Blink\\BlinkTarget.mdl",GetUnitX(R7I),GetUnitY(R7I))call SetUnitX(R7I,x)call SetUnitY(R7I,y)call SetUnitState(R7I,UNIT_STATE_LIFE,IZ4)call SetUnitState(R7I,UNIT_STATE_MANA,QDO)call UnitRemoveBuffs(R7I,false,true)call CW1(R7I)call EZ5(R7I,QDO)endifendfunctionfunction L01 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function EW5))call TriggerAddAction(t,function EX5)endfunctionfunction EY5 takes nothing returns nothinglocal trigger t=GetTriggeringTrigger()local unit R7I=(LoadUnitHandle(XY,(GetHandleId(t)),(221)))local integer MKI=GetHandleId(R7I)local integer SII=1local integer S1I=10loopexitwhen SII>S1Icall SaveReal(XY,(MKI),(7300+(SII-1)),(((LoadReal(XY,(MKI),(7300+(SII)))))*1.0))call SaveReal(XY,(MKI),(7350+(SII-1)),(((LoadReal(XY,(MKI),(7350+(SII)))))*1.0))call SaveReal(XY,(MKI),(7200+(SII-1)),(((LoadReal(XY,(MKI),(7200+(SII)))))*1.0))call SaveReal(XY,(MKI),(7250+(SII-1)),(((LoadReal(XY,(MKI),(7250+(SII)))))*1.0))set SII=SII+1endloopcall SaveReal(XY,(MKI),(7300+10),((GetUnitX(R7I))*1.0))call SaveReal(XY,(MKI),(7350+10),((GetUnitY(R7I))*1.0))call SaveReal(XY,(MKI),(7200+10),((GetUnitState(R7I,UNIT_STATE_LIFE))*1.0))call SaveReal(XY,(MKI),(7250+10),((GetUnitState(R7I,UNIT_STATE_MANA))*1.0))endfunctionfunction TimeLapseLearn_Conditions takes nothing returns booleanreturn GetLearnedSkill()==1093682004 and IsUnitIllusion(GetTriggerUnit())==falseendfunctionfunction VC4 takes nothing returns nothinglocal unit R7I=CKlocal integer NGI=GetUnitAbilityLevel(R7I,1093682004)local trigger tset t=CreateTrigger()call TriggerRegisterTimerEventPeriodic(t,0.50)call TriggerAddAction(t,function EY5)call SaveUnitHandle(XY,(GetHandleId(t)),(221),(R7I))endfunctionfunction LI1 takes nothing returns nothingendfunctionfunction EJ5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real d=(LoadReal(XY,(MKI),(138)))local real EK5=(LoadReal(XY,(GetHandleId(TLI)),(508)))-dlocal fogmodifier QYI=(LoadFogModifierHandle(XY,(MKI),(42)))call FogModifierStop(QYI)call DestroyFogModifier(QYI)call SaveReal(XY,(GetHandleId(TLI)),(508),((EK5)*1.0))call EW1(TLI,R2I(EK5/100.0*(0.3*GetUnitAbilityLevel(TLI,1093751095))))call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullreturn falseendfunctionfunction EL5 takes unit TLI,real d returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real EK5=(LoadReal(XY,(GetHandleId(TLI)),(508)))+dlocal fogmodifier QYI=CreateFogModifierRadius(GetOwningPlayer(TLI),FOG_OF_WAR_VISIBLE,GetUnitX(TLI),GetUnitY(TLI),400,true,true)call FogModifierStart(QYI)call SaveReal(XY,(GetHandleId(TLI)),(508),((EK5)*1.0))call EW1(TLI,R2I(EK5/100.0*(0.6*GetUnitAbilityLevel(TLI,1093751095))))call TriggerRegisterTimerEvent(t,10,false)call TriggerAddCondition(t,Condition(function EJ5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(138),((d)*1.0))call SaveFogModifierHandle(XY,(MKI),(42),(QYI))set t=nullendfunctionfunction EM5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real PI2=(LoadReal(XY,(MKI),(23)))local real P12=(LoadReal(XY,(MKI),(24)))local real PO2=GetUnitX(TLI)local real P22=GetUnitY(TLI)local real d=PAI(PI2,P12,PO2,P22)if d<1500 thencall EL5(TLI,d)elsecall EL5(TLI,1500)endifcall SaveReal(XY,(MKI),(23),((PO2)*1.0))call SaveReal(XY,(MKI),(24),((P22)*1.0))set t=nullset TLI=nullreturn falseendfunctionfunction EN5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.1,true)call TriggerAddCondition(t,Condition(function EM5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(23),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(24),((GetUnitY(TLI))*1.0))call SaveReal(XY,(GetHandleId(TLI)),(508),((0)*1.0))set t=nullset TLI=nullendfunctionfunction ES5 takes nothing returns booleanif GetLearnedSkill()==1093751095 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093751095)==1 thencall EN5()endifreturn falseendfunctionfunction Register_EchoStep takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function ES5))set t=nullendfunctionfunction ET5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))if GetTriggerEventId()==EVENT_UNIT_DEATH thencall UnitRemoveAbility(TMI,1093751130)call SaveInteger(XY,(GetHandleId((TMI))),((4290)),(2))call FlushChildHashtable(XY,(MKI))call MZI(t)if GetTriggerUnit()==TMI thencall KillUnit(TLI)endifelseif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamageSource()==TLI thencall SetUnitAbilityLevel(TMI,1093751130,GetUnitAbilityLevel(TMI,1093751130)+1)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\SkeletalMageMissile\\SkeletalMageMissile.mdl",TMI,"chest"))endifelsecall SetUnitX(TLI,GetUnitX(TMI)-40)call SetUnitY(TLI,GetUnitY(TMI)-40)if AG1(TMI)and IsUnitVisible(TMI,GetOwningPlayer(TLI))==false thencall KillUnit(TLI)elseif ModuloInteger(GetTriggerEvalCount(t),5)==0 thencall IssueTargetOrder(TLI,"attack",TMI)endifendifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction ER5 takes unit EP5,unit TMI,integer NGI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call UnitRemoveAbility(EP5,1098282348)call SaveUnitHandle(XY,(MKI),(2),(EP5))call SaveUnitHandle(XY,(MKI),(17),(TMI))call QTI(TMI,1093751130)call TriggerRegisterTimerEvent(t,0.05,true)call TriggerRegisterUnitEvent(t,EP5,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function ET5))call TriggerEvaluate(t)call UnitApplyTimedLife(EP5,1112820806,4+4*NGI)set t=nullendfunctionfunction EQ5 takes nothing returns booleanreturn(IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))and((LoadInteger(XY,(GetHandleId((GetFilterUnit()))),((4290))))==1)==false and(IsUnitVisible(GetFilterUnit(),GetOwningPlayer(CK))==true or AG1(GetFilterUnit())==false)endfunctionfunction EU5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local group glocal integer i=1local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local real a=(LoadReal(XY,(MKI),(137)))local unit EP5local unit TMIlocal real P6I=(LoadReal(XY,(MKI),(47)))local real P7I=(LoadReal(XY,(MKI),(48)))set x=RCI(x+18*Cos(a))set y=RGI(y+18*Sin(a))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))if GetTriggerEvalCount(t)>166 thenloopexitwhen i>12if(LoadBoolean(XY,(MKI),(511+i-1)))==false thencall KillUnit((LoadUnitHandle(XY,(MKI),(393+i-1))))endifset i=i+1endloopcall FlushChildHashtable(XY,(MKI))call MZI(t)elseset g=MDI()set CK=TLIcall GroupEnumUnitsInRange(g,x,y,400,Condition(function EQ5))loopexitwhen i>12if(LoadBoolean(XY,(MKI),(511+i-1)))==false thenset EP5=(LoadUnitHandle(XY,(MKI),(393+i-1)))set x=(LoadReal(XY,(MKI),(549+i-1)))set y=(LoadReal(XY,(MKI),(567+i-1)))set x=RCI(x+18*Cos(a))set y=RGI(y+18*Sin(a))call SaveReal(XY,(MKI),(549+i-1),((x)*1.0))call SaveReal(XY,(MKI),(567+i-1),((y)*1.0))call SetUnitX(EP5,x)call SetUnitY(EP5,y)set TMI=FirstOfGroup(g)if TMI!=null thencall GroupRemoveUnit(g,TMI)call SaveInteger(XY,(GetHandleId((TMI))),((4290)),(1))call SaveBoolean(XY,(MKI),(511+i-1),(true))call ER5(EP5,TMI,GetUnitAbilityLevel(TLI,1093751127))endifendifset i=i+1endloopcall MCI(g)set g=nullset EP5=nullset TMI=nullendifset t=nullset TLI=nullreturn falseendfunctionfunction F05 takes nothing returns nothinglocal location l=GetSpellTargetLoc()local real P6I=GetLocationX(l)local real P7I=GetLocationY(l)local unit TLI=GetTriggerUnit()local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)local real a=PUI(x,y,P6I,P7I)*bj_DEGTORADlocal unit QHIlocal real U2I=RCI(x+3000*Cos(a))local real U3I=RGI(y+3000*Sin(a))local integer i=1local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real C61local integer NGI=GetUnitAbilityLevel(TLI,1093751127)local integer SVIcall RemoveLocation(l)if NGI==1 thenset SVI=1966092619elseif NGI==2 thenset SVI=1966092616elseif NGI==3 thenset SVI=1966092618elseif NGI==4 thenset SVI=1966092620endifloopexitwhen i>12set QHI=CreateUnit(GetOwningPlayer(TLI),SVI,x+GetRandomInt(-300,300),y+GetRandomInt(-300,300),a*bj_RADTODEG)call SaveUnitHandle(XY,(MKI),(393+i-1),(QHI))call SaveBoolean(XY,(MKI),(511+i-1),(false))call SaveReal(XY,(MKI),(549+i-1),((GetUnitX(QHI))*1.0))call SaveReal(XY,(MKI),(567+i-1),((GetUnitY(QHI))*1.0))set i=i+1endloopcall TriggerRegisterTimerEvent(t,0.03,true)call TriggerAddCondition(t,Condition(function EU5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))call SaveReal(XY,(MKI),(137),((a)*1.0))call SaveReal(XY,(MKI),(47),((U2I)*1.0))call SaveReal(XY,(MKI),(48),((U3I)*1.0))set TLI=nullset QHI=nullset l=nullset t=nullendfunctionfunction FI5 takes nothing returns booleanif GetSpellAbilityId()==1093751127 thencall F05()endifreturn falseendfunctionfunction L11 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function FI5))call IK1(1966092619)call IK1(1966092616)call IK1(1966092618)call IK1(1966092620)call RVI(1093751130)set t=nullendfunctionfunction F15 takes unit TLI,unit Z7O,unit FO5,integer NGI,boolean F25 returns reallocal unit QHI=CreateUnit(GetOwningPlayer(FO5),1697656901,GetUnitX(Z7O),GetUnitY(Z7O),0)if F25 thencall QTI(QHI,1093687129)elsecall QTI(QHI,1093684812)endifcall IssueTargetOrder(QHI,"thunderbolt",FO5)if IsUnitType(FO5,UNIT_TYPE_HERO)==false thencall TPI(TLI,FO5,1,50+25*NGI,0.4)elsecall TPI(TLI,FO5,1,50,0.4)endifif F25 thenreturn((GetUnitX(FO5)-GetUnitX(Z7O))*(GetUnitX(FO5)-GetUnitX(Z7O))+(GetUnitY(FO5)-GetUnitY(Z7O))*(GetUnitY(FO5)-GetUnitY(Z7O)))/1000000endifset QHI=nullreturn((GetUnitX(FO5)-GetUnitX(Z7O))*(GetUnitX(FO5)-GetUnitX(Z7O))+(GetUnitY(FO5)-GetUnitY(Z7O))*(GetUnitY(FO5)-GetUnitY(Z7O)))/360000endfunctionfunction F35 takes unit TLI,unit Z7O returns unitlocal group g=MDI()set CK=TLIcall GroupEnumUnitsInRange(g,GetUnitX(Z7O),GetUnitY(Z7O),600,Condition(function AS1))call GroupRemoveUnit(g,Z7O)set CK=GroupPickRandomUnit(g)call MCI(g)set g=nullreturn CKendfunctionfunction F45 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local integer F55=(LoadInteger(XY,(MKI),(391)))local unit Z7O=M6I(F55)local integer MFI=(LoadInteger(XY,(MKI),(34)))local unit FO5local real KLIcall FlushChildHashtable(XY,(MKI))call MZI(t)if MFI<(NGI*2+1)thenset FO5=F35(TLI,Z7O)if FO5!=null thenset KLI=F15(TLI,Z7O,FO5,NGI,false)set t=CreateTrigger()set MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveInteger(XY,(MKI),(391),(M8I(FO5)))call SaveInteger(XY,(MKI),(34),(MFI+1))call TriggerRegisterTimerEvent(t,KLI+0.4,false)call TriggerAddCondition(t,Condition(function F45))endifendifcall M5I(F55)set t=nullset TLI=nullset Z7O=nullset FO5=nullreturn falseendfunctionfunction F65 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local unit F75=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(N0I,1093684813)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real KLI=F15(N0I,N0I,F75,NGI,true)call SaveUnitHandle(XY,(MKI),(2),(N0I))call SaveInteger(XY,(MKI),(5),(NGI))call SaveInteger(XY,(MKI),(391),(M8I(F75)))call SaveInteger(XY,(MKI),(34),(1))call TriggerRegisterTimerEvent(t,KLI,false)call TriggerAddCondition(t,Condition(function F45))set N0I=nullset F75=nullset t=nullendfunctionfunction F85 takes nothing returns booleanif GetSpellAbilityId()==1093684813 and MBI(GetSpellTargetUnit())==false thencall F65()endifreturn falseendfunctionfunction LC1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function F85))set t=nullendfunctionfunction F95 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local integer NGI=GetUnitAbilityLevel(N0I,1093684805)call UnitRemoveAbility(N0I,1093684805)call QTI(N0I,1093684805)call SetUnitAbilityLevel(N0I,1093684805,NGI)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset N0I=nullreturn falseendfunctionfunction FA5 takes unit TMI,integer NGI returns nothinglocal real E93=(8+NGI*8)/3call SetUnitState(TMI,UNIT_STATE_LIFE,GetUnitState(TMI,UNIT_STATE_LIFE)+E93)endfunctionfunction FB5 takes nothing returns booleanif(IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))==false and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))thencall FA5(GetFilterUnit(),TJ)endifreturn falseendfunctionfunction FC5 takes unit N0I returns nothinglocal integer NGI=GetUnitAbilityLevel(N0I,1093684805)local group g=MDI()set CK=N0Iset TJ=NGIcall GroupEnumUnitsInRange(g,GetUnitX(N0I),GetUnitY(N0I),525,Condition(function FB5))call MCI(g)set g=nullendfunctionfunction FD5 takes unit N0I returns nothinglocal integer NGI=GetUnitAbilityLevel(N0I,1093684805)local real FE5=4+4*NGIcall SetUnitState(N0I,UNIT_STATE_MANA,GetUnitState(N0I,UNIT_STATE_MANA)-(FE5/3))if GetUnitState(N0I,UNIT_STATE_MANA)<FE5 thenif((LoadInteger(XY,(GetHandleId((N0I))),((4265))))==1)==false thencall IssueImmediateOrder(N0I,"unimmolation")endifendifendfunctionfunction FF5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))if GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER thenif GetIssuedOrderId()==852178 thencall FlushChildHashtable(XY,(MKI))call MZI(t)set t=CreateTrigger()set MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(14),(N0I))call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function F95))endifelsecall FC5(N0I)call FD5(N0I)endifset t=nullreturn falseendfunctionfunction FG5 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(14),(N0I))call TriggerRegisterTimerEvent(t,0.33,true)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_ISSUED_ORDER)call TriggerAddCondition(t,Condition(function FF5))set N0I=nullset t=nullendfunctionfunction FH5 takes nothing returns booleanif GetSpellAbilityId()==1093684805 thencall FG5()endifreturn falseendfunctionfunction LE1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function FH5))set t=nullendfunctionfunction FZ5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=GetUnitAbilityLevel(TLI,1093684815)local integer MFI=GetTriggerEvalCount(t)local real FV5=(LoadReal(XY,(MKI),(392)))local real CV4=0if GetTriggerEventId()==EVENT_UNIT_DEATH thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)elseif MFI==4 or MFI==8 or MFI==12 thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))if MFI==12 thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseif MFI==4 or MFI==8 thencall SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("effects\\NetherInferno.mdx",TMI,"origin")))endifset CV4=(0.08+NGI*0.08)*RQI(FV5-GetUnitState(TMI,UNIT_STATE_LIFE),0)if CV4>0 thencall Q5I("+"+I2S(R2I(CV4)),2,TMI,0.023,68,0,187,216)endifendifcall TKI(TLI,TMI,1,5*NGI+CV4)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction FW5 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local unit TMI=GetEnumUnit()call DestroyEffect(AddSpecialEffectTarget("effects\\NetherInferno.mdx",TMI,"origin"))call TriggerRegisterTimerEvent(t,1,true)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function FZ5))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(392),((GetUnitState(TMI,UNIT_STATE_LIFE))*1.0))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("effects\\NetherInferno.mdx",TMI,"origin")))set t=nullset TLI=nullset TMI=nullendfunctionfunction FX5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local location l=GetSpellTargetLoc()local real x=GetLocationX(l)local real y=GetLocationY(l)local group g=MDI()local integer NGI=GetUnitAbilityLevel(TLI,1093684815)call GroupEnumUnitsInRange(g,x,y,190,Condition(function BH1))call ForGroup(g,function FW5)call MCI(g)call RemoveLocation(l)set l=nullset g=nullendfunctionfunction FY5 takes nothing returns booleanif GetSpellAbilityId()==1093684815 thencall FX5()endifreturn falseendfunctionfunction LD1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function FY5))set t=nullendfunctionfunction FJ5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))call FlushChildHashtable(XY,(MKI))call MZI(t)if GetTriggerEventId()!=EVENT_UNIT_SPELL_ENDCAST thencall R6I(TLI)endifset TLI=nullset t=nullreturn falseendfunctionfunction FK5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(2),(TLI))call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_ENDCAST)call TriggerRegisterTimerEvent(t,10,false)call TriggerAddCondition(t,Condition(function FJ5))set t=nullset TLI=nullendfunctionfunction FL5 takes nothing returns booleanif GetSpellAbilityId()==1093684820 or GetSpellAbilityId()==1093684824 thencall FK5()endifreturn falseendfunctionfunction FM5 takes nothing returns booleanif GetUnitTypeId(GetSummonedUnit())==1865429040 or GetUnitTypeId(GetSummonedUnit())==1865429041 or GetUnitTypeId(GetSummonedUnit())==1865429057 or GetUnitTypeId(GetSummonedUnit())==1865429080 thencall MPI(GetSummoningUnit(),4265,8)endifreturn falseendfunctionfunction LF1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SUMMON)call TriggerAddCondition(t,Condition(function FM5))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function FL5))set t=nullendfunctionfunction FN5 takes nothing returns booleanlocal integer id=0local unit TMIlocal real F21=(TimerGetElapsed(M))local real mplocal real hploopexitwhen id>12set TMI=K1[id]if TMI!=null and GetUnitAbilityLevel(TMI,1110459204)==0 and V2I[id]>F21 thenset V2I[id]=0endifif TMI!=null and GetUnitAbilityLevel(TMI,1110459204)>0 thenif V2I[id]>F21 and QPI(TMI)==false thenset hp=GetUnitState(TMI,UNIT_STATE_LIFE)set mp=GetUnitState(TMI,UNIT_STATE_MANA)if hp<V3I[id]thenset V3I[id]=hpelseendifif mp<V4I[id]thenset V4I[id]=mpelseendifcall SetUnitState(TMI,UNIT_STATE_LIFE,V3I[id])set V6I[id]=V6I[id]+1if V6I[id]==10 thenset V6I[id]=0if V7I[id]==1 thencall TKI(V5I[id],TMI,1,12.5)elseif V7I[id]==2 thencall TKI(V5I[id],TMI,1,20)elseif V7I[id]==3 thencall TKI(V5I[id],TMI,1,32)endifendifelseif V2I[id]>F21 and QPI(TMI)==true thenset V2I[id]=0set V3I[id]=9999set V4I[id]=9999endifif(GetUnitAbilityLevel(TMI,1110459204)>0 and V2I[id]<F21)thencall UnitRemoveAbility(TMI,1093749313)call UnitRemoveAbility(TMI,1110459204)call UnitRemoveAbility(TMI,1093749828)endifendifset id=id+1endloopset TMI=nullreturn falseendfunctionfunction FS5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local unit QHIif GetUnitAbilityLevel(TMI,1110459204)==0 thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetOwningPlayer(TMI)!=GetOwningPlayer(GetEventDamageSource())and GetUnitState(TMI,UNIT_STATE_MAX_LIFE)*(0.09+0.01*NGI)>GetUnitState(TMI,UNIT_STATE_LIFE)and((LoadInteger(XY,(GetHandleId((TMI))),((2485))))==1)==false thencall FlushChildHashtable(XY,(MKI))call MZI(t)call UnitRemoveAbility(TMI,1093749313)call UnitRemoveAbility(TMI,1110459204)call UnitRemoveAbility(TMI,1093749828)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\FrostBolt\\FrostBoltMissile.mdl",TMI,"overhead"))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\FrostBolt\\FrostBoltMissile.mdl",TMI,"chest"))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\FrostBolt\\FrostBoltMissile.mdl",TMI,"origin"))set QHI=CreateUnit(GetOwningPlayer(GetEventDamageSource()),1697656901,0,0,0)call UnitRemoveBuffs(TMI,true,true)call UnitRemoveAbility(TMI,1097167980)call UnitDamageTarget(QHI,TMI,100000000.00,true,false,ATTACK_TYPE_MELEE,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)set QHI=nullendifset t=nullset TMI=nullreturn falseendfunctionfunction FT5 takes unit TLI,unit TMI returns nothinglocal integer NGI=GetUnitAbilityLevel(TLI,1093750089)local integer id=GetPlayerId(GetOwningPlayer(TMI))local trigger tlocal integer MKIif NGI==0 thenset NGI=GetUnitAbilityLevel(TLI,1093816645)endifif NGI>0 and IsUnitType(TMI,UNIT_TYPE_HERO)==true and IsUnitIllusion(TMI)==false and HK1(GetUnitTypeId(TMI))==false thenset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function FS5))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(5),(NGI))call QTI(TMI,1093749313)call QTI(TMI,1093749828)if GetUnitAbilityLevel(TLI,1093816645)>0 thenset V2I[id]=(TimerGetElapsed(M))+V8Ielseset V2I[id]=(TimerGetElapsed(M))+7+NGIendifset V3I[id]=GetUnitState(TMI,UNIT_STATE_LIFE)set V4I[id]=GetUnitState(TMI,UNIT_STATE_MANA)set V5I[id]=TLIset V7I[id]=NGIendifset t=nullendfunctionfunction FR5 takes nothing returns nothinglocal unit TLI=CKlocal unit TMI=GetEnumUnit()local integer id=GetPlayerId(GetOwningPlayer(TMI))local integer NGI=GetUnitAbilityLevel(TLI,1093750089)local trigger tlocal integer MKIif IsUnitType(TMI,UNIT_TYPE_HERO)==true and IsUnitIllusion(TMI)==false and GetUnitAbilityLevel(TMI,1110459204)==0 and HK1(GetUnitTypeId(TMI))==false thenif GetUnitAbilityLevel(TLI,1093816645)>0 thenset V2I[id]=V8Ielseset V2I[id]=(TimerGetElapsed(M))+7+NGIendifcall QTI(TMI,1093749313)call QTI(TMI,1093749828)set V3I[id]=GetUnitState(TMI,UNIT_STATE_LIFE)set V4I[id]=GetUnitState(TMI,UNIT_STATE_MANA)set V5I[id]=TLIset V7I[id]=NGIset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function FS5))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(5),(NGI))set t=nullendifset TLI=nullset TMI=nullendfunctionfunction FP5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real x0=(LoadReal(XY,(MKI),(282)))local real y0=(LoadReal(XY,(MKI),(283)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local group g=MDI()set CK=TLIcall GroupEnumUnitsInRange(g,x0,y0,825,Condition(function BW1))call ForGroup(g,function FR5)call MCI(g)if GetTriggerEvalCount(t)>120 thencall KillUnit((LoadUnitHandle(XY,(MKI),(434))))call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset g=nullreturn falseendfunctionfunction Gust takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local location l=GetSpellTargetLoc()local real x=GetLocationX(l)local real y=GetLocationY(l)local real NN2=GetUnitFacing(TLI)local real x2local real y2local unit FQ5local unit GF4local unit FU5local unit G05local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer NGI=GetUnitAbilityLevel(TLI,1093750089)call RemoveLocation(l)set x2=x+350*Cos(NN2*bj_DEGTORAD)set y2=y+350*Sin(NN2*bj_DEGTORAD)set FQ5=CreateUnit(GetOwningPlayer(TLI),1747993139,x,y,NN2)set x2=x+350*Cos(NN2*bj_DEGTORAD)set y2=y-350*Sin(NN2*bj_DEGTORAD)set x2=x-350*Cos(NN2*bj_DEGTORAD)set y2=y+350*Sin(NN2*bj_DEGTORAD)set x2=x-350*Cos(NN2*bj_DEGTORAD)set y2=y-350*Sin(NN2*bj_DEGTORAD)call TriggerRegisterTimerEvent(t,0.1,true)call TriggerAddCondition(t,Condition(function FP5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(282),((x)*1.0))call SaveReal(XY,(MKI),(283),((y)*1.0))call SaveInteger(XY,(MKI),(5),(NGI))call SaveUnitHandle(XY,(MKI),(434),(FQ5))set l=nullset TLI=nullset FQ5=nullset GF4=nullset FU5=nullset G05=nullset t=nullendfunctionfunction Gust_Main takes nothing returns booleanif GetSpellAbilityId()==1093750328 thenendifreturn falseendfunctionfunction SF1 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer id=0local integer i=0local player pcall TriggerRegisterTimerEvent(t,0.1,true)call TriggerAddCondition(t,Condition(function FN5))loopexitwhen id>12set V3I[id]=9999set V4I[id]=9999set id=id+1endlooploopexitwhen i>5set p=BO[i]call SetPlayerAbilityAvailable(p,1093749828,false)set p=CO[i]call SetPlayerAbilityAvailable(p,1093749828,false)set i=i+1endloopset t=nullendfunctionfunction GI5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real YSO=(LoadReal(XY,(GetHandleId(TLI)),(822)))if YSO+0.5<(TimerGetElapsed(M))or GetTriggerEventId()==EVENT_WIDGET_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)if A61(GetEnumUnit())thenreturn falseendifif GetUnitAbilityLevel(TLI,1093748826)>0 thencall UnitRemoveAbility(TLI,1093748826)call UnitRemoveAbility(TLI,1110459189)endifif GetUnitAbilityLevel(TLI,1093749044)>0 thencall UnitRemoveAbility(TLI,1093749044)call UnitRemoveAbility(TLI,1110459189)endifif GetUnitAbilityLevel(TLI,1093749043)>0 thencall UnitRemoveAbility(TLI,1093749043)call UnitRemoveAbility(TLI,1110459189)endifif GetUnitAbilityLevel(TLI,1093749046)>0 thencall UnitRemoveAbility(TLI,1093749046)call UnitRemoveAbility(TLI,1110459189)endifendifset t=nullset TLI=nullreturn falseendfunctionfunction G15 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.1,true)call TriggerRegisterDeathEvent(t,GetEnumUnit())call TriggerAddCondition(t,Condition(function GI5))call SaveUnitHandle(XY,(MKI),(2),(GetEnumUnit()))set t=nullendfunctionfunction GO5 takes nothing returns nothingif A61(GetEnumUnit())thenreturnendifif T6I(GetEnumUnit())==false thenif V9I==1 thenif GetUnitAbilityLevel(GetEnumUnit(),1093748826)==0 thencall UnitRemoveAbility(GetEnumUnit(),1110459189)call QTI(GetEnumUnit(),1093748826)call SaveReal(XY,(GetHandleId(GetEnumUnit())),(822),(((TimerGetElapsed(M)))*1.0))endifelseif V9I==2 thenif GetUnitAbilityLevel(GetEnumUnit(),1093749044)==0 thencall UnitRemoveAbility(GetEnumUnit(),1110459189)call QTI(GetEnumUnit(),1093749044)call SaveReal(XY,(GetHandleId(GetEnumUnit())),(822),(((TimerGetElapsed(M)))*1.0))endifelseif V9I==3 thenif GetUnitAbilityLevel(GetEnumUnit(),1093749043)==0 thencall UnitRemoveAbility(GetEnumUnit(),1110459189)call QTI(GetEnumUnit(),1093749043)call SaveReal(XY,(GetHandleId(GetEnumUnit())),(822),(((TimerGetElapsed(M)))*1.0))endifelseif V9I==4 thenif GetUnitAbilityLevel(GetEnumUnit(),1093749046)==0 thencall UnitRemoveAbility(GetEnumUnit(),1110459189)call QTI(GetEnumUnit(),1093749046)call SaveReal(XY,(GetHandleId(GetEnumUnit())),(822),(((TimerGetElapsed(M)))*1.0))endifendifendifendfunctionfunction G25 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local group M93=(LoadGroupHandle(XY,(MKI),(340)))local real x=GetUnitX(QHI)local real y=GetUnitY(QHI)local group g=MDI()local group g2if GetTriggerEventId()==EVENT_UNIT_DEATH thencall ForGroup(M93,function G15)call MCI(g)call MCI(M93)call FlushChildHashtable(XY,(MKI))call MZI(t)call ShowUnit(QHI,false)set t=nullset TLI=nullset QHI=nullset M93=nullreturn falseendifset VAI=TLIset V9I=GetUnitAbilityLevel(TLI,1093748819)set CK=TLIcall GroupEnumUnitsInRange(g,x,y,300,Condition(function AT1))call GroupRemoveGroup(g,M93)call ForGroup(M93,function G15)call ForGroup(g,function GO5)call SaveGroupHandle(XY,(MKI),(340),(g))call MCI(M93)set t=nullset TLI=nullset QHI=nullset M93=nullreturn falseendfunctionfunction G35 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local location l=GetSpellTargetLoc()local real x=GetLocationX(l)local real y=GetLocationY(l)local integer NGI=GetUnitAbilityLevel(TLI,1093748819)local unit QHI=CreateUnit(GetOwningPlayer(TLI),1848658001,x,y,0)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call UnitApplyTimedLife(QHI,1112820806,16)call TriggerRegisterTimerEvent(t,0.1,true)call TriggerRegisterUnitEvent(t,QHI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function G25))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveGroupHandle(XY,(MKI),(340),(MDI()))call RemoveLocation(l)set TLI=nullset l=nullendfunctionfunction G45 takes nothing returns booleanif GetSpellAbilityId()==1093748819 thencall G35()endifreturn falseendfunctionfunction SC1 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer i=0local player pcall Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function G45))set t=nullloopexitwhen i>5set p=BO[i]call SetPlayerAbilityAvailable(p,1093748826,false)call SetPlayerAbilityAvailable(p,1093749044,false)call SetPlayerAbilityAvailable(p,1093749043,false)call SetPlayerAbilityAvailable(p,1093749046,false)set p=CO[i]call SetPlayerAbilityAvailable(p,1093748826,false)call SetPlayerAbilityAvailable(p,1093749044,false)call SetPlayerAbilityAvailable(p,1093749043,false)call SetPlayerAbilityAvailable(p,1093749046,false)set i=i+1endloopendfunctionfunction G55 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local unit QHIlocal real TSI=(100+50*NGI)/4if GetTriggerEventId()==EVENT_UNIT_DEATH or PAI(x,y,GetUnitX(TMI),GetUnitY(TMI))>765 or GetUnitAbilityLevel(TMI,1110459203)==0 thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call UnitRemoveAbility(TMI,1093749305)call UnitRemoveAbility(TMI,1110459203)call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEvalCount(t)==(10*0.8)thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("war3mapImported\\ShivasEnchantment.mdx",TMI,"overhead")))call TKI(TLI,TMI,1,TSI)elseif GetTriggerEvalCount(t)==(10*1.6)thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("war3mapImported\\ShivasEnchantment.mdx",TMI,"overhead")))call TKI(TLI,TMI,1,TSI)elseif GetTriggerEvalCount(t)==(10*2.5)thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("war3mapImported\\ShivasEnchantment.mdx",TMI,"overhead")))call TKI(TLI,TMI,1,TSI)elseif GetTriggerEvalCount(t)==(10*3.4)thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call TKI(TLI,TMI,1,TSI)elseif GetTriggerEvalCount(t)>(10*3.9)thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call UnitRemoveAbility(TMI,1093749305)call UnitRemoveAbility(TMI,1110459203)call FlushChildHashtable(XY,(MKI))call MZI(t)set QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call QTI(QHI,1093750090)call SetUnitAbilityLevel(QHI,1093750090,NGI)call IssueTargetOrder(QHI,"thunderbolt",TMI)set QHI=nullendifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction G65 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer NGI=GetUnitAbilityLevel(TLI,1093750087)local string s="Doodads\\Cinematic\\GlowingRunes\\GlowingRunes4.mdl"if GetLocalPlayer()==GetOwningPlayer(TMI)thenendifcall QTI(TMI,1093749305)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveReal(XY,(MKI),(6),((GetUnitX(TMI))*1.0))call SaveReal(XY,(MKI),(7),((GetUnitY(TMI))*1.0))call SaveInteger(XY,(MKI),(5),(NGI))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("war3mapImported\\ShivasEnchantment.mdx",TMI,"overhead")))call SaveEffectHandle(XY,(MKI),(176),(AddSpecialEffect(s,GetUnitX(TMI),GetUnitY(TMI))))call TriggerRegisterTimerEvent(t,0.1,true)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function G55))set TLI=nullset TMI=nullset t=nullendfunctionfunction G75 takes nothing returns booleanif GetSpellAbilityId()==1093750087 and MBI(GetSpellTargetUnit())==false thencall G65()endifreturn falseendfunctionfunction SD1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function G75))set t=nullendfunctionfunction G85 takes nothing returns nothinglocal unit TLI=VCIlocal unit TMI=GetEnumUnit()local integer NGI=VBIcall FT5(TLI,TMI)call TKI(TLI,TMI,1,150+100*NGI)call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\PlasmaShot.mdl",TMI,"chest"))set TLI=nullset TMI=nullendfunctionfunction G95 takes nothing returns nothinglocal unit TLI=VCIlocal unit TMI=GetEnumUnit()local integer NGI=VBIcall FT5(TLI,TMI)set TLI=nullset TMI=nullendfunctionfunction GA5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit UII=(LoadUnitHandle(XY,(MKI),(45)))local real P6I=(LoadReal(XY,(MKI),(47)))local real P7I=(LoadReal(XY,(MKI),(48)))local real NN2=(LoadReal(XY,(MKI),(13)))local real OD3=(LoadReal(XY,(MKI),(432)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local real x=GetUnitX(UII)+30*Cos(NN2)local real y=GetUnitY(UII)+30*Sin(NN2)local group glocal fogmodifier QYIif PAI(x,y,P6I,P7I)<35 or x!=RCI(x)or y!=RGI(y)thenset x=P6Iset y=P7Icall SetUnitX(UII,x)call SetUnitY(UII,y)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))set QYI=(LoadFogModifierHandle(XY,(MKI),(440)))call FogModifierStop(QYI)call DestroyFogModifier(QYI)set QYI=nullcall FlushChildHashtable(XY,(MKI))call MZI(t)call KillUnit(UII)set CK=TLIset VCI=TLIset VBI=NGIset g=MDI()call GroupEnumUnitsInRange(g,x,y,OD3+25,Condition(function AT1))call ForGroup(g,function G85)call MCI(g)set g=nullelsecall SetUnitX(UII,x)call SetUnitY(UII,y)set CK=TLIset VCI=TLIset VBI=NGIset g=MDI()call GroupEnumUnitsInRange(g,x,y,300,Condition(function AT1))call ForGroup(g,function G95)call MCI(g)set g=nullendifset t=nullset UII=nullset TLI=nullreturn falseendfunctionfunction GB5 takes unit TLI,real x,real y,real UJ3,effect FX,fogmodifier QYI returns nothinglocal real NN2=Atan2(y-GetUnitY(TLI),x-GetUnitX(TLI))local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit UII=CreateUnit(GetOwningPlayer(TLI),1747993142,GetUnitX(TLI),GetUnitY(TLI),NN2*bj_RADTODEG)local integer NGI=GetUnitAbilityLevel(TLI,1093750089)local real OD3=RPI(25+250+25*UJ3*2,1000)local real P3I=PAI(GetUnitX(TLI),GetUnitY(TLI),x,y)if NGI==0 thenset NGI=GetUnitAbilityLevel(TLI,1093816645)endifif IsUnitEnemy(UII,GetLocalPlayer())and TGI(GetLocalPlayer())==false thencall UnitSetUsesAltIcon(UII,true)endifcall TriggerRegisterTimerEvent(t,RPI(2.0/(P3I/30),0.04),true)call TriggerAddCondition(t,Condition(function GA5))call SaveUnitHandle(XY,(MKI),(45),(UII))call SaveReal(XY,(MKI),(47),((x)*1.0))call SaveReal(XY,(MKI),(48),((y)*1.0))call SaveReal(XY,(MKI),(13),((NN2)*1.0))call SaveReal(XY,(MKI),(432),((OD3)*1.0))call SaveInteger(XY,(MKI),(5),(NGI))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveFogModifierHandle(XY,(MKI),(440),(QYI))call SaveEffectHandle(XY,(MKI),(32),(FX))call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093750089,true)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093816645,true)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093750094,false)set t=nullset UII=nullendfunctionfunction GC5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit UII=(LoadUnitHandle(XY,(MKI),(45)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real NN2=(LoadReal(XY,(MKI),(13)))local real xlocal real ylocal real UJ3=(TimerGetElapsed(M))-(LoadReal(XY,(MKI),(431)))local string slocal fogmodifier QYIlocal effect FXlocal real GD5=GetUnitX(UII)+30*Cos(NN2)local real GE5=GetUnitY(UII)+30*Sin(NN2)set x=RCI(GD5)set y=RGI(GE5)call SetUnitX(UII,x)call SetUnitY(UII,y)if GetTriggerEventId()==EVENT_UNIT_DEATH or(GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT and GetSpellAbilityId()==1093750094)or x!=GD5 or y!=GE5 thencall FlushChildHashtable(XY,(MKI))call MZI(t)call RemoveUnit(UII)set s=""if IsPlayerAlly(GetOwningPlayer(TLI),GetLocalPlayer())or TGI(GetLocalPlayer())thenset s="war3mapImported\\IceWindGroundFX.mdl"endifset QYI=CreateFogModifierRadius(GetOwningPlayer(TLI),FOG_OF_WAR_VISIBLE,x,y,500,true,true)call FogModifierStart(QYI)set FX=AddSpecialEffect(s,x,y)call GB5(TLI,x,y,UJ3,FX,QYI)set QYI=nullset FX=nullendifset t=nullset UII=nullset TLI=nullreturn falseendfunctionfunction GF5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local location l=GetSpellTargetLoc()local real x=GetLocationX(l)local real y=GetLocationY(l)local real a=Atan2(y-GetUnitY(TLI),x-GetUnitX(TLI))local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit UII=CreateUnit(GetOwningPlayer(TLI),1211122232,GetUnitX(TLI),GetUnitY(TLI),a*bj_RADTODEG)if IsUnitEnemy(UII,GetLocalPlayer())and TGI(GetLocalPlayer())==false thencall UnitSetUsesAltIcon(UII,true)endifcall SaveUnitHandle(XY,(MKI),(45),(UII))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(13),((a)*1.0))call SaveReal(XY,(MKI),(431),(((TimerGetElapsed(M)))*1.0))call TriggerRegisterTimerEvent(t,0.02,true)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function GC5))call SetUnitColor(UII,GetPlayerColor(Player(14)))call RemoveLocation(l)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093750089,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093816645,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093750094,true)call QTI(TLI,1093750094)set TLI=nullset l=nullset t=nullset UII=nullendfunctionfunction GG5 takes nothing returns booleanif GetSpellAbilityId()==1093750089 or GetSpellAbilityId()==1093816645 thencall GF5()endifreturn falseendfunctionfunction SE1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function GG5))set t=nullendfunctionfunction ChillingTouch_DPS takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer NGI=GetUnitAbilityLevel(TLI,1093748817)if GetTriggerEvalCount(t)==6 thencall FlushChildHashtable(XY,(MKI))call MZI(t)endifcall TKI(TLI,TMI,1,8+2*NGI)set t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction GH5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local integer GZ5=(LoadInteger(XY,(GetHandleId(TLI)),(449)))if GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamageSource()==TLI and GetEventDamage()>1 thencall DisableTrigger(t)if GZ5>0 thencall SaveInteger(XY,(GetHandleId(TLI)),(449),(GZ5-1))call Q5I("+"+I2S(40+10*NGI),1,TLI,0.024,100,200,255,255)call TKI(TLI,TMI,1,40+10*NGI)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)endifelsecall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction GV5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local integer NGI=(LoadInteger(XY,(MKI),(5)))if GetTriggerEventId()!=EVENT_PLAYER_UNIT_ATTACKED or(LoadInteger(XY,(GetHandleId(TLI)),(449)))==0 thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call SaveInteger(XY,(GetHandleId(TLI)),(449),(0))call FlushChildHashtable(XY,(MKI))call MZI(t)call UnitRemoveAbility(TLI,1093748814)call UnitRemoveAbility(TLI,1110459210)call UnitRemoveAbility(TLI,1093749072)elseif GetAttacker()==TLI and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and((LoadInteger(XY,(GetHandleId((TLI))),((4289))))==1)==false thencall MPI(TLI,4289,0.4)set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,2.0,false)call TriggerAddCondition(t,Condition(function GH5))call SaveUnitHandle(XY,(MKI),(17),(GetTriggerUnit()))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveInteger(XY,(MKI),(5),(NGI))endifset t=nullset TLI=nullreturn falseendfunctionfunction GW5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetEnumUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer NGI=GetUnitAbilityLevel(TLI,1093748817)call QTI(TMI,1093748814)call QTI(TMI,1093749072)call SaveInteger(XY,(GetHandleId(TMI)),(449),(2+NGI))call SaveUnitHandle(XY,(MKI),(2),(TMI))call SaveUnitHandle(XY,(MKI),(19),(TLI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveEffectHandle(XY,(MKI),(175),(AddSpecialEffectTarget("war3mapImported\\FrostHands.mdx",TMI,"right,hand")))call SaveEffectHandle(XY,(MKI),(176),(AddSpecialEffectTarget("war3mapImported\\FrostHands.mdx",TMI,"left,hand")))call TriggerRegisterTimerEvent(t,30,false)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function GV5))set TLI=nullset TMI=nullset t=nullendfunctionfunction GX5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local group g=MDI()local location l=GetSpellTargetLoc()local real x=GetLocationX(l)local real y=GetLocationY(l)call RemoveLocation(l)call DestroyEffect(AddSpecialEffect("war3mapImported\\IcyWind.mdl",x,y))call GroupEnumUnitsInRange(g,x,y,525+25,Condition(function BD1))call GroupAddUnit(g,TLI)call ForGroup(g,function GW5)call MCI(g)set TLI=nullset g=nullset l=nullendfunctionfunction GY5 takes nothing returns booleanif GetSpellAbilityId()==1093748817 thencall GX5()endifreturn falseendfunctionfunction SG1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function GY5))set t=nullendfunctionfunction GJ5 takes nothing returns nothingcall TKI(VDI,GetEnumUnit(),1,(GetUnitAbilityLevel(VDI,1093749069)*75)/10)endfunctionfunction GK5 takes unit TLI returns nothinglocal real C11=(GetUnitAbilityLevel(TLI,1093749069)*75)/2set C11=C11/10.0if GetUnitState(TLI,UNIT_STATE_LIFE)<=C11*0.75 thenset C11=GetUnitState(TLI,UNIT_STATE_LIFE)/0.75-10endifcall TKI(TLI,TLI,1,C11)endfunctionfunction GL5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)local group glocal real C11local unit QHIlocal integer NGI=0local integer MFI=GetTriggerEvalCount(t)if GetTriggerEventId()==EVENT_UNIT_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)return falseelseif GetTriggerEvalCount(t)==1 thenset QHI=CreateUnit(GetOwningPlayer(TLI),1747993138,x,y,0)call UnitApplyTimedLife(QHI,1112820806,1)set QHI=nullcall TriggerRegisterTimerEvent(t,0.1,true)set g=MDI()set VDI=TLIset CK=TLIcall GroupEnumUnitsInRange(g,x,y,350,Condition(function AT1))call ForGroup(g,function GJ5)call GK5(TLI)call MCI(g)elseif MFI==10 thencall FlushChildHashtable(XY,(MKI))call MZI(t)endifset g=MDI()set VDI=TLIset CK=TLIcall GroupEnumUnitsInRange(g,x,y,350,Condition(function AT1))call ForGroup(g,function GJ5)call GK5(TLI)call MCI(g)call CW1(TLI)call CG1(TLI,0,0)endifendifset t=nullset g=nullset TLI=nullreturn falseendfunctionfunction GM5 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local real C11=(GetUnitAbilityLevel(TLI,1093749069)*75)/2call TriggerRegisterTimerEvent(t,1.5,false)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function GL5))call SaveUnitHandle(XY,(MKI),(2),(TLI))set t=nullset TLI=nullendfunctionfunction GN5 takes nothing returns booleanif GetSpellAbilityId()==1093749069 thencall GM5()endifreturn falseendfunctionfunction SW1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function GN5))set t=nullendfunctionfunction GS5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local player GF2local integer NGI=GetUnitAbilityLevel(TLI,1093749070)local integer MainLevel=GetUnitAbilityLevel(TLI,1093749070)local real F21=(TimerGetElapsed(M))local real GT5=(LoadReal(XY,(MKI),(415)))local real GR5=(LoadReal(XY,(MKI),(416)))if QPI(TLI)thenset t=nullset TLI=nullreturn falseendifif NZI(GetOwningPlayer(TLI))thenset GF2=CO[1]elseset GF2=BO[1]endifif GetTriggerEventId()==EVENT_UNIT_DAMAGED and GetOwningPlayer(GetEventDamageSource())==DO thenif GetUnitAbilityLevel(TLI,1093749061)>0 thencall UnitRemoveAbility(TLI,1093749061)call UnitRemoveAbility(TLI,1110459193)endifif GetUnitAbilityLevel(TLI,1093749062)>0 thencall UnitRemoveAbility(TLI,1093749062)call UnitRemoveAbility(TLI,1110459193)endifif GetUnitAbilityLevel(TLI,1093749063)>0 thencall UnitRemoveAbility(TLI,1093749063)call UnitRemoveAbility(TLI,1110459193)endifcall SaveReal(XY,(MKI),(414),((F21+2)*1.0))set t=nullset TLI=nullreturn falseendifif(LoadReal(XY,(MKI),(414)))>F21 thenset t=nullset TLI=nullreturn falseendifif(IsUnitVisible(TLI,GF2)and A91(TLI)==false)or GetUnitAbilityLevel(TLI,1112433775)>0 thenset GR5=0if GetUnitAbilityLevel(TLI,1093749061)>0 or GetUnitAbilityLevel(TLI,1093749062)>0 or GetUnitAbilityLevel(TLI,1093749063)>0 thenset GT5=GT5+0.1if GT5>0.4 thenset GT5=0if GetUnitAbilityLevel(TLI,1093749061)>0 thencall UnitRemoveAbility(TLI,1093749061)call UnitRemoveAbility(TLI,1110459193)endifif GetUnitAbilityLevel(TLI,1093749062)>0 thencall UnitRemoveAbility(TLI,1093749062)call UnitRemoveAbility(TLI,1110459193)endifif GetUnitAbilityLevel(TLI,1093749063)>0 thencall UnitRemoveAbility(TLI,1093749063)call UnitRemoveAbility(TLI,1110459193)endifendifendifcall SaveReal(XY,(MKI),(415),((GT5)*1.0))call SaveReal(XY,(MKI),(416),((GR5)*1.0))elseif IsUnitVisible(TLI,GF2)==false or A91(TLI)thenset GT5=0if(NGI==1 and GetUnitAbilityLevel(TLI,1093749061)==0)or(NGI==2 and GetUnitAbilityLevel(TLI,1093749062)==0)or(NGI==3 and GetUnitAbilityLevel(TLI,1093749063)==0)thenset GR5=GR5+0.1if GR5>0.4 thenset GR5=0if NGI==1 thenif GetUnitAbilityLevel(TLI,1093749061)==0 thencall QTI(TLI,1093749061)call UnitMakeAbilityPermanent(TLI,true,1093749047)call UnitMakeAbilityPermanent(TLI,true,1093749048)call UnitMakeAbilityPermanent(TLI,true,1093749059)endifendifif NGI==2 thenif GetUnitAbilityLevel(TLI,1093749061)>0 thencall UnitRemoveAbility(TLI,1093749061)call UnitRemoveAbility(TLI,1110459193)endifif GetUnitAbilityLevel(TLI,1093749062)==0 thencall QTI(TLI,1093749062)call UnitMakeAbilityPermanent(TLI,true,1093749047)call UnitMakeAbilityPermanent(TLI,true,1093749049)call UnitMakeAbilityPermanent(TLI,true,1093749060)endifendifif NGI==3 thenif GetUnitAbilityLevel(TLI,1093749061)>0 thencall UnitRemoveAbility(TLI,1093749061)call UnitRemoveAbility(TLI,1110459193)endifif GetUnitAbilityLevel(TLI,1093749062)>0 thencall UnitRemoveAbility(TLI,1093749062)call UnitRemoveAbility(TLI,1110459193)endifif GetUnitAbilityLevel(TLI,1093749063)==0 thencall QTI(TLI,1093749063)call UnitMakeAbilityPermanent(TLI,true,1093749047)call UnitMakeAbilityPermanent(TLI,true,1093749057)call UnitMakeAbilityPermanent(TLI,true,1093749058)endifendifendifendifcall SaveReal(XY,(MKI),(415),((GT5)*1.0))call SaveReal(XY,(MKI),(416),((GR5)*1.0))endifset t=nullset TLI=nullreturn falseendfunctionfunction GP5 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SaveReal(XY,(MKI),(415),((0)*1.0))call SaveReal(XY,(MKI),(416),((0)*1.0))call SaveReal(XY,(MKI),(414),(((TimerGetElapsed(M)))*1.0))call SaveUnitHandle(XY,(MKI),(2),(GetTriggerUnit()))call TriggerRegisterTimerEvent(t,0.1,true)call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function GS5))call SetPlayerAbilityAvailable(GetOwningPlayer(GetTriggerUnit()),1093749061,false)call SetPlayerAbilityAvailable(GetOwningPlayer(GetTriggerUnit()),1093749062,false)call SetPlayerAbilityAvailable(GetOwningPlayer(GetTriggerUnit()),1093749063,false)set t=nullendfunctionfunction GQ5 takes nothing returns booleanif GetLearnedSkill()==1093749070 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093749070)==1 thencall GP5()endifreturn falseendfunctionfunction SV1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function GQ5))set t=nullendfunctionfunction GU5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=GetDyingUnit()if GetOwningPlayer(GetKillingUnit())==GetOwningPlayer(TLI)and IsUnitType(TMI,UNIT_TYPE_HERO)==true and IsUnitIllusion(TMI)==false thenendifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction H05 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer HI5=(LoadInteger(XY,(MKI),(422)))local integer H15=(LoadInteger(XY,(MKI),(423)))local integer D04=(LoadInteger(XY,(MKI),(424)))if GetTriggerEventId()==EVENT_UNIT_DEATH thenif(LoadBoolean(XY,(MKI),(276)))==false and GetTriggerUnit()==TLI thencall SaveBoolean(XY,(MKI),(276),(true))call SetHeroAgi(TLI,GetHeroAgi(TLI,false)-HI5-H15-D04,true)elseif(LoadBoolean(XY,(MKI),(277)))==false and GetTriggerUnit()==TMI thencall SaveBoolean(XY,(MKI),(277),(true))call SetHeroAgi(TMI,GetHeroAgi(TMI,false)+HI5,true)call SetHeroStr(TMI,GetHeroStr(TMI,false)+H15,true)call SetHeroInt(TMI,GetHeroInt(TMI,false)+D04,true)endifelseif(LoadBoolean(XY,(MKI),(276)))==false thencall SaveBoolean(XY,(MKI),(276),(true))call SetHeroAgi(TLI,GetHeroAgi(TLI,false)-HI5-H15-D04,true)endifif(LoadBoolean(XY,(MKI),(277)))==false thencall SaveBoolean(XY,(MKI),(277),(true))call SetHeroAgi(TMI,GetHeroAgi(TMI,false)+HI5,true)call SetHeroStr(TMI,GetHeroStr(TMI,false)+H15,true)call SetHeroInt(TMI,GetHeroInt(TMI,false)+D04,true)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction HO5 takes unit TLI,unit TMI returns nothinglocal integer NGI=GetUnitAbilityLevel(TLI,1093748818)local integer XWO=MUI(TMI)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer HI5local integer H15local integer D04local real BP1if XWO==2 thenset HI5=IMinBJ(GetHeroAgi(TMI,false)-1,1)set H15=IMinBJ(GetHeroStr(TMI,false)-1,1)set D04=IMinBJ(GetHeroInt(TMI,false)-1,1)elseif XWO==3 thenset HI5=IMinBJ(GetHeroAgi(TMI,false)-1,1)set H15=IMinBJ(GetHeroStr(TMI,false)-1,1)set D04=IMinBJ(GetHeroInt(TMI,false)-1,1)elseif XWO==1 thenset HI5=IMinBJ(GetHeroAgi(TMI,false)-1,1)set H15=IMinBJ(GetHeroStr(TMI,false)-1,1)set D04=IMinBJ(GetHeroInt(TMI,false)-1,1)endifcall SetHeroAgi(TLI,GetHeroAgi(TLI,false)+HI5+D04+H15,true)call SetHeroAgi(TMI,GetHeroAgi(TMI,false)-HI5,true)call SetHeroStr(TMI,GetHeroStr(TMI,false)-H15,true)call SetHeroInt(TMI,GetHeroInt(TMI,false)-D04,true)call SaveInteger(XY,(MKI),(422),(HI5))call SaveInteger(XY,(MKI),(424),(D04))call SaveInteger(XY,(MKI),(423),(H15))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveBoolean(XY,(MKI),(276),(false))call SaveBoolean(XY,(MKI),(277),(false))if NGI==1 thenset BP1=15elseif NGI==2 thenset BP1=30elseif NGI==3 thenset BP1=60elseif NGI==4 thenset BP1=120endifcall TriggerRegisterTimerEvent(t,BP1,false)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function H05))set t=nullendfunctionfunction H25 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))if GetTriggerEventId()!=EVENT_UNIT_DEATH thencall HO5(TLI,TMI)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction H35 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer TRI=(LoadInteger(XY,(MKI),(30)))local unit TMI=M6I(TRI)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamageSource()==TLI thencall DisableTrigger(t)call M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.01,false)call TriggerAddCondition(t,Condition(function H25))call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))endifelsecall M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction H45 takes nothing returns nothinglocal trigger t=CreateTrigger()local unit TMI=GetTriggerUnit()local unit TLI=GetAttacker()local integer MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,1,false)call TriggerAddCondition(t,Condition(function H35))call SaveInteger(XY,(MKI),(30),(M8I(TMI)))call SaveUnitHandle(XY,(MKI),(2),(TLI))set TMI=nullset TLI=nullset t=nullendfunctionfunction H55 takes nothing returns nothinglocal unit TLI=GetAttacker()if((LoadInteger(XY,(GetHandleId((TLI))),((4274))))==1)==false thencall MPI(TLI,4274,0.45-GetUnitAbilityLevel(GetAttacker(),1093748818)*0.05)call H45()endifendfunctionfunction H65 takes nothing returns booleanif GetUnitAbilityLevel(GetAttacker(),1093748818)>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==true and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(14)))and GetUnitTypeId(GetTriggerUnit())!=1848651852 and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))thencall H55()endifreturn falseendfunctionfunction H75 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKIcall Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function H65))call SaveUnitHandle(XY,(GetHandleId(t)),(14),(GetTriggerUnit()))set t=CreateTrigger()set MKI=GetHandleId(t)call Q9I(t,EVENT_PLAYER_UNIT_DEATH)call TriggerAddCondition(t,Condition(function GU5))call SaveUnitHandle(XY,(MKI),(2),(GetTriggerUnit()))set t=nullendfunctionfunction H85 takes nothing returns booleanif GetLearnedSkill()==1093748818 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093748818)==1 thencall H75()endifreturn falseendfunctionfunction SH1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function H85))set t=nullendfunctionfunction H95 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local integer MFI=(LoadInteger(XY,(MKI),(34)))if MFI>(4.0)/0.03 or GetTriggerEventId()==EVENT_WIDGET_DEATH thenif((LoadInteger(XY,(GetHandleId((TLI))),((4420))))==1)==false thencall UnitSetUsesAltIcon(TLI,false)endifcall SaveInteger(XY,(GetHandleId((TLI))),((4421)),(2))call UnitAddAbility(TLI,1093817942)call UnitRemoveAbility(TLI,1093817942)call KillUnit(QHI)call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED thenif GetTriggerUnit()==TLI thencall IssueImmediateOrder(GetAttacker(),"stop")endifelseset MFI=MFI+1call SaveInteger(XY,(MKI),(34),(MFI))call SetUnitX(QHI,GetUnitX(TLI))call SetUnitY(QHI,GetUnitY(TLI))endifset t=nullset TLI=nullset QHI=nullreturn falseendfunctionfunction HA5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093749070)local real d=4.0local unit QHI=CreateUnit(GetOwningPlayer(TLI),1747993137,GetUnitX(TLI),GetUnitY(TLI),0)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)if IsPlayerAlly(GetLocalPlayer(),GetOwningPlayer(TLI))==false and TGI(GetLocalPlayer())==false thencall UnitSetUsesAltIcon(TLI,true)endifcall O11(TLI,1093748823,1,d)call O11(TLI,1093748824,1,d)call SaveInteger(XY,(GetHandleId((TLI))),((4421)),(1))call UnitAddAbility(TLI,1093817941)call UnitRemoveAbility(TLI,1093817941)if GetUnitTypeId(TLI)!=1160786520 thencall UnitAddAbility(TLI,1097625443)call UnitRemoveAbility(TLI,1097625443)endifcall ShowUnit(TLI,false)call ShowUnit(TLI,true)call SelectUnitAddForPlayer(TLI,GetOwningPlayer(TLI))call TriggerRegisterTimerEvent(t,0.03,true)call TriggerRegisterDeathEvent(t,TLI)call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function H95))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveInteger(XY,(MKI),(34),(0))set TLI=nullendfunctionfunction HB5 takes nothing returns booleanif GetSpellAbilityId()==1093749070 thencall HA5()endifreturn falseendfunctionfunction SZ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function HB5))set t=nullendfunctionfunction HC5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer MFI=GetTriggerEvalCount(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local lightning QOI=(LoadLightningHandle(XY,(MKI),(196)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local real P4I=(LoadReal(XY,(MKI),(189)))local real P5I=(LoadReal(XY,(MKI),(190)))local real P6I=GetUnitX(TMI)local real P7I=GetUnitY(TMI)local real U2Ilocal real U3Ilocal real PI2=(LoadReal(XY,(MKI),(23)))local real P12=(LoadReal(XY,(MKI),(24)))local real NN2local real P3I=PAI(PI2,P12,P6I,P7I)call SaveReal(XY,(MKI),(23),((P6I)*1.0))call SaveReal(XY,(MKI),(24),((P7I)*1.0))if P3I>100 or MFI>(3.5/.03)or T6I(TMI)==true thencall DestroyLightning(QOI)call FlushChildHashtable(XY,(MKI))call MZI(t)elsecall MoveLightning(QOI,true,P4I,P5I,P6I,P7I)if PAI(P4I,P5I,P6I,P7I)>325 thenset NN2=Atan2(P7I-P5I,P6I-P4I)set U2I=P4I+(325)*Cos(NN2)set U3I=P5I+(325)*Sin(NN2)call SetUnitX(TMI,U2I)call SetUnitY(TMI,U3I)endifendifset t=nullset TLI=nullset TMI=nullset QOI=nullreturn falseendfunctionfunction HD5 takes unit TLI,unit TMI,integer NGI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local lightning QOI=AddLightning("PONC",true,GetUnitX(TLI),GetUnitY(TLI),GetUnitX(TMI),GetUnitY(TMI))call SetLightningColor(QOI,1,1,1,1)call SaveLightningHandle(XY,(MKI),(196),(QOI))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveReal(XY,(MKI),(189),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(190),((GetUnitY(TLI))*1.0))call SaveReal(XY,(MKI),(23),((GetUnitX(TMI))*1.0))call SaveReal(XY,(MKI),(24),((GetUnitY(TMI))*1.0))call TriggerRegisterTimerEvent(t,0.03,true)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function HC5))call TKI(TLI,TMI,1,60*NGI)call IssueTargetOrder(TLI,"attack",TMI)set t=nullset QOI=nullendfunctionfunction HE5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer MFI=GetTriggerEvalCount(t)local integer NGI=(LoadInteger(XY,(MKI),(5)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real NN2=(LoadReal(XY,(MKI),(13)))local real IO3=(LoadReal(XY,(MKI),(189)))local real I23=(LoadReal(XY,(MKI),(190)))local real P6I=(LoadReal(XY,(MKI),(47)))local real P7I=(LoadReal(XY,(MKI),(48)))local real U2I=IO3+(30*(20+4*2)/30)*MFI*Cos(NN2*bj_DEGTORAD)local real U3I=I23+(30*(20+4*2)/30)*MFI*Sin(NN2*bj_DEGTORAD)local real ZU3=SquareRoot((U2I-P6I)*(U2I-P6I)+(U3I-P7I)*(U3I-P7I))local real V03=700local real VI3=175local real V13=(1-ZU3/V03)*VI3*2local group g=MDI()local unit TMIif MFI==1 thencall SetUnitAnimationByIndex(TLI,5)call SetUnitTimeScale(TLI,1.5)endifif V13>VI3 thencall SetUnitAnimationByIndex(TLI,5)set V13=VI3*2-V13endifcall SetUnitFlyHeight(TLI,RQI(V13,0),0)call SetUnitX(TLI,RCI(U2I))call SetUnitY(TLI,RGI(U3I))call SetUnitFacing(TLI,NN2)set CK=TLIcall GroupEnumUnitsInRange(g,U2I,U3I,120,Condition(function BX1))set TMI=FirstOfGroup(g)call MCI(g)if ZU3<30 or TMI!=null or GetTriggerEvalCount(t)>75 thencall SetUnitFlyHeight(TLI,0,0)call SetUnitFacing(TLI,NN2)call SetUnitTimeScale(TLI,1)call SetUnitAnimation(TLI,"stand")call SetUnitPathing(TLI,true)call UnitRemoveAbility(TLI,1093749302)call QEI(GetUnitX(TLI),GetUnitY(TLI),100)if TMI!=null and T6I(TMI)==false thencall MPI(TMI,4408,5)call HD5(TLI,TMI,NGI)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction HF5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093749303)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real P3I=700local real NN2=GetUnitFacing(TLI)local real P4I=GetUnitX(TLI)local real P5I=GetUnitY(TLI)local real P6I=RCI(P4I+P3I*Cos(NN2*bj_DEGTORAD))local real P7I=RGI(P5I+P3I*Sin(NN2*bj_DEGTORAD))call QTI(TLI,1097691750)call UnitRemoveAbility(TLI,1097691750)call SetUnitPathing(TLI,false)call QTI(TLI,1093749302)call TriggerRegisterTimerEvent(t,0.03,true)call TriggerAddCondition(t,Condition(function HE5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveReal(XY,(MKI),(13),((NN2)*1.0))call SaveReal(XY,(MKI),(189),((P4I)*1.0))call SaveReal(XY,(MKI),(190),((P5I)*1.0))call SaveReal(XY,(MKI),(47),((P6I)*1.0))call SaveReal(XY,(MKI),(48),((P7I)*1.0))set TLI=nullset t=nullendfunctionfunction HG5 takes nothing returns booleanif GetSpellAbilityId()==1093749303 thencall HF5()endifreturn falseendfunctionfunction SX1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function HG5))set t=nullendfunctionfunction HH5 takes nothing returns nothinglocal integer MKI=GetHandleId(GetTriggeringTrigger())local unit TLI=CKlocal unit TMI=DKlocal real TSI=(LoadReal(XY,(MKI),(20)))call TKI(TLI,TMI,1,TSI)set TLI=nullset TMI=nullendfunctionfunction HZ5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetEnumUnit()local trigger t=U6I(TLI,TMI,1747993168,"HH5",700,false)local integer MKI=GetHandleId(t)local integer NGI=GetUnitAbilityLevel(TLI,1093678145)local real TSIif NGI==1 thenset TSI=85elseif NGI==2 thenset TSI=165elseif NGI==3 thenset TSI=225elseif NGI==4 thenset TSI=300endifcall SaveReal(XY,(MKI),(20),((TSI)*1.0))set TLI=nullset TMI=nullset t=nullendfunctionfunction HV5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local group g=MDI()local integer NGI=GetUnitAbilityLevel(TLI,1093678145)call GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),500,Condition(function AK1))call ForGroup(g,function HZ5)call MCI(g)call PlaySoundOnUnitBJ(OF,100,TLI)set TLI=nullendfunctionfunction HW5 takes nothing returns booleanif GetSpellAbilityId()==1093678145 thencall HV5()endifreturn falseendfunctionfunction SY1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function HW5))set t=nullendfunctionfunction HX5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST thencall FlushChildHashtable(XY,(MKI))call MZI(t)elsecall FlushChildHashtable(XY,(MKI))call MZI(t)call R6I(TLI)endifset t=nullset TLI=nullreturn falseendfunctionfunction HY5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer NGI=GetUnitAbilityLevel(TLI,1093677136)call TriggerRegisterTimerEvent(t,1+1.75+0.75*NGI,false)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_ENDCAST)call TriggerAddCondition(t,Condition(function HX5))call SaveUnitHandle(XY,(MKI),(2),(TLI))set TLI=nullset t=nullendfunctionfunction HJ5 takes nothing returns booleanif GetSpellAbilityId()==1093677136 thencall HY5()endifreturn falseendfunctionfunction SJ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function HJ5))set t=nullendfunctionfunction HK5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093677128)local integer SVIlocal real P6I=GetSpellTargetX()local real P7I=GetSpellTargetY()local real xlocal real ylocal real dlocal real hlocal real KLI=40local unit uif NGI==0 thenset KLI=45set NGI=GetUnitAbilityLevel(TLI,1093681457)if NGI==1 thenset SVI=1865429315elseif NGI==2 thenset SVI=1865429316elseif NGI==3 thenset SVI=1865429317endifelseif NGI==1 thenset SVI=1869836340elseif NGI==2 thenset SVI=1865429048elseif NGI==3 thenset SVI=1865429049endifendifset d=65set h=65set x=P6I+0*dset y=P7I+1*hset u=CreateUnit(GetOwningPlayer(TLI),SVI,x,y,0)call UnitApplyTimedLife(u,1112820806,KLI)set x=P6I+1*dset y=P7I+1*hset u=CreateUnit(GetOwningPlayer(TLI),SVI,x,y,0)call UnitApplyTimedLife(u,1112820806,KLI)set x=P6I+2*dset y=P7I+1*hset u=CreateUnit(GetOwningPlayer(TLI),SVI,x,y,0)call UnitApplyTimedLife(u,1112820806,KLI)set x=P6I-1*dset y=P7I+1*hset u=CreateUnit(GetOwningPlayer(TLI),SVI,x,y,0)call UnitApplyTimedLife(u,1112820806,KLI)set x=P6I-2*dset y=P7I+1*hset u=CreateUnit(GetOwningPlayer(TLI),SVI,x,y,0)call UnitApplyTimedLife(u,1112820806,KLI)set x=P6I-1*dset y=P7I+0*hset u=CreateUnit(GetOwningPlayer(TLI),SVI,x,y,0)call UnitApplyTimedLife(u,1112820806,KLI)set x=P6I+1*dset y=P7I+0*hset u=CreateUnit(GetOwningPlayer(TLI),SVI,x,y,0)call UnitApplyTimedLife(u,1112820806,KLI)set x=P6I-1*dset y=P7I-1*hset u=CreateUnit(GetOwningPlayer(TLI),SVI,x,y,0)call UnitApplyTimedLife(u,1112820806,KLI)set x=P6I+0*dset y=P7I-1*hset u=CreateUnit(GetOwningPlayer(TLI),SVI,x,y,0)call UnitApplyTimedLife(u,1112820806,KLI)set x=P6I+1*dset y=P7I-1*hset u=CreateUnit(GetOwningPlayer(TLI),SVI,x,y,0)call UnitApplyTimedLife(u,1112820806,KLI)set TLI=nullendfunctionfunction HL5 takes nothing returns booleanif GetSpellAbilityId()==1093677128 or GetSpellAbilityId()==1093681457 thencall HK5()endifreturn falseendfunctionfunction SK1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function HL5))set t=nullendfunctionfunction HM5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=(LoadInteger(XY,(MKI),(5)))if GetTriggerEventId()==EVENT_WIDGET_DEATH or GetTriggerEvalCount(t)==4 or T6I(TMI)thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call UnitRemoveAbility(TMI,1093816119)call UnitRemoveAbility(TMI,1110460227)call FlushChildHashtable(XY,(MKI))call MZI(t)endifif GetTriggerEventId()!=EVENT_WIDGET_DEATH thencall TKI(TLI,TMI,1,20*NGI-10)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction HN5 takes unit TLI,unit TMI,integer NGI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call QTI(TMI,1093816119)call TriggerRegisterTimerEvent(t,1,true)call TriggerRegisterDeathEvent(t,TMI)call TriggerAddCondition(t,Condition(function HM5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("Environment\\LargeBuildingFire\\LargeBuildingFire1.mdl",TMI,"chest")))set t=nullendfunctionfunction HS5 takes nothing returns booleanif IsUnitInGroup(GetEnumUnit(),VEI)==false and T6I(GetEnumUnit())==false thencall GroupAddUnit(VEI,GetEnumUnit())call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\FireBlast.mdx",GetEnumUnit(),"chest"))call HN5(VGI,GetEnumUnit(),VFI)endifreturn falseendfunctionfunction HT5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer MFI=(LoadInteger(XY,(MKI),(34)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real P4I=(LoadReal(XY,(MKI),(189)))local real P5I=(LoadReal(XY,(MKI),(190)))local real P6I=(LoadReal(XY,(MKI),(47)))local real P7I=(LoadReal(XY,(MKI),(48)))local real a=(LoadReal(XY,(MKI),(13)))local real HR5=(1-I2R(MFI)/50)*bj_PIlocal real HP5=1400/2*Cos(HR5)local real HQ5=500/2*Sin(HR5)local real x=RCI(P6I+HP5*Cos(a)-HQ5*Sin(a))local real y=RGI(P7I+HP5*Sin(a)+HQ5*Cos(a))local group WVO=(LoadGroupHandle(XY,(MKI),(133)))local group glocal integer NGI=GetUnitAbilityLevel(TLI,1093751370)if GetTriggerEventId()==EVENT_UNIT_DEATH or(GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and MFI>0 and(GetSpellAbilityId()==1093808206 or GetSpellAbilityId()==1093751371))or MFI>100 or A11(TLI)thencall QEI(x,y,300)call SetUnitVertexColor(TLI,255,255,255,255)if(LoadInteger(XY,(GetHandleId(TLI)),(704)))==0 or(LoadInteger(XY,(GetHandleId(TLI)),(704)))==1093751370 thencall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093751370,true)endifcall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093808206,false)call SetUnitPathing(TLI,true)call MCI(WVO)call FlushChildHashtable(XY,(MKI))call MZI(t)elseif ModuloInteger(MFI,10)==0 thencall QEI(x,y,200)endifcall SaveInteger(XY,(MKI),(34),(MFI+1))call SetUnitX(TLI,x)call SetUnitY(TLI,y)call SetUnitFacing(TLI,(a+HR5-bj_PI/2)*bj_RADTODEG)set g=MDI()set VEI=WVOset CK=TLIset VGI=TLIset VFI=GetUnitAbilityLevel(TLI,1093751370)call GroupEnumUnitsInRange(g,x,y,200+25,Condition(function AU1))call ForGroup(g,function HS5)call MCI(g)endifset t=nullset TLI=nullset g=nullset WVO=nullreturn falseendfunctionfunction HU5 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local real P4I=GetUnitX(TLI)local real P5I=GetUnitY(TLI)local real a=PUI(P4I,P5I,GetSpellTargetX(),GetSpellTargetY())*bj_DEGTORADlocal real P6I=P4I+1400/2*Cos(a)local real P7I=P5I+1400/2*Sin(a)call SetUnitState(TLI,UNIT_STATE_LIFE,GetUnitState(TLI,UNIT_STATE_LIFE)-GetUnitState(TLI,UNIT_STATE_LIFE)*0.15)call MPI(TLI,4301,2)call MPI(TLI,4415,2)call TriggerRegisterTimerEvent(t,0.02,true)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function HT5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(189),((P4I)*1.0))call SaveReal(XY,(MKI),(190),((P5I)*1.0))call SaveReal(XY,(MKI),(47),((P6I)*1.0))call SaveReal(XY,(MKI),(48),((P7I)*1.0))call SaveReal(XY,(MKI),(13),((a)*1.0))call SaveGroupHandle(XY,(MKI),(133),(MDI()))call SetUnitPathing(TLI,false)call SetUnitVertexColor(TLI,255,255,255,50)call QTI(TLI,1093808206)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093751370,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093808206,true)set t=nullset TLI=nullendfunctionfunction Z05 takes nothing returns booleanif GetSpellAbilityId()==1093751370 thencall HU5()endifreturn falseendfunctionfunction SL1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function Z05))set t=nullendfunctionfunction ZI5 takes nothing returns nothinglocal unit TLI=VHIlocal unit TMI=GetEnumUnit()call TKI(TLI,TMI,1,40+20*VZI)call PKI("Doodads\\Cinematic\\FireTrapUp\\FireTrapUp.mdl",TMI,"origin",1)set TLI=nullset TMI=nullendfunctionfunction Z15 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer NGI=GetUnitAbilityLevel(TLI,1093751371)local group gif GetTriggerEventId()==EVENT_UNIT_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseset CK=TLIset VHI=TLIset VZI=NGIset g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),1000+25,Condition(function AT1))call ForGroup(g,function ZI5)call MCI(g)set g=nullendifset t=nullset TLI=nullreturn falseendfunctionfunction ZO5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit Z25=(LoadUnitHandle(XY,(MKI),(589)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))if GetTriggerEventId()==EVENT_UNIT_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif IsUnitIllusion(GetEventDamageSource())==true thencall PII(Z25,GetEventDamage())endifelseif GetUnitX(Z25)!=x or GetUnitY(Z25)!=y thencall SetUnitPosition(Z25,x,y)endifif GetUnitY(TLI)!=x or GetUnitY(TLI)!=y thencall SetUnitPosition(TLI,x,y)endifcall SetUnitX(QHI,GetUnitX(TLI))call SetUnitY(QHI,GetUnitY(TLI))endifif GetTriggerEvalCount(t)==1 thencall PauseUnit(TLI,true)endifset t=nullset Z25=nullset TLI=nullset QHI=nullreturn falseendfunctionfunction Z35 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit Z45=(LoadUnitHandle(XY,(MKI),(588)))local unit Z25=(LoadUnitHandle(XY,(MKI),(589)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local unit FA3=(LoadUnitHandle(XY,(MKI),(239)))local integer NGI=GetUnitAbilityLevel(TLI,1093751371)local group glocal unit QHIlocal integer Z55if GetTriggerEventId()==EVENT_UNIT_DEATH thencall StopSound(BF,false,false)call ShowUnit(Z45,false)call ShowUnit(FA3,false)call FlushChildHashtable(XY,(MKI))call MZI(t)call ShowUnit(TLI,true)call SaveInteger(XY,(GetHandleId((TLI))),((4326)),(2))call UnitRemoveAbility(TLI,1093678162)call SetUnitInvulnerable(TLI,false)call PauseUnit(TLI,false)if GetLocalPlayer()==GetOwningPlayer(TLI)thencall ClearSelection()call SelectUnit(TLI,true)endifcall SetUnitState(TLI,UNIT_STATE_LIFE,1)set QHI=CreateUnit(GetOwningPlayer(GetKillingUnit()),1697656901,0,0,0)call UnitRemoveBuffs(TLI,true,true)call UnitRemoveAbility(TLI,1097167980)call UnitDamageTarget(QHI,TLI,100000000.00,true,false,ATTACK_TYPE_MELEE,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)set QHI=nullelseif GetTriggerEvalCount(t)==1 thencall SetUnitFlyHeight(Z25,0,200)elseif GetTriggerEvalCount(t)==2 thencall PauseUnit(Z25,false)call UnitApplyTimedLife(Z25,1112820806,0.1)call StopSound(BF,false,false)call StartSound(CF)call DestroyEffect(AddSpecialEffect("war3mapImported\\FireNova2.mdx",GetUnitX(Z45),GetUnitY(Z45)))call FlushChildHashtable(XY,(MKI))call MZI(t)call ShowUnit(TLI,true)call SaveInteger(XY,(GetHandleId((TLI))),((4326)),(2))call UnitRemoveAbility(TLI,1093678162)call SetUnitInvulnerable(TLI,false)call SetUnitAnimationByIndex(TLI,8)call QueueUnitAnimation(TLI,"idle")call PauseUnit(TLI,false)if GetLocalPlayer()==GetOwningPlayer(TLI)thencall ClearSelection()call SelectUnit(TLI,true)endifcall ShowUnit(Z45,false)call ShowUnit(FA3,false)call SetUnitState(TLI,UNIT_STATE_LIFE,GetUnitState(TLI,UNIT_STATE_MAX_LIFE))call SetUnitState(TLI,UNIT_STATE_MANA,GetUnitState(TLI,UNIT_STATE_MAX_MANA))set Z55=GetUnitAbilityLevel(TLI,1093751370)if Z55>0 thencall UnitRemoveAbility(TLI,1093751370)call UnitAddAbility(TLI,1093751370)call SetUnitAbilityLevel(TLI,1093751370,Z55)endifset Z55=GetUnitAbilityLevel(TLI,1093753176)if Z55>0 thencall UnitRemoveAbility(TLI,1093753176)call UnitAddAbility(TLI,1093753176)call SetUnitAbilityLevel(TLI,1093753176,Z55)endifset Z55=GetUnitAbilityLevel(TLI,1093753177)if Z55>0 thencall UnitRemoveAbility(TLI,1093753177)call UnitAddAbility(TLI,1093753177)call SetUnitAbilityLevel(TLI,1093753177,Z55)endifset QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TLI),GetUnitY(TLI),0)call QTI(QHI,1093753428)call SetUnitAbilityLevel(QHI,1093753428,NGI)call IssueImmediateOrder(QHI,"stomp")set QHI=nullendifendifset t=nullset TLI=nullset Z45=nullset FA3=nullset Z25=nullreturn falseendfunctionfunction Z65 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)local unit Z45local unit Z25local unit FA3=CreateUnit(GetOwningPlayer(TLI),1747993420,GetUnitX(TLI),GetUnitY(TLI),0)local integer NGI=GetUnitAbilityLevel(TLI,1093751371)local unit QHIlocal unit Z75=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TLI),GetUnitY(TLI),0)set Z45=CreateUnit(GetOwningPlayer(TLI),1747993176,x,y,0)if NGI==1 thenset Z25=CreateUnit(GetOwningPlayer(TLI),1747993430,x,y,0)elseif NGI==2 thenset Z25=CreateUnit(GetOwningPlayer(TLI),1747993432,x,y,0)elseif NGI==3 thenset Z25=CreateUnit(GetOwningPlayer(TLI),1747993431,x,y,0)endifcall AddSpecialEffectTarget("war3mapImported\\PhoenixDown_2.mdl",Z45,"origin")if GetLocalPlayer()==GetOwningPlayer(TLI)thencall ClearSelection()call SelectUnit(Z25,true)endifcall QEI(x,y,400)call ShowUnit(TLI,false)call SaveInteger(XY,(GetHandleId((TLI))),((4326)),(1))call QTI(TLI,1093678162)call CG1(TLI,0,0)call SetUnitInvulnerable(TLI,true)call UnitRemoveBuffs(TLI,true,true)call StartSound(BF)call UnitRemoveAbility(Z25,1098015094)call UnitApplyTimedLife(Z45,1112820806,6.1)call UnitApplyTimedLife(FA3,1112820806,6.1)call UnitApplyTimedLife(Z25,1112820806,6.1)call TriggerRegisterTimerEvent(t,5.2,false)call TriggerRegisterTimerEvent(t,6,false)call TriggerAddCondition(t,Condition(function Z35))call TriggerRegisterUnitEvent(t,Z25,EVENT_UNIT_DEATH)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(588),(Z45))call SaveUnitHandle(XY,(MKI),(589),(Z25))call SaveUnitHandle(XY,(MKI),(239),(FA3))call SaveReal(XY,(MKI),(6),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(7),((GetUnitY(TLI))*1.0))set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,1,true)call TriggerRegisterUnitEvent(t,Z25,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function Z15))call SaveUnitHandle(XY,(MKI),(2),(TLI))set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,.02,true)call TriggerRegisterUnitEvent(t,Z25,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,Z25,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function ZO5))call SaveUnitHandle(XY,(MKI),(589),(Z25))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(6),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(7),((GetUnitY(TLI))*1.0))call SaveUnitHandle(XY,(MKI),(19),(Z75))if CT1(TLI,1227899192)thencall UnitAddAbility(Z75,1093678153)endifset t=nullset TLI=nullset Z45=nullset Z25=nullendfunctionfunction Z85 takes nothing returns booleanif GetSpellAbilityId()==1093751371 thencall Z65()endifreturn falseendfunctionfunction SP1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function Z85))call RVI(1093687350)call RVI(1093753428)set t=nullendfunctionfunction Z95 takes nothing returns nothingcall SetUnitState(GetEnumUnit(),UNIT_STATE_LIFE,GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)+VVI)call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\BirdShitTarget_1.mdx",GetEnumUnit(),"origin"))endfunctionfunction ZA5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local group glocal integer NGI=GetUnitAbilityLevel(TLI,1093809986)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call DestroyEffect(AddSpecialEffect("war3mapImported\\Firaga_2.mdx",x,y))call FlushChildHashtable(XY,(MKI))call MZI(t)set g=MDI()set VVI=50+75*NGIset CK=TLIcall GroupEnumUnitsInRange(g,x,y,425,Condition(function BC1))call ForGroup(g,function Z95)call MCI(g)set t=nullset TLI=nullset g=nullreturn falseendfunctionfunction ZB5 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local real x=GetSpellTargetX()local real y=GetSpellTargetY()call TriggerRegisterTimerEvent(t,3,false)call TriggerAddCondition(t,Condition(function ZA5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))if IsPlayerAlly(GetOwningPlayer(TLI),GetLocalPlayer())or TGI(GetLocalPlayer())thencall SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffect("war3mapImported\\BirdShit_1.mdx",x,y)))elsecall SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffect("",x,y)))endifif IsPlayerAlly(GetLocalPlayer(),GetOwningPlayer(TLI))or TGI(GetLocalPlayer())thencall PingMinimapEx(x,y,3,255,0,0,false)call QWI(KF,x,y)endifcall QJI(GetOwningPlayer(TLI),4,x,y,500)call SetUnitState(TLI,UNIT_STATE_LIFE,GetUnitState(TLI,UNIT_STATE_LIFE)*0.9)set t=nullset TLI=nullendfunctionfunction ZC5 takes nothing returns booleanif GetSpellAbilityId()==1093809986 thencall ZB5()endifreturn falseendfunctionfunction SN1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function ZC5))set t=nullendfunctionfunction ZD5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=(LoadInteger(XY,(MKI),(5)))if GetTriggerEventId()==EVENT_WIDGET_DEATH thencall UnitRemoveAbility(TMI,1093809968)call UnitRemoveAbility(TMI,1110459723)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEvalCount(t)>4 thencall UnitRemoveAbility(TMI,1093809968)call UnitRemoveAbility(TMI,1110459723)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)call TKI(TLI,TMI,1,16+12*NGI)elsecall TKI(TLI,TMI,1,16+12*NGI)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction ZE5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real PI2=(LoadReal(XY,(MKI),(23)))local real P12=(LoadReal(XY,(MKI),(24)))local real a=(LoadReal(XY,(MKI),(137)))local real x=PI2+12*Cos(a)local real y=P12+12*Sin(a)call SetUnitX(TMI,x)call SetUnitY(TMI,y)call SaveReal(XY,(MKI),(23),((x)*1.0))call SaveReal(XY,(MKI),(24),((y)*1.0))if GetTriggerEvalCount(t)>25 thencall QEI(x,y,100)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction ZF5 takes unit TLI,unit TMI,real x,real y,real a returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer NGI=GetUnitAbilityLevel(TLI,1093809969)call SetUnitPosition(TMI,GetUnitX(TMI),GetUnitY(TMI))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveReal(XY,(MKI),(137),((a*bj_DEGTORAD)*1.0))call SaveReal(XY,(MKI),(23),((GetUnitX(TMI))*1.0))call SaveReal(XY,(MKI),(24),((GetUnitY(TMI))*1.0))call TriggerRegisterTimerEvent(t,0.02,true)call TriggerRegisterDeathEvent(t,TMI)call TriggerAddCondition(t,Condition(function ZE5))set t=CreateTrigger()set MKI=GetHandleId(t)call SaveInteger(XY,(MKI),(5),(NGI))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("Environment\\LargeBuildingFire\\LargeBuildingFire1.mdl",TMI,"chest")))call TriggerRegisterTimerEvent(t,1,true)call TriggerRegisterDeathEvent(t,TMI)call TriggerAddCondition(t,Condition(function ZD5))call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093809968,false)call QTI(TMI,1093809968)set t=nullendfunctionfunction ZG5 takes nothing returns nothingif IsUnitInGroup(GetEnumUnit(),VWI)==false thenif P8I(VYI,GetEnumUnit())<24 or RAbsBJ(Cos(PQI(VYI,GetEnumUnit())-VLI))<0.26 thencall GroupAddUnit(VWI,GetEnumUnit())if Sin((PQI(VYI,GetEnumUnit())-VLI)*bj_DEGTORAD)<0 thencall ZF5(VXI,GetEnumUnit(),VJI,VKI,VLI-90)elsecall ZF5(VXI,GetEnumUnit(),VJI,VKI,VLI+90)endifendifendifendfunctionfunction ZH5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit UII=(LoadUnitHandle(XY,(MKI),(45)))local real a=(LoadReal(XY,(MKI),(137)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local group SP2=(LoadGroupHandle(XY,(MKI),(187)))local group gif GetTriggerEvalCount(t)>125 thencall KillUnit(UII)call MCI(SP2)call FlushChildHashtable(XY,(MKI))call MZI(t)elseset x=x+8*Cos(a)set y=y+8*Sin(a)call SetUnitX(UII,x)call SetUnitY(UII,y)call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))set CK=TLIset VJI=xset VKI=yset VLI=a*bj_RADTODEGset VWI=SP2set VXI=TLIset VYI=UIIset g=MDI()call GroupEnumUnitsInRange(g,x,y,225,Condition(function AT1))call ForGroup(g,function ZG5)call MCI(g)endifset t=nullset TLI=nullreturn falseendfunctionfunction ZZ5 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local real P6I=GetSpellTargetX()local real P7I=GetSpellTargetY()local real NN2=Atan2(P7I-GetUnitY(TLI),P6I-GetUnitX(TLI))local integer NGI=GetUnitAbilityLevel(TLI,1093809969)local unit UII=CreateUnit(GetOwningPlayer(TLI),1747993665,GetUnitX(TLI),GetUnitY(TLI),NN2*bj_RADTODEG)call TriggerRegisterTimerEvent(t,0.01,true)call TriggerAddCondition(t,Condition(function ZH5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(45),(UII))call SaveReal(XY,(MKI),(137),((NN2)*1.0))call SaveReal(XY,(MKI),(6),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(7),((GetUnitY(TLI))*1.0))call SaveInteger(XY,(MKI),(5),(NGI))call SaveGroupHandle(XY,(MKI),(187),(MDI()))set t=nullset TLI=nullendfunctionfunction ZV5 takes nothing returns booleanif GetSpellAbilityId()==1093809969 thencall ZZ5()endifreturn falseendfunctionfunction SR1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function ZV5))set t=nullendfunctionfunction ZW5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real F21=(LoadReal(XY,(GetHandleId(TLI)),(681)))call FlushChildHashtable(XY,(MKI))call MZI(t)if((TimerGetElapsed(M))-F21<0.49)==false or GetTriggerEventId()==EVENT_UNIT_DEATH thencall UnitRemoveAbility(TLI,1093753396)call UnitRemoveAbility(TLI,1093753409)call UnitRemoveAbility(TLI,1093753410)call UnitRemoveAbility(TLI,1093753401)call UnitRemoveAbility(TLI,1110459478)endifset t=nullset TLI=nullreturn falseendfunctionfunction ZX5 takes unit TLI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer ZY5call TriggerRegisterTimerEvent(t,0.5,false)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function ZW5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(GetHandleId(TLI)),(681),(((TimerGetElapsed(M)))*1.0))if VRI==1 thenset ZY5=1093753396call UnitRemoveAbility(TLI,1093753409)call UnitRemoveAbility(TLI,1093753410)call UnitRemoveAbility(TLI,1093753401)elseif VRI==2 thenset ZY5=1093753409call UnitRemoveAbility(TLI,1093753396)call UnitRemoveAbility(TLI,1093753410)call UnitRemoveAbility(TLI,1093753401)elseif VRI==3 thenset ZY5=1093753410call UnitRemoveAbility(TLI,1093753396)call UnitRemoveAbility(TLI,1093753409)call UnitRemoveAbility(TLI,1093753401)elseif VRI==4 thenset ZY5=1093753401call UnitRemoveAbility(TLI,1093753396)call UnitRemoveAbility(TLI,1093753409)call UnitRemoveAbility(TLI,1093753410)endifcall QTI(TLI,ZY5)call UnitMakeAbilityPermanent(TLI,true,ZY5)set t=nullendfunctionfunction ZJ5 takes nothing returns nothinglocal unit TMI=GetEnumUnit()local real ZK5=VUIlocal real ZL5=W0Ilocal real TSI=ZK5+ZL5*GetUnitState(TMI,UNIT_STATE_MAX_LIFE)set TSI=TSI/5if IsUnitEnemy(TMI,GetOwningPlayer(VPI))==true thencall TKI(VPI,TMI,3,TSI)if T6I(TMI)==false thencall ZX5(TMI)endifelsecall SetUnitState(TMI,UNIT_STATE_LIFE,GetUnitState(TMI,UNIT_STATE_LIFE)+TSI*0.5)endifcall DestroyEffect(AddSpecialEffectTarget("war3mapImported\\FireRayTarget.mdx",TMI,"origin"))call QJI(GetOwningPlayer(TMI),2,GetUnitX(VPI),GetUnitY(VPI),500)set TMI=nullendfunctionfunction ZM5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer MFI=(LoadInteger(XY,(MKI),(34)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real ZN5=GetUnitFacing(TLI)local real a=ZN5*bj_DEGTORADlocal location l1=GetUnitLoc(TLI)local real ZS5=GetLocationZ(l1)local location l2=Location(GetUnitX(TLI)+VMI*Cos(a),GetUnitY(TLI)+VMI*Sin(a))local real ZT5=GetLocationZ(l2)local lightning ZR5=(LoadLightningHandle(XY,(MKI),(676)))local lightning ZP5=(LoadLightningHandle(XY,(MKI),(677)))local lightning ZQ5=(LoadLightningHandle(XY,(MKI),(678)))local lightning ZU5=(LoadLightningHandle(XY,(MKI),(679)))local lightning V05=(LoadLightningHandle(XY,(MKI),(680)))local real VI5=1local real P4Ilocal real P5Ilocal real V15local real VO5local real V25local real V35local real V45local real V55local real V65local real V75local real V85local real V95local real VA5local real VB5local real VC5local real VD5local real VE5local real VF5local real VG5local real VH5local real VZ5local real VV5local real VW5local real VX5local real VY5local real VJ5local real VK5local real VL5local real VM5local real VN5local real VS5local real VT5local real VR5local group glocal real xlocal real ylocal integer ilocal real VP5local real VQ5local real VU5local boolean W05=FALSElocal boolean WI5=falselocal unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit NewTarget=nulllocal unit DriftTarget=nulllocal real W15local real WO5local real W25local real W35=(LoadReal(XY,(MKI),(688)))local boolean W45=(LoadBoolean(XY,(MKI),(689)))local boolean W55=(LoadBoolean(XY,(MKI),(672)))local real W65local ubersplat OD1local real PI2=(LoadReal(XY,(MKI),(23)))local real P12=(LoadReal(XY,(MKI),(24)))local real ZK5local real ZL5local real W75local real W85=5if GetUnitCurrentOrder(TLI)==852001 thencall DisableTrigger(t)call R6I(TLI)call EnableTrigger(t)endifcall RemoveLocation(l1)call RemoveLocation(l2)if IsUnitPaused(TLI)==false and(GetTriggerEventId()==EVENT_UNIT_ISSUED_POINT_ORDER or GetTriggerEventId()==EVENT_UNIT_ISSUED_TARGET_ORDER)thenset P4I=GetUnitX(TLI)set P5I=GetUnitY(TLI)if GetIssuedOrderId()!=852490 and GetIssuedOrderId()!=852185 and GetIssuedOrderId()!=852600 thencall DisableTrigger(t)call R6I(TLI)call EnableTrigger(t)endifif GetIssuedOrderId()==851971 thenif GetTriggerEventId()==EVENT_UNIT_ISSUED_TARGET_ORDER thenset x=GetUnitX(GetOrderTargetUnit())set y=GetUnitY(GetOrderTargetUnit())elseset x=GetOrderPointX()set y=GetOrderPointY()endifset VP5=PUI(x,y,P4I,P5I)if VP5<0 thenset VP5=VP5+360endifset VU5=ZN5-VP5if VU5<0 thenset VU5=VU5+360endifif VU5<180 thenset W05=trueset VQ5=ZN5+6elseset WI5=trueset VQ5=ZN5-6endifset W35=PUI(x,y,P4I,P5I)+180call SaveReal(XY,(MKI),(688),((W35)*1.0))endifelseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT or GetTriggerEventId()==EVENT_WIDGET_DEATH or(LoadInteger(XY,(GetHandleId(TLI)),(704)))==-1 or MFI>=6.0/.02 or AI1(TLI)or S9I(TLI)thenif GetTriggerEventId()!=EVENT_UNIT_SPELL_EFFECT or(GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and(GetSpellAbilityId()==1093753395 or GetSpellAbilityId()==1093751371 or GetSpellAbilityId()==1093809992))thencall SaveInteger(XY,(GetHandleId((TLI))),((4312)),(2))call AE1(TLI)call SetUnitPathing(TLI,true)call FlushChildHashtable(XY,(MKI))call MZI(t)call UnitRemoveAbility(TLI,1093808181)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093753395,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093808181,false)if(LoadInteger(XY,(GetHandleId(TLI)),(704)))==0 or(LoadInteger(XY,(GetHandleId(TLI)),(704)))==1093753177 thencall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093753177,true)endifcall DestroyLightning(ZR5)call DestroyLightning(ZP5)call DestroyLightning(ZQ5)call DestroyLightning(ZU5)call DestroyLightning(V05)call StopSound(JF,false,true)endifelseif GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER thenif GetIssuedOrderId()==String2OrderIdBJ("immolation")thenset W45=trueendifif GetIssuedOrderId()==String2OrderIdBJ("unimmolation")thenset W45=falseendifcall SaveBoolean(XY,(MKI),(689),(W45))elseset VP5=ZN5-W35if VP5<-180 thenset VP5=VP5+360elseif VP5>180 thenset VP5=VP5-360endifset W65=1if MFI<35 and W55==true thenset W65=7endifif VP5<(-1*W65)thenset ZN5=ZN5+W65elseif VP5>W65 thenset ZN5=ZN5-W65elseset W55=falsecall SaveBoolean(XY,(MKI),(672),(W55))set ZN5=W35endifif((LoadInteger(XY,(GetHandleId((TLI))),((4301))))==1)==false thencall SetUnitFacing(TLI,ZN5)endifset a=ZN5*bj_DEGTORADset MFI=MFI+1call SaveInteger(XY,(MKI),(34),(MFI))set V15=VMIset P4I=GetUnitX(TLI)+50*Cos(a)set P5I=GetUnitY(TLI)+50*Sin(a)if W45 and OU1(TLI)==false and AI1(TLI)==false thenif((LoadInteger(XY,(GetHandleId((TLI))),((4331))))==1)==true thenset W85=W85*2endifset W25=aset W15=RCI(GetUnitX(TLI)+W85*Cos(W25))set WO5=RGI(GetUnitY(TLI)+W85*Sin(W25))call QEI(W15,WO5,200)call SetUnitX(TLI,W15)call SetUnitY(TLI,WO5)endifcall SetUnitState(TLI,UNIT_STATE_LIFE,GetUnitState(TLI,UNIT_STATE_LIFE)-GetUnitState(TLI,UNIT_STATE_LIFE)*0.06*0.02)call QEI(P4I,P5I,200)if ModuloInteger(MFI,10)==0 thenset VQI=MDI()set CK=TLIset i=0loopexitwhen i*50>VMIset x=P4I+i*50*Cos(a)set y=P5I+i*50*Sin(a)set g=MDI()call GroupEnumUnitsInRange(g,x,y,130+25,Condition(function AT1))call GroupAddGroup(g,VQI)call GroupEnumUnitsInRange(g,x,y,130+25,Condition(function BC1))call GroupAddGroup(g,VQI)call MCI(g)if ModuloInteger(i,3)==0 thencall QJI(GetOwningPlayer(TLI),2,x,y,225)endifset i=i+1endloopset VPI=TLIset VRI=GetUnitAbilityLevel(TLI,1093753177)set W75=(I2R(MFI)/50.0)/6set VUI=(5*VRI+10)+(5*VRI+10)*W75set W0I=(VRI+W75*(VRI))/100call GroupRemoveUnit(VQI,TLI)call ForGroup(VQI,function ZJ5)call MCI(VQI)set g=nullset VQI=nullendifif QPI(TLI)==false thenif TMI!=null thenset V15=P8I(TLI,TMI)endifset VO5=P4Iset V25=P5Iset V35=ZS5+200set V45=VO5+V15*Cos(a)set V55=V25+V15*Sin(a)set V65=ZT5set V75=P4I+VNI*Cos((ZN5-90)*bj_DEGTORAD)set V85=P5I+VSI*Cos((ZN5-90)*bj_DEGTORAD)set V95=ZS5+200set VA5=V75+V15*Cos(a)set VB5=V85+V15*Sin(a)set VC5=ZT5set VD5=P4I+VNI*Cos((ZN5+90)*bj_DEGTORAD)set VE5=P5I+VSI*Cos((ZN5+90)*bj_DEGTORAD)set VF5=ZS5+200set VG5=VD5+V15*Cos(a)set VH5=VE5+V15*Sin(a)set VZ5=ZT5set VV5=P4Iset VW5=P5Iset VX5=ZS5+200+VTIset VY5=VV5+V15*Cos(a)set VJ5=VW5+V15*Sin(a)set VK5=ZT5set VL5=P4Iset VM5=P5Iset VN5=ZS5+200-VTIset VS5=VL5+V15*Cos(a)set VT5=VM5+V15*Sin(a)set VR5=ZT5if ModuloInteger(MFI,10)==0 and V15==VMI thenset x=GetUnitX(TLI)+(VMI)*Cos(a)set y=GetUnitY(TLI)+(VMI)*Sin(a)call DestroyEffect(AddSpecialEffect("war3mapImported\\FireRayTarget.mdx",x,y))endifif ModuloInteger(MFI,10)==0 thencall SetSoundPosition(JF,GetUnitX(TLI),GetUnitY(TLI),100)set x=GetUnitX(TLI)+(V15)*Cos(a)set y=GetUnitY(TLI)+(V15)*Sin(a)set OD1=CreateUbersplat(x,y,"SRAY",255,255,255,255,false,false)call SetUbersplatRenderAlways(OD1,true)call OE1(OD1,10)set OD1=nullendifcall MoveLightningEx(ZR5,false,VO5,V25,V35,V45,V55,V65)call MoveLightningEx(ZP5,false,V75,V85,V95,VA5,VB5,VC5)call MoveLightningEx(ZQ5,false,VD5,VE5,VF5,VG5,VH5,VZ5)call MoveLightningEx(ZU5,false,VV5,VW5,VX5,VY5,VJ5,VK5)call MoveLightningEx(V05,false,VL5,VM5,VN5,VS5,VT5,VR5)if TGI(GetLocalPlayer())thenset VI5=1endifcall SetLightningColor(ZR5,1.00,1.00,1.00,VI5)call SetLightningColor(ZP5,1.00,1.00,1.00,VI5)call SetLightningColor(ZQ5,1.00,1.00,1.00,VI5)call SetLightningColor(ZU5,1.00,1.00,1.00,VI5)call SetLightningColor(V05,1.00,1.00,1.00,VI5)endifendifset t=nullset TLI=nullset ZR5=nullset ZP5=nullset ZQ5=nullset ZU5=nullset V05=nullset l1=nullset l2=nullreturn falseendfunctionfunction W95 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local real a=PUI(GetUnitX(TLI),GetUnitY(TLI),GetSpellTargetX(),GetSpellTargetY())*bj_DEGTORADlocal real P6I=RCI(GetUnitX(TLI)+VMI*Cos(a))local real P7I=RGI(GetUnitY(TLI)+VMI*Sin(a))local lightning ZR5=AddLightning("SRAY",false,GetUnitX(TLI),GetUnitY(TLI),P6I,P7I)local lightning ZP5=AddLightning("SRAY",false,GetUnitX(TLI),GetUnitY(TLI),P6I,P7I)local lightning ZQ5=AddLightning("SRAY",false,GetUnitX(TLI),GetUnitY(TLI),P6I,P7I)local lightning ZU5=AddLightning("SRAY",false,GetUnitX(TLI),GetUnitY(TLI),P6I,P7I)local lightning V05=AddLightning("SRAY",false,GetUnitX(TLI),GetUnitY(TLI),P6I,P7I)call SetUnitFacing(TLI,a*bj_RADTODEG)call StartSound(JF)call SetSoundPosition(JF,GetUnitX(TLI),GetUnitY(TLI),100)call TriggerRegisterTimerEvent(t,0.02,true)call TriggerRegisterDeathEvent(t,TLI)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_ISSUED_TARGET_ORDER)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_ISSUED_POINT_ORDER)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_ISSUED_ORDER)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function ZM5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(13),((a)*1.0))call SaveReal(XY,(MKI),(688),((a*bj_RADTODEG)*1.0))call SaveLightningHandle(XY,(MKI),(676),(ZR5))call SaveLightningHandle(XY,(MKI),(677),(ZP5))call SaveLightningHandle(XY,(MKI),(678),(ZQ5))call SaveLightningHandle(XY,(MKI),(679),(ZU5))call SaveLightningHandle(XY,(MKI),(680),(V05))call SaveBoolean(XY,(MKI),(689),(false))call SaveBoolean(XY,(MKI),(672),(true))call SaveReal(XY,(MKI),(688),((a*bj_RADTODEG)*1.0))call SaveReal(XY,(MKI),(23),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(24),((GetUnitY(TLI))*1.0))call AC1(TLI)call SaveInteger(XY,(GetHandleId((TLI))),((4312)),(1))call SetUnitPathing(TLI,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093753395,true)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093808181,true)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093753177,false)call QTI(TLI,1093753395)call UnitMakeAbilityPermanent(TLI,true,1093753395)call QTI(TLI,1093808181)call UnitMakeAbilityPermanent(TLI,true,1093808181)call TriggerEvaluate(t)set t=nullset TLI=nullset TLI=nullset ZR5=nullset ZP5=nullset ZQ5=nullset ZU5=nullset V05=nullendfunctionfunction WA5 takes nothing returns booleanif GetSpellAbilityId()==1093753177 thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_CAST thenelsecall W95()endifendifreturn falseendfunctionfunction ST1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function WA5))call OH1(1093753396)call OH1(1093753409)call OH1(1093753410)call OH1(1093753401)set t=nullendfunctionfunction WB5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=GetUnitAbilityLevel(TLI,1093753176)if GetTriggerEventId()==EVENT_UNIT_DEATH or(TimerGetElapsed(M))>=(LoadReal(XY,(GetHandleId(TMI)),(757)))or T6I(TMI)==true thencall UnitRemoveAbility(TMI,1093818167)call UnitRemoveAbility(TMI,1093818169)call UnitRemoveAbility(TMI,1093815352)call UnitRemoveAbility(TMI,1093818168)call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call FlushChildHashtable(XY,(MKI))call MZI(t)endifif ModuloInteger(GetTriggerEvalCount(t),4)==0 thencall TKI(TLI,TMI,1,20*NGI-10)endifset t=nullset TLI=nullreturn falseendfunctionfunction WC5 takes nothing returns nothinglocal unit TLI=WIIlocal unit TMI=GetEnumUnit()local trigger tlocal integer MKIlocal integer NGI=GetUnitAbilityLevel(TLI,1093753176)local integer WD5call SaveReal(XY,(GetHandleId(TMI)),(757),(((TimerGetElapsed(M))+4)*1.0))if GetUnitAbilityLevel(TMI,1093818167)==0 and GetUnitAbilityLevel(TMI,1093818169)==0 and GetUnitAbilityLevel(TMI,1093815352)==0 and GetUnitAbilityLevel(TMI,1093818168)==0 thenset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.25,true)call TriggerAddCondition(t,Condition(function WB5))call TriggerRegisterDeathEvent(t,TMI)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveEffectHandle(XY,(MKI),(176),(AddSpecialEffectTarget("Environment\\LargeBuildingFire\\LargeBuildingFire1.mdl",TMI,"chest")))if A61(TMI)==false thenif NGI==1 thenset WD5=1093818167elseif NGI==2 thenset WD5=1093818169elseif NGI==3 thenset WD5=1093815352elseif NGI==4 thenset WD5=1093818168endifcall UnitAddAbility(TMI,WD5)call UnitMakeAbilityPermanent(TMI,true,WD5)endifcall SetPlayerAbilityAvailable(GetOwningPlayer(TMI),WD5,false)endifset TLI=nullset TMI=nullset t=nullendfunctionfunction WE5 takes unit TLI,unit UII,real RI4,unit QHI,unit TMI returns nothinglocal real x=GetUnitX(UII)local real y=GetUnitY(UII)local group g=MDI()set CK=TLIset WII=TLIcall GroupEnumUnitsInRange(g,x,y,175+25,Condition(function AU1))call ForGroup(g,function WC5)call MCI(g)call DestroyEffect(AddSpecialEffect("war3mapImported\\Firaga_2.mdx",x,y))call KillUnit(UII)call ShowUnit(UII,false)set g=nullendfunctionfunction WF5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer MFI=(LoadInteger(XY,(MKI),(34)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local unit WG5=(LoadUnitHandle(XY,(MKI),(393)))local real RI4=(LoadReal(XY,(MKI),(685)))local real P6Ilocal real P7Ilocal real xlocal real ylocal real alocal real r=18local integer NGI=GetUnitAbilityLevel(TLI,1093753176)if GetTriggerEventId()==EVENT_UNIT_DEATH thenset P6I=GetUnitX(TMI)set P7I=GetUnitY(TMI)call SaveReal(XY,(MKI),(47),((P6I)*1.0))call SaveReal(XY,(MKI),(48),((P7I)*1.0))call RemoveSavedHandle(XY,(MKI),(17))call SaveUnitHandle(XY,(MKI),(17),(null))elseif TMI==null thenset P6I=(LoadReal(XY,(MKI),(47)))set P7I=(LoadReal(XY,(MKI),(48)))elseset P6I=GetUnitX(TMI)set P7I=GetUnitY(TMI)endifset a=PUI(GetUnitX(WG5),GetUnitY(WG5),P6I,P7I)call SetUnitFacing(WG5,a)set x=GetUnitX(WG5)+r*Cos(a*bj_DEGTORAD)set y=GetUnitY(WG5)+r*Sin(a*bj_DEGTORAD)call SetUnitX(WG5,x)call SetUnitY(WG5,y)if PAI(x,y,P6I,P7I)<r*2 thencall WE5(TLI,WG5,RI4,QHI,TMI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullset WG5=nullset QHI=nullreturn falseendfunctionfunction WH5 takes unit TLI,unit WG5,unit TMI,real RI4,unit QHI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local group glocal unit NewTargetif TLI==TMI thencall KillUnit(WG5)call ShowUnit(WG5,false)elsecall SetUnitVertexColor(WG5,255,255,255,255)call TriggerRegisterTimerEvent(t,0.02,true)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function WF5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(393),(WG5))call SaveReal(XY,(MKI),(47),((GetSpellTargetX())*1.0))call SaveReal(XY,(MKI),(48),((GetSpellTargetY())*1.0))call SaveReal(XY,(MKI),(685),((RI4)*1.0))call SaveUnitHandle(XY,(MKI),(19),(QHI))endifset t=nullendfunctionfunction WZ5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer MFI=(LoadInteger(XY,(MKI),(34)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real P4I=GetUnitX(TLI)local real P5I=GetUnitY(TLI)local unit WV5=(LoadUnitHandle(XY,(MKI),(393)))local unit WW5=(LoadUnitHandle(XY,(MKI),(394)))local unit WX5=(LoadUnitHandle(XY,(MKI),(395)))local unit WY5=(LoadUnitHandle(XY,(MKI),(396)))local integer NGI=GetUnitAbilityLevel(TLI,1093753176)local real a=GetUnitFacing(TLI)local real xlocal real ylocal group glocal group g2local real W03=-1*360*0.02/4local real a2local real C61local real RI4=(LoadReal(XY,(MKI),(685)))local real K73local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local integer WJ5=800if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT thenif GetSpellAbilityId()==1093753394 thenif QPI(WV5)==false thencall WH5(TLI,WV5,GetSpellTargetUnit(),RI4,QHI)call RemoveSavedHandle(XY,(MKI),(393))elseif QPI(WW5)==false thencall WH5(TLI,WW5,GetSpellTargetUnit(),RI4,QHI)call RemoveSavedHandle(XY,(MKI),(394))elseif QPI(WX5)==false thencall WH5(TLI,WX5,GetSpellTargetUnit(),RI4,QHI)call RemoveSavedHandle(XY,(MKI),(395))elseif QPI(WY5)==false thencall WH5(TLI,WY5,GetSpellTargetUnit(),RI4,QHI)call RemoveSavedHandle(XY,(MKI),(396))call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093753394,false)if(LoadInteger(XY,(GetHandleId(TLI)),(704)))==0 or(LoadInteger(XY,(GetHandleId(TLI)),(704)))==1093753176 thencall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093753176,true)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)endifelseif GetSpellAbilityId()==1093751371 thenif WV5!=null and QPI(WV5)==false thencall WH5(TLI,WV5,TLI,RI4,QHI)endifif WW5!=null and QPI(WW5)==false thencall WH5(TLI,WW5,TLI,RI4,QHI)endifif WX5!=null and QPI(WX5)==false thencall WH5(TLI,WX5,TLI,RI4,QHI)endifif WY5!=null and QPI(WY5)==false thencall WH5(TLI,WY5,TLI,RI4,QHI)endifcall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093753394,false)if(LoadInteger(XY,(GetHandleId(TLI)),(704)))==0 or(LoadInteger(XY,(GetHandleId(TLI)),(704)))==1093753176 thencall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093753176,true)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)endifelseset MFI=MFI+1call SaveInteger(XY,(MKI),(34),(MFI))if WV5!=null and QPI(WV5)==false thenset C61=360*4/4.0set a2=C61+W03*MFIset x=RCI(P4I+200*Cos(a2*bj_DEGTORAD))set y=RGI(P5I+200*Sin(a2*bj_DEGTORAD))call SetUnitFacing(WV5,a2-90)call SetUnitX(WV5,x)call SetUnitY(WV5,y)endifif WW5!=null and QPI(WW5)==false thenset C61=360*3/4.0set a2=C61+W03*MFIset x=RCI(P4I+200*Cos(a2*bj_DEGTORAD))set y=RGI(P5I+200*Sin(a2*bj_DEGTORAD))call SetUnitFacing(WW5,a2-90)call SetUnitX(WW5,x)call SetUnitY(WW5,y)endifif WX5!=null and QPI(WX5)==false thenset C61=360*2/4.0set a2=C61+W03*MFIset x=RCI(P4I+200*Cos(a2*bj_DEGTORAD))set y=RGI(P5I+200*Sin(a2*bj_DEGTORAD))call SetUnitFacing(WX5,a2-90)call SetUnitX(WX5,x)call SetUnitY(WX5,y)endifif WY5!=null and QPI(WY5)==false thenset C61=360*1/4.0set a2=C61+W03*MFIset x=RCI(P4I+200*Cos(a2*bj_DEGTORAD))set y=RGI(P5I+200*Sin(a2*bj_DEGTORAD))call SetUnitFacing(WY5,a2-90)call SetUnitX(WY5,x)call SetUnitY(WY5,y)endifif MFI>WJ5 or GetTriggerEventId()==EVENT_UNIT_DEATH thenif WV5!=null and QPI(WV5)==false thencall WH5(TLI,WV5,TLI,RI4,QHI)endifif WW5!=null and QPI(WW5)==false thencall WH5(TLI,WW5,TLI,RI4,QHI)endifif WX5!=null and QPI(WX5)==false thencall WH5(TLI,WX5,TLI,RI4,QHI)endifif WY5!=null and QPI(WY5)==false thencall WH5(TLI,WY5,TLI,RI4,QHI)endifcall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093753394,false)if(LoadInteger(XY,(GetHandleId(TLI)),(704)))==0 or(LoadInteger(XY,(GetHandleId(TLI)),(704)))==1093753176 thencall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093753176,true)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)elseset RI4=RMinBJ(0.25+0.75*(I2R(MFI)/500.0),1)call SaveReal(XY,(MKI),(685),((RI4)*1.0))set K73=0.25+(1-0.2)*2.5call SetUnitScale(WV5,K73,K73,K73)call SetUnitScale(WW5,K73,K73,K73)call SetUnitScale(WX5,K73,K73,K73)call SetUnitScale(WY5,K73,K73,K73)if MFI==(WJ5-175)thencall IF1(KF,GetOwningPlayer(TLI))endifif MFI>(WJ5-200)thenif ModuloInteger(MFI,10)==0 or ModuloInteger(MFI,10)==1 or ModuloInteger(MFI,10)==2 or ModuloInteger(MFI,10)==3 or ModuloInteger(MFI,10)==4 thencall SetUnitVertexColor(WV5,255,0,0,255)call SetUnitVertexColor(WW5,255,0,0,255)call SetUnitVertexColor(WX5,255,0,0,255)call SetUnitVertexColor(WY5,255,0,0,255)elsecall SetUnitVertexColor(WV5,255,255,255,255)call SetUnitVertexColor(WW5,255,255,255,255)call SetUnitVertexColor(WX5,255,255,255,255)call SetUnitVertexColor(WY5,255,255,255,255)endifendifendifendifset t=nullset TLI=nullset WV5=nullset WW5=nullset WX5=nullset WY5=nullset QHI=nullreturn falseendfunctionfunction WK5 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local real P4I=GetUnitX(TLI)local real P5I=GetUnitY(TLI)local real xlocal real ylocal unit WV5local unit WW5local unit WX5local unit WY5local real a=GetUnitFacing(TLI)local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,P4I,P5I,0)call UnitAddAbility(QHI,1093808469)call SetUnitState(TLI,UNIT_STATE_LIFE,GetUnitState(TLI,UNIT_STATE_LIFE)-GetUnitState(TLI,UNIT_STATE_LIFE)*0.20)call QTI(TLI,1093753394)call UnitMakeAbilityPermanent(TLI,true,1093753394)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093753394,true)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093753176,false)set x=GetUnitX(TLI)+200*Cos(bj_DEGTORAD*360*4/4.0*-1.0)set y=GetUnitY(TLI)+200*Sin(bj_DEGTORAD*360*4/4.0*-1.0)set WV5=CreateUnit(GetOwningPlayer(TLI),1747993429,x,y,360*4/4.0*-1.0)set x=GetUnitX(TLI)+200*Cos(bj_DEGTORAD*360*3/4.0*-1.0)set y=GetUnitY(TLI)+200*Sin(bj_DEGTORAD*360*3/4.0*-1.0)set WW5=CreateUnit(GetOwningPlayer(TLI),1747993429,x,y,360*3/4.0*-1.0)set x=GetUnitX(TLI)+200*Cos(bj_DEGTORAD*360*2/4.0*-1.0)set y=GetUnitY(TLI)+200*Sin(bj_DEGTORAD*360*2/4.0*-1.0)set WX5=CreateUnit(GetOwningPlayer(TLI),1747993429,x,y,360*2/4.0*-1.0)set x=GetUnitX(TLI)+200*Cos(bj_DEGTORAD*360*1/4.0*-1.0)set y=GetUnitY(TLI)+200*Sin(bj_DEGTORAD*360*1/4.0*-1.0)set WY5=CreateUnit(GetOwningPlayer(TLI),1747993429,x,y,360*1/4.0*-1.0)call TriggerRegisterTimerEvent(t,0.02,true)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function WZ5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(393),(WV5))call SaveUnitHandle(XY,(MKI),(394),(WW5))call SaveUnitHandle(XY,(MKI),(395),(WX5))call SaveUnitHandle(XY,(MKI),(396),(WY5))call SaveUnitHandle(XY,(MKI),(19),(QHI))set TLI=nullset WV5=nullset WW5=nullset WX5=nullset WY5=nullset QHI=nullendfunctionfunction WL5 takes nothing returns booleanif GetSpellAbilityId()==1093753176 thencall WK5()endifreturn falseendfunctionfunction SS1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function WL5))set t=nullendfunctionfunction WM5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=GetUnitAbilityLevel(TLI,1093815345)if GetTriggerEventId()==EVENT_UNIT_DEATH or GetTriggerEvalCount(t)>4 thencall UnitRemoveAbility(TMI,1093815352)call SaveInteger(XY,(GetHandleId((TMI))),((4311)),(2))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call FlushChildHashtable(XY,(MKI))call MZI(t)endifcall TKI(TLI,TMI,1,20*NGI)set t=nullset TLI=nullreturn falseendfunctionfunction WN5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetEnumUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function WM5))call TriggerRegisterDeathEvent(t,TMI)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveEffectHandle(XY,(MKI),(176),(AddSpecialEffectTarget("Environment\\LargeBuildingFire\\LargeBuildingFire1.mdl",TMI,"chest")))call UnitAddAbility(TMI,1093815352)call UnitMakeAbilityPermanent(TMI,true,1093815352)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093815352,false)call SaveInteger(XY,(GetHandleId((TMI))),((4311)),(1))set TLI=nullset TMI=nullset t=nullendfunctionfunction WS5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local real x=GetSpellTargetX()local real y=GetSpellTargetY()local group g=MDI()call DestroyEffect(AddSpecialEffect("Environment\\LargeBuildingFire\\LargeBuildingFire1.mdl",x,y))call GroupEnumUnitsInRange(g,x,y,275+25,Condition(function AK1))call ForGroup(g,function WN5)call MCI(g)set g=nullset TLI=nullendfunctionfunction WT5 takes nothing returns booleanif GetSpellAbilityId()==1093815345 thencall WS5()endifreturn falseendfunctionfunction SM1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function WT5))set t=nullendfunctionfunction WR5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer MFI=(LoadInteger(XY,(GetHandleId(TMI)),(627)))local real WP5=(LoadReal(XY,(GetHandleId(TMI)),(628)))local integer NGI=GetUnitAbilityLevel(TLI,1093751604)local real TSI=(5+NGI*15)*Pow(2,IMinBJ(MFI,5)-1)set TSI=TSI+IMaxBJ(MFI-5,0)*50if GetTriggerEventId()==EVENT_UNIT_DEATH thenif IsUnitType(TMI,UNIT_TYPE_HERO)==true thenendifcall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)call SaveInteger(XY,(GetHandleId(TMI)),(627),(0))call SaveReal(XY,(GetHandleId(TMI)),(628),((0)*1.0))elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT thenif GetSpellAbilityId()==1093751609 thenif IsUnitType(TMI,UNIT_TYPE_HERO)==true thenendifcall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)call SaveInteger(XY,(GetHandleId(TMI)),(627),(0))call SaveReal(XY,(GetHandleId(TMI)),(628),((0)*1.0))if((LoadInteger(XY,(GetHandleId((TMI))),((4293))))==1)thencall SetUnitInvulnerable(TMI,false)endifcall TKI(TLI,TMI,1,TSI)if((LoadInteger(XY,(GetHandleId((TMI))),((4293))))==1)thencall SetUnitInvulnerable(TMI,true)endifcall Q5I(I2S(R2I(TSI))+"!",2,TMI,0.025,100,0,200,216)endifelseif(TimerGetElapsed(M))>WP5 thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))if IsUnitType(TMI,UNIT_TYPE_HERO)==true thenendifcall FlushChildHashtable(XY,(MKI))call MZI(t)call SaveInteger(XY,(GetHandleId(TMI)),(627),(0))call SaveReal(XY,(GetHandleId(TMI)),(628),((0)*1.0))if((LoadInteger(XY,(GetHandleId((TMI))),((4293))))==1)thencall SetUnitInvulnerable(TMI,false)endifcall TKI(TLI,TMI,1,TSI)if((LoadInteger(XY,(GetHandleId((TMI))),((4293))))==1)thencall SetUnitInvulnerable(TMI,true)endifcall Q5I(I2S(R2I(TSI))+"!",2,TMI,0.025,100,0,200,216)elseif IsUnitType(TMI,UNIT_TYPE_HERO)==true thenendifendifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction WQ5 takes unit TLI,unit TMI returns nothinglocal trigger tlocal integer MKIlocal integer NGI=GetUnitAbilityLevel(TLI,1093751604)local unit UIIif(LoadInteger(XY,(GetHandleId(TMI)),(627)))>0 thencall SaveInteger(XY,(GetHandleId(TMI)),(627),((LoadInteger(XY,(GetHandleId(TMI)),(627)))+1))call SaveReal(XY,(GetHandleId(TMI)),(628),(((TimerGetElapsed(M))+10)*1.0))elseset t=CreateTrigger()set MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))if IsUnitType(TMI,UNIT_TYPE_HERO)==true thenendifcall SaveInteger(XY,(GetHandleId(TMI)),(627),(1))if IsUnitType(TMI,UNIT_TYPE_HERO)==true thencall SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("war3mapImported\\shamanyouranus-ShadowyMissile.mdl",TMI,"chest")))elsecall SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("war3mapImported\\shamanyouranus-ShadowyMissile.mdl",TMI,"origin")))endifcall SaveReal(XY,(GetHandleId(TMI)),(628),(((TimerGetElapsed(M))+10)*1.0))call TriggerRegisterTimerEvent(t,0.05,true)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function WR5))set UII=nullendifcall Q5I("+"+I2S((LoadInteger(XY,(GetHandleId(TMI)),(627)))),3,TMI,0.025,100,0,200,216)call TKI(TLI,TMI,1,50)set t=nullendfunctionfunction WU5 takes nothing returns nothingif IsUnitInGroup(GetEnumUnit(),WOI)==false thencall GroupAddUnit(WOI,GetEnumUnit())call WQ5(W1I,GetEnumUnit())endifendfunctionfunction X05 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit UII=(LoadUnitHandle(XY,(MKI),(45)))local integer MFI=GetTriggerEvalCount(t)local real a=(LoadReal(XY,(MKI),(137)))local real x=RCI(GetUnitX(UII)+(20)*Cos(a))local real y=RGI(GetUnitY(UII)+(20)*Sin(a))local group glocal group WVO=(LoadGroupHandle(XY,(MKI),(133)))local unit TMIif MFI==75 thencall MCI(WVO)call KillUnit(UII)call FlushChildHashtable(XY,(MKI))call MZI(t)elseset CK=TLIset W1I=TLIset WOI=WVOcall SetUnitX(UII,x)call SetUnitY(UII,y)set g=MDI()call GroupEnumUnitsInRange(g,x,y,190+25,Condition(function AU1))call ForGroup(g,function WU5)set TMI=FirstOfGroup(g)call MCI(g)endifset t=nullset TLI=nullset UII=nullset g=nullset TMI=nullset WVO=nullreturn falseendfunctionfunction XI5 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local real x=GetSpellTargetX()local real y=GetSpellTargetY()local real a=PUI(GetUnitX(TLI),GetUnitY(TLI),x,y)*bj_DEGTORADlocal unit UII=CreateUnit(GetOwningPlayer(TLI),1747993394,GetUnitX(TLI),GetUnitY(TLI),a*bj_RADTODEG)call TriggerRegisterTimerEvent(t,0.02,true)call TriggerAddCondition(t,Condition(function X05))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(45),(UII))call SaveReal(XY,(MKI),(137),((a)*1.0))call SaveGroupHandle(XY,(MKI),(133),(MDI()))call QTI(TLI,1093751609)set t=nullset TLI=nullset UII=nullendfunctionfunction X15 takes nothing returns booleanif GetSpellAbilityId()==1093751604 thencall XI5()endifreturn falseendfunctionfunction SQ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function X15))set t=nullendfunctionfunction XO5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit X25=GetSummonedUnit()if GetTriggerEventId()!=EVENT_PLAYER_UNIT_SUMMON thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetUnitAbilityLevel(X25,1110459457)>0 and GetOwningPlayer(GetSummoningUnit())==GetOwningPlayer(TLI)thenif IsUnitAlly(TMI,GetOwningPlayer(TLI))==true thencall SelectUnitAddForPlayer(X25,GetOwningPlayer(TLI))elsecall IssueTargetOrder(X25,"attack",TMI)endifendifset t=nullset TLI=nullset TMI=nullset X25=nullreturn falseendfunctionfunction X35 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call SaveInteger(XY,(GetHandleId((TMI))),((4293)),(2))call SetUnitInvulnerable(TMI,false)call PauseUnit(TMI,false)call ShowUnit(TMI,true)call RemoveSavedHandle(XY,(GetHandleId(TMI)),(673))call FlushChildHashtable(XY,(MKI))call MZI(t)if GetTriggerEventId()!=EVENT_UNIT_DEATH thencall ClearSelectionForPlayer(GetOwningPlayer(TMI))call SelectUnitAddForPlayer(TMI,GetOwningPlayer(TMI))call QWI(DF,GetUnitX(TMI),GetUnitY(TMI))set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,3,false)call Q9I(t,EVENT_PLAYER_UNIT_SUMMON)call TriggerAddCondition(t,Condition(function XO5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call QTI(QHI,1093751605)call SetUnitAbilityLevel(QHI,1093751605,GetUnitAbilityLevel(TLI,1093751608))call IssueTargetOrderById(QHI,852274,TMI)call IssueTargetOrderById(QHI,852274,TMI)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction X45 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093751608)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit QHI=CreateUnit(GetOwningPlayer(TMI),1865429305,GetUnitX(TMI),GetUnitY(TMI),0)call UnitApplyTimedLife(QHI,1112820806,2.6)if IsUnitAlly(TMI,GetOwningPlayer(TLI))==false thenset QHI=CreateUnit(GetOwningPlayer(TLI),1865429305,GetUnitX(TMI),GetUnitY(TMI),0)call UnitApplyTimedLife(QHI,1112820806,2.6)endifcall SetUnitInvulnerable(TMI,true)call PauseUnit(TMI,true)call ShowUnit(TMI,false)call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffect("war3mapImported\\WILLTHEALMIGHTY-Void5.mdx",GetUnitX(TMI),GetUnitY(TMI))))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call TriggerRegisterTimerEvent(t,2.5,false)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function X35))call SaveUnitHandle(XY,(GetHandleId(TLI)),(673),(TMI))call SaveInteger(XY,(GetHandleId((TMI))),((4293)),(1))set TLI=nullset TMI=nullset t=nullset QHI=nullendfunctionfunction X55 takes nothing returns booleanif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT thenif GetSpellAbilityId()==1093751608 and(IsUnitAlly(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))==true or MBI(GetSpellTargetUnit())==false)thencall X45()endifelseif GetSpellAbilityId()==1093751608 and GetSpellTargetUnit()!=GetTriggerUnit()and IsUnitAlly(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))==true and(LoadBoolean(XY,(GetHandleId(GetOwningPlayer(GetSpellTargetUnit()))),(139)))thencall R6I(GetTriggerUnit())call R1I(GetOwningPlayer(GetTriggerUnit()),GetObjectName(1848652600))endifendifreturn falseendfunctionfunction SU1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function X55))set t=nullendfunctionfunction X65 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer NGI=GetUnitAbilityLevel(TLI,1093751618)if GetTriggerEventId()!=EVENT_UNIT_DAMAGED thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetEventDamage()>5 thencall DisableTrigger(t)call TKI(GetEventDamageSource(),GetTriggerUnit(),3,(0.1+0.1*NGI)*GetEventDamage())call EnableTrigger(t)endifset TLI=nullset t=nullreturn falseendfunctionfunction X75 takes nothing returns nothinglocal real x=GetSpellTargetX()local real y=GetSpellTargetY()local group g=MDI()local unit TLI=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093751618)local unit TMIlocal trigger tlocal integer MKIset CK=TLIcall GroupEnumUnitsInRange(g,x,y,475,Condition(function AU1))set TMI=(LoadUnitHandle(XY,(GetHandleId(TLI)),(673)))if TMI!=null thenif PAI(GetUnitX(TMI),GetUnitY(TMI),x,y)<475 and IsUnitEnemy(TMI,GetOwningPlayer(TLI))==true thencall GroupAddUnit(g,TMI)endifendifset TMI=GroupPickRandomUnit(g)call MCI(g)call DestroyEffect(AddSpecialEffect("war3mapImported\\Desecrate.mdx",x,y))if TMI!=null thenset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,12,false)call TriggerAddCondition(t,Condition(function X65))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("war3mapImported\\void.mdx",TMI,"chest")))endifset g=nullset TLI=nullset TMI=nullset t=nullendfunctionfunction X85 takes nothing returns booleanif GetSpellAbilityId()==1093751618 thencall X75()endifreturn falseendfunctionfunction T01 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function X85))set t=nullendfunctionfunction X95 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer MFI=GetTriggerEvalCount(t)local integer NGI=GetUnitAbilityLevel(TLI,1093818441)if NGI==0 thenset NGI=GetUnitAbilityLevel(TLI,1093751617)endifif MFI==5 thencall FlushChildHashtable(XY,(MKI))call MZI(t)if((LoadInteger(XY,(GetHandleId((TMI))),((4293))))==1)thencall SetUnitInvulnerable(TMI,false)endifcall TKI(TLI,TMI,1,4*(25+25*NGI))if((LoadInteger(XY,(GetHandleId((TMI))),((4293))))==1)thencall SetUnitInvulnerable(TMI,true)endifelseendifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction XA5 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function X95))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call TriggerEvaluate(t)set t=nullset TLI=nullset TMI=nullendfunctionfunction XB5 takes nothing returns booleanif(GetSpellAbilityId()==1093818441 or GetSpellAbilityId()==1093751617)and IsUnitEnemy(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))==true and MBI(GetSpellTargetUnit())==false thencall XA5()endifreturn falseendfunctionfunction XC5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer WLO=(LoadInteger(XY,(GetHandleId(TLI)),(826)))local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)local integer NGI=GetUnitAbilityLevel(TLI,1093818437)if WLO>0 thencall UnitAddAbility(QHI,1093751617)call SetUnitAbilityLevel(QHI,1093751617,NGI)call IssueTargetOrder(QHI,"purge",TMI)call UnitRemoveAbility(TLI,W2I[WLO])set WLO=WLO-1call SaveInteger(XY,(GetHandleId(TLI)),(826),(WLO))call QTI(TLI,W2I[WLO])endifset TLI=nullset TMI=nullendfunctionfunction XD5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer WLO=(LoadInteger(XY,(GetHandleId(TLI)),(826)))local integer MFI=(LoadInteger(XY,(MKI),(34)))if WLO<2 thenset MFI=MFI-1call SaveInteger(XY,(MKI),(34),(MFI))if MFI==0 thencall UnitRemoveAbility(TLI,W2I[WLO])set MFI=40call SaveInteger(XY,(MKI),(34),(MFI))set WLO=WLO+1call SaveInteger(XY,(GetHandleId(TLI)),(826),(WLO))call QTI(TLI,W2I[WLO])endifendifset t=nullset TLI=nullreturn falseendfunctionfunction XE5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093818437)local trigger tlocal integer MKIlocal integer XF5=GetUnitAbilityLevel(TLI,W2I[0])local integer XG5=GetUnitAbilityLevel(TLI,W2I[1])local integer XH5=GetUnitAbilityLevel(TLI,W2I[2])if NGI>0 and(XF5+XG5+XH5)==0 thencall UnitRemoveAbility(TLI,1093751617)set t=CreateTrigger()set MKI=GetHandleId(t)call SaveInteger(XY,(GetHandleId(TLI)),(826),(2))call QTI(TLI,W2I[2])call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function XD5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(34),(40))set t=nullendifif NGI==0 thenset NGI=GetUnitAbilityLevel(TLI,1093818441)if NGI>0 thencall QTI(TLI,1093751617)call SetUnitAbilityLevel(TLI,1093751617,NGI)endifendifset TLI=nullendfunctionfunction XZ5 takes nothing returns booleanif GetTriggerEventId()==EVENT_PLAYER_HERO_SKILL thenif(GetLearnedSkill()==1093818441 or GetLearnedSkill()==1093818437)and IsUnitIllusion(GetTriggerUnit())==false thencall XE5()endifelseif GetTriggerEventId()==EVENT_PLAYER_UNIT_PICKUP_ITEM thenif GetItemType(GetManipulatedItem())==ITEM_TYPE_PERMANENT and DH1(GetManipulatedItem())==KL0 thencall XE5()endifelseif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT thenif(GetSpellAbilityId()==W2I[0]or GetSpellAbilityId()==W2I[1]or GetSpellAbilityId()==W2I[2])and IsUnitEnemy(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))==true and MBI(GetSpellTargetUnit())==false thencall XC5()endifendifreturn falseendfunctionfunction TI1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function XB5))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call Q9I(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function XZ5))set W2I[0]=1093818440set W2I[1]=1093818435set W2I[2]=1093818434set t=nullendfunctionfunction XV5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer MFI=GetTriggerEvalCount(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))call UnitRemoveAbility(TLI,1093751632)set t=nullset TLI=nullreturn falseendfunctionfunction XW5 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()call QTI(TLI,1093751632)call UnitMakeAbilityPermanent(TLI,true,1093751632)call SetUnitAbilityLevel(TLI,1093751632,GetUnitAbilityLevel(TLI,1093751631))call TriggerRegisterTimerEvent(t,3,false)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function XV5))call SaveUnitHandle(XY,(MKI),(2),(TLI))set t=nullset TLI=nullendfunctionfunction XX5 takes nothing returns booleanif GetSpellAbilityId()==1093751631 thencall XW5()endifreturn falseendfunctionfunction T11 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function XX5))set t=nullendfunctionfunction XY5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer MFI=GetTriggerEvalCount(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit UII=(LoadUnitHandle(XY,(MKI),(45)))local real xlocal real ylocal real dlocal real C11local real PI2=(LoadReal(XY,(MKI),(23)))local real P12=(LoadReal(XY,(MKI),(24)))local real a=PUI(PI2,P12,GetUnitX(TMI),GetUnitY(TMI))*bj_DEGTORADlocal integer NGI=GetUnitAbilityLevel(TLI,1093751633)if GetTriggerEventId()==EVENT_UNIT_DEATH thencall UnitShareVision(UII,GetOwningPlayer(TMI),false)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)if GetTriggerUnit()!=UII thencall KillUnit(UII)endifelseif GetTriggerEventId()==EVENT_UNIT_DAMAGED thencall UnitRemoveBuffs(UII,true,true)elseif MFI<3/0.02 thencall SetUnitFacing(UII,a*bj_RADTODEG)elseif MFI==4/0.02 thencall UnitShareVision(UII,GetOwningPlayer(TMI),true)endifcall SetUnitFacing(UII,a*bj_RADTODEG)set x=PI2+(280+W3I*MFI*0.02)*0.02*Cos(a)set y=P12+(280+W3I*MFI*0.02)*0.02*Sin(a)call SetUnitPosition(UII,x,y)call SaveReal(XY,(MKI),(23),((x)*1.0))call SaveReal(XY,(MKI),(24),((y)*1.0))if PAI(x,y,GetUnitX(TMI),GetUnitY(TMI))<20 thenset d=RMinBJ(PAI(x,y,(LoadReal(XY,(MKI),(6))),(LoadReal(XY,(MKI),(7)))),1500)set C11=d/1500*(110*GetUnitAbilityLevel(TLI,1093751633))set C11=RMaxBJ(C11,50)call KillUnit(UII)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)call TKI(TLI,TMI,1,C11)call BQ1(TLI,TMI,2+0.2*NGI)endifendifset t=nullset TLI=nullset TMI=nullset UII=nullreturn falseendfunctionfunction XJ5 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local real a=PUI(GetUnitX(TLI),GetUnitY(TLI),GetUnitX(TMI),GetUnitY(TMI))*bj_DEGTORADlocal real x=RCI(GetUnitX(TLI)+150*Cos(a))local real y=RGI(GetUnitY(TLI)+150*Sin(a))local integer NGI=GetUnitAbilityLevel(TLI,1093751633)local unit UIIlocal integer SVIlocal string s="effects\\Snipe Target.mdx"if IsPlayerAlly(GetLocalPlayer(),GetOwningPlayer(TLI))==false and TGI(GetLocalPlayer())==false thenset s=""endifif NGI==1 thenset SVI=1747993415elseif NGI==2 thenset SVI=1747993393elseif NGI==3 thenset SVI=1747993414elseif NGI==4 thenset SVI=1747993416endifset UII=CreateUnit(GetOwningPlayer(TLI),SVI,x,y,a*bj_RADTODEG)call TriggerRegisterTimerEvent(t,0.02,true)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,UII,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,UII,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function XY5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(45),(UII))call SaveReal(XY,(MKI),(6),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(7),((GetUnitY(TLI))*1.0))call SaveReal(XY,(MKI),(23),((GetUnitX(UII))*1.0))call SaveReal(XY,(MKI),(24),((GetUnitY(UII))*1.0))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget(s,TMI,"overhead")))set t=nullset TLI=nullset UII=nullendfunctionfunction XK5 takes nothing returns booleanif GetSpellAbilityId()==1093751633 and MBI(GetSpellTargetUnit())==false thencall XJ5()endifreturn falseendfunctionfunction TO1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function XK5))call RVI(1093687350)set t=nullendfunctionfunction XL5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))call FlushChildHashtable(XY,(MKI))call MZI(t)call UnitRemoveAbility(TMI,1093751635)call UnitRemoveAbility(TMI,1110459461)set t=nullset TMI=nullreturn falseendfunctionfunction XM5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))call FlushChildHashtable(XY,(MKI))call MZI(t)call UnitRemoveAbility(TMI,1093751860)call UnitRemoveAbility(TMI,1110459463)set t=nullset TMI=nullreturn falseendfunctionfunction XN5 takes nothing returns nothinglocal trigger tlocal integer MKIlocal integer NGI=GetUnitAbilityLevel(W4I,1093751861)local boolean OF3=falseif NGI==0 thenset NGI=GetUnitAbilityLevel(W4I,1093808949)set OF3=trueendifif A61(GetEnumUnit())==false thenset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,2,false)call TriggerRegisterUnitEvent(t,GetEnumUnit(),EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function XL5))call SaveUnitHandle(XY,(MKI),(17),(GetEnumUnit()))call SetPlayerAbilityAvailable(GetOwningPlayer(GetEnumUnit()),1093751635,false)call QTI(GetEnumUnit(),1093751635)endifcall TKI(W4I,GetEnumUnit(),1,NGI*50+200)set t=nullendfunctionfunction XS5 takes nothing returns nothinglocal trigger tlocal integer MKIlocal integer NGI=GetUnitAbilityLevel(W4I,1093751861)local boolean OF3=falseif NGI==0 thenset NGI=GetUnitAbilityLevel(W4I,1093808949)set OF3=trueendifif A61(GetEnumUnit())==false thenset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,3,false)call TriggerRegisterUnitEvent(t,GetEnumUnit(),EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function XM5))call SaveUnitHandle(XY,(MKI),(17),(GetEnumUnit()))call SetPlayerAbilityAvailable(GetOwningPlayer(GetEnumUnit()),1093751860,false)call QTI(GetEnumUnit(),1093751860)endifif OF3 thencall TKI(W4I,GetEnumUnit(),1,NGI*50+50+75)elsecall TKI(W4I,GetEnumUnit(),1,NGI*50+50)endifset t=nullendfunctionfunction XT5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local group glocal integer MFI=GetTriggerEvalCount(t)local fogmodifier QYI=(LoadFogModifierHandle(XY,(MKI),(42)))if MFI==1 thencall DestroyEffect(AddSpecialEffectTarget("war3mapImported\\Calldown_FlyUp.mdx",TLI,"chest"))elseif MFI==2 thencall DestroyEffect(AddSpecialEffectTarget("war3mapImported\\Calldown_FlyUp.mdx",TLI,"chest"))elseif MFI==3 thencall DestroyEffect(AddSpecialEffect("war3mapImported\\Calldown_FlyDown.mdx",x,y))elseif MFI==4 thenset g=MDI()set CK=TLIset W4I=TLIcall GroupEnumUnitsInRange(g,x,y,450+25,Condition(function AT1))call ForGroup(g,function XN5)call MCI(g)call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\DemolisherFireMissile\\DemolisherFireMissile.mdl",x,y))elseif MFI==5 thencall DestroyEffect(AddSpecialEffect("war3mapImported\\Calldown_FlyDown.mdx",x,y))elseif MFI==6 thenset g=MDI()set CK=TLIset W4I=TLIcall GroupEnumUnitsInRange(g,x,y,450+25,Condition(function AT1))call ForGroup(g,function XS5)call MCI(g)call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\DemolisherFireMissile\\DemolisherFireMissile.mdl",x,y))call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FogModifierStop(QYI)call DestroyFogModifier(QYI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset g=nullreturn falseendfunctionfunction XR5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local real x=GetSpellTargetX()local real y=GetSpellTargetY()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local string s=""local fogmodifier QYI=CreateFogModifierRadius(GetOwningPlayer(TLI),FOG_OF_WAR_VISIBLE,x,y,350,true,true)call FogModifierStart(QYI)if IsPlayerAlly(GetLocalPlayer(),GetOwningPlayer(TLI))==true or TGI(GetLocalPlayer())thenset s="war3mapImported\\CallDown_4.mdx"endifcall TriggerRegisterTimerEvent(t,0.1,false)call TriggerRegisterTimerEvent(t,0.8,false)call TriggerRegisterTimerEvent(t,1.6,false)call TriggerRegisterTimerEvent(t,2,false)call TriggerRegisterTimerEvent(t,3.6,false)call TriggerRegisterTimerEvent(t,4,false)call TriggerAddCondition(t,Condition(function XT5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffect(s,x,y)))call SaveFogModifierHandle(XY,(MKI),(42),(QYI))set t=nullset TLI=nullendfunctionfunction XP5 takes nothing returns booleanif GetSpellAbilityId()==1093751861 or GetSpellAbilityId()==1093808949 thencall XR5()endifreturn falseendfunctionfunction T21 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function XP5))set t=nullendfunctionfunction XQ5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer TA3=(LoadInteger(XY,(MKI),(375)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer MFIif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamageSource()==TLI and(GetEventDamage()>20 or IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==true)thenset MFI=(LoadInteger(XY,(TA3),(34)))if MFI>0 thencall SaveInteger(XY,(TA3),(34),(MFI+1))endifcall FlushChildHashtable(XY,(MKI))call MZI(t)endifelsecall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullreturn falseendfunctionfunction XU5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if TWI(TLI)==false thencall FlushChildHashtable(XY,(MKI))call MZI(t)call UnitRemoveAbility(TLI,1093808951)call UnitAddAbility(TLI,1093808706)call UnitRemoveAbility(TLI,1093808706)if(DB1((TLI),FK0[KD0])!=null)thencall UnitAddAbility(TLI,1093808951)endifendifset t=nullset TLI=nullreturn falseendfunctionfunction Y05 takes unit TLI returns nothinglocal trigger tlocal integer MKIif TWI(TLI)==false thencall UnitRemoveAbility(TLI,1093808951)call UnitAddAbility(TLI,1093808706)call UnitRemoveAbility(TLI,1093808706)if(DB1((TLI),FK0[KD0])!=null)thencall UnitAddAbility(TLI,1093808951)endifelseset t=CreateTrigger()set MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(2),(TLI))call TriggerRegisterTimerEvent(t,0.1,true)call TriggerAddCondition(t,Condition(function XU5))set t=nullendifendfunctionfunction YI5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer MFI=(LoadInteger(XY,(MKI),(34)))local integer NGI=GetUnitAbilityLevel(TLI,1093808697)local integer TA3=MKIif GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED thenif IsUnitIllusion(GetAttacker())==true and GetUnitAbilityLevel(GetAttacker(),1093751895)>0 thencall Y05(GetAttacker())call UnitRemoveAbility(GetAttacker(),1093751895)endifif GetAttacker()==TLI thenset MFI=MFI+1if MFI>3+NGI thencall UnitRemoveAbility(TLI,1093751895)call UnitRemoveAbility(TLI,1110459466)call Y05(TLI)call FlushChildHashtable(XY,(MKI))call MZI(t)elseset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,2,false)call TriggerAddCondition(t,Condition(function XQ5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(375),(TA3))endifendifelsecall UnitRemoveAbility(TLI,1093751895)call UnitRemoveAbility(TLI,1110459466)call Y05(TLI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullreturn falseendfunctionfunction Y15 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()call TriggerRegisterTimerEvent(t,15,false)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function YI5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(34),(1))call UnitRemoveAbility(TLI,1093808951)call UnitAddAbility(TLI,1093808705)call UnitRemoveAbility(TLI,1093808705)if(DB1((TLI),FK0[KD0])!=null)thencall UnitAddAbility(TLI,1093808951)endifset t=nullset TLI=nullendfunctionfunction YO5 takes nothing returns booleanif IsUnitIllusion(GetTriggerUnit())==true and GetUnitTypeId(GetTriggerUnit())==1160786511 thencall Y05(GetTriggerUnit())endifreturn falseendfunctionfunction Y25 takes nothing returns booleanif GetSpellAbilityId()==1093808697 and GetUnitTypeId(GetTriggerUnit())==1160786510 thencall Y15()endifreturn falseendfunctionfunction T31 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function Y25))set t=CreateTrigger()call TriggerRegisterEnterRectSimple(t,GetWorldBounds())call TriggerAddCondition(t,Condition(function YO5))set t=nullendfunctionfunction Y35 takes nothing returns booleanlocal unit TMI=GetFilterUnit()local unit TLI=W5Ilocal real P4I=W6Ilocal real P5I=W7Ilocal real PO2=W8Ilocal real P22=W9Ilocal real xlocal real ylocal real alocal real dif(T6I(GetFilterUnit())==false and IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))thenif((LoadInteger(XY,(GetHandleId((TMI))),((4324))))==1)==false thencall MPI(TMI,4324,0.3)endifset d=PAI(P4I,P5I,GetUnitX(TMI),GetUnitY(TMI))set a=PUI(P4I,P5I,GetUnitX(TMI),GetUnitY(TMI))*bj_DEGTORADif d>WAI thenset x=GetUnitX(TMI)+11*Cos(a)set y=GetUnitY(TMI)+11*Sin(a)elseset x=GetUnitX(TMI)-11*Cos(a)set y=GetUnitY(TMI)-11*Sin(a)endifcall SetUnitX(TMI,x)call SetUnitY(TMI,y)endifset TMI=nullset TLI=nullreturn falseendfunctionfunction Y45 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real P4I=(LoadReal(XY,(MKI),(6)))local real P5I=(LoadReal(XY,(MKI),(7)))local real xlocal real ylocal integer i=0local group gif GetTriggerEvalCount(t)>(50*(2+0.5*GetUnitAbilityLevel(TLI,1093751637)))thenloopexitwhen i>16set i=i+1endloopcall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)elseset g=MDI()set W6I=P4Iset W7I=P5Iset W5I=TLIset CK=TLIloopexitwhen i>16set x=P4I+WAI*Cos(bj_DEGTORAD*360.0*i/16.0)set y=P5I+WAI*Sin(bj_DEGTORAD*360.0*i/16.0)set W8I=xset W9I=ycall GroupEnumUnitsInRange(g,x,y,75,Condition(function Y35))set i=i+1endloopcall MCI(g)set g=nullendifset t=nullset TLI=nullreturn falseendfunctionfunction Y55 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real P4I=(LoadReal(XY,(MKI),(6)))local real P5I=(LoadReal(XY,(MKI),(7)))local real xlocal real ylocal integer i=0call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)set t=CreateTrigger()set MKI=GetHandleId(t)loopexitwhen i>16set x=P4I+WAI*Cos(bj_DEGTORAD*360.0*i/16.0)set y=P5I+WAI*Sin(bj_DEGTORAD*360.0*i/16.0)set i=i+1endloopcall SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffect("war3mapImported\\KineticField_FX_Stand.mdx",P4I,P5I)))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(6),((P4I)*1.0))call SaveReal(XY,(MKI),(7),((P5I)*1.0))call TriggerRegisterTimerEvent(t,0.02,true)call TriggerAddCondition(t,Condition(function Y45))set t=nullset TLI=nullreturn falseendfunctionfunction Y65 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local real P4I=GetSpellTargetX()local real P5I=GetSpellTargetY()call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffect("war3mapImported\\KineticField_FX_Start.mdx",P4I,P5I)))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(6),((P4I)*1.0))call SaveReal(XY,(MKI),(7),((P5I)*1.0))call TriggerRegisterTimerEvent(t,1.2,false)call TriggerAddCondition(t,Condition(function Y55))call QJI(GetOwningPlayer(TLI),5.5,P4I,P5I,300)set t=nullset TLI=nullendfunctionfunction Y75 takes nothing returns booleanif GetSpellAbilityId()==1093751637 thencall Y65()endifreturn falseendfunctionfunction T41 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function Y75))set t=nullendfunctionfunction Y85 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit UII=(LoadUnitHandle(XY,(MKI),(45)))local real P6I=(LoadReal(XY,(MKI),(6)))local real P7I=(LoadReal(XY,(MKI),(7)))local real x=GetUnitX(UII)local real y=GetUnitY(UII)local real a=PUI(x,y,P6I,P7I)local real d=PAI(x,y,P6I,P7I)local real r=(LoadReal(XY,(MKI),(671)))call SetUnitFacing(UII,a)set x=x+r*Cos(a*bj_DEGTORAD)set y=y+r*Sin(a*bj_DEGTORAD)call SetUnitX(UII,x)call SetUnitY(UII,y)if d<40 thencall KillUnit(UII)call DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call FlushChildHashtable(XY,(MKI))call MZI(t)call MPI(TMI,4411,1)call SetUnitPosition(TMI,P6I,P7I)call PanCameraToTimedForPlayer(GetOwningPlayer(TMI),P6I,P7I,0)elseif T6I(TMI)thencall KillUnit(UII)call DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TMI=nullset UII=nullreturn falseendfunctionfunction Y95 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local real x=(LoadReal(XY,(GetHandleId(TMI)),(7400)))local real y=(LoadReal(XY,(GetHandleId(TMI)),(7500)))local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit UII=CreateUnit(GetOwningPlayer(TLI),1747993398,GetUnitX(TMI),GetUnitY(TMI),0)local real d=PAI(x,y,GetUnitX(TMI),GetUnitY(TMI))local real r=0.02*(RMaxBJ(d/1.8,600))call TriggerAddCondition(t,Condition(function Y85))call TriggerRegisterTimerEvent(t,0.02,true)call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(45),(UII))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))call SaveReal(XY,(MKI),(671),((r)*1.0))call SaveEffectHandle(XY,(MKI),(175),(AddSpecialEffectTarget("effects\\Lightning_Ball_Tail_FX.mdx",TMI,"overhead")))call SaveEffectHandle(XY,(MKI),(176),(AddSpecialEffect("effects\\Lightning_Ball_Tail_FX.mdx",x,y)))call TriggerEvaluate(t)set TLI=nullset TMI=nullendfunctionfunction YA5 takes nothing returns booleanif GetSpellAbilityId()==1093751639 and MBI(GetSpellTargetUnit())==false thenif IsUnitIllusion(GetSpellTargetUnit())thencall KillUnit(GetSpellTargetUnit())elsecall Y95()endifendifreturn falseendfunctionfunction VBO takes nothing returns nothinglocal unit TMI=CKlocal integer MKI=GetHandleId(TMI)local integer i=0loopexitwhen i>15set i=i+1endloopset TMI=nullendfunctionfunction YB5 takes nothing returns nothinglocal unit TMI=GetEnumUnit()local integer MKI=GetHandleId(TMI)local integer i=1loopexitwhen i>15call SaveReal(XY,(MKI),(7400+i-1),(((LoadReal(XY,(MKI),(7400+i))))*1.0))call SaveReal(XY,(MKI),(7500+i-1),(((LoadReal(XY,(MKI),(7500+i))))*1.0))set i=i+1endloopcall SaveReal(XY,(MKI),(7400+15),((GetUnitX(TMI))*1.0))call SaveReal(XY,(MKI),(7500+15),((GetUnitY(TMI))*1.0))set TMI=nullendfunctionfunction YC5 takes nothing returns booleanlocal group g=MDI()call GroupEnumUnitsInRange(g,0,0,99999,Condition(function BK1))call ForGroup(g,function YB5)call MCI(g)set g=nullreturn falseendfunctionfunction T61 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function YA5))set t=CreateTrigger()call TriggerRegisterTimerEvent(t,0.25,true)call TriggerAddCondition(t,Condition(function YC5))set t=nullendfunctionfunction YD5 takes nothing returns nothingif WBI!=GetEnumUnit()thencall TKI(WCI,GetEnumUnit(),1,WDI*20+20)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\Bolt\\BoltImpact.mdl",GetEnumUnit(),"chest"))endifendfunctionfunction YE5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local unit UII=(LoadUnitHandle(XY,(MKI),(45)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local group glocal integer MFI=GetTriggerEvalCount(t)local unit FA3=nullcall SetUnitX(QHI,GetUnitX(TMI))call SetUnitY(QHI,GetUnitY(TMI))call SetUnitX(UII,GetUnitX(TMI))call SetUnitY(UII,GetUnitY(TMI))if MFI==1 or MFI==100 or MFI==200 or MFI==300 thenset g=MDI()if QPI(TMI)thenset FA3=CreateUnit(GetOwningPlayer(TMI),1697656899,GetUnitX(TMI),GetUnitY(TMI),0)call UnitApplyTimedLife(FA3,1112820806,0.2)call IssueTargetOrder(QHI,"chainlightning",FA3)elsecall IssueTargetOrder(QHI,"chainlightning",TMI)call TKI(TLI,TMI,1,NGI*20+20)endifcall PKI("war3mapImported\\ThunderStorm_Groundeffect.mdx",TMI,"origin",0.6)set CK=TLIset WCI=TLIset WBI=TMIset WDI=NGIcall GroupEnumUnitsInRange(g,GetUnitX(TMI),GetUnitY(TMI),240+25,Condition(function AT1))call ForGroup(g,function YD5)call MCI(g)if GetTriggerEvalCount(t)==300 thencall KillUnit(QHI)call KillUnit(UII)call FlushChildHashtable(XY,(MKI))call MZI(t)endifendifset t=nullset TLI=nullset TMI=nullset QHI=nullset UII=nullreturn falseendfunctionfunction YF5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer NGI=GetUnitAbilityLevel(TLI,1093751894)local unit QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)local unit UII=CreateUnit(GetOwningPlayer(TLI),1697657424,GetUnitX(TMI),GetUnitY(TMI),0)call QTI(UII,1097625443)call QTI(QHI,1093752119)call SetUnitAbilityLevel(QHI,1093752119,NGI)call QTI(QHI,1097625443)call TriggerRegisterTimerEvent(t,0.02,true)call TriggerAddCondition(t,Condition(function YE5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveUnitHandle(XY,(MKI),(45),(UII))call SaveInteger(XY,(MKI),(5),(NGI))set TLI=nullset TMI=nullset UII=nullset t=nullendfunctionfunction YG5 takes nothing returns booleanif GetSpellAbilityId()==1093751894 and MBI(GetSpellTargetUnit())==false thencall YF5()endifreturn falseendfunctionfunction T71 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function YG5))set t=nullendfunctionfunction YH5 takes nothing returns nothinglocal unit QHIif WHI thenset QHI=CreateUnit(GetOwningPlayer(GetEnumUnit()),1697656901,GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),0)call UnitRemoveAbility(GetEnumUnit(),1110460467)call QTI(QHI,1093817926)call IssueTargetOrder(QHI,"doom",GetEnumUnit())set QHI=nullendifcall TKI(WFI,GetEnumUnit(),1,WEI)call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\Purge_NoBirth.mdx",GetEnumUnit(),"origin"))endfunctionfunction YZ5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer NGI=(LoadInteger(XY,(MKI),(5)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit UII=(LoadUnitHandle(XY,(MKI),(45)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local boolean OF3=(LoadBoolean(XY,(MKI),(15)))local group glocal integer MFI=GetTriggerEvalCount(t)local integer JNO=20if OF3 thenset JNO=28endifif MFI>JNO thencall StopSound(EF,false,true)call KillUnit(UII)call ShowUnit(UII,false)call KillUnit(QHI)call FlushChildHashtable(XY,(MKI))call MZI(t)elseset g=MDI()set CK=TLIset WFI=TLIset WEI=0.25*(150+50*NGI)*(MFI/I2R(JNO))set WGI=falseset WHI=OF3if ModuloInteger(MFI,4)==0 thenset WGI=trueendifcall GroupEnumUnitsInRange(g,GetUnitX(UII),GetUnitY(UII),475,Condition(function BO1))call ForGroup(g,function YH5)call MCI(g)set g=nullendifset t=nullset TLI=nullset UII=nullset QHI=nullreturn falseendfunctionfunction YV5 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local real P6I=GetSpellTargetX()local real P7I=GetSpellTargetY()local unit UII=CreateUnit(GetOwningPlayer(TLI),1747993419,P6I,P7I,0)local integer NGI=GetUnitAbilityLevel(TLI,1093752118)local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,P6I,P7I,0)local boolean OF3=falseif NGI==0 thenset NGI=GetUnitAbilityLevel(TLI,1093817912)set OF3=trueendifcall SetSoundVolume(EF,200)call StartSound(EF)call SetSoundPosition(EF,P6I,P7I,100)if NWI(GetOwningPlayer(TLI))thencall QTI(QHI,1093752117)if OF3 thencall SetUnitAbilityLevel(QHI,1093752117,2)endifelsecall QTI(QHI,1093752116)if OF3 thencall SetUnitAbilityLevel(QHI,1093752116,2)endifendifcall IssuePointOrder(QHI,"cloudoffog",P6I,P7I)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(45),(UII))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveBoolean(XY,(MKI),(15),(OF3))call TriggerRegisterTimerEvent(t,0.25,true)call TriggerAddCondition(t,Condition(function YZ5))set t=nullset TLI=nullendfunctionfunction YW5 takes nothing returns booleanif GetSpellAbilityId()==1093752118 or GetSpellAbilityId()==1093817912 thencall YV5()endifreturn falseendfunctionfunction T51 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function YW5))set t=nullendfunctionfunction YX5 takes nothing returns nothinglocal integer YY5=WJIlocal unit TMI=GetEnumUnit()local integer YJ5=662-1+YY5local real YK5=(LoadReal(XY,(GetHandleId(TMI)),(YJ5)))local real MXI=(TimerGetElapsed(M))if YK5<MXI thencall SaveReal(XY,(GetHandleId(TMI)),(YJ5),((MXI+2)*1.0))if IsUnitType(GetEnumUnit(),UNIT_TYPE_STRUCTURE)==false thencall TKI(WZI,TMI,1,2+6*WYI)elseendifendifset TMI=nullendfunctionfunction Spirits_DamageHeroes takes nothing returns nothinglocal integer YY5=WJIlocal unit TMI=GetEnumUnit()local integer YJ5=662-1+YY5local real YK5=(LoadReal(XY,(GetHandleId(TMI)),(YJ5)))local real MXI=(TimerGetElapsed(M))if YK5<MXI thencall SaveReal(XY,(GetHandleId(TMI)),(YJ5),((MXI+2)*1.0))if IsUnitType(GetEnumUnit(),UNIT_TYPE_STRUCTURE)==false thencall TKI(WZI,TMI,1,15+10*WYI)elseendifendifset TMI=nullendfunctionfunction YL5 takes nothing returns nothingif IsUnitType(GetEnumUnit(),UNIT_TYPE_STRUCTURE)==false thencall TKI(WZI,GetEnumUnit(),1,WWI)elseendifendfunctionfunction YM5 takes unit TLI,unit YN5 returns nothinglocal group g=MDI()set CK=TLIset WWI=25*WYIset WZI=TLIset WVI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(YN5),GetUnitY(YN5),0)call GroupEnumUnitsInRange(g,GetUnitX(YN5),GetUnitY(YN5),325,Condition(function B61))call QTI(WVI,1093751887)call ForGroup(g,function YL5)call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\FreezingBreath\\FreezingBreathMissile.mdl",GetUnitX(YN5),GetUnitY(YN5)))call KillUnit(YN5)call MCI(g)call UnitApplyTimedLife(CreateUnit(GetOwningPlayer(TLI),1865429073,GetUnitX(YN5),GetUnitY(YN5),0),1112820806,2)set g=nullendfunctionfunction YS5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit LF4=(LoadUnitHandle(XY,(MKI),(393)))local unit LG4=(LoadUnitHandle(XY,(MKI),(394)))local unit LH4=(LoadUnitHandle(XY,(MKI),(395)))local unit LZ4=(LoadUnitHandle(XY,(MKI),(396)))local unit LV4=(LoadUnitHandle(XY,(MKI),(397)))local real xlocal real ylocal real alocal real d=(LoadReal(XY,(MKI),(138)))local real P4I=GetUnitX(TLI)local real P5I=GetUnitY(TLI)local real W03local integer MFI=GetTriggerEvalCount(t)local real C61local group glocal integer YT5=0local real RJI=2.25local real YR5if QPI(LF4)==false thenset YT5=YT5+1endifif QPI(LG4)==false thenset YT5=YT5+1endifif QPI(LH4)==false thenset YT5=YT5+1endifif QPI(LZ4)==false thenset YT5=YT5+1endifif QPI(LV4)==false thenset YT5=YT5+1endifif YT5==5 thenset RJI=2.25elseif YT5==4 thenset RJI=2.1elseif YT5==3 thenset RJI=1.95elseif YT5==2 thenset RJI=1.8elseif YT5==1 thenset RJI=1.65endifset W03=-1*360*0.02/RJIset YR5=(LoadReal(XY,(MKI),(137)))+W03call SaveReal(XY,(MKI),(137),((YR5)*1.0))set WYI=GetUnitAbilityLevel(TLI,1093751864)set WZI=TLIif MFI==50 thencall ShowUnit(LG4,true)call SaveBoolean(XY,(MKI),(512),(true))call QTI(LG4,1097625443)endifif MFI==100 thencall ShowUnit(LH4,true)call SaveBoolean(XY,(MKI),(513),(true))call QTI(LH4,1097625443)endifif MFI==150 thencall ShowUnit(LZ4,true)call SaveBoolean(XY,(MKI),(514),(true))call QTI(LZ4,1097625443)endifif MFI==200 thencall ShowUnit(LV4,true)call SaveBoolean(XY,(MKI),(515),(true))call QTI(LV4,1097625443)endifif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT thenif GetSpellAbilityId()==1093809217 thenif(LoadBoolean(XY,(MKI),(655)))==true thencall SaveBoolean(XY,(MKI),(655),(false))call SaveBoolean(XY,(MKI),(656),(false))elsecall SaveBoolean(XY,(MKI),(655),(true))call SaveBoolean(XY,(MKI),(656),(false))endifelseif GetSpellAbilityId()==1093809218 thenif(LoadBoolean(XY,(MKI),(656)))==true thencall SaveBoolean(XY,(MKI),(655),(false))call SaveBoolean(XY,(MKI),(656),(false))elsecall SaveBoolean(XY,(MKI),(655),(false))call SaveBoolean(XY,(MKI),(656),(true))endifendifendifif(LoadBoolean(XY,(MKI),(655)))thenset d=RMaxBJ(d-5,100)call SaveReal(XY,(MKI),(138),((d)*1.0))elseif(LoadBoolean(XY,(MKI),(656)))thenset d=RMinBJ(d+5,875)call SaveReal(XY,(MKI),(138),((d)*1.0))endifif GetTriggerEventId()==EVENT_UNIT_DEATH or MFI==950 or(QPI(LF4)and QPI(LG4)and QPI(LH4)and QPI(LZ4)and QPI(LV4))or(MFI>1 and GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()==1093751864)thenif GetTriggerEventId()!=EVENT_UNIT_SPELL_EFFECT thencall UnitRemoveAbility(TLI,1093809217)call UnitRemoveAbility(TLI,1093809218)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)if QPI(LF4)==false thencall YM5(TLI,LF4)endifif QPI(LG4)==false thencall YM5(TLI,LG4)endifif QPI(LH4)==false thencall YM5(TLI,LH4)endifif QPI(LZ4)==false thencall YM5(TLI,LZ4)endifif QPI(LV4)==false thencall YM5(TLI,LV4)endifelseset g=MDI()if QPI(LF4)==false and(LoadBoolean(XY,(MKI),(511)))thenset C61=360*5/5.0set a=C61+YR5set x=RCI(P4I+d*Cos(a*bj_DEGTORAD))set y=RGI(P5I+d*Sin(a*bj_DEGTORAD))call SetUnitX(LF4,x)call SetUnitY(LF4,y)set CK=TLIcall GroupEnumUnitsInRange(g,x,y,95,Condition(function BX1))if FirstOfGroup(g)!=null thencall YM5(TLI,LF4)endifcall GroupClear(g)set WXI=LF4set WJI=1set WZI=TLIcall GroupEnumUnitsInRange(g,x,y,175,Condition(function B51))call ForGroup(g,function YX5)call GroupClear(g)endifif QPI(LG4)==false and(LoadBoolean(XY,(MKI),(512)))thenset C61=360*4/5.0set a=C61+YR5set x=RCI(P4I+d*Cos(a*bj_DEGTORAD))set y=RGI(P5I+d*Sin(a*bj_DEGTORAD))call SetUnitX(LG4,x)call SetUnitY(LG4,y)set CK=TLIcall GroupEnumUnitsInRange(g,x,y,95,Condition(function BX1))if FirstOfGroup(g)!=null thencall YM5(TLI,LG4)endifcall GroupClear(g)set WXI=LG4set WJI=2set WZI=TLIcall GroupEnumUnitsInRange(g,x,y,175,Condition(function B51))call ForGroup(g,function YX5)call GroupClear(g)endifif QPI(LH4)==false and(LoadBoolean(XY,(MKI),(513)))thenset C61=360*3/5.0set a=C61+YR5set x=RCI(P4I+d*Cos(a*bj_DEGTORAD))set y=RGI(P5I+d*Sin(a*bj_DEGTORAD))call SetUnitX(LH4,x)call SetUnitY(LH4,y)set CK=TLIcall GroupEnumUnitsInRange(g,x,y,95,Condition(function BX1))if FirstOfGroup(g)!=null thencall YM5(TLI,LH4)endifcall GroupClear(g)set WXI=LH4set WJI=3set WZI=TLIcall GroupEnumUnitsInRange(g,x,y,175,Condition(function B51))call ForGroup(g,function YX5)call GroupClear(g)endifif QPI(LZ4)==false and(LoadBoolean(XY,(MKI),(514)))thenset C61=360*2/5.0set a=C61+YR5set x=RCI(P4I+d*Cos(a*bj_DEGTORAD))set y=RGI(P5I+d*Sin(a*bj_DEGTORAD))call SetUnitX(LZ4,x)call SetUnitY(LZ4,y)set CK=TLIcall GroupEnumUnitsInRange(g,x,y,95,Condition(function BX1))if FirstOfGroup(g)!=null thencall YM5(TLI,LZ4)endifcall GroupClear(g)set WXI=LZ4set WJI=4set WZI=TLIcall GroupEnumUnitsInRange(g,x,y,175,Condition(function B51))call ForGroup(g,function YX5)call GroupClear(g)endifif QPI(LV4)==false and(LoadBoolean(XY,(MKI),(515)))thenset C61=360*1/5.0set a=C61+YR5set x=RCI(P4I+d*Cos(a*bj_DEGTORAD))set y=RGI(P5I+d*Sin(a*bj_DEGTORAD))call SetUnitX(LV4,x)call SetUnitY(LV4,y)set CK=TLIcall GroupEnumUnitsInRange(g,x,y,95,Condition(function BX1))if FirstOfGroup(g)!=null thencall YM5(TLI,LV4)endifcall GroupClear(g)set WXI=LV4set WJI=5set WZI=TLIcall GroupEnumUnitsInRange(g,x,y,175,Condition(function B51))call ForGroup(g,function YX5)call GroupClear(g)endifcall MCI(g)endifset t=nullset TLI=nullset LF4=nullset LG4=nullset LH4=nullset LZ4=nullset LV4=nullreturn falseendfunctionfunction YP5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit LF4local unit LG4local unit LH4local unit LZ4local unit LV4local real xlocal real yset x=GetUnitX(TLI)+250*Cos(bj_DEGTORAD*360*5/5.0*-1.0)set y=GetUnitY(TLI)+250*Sin(bj_DEGTORAD*360*5/5.0*-1.0)set LF4=CreateUnit(GetOwningPlayer(TLI),1747993418,x,y,360*5/5.0*-1.0)call QTI(LF4,1097625443)set x=GetUnitX(TLI)+250*Cos(bj_DEGTORAD*360*4/5.0*-1.0)set y=GetUnitY(TLI)+250*Sin(bj_DEGTORAD*360*4/5.0*-1.0)set LG4=CreateUnit(GetOwningPlayer(TLI),1747993418,x,y,360*4/5.0*-1.0)call ShowUnit(LG4,false)call SetUnitInvulnerable(LG4,true)set x=GetUnitX(TLI)+250*Cos(bj_DEGTORAD*360*3/5.0*-1.0)set y=GetUnitY(TLI)+250*Sin(bj_DEGTORAD*360*3/5.0*-1.0)set LH4=CreateUnit(GetOwningPlayer(TLI),1747993418,x,y,360*3/5.0*-1.0)call ShowUnit(LH4,false)call SetUnitInvulnerable(LG4,true)set x=GetUnitX(TLI)+250*Cos(bj_DEGTORAD*360*2/5.0*-1.0)set y=GetUnitY(TLI)+250*Sin(bj_DEGTORAD*360*2/5.0*-1.0)set LZ4=CreateUnit(GetOwningPlayer(TLI),1747993418,x,y,360*2/5.0*-1.0)call ShowUnit(LZ4,false)call SetUnitInvulnerable(LZ4,true)set x=GetUnitX(TLI)+250*Cos(bj_DEGTORAD*360*1/5.0*-1.0)set y=GetUnitY(TLI)+250*Sin(bj_DEGTORAD*360*1/5.0*-1.0)set LV4=CreateUnit(GetOwningPlayer(TLI),1747993418,x,y,360*1/5.0*-1.0)call ShowUnit(LV4,false)call SetUnitInvulnerable(LV4,true)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(393),(LF4))call SaveUnitHandle(XY,(MKI),(394),(LG4))call SaveUnitHandle(XY,(MKI),(395),(LH4))call SaveUnitHandle(XY,(MKI),(396),(LZ4))call SaveUnitHandle(XY,(MKI),(397),(LV4))call SaveBoolean(XY,(MKI),(511),(true))call SaveBoolean(XY,(MKI),(512),(false))call SaveBoolean(XY,(MKI),(513),(false))call SaveBoolean(XY,(MKI),(514),(false))call SaveBoolean(XY,(MKI),(515),(false))call SaveBoolean(XY,(MKI),(655),(false))call SaveBoolean(XY,(MKI),(656),(false))call SaveReal(XY,(MKI),(138),((150)*1.0))call QTI(TLI,1093809218)call QTI(TLI,1093809217)call TriggerRegisterTimerEvent(t,0.02,true)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function YS5))set TLI=nullset t=nullset LF4=nullset LG4=nullset LH4=nullset LZ4=nullset LV4=nullendfunctionfunction YQ5 takes nothing returns booleanif GetSpellAbilityId()==1093751864 thencall YP5()endifreturn falseendfunctionfunction T81 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function YQ5))set t=nullendfunctionfunction YU5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer NGI=(LoadInteger(XY,(MKI),(5)))call PII(TLI,GetEventDamage()*0.05*NGI)set t=nullset TLI=nullreturn falseendfunctionfunction J05 takes unit u returns nothinglocal trigger tcall UnitRemoveAbility(u,1093751891)call UnitRemoveAbility(u,1093751890)call UnitRemoveAbility(u,1093751892)call UnitRemoveAbility(u,1093751888)if(LoadBoolean(XY,(GetHandleId(u)),(708)))thencall SaveBoolean(XY,(GetHandleId(u)),(708),(false))set t=(LoadTriggerHandle(XY,(GetHandleId(u)),(709)))call FlushChildHashtable(XY,(GetHandleId(t)))call MZI(t)call RemoveSavedHandle(XY,(GetHandleId(u)),(709))set t=nullendifendfunctionfunction JI5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))call J05(TLI)call FlushChildHashtable(XY,(MKI))call MZI(t)return falseendfunctionfunction J15 takes unit u,integer i returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(2),(u))call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function JI5))if i==1 thencall QTI(u,1093751891)call SetPlayerAbilityAvailable(GetOwningPlayer(u),1093751891,false)elseif i==2 thencall QTI(u,1093751890)call SetPlayerAbilityAvailable(GetOwningPlayer(u),1093751890,false)elseif i==3 thencall QTI(u,1093751892)call SetPlayerAbilityAvailable(GetOwningPlayer(u),1093751892,false)elseif i==4 thencall QTI(u,1093751888)call SetPlayerAbilityAvailable(GetOwningPlayer(u),1093751888,false)endifif(LoadBoolean(XY,(GetHandleId(u)),(708)))==false thencall SaveBoolean(XY,(GetHandleId(u)),(708),(true))set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function YU5))call SaveTriggerHandle(XY,(GetHandleId(u)),(709),(t))call SaveUnitHandle(XY,(GetHandleId(t)),(2),(u))call SaveInteger(XY,(GetHandleId(t)),(5),(i))endifset t=nullendfunctionfunction JO5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer MFI=(LoadInteger(XY,(MKI),(34)))local integer NGI=GetUnitAbilityLevel(TLI,1093810257)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit J25=(LoadUnitHandle(XY,(GetHandleId(TLI)),(652)))local boolean G2O=falselocal real J35=0.2*(GetUnitState(TLI,UNIT_STATE_LIFE)*0.045)local real J45=0.2*(GetUnitState(TLI,UNIT_STATE_MANA)*0.045)if GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER thenif GetIssuedOrderId()==String2OrderIdBJ("manashieldon")thencall J15(TLI,NGI)elseif GetIssuedOrderId()==String2OrderIdBJ("manashieldoff")thencall J05(TLI)endifendifif GetUnitAbilityLevel(TLI,1093751891)>0 or GetUnitAbilityLevel(TLI,1093751890)>0 or GetUnitAbilityLevel(TLI,1093751892)>0 or GetUnitAbilityLevel(TLI,1093751888)>0 thenset G2O=truecall SetUnitState(TLI,UNIT_STATE_LIFE,RMaxBJ(GetUnitState(TLI,UNIT_STATE_LIFE)-J35,1))call SetUnitState(TLI,UNIT_STATE_MANA,RMaxBJ(GetUnitState(TLI,UNIT_STATE_MANA)-J45,1))endifif J25==null thenif TMI!=null thencall J05(TMI)set TMI=nullcall SaveUnitHandle(XY,(MKI),(17),(TMI))endifelseif TMI==null thenset TMI=J25if G2O thencall SaveUnitHandle(XY,(MKI),(17),(TMI))call J15(TMI,NGI)elsecall J05(TMI)endifelseif TMI!=J25 thencall J05(TMI)if G2O thenset TMI=J25call SaveUnitHandle(XY,(MKI),(17),(TMI))call J15(TMI,NGI)endifelseif G2O==false thencall J05(TMI)elseif TMI==J25 thenif G2O thenset TMI=J25call SaveUnitHandle(XY,(MKI),(17),(TMI))call J15(TMI,NGI)endifendifendifset t=nullset TLI=nullset TMI=nullset J25=nullreturn falseendfunctionfunction J55 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer NGI=GetUnitAbilityLevel(TLI,1093810257)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(null))call TriggerRegisterTimerEvent(t,0.2,true)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_ISSUED_ORDER)call TriggerAddCondition(t,Condition(function JO5))set TLI=nullset t=nullendfunctionfunction J65 takes nothing returns booleanif GetLearnedSkill()==1093810257 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093810257)==1 thencall J55()endifreturn falseendfunctionfunction T91 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function J65))set t=nullendfunctionfunction J75 takes nothing returns nothingif IsUnitInGroup(GetEnumUnit(),WLI)==false thencall GroupAddUnit(WLI,GetEnumUnit())call QTI(GetEnumUnit(),1093817424)call O41(GetEnumUnit(),1093817424,1,0.25+0.5*WNI,1110460245)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\DragonHawkMissile\\DragonHawkMissile.mdl",GetEnumUnit(),"chest"))endifendfunctionfunction J85 takes unit TLI,unit TMI,group WVO returns nothinglocal real x1=GetUnitX(TLI)local real y1=GetUnitY(TLI)local real x2=GetUnitX(TMI)local real y2=GetUnitY(TMI)local real a=PUI(x1,y1,x2,y2)*bj_DEGTORADlocal real xlocal real ylocal real d=PAI(x1,y1,x2,y2)local group g=MDI()local integer i=1set WLI=WVOset WKI=TLIset WNI=GetUnitAbilityLevel(TLI,1093751873)set WMI=WNI*50+50loopexitwhen i>8set CK=TLIset x=x1+d*i/8*Cos(a)set y=y1+d*i/8*Sin(a)call GroupEnumUnitsInRange(g,x,y,100,Condition(function AT1))call ForGroup(g,function J75)call GroupClear(g)set i=i+1endloopcall MCI(g)set g=nullendfunctionfunction J95 takes unit TLI,unit TMI returns booleanreturn((LoadInteger(XY,(GetHandleId((TLI))),((4294))))==1)endfunctionfunction JA5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real d=P8I(TLI,TMI)local real a=PQI(TLI,TMI)*bj_DEGTORADlocal real x=GetUnitX(TLI)+20*Cos(a)local real y=GetUnitY(TLI)+20*Sin(a)local location lif d<300 or d>2150 thenset l=AA1(x,y)set x=GetLocationX(l)set y=GetLocationY(l)call SetUnitX(TLI,RCI(x))call SetUnitY(TLI,RGI(y))call QEI(x,y,350)call RemoveLocation(l)set l=nullcall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)call SaveInteger(XY,(GetHandleId((TLI))),((4295)),(2))elsecall SetUnitX(TLI,x)call SetUnitY(TLI,y)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction JB5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local group WVO=(LoadGroupHandle(XY,(MKI),(133)))local lightning QOI=(LoadLightningHandle(XY,(MKI),(196)))local integer MFI=GetTriggerEvalCount(t)local real d=P8I(TLI,TMI)local real a=1local real EL3=GetUnitState(TLI,UNIT_STATE_LIFE)local real XTO=GetUnitState(TLI,UNIT_STATE_MANA)local real JC5=(LoadReal(XY,(MKI),(670)))local real JD5=(LoadReal(XY,(MKI),(667)))local real JE5local real JF5local real JG5=1.5if TMI==null or TLI==null or QPI(TLI)==true or(MFI>600 and J95(TLI,TMI)==false and((LoadInteger(XY,(GetHandleId((TLI))),((4295))))==1)==false)or(d>925 and((LoadInteger(XY,(GetHandleId((TLI))),((4295))))==1)==false)or GetTriggerEventId()==EVENT_UNIT_DEATH or(GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()==1093751893)thencall MCI(WVO)call DestroyLightning(QOI)call UnitRemoveAbility(TMI,1093751880)call UnitRemoveAbility(TMI,1093751881)call UnitRemoveAbility(TMI,1093751879)call UnitRemoveAbility(TMI,1093751882)call UnitRemoveAbility(TMI,1110459464)call FlushChildHashtable(XY,(MKI))call MZI(t)call UnitRemoveAbility(TLI,1093751880)call UnitRemoveAbility(TLI,1093751881)call UnitRemoveAbility(TLI,1093751879)call UnitRemoveAbility(TLI,1093751882)call UnitRemoveAbility(TLI,1110459464)call UnitRemoveAbility(TLI,1093751893)if(LoadInteger(XY,(GetHandleId(TLI)),(704)))==0 or(LoadInteger(XY,(GetHandleId(TLI)),(704)))==1093751873 thencall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093751873,true)endifcall RemoveSavedHandle(XY,GetHandleId(TLI),652)elseset JE5=EL3/GetUnitState(TLI,UNIT_STATE_MAX_LIFE)set JF5=XTO/GetUnitState(TLI,UNIT_STATE_MAX_MANA)if JE5-JC5>0 and(JE5-JC5)<0.5 thenif((LoadInteger(XY,(GetHandleId((TLI))),((4298))))==1)==false thencall SetUnitState(TMI,UNIT_STATE_LIFE,GetUnitState(TMI,UNIT_STATE_LIFE)+JG5*(JE5-JC5)*GetUnitState(TLI,UNIT_STATE_MAX_LIFE))endifendifif JF5-JD5>0 and(JF5-JD5)<0.5 thencall SetUnitState(TMI,UNIT_STATE_MANA,GetUnitState(TMI,UNIT_STATE_MANA)+JG5*(JF5-JD5)*GetUnitState(TLI,UNIT_STATE_MAX_MANA))endifcall SaveReal(XY,(MKI),(670),((GetUnitState(TLI,UNIT_STATE_LIFE)/GetUnitState(TLI,UNIT_STATE_MAX_LIFE))*1.0))call SaveReal(XY,(MKI),(667),((GetUnitState(TLI,UNIT_STATE_MANA)/GetUnitState(TLI,UNIT_STATE_MAX_MANA))*1.0))call MoveLightning(QOI,true,GetUnitX(TLI),GetUnitY(TLI),GetUnitX(TMI),GetUnitY(TMI))call J85(TLI,TMI,WVO)if IsUnitVisible(TLI,GetLocalPlayer())==false and IsUnitVisible(TMI,GetLocalPlayer())==false thenset a=0endifif TGI(GetLocalPlayer())thenset a=1endifif d<700 or((LoadInteger(XY,(GetHandleId((TLI))),((4295))))==1)==true thencall SetLightningColor(QOI,0.00,1.00,1.00,a)elsecall SetLightningColor(QOI,0.80,0.70,0.40,a)endifendifset t=nullset TLI=nullset TMI=nullset WVO=nullset QOI=nullreturn falseendfunctionfunction JH5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local lightning QOI=AddLightning("CHIM",true,GetUnitX(TLI),GetUnitY(TLI),GetUnitX(TMI),GetUnitY(TMI))local integer NGI=GetUnitAbilityLevel(TLI,1093751873)local integer HS3local real d=P8I(TLI,TMI)local real a=PQI(TLI,TMI)*bj_DEGTORADlocal location llocal real xlocal real ycall SetLightningColor(QOI,0.00,1.00,1.00,1)call QTI(TLI,1093751893)if NGI==1 thenset HS3=1093751880elseif NGI==2 thenset HS3=1093751881elseif NGI==3 thenset HS3=1093751879elseif NGI==4 thenset HS3=1093751882endifcall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093751873,false)call QTI(TLI,HS3)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),HS3,false)call QTI(TMI,HS3)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),HS3,false)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveGroupHandle(XY,(MKI),(133),(MDI()))call SaveLightningHandle(XY,(MKI),(196),(QOI))call SaveReal(XY,(MKI),(670),((GetUnitState(TLI,UNIT_STATE_LIFE)/GetUnitState(TLI,UNIT_STATE_MAX_LIFE))*1.0))call SaveReal(XY,(MKI),(667),((GetUnitState(TLI,UNIT_STATE_MANA)/GetUnitState(TLI,UNIT_STATE_MAX_MANA))*1.0))call TriggerRegisterTimerEvent(t,0.02,true)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function JB5))call SaveUnitHandle(XY,(GetHandleId(TLI)),(652),(TMI))if d>700 thenset t=CreateTrigger()set MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("Abilities\\Weapons\\DragonHawkMissile\\DragonHawkMissile.mdl",TLI,"chest")))call TriggerRegisterTimerEvent(t,0.02,true)call TriggerAddCondition(t,Condition(function JA5))call SaveInteger(XY,(GetHandleId((TLI))),((4295)),(1))endifset TLI=nullset t=nullendfunctionfunction JZ5 takes nothing returns booleanif GetSpellAbilityId()==1093751873 thencall JH5()endifreturn falseendfunctionfunction TA1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function JZ5))set t=nullendfunctionfunction JV5 takes unit TLI,real x,real y returns booleanlocal boolean DR1=falselocal player p=GetOwningPlayer(TLI)local unit QHI=CreateUnit(p,1697657425,GetUnitX(TLI),GetUnitY(TLI),0)call QTI(QHI,1093752372)if IssuePointOrder(QHI,"blink",x,y)==true thencall KillUnit(QHI)set QHI=nullreturn trueelsecall KillUnit(QHI)set QHI=nullreturn falseendifendfunctionfunction JW5 takes string Q3I,unit TMI returns nothinglocal texttag tt=CreateTextTag()call SetTextTagText(tt,Q3I,0.033)call SetTextTagPosUnit(tt,TMI,64)call SetTextTagColor(tt,0,50,255,255)call SetTextTagVelocity(tt,0,0.0355)call SetTextTagFadepoint(tt,0.15)call SetTextTagPermanent(tt,false)call SetTextTagLifespan(tt,0.85)call SetTextTagVisibility(tt,true)set tt=nullendfunctionfunction JX5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer MFI=GetTriggerEvalCount(t)if QPI(TLI)==false and MFI<12 thencall JW5(I2S(12-MFI),TLI)endifif MFI==12 thencall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullreturn falseendfunctionfunction JY5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(GetHandleId(TLI)),(652)))local real P6I=(LoadReal(XY,(MKI),(47)))local real P7I=(LoadReal(XY,(MKI),(48)))local real P4I=(LoadReal(XY,(MKI),(189)))local real P5I=(LoadReal(XY,(MKI),(190)))local fogmodifier QYI=(LoadFogModifierHandle(XY,(MKI),(42)))if GetTriggerEventId()==EVENT_UNIT_DEATH thencall SaveInteger(XY,(GetHandleId((TLI))),((4294)),(2))call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FogModifierStop(QYI)call DestroyFogModifier(QYI)call FlushChildHashtable(XY,(MKI))call MZI(t)elsecall QEI(P6I,P7I,250)call QEI(P4I,P5I,250)if GetTriggerEvalCount(t)==1 thenif QPI(TLI)==false thencall DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\NightElf\\NECancelDeath\\NECancelDeath.mdl",GetUnitX(TLI),GetUnitY(TLI)))call SetUnitPosition(TLI,P6I,P7I)call PanCameraToTimedForPlayer(GetOwningPlayer(TLI),P6I,P7I,0)call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\NightElf\\NECancelDeath\\NECancelDeath.mdl",GetUnitX(TLI),GetUnitY(TLI)))endifif TMI!=null and QPI(TMI)==false and GetOwningPlayer(TMI)!=BO[0]and GetOwningPlayer(TMI)!=CO[0]and((LoadBoolean(XY,(GetHandleId(GetOwningPlayer((TMI)))),(139)))==false)thencall DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\NightElf\\NECancelDeath\\NECancelDeath.mdl",GetUnitX(TMI),GetUnitY(TMI)))call MPI(TMI,4402,1)call SetUnitPosition(TMI,P6I,P7I)if IsUnitType(TMI,UNIT_TYPE_HERO)==true and QPI(TMI)==false thencall PanCameraToTimedForPlayer(GetOwningPlayer(TMI),P6I,P7I,0)endifcall DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\NightElf\\NECancelDeath\\NECancelDeath.mdl",GetUnitX(TMI),GetUnitY(TMI)))endifelseif QPI(TLI)==false thencall DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\NightElf\\NECancelDeath\\NECancelDeath.mdl",GetUnitX(TLI),GetUnitY(TLI)))call SetUnitPosition(TLI,P4I,P5I)call PanCameraToTimedForPlayer(GetOwningPlayer(TLI),P4I,P5I,0)call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\NightElf\\NECancelDeath\\NECancelDeath.mdl",GetUnitX(TLI),GetUnitY(TLI)))endifif TMI!=null and QPI(TMI)==false and GetOwningPlayer(TMI)!=BO[0]and GetOwningPlayer(TMI)!=CO[0]and((LoadBoolean(XY,(GetHandleId(GetOwningPlayer((TMI)))),(139)))==false)thencall DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\NightElf\\NECancelDeath\\NECancelDeath.mdl",GetUnitX(TMI),GetUnitY(TMI)))call MPI(TMI,4402,1)call SetUnitPosition(TMI,P4I,P5I)if IsUnitType(TMI,UNIT_TYPE_HERO)==true and QPI(TMI)==false thencall PanCameraToTimedForPlayer(GetOwningPlayer(TMI),P4I,P5I,0)endifcall DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\NightElf\\NECancelDeath\\NECancelDeath.mdl",GetUnitX(TMI),GetUnitY(TMI)))endifcall SaveInteger(XY,(GetHandleId((TLI))),((4294)),(2))call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FogModifierStop(QYI)call DestroyFogModifier(QYI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifendifset t=nullset TLI=nullset TMI=nullset QYI=nullreturn falseendfunctionfunction JJ5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real P6I=(LoadReal(XY,(MKI),(47)))local real P7I=(LoadReal(XY,(MKI),(48)))local fogmodifier QYIlocal integer NGI=GetUnitAbilityLevel(TLI,1093751874)if AI1(TLI)or OU1(TLI)or QPI(TLI)thencall SaveInteger(XY,(GetHandleId((TLI))),((4294)),(2))call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEvalCount(t)==(2.75-0.25*NGI)/.05 thenset QYI=CreateFogModifierRadius(GetOwningPlayer(TLI),FOG_OF_WAR_VISIBLE,GetUnitX(TLI),GetUnitY(TLI),400,true,true)call FogModifierStart(QYI)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)set t=CreateTrigger()set MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(2),(TLI))call TriggerRegisterTimerEvent(t,0.01,false)call TriggerRegisterTimerEvent(t,12,false)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function JY5))call SaveReal(XY,(MKI),(189),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(190),((GetUnitY(TLI))*1.0))call SaveReal(XY,(MKI),(47),((P6I)*1.0))call SaveReal(XY,(MKI),(48),((P7I)*1.0))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffect("war3mapImported\\EarthlyEminence.mdl",GetUnitX(TLI),GetUnitY(TLI))))call SaveFogModifierHandle(XY,(MKI),(42),(QYI))set t=CreateTrigger()set MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(2),(TLI))call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function JX5))endifset TLI=nullset t=nullset QYI=nullreturn falseendfunctionfunction JK5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real x=GetSpellTargetX()local real y=GetSpellTargetY()local unit TMI=(LoadUnitHandle(XY,(GetHandleId(TLI)),(652)))local integer id=GetPlayerId(GetOwningPlayer(TLI))local integer NGI=GetUnitAbilityLevel(TLI,1093751874)call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\NightElf\\NECancelDeath\\NECancelDeath.mdl",TLI,"chest"))if TMI!=null thenendifcall PingMinimapEx(x,y,4.0,255,0,0,false)call QJI(BO[1],2.5,x,y,300)call QJI(CO[1],2.5,x,y,300)call SaveUnitHandle(XY,(MKI),(2),(TLI))call TriggerRegisterTimerEvent(t,.05,true)call TriggerAddCondition(t,Condition(function JJ5))call SaveReal(XY,(MKI),(47),((x)*1.0))call SaveReal(XY,(MKI),(48),((y)*1.0))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffect("war3mapImported\\EarthlyEminence.mdl",x,y)))call SaveInteger(XY,(GetHandleId((TLI))),((4294)),(1))set TLI=nullset t=nullendfunctionfunction JL5 takes nothing returns booleanif GetSpellAbilityId()==1093751874 thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT thencall JK5()elseif JV5(GetTriggerUnit(),GetSpellTargetX(),GetSpellTargetY())==false thencall R6I(GetTriggerUnit())call R1I(GetOwningPlayer(GetTriggerUnit()),GetObjectName(1848658776))elseif NZI(GetOwningPlayer(GetTriggerUnit()))thenif IsPointInRegion(WTI,GetSpellTargetX(),GetSpellTargetY())==true thencall R6I(GetTriggerUnit())call R1I(GetOwningPlayer(GetTriggerUnit()),GetObjectName(1848652633))endifelseif IsPointInRegion(WSI,GetSpellTargetX(),GetSpellTargetY())==true thencall R6I(GetTriggerUnit())call R1I(GetOwningPlayer(GetTriggerUnit()),GetObjectName(1848652633))endifendifendifendifendifreturn falseendfunctionfunction TB1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function JL5))set WSI=CreateRegion()call RegionAddRect(WSI,F4)call RegionAddRect(WSI,G5)set WTI=CreateRegion()call RegionAddRect(WTI,E4)call RegionAddRect(WTI,H5)set t=nullendfunctionfunction JM5 takes unit TLI,unit TMI,real P4I,real P5I,real a2 returns nothinglocal integer i=0local real P6Ilocal real P7I=GetUnitY(TMI)local real alocal real xlocal real ylocal real JN5if TMI!=null thenset P6I=GetUnitX(TMI)set P7I=GetUnitY(TMI)set a=PUI(P4I,P5I,P6I,P7I)elseset a=a2set P6I=P4I+50*Cos(a*bj_DEGTORAD)set P7I=P5I+50*Sin(a*bj_DEGTORAD)endifset JN5=aset x=P6I+200*Cos(JN5*bj_DEGTORAD)set y=P7I+200*Sin(JN5*bj_DEGTORAD)call UTI(CreateDestructable(1110454326,x,y,-1*JN5,0.6,1),5)call QEI(x,y,300)set JN5=a-40set x=P6I+200*Cos(JN5*bj_DEGTORAD)set y=P7I+200*Sin(JN5*bj_DEGTORAD)call UTI(CreateDestructable(1110454326,x,y,-1*JN5,0.6,1),5)call QEI(x,y,300)set JN5=a-80set x=P6I+200*Cos(JN5*bj_DEGTORAD)set y=P7I+200*Sin(JN5*bj_DEGTORAD)call UTI(CreateDestructable(1110454326,x,y,-1*JN5,0.6,1),5)call QEI(x,y,300)set JN5=a+40set x=P6I+200*Cos(JN5*bj_DEGTORAD)set y=P7I+200*Sin(JN5*bj_DEGTORAD)call UTI(CreateDestructable(1110454326,x,y,-1*JN5,0.6,1),5)call QEI(x,y,300)set JN5=a+80set x=P6I+200*Cos(JN5*bj_DEGTORAD)set y=P7I+200*Sin(JN5*bj_DEGTORAD)call UTI(CreateDestructable(1110454326,x,y,-1*JN5,0.6,1),5)call QEI(x,y,300)if TMI!=null thencall DestroyEffect(AddSpecialEffectTarget("war3mapImported\\ChainFreeze_F6.mdx",TMI,"chest"))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\FrostWyrmMissile\\FrostWyrmMissile.mdl",TMI,"chest"))call TKI(WRI,TMI,1,WQI*70)endifendfunctionfunction JS5 takes nothing returns nothingif IsUnitInGroup(GetEnumUnit(),WUI)==false thenif IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)==false thencall GroupAddUnit(WUI,GetEnumUnit())call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\ChainFreeze_F6.mdx",GetEnumUnit(),"chest"))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\FrostWyrmMissile\\FrostWyrmMissile.mdl",GetEnumUnit(),"chest"))call TKI(WRI,GetEnumUnit(),1,WQI*70)elseset WPI=GetEnumUnit()endifendifendfunctionfunction JT5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit JR5=(LoadUnitHandle(XY,(MKI),(45)))local real A94=(LoadReal(XY,(MKI),(683)))local real AA4=(LoadReal(XY,(MKI),(684)))local real P4I=GetUnitX(JR5)local real P5I=GetUnitY(JR5)local real NN2=Atan2(AA4-P5I,A94-P4I)local real U2I=P4I+18*Cos(NN2)local real U3I=P5I+18*Sin(NN2)local group WVO=(LoadGroupHandle(XY,(MKI),(133)))local integer NGI=GetUnitAbilityLevel(TLI,1093753167)local group g=MDI()set CK=TLIset WRI=TLIset WUI=WVOset WQI=NGIset WPI=nullcall GroupEnumUnitsInRange(g,U2I,U3I,225,Condition(function AT1))call ForGroup(g,function JS5)call MCI(g)call SetUnitPosition(JR5,U2I,U3I)if PAI(U2I,U3I,A94,AA4)<40 or WPI!=null thencall QEI(U2I,U3I,300)call KillUnit(JR5)call ShowUnit(JR5,false)call SetUnitPathing(JR5,true)if WPI!=null thencall JM5(TLI,WPI,U2I,U3I,NN2*bj_RADTODEG)elsecall JM5(TLI,null,U2I,U3I,NN2*bj_RADTODEG)endifcall MCI(WVO)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset JR5=nullset WVO=nullset g=nullreturn falseendfunctionfunction JP5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit JR5=CreateUnit(GetOwningPlayer(TLI),1747993427,GetUnitX(TLI),GetUnitY(TLI),0)local real P4I=GetUnitX(TLI)local real P5I=GetUnitY(TLI)local real P6I=GetSpellTargetX()local real P7I=GetSpellTargetY()local real NN2=Atan2(P7I-P5I,P6I-P4I)local real A94=RCI(P4I+1600*Cos(NN2))local real AA4=RGI(P5I+1600*Sin(NN2))call SetUnitFacing(JR5,NN2*bj_RADTODEG)call SetUnitPathing(JR5,false)call TriggerRegisterTimerEvent(t,.02,true)call TriggerAddCondition(t,Condition(function JT5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(683),((A94)*1.0))call SaveReal(XY,(MKI),(684),((AA4)*1.0))call SaveReal(XY,(MKI),(13),((NN2)*1.0))call SaveUnitHandle(XY,(MKI),(45),(JR5))call SaveGroupHandle(XY,(MKI),(133),(MDI()))set TLI=nullset JR5=nullset t=nullendfunctionfunction JQ5 takes nothing returns booleanif GetSpellAbilityId()==1093753167 thencall JP5()endifreturn falseendfunctionfunction TC1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function JQ5))set t=nullendfunctionfunction JU5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=GetUnitAbilityLevel(TLI,1093753169)local integer MFI=GetTriggerEvalCount(t)local real y=(MFI-50)*(MFI-50)/4.3local real TSIif NGI==1 thenset TSI=75elseif NGI==2 thenset TSI=150elseset TSI=225endifif MFI==1 thencall IssueTargetOrder(TLI,"attack",TMI)endifif MFI<50 thenif T9I(TMI)==false thencall SetUnitFlyHeight(TMI,700*MFI/50,0)endifelseif MFI<100 thenif T9I(TMI)==false thencall SetUnitFlyHeight(TMI,700-700*(MFI-50)/50,0)endifelseif T9I(TMI)==false thencall SetUnitFlyHeight(TMI,GetUnitDefaultFlyHeight(TMI),0)endifcall DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call FlushChildHashtable(XY,(MKI))call MZI(t)call O41(TMI,1093808180,1,1+NGI,1110459481)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093808180,false)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction K05 takes unit TLI,unit TMI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer NGI=GetUnitAbilityLevel(TLI,1093753169)local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call Q5I("WALRUS PUNCH !!",3.5,TLI,0.03,255,0,0,255)call QWI(YF,GetUnitX(TMI),GetUnitY(TMI))call QTI(QHI,1093752144)call IssueTargetOrder(QHI,"thunderbolt",TMI)if T9I(TMI)==false thencall QTI(TMI,1097691750)call UnitRemoveAbility(TMI,1097691750)endifcall DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\FrostBolt\\FrostBoltMissile.mdl",TMI,"overhead"))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\FrostBolt\\FrostBoltMissile.mdl",TMI,"head"))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\FrostBolt\\FrostBoltMissile.mdl",TMI,"left,hand"))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\FrostBolt\\FrostBoltMissile.mdl",TMI,"right,hand"))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\FrostBolt\\FrostBoltMissile.mdl",TMI,"chest"))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\FrostBolt\\FrostBoltMissile.mdl",TMI,"origin"))call TriggerRegisterTimerEvent(t,.01,true)call TriggerAddCondition(t,Condition(function JU5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveEffectHandle(XY,(MKI),(175),(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\FreezingBreath\\FreezingBreathMissile.mdl",TMI,"chest")))set t=nullendfunctionfunction KI5 takes nothing returns booleanlocal trigger t2=GetTriggeringTrigger()local integer XVO=GetHandleId(t2)local unit TLI=(LoadUnitHandle(XY,(XVO),(2)))local unit TMI=(LoadUnitHandle(XY,(XVO),(17)))local effect K15=(LoadEffectHandle(XY,(XVO),(32)))local trigger t=(LoadTriggerHandle(XY,(XVO),(35)))local integer MKI=(LoadInteger(XY,(XVO),(375)))if GetTriggerEvalCount(t2)==1 thencall IssueTargetOrder(TLI,"attack",TMI)elseif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamageSource()==TLI and GetEventDamage()>30 thencall O11(TLI,1093752136,1,0.1)call O11(TLI,1093752137,1,0.1)call DestroyEffect(K15)call MZI(t2)call FlushChildHashtable(XY,(XVO))call MZI(t)call FlushChildHashtable(XY,(MKI))call K05(TLI,TMI)endifelseif GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED thenif GetAttacker()==TLI and GetTriggerUnit()!=TMI thencall FlushChildHashtable(XY,(XVO))call MZI(t2)endifelsecall UnitRemoveAbility(TLI,1093752136)call UnitRemoveAbility(TLI,1093752137)call RemoveSavedHandle(XY,(MKI),(17))call FlushChildHashtable(XY,(XVO))call MZI(t2)endifendifset t2=nullset t=nullset TLI=nullset TMI=nullset K15=nullreturn falseendfunctionfunction KO5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMIlocal effect K15=(LoadEffectHandle(XY,(MKI),(32)))local trigger t2local integer XVOif GetTriggerEventId()!=EVENT_PLAYER_UNIT_ATTACKED thencall DestroyEffect(K15)call UnitRemoveAbility(TLI,1093752136)call UnitRemoveAbility(TLI,1093752137)call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetAttacker()==TLI and GetTriggerUnit()!=(LoadUnitHandle(XY,(MKI),(17)))and IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(TLI))==false and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false thenset TMI=GetTriggerUnit()call SaveUnitHandle(XY,(MKI),(17),(TMI))call UnitRemoveAbility(TLI,1093752136)call UnitRemoveAbility(TLI,1093752137)if GetUnitState(TMI,UNIT_STATE_LIFE)/GetUnitState(TMI,UNIT_STATE_MAX_LIFE)>0.5 thencall QTI(TLI,1093752136)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093752136,false)elsecall QTI(TLI,1093752137)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093752137,false)endifcall IssueImmediateOrder(TLI,"stop")set t2=CreateTrigger()set XVO=GetHandleId(t2)call TriggerRegisterTimerEvent(t2,0,false)call TriggerRegisterTimerEvent(t2,2,false)call TriggerRegisterUnitEvent(t2,TMI,EVENT_UNIT_DAMAGED)call Q9I(t2,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t2,Condition(function KI5))call SaveUnitHandle(XY,(XVO),(2),(TLI))call SaveUnitHandle(XY,(XVO),(17),(TMI))call SaveEffectHandle(XY,(XVO),(32),(K15))call SaveInteger(XY,(XVO),(375),(MKI))call SaveTriggerHandle(XY,(XVO),(35),(t))endifset t=nullset TLI=nullset TMI=nullset K15=nullreturn falseendfunctionfunction K25 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerRegisterTimerEvent(t,10,false)call TriggerAddCondition(t,Condition(function KO5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(null))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("war3mapImported\\WalrusPunchWeaponFX.mdx",TLI,"weapon")))set t=nullset TLI=nullendfunctionfunction K35 takes nothing returns booleanif GetSpellAbilityId()==1093753169 thencall K25()endifreturn falseendfunctionfunction TD1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function K35))set t=nullendfunctionfunction K45 takes nothing returns nothingcall ShowUnit(GetEnumUnit(),true)call UnitRemoveAbility(GetEnumUnit(),1093678162)call SetUnitInvulnerable(GetEnumUnit(),false)call PauseUnit(GetEnumUnit(),false)if IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)==true thencall SetUnitPosition(GetEnumUnit(),X5I,X6I)call SelectUnitForPlayerSingle(GetEnumUnit(),GetOwningPlayer(GetEnumUnit()))elsecall SetUnitX(GetEnumUnit(),X5I)call SetUnitY(GetEnumUnit(),X6I)endifif GetEnumUnit()==X1I and XOI!=null thencall IssueTargetOrder(X1I,"attack",XOI)endifif GetUnitTypeId(GetEnumUnit())==1160786505 thencall SetUnitVertexColor(GetEnumUnit(),255,255,255,255)endifcall DestroyEffect(AddSpecialEffect("war3mapImported\\ChainFreeze_F6.mdx",GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit())))call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\FrostWyrmMissile\\FrostWyrmMissile.mdl",GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit())))endfunctionfunction Snowball_Slow takes nothing returns nothinglocal integer UWIif X4I==1 thenset UWI=1093808198elseif X4I==2 thenset UWI=1093808197elseif X4I==3 thenset UWI=1093751628elseif X4I==4 thenset UWI=1093808196endifif IsUnitInGroup(GetEnumUnit(),X0I)==false thencall GroupAddUnit(X0I,GetEnumUnit())call SetPlayerAbilityAvailable(GetOwningPlayer(GetEnumUnit()),UWI,false)call O41(GetEnumUnit(),UWI,1,5,1110459459)endifendfunctionfunction K55 takes nothing returns nothingif IsUnitInGroup(GetEnumUnit(),X0I)==false thencall GroupAddUnit(X0I,GetEnumUnit())call TKI(X1I,GetEnumUnit(),1,40*X4I+40+X8I*(10+10*X4I))call SetUnitAbilityLevel(X2I,1093687350,BR1(0.25*X4I+0.25))call SetUnitX(X2I,GetUnitX(GetEnumUnit()))call SetUnitY(X2I,GetUnitY(GetEnumUnit()))call IssueTargetOrder(X2I,"thunderbolt",GetEnumUnit())endifendfunctionfunction K65 takes nothing returns nothingcall SetUnitX(GetEnumUnit(),X5I)call SetUnitY(GetEnumUnit(),X6I)endfunctionfunction K75 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit UII=(LoadUnitHandle(XY,(MKI),(45)))local real P6I=GetUnitX(TMI)local real P7I=GetUnitY(TMI)local real r=(LoadReal(XY,(MKI),(671)))local real a=PUI(GetUnitX(UII),GetUnitY(UII),P6I,P7I)*bj_DEGTORADlocal real x=GetUnitX(UII)+r*Cos(a)local real y=GetUnitY(UII)+r*Sin(a)local group WVO=(LoadGroupHandle(XY,(MKI),(133)))local group glocal integer MFI=GetTriggerEvalCount(t)local real K73=RMinBJ(2.5+(MFI*0.02),10)local real OD3=225+40*(MFI*0.02)local integer K85=(LoadInteger(XY,(MKI),(34)))set X8I=K85set X4I=GetUnitAbilityLevel(TLI,1093751607)set CK=TLIset X0I=WVOset X1I=TLIset XOI=TMIset X2I=(LoadUnitHandle(XY,(MKI),(19)))call SetUnitX(UII,x)call SetUnitY(UII,y)call SetUnitX(TLI,x)call SetUnitY(TLI,y)call SetUnitFacing(UII,a*bj_RADTODEG-180)call SetUnitScale(UII,K73,K73,K73)set X5I=xset X6I=ycall ForGroup((LoadGroupHandle(XY,(MKI),(22))),function K65)if PAI(x,y,P6I,P7I)<r*2 or MFI==150 thencall QEI(x,y,300)set g=MDI()call GroupEnumUnitsInRange(g,x,y,OD3,Condition(function AT1))call ForGroup(g,function K55)call MCI(g)set g=nullset X5I=xset X6I=ycall ForGroup((LoadGroupHandle(XY,(MKI),(22))),function K45)call MCI((LoadGroupHandle(XY,(MKI),(22))))call MCI(WVO)call KillUnit(UII)call FlushChildHashtable(XY,(MKI))call MZI(t)call SetUnitInvulnerable(TLI,false)call UnitRemoveAbility(TLI,1096971630)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093753167,true)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093753169,true)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093753170,true)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093751607,true)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093818443,false)elseif ModuloInteger(GetTriggerEvalCount(t),5)==0 thencall QEI(x,y,300)set g=MDI()call GroupEnumUnitsInRange(g,x,y,OD3,Condition(function AT1))call ForGroup(g,function K55)call MCI(g)set g=nullendifendifset t=nullset TLI=nullset UII=nullset WVO=nullreturn falseendfunctionfunction K95 takes unit TLI,group g,unit KA5 returns nothingif IsUnitInGroup(KA5,g)==false thencall GroupAddUnit(g,KA5)call DestroyEffect(AddSpecialEffect("war3mapImported\\ChainFreeze_F6.mdx",GetUnitX(KA5),GetUnitY(KA5)))call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\FrostWyrmMissile\\FrostWyrmMissile.mdl",GetUnitX(KA5),GetUnitY(KA5)))if TLI!=KA5 thencall ShowUnit(KA5,false)call QTI(KA5,1093678162)call SetUnitInvulnerable(KA5,true)call PauseUnit(KA5,true)endifif TLI!=KA5 thenset X8I=X8I+1endifendifendfunctionfunction KB5 takes nothing returns nothingcall K95(X1I,XII,GetEnumUnit())endfunctionfunction KC5 takes nothing returns booleanreturn((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))==false and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))or(GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(CK)and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit()))))and((LoadBoolean(XY,(GetHandleId(GetOwningPlayer(GetFilterUnit()))),(139)))==false or X1I==GetFilterUnit())endfunctionfunction KD5 takes unit TLI,unit TMI,integer K85 returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real P4I=GetUnitX(TLI)local real P5I=GetUnitY(TLI)local real P6I=GetUnitX(TMI)local real P7I=GetUnitY(TMI)local real a=PUI(P4I,P5I,P6I,P7I)*bj_DEGTORADlocal group g=MDI()set X7I=0set X8I=K85set X1I=TLIcall SetUnitVertexColor(TLI,255,255,255,0)set X7I=1.5*RMaxBJ(133,GetUnitMoveSpeed(TLI))+X8I*75call SetUnitTimeScale(X3I,2)call TriggerRegisterTimerEvent(t,0.02,true)call TriggerAddCondition(t,Condition(function K75))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(19),(X2I))call SaveUnitHandle(XY,(MKI),(45),(X3I))call SaveReal(XY,(MKI),(137),((a)*1.0))call SaveReal(XY,(MKI),(671),((X7I*0.02)*1.0))call SaveReal(XY,(MKI),(47),((P6I)*1.0))call SaveReal(XY,(MKI),(48),((P7I)*1.0))call SaveInteger(XY,(MKI),(34),(K85))call SaveGroupHandle(XY,(MKI),(22),(XII))call SaveGroupHandle(XY,(MKI),(133),(MDI()))set t=nullset g=nullendfunctionfunction KE5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit UII=(LoadUnitHandle(XY,(MKI),(45)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local group glocal integer MFI=(LoadInteger(XY,(MKI),(34)))local real K73=RMinBJ(2.5+(MFI*0.02),10)local real OD3=225+40*(MFI*0.02)local unit KA5call SetUnitX(TLI,x)call SetUnitY(TLI,y)set X4I=GetUnitAbilityLevel(TLI,1093751607)set CK=TLIset X1I=TLIset XOI=TMIset X2I=(LoadUnitHandle(XY,(MKI),(19)))set X3I=UIIcall SetUnitScale(UII,K73,K73,K73)if GetTriggerEventId()==EVENT_UNIT_ISSUED_TARGET_ORDER thenif GetIssuedOrderId()==851971 thenset KA5=GetOrderTargetUnit()if P8I(TLI,KA5)<425 and IsUnitAlly(KA5,GetOwningPlayer(TLI))==true and(IsUnitType(KA5,UNIT_TYPE_HERO)==true or GetOwningPlayer(KA5)==GetOwningPlayer(TLI))thencall K95(TLI,(LoadGroupHandle(XY,(MKI),(22))),KA5)endifendifelseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT thenif GetSpellAbilityId()==1093818443 thencall KD5(TLI,TMI,X8I)call FlushChildHashtable(XY,(MKI))call MZI(t)endifelseset XII=(LoadGroupHandle(XY,(MKI),(22)))set g=MDI()set CK=TLIcall GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),100+25,Condition(function KC5))call ForGroup(g,function KB5)call MCI(g)set MFI=MFI+1call SaveInteger(XY,(MKI),(34),(MFI))if MFI==200 thencall KD5(TLI,TMI,X8I)call FlushChildHashtable(XY,(MKI))call MZI(t)endifendifset t=nullset TLI=nullset UII=nullreturn falseendfunctionfunction KF5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit UII=CreateUnit(GetOwningPlayer(TLI),1747993395,GetUnitX(TLI),GetUnitY(TLI),GetUnitFacing(TLI))local group g=MDI()set X7I=0set X8I=0set X1I=TLIset XII=MDI()set X7I=1.5*RMaxBJ(133,GetUnitMoveSpeed(TLI))set CK=TLIcall GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),100+25,Condition(function KC5))call ForGroup(g,function KB5)call MCI(g)set X2I=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TLI),GetUnitY(TLI),0)call QTI(X2I,1093687350)call SetUnitInvulnerable(TLI,true)call QTI(TLI,1096971630)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093753167,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093753169,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093753170,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093751607,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093818443,true)call QTI(TLI,1093818443)call SetUnitTimeScale(UII,2)call TriggerRegisterTimerEvent(t,0.02,true)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_ISSUED_TARGET_ORDER)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function KE5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(19),(X2I))call SaveUnitHandle(XY,(MKI),(45),(UII))call SaveReal(XY,(MKI),(6),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(7),((GetUnitY(TLI))*1.0))call SaveGroupHandle(XY,(MKI),(22),(XII))set t=nullset g=nullendfunctionfunction KG5 takes nothing returns booleanif GetSpellAbilityId()==1093751607 thencall KF5()endifreturn falseendfunctionfunction TE1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function KG5))call RVI(1093687350)set t=nullendfunctionfunction KH5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))call FlushChildHashtable(XY,(MKI))call MZI(t)call IssueTargetOrder(TLI,"move",TMI)set t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction KZ5 takes nothing returns nothinglocal unit TLI=GetSummonedUnit()local unit TMI=GetSummoningUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerAddCondition(t,Condition(function KH5))call TriggerRegisterTimerEvent(t,0.2,false)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))set t=nullset TLI=nullset TMI=nullendfunctionfunction KV5 takes nothing returns booleanlocal integer id=GetUnitTypeId(GetSummonedUnit())if id==1865429322 or id==1865429323 or id==1865429324 or id==1865429325 thencall KZ5()endifreturn falseendfunctionfunction TF1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SUMMON)call TriggerAddCondition(t,Condition(function KV5))endfunctionfunction KW5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))if GetTriggerEventId()==EVENT_UNIT_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)elsecall SetUnitX(TLI,GetUnitX(TMI))call SetUnitY(TLI,GetUnitY(TMI))call SetUnitX(QHI,GetUnitX(TMI))call SetUnitY(QHI,GetUnitY(TMI))endifset t=nullset TLI=nullset TMI=nullset QHI=nullreturn falseendfunctionfunction KX5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))if GetTriggerEventId()==EVENT_UNIT_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenset X9I=GetEventDamageSource()endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction KY5 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetSummoningUnit()local unit TMI=GetSummonedUnit()local unit QHIlocal integer KJ5local integer KK5local integer KL5if GetUnitTypeId(TMI)==1852862003 or GetUnitTypeId(TMI)==1852862006 or GetUnitTypeId(TMI)==1848652080 thenset t=CreateTrigger()set MKI=GetHandleId(t)set QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TLI),GetUnitY(TLI),0)call TriggerRegisterTimerEvent(t,0.05,true)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function KW5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(19),(QHI))if CT1(TLI,1227899192)thencall UnitAddAbility(QHI,1093678153)endifendifif GetUnitAbilityLevel(TLI,1093747254)>0 thenif GetUnitTypeId(TMI)==1852862001 or GetUnitTypeId(TMI)==1852862004 or GetUnitTypeId(TMI)==1848652081 thenset KJ5=GetUnitAbilityLevel(TLI,1093684568)if KJ5>0 thencall QTI(TMI,1093684568)call SetUnitAbilityLevel(TMI,1093684568,KJ5)endifendifif GetUnitTypeId(TMI)==1852862002 or GetUnitTypeId(TMI)==1852862005 or GetUnitTypeId(TMI)==1848652082 thenset KL5=GetUnitAbilityLevel(TLI,1097032808)if KL5>0 thencall QTI(TMI,1097032808)call SetUnitAbilityLevel(TMI,1097032808,KL5)endifendifif GetUnitTypeId(TMI)==1852862003 or GetUnitTypeId(TMI)==1852862006 or GetUnitTypeId(TMI)==1848652080 thenset KK5=GetUnitAbilityLevel(TLI,1093678669)if KK5>0 thencall QTI(TMI,1093678669)call SetUnitAbilityLevel(TMI,1093678669,KK5)endifendifendifset t=nullset TLI=nullset TMI=nullset QHI=nullendfunctionfunction KM5 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetSummoningUnit()local unit TMI=GetSummonedUnit()local integer KJ5call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function KX5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))set t=nullset TLI=nullset TMI=nullendfunctionfunction KN5 takes nothing returns booleanlocal integer SVI=GetUnitTypeId(GetSummonedUnit())call KY5()if TXI(SVI)thencall KM5()endifreturn falseendfunctionfunction TG1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SUMMON)call TriggerAddCondition(t,Condition(function KN5))set t=nullendfunctionfunction KS5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer TRI=(LoadInteger(XY,(MKI),(30)))local unit TMI=M6I(TRI)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamageSource()==TLI and(GetEventDamage()>40 or IsUnitType(TMI,UNIT_TYPE_STRUCTURE)==true or GetUnitTypeId(TMI)==1970107511 or GetUnitTypeId(TMI)==1700946284)and(LoadBoolean(XY,(GetHandleId(TLI)),(183)))==true thencall SaveBoolean(XY,(GetHandleId(TLI)),(183),(false))call SaveReal(XY,(GetHandleId(TLI)),(184),(((TimerGetElapsed(M)))*1.0))call UnitRemoveAbility(TLI,1093818451)call UnitRemoveAbility(TLI,1093818453)call FlushChildHashtable(XY,(GetHandleId((LoadTriggerHandle(XY,(MKI),(35))))))call MZI((LoadTriggerHandle(XY,(MKI),(35))))call M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifelsecall M5I(TRI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction KT5 takes nothing returns booleanlocal trigger tlocal integer MKIlocal unit TMIlocal unit TLIif GetTriggerEventId()==EVENT_UNIT_DEATH thencall SaveBoolean(XY,(GetHandleId(GetTriggerUnit())),(183),(false))call SaveReal(XY,(GetHandleId(GetTriggerUnit())),(184),(((TimerGetElapsed(M)))*1.0))call UnitRemoveAbility(GetTriggerUnit(),1093818451)call UnitRemoveAbility(GetTriggerUnit(),1093818453)call FlushChildHashtable(XY,(GetHandleId(GetTriggeringTrigger())))call MZI(GetTriggeringTrigger())elseif GetAttacker()==(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(182)))thenif IsUnitAlly(GetAttacker(),GetOwningPlayer(GetTriggerUnit()))==false thenset t=CreateTrigger()set MKI=GetHandleId(t)set TMI=GetTriggerUnit()set TLI=GetAttacker()call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,2.5,false)call TriggerAddCondition(t,Condition(function KS5))call SaveInteger(XY,(MKI),(30),(M8I(TMI)))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveTriggerHandle(XY,(MKI),(35),(GetTriggeringTrigger()))set TMI=nullset TLI=nullset t=nullendifendifreturn falseendfunctionfunction KR5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local real POI=(TimerGetElapsed(M))local integer NGI=GetUnitAbilityLevel(N0I,1093684568)local real SE2=(LoadReal(XY,(GetHandleId(N0I)),(184)))local boolean KP5=(LoadBoolean(XY,(GetHandleId(N0I)),(183)))local real FNO=(LoadReal(XY,(MKI),(411)))if GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED and GetAttacker()==N0I thenset FNO=(TimerGetElapsed(M))call SaveReal(XY,(MKI),(411),((FNO)*1.0))endifif((TimerGetElapsed(M))>FNO+10)and KP5==false and GetUnitTypeId(N0I)==1315988077 and QPI(N0I)==false thencall SaveBoolean(XY,(GetHandleId(N0I)),(183),(true))set t=CreateTrigger()set MKI=GetHandleId(t)call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function KT5))call SaveUnitHandle(XY,(MKI),(182),(N0I))call QTI(N0I,1093818451)call QTI(N0I,1093818453)call SetPlayerAbilityAvailable(GetOwningPlayer(N0I),1093818451,false)elseif KP5==false and(GetUnitAbilityLevel(N0I,1093818451)>0 or GetUnitAbilityLevel(N0I,1093818453)>0)thencall UnitRemoveAbility(N0I,1093818451)call UnitRemoveAbility(N0I,1093818453)endifset t=nullset N0I=nullreturn falseendfunctionfunction KQ5 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.5,true)call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function KR5))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveInteger(XY,(MKI),(181),(0))call SaveReal(XY,(MKI),(411),(((TimerGetElapsed(M)))*1.0))set N0I=nullset t=nullendfunctionfunction KU5 takes nothing returns booleanif GetLearnedSkill()==1093684568 and GetUnitAbilityLevel(GetTriggerUnit(),1093684568)==1 and IsUnitIllusion(GetTriggerUnit())==false thencall KQ5()endifreturn falseendfunctionfunction TH1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function KU5))set t=nullendfunctionfunction L05 takes nothing returns nothingcall BQ1(XAI,GetEnumUnit(),0.75+0.25*GetUnitAbilityLevel(XAI,1093809990))endfunctionfunction LI5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real a=(LoadReal(XY,(MKI),(137)))local real P6I=(LoadReal(XY,(MKI),(47)))local real P7I=(LoadReal(XY,(MKI),(48)))local real P4I=(LoadReal(XY,(MKI),(189)))local real P5I=(LoadReal(XY,(MKI),(190)))local group glocal real d=PAI(P4I,P5I,P6I,P7I)/25local location llocal integer MFI=GetTriggerEvalCount(t)local real x=P4I+d*MFI*Cos(a)local real y=P5I+d*MFI*Sin(a)call SetUnitX(TMI,RCI(x))call SetUnitY(TMI,RGI(y))if T9I(TMI)==false thencall SetUnitFlyHeight(TMI,325-13*MFI,0)endifif MFI==25 thencall SetUnitX(TMI,RCI(P6I))call SetUnitY(TMI,RGI(P7I))if IsPointInRegion(XN,GetUnitX(TMI),GetUnitY(TMI))==true thenset l=AA1(GetUnitX(TMI),GetUnitY(TMI))call SetUnitX(TMI,REI(GetLocationX(l)))call SetUnitY(TMI,RHI(GetLocationY(l)))call RemoveLocation(l)set l=nullendifset CK=TLIset XAI=TLIset g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(TMI),GetUnitY(TMI),350,Condition(function AT1))call GroupRemoveUnit(g,TMI)call ForGroup(g,function L05)call MCI(g)call QEI(GetUnitX(TMI),GetUnitY(TMI),150)call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl",GetUnitX(TMI),GetUnitY(TMI)))call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call FlushChildHashtable(XY,(MKI))call MZI(t)if T9I(TMI)==false thencall SetUnitFlyHeight(TMI,GetUnitDefaultFlyHeight(TMI),0)endifcall SetUnitPathing(TMI,true)endifset t=nullset TLI=nullset TMI=nullset g=nullreturn falseendfunctionfunction L15 takes unit TLI,unit TMI,unit Target2,real LO5,real L25,effect FX,effect S02 returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real P6I=LO5local real P7I=L25local real a=PUI(GetUnitX(TMI),GetUnitY(TMI),LO5,L25)*bj_DEGTORADif PAI(GetUnitX(TMI),GetUnitY(TMI),LO5,L25)>375 thenset P6I=GetUnitX(TMI)+375*Cos(a)set P7I=GetUnitY(TMI)+375*Sin(a)endifcall SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveReal(XY,(MKI),(137),((a)*1.0))call SaveReal(XY,(MKI),(47),((P6I)*1.0))call SaveReal(XY,(MKI),(48),((P7I)*1.0))call SaveReal(XY,(MKI),(189),((GetUnitX(TMI))*1.0))call SaveReal(XY,(MKI),(190),((GetUnitY(TMI))*1.0))call SaveEffectHandle(XY,(MKI),(32),(FX))call SaveEffectHandle(XY,(MKI),(176),(S02))call TriggerRegisterTimerEvent(t,0.02,true)call TriggerAddCondition(t,Condition(function LI5))set t=nullendfunctionfunction L35 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer MFI=(LoadInteger(XY,(MKI),(34)))local integer JNO=(LoadInteger(XY,(MKI),(12)))local real P6I=(LoadReal(XY,(MKI),(47)))local real P7I=(LoadReal(XY,(MKI),(48)))local integer L45=(LoadInteger(XY,(MKI),(706)))local real aif GetTriggerEventId()==EVENT_WIDGET_DEATH or(GetTriggerEventId()!=EVENT_UNIT_SPELL_EFFECT and AI1(TMI)==false)thencall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093809990,true)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093810008,false)call L15(TLI,TMI,(LoadUnitHandle(XY,(MKI),(711))),P6I,P7I,(LoadEffectHandle(XY,(MKI),(32))),(LoadEffectHandle(XY,(MKI),(176))))call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT thenif GetSpellAbilityId()==1093810008 thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))set a=PUI(GetUnitX(TMI),GetUnitY(TMI),GetSpellTargetX(),GetSpellTargetY())*bj_DEGTORADif PAI(GetUnitX(TMI),GetUnitY(TMI),GetSpellTargetX(),GetSpellTargetY())>375 thenset P6I=GetUnitX(TMI)+375*Cos(a)set P7I=GetUnitY(TMI)+375*Sin(a)elseset P6I=GetSpellTargetX()set P7I=GetSpellTargetY()endifcall SaveEffectHandle(XY,(MKI),(176),(AddSpecialEffect("Abilities\\Spells\\Other\\GeneralAuraTarget\\GeneralAuraTarget.mdl",P6I,P7I)))call SaveReal(XY,(MKI),(47),((P6I)*1.0))call SaveReal(XY,(MKI),(48),((P7I)*1.0))call SaveUnitHandle(XY,(MKI),(711),(GetSpellTargetUnit()))call SaveEffectHandle(XY,(MKI),(176),(AddSpecialEffectTarget("Abilities\\Spells\\Other\\GeneralAuraTarget\\GeneralAuraTarget.mdl",GetSpellTargetUnit(),"origin")))endifelseset MFI=MFI+1call SaveInteger(XY,(MKI),(34),(MFI))call SetUnitPathing(TMI,false)if(LoadInteger(XY,(MKI),(707)))==1 thenset L45=L45+3elseset L45=L45-3endifcall SaveInteger(XY,(MKI),(706),(L45))if L45==30 thencall SaveInteger(XY,(MKI),(707),(-1))elseif L45==-30 thencall SaveInteger(XY,(MKI),(707),(1))endifif T9I(TMI)==false thenif MFI<15 thencall SetUnitFlyHeight(TMI,MFI*20,0)elsecall SetUnitFlyHeight(TMI,300+L45,0)endifendifif MFI>(JNO-25)thenif T9I(TMI)==false thencall SetUnitFlyHeight(TMI,300,0)endifcall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093809990,true)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093810008,false)call L15(TLI,TMI,(LoadUnitHandle(XY,(MKI),(711))),P6I,P7I,(LoadEffectHandle(XY,(MKI),(32))),(LoadEffectHandle(XY,(MKI),(176))))call FlushChildHashtable(XY,(MKI))call MZI(t)endifendifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction L55 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer NGI=GetUnitAbilityLevel(TLI,1093809990)local unit QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call UnitAddAbility(QHI,1093810226)call SetUnitAbilityLevel(QHI,1093810226,NGI)call IssueTargetOrder(QHI,"thunderbolt",TMI)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093809990,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093810008,true)call UnitAddAbility(TLI,1093810008)call SetUnitPathing(TMI,false)if T9I(TMI)==false thencall QTI(TMI,1097691750)call UnitRemoveAbility(TMI,1097691750)endifcall SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(711),(TMI))call SaveInteger(XY,(MKI),(12),(R2I((1.25+0.25*NGI)/.02)))call SaveInteger(XY,(MKI),(34),(0))call SaveInteger(XY,(MKI),(706),(0))call SaveInteger(XY,(MKI),(707),(1))call SaveReal(XY,(MKI),(47),((GetUnitX(TMI))*1.0))call SaveReal(XY,(MKI),(48),((GetUnitY(TMI))*1.0))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("war3mapImported\\AntiGravityTarget.mdx",TMI,"origin")))call SaveEffectHandle(XY,(MKI),(176),(AddSpecialEffect("Abilities\\Spells\\Other\\GeneralAuraTarget\\GeneralAuraTarget.mdl",GetUnitX(TMI),GetUnitY(TMI))))call TriggerRegisterTimerEvent(t,0.02,true)call TriggerRegisterDeathEvent(t,TMI)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function L35))set TLI=nullset TMI=nullendfunctionfunction L65 takes nothing returns booleanif GetSpellAbilityId()==1093809990 and MBI(GetSpellTargetUnit())==false thencall L55()endifreturn falseendfunctionfunction TZ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function L65))call RVI(1093687350)call RVI(1093810226)set t=nullendfunctionfunction L75 takes unit TLI,unit TMI returns nothinglocal integer NGI=GetUnitAbilityLevel(TLI,1093809991)if IsUnitType(TMI,UNIT_TYPE_HERO)==true thenif NGI==1 thencall O11(TMI,1093810007,1,10)elseif NGI==2 thencall O11(TMI,1093810230,1,10)elseif NGI==3 thencall O11(TMI,1093810229,1,10)elseif NGI==4 thencall O11(TMI,1093810231,1,10)endifelseif NGI==1 thencall O11(TMI,1093810481,1,10)elseif NGI==2 thencall O11(TMI,1093810266,1,10)elseif NGI==3 thencall O11(TMI,1093810482,1,10)elseif NGI==4 thencall O11(TMI,1093810480,1,10)endifendifcall QWI(PF,GetUnitX(TMI),GetUnitY(TMI))endfunctionfunction L85 takes nothing returns nothinglocal real dif IsUnitInGroup(GetEnumUnit(),XDI)==false thenset d=P8I(GetEnumUnit(),XCI)if d<XEI thenset XEI=dset XBI=GetEnumUnit()endifendifendfunctionfunction L95 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local group SP2=(LoadGroupHandle(XY,(MKI),(187)))local real x=GetUnitX(TMI)local real y=GetUnitY(TMI)local group g=MDI()call GroupAddUnit(SP2,TMI)call L75(TLI,TMI)set CK=TLIset XBI=nullset XCI=TMIset XDI=SP2set XEI=999999call GroupEnumUnitsInRange(g,x,y,440+25,Condition(function B01))call ForGroup(g,function L85)call MCI(g)if XBI==null or GetTriggerEvalCount(t)>26 thencall MCI(SP2)call FlushChildHashtable(XY,(MKI))call MZI(t)elseset TMI=XBIcall SaveUnitHandle(XY,(MKI),(17),(TMI))endifset g=nullset t=nullset TLI=nullset TMI=nullset SP2=nullreturn falseendfunctionfunction LA5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local group SP2=MDI()local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TLI),GetUnitY(TLI),GetUnitFacing(TLI))call QWI(PF,GetUnitX(TLI),GetUnitY(TLI))call QTI(QHI,1093810228)call SetUnitAbilityLevel(QHI,1093810228,GetUnitAbilityLevel(TLI,1093809991))call IssueTargetOrder(QHI,"chainlightning",TMI)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveGroupHandle(XY,(MKI),(187),(SP2))call TriggerRegisterTimerEvent(t,0.25,true)call TriggerAddCondition(t,Condition(function L95))set TLI=nullset TMI=nullset t=nullset QHI=nullendfunctionfunction LB5 takes nothing returns booleanif GetSpellAbilityId()==1093809991 and MBI(GetSpellTargetUnit())==false thencall LA5()endifreturn falseendfunctionfunction TV1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function LB5))set t=nullendfunctionfunction LC5 takes nothing returns booleanif IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),GetLearnedSkill())==1 thenif GetLearnedSkill()==1093809990 thencall UnitRemoveAbility(GetTriggerUnit(),1093809993)elseif GetLearnedSkill()==1093809991 thencall UnitRemoveAbility(GetTriggerUnit(),1093809995)elseif GetLearnedSkill()==1093810006 thencall UnitRemoveAbility(GetTriggerUnit(),1093809994)endifendifreturn falseendfunctionfunction LD5 takes integer LE5,integer LF5 returns nothingset XHI[XVI]=LE5set XZI[XVI]=LF5set XVI=XVI+1endfunctionfunction LG5 takes integer id returns integerlocal integer i=0loopexitwhen i==XVIif id==XHI[i]or id==XZI[i]thenreturn iendifset i=i+1endloopreturn-1endfunctionfunction LH5 takes integer id returns nothingset XFI[XGI]=idset XGI=XGI+1endfunctionfunction LZ5 takes integer id returns booleanlocal integer i=0loopexitwhen i==XGIif id==XFI[i]thenreturn trueendifset i=i+1endloopreturn falseendfunctionfunction LV5 takes nothing returns booleanif IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==true and LZ5(GetSpellAbilityId())==false thencall SaveInteger(XY,(GetHandleId(GetTriggerUnit())),(705),(GetSpellAbilityId()))call SaveInteger(XY,(GetHandleId(GetTriggerUnit())),(712),(GetUnitAbilityLevel(GetTriggerUnit(),GetSpellAbilityId())))endifreturn falseendfunctionfunction LW5 takes unit u returns nothingcall UnitRemoveAbility(u,1093743428)call UnitRemoveAbility(u,1093815881)call UnitRemoveAbility(u,1093751126)call UnitRemoveAbility(u,1093751893)call UnitRemoveAbility(u,1093809217)call UnitRemoveAbility(u,1093809218)call UnitRemoveAbility(u,1093750344)call UnitRemoveAbility(u,1093808206)call UnitRemoveAbility(u,1093753394)call UnitRemoveAbility(u,1093753395)call UnitRemoveAbility(u,1093808181)call UnitRemoveAbility(u,1093752405)call UnitRemoveAbility(u,1093683011)call UnitRemoveAbility(u,1093809221)call UnitRemoveAbility(u,1093685844)call UnitRemoveAbility(u,1093751361)call UnitRemoveAbility(u,1093683265)call UnitRemoveAbility(u,1093686081)call UnitRemoveAbility(u,1093743153)call UnitRemoveAbility(u,1093752646)call UnitRemoveAbility(u,1093677652)call UnitRemoveAbility(u,1093751609)call UnitRemoveAbility(u,1093808456)call UnitRemoveAbility(u,1093750094)call UnitRemoveAbility(u,1093678667)call UnitRemoveAbility(u,1093684805)call UnitRemoveAbility(u,1093684560)call UnitRemoveAbility(u,1093815618)endfunctionfunction LX5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer LY5=(LoadInteger(XY,(MKI),(704)))local integer GK4=(LoadInteger(XY,(MKI),(713)))if LY5==(LoadInteger(XY,(GetHandleId(TLI)),(704)))thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEvalCount(t)>(15-GK4)and QPI(TLI)==false thencall UnitRemoveAbility(TLI,LY5)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullreturn falseendfunctionfunction LJ5 takes unit TLI,integer LY5,real FNO returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function LX5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(704),(LY5))call SaveInteger(XY,(GetHandleId(TLI)),(704),(-1))call SaveInteger(XY,(MKI),(713),(R2I((TimerGetElapsed(M))-FNO)))set t=nullendfunctionfunction LK5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer LY5=(LoadInteger(XY,(MKI),(704)))local integer MFI=(LoadInteger(XY,(MKI),(34)))local integer NGI=GetUnitAbilityLevel(TLI,1093809992)local real FNO=(LoadReal(XY,(MKI),(411)))if NGI==0 thenset NGI=GetUnitAbilityLevel(TLI,1093817913)endifif GetTriggerEventId()!=EVENT_UNIT_SPELL_EFFECT and GetTriggerEventId()!=EVENT_WIDGET_DEATH thenif MFI==0 thencall SaveInteger(XY,(MKI),(34),(1))call DisplayTimedTextToPlayer(GetOwningPlayer(TLI),0,0,10,"|c00ff0303"+GetObjectName(1848659031)+"|r")elsecall LW5(TLI)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),LY5,false)call FlushChildHashtable(XY,(MKI))call MZI(t)call LJ5(TLI,LY5,FNO)endifelseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT thenif GetSpellAbilityId()==1093809992 or GetSpellAbilityId()==1093817913 thencall LW5(TLI)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),LY5,false)call FlushChildHashtable(XY,(MKI))call MZI(t)call LJ5(TLI,LY5,FNO)elseif GetSpellAbilityId()==LY5 thencall SaveReal(XY,(MKI),(411),(((TimerGetElapsed(M)))*1.0))endifelseif GetTriggerEventId()==EVENT_WIDGET_DEATH thencall LW5(TLI)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),LY5,false)call FlushChildHashtable(XY,(MKI))call MZI(t)call LJ5(TLI,LY5,FNO)endifset t=nullset TLI=nullreturn falseendfunctionfunction LL5 takes nothing returns nothinglocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer LY5=(LoadInteger(XY,(MKI),(704)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local real LM5=60*(2+GetUnitAbilityLevel(TLI,1093809992))if GetUnitAbilityLevel(TLI,1093809992)==0 thenset LM5=60*(2+GetUnitAbilityLevel(TLI,1093817913))endifif(LoadInteger(XY,(GetHandleId(TMI)),(3000)))>0 thencall SaveInteger(XY,(GetHandleId(TLI)),(3000),((LoadInteger(XY,(GetHandleId(TMI)),(3000)))))endifif(LoadInteger(XY,(GetHandleId(TMI)),(3001)))>0 thencall SaveInteger(XY,(GetHandleId(TLI)),(3001),((LoadInteger(XY,(GetHandleId(TMI)),(3001)))))endifif(LoadInteger(XY,(GetHandleId(TMI)),(3002)))>0 thencall SaveInteger(XY,(GetHandleId(TLI)),(3002),((LoadInteger(XY,(GetHandleId(TMI)),(3002)))))endifif(LoadInteger(XY,(GetHandleId(TMI)),(710)))>0 thencall SaveInteger(XY,(GetHandleId(TLI)),(710),((LoadInteger(XY,(GetHandleId(TMI)),(710)))))endifcall QWI(SF,GetUnitX(TLI),GetUnitY(TLI))call Q5I(GetObjectName(LY5),3.5,TLI,0.024,170,0,255,216)call SaveInteger(XY,(GetHandleId(TLI)),(704),(LY5))call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),LY5,true)call QTI(TLI,LY5)call SetUnitAbilityLevel(TLI,LY5,NGI)set t=CreateTrigger()set MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(34),(0))call SaveInteger(XY,(MKI),(704),(LY5))call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)call TriggerRegisterTimerEvent(t,LM5,false)call TriggerRegisterDeathEvent(t,TLI)call TriggerRegisterTimerEvent(t,LM5-20,false)call TriggerAddCondition(t,Condition(function LK5))set t=nullset TLI=nullset TMI=nullendfunctionfunction LN5 takes unit TLI,unit TMI,integer LY5,integer NGI returns nothinglocal trigger t=U6I(TMI,TLI,1747993666,"LL5",900,false)local integer MKI=GetHandleId(t)call QWI(NF,GetUnitX(TMI),GetUnitY(TMI))call Q5I(GetObjectName(LY5),3.75,TMI,0.024,170,0,255,216)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(704),(LY5))call SaveInteger(XY,(MKI),(5),(NGI))set t=nullendfunctionfunction LS5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT thenif LZ5(GetSpellAbilityId())==true thenelsecall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)endifelsecall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction LT5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer LR5local integer LP5=(LoadInteger(XY,(GetHandleId(TMI)),(705)))if LP5!=0 thencall DestroyEffect(AddSpecialEffectTarget("war3mapImported\\Nebula.mdx",TMI,"origin"))set LR5=LG5(LP5)if LR5!=-1 thenif GetSpellAbilityId()==1093809992 thenset LP5=XHI[LR5]elseset LP5=XZI[LR5]endifendifcall LN5(TLI,TMI,LP5,(LoadInteger(XY,(GetHandleId(TMI)),(712))))endifset TLI=nullset TMI=nullendfunctionfunction SpellSteal takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local string fx=""if IsPlayerAlly(GetOwningPlayer(TLI),GetLocalPlayer())or TGI(GetLocalPlayer())thenset fx="war3mapImported\\Nebula.mdx"endifcall SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget(fx,TMI,"origin")))call TriggerRegisterTimerEvent(t,20,false)call TriggerRegisterDeathEvent(t,TMI)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function LS5))set TLI=nullset TMI=nullendfunctionfunction LQ5 takes nothing returns booleanif(GetSpellAbilityId()==1093809992 or GetSpellAbilityId()==1093817913)and MBI(GetSpellTargetUnit())==false thencall LT5()endifreturn falseendfunctionfunction LU5 takes nothing returns nothingcall LH5(1093752648)call LH5(1095656306)call LH5(1093677895)call LH5(1093679411)call LH5(1093743946)call LH5(1093681479)call LH5(1093681733)call LH5(1093751896)call LH5(1093808697)call LH5(1093751369)call LH5(1093747504)call LH5(1093742932)call LH5(1093744986)call LH5(1093815877)call LH5(1093743428)call LH5(1093815881)call LH5(1093751126)call LH5(1093751893)call LH5(1093809217)call LH5(1093809218)call LH5(1093750344)call LH5(1093808206)call LH5(1093753394)call LH5(1093753395)call LH5(1093808181)call LH5(1093752405)call LH5(1093683011)call LH5(1093809221)call LH5(1093685844)call LH5(1093751361)call LH5(1093683265)call LH5(1093686081)call LH5(1093743153)call LH5(1093752646)call LH5(1093677652)call LH5(1093751609)call LH5(1093808456)call LH5(1093750094)call LH5(1093684056)call LH5(1093684055)call LH5(1093681461)call LH5(1093681735)call LH5(1093808471)call LH5(1093808472)call LH5(1093808470)call LH5(1093808473)call LH5(1093748565)call LH5(1093752392)call LH5(1093752391)call LH5(1093815600)call LH5(1093815618)call LH5(1093816114)call LH5(1093816121)call LH5(1093685582)call LH5(1093677622)call LH5(1095263841)call LH5(1093679446)call LH5(1093682265)call LH5(1093752642)call LH5(1093684314)call LH5(1093685065)call LH5(1093817677)call LH5(1093750337)call LH5(1093748033)call LH5(1093684819)call LH5(1093747777)call LH5(1093810257)call LH5(1093687121)call LH5(1093751864)call LH5(1093742674)call LH5(1093742926)call LH5(1093682521)call LH5(1093682760)call LH5(1093686859)call LH5(1093686865)call LH5(1093678899)call LH5(1093677898)call LH5(1093678154)call LH5(1093678157)call LH5(1093678158)call LH5(1093809990)call LH5(1093810008)call LH5(1093809991)call LH5(1093809992)call LH5(1093685557)call LH5(1093686347)call LH5(1095328363)call LH5(1093683801)call LH5(1093747011)call LH5(1095331948)call LH5(1095331954)call LH5(1097163124)call LH5(1093684016)call LH5(1093683255)call LH5(1093683254)call LH5(1093682767)call LH5(1093677656)call LH5(1095332727)call LH5(1095332962)call LH5(1093681718)call LH5(1093751349)call LH5(1093808182)call LH5(1093748292)call LH5(1093748303)call LH5(1093748305)call LH5(1093749071)call LH5(1093681720)call LH5(1093752645)call LH5(1093686328)call LH5(1093686327)call LH5(1093677367)call LH5(1093751108)call LH5(1093748304)call LH5(1093683788)call LH5(1094935400)call LH5(1095333995)call LH5(1095331943)call LH5(1093742918)call LH5(1093742917)call LH5(1093686067)call LH5(1093742916)call LH5(1093742919)call LH5(1093742920)call LH5(1093686329)call LH5(1093743959)call LH5(1094936696)call LH5(1093682756)call LH5(1093686341)call LH5(1093751863)call LH5(1093744973)call LH5(1093677647)call LH5(1093679193)call LH5(1093679194)call LH5(1093679408)call LH5(1093679410)call LH5(1093683266)call LH5(1093682227)call LH5(1093682246)call LH5(1093677655)call LH5(1093681995)call LH5(1093684023)call LH5(1093683796)call LH5(1095328865)call LH5(1093809721)call LH5(1093752655)call LH5(1093748055)call LH5(1093750095)call LH5(1093753417)call LH5(1093753416)call LH5(1093753431)call LH5(1093808945)call LH5(1093743191)call LH5(1093743681)call LH5(1093751096)call LH5(1093810265)call LH5(1093810244)call LH5(1093810246)call LH5(1093815857)call LH5(1093817925)call LH5(1093818184)call LH5(1093818185)call LH5(1093814863)call LH5(1093814865)call LH5(1093814864)call LH5(1093814866)call LH5(1093814860)call LH5(1093813848)call LH5(1093815089)call LH5(1093815092)call LH5(1093815095)call LH5(1093815111)call LH5(1093815109)call LH5(1093815112)call LH5(1093815097)call LH5(1093813569)call LH5(1093817416)call LH5(1093817418)call LH5(1093817419)call LH5(1093815369)call LD5(1093752632,1093752633)call LD5(1093808454,1093808455)call LD5(1093678420,1093679176)call LD5(1093677392,1093679450)call LD5(1093679413,1093679447)call LD5(1093684565,1093681458)call LD5(1093678388,1093677141)call LD5(1093678647,1093679184)call LD5(1093681987,1093677658)call LD5(1093810258,1093810259)call LD5(1093677128,1093681457)call LD5(1093677906,1093681494)call LD5(1093677363,1093681462)call LD5(1093684820,1093684824)call LD5(1093810503,1093810504)call LD5(1093678160,1093747029)call LD5(1093687864,1093747542)call LD5(1093683534,1093747031)call LD5(1093684529,1093747032)call LD5(1093677903,1093747033)call LD5(1093684308,1093747539)call LD5(1093677899,1093747248)call LD5(1093685045,1093747249)call LD5(1093678674,1093747252)call LD5(1093685586,1093747251)call LD5(1093808473,1093748565)call LD5(1093677401,1093747034)call LD5(1093684561,1093747254)call LD5(1093682764,1093747544)call LD5(1093743184,1093747766)call LD5(1093683761,1093747767)call LD5(1093682996,1093747768)call LD5(1093677649,1093747769)call LD5(1093684819,1093747777)call LD5(1093742673,1093747778)call LD5(1093681483,1093748313)call LD5(1093682482,1093750098)call LD5(1093744975,1093750102)call LD5(1093682248,1093750594)call LD5(1093686072,1093751120)call LD5(1395667000,1395667029)call LD5(1093747023,1093752150)call LD5(1093679152,1093752154)call LD5(1093685067,1093752407)call LD5(1093682265,1093752642)call LD5(1093685579,1093808465)call LD5(1093751861,1093808949)call LD5(1093684567,1093809987)call LD5(1093685042,1093810233)call LD5(1093750341,1093814599)call LD5(1093684275,1093816643)call LD5(1093750089,1093816645)call LD5(1093682514,1093817144)call LD5(1093812807,1093817429)call LD5(1093747288,1093817432)call LD5(1093809992,1093817913)call LD5(1093752118,1093817912)call LD5(1093678137,1093818178)call LD5(1093678405,1093818177)endfunctionfunction TW1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function LQ5))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function LV5))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function LC5))set t=nullcall LU5()endfunctionfunction M05 takes nothing returns nothingif A61(GetEnumUnit())thenreturnendifif GetUnitAbilityLevel(GetEnumUnit(),1093810003)>0 thencall UnitRemoveAbility(GetEnumUnit(),1093810003)endifif GetUnitAbilityLevel(GetEnumUnit(),1093810001)>0 thencall UnitRemoveAbility(GetEnumUnit(),1093810001)endifif GetUnitAbilityLevel(GetEnumUnit(),1093810002)>0 thencall UnitRemoveAbility(GetEnumUnit(),1093810002)endifif GetUnitAbilityLevel(GetEnumUnit(),1093810004)>0 thencall UnitRemoveAbility(GetEnumUnit(),1093810004)endifendfunctionfunction MI5 takes nothing returns nothingif A61(GetEnumUnit())thenreturnendifif XWI==1 thenif GetUnitAbilityLevel(GetEnumUnit(),1093810003)==0 thencall QTI(GetEnumUnit(),1093810003)call SetPlayerAbilityAvailable(GetOwningPlayer(GetEnumUnit()),1093810003,false)endifelseif XWI==2 thenif GetUnitAbilityLevel(GetEnumUnit(),1093810001)==0 thencall UnitRemoveAbility(GetEnumUnit(),1093810003)call QTI(GetEnumUnit(),1093810001)call SetPlayerAbilityAvailable(GetOwningPlayer(GetEnumUnit()),1093810001,false)endifelseif XWI==3 thenif GetUnitAbilityLevel(GetEnumUnit(),1093810002)==0 thencall UnitRemoveAbility(GetEnumUnit(),1093810003)call UnitRemoveAbility(GetEnumUnit(),1093810001)call QTI(GetEnumUnit(),1093810002)call SetPlayerAbilityAvailable(GetOwningPlayer(GetEnumUnit()),1093810002,false)endifelseif XWI==4 thenif GetUnitAbilityLevel(GetEnumUnit(),1093810004)==0 thencall UnitRemoveAbility(GetEnumUnit(),1093810003)call UnitRemoveAbility(GetEnumUnit(),1093810001)call UnitRemoveAbility(GetEnumUnit(),1093810002)call QTI(GetEnumUnit(),1093810004)call SetPlayerAbilityAvailable(GetOwningPlayer(GetEnumUnit()),1093810004,false)endifendifendfunctionfunction M15 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local group M93=(LoadGroupHandle(XY,(MKI),(340)))local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)local group g=MDI()if TLI==null or GetUnitTypeId(TLI)!=1160786520 thencall FlushChildHashtable(XY,(MKI))call MZI(t)call ForGroup(M93,function M05)call MCI(M93)call MCI(g)return falseendifset CK=TLIset XWI=GetUnitAbilityLevel(TLI,1093810006)if QPI(TLI)==false thencall GroupEnumUnitsInRange(g,x,y,925,Condition(function BG1))endifcall GroupRemoveGroup(g,M93)call ForGroup(M93,function M05)if QPI(TLI)==false thencall ForGroup(g,function MI5)endifcall SaveGroupHandle(XY,(MKI),(340),(g))call MCI(M93)set t=nullset TLI=nullset M93=nullset g=nullreturn falseendfunctionfunction MO5 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local integer ilocal player pcall TriggerRegisterTimerEvent(t,0.3,true)call TriggerAddCondition(t,Condition(function M15))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveGroupHandle(XY,(MKI),(340),(MDI()))set i=0loopexitwhen i>5set p=BO[i]call SetPlayerAbilityAvailable(p,1093810003,false)call SetPlayerAbilityAvailable(p,1093810001,false)call SetPlayerAbilityAvailable(p,1093810002,false)call SetPlayerAbilityAvailable(p,1093810004,false)set p=CO[i]call SetPlayerAbilityAvailable(p,1093810003,false)call SetPlayerAbilityAvailable(p,1093810001,false)call SetPlayerAbilityAvailable(p,1093810002,false)call SetPlayerAbilityAvailable(p,1093810004,false)set i=i+1endloopset t=nullset TLI=nullendfunctionfunction M25 takes nothing returns booleanif GetLearnedSkill()==1093810006 and GetUnitAbilityLevel(GetTriggerUnit(),1093810006)==1 and IsUnitIllusion(GetTriggerUnit())==false thencall MO5()endifreturn falseendfunctionfunction TX1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function M25))set t=nullendfunctionfunction M35 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))call AddUnitAnimationProperties(TLI,"alternate",false)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullreturn falseendfunctionfunction M45 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function M35))call SaveUnitHandle(XY,(MKI),(2),(TLI))set t=nullset TLI=nullendfunctionfunction M55 takes nothing returns booleanif(GetSpellAbilityId()==1093678899 or GetSpellAbilityId()==1093677898 or GetSpellAbilityId()==1093678154 or GetSpellAbilityId()==1093678157 or GetSpellAbilityId()==1093678158)and GetUnitTypeId(GetTriggerUnit())==1160786520 thencall M45()endifreturn falseendfunctionfunction TY1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function M55))set t=nullendfunctionfunction M65 takes nothing returns nothingcall DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl",GetTriggerUnit(),"origin"))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl",GetTriggerUnit(),"origin"))endfunctionfunction M75 takes nothing returns booleanif GetUnitTypeId(GetTriggerUnit())==1211117651 thencall M65()endifreturn falseendfunctionfunction MQ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_DEATH)call TriggerAddCondition(t,Condition(function M75))set t=nullendfunctionfunction M85 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=GetUnitAbilityLevel(TLI,1093810518)if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT thenif GetSpellAbilityId()==1093810519 thencall UnitRemoveAbility(TLI,1093810519)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093810519,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093810518,true)call DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call FlushChildHashtable(XY,(MKI))call MZI(t)call BQ1(TLI,TMI,0.5+0.5*NGI)call SetUnitX(TLI,GetUnitX(TMI))call SetUnitY(TLI,GetUnitY(TMI))call IssueTargetOrder(TLI,"attack",TMI)call UnitShareVision(TMI,GetOwningPlayer(TLI),false)endifelsecall UnitRemoveAbility(TLI,1093810519)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093810519,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093810518,true)call DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call UnitShareVision(TMI,GetOwningPlayer(TLI),false)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullreturn falseendfunctionfunction M95 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if GetTriggerEvalCount(GetTriggeringTrigger())>30 thencall FlushChildHashtable(XY,(MKI))call MZI(t)elsecall CW1(TLI)endifset t=nullset TLI=nullreturn falseendfunctionfunction MA5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMIlocal integer MFI=(LoadInteger(XY,(MKI),(34)))local integer NGI=GetUnitAbilityLevel(TLI,1093810518)if MFI>60 thencall UnitRemoveAbility(TLI,1110459734)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamage()>100 and IsUnitType(GetEventDamageSource(),UNIT_TYPE_STRUCTURE)==false thencall PII(TLI,GetEventDamage())set TMI=K1[GetPlayerId(GetOwningPlayer(GetEventDamageSource()))]call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call CW1(TLI)call FlushChildHashtable(XY,(MKI))call MZI(t)if QPI(TMI)==false thencall UnitShareVision(TMI,GetOwningPlayer(TLI),true)call QTI(TLI,1093810519)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093810519,true)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093810518,false)set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)call TriggerRegisterTimerEvent(t,4,false)call TriggerAddCondition(t,Condition(function M85))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveEffectHandle(XY,(MKI),(175),(AddSpecialEffectTarget("war3mapImported\\RetaliationTarget.mdx",TLI,"origin")))call SaveEffectHandle(XY,(MKI),(176),(AddSpecialEffectTarget("war3mapImported\\RetaliationTarget.mdx",TMI,"origin")))set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.1,true)call TriggerAddCondition(t,Condition(function M95))call SaveUnitHandle(XY,(MKI),(2),(TLI))endifendifelsecall SaveInteger(XY,(MKI),(34),(MFI+1))endifset t=nullset TLI=nullreturn falseendfunctionfunction MB5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.05,true)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function MA5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(34),(0))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("war3mapImported\\RetaliationShield.mdx",TLI,"chest")))set TLI=nullset t=nullendfunctionfunction MC5 takes nothing returns booleanif GetSpellAbilityId()==1093810518 thencall MB5()endifreturn falseendfunctionfunction Register_Retaliation takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function MC5))set t=nullendfunctionfunction MD5 takes nothing returns nothingcall DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\ImmolationRed\\ImmolationRedDamage.mdl",GetEnumUnit(),"chest"))call TKI(XXI,GetEnumUnit(),1,(20+10*XYI)/5)endfunctionfunction ME5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer NGI=GetUnitAbilityLevel(TLI,1093814355)local group gif GetUnitAbilityLevel(TLI,1110459984)==0 and GetUnitAbilityLevel(TLI,1110459985)==0 thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)call UnitRemoveAbility(TLI,1093814327)call UnitRemoveAbility(TLI,1110459983)call UnitRemoveAbility(TLI,1093814616)call UnitRemoveAbility(TLI,1093814615)call UnitRemoveAbility(TLI,1093814614)call UnitRemoveAbility(TLI,1093814617)elseset CK=TLIset XXI=TLIset XYI=NGIset g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),400+25,Condition(function AT1))call ForGroup(g,function MD5)call MCI(g)endifset g=nullset t=nullset TLI=nullreturn falseendfunctionfunction MF5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TLI),GetUnitY(TLI),0)local integer NGI=GetUnitAbilityLevel(TLI,1093814355)call UnitAddAbility(QHI,1093814325)call SetUnitAbilityLevel(QHI,1093814325,NGI)call IssueTargetOrder(QHI,"antimagicshell",TLI)call TriggerRegisterTimerEvent(t,0.2,true)call TriggerAddCondition(t,Condition(function ME5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("war3mapImported\\FlameGuard.mdx",TLI,"origin")))if NGI==1 thenelseif NGI==2 thenelseif NGI==3 thenelseif NGI==4 thenendifset TLI=nullset QHI=nullset t=nullendfunctionfunction MG5 takes nothing returns booleanif GetSpellAbilityId()==1093814355 thencall MF5()endifreturn falseendfunctionfunction TK1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function MG5))set t=nullendfunctionfunction MH5 takes unit TLI returns nothingcall UnitRemoveAbility(TLI,1112500344)call UnitRemoveAbility(TLI,1110454344)endfunctionfunction MZ5 takes unit TLI returns nothingcall UnitRemoveAbility(TLI,1093814329)call UnitRemoveAbility(TLI,1110459981)endfunctionfunction MV5 takes unit TLI returns nothingcall UnitRemoveAbility(TLI,1093814856)call UnitRemoveAbility(TLI,1093814855)call UnitRemoveAbility(TLI,1093814858)call UnitRemoveAbility(TLI,1093814857)call UnitRemoveAbility(TLI,1110459980)endfunctionfunction MW5 takes unit TLI returns nothingcall QTI(TLI,1093814329)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093814329,false)endfunctionfunction MX5 takes unit TLI returns nothinglocal integer NGI=GetUnitAbilityLevel(TLI,1093814320)if NGI==1 thencall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093814856,false)call QTI(TLI,1093814856)elseif NGI==2 thencall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093814855,false)call QTI(TLI,1093814855)elseif NGI==3 thencall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093814858,false)call QTI(TLI,1093814858)elseif NGI==4 thencall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093814857,false)call QTI(TLI,1093814857)endifendfunctionfunction MY5 takes unit TLI,unit TMI returns nothinglocal real a=GetRandomReal(0,360)local real x=GetUnitX(TMI)+50*Cos(a*bj_DEGTORAD)local real y=GetUnitY(TMI)+50*Sin(a*bj_DEGTORAD)call SetUnitPosition(TLI,x,y)call SetUnitFacing(TLI,bj_RADTODEG*Atan2(GetUnitY(TMI)-GetUnitY(TLI),GetUnitX(TMI)-GetUnitX(TLI)))call SetUnitAnimation(TLI,"Attack")call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\Fire_Blink_2.mdx",TLI,"chest"))call MV5(TLI)if IsUnitType(TMI,UNIT_TYPE_HERO)==true or IsUnitIllusion(TMI)==true thencall MX5(TLI)call UnitRemoveAbility(TLI,1093814854)elsecall QTI(TLI,1093814854)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093814854,false)endifcall IssueTargetOrder(TLI,"attack",TMI)endfunctionfunction MJ5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local real P4I=(LoadReal(XY,(MKI),(189)))local real P5I=(LoadReal(XY,(MKI),(190)))local group SP2=(LoadGroupHandle(XY,(MKI),(187)))local group g=(LoadGroupHandle(XY,(MKI),(22)))local unit TMI=nulllocal boolean E31=falselocal fogmodifier QYI=(LoadFogModifierHandle(XY,(MKI),(42)))local integer NGI=GetUnitAbilityLevel(TLI,1093814320)loopexitwhen FirstOfGroup(g)==null or E31set TMI=FirstOfGroup(g)call GroupRemoveUnit(g,TMI)if IsUnitInGroup(TMI,SP2)and TMI!=null thenset TMI=nullset E31=falseelseset E31=trueendifendloopcall SetUnitPathing(TLI,false)call SetUnitInvulnerable(TLI,true)call A01(TLI)if E31==false or((LoadInteger(XY,(GetHandleId((TLI))),((4319))))==1)==true thencall SaveInteger(XY,(GetHandleId((TLI))),((4318)),(2))call MZ5(TLI)call UnitRemoveAbility(TLI,1093814854)call MV5(TLI)call A01(TLI)call MH5(TLI)call UnitAddAbility(TLI,1093814322)call UnitRemoveAbility(TLI,1093814322)call A01(TLI)if((LoadInteger(XY,(GetHandleId((TLI))),((4319))))==1)==false thencall SetUnitX(TLI,P4I)call SetUnitY(TLI,P5I)endifcall SetUnitVertexColor(TLI,255,255,255,255)call SetUnitPathing(TLI,true)call SetUnitInvulnerable(TLI,false)call SetUnitTimeScale(TLI,1)call MCI(SP2)call MCI(g)call RemoveUnit((LoadUnitHandle(XY,(MKI),(19))))call FogModifierStop(QYI)call DestroyFogModifier(QYI)call FlushChildHashtable(XY,(MKI))call MZI(t)elsecall GroupAddUnit(SP2,TMI)call MY5(TLI,TMI)endifset t=nullset TLI=nullset TMI=nullset g=nullset SP2=nullreturn falseendfunctionfunction MK5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local real x=GetSpellTargetX()local real y=GetSpellTargetY()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local fogmodifier QYI=CreateFogModifierRadius(GetOwningPlayer(TLI),FOG_OF_WAR_VISIBLE,x,y,600,true,true)local unit QHI=CreateUnit(GetOwningPlayer(TLI),1747993911,GetUnitX(TLI),GetUnitY(TLI),GetUnitFacing(TLI))local group g=MDI()local integer NGI=GetUnitAbilityLevel(TLI,1093814320)call SetUnitVertexColor(QHI,255,255,255,100)call FogModifierStart(QYI)call SaveInteger(XY,(GetHandleId((TLI))),((4318)),(1))set CK=TLIcall GroupEnumUnitsInRange(g,x,y,150+100*NGI+25,Condition(function B11))call A01(TLI)call MH5(TLI)call UnitAddAbility(TLI,1093814321)call UnitRemoveAbility(TLI,1093814321)call SetUnitVertexColor(TLI,255,255,255,125)call SetUnitPathing(TLI,false)call SetUnitInvulnerable(TLI,true)call SetUnitTimeScale(TLI,3)call TriggerRegisterTimerEvent(t,0.2,true)call TriggerAddCondition(t,Condition(function MJ5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))call SaveReal(XY,(MKI),(189),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(190),((GetUnitY(TLI))*1.0))call SaveGroupHandle(XY,(MKI),(187),(MDI()))call SaveGroupHandle(XY,(MKI),(22),(g))call SaveFogModifierHandle(XY,(MKI),(42),(QYI))call SaveUnitHandle(XY,(MKI),(19),(QHI))call MW5(TLI)call TriggerEvaluate(t)set TLI=nullset t=nullset QYI=nullset QHI=nullset g=nullendfunctionfunction ML5 takes nothing returns booleanif GetSpellAbilityId()==1093814320 thencall MK5()endifreturn falseendfunctionfunction MM5 takes nothing returns booleanlocal unit QP1=GetSummonedUnit()if IsUnitIllusion(QP1)==true and GetUnitTypeId(QP1)==1311788360 thencall MZ5(QP1)call UnitRemoveAbility(QP1,1093814854)call MV5(QP1)call UnitAddAbility(QP1,1093814322)call UnitRemoveAbility(QP1,1093814322)endifset QP1=nullreturn falseendfunctionfunction TL1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function ML5))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SUMMON)call TriggerAddCondition(t,Condition(function MM5))set t=nullendfunctionfunction MN5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=GetUnitAbilityLevel(TLI,1093814323)local integer JNO=1local real TSIif NGI==1 thenset JNO=1set TSI=80endifif NGI==2 thenset JNO=2set TSI=60endifif NGI==3 thenset JNO=2set TSI=120endifif NGI==4 thenset JNO=3set TSI=100endifif GetTriggerEvalCount(t)==JNO thencall FlushChildHashtable(XY,(MKI))call MZI(t)endifcall TKI(TLI,TMI,1,TSI)set t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction MS5 takes nothing returns nothinglocal unit TLI=CKlocal unit TMI=DKlocal unit QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer NGI=GetUnitAbilityLevel(TLI,1093814323)call UnitAddAbility(QHI,1093814324)call SetUnitAbilityLevel(QHI,1093814324,NGI)call IssueTargetOrder(QHI,"ensnare",TMI)call TriggerAddCondition(t,Condition(function MN5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call TriggerRegisterTimerEvent(t,0,false)call TriggerRegisterTimerEvent(t,1,true)set QHI=nullset TLI=nullset TMI=nullendfunctionfunction MT5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local group g=MDI()local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)local unit u1=nulllocal unit u2=nulllocal unit u3=nulllocal integer GC2=0local unit ulocal trigger tset CK=TLIcall GroupEnumUnitsInRange(g,x,y,425,Condition(function B01))loopexitwhen FirstOfGroup(g)==null or GC2==2set u=GroupPickRandomUnit(g)if u!=null thenif GC2==0 thenset u1=uelseif GC2==1 thenset u2=uelseif GC2==2 thenset u3=uendifset GC2=GC2+1call GroupRemoveUnit(g,u)endifendloopcall MCI(g)if u1!=null thencall U6I(TLI,u1,1747993904,"MS5",9000,false)endifif u2!=null thencall U6I(TLI,u2,1747993904,"MS5",9000,false)endifif u3!=null thenendifset g=nullset TLI=nullset u=nullset u1=nullset u2=nullset u3=nullendfunctionfunction MR5 takes nothing returns booleanif GetSpellAbilityId()==1093814323 thencall MT5()endifreturn falseendfunctionfunction TJ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function MR5))set t=nullendfunctionfunction MP5 takes nothing returns booleanlocal unit TLI=(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(2)))local integer MKI=GetHandleId(TLI)local integer i=0local real MXI=(TimerGetElapsed(M))local integer MQ5=(LoadInteger(XY,(MKI),(749)))local real xlocal real ylocal real tloopexitwhen i>MQ5set t=(LoadReal(XY,(MKI),(10000+i)))if t+10>MXI thenset x=(LoadReal(XY,(MKI),(11000+i)))set y=(LoadReal(XY,(MKI),(12000+i)))endifset i=i+1endloopset TLI=nullreturn falseendfunctionfunction MU5 takes integer MKI,integer MQ5,real U2I,real U3I returns booleanlocal real xlocal real ylocal real tlocal integer i=0local real MXI=(TimerGetElapsed(M))loopexitwhen i>MQ5set t=(LoadReal(XY,(MKI),(10000+i)))if t+10>MXI thenset x=(LoadReal(XY,(MKI),(11000+i)))set y=(LoadReal(XY,(MKI),(12000+i)))if PAI(x,y,U2I,U3I)<75 thenreturn trueendifendifset i=i+1endloopreturn falseendfunctionfunction N05 takes integer MKI,integer MQ5 returns integerlocal real tlocal integer i=0local real MXI=(TimerGetElapsed(M))loopexitwhen i>MQ5set t=(LoadReal(XY,(MKI),(10000+i)))if t+10<MXI thenreturn iendifset i=i+1endloopreturn-1endfunctionfunction NI5 takes unit TLI,integer N15,real x,real y returns nothinglocal integer MKI=GetHandleId(TLI)local integer MQ5=(LoadInteger(XY,(MKI),(749)))local integer NO5if MU5(MKI,MQ5,x,y)thenreturnendifset NO5=N05(MKI,MQ5)if NO5==-1 thenset NO5=MQ5set MQ5=MQ5+1call SaveInteger(XY,(MKI),(749),(MQ5))endifcall SaveInteger(XY,(MKI),(13000),(N15))call SaveReal(XY,(MKI),(10000),(((TimerGetElapsed(M)))*1.0))call SaveReal(XY,(MKI),(11000),((x)*1.0))call SaveReal(XY,(MKI),(11000),((y)*1.0))endfunctionfunction N25 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.5,true)call TriggerAddCondition(t,Condition(function MP5))call SaveUnitHandle(XY,(MKI),(2),(TLI))set TLI=nullset t=nullendfunctionfunction N35 takes nothing returns nothingcall TKI(XKI,GetEnumUnit(),1,50+XJI*50)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\LordofFlameMissile\\LordofFlameMissile.mdl",GetEnumUnit(),"origin"))endfunctionfunction N45 takes unit TLI,unit A93,real x,real y returns nothinglocal group gcall KillUnit(A93)call PMI("war3mapImported\\Firaga_2.mdx",x,y,2)set g=MDI()set CK=TLIset XKI=TLIset XJI=GetUnitAbilityLevel(TLI,1093814859)call GroupEnumUnitsInRange(g,x,y,450+25,Condition(function AT1))call UnitRemoveAbility(TLI,1093678162)call ForGroup(g,function N35)call QTI(TLI,1093678162)call MCI(g)set g=nullendfunctionfunction N55 takes unit TLI,unit N65 returns nothinglocal integer MKI=GetHandleId(TLI)local integer N75=(LoadInteger(XY,(MKI),(746)))local unit N85local integer i=1local integer xloopexitwhen i>N75set N85=(LoadUnitHandle(XY,(MKI),(1450+i)))if N85==N65 thenset N75=N75-1call SaveUnitHandle(XY,(MKI),(1450+i),((LoadUnitHandle(XY,(MKI),(1450+i+1)))))call SaveInteger(XY,(MKI),(746),(N75))set x=i+1loopexitwhen x>N75call SaveUnitHandle(XY,(MKI),(1450+x),((LoadUnitHandle(XY,(MKI),(1450+x+1)))))set x=x+1endloopendifset i=i+1endloopset N85=nullendfunctionfunction N95 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit A93=(LoadUnitHandle(XY,(MKI),(19)))local real PO2=GetUnitX(A93)local real P22=GetUnitY(A93)local real P6I=(LoadReal(XY,(MKI),(47)))local real P7I=(LoadReal(XY,(MKI),(48)))local real a=PUI(PO2,P22,P6I,P7I)*bj_DEGTORADlocal real U2Ilocal real U3Ilocal real d=PAI(PO2,P22,P6I,P7I)local real W03=GetUnitMoveSpeed(TLI)*2.5*0.02local group gif GetTriggerEventId()==EVENT_WIDGET_DEATH thencall N55(TLI,A93)call DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(177))))call FlushChildHashtable(XY,(MKI))call MZI(t)elseif d<2 thencall SetUnitAnimationByIndex(A93,1)elseif d<W03 thenset U2I=P6Iset U3I=P7Ielseset U2I=PO2+W03*Cos(a)set U3I=P22+W03*Sin(a)endifcall SetUnitX(A93,U2I)call SetUnitY(A93,U3I)endifset t=nullset TLI=nullset A93=nullreturn falseendfunctionfunction NA5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local real a=PUI(GetUnitX(TLI),GetUnitY(TLI),GetSpellTargetX(),GetSpellTargetY())*bj_DEGTORADlocal integer MKI=GetHandleId(TLI)local integer N75=(LoadInteger(XY,(MKI),(746)))local integer NGI=GetUnitAbilityLevel(TLI,1093814859)local unit N85=(LoadUnitHandle(XY,(MKI),(1450+1)))local unit NB5=CreateUnit(GetOwningPlayer(TLI),1747993912,GetUnitX(TLI),GetUnitY(TLI),a*bj_RADTODEG)local trigger tlocal integer i=1set N75=N75+1call SaveUnitHandle(XY,(MKI),(1450+N75),(NB5))call SaveInteger(XY,(MKI),(746),(N75))set t=CreateTrigger()set MKI=GetHandleId(t)call SetUnitVertexColor(NB5,255,255,255,75)call SetUnitTimeScale(NB5,2)call SetUnitAnimationByIndex(NB5,0)call TriggerRegisterTimerEvent(t,0.02,true)call TriggerAddCondition(t,Condition(function N95))call TriggerRegisterDeathEvent(t,NB5)call UnitApplyTimedLife(NB5,1112820806,45)call SaveEffectHandle(XY,(MKI),(175),(AddSpecialEffectTarget("war3mapImported\\Phoenix_Missile_smaller.mdx",NB5,"hand right alternate")))call SaveEffectHandle(XY,(MKI),(176),(AddSpecialEffectTarget("war3mapImported\\Phoenix_Missile_smaller.mdx",NB5,"hand left alternate")))call SaveEffectHandle(XY,(MKI),(177),(AddSpecialEffectTarget("war3mapImported\\FlameDash_Ground.mdx",NB5,"origin")))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(19),(NB5))call SaveReal(XY,(MKI),(47),((GetSpellTargetX())*1.0))call SaveReal(XY,(MKI),(48),((GetSpellTargetY())*1.0))set TLI=nullset t=nullset N85=nullset NB5=nullendfunctionfunction NC5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local integer WLO=(LoadInteger(XY,(GetHandleId(TLI)),(747)))if WLO>0 thencall NA5()call UnitRemoveAbility(TLI,XTI[WLO])set WLO=WLO-1call SaveInteger(XY,(GetHandleId(TLI)),(747),(WLO))call QTI(TLI,XTI[WLO])elsecall R1I(GetOwningPlayer(GetTriggerUnit()),"No more charges")endifset TLI=nullendfunctionfunction ND5 takes nothing returns booleanreturn GetUnitTypeId(GetFilterUnit())==1747993912endfunctionfunction NE5 takes nothing returns nothinglocal real P3I=PAI(GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),XLI,XMI)if P3I>XNI and QPI(GetEnumUnit())==false thenset XSI=GetEnumUnit()set XNI=P3Iendifendfunctionfunction NF5 takes unit TLI,real x,real y returns unitlocal group g=MDI()set XSI=nullset XNI=-1set XLI=xset XMI=ycall GroupEnumUnitsOfPlayer(g,GetOwningPlayer(TLI),Condition(function ND5))call ForGroup(g,function NE5)call MCI(g)set g=nullreturn XSIendfunctionfunction FireRemnant_FindTargetClosest takes nothing returns nothinglocal real P3I=PAI(GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),XLI,XMI)if P3I<XNI and QPI(GetEnumUnit())==false thenset XSI=GetEnumUnit()set XNI=P3Iendifendfunctionfunction NG5 takes unit u1,unit u2 returns reallocal real C63=P8I(u1,u2)local real RJI=C63/1300.0if RJI>0.4 thenreturn C63/0.4endifreturn 1300.0endfunctionfunction NH5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real A94=(LoadReal(XY,(MKI),(47)))local real AA4=(LoadReal(XY,(MKI),(48)))local unit A93=(LoadUnitHandle(XY,(MKI),(19)))local real PO2=GetUnitX(TLI)local real P22=GetUnitY(TLI)local real P6I=(LoadReal(XY,(MKI),(6)))local real P7I=(LoadReal(XY,(MKI),(7)))local real alocal real U2Ilocal real U3Ilocal real dlocal real U0I=(LoadReal(XY,(MKI),(44)))local real W03=U0I*0.02local group glocal integer MFI=(LoadInteger(XY,(MKI),(34)))if A93!=null thenset P6I=GetUnitX(A93)set P7I=GetUnitY(A93)call SaveReal(XY,(MKI),(6),((P6I)*1.0))call SaveReal(XY,(MKI),(7),((P7I)*1.0))endifset a=PUI(PO2,P22,P6I,P7I)*bj_DEGTORADset d=PAI(PO2,P22,P6I,P7I)if GetTriggerEventId()==EVENT_WIDGET_DEATH thencall SaveInteger(XY,(GetHandleId((TLI))),((4319)),(2))call SetUnitVertexColor(TLI,255,255,255,255)call SetUnitTimeScale(TLI,1)call SetUnitAnimationByIndex(TLI,0)call SetUnitPathing(TLI,true)call SetUnitInvulnerable(TLI,false)call UnitRemoveAbility(TLI,1093678162)call DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(177))))call FlushChildHashtable(XY,(MKI))call MZI(t)elseif d<W03 thencall SetUnitX(TLI,P6I)call SetUnitY(TLI,P7I)call N45(TLI,A93,P6I,P7I)set A93=NF5(TLI,A94,AA4)if A93==null thencall SaveInteger(XY,(GetHandleId((TLI))),((4319)),(2))call QEI(P6I,P7I,100)call SetUnitVertexColor(TLI,255,255,255,255)call SetUnitTimeScale(TLI,1)call SetUnitAnimationByIndex(TLI,1)call SetUnitPathing(TLI,true)call SetUnitInvulnerable(TLI,false)call UnitRemoveAbility(TLI,1093678162)call DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(177))))call FlushChildHashtable(XY,(MKI))call MZI(t)elsecall SaveInteger(XY,(MKI),(34),(MFI+1))call SaveUnitHandle(XY,(MKI),(19),(A93))call SaveReal(XY,(MKI),(44),((NG5(TLI,A93))*1.0))call SaveReal(XY,(MKI),(6),((GetUnitX(A93))*1.0))call SaveReal(XY,(MKI),(7),((GetUnitY(A93))*1.0))endifelsecall SetUnitAnimationByIndex(TLI,0)call SetUnitPathing(TLI,false)set U2I=PO2+W03*Cos(a)set U3I=P22+W03*Sin(a)call SetUnitX(TLI,U2I)call SetUnitY(TLI,U3I)call SetUnitFacing(TLI,a*bj_RADTODEG)call QEI(U2I,U3I,100)endifcall NI5(TLI,MFI,GetUnitX(TLI),GetUnitY(TLI))set t=nullset TLI=nullset A93=nullreturn falseendfunctionfunction NZ5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))call SetUnitState(TLI,UNIT_STATE_MANA,GetUnitState(TLI,UNIT_STATE_MANA)+150)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullreturn falseendfunctionfunction NV5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger tlocal integer MKI=GetHandleId(TLI)local integer N75=(LoadInteger(XY,(MKI),(746)))local unit A93if N75>0 and((LoadInteger(XY,(GetHandleId((TLI))),((4319))))==1)==false thenset t=CreateTrigger()set MKI=GetHandleId(t)call SetUnitVertexColor(TLI,255,0,0,75)call SetUnitTimeScale(TLI,2)call SetUnitAnimationByIndex(TLI,0)call SetUnitPathing(TLI,false)call SetUnitInvulnerable(TLI,true)call QTI(TLI,1093678162)call SaveInteger(XY,(GetHandleId((TLI))),((4319)),(1))call TriggerRegisterTimerEvent(t,0.02,true)call TriggerAddCondition(t,Condition(function NH5))call TriggerRegisterDeathEvent(t,TLI)call SaveEffectHandle(XY,(MKI),(175),(AddSpecialEffectTarget("war3mapImported\\Phoenix_Missile_smaller.mdx",TLI,"hand right alternate")))call SaveEffectHandle(XY,(MKI),(176),(AddSpecialEffectTarget("war3mapImported\\Phoenix_Missile_smaller.mdx",TLI,"hand left alternate")))call SaveEffectHandle(XY,(MKI),(177),(AddSpecialEffectTarget("war3mapImported\\FlameDash_Ground.mdx",TLI,"origin")))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(47),((GetSpellTargetX())*1.0))call SaveReal(XY,(MKI),(48),((GetSpellTargetY())*1.0))set A93=NF5(TLI,GetSpellTargetX(),GetSpellTargetY())call SaveUnitHandle(XY,(MKI),(19),(A93))call SaveReal(XY,(MKI),(44),((NG5(TLI,A93))*1.0))call SaveReal(XY,(MKI),(6),((GetUnitX(A93))*1.0))call SaveReal(XY,(MKI),(7),((GetUnitY(A93))*1.0))call SaveInteger(XY,(MKI),(34),(1))elseset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.0,false)call TriggerAddCondition(t,Condition(function NZ5))call SaveUnitHandle(XY,(MKI),(2),(TLI))endifset t=nullset TLI=nullset A93=nullendfunctionfunction NW5 takes nothing returns booleanif GetSpellAbilityId()==XTI[0]or GetSpellAbilityId()==XTI[1]or GetSpellAbilityId()==XTI[2]or GetSpellAbilityId()==XTI[3]thencall NC5()elseif GetSpellAbilityId()==1093814860 thencall NV5()endifreturn falseendfunctionfunction NX5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer WLO=(LoadInteger(XY,(GetHandleId(TLI)),(747)))local integer MFI=(LoadInteger(XY,(MKI),(34)))if WLO<3 thenset MFI=MFI-1call SaveInteger(XY,(MKI),(34),(MFI))if MFI==0 thencall UnitRemoveAbility(TLI,XTI[WLO])set MFI=35call SaveInteger(XY,(MKI),(34),(MFI))set WLO=WLO+1call SaveInteger(XY,(GetHandleId(TLI)),(747),(WLO))call QTI(TLI,XTI[WLO])endifendifset t=nullset TLI=nullreturn falseendfunctionfunction NY5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SaveInteger(XY,(GetHandleId(TLI)),(747),(3))call QTI(TLI,XTI[3])call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function NX5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(MKI),(34),(30))set TLI=nullset t=nullendfunctionfunction NJ5 takes nothing returns booleanif GetLearnedSkill()==1093814859 and IsUnitIllusion(GetTriggerUnit())==false thencall QTI(GetTriggerUnit(),1093814860)call SetUnitAbilityLevel(GetTriggerUnit(),1093814860,GetUnitAbilityLevel(GetTriggerUnit(),1093814859))if GetUnitAbilityLevel(GetTriggerUnit(),1093814859)==1 thencall NY5()call N25()endifendifreturn falseendfunctionfunction TM1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function NW5))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function NJ5))set t=nullset XTI[0]=1093814863set XTI[1]=1093814865set XTI[2]=1093814864set XTI[3]=1093814866endfunctionfunction NK5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))if GetTriggerEventId()==EVENT_WIDGET_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamage()>2 and XRI thenset XRI=falsecall TKI(GetEventDamageSource(),TMI,3,GetEventDamage()*0.25)set XRI=trueendifelsecall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction NL5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)local integer NGI=GetUnitAbilityLevel(TLI,1093812536)set XRI=truecall UnitAddAbility(QHI,1093812535)call SetUnitAbilityLevel(QHI,1093812535,NGI)call IssueTargetOrder(QHI,"soulburn",TMI)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterDeathEvent(t,TMI)call TriggerRegisterTimerEvent(t,2+NGI,false)call TriggerAddCondition(t,Condition(function NK5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))set TLI=nullset TMI=nullset t=nullendfunctionfunction NM5 takes nothing returns booleanif GetSpellAbilityId()==1093812536 thencall NL5()endifreturn falseendfunctionfunction Register_ArcaneSeal takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function NM5))set t=nullendfunctionfunction NN5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real a=(LoadReal(XY,(MKI),(137)))local real d=(LoadReal(XY,(MKI),(138)))local real x=RCI(GetUnitX(TMI)+d/10*Cos(a))local real y=RGI(GetUnitY(TMI)+d/10*Sin(a))if GetTriggerEvalCount(t)==11 or GetTriggerEventId()==EVENT_UNIT_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)elsecall DestroyEffect(AddSpecialEffect("war3mapImported\\ThrustMovement.mdx",x,y))call QEI(x,y,150)call SetUnitX(TMI,x)call SetUnitY(TMI,y)endifset TMI=nullset t=nullreturn falseendfunctionfunction NS5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer NGI=GetUnitAbilityLevel(TLI,1093812537)local real alocal real xlocal real ylocal real dlocal integer i=-1local boolean XCO=falseif TLI==TMI thenset a=GetUnitFacing(TLI)*bj_DEGTORADelseset a=PQI(TLI,TMI)*bj_DEGTORADendifloopexitwhen XCO or i==23set i=i+1set x=RCI(GetUnitX(TMI)+(350-i*25)*Cos(a))set y=RGI(GetUnitY(TMI)+(350-i*25)*Sin(a))if(IsPointInRegion(XN,((x)*1.0),((y)*1.0)))==false thenset XCO=trueendifendloopset d=PAI(x,y,GetUnitX(TMI),GetUnitY(TMI))call TriggerRegisterTimerEvent(t,0.03,true)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function NN5))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveReal(XY,(MKI),(137),((a)*1.0))call SaveReal(XY,(MKI),(138),((d)*1.0))if IsUnitAlly(TLI,GetOwningPlayer(TMI))==true thencall SetUnitState(TMI,UNIT_STATE_LIFE,GetUnitState(TMI,UNIT_STATE_LIFE)+50+50*NGI)elsecall TKI(TLI,TMI,3,50+50*NGI)endifset TLI=nullset TMI=nullset t=nullendfunctionfunction NT5 takes nothing returns booleanif GetSpellAbilityId()==1093812537 thencall NS5()endifreturn falseendfunctionfunction Register_Thrust takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function NT5))set t=nullendfunctionfunction NR5 takes nothing returns nothingcall IssueTargetOrder(XPI,"ensnare",GetEnumUnit())call TKI(GetTriggerUnit(),GetEnumUnit(),1,60*XQI)endfunctionfunction NP5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local group g1=MDI()local group g2=MDI()local integer NGI=GetUnitAbilityLevel(TLI,1093812534)local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)set XQI=NGIset XPI=CreateUnit(GetOwningPlayer(TLI),1697656901,x,y,0)call UnitAddAbility(XPI,1093812549)call SetUnitAbilityLevel(XPI,1093812549,NGI)call GroupEnumUnitsInRange(g1,x,y,425,Condition(function AK1))call GroupEnumUnitsInRange(g2,x,y,825,Condition(function AK1))call GroupRemoveGroup(g1,g2)call ForGroup(g2,function NR5)call MCI(g1)call MCI(g2)call DestroyEffect(AddSpecialEffect("war3mapImported\\ConjureForceAoE.mdx",x,y))set TLI=nullset g1=nullset g2=nullendfunctionfunction NQ5 takes nothing returns booleanif GetSpellAbilityId()==1093812534 thencall NP5()endifreturn falseendfunctionfunction Register_ConjureForce takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function NQ5))set t=nullendfunctionfunction NU5 takes nothing returns nothingif IsUnitInGroup(GetEnumUnit(),Y0I)==false thencall GroupAddUnit(Y0I,GetEnumUnit())call TKI(XUI,GetEnumUnit(),3,YII)endifendfunctionfunction S05 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local group g=(LoadGroupHandle(XY,(MKI),(22)))local unit UII=(LoadUnitHandle(XY,(MKI),(45)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local real NN2=(LoadReal(XY,(MKI),(13)))local real TSI=(LoadReal(XY,(MKI),(20)))local group DW3local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real xlocal real yif GetTriggerEvalCount(t)>67 thencall MCI(g)call FlushChildHashtable(XY,(MKI))call MZI(t)call KillUnit(UII)elseset x=GetUnitX(UII)set y=GetUnitY(UII)set DW3=MDI()set Y0I=gset CK=UIIset XUI=TLIset YII=TSIcall GroupEnumUnitsInRange(DW3,x,y,225,Condition(function BO1))call ForGroup(DW3,function NU5)call MCI(DW3)call SetUnitX(UII,RCI(x+15*Cos(NN2*bj_DEGTORAD)))call SetUnitY(UII,RGI(y+15*Sin(NN2*bj_DEGTORAD)))endifset t=nullset g=nullset DW3=nullset TLI=nullset UII=nullreturn falseendfunctionfunction SI5 takes unit TLI,real TSI,real x,real y returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local group g=MDI()local real x1=GetUnitX(TLI)local real y1=GetUnitY(TLI)local real x2=xlocal real y2=ylocal real NN2=PUI(x1,y1,x2,y2)local integer NGI=GetUnitAbilityLevel(TLI,1093812545)local unit UII=CreateUnit(GetOwningPlayer(TLI),1747993673,x1,y1,NN2)call SetUnitScale(UII,1.5,1.5,1.5)call SaveUnitHandle(XY,(MKI),(45),(UII))call SaveInteger(XY,(MKI),(5),(NGI))call SaveGroupHandle(XY,(MKI),(22),(g))call SaveReal(XY,(MKI),(13),((NN2)*1.0))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(20),((TSI)*1.0))call TriggerRegisterTimerEvent(t,0.015,true)call TriggerAddCondition(t,Condition(function S05))set t=nullset UII=nullset g=nullendfunctionfunction S15 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local boolean SL2=(LoadBoolean(XY,(MKI),(95)))if GetTriggerEventId()==EVENT_WIDGET_DEATH thencall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093812546,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093812545,true)call DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif SL2==false and GetEventDamage()>2 and GetEventDamage()<3000 and IsUnitIllusion(TMI)==false thencall SaveReal(XY,(MKI),(20),(((LoadReal(XY,(MKI),(20)))+GetEventDamage())*1.0))call PII(TMI,GetEventDamage())endifelseif GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST thenif GetSpellAbilityId()==1093812545 thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call SaveBoolean(XY,(MKI),(95),(true))endifelseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT thenif GetSpellAbilityId()==1093812546 thencall SI5(TLI,(LoadReal(XY,(MKI),(20))),GetSpellTargetX(),GetSpellTargetY())call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093812546,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093812545,true)call FlushChildHashtable(XY,(MKI))call MZI(t)endifelsecall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093812546,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093812545,true)call DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction SO5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call QTI(TLI,1093812546)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093812546,true)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093812545,false)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_ENDCAST)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)call TriggerRegisterDeathEvent(t,TLI)call TriggerRegisterTimerEvent(t,20,false)call TriggerAddCondition(t,Condition(function S15))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveBoolean(XY,(MKI),(95),(false))call SaveEffectHandle(XY,(MKI),(175),(AddSpecialEffectTarget("war3mapImported\\WispShellBlue_2.mdx",TLI,"origin")))call SaveEffectHandle(XY,(MKI),(176),(AddSpecialEffectTarget("war3mapImported\\DivineWrathTarget.mdx",TMI,"origin")))set TLI=nullset TMI=nullset t=nullendfunctionfunction S25 takes nothing returns booleanif GetSpellAbilityId()==1093812545 thencall SO5()endifreturn falseendfunctionfunction Register_DivineWrath takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function S25))set t=nullendfunctionfunction S35 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if GetTriggerEventId()!=EVENT_UNIT_SPELL_EFFECT or GetSpellAbilityId()==1093812804 thencall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093812803,true)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093812804,false)call UnitRemoveAbility(TLI,1097167980)call UnitRemoveAbility(TLI,1093812787)call UnitRemoveAbility(TLI,1093812784)call UnitRemoveAbility(TLI,1093812785)call UnitRemoveAbility(TLI,1093812786)call UnitRemoveAbility(TLI,1110459954)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullreturn falseendfunctionfunction S45 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093812803)call TriggerRegisterTimerEvent(t,5,false)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DEATH)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function S35))call SaveUnitHandle(XY,(MKI),(2),(TLI))call UnitAddAbility(TLI,1093812804)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093812803,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093812804,true)call UnitAddAbility(TLI,1097167980)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1097167980,false)if NGI==1 thencall UnitAddAbility(TLI,1093812787)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093812787,false)elseif NGI==2 thencall UnitAddAbility(TLI,1093812784)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093812784,false)elseif NGI==3 thencall UnitAddAbility(TLI,1093812785)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093812785,false)elseif NGI==4 thencall UnitAddAbility(TLI,1093812786)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093812786,false)endifset t=nullset TLI=nullendfunctionfunction S55 takes nothing returns booleanif GetSpellAbilityId()==1093812803 thencall S45()endifreturn falseendfunctionfunction Register_Wraith takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function S55))set t=nullendfunctionfunction S65 takes unit TLI,unit EP5,unit TMI,integer NGI returns nothingcall GroupAddUnit(Y1I,TMI)call BQ1(TLI,TMI,1.25+0.25*NGI)call TKI(TLI,TMI,1,40*NGI)call KillUnit(EP5)endfunctionfunction S75 takes nothing returns booleanif(IsUnitEnemy(CK,GetOwningPlayer(GetFilterUnit()))and(GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and QPI(GetFilterUnit())==false)and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or AZ1(GetFilterUnit())))and(IsUnitVisible(GetFilterUnit(),GetOwningPlayer(CK))==true or AG1(GetFilterUnit())==false)thenreturn IsUnitInGroup(GetFilterUnit(),Y1I)==falseendifreturn falseendfunctionfunction S85 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local group glocal integer i=1local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local real a=(LoadReal(XY,(MKI),(137)))local unit EP5local unit TMIlocal real P6I=(LoadReal(XY,(MKI),(47)))local real P7I=(LoadReal(XY,(MKI),(48)))local group SP2=(LoadGroupHandle(XY,(MKI),(187)))set Y1I=SP2set x=RCI(x+12*Cos(a))set y=RGI(y+12*Sin(a))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))if GetTriggerEvalCount(t)>39 thenloopexitwhen i>3call KillUnit((LoadUnitHandle(XY,(MKI),(393+i-1))))set i=i+1endloopcall MCI(SP2)call FlushChildHashtable(XY,(MKI))call MZI(t)elseset g=MDI()set CK=TLIcall GroupEnumUnitsInRange(g,x,y,275,Condition(function S75))loopexitwhen i>3if(LoadBoolean(XY,(MKI),(511+i-1)))==false thenset EP5=(LoadUnitHandle(XY,(MKI),(393+i-1)))set x=(LoadReal(XY,(MKI),(549+i-1)))set y=(LoadReal(XY,(MKI),(567+i-1)))set x=RCI(x+12*Cos(a))set y=RGI(y+12*Sin(a))call SaveReal(XY,(MKI),(549+i-1),((x)*1.0))call SaveReal(XY,(MKI),(567+i-1),((y)*1.0))call SetUnitX(EP5,x)call SetUnitY(EP5,y)set TMI=GroupPickRandomUnit(g)if TMI!=null thencall GroupRemoveUnit(g,TMI)call SaveInteger(XY,(GetHandleId((TMI))),((4314)),(1))call SaveBoolean(XY,(MKI),(511+i-1),(true))call S65(TLI,EP5,TMI,GetUnitAbilityLevel(TLI,1093812788))endifendifset i=i+1endloopcall MCI(g)set g=nullset EP5=nullset TMI=nullendifset t=nullset TLI=nullreturn falseendfunctionfunction S95 takes nothing returns nothinglocal real P6I=GetSpellTargetX()local real P7I=GetSpellTargetY()local unit TLI=GetTriggerUnit()local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)local real a=PUI(x,y,P6I,P7I)*bj_DEGTORADlocal real blocal unit QHIlocal real U2I=RCI(x+500*Cos(a))local real U3I=RGI(y+500*Sin(a))local integer i=0local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real C61local integer NGI=GetUnitAbilityLevel(TLI,1093812788)local integer SVI=1747993678set i=i+1set b=a*bj_RADTODEG+90if b>360 thenset b=b-360endifset b=b*bj_DEGTORADset QHI=CreateUnit(GetOwningPlayer(TLI),SVI,x+100*Cos(a)+100*Cos(b),y+100*Sin(a)+100*Sin(b),a*bj_RADTODEG)call SaveUnitHandle(XY,(MKI),(393+i-1),(QHI))call SaveBoolean(XY,(MKI),(511+i-1),(false))call SaveReal(XY,(MKI),(549+i-1),((GetUnitX(QHI))*1.0))call SaveReal(XY,(MKI),(567+i-1),((GetUnitY(QHI))*1.0))set i=i+1set b=a*bj_RADTODEG-90if b<0 thenset b=360+bendifset b=b*bj_DEGTORADset QHI=CreateUnit(GetOwningPlayer(TLI),SVI,x+100*Cos(a)+100*Cos(b),y+100*Sin(a)+100*Sin(b),a*bj_RADTODEG)call SaveUnitHandle(XY,(MKI),(393+i-1),(QHI))call SaveBoolean(XY,(MKI),(511+i-1),(false))call SaveReal(XY,(MKI),(549+i-1),((GetUnitX(QHI))*1.0))call SaveReal(XY,(MKI),(567+i-1),((GetUnitY(QHI))*1.0))set i=i+1set QHI=CreateUnit(GetOwningPlayer(TLI),SVI,x+100*Cos(a),y+100*Sin(a),a*bj_RADTODEG)call SaveUnitHandle(XY,(MKI),(393+i-1),(QHI))call SaveBoolean(XY,(MKI),(511+i-1),(false))call SaveReal(XY,(MKI),(549+i-1),((GetUnitX(QHI))*1.0))call SaveReal(XY,(MKI),(567+i-1),((GetUnitY(QHI))*1.0))call TriggerRegisterTimerEvent(t,0.015,true)call TriggerAddCondition(t,Condition(function S85))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))call SaveReal(XY,(MKI),(137),((a)*1.0))call SaveReal(XY,(MKI),(47),((U2I)*1.0))call SaveReal(XY,(MKI),(48),((U3I)*1.0))call SaveGroupHandle(XY,(MKI),(187),(MDI()))set TLI=nullset QHI=nullset t=nullendfunctionfunction SA5 takes nothing returns booleanif GetSpellAbilityId()==1093812788 thencall S95()endifreturn falseendfunctionfunction RE1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function SA5))set t=nullendfunctionfunction SB5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer MFI=GetTriggerEvalCount(t)local integer NGI=GetUnitAbilityLevel(TLI,1093812789)if MFI==6 thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)call UnitShareVision(TMI,GetOwningPlayer(TLI),false)endifcall TKI(TLI,TMI,1,20+10*NGI)set t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction SC5 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function SB5))call SaveUnitHandle(XY,(MKI),(2),(GetTriggerUnit()))call SaveUnitHandle(XY,(MKI),(17),(GetEnumUnit()))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("Abilities\\Weapons\\BansheeMissile\\BansheeMissile.mdl",GetEnumUnit(),"overhead")))call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",GetEnumUnit(),"origin"))call UnitShareVision(GetEnumUnit(),GetOwningPlayer(GetTriggerUnit()),true)set t=nullendfunctionfunction SD5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local group g=MDI()local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TLI),GetUnitY(TLI),0)call UnitAddAbility(QHI,1093812791)call IssueImmediateOrderById(QHI,852625)call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",GetUnitX(TLI),GetUnitY(TLI)))call GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),625,Condition(function AK1))call ForGroup(g,function SC5)call MCI(g)set g=nullset TLI=nullset QHI=nullendfunctionfunction SE5 takes nothing returns booleanif GetSpellAbilityId()==1093812789 thencall SD5()endifreturn falseendfunctionfunction Register_Miasma takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function SE5))set t=nullendfunctionfunction GetTotalMinutes takes nothing returns integerreturn R2I((TimerGetElapsed(M))/60)endfunctionfunction SF5 takes unit TLI,integer EJ3 returns nothinglocal integer WI3=GetHeroAgi(TLI,false)local integer W13=GetHeroStr(TLI,false)local integer SG5=GetHeroInt(TLI,false)call SetHeroAgi(TLI,WI3-EJ3,true)call SetHeroStr(TLI,W13-EJ3,true)call SetHeroInt(TLI,SG5-EJ3,true)endfunctionfunction SH5 takes unit TLI,integer EJ3 returns nothinglocal integer WI3=GetHeroAgi(TLI,false)local integer W13=GetHeroStr(TLI,false)local integer SG5=GetHeroInt(TLI,false)call SetHeroAgi(TLI,WI3+EJ3,true)call SetHeroStr(TLI,W13+EJ3,true)call SetHeroInt(TLI,SG5+EJ3,true)endfunctionfunction SZ5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer SV5=(LoadInteger(XY,(MKI),(744)))local integer NGI=GetUnitAbilityLevel(TLI,1093814066)local integer A41=(R2I((TimerGetElapsed(M))/60))local real E93=NGI+1+(0.1+0.1*NGI)*A41local integer SW5=3+3*NGI+R2I((0.1+0.1*NGI)*A41)if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT thenif GetSpellAbilityId()==1093814066 thenif TMI!=null and TMI!=GetSpellTargetUnit()thencall UnitRemoveAbility(TMI,1093814607)call SF5(TMI,SV5)call SF5(TLI,SV5)call SaveInteger(XY,(MKI),(744),(0))endifset TMI=GetSpellTargetUnit()call SaveUnitHandle(XY,(MKI),(17),(TMI))call QTI(TMI,1093814607)call PKI("Abilities\\Spells\\Orc\\SpiritLink\\SpiritLinkZapTarget.mdl",TLI,"chest",1.9)call PKI("Abilities\\Spells\\Orc\\SpiritLink\\SpiritLinkZapTarget.mdl",TMI,"chest",1.9)return falseelsereturn falseendifendifif TMI==null thenelseif QPI(TMI)or QPI(TLI)or P8I(TLI,TMI)>1400 thencall SF5(TLI,SV5)call SF5(TMI,SV5)call SaveInteger(XY,(MKI),(744),(0))call UnitRemoveAbility(TLI,1093814607)call UnitRemoveAbility(TMI,1093814607)elseif GetUnitAbilityLevel(TLI,1093814607)==0 thencall QTI(TLI,1093814607)endifif GetUnitAbilityLevel(TMI,1093814607)==0 thencall QTI(TMI,1093814607)endifif SV5!=SW5 thencall SH5(TLI,SW5-SV5)call SH5(TMI,SW5-SV5)call SaveInteger(XY,(MKI),(744),(SW5))endifcall SetUnitState(TLI,UNIT_STATE_LIFE,GetUnitState(TLI,UNIT_STATE_LIFE)+E93)call SetUnitState(TMI,UNIT_STATE_LIFE,GetUnitState(TMI,UNIT_STATE_LIFE)+E93)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction SX5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,1,true)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function SZ5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(null))call SaveInteger(XY,(MKI),(744),(0))set t=nullset TLI=nullendfunctionfunction SY5 takes nothing returns booleanif GetLearnedSkill()==1093814066 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093814066)==1 thencall SX5()endifreturn falseendfunctionfunction Register_Brotherhood takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function SY5))set t=nullendfunctionfunction SJ5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if GetTriggerEventId()!=EVENT_UNIT_DAMAGED or(GetEventDamage()>30 and GetEventDamageSource()!=GetTriggerUnit()and NXI(GetOwningPlayer(GetEventDamageSource())))thenif GetTriggerEventId()==EVENT_UNIT_DAMAGED thencall PII(TLI,GetEventDamage())endifcall UnitRemoveAbility(TLI,1093814604)call UnitRemoveAbility(TLI,1093814605)call UnitRemoveAbility(TLI,1093812825)call UnitRemoveAbility(TLI,1093814606)call UnitRemoveAbility(TLI,1110459956)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullreturn falseendfunctionfunction SK5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetEnumUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093812822)local real dlocal integer idlocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)if NGI==1 thenset d=4set id=1093814604elseif NGI==2 thenset d=5set id=1093814605elseif NGI==3 thenset d=6set id=1093812825elseif NGI==4 thenset d=7set id=1093814606endifcall QTI(TMI,id)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),id,false)call TriggerAddCondition(t,Condition(function SJ5))call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterDeathEvent(t,TMI)call TriggerRegisterTimerEvent(t,d,false)call SaveUnitHandle(XY,(MKI),(2),(TMI))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIsp\\SpeedTarget.mdl",TMI,"origin")))set TLI=nullset TMI=nullset t=nullendfunctionfunction SL5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local group g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),375,Condition(function BD1))call ForGroup(g,function SK5)call MCI(g)set g=nullset TLI=nullendfunctionfunction SM5 takes nothing returns booleanif GetSpellAbilityId()==1093812822 thencall SL5()endifreturn falseendfunctionfunction Register_Gallop takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function SM5))endfunctionfunction SN5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit FKO=(LoadUnitHandle(XY,(MKI),(17)))local integer O01=(LoadInteger(XY,(MKI),(59)))if GetTriggerEventId()!=EVENT_UNIT_DAMAGED thencall FlushChildHashtable(XY,(MKI))call MZI(t)call UnitRemoveAbility(TLI,O01)call UnitRemoveAbility(TLI,1110459978)call UnitRemoveAbility(TLI,1110459979)elseif GetEventDamageSource()==TLI and GetEventDamage()>0 thencall TriggerRegisterTimerEvent(t,0.3,false)endifset t=nullset TLI=nullset FKO=nullreturn falseendfunctionfunction SS5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit FKO=GetAttacker()local integer NGI=GetUnitAbilityLevel(TLI,1093813593)local integer idlocal integer MFI=(LoadInteger(XY,(MKI),(34)))if TLI==GetTriggerUnit()and((LoadInteger(XY,(GetHandleId((TLI))),((4316))))==1)==false and IsUnitAlly(TLI,GetOwningPlayer(FKO))==false thenif GetRandomReal(0,100)<(MFI+1)*YOI[NGI]thencall SaveInteger(XY,(MKI),(34),(0))call MPI(TLI,4316,0.9)if NGI==1 thenset id=1093814084elseif NGI==2 thenset id=1093814085elseif NGI==3 thenset id=1093814086elseif NGI==4 thenset id=1093814083endifcall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),id,false)call QTI(TLI,id)set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterDeathEvent(t,TLI)call TriggerRegisterUnitEvent(t,FKO,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,1.0,false)call TriggerAddCondition(t,Condition(function SN5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(FKO))call SaveInteger(XY,(MKI),(59),(id))elsecall SaveInteger(XY,(MKI),(34),(MFI+1))endifendifset t=nullset TLI=nullset FKO=nullreturn falseendfunctionfunction ST5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function SS5))call SaveUnitHandle(XY,(MKI),(2),(TLI))set TLI=nullset t=nullendfunctionfunction SR5 takes nothing returns booleanif GetLearnedSkill()==1093813593 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093813593)==1 thencall ST5()endifreturn falseendfunctionfunction TT1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function SR5))set t=nullset YOI[1]=3.646set YOI[2]=4.562set YOI[3]=5.570set YOI[4]=6.668endfunctionfunction SP5 takes unit u,integer d returns nothinglocal integer array blocal integer a=dlocal integer c=1local integer i=0local integer DG1if d<1 thencall UnitRemoveAbility(u,Y2I[0])call UnitRemoveAbility(u,Y2I[1])call UnitRemoveAbility(u,Y2I[2])call UnitRemoveAbility(u,Y2I[3])call UnitRemoveAbility(u,Y2I[4])call UnitRemoveAbility(u,Y2I[5])call UnitRemoveAbility(u,Y2I[6])call UnitRemoveAbility(u,Y2I[7])call UnitRemoveAbility(u,Y2I[8])returnendifloopexitwhen c==0set c=a/2set b[i]=a-c*2set a=cset i=i+1endloopset DG1=8set i=0loopexitwhen i>DG1if b[i]==1 thencall QTI(u,Y2I[i])elsecall UnitRemoveAbility(u,Y2I[i])endifset i=i+1endloopendfunctionfunction SQ5 takes unit TLI,integer NGI,unit TMI returns nothinglocal integer MKI=GetHandleId(TLI)local integer SU5=(LoadInteger(XY,(MKI),(739)))if IsUnitType(TMI,UNIT_TYPE_HERO)==true thenset SU5=SU5+6+4*NGIcall SaveInteger(XY,(MKI),(739),(SU5))call Q5I(GetUnitName(TLI)+" Won The Duel!!",5,TLI,0.03,255,0,0,255)call SP5(TLI,SU5)endifendfunctionfunction T05 takes unit u returns booleanreturn GetUnitAbilityLevel(u,1113815395)==0 or THI(u)==falseendfunctionfunction TI5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local real F21=(LoadReal(XY,(MKI),(442)))local unit QHIcall AE1(TLI)call AE1(TMI)if GetTriggerEvalCount(t)==1 thenset QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call UnitAddAbility(QHI,1093814069)call IssueTargetOrder(QHI,"doom",TMI)set QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TLI),GetUnitY(TLI),0)call UnitAddAbility(QHI,1093814069)call IssueTargetOrder(QHI,"doom",TLI)set QHI=nullendifif GetTriggerEventId()==EVENT_WIDGET_DEATH or F21<(TimerGetElapsed(M))or T05(TLI)==false or T05(TMI)==false thenif GetTriggerEventId()==EVENT_WIDGET_DEATH thenif GetTriggerUnit()==TLI thencall SQ5(TMI,NGI,GetTriggerUnit())elsecall SQ5(TLI,NGI,GetTriggerUnit())endifendifcall UnitRemoveAbility(TLI,1110459975)call UnitRemoveAbility(TMI,1110459975)call DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call FlushChildHashtable(XY,(MKI))call MZI(t)call SetUnitPathing(TLI,true)call SetUnitPathing(TMI,true)elseif GetIssuedOrderId()!=851973 thencall SetUnitPathing(TLI,false)call SetUnitPathing(TMI,false)call DisableTrigger(t)call IssueTargetOrder(TLI,"attack",TMI)call IssueTargetOrder(TMI,"attack",TLI)call EnableTrigger(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction T15 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093813065)local trigger tlocal integer MKIcall SetUnitPathing(TLI,false)call SetUnitPathing(TMI,false)call IssueTargetOrder(TLI,"attack",TMI)call IssueTargetOrder(TMI,"attack",TLI)set t=CreateTrigger()set MKI=GetHandleId(t)call SaveEffectHandle(XY,(MKI),(175),(AddSpecialEffectTarget("war3mapImported\\DuelFX.mdx",TLI,"overhead")))call SaveEffectHandle(XY,(MKI),(176),(AddSpecialEffectTarget("war3mapImported\\DuelFX.mdx",TMI,"overhead")))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveReal(XY,(MKI),(442),(((TimerGetElapsed(M))+0.75*NGI+3.25)*1.0))call TriggerAddCondition(t,Condition(function TI5))call TriggerRegisterTimerEvent(t,0.05,true)call TriggerRegisterTimerEvent(t,0.01,false)call TriggerRegisterDeathEvent(t,TLI)call TriggerRegisterDeathEvent(t,TMI)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_ISSUED_TARGET_ORDER)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_ISSUED_POINT_ORDER)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_ISSUED_ORDER)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_ISSUED_TARGET_ORDER)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_ISSUED_POINT_ORDER)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_ISSUED_ORDER)set TLI=nullset TMI=nullset t=nullendfunctionfunction TO5 takes nothing returns booleanif GetSpellAbilityId()==1093813065 and MBI(GetSpellTargetUnit())==false thencall T15()endifreturn falseendfunctionfunction TP1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function TO5))set t=nullset Y2I[0]=1093814091set Y2I[1]=1093814090set Y2I[2]=1093814089set Y2I[3]=1093814088set Y2I[4]=1093814094set Y2I[5]=1093814095set Y2I[6]=1093814093set Y2I[7]=1093814092set Y2I[8]=1093814096endfunctionfunction T25 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local integer MFI=(LoadInteger(XY,(MKI),(34)))local real dlocal unit FKOif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenset d=GetEventDamage()if TAI(d)and d>50 thenset MFI=MFI+1call SaveInteger(XY,(MKI),(34),(MFI))set FKO=GetEventDamageSource()if IsUnitType(FKO,UNIT_TYPE_HERO)==false and GetUnitAbilityLevel(FKO,1093678162)!=0 thenset FKO=K1[GetPlayerId(GetOwningPlayer(FKO))]endifcall PII(TLI,d)set d=d*(0.4+0.2*NGI)if IsUnitAlly(TMI,GetOwningPlayer(TLI))==true thencall SetUnitState(TMI,UNIT_STATE_LIFE,GetUnitState(TMI,UNIT_STATE_LIFE)+d)elsecall TKI(TLI,TMI,3,d)endifendifendifif GetTriggerEventId()!=EVENT_UNIT_DAMAGED or MFI==3 thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction T35 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093814609)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call PKI("Abilities\\Spells\\Orc\\SpiritLink\\SpiritLinkZapTarget.mdl",TLI,"chest",1.9)call PKI("Abilities\\Spells\\Orc\\SpiritLink\\SpiritLinkZapTarget.mdl",TMI,"chest",1.9)call SaveEffectHandle(XY,(MKI),(175),(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\SpiritLink\\SpiritLinkTarget.mdl",TLI,"chest")))call SaveEffectHandle(XY,(MKI),(176),(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\SpiritLink\\SpiritLinkTarget.mdl",TMI,"chest")))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveInteger(XY,(MKI),(34),(0))call TriggerAddCondition(t,Condition(function T25))call TriggerRegisterTimerEvent(t,10,false)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DAMAGED)set TLI=nullset TMI=nullset t=nullendfunctionfunction T45 takes nothing returns booleanif GetSpellAbilityId()==1093814609 thencall T35()endifreturn falseendfunctionfunction Register_Deflection takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function T45))set t=nullendfunctionfunction T55 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local integer MFI=(LoadInteger(XY,(MKI),(34)))local integer JNO=5if TLI==TMI thenset JNO=5endifset MFI=MFI+1call SaveInteger(XY,(MKI),(34),(MFI))if GetTriggerEventId()==EVENT_WIDGET_DEATH or MFI>JNO thencall UnitRemoveAbility(TMI,Y3I[NGI])call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)elsecall SetUnitState(TMI,UNIT_STATE_LIFE,GetUnitState(TMI,UNIT_STATE_LIFE)+20+10*NGI)call PKI("Abilities\\Spells\\Orc\\SpiritLink\\SpiritLinkZapTarget.mdl",TMI,"chest",1.9)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction T65 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093814834)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call CW1(TMI)call CG1(TMI,0,0)call QTI(TMI,Y3I[NGI])call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),Y3I[NGI],false)call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("Abilities\\Spells\\Human\\InnerFire\\InnerFireTarget.mdl",TMI,"overhead")))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveInteger(XY,(MKI),(34),(0))call TriggerAddCondition(t,Condition(function T55))call TriggerRegisterTimerEvent(t,1,true)call TriggerRegisterDeathEvent(t,TMI)call TriggerEvaluate(t)set TLI=nullset TMI=nullset t=nullendfunctionfunction T75 takes nothing returns booleanif GetSpellAbilityId()==1093814834 thencall T65()endifreturn falseendfunctionfunction TS1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function T75))set Y3I[1]=1093814841set Y3I[2]=1093814849set Y3I[3]=1093814840set Y3I[4]=1093814839set t=nullendfunctionfunction T85 takes unit TLI,integer NGI returns nothinglocal unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TLI),GetUnitY(TLI),0)call QTI(QHI,1093814851)call SetUnitAbilityLevel(QHI,1093814851,NGI/3)call IssueTargetOrder(QHI,"bloodlust",TLI)set QHI=nullendfunctionfunction T95 takes nothing returns nothingif IsUnitType(GetEnumUnit(),UNIT_TYPE_SUMMONED)==true or IsUnitIllusion(GetEnumUnit())==true thencall TKI(GetTriggerUnit(),GetEnumUnit(),1,GetUnitState(GetEnumUnit(),UNIT_STATE_MAX_LIFE)*0.25)endifcall TKI(GetTriggerUnit(),GetEnumUnit(),1,20+40*Y6I+(12+2*Y6I)*Y4I+(5+15*Y6I)*Y5I)endfunctionfunction TA5 takes nothing returns nothingif IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)==true thenset Y5I=Y5I+1elseset Y4I=Y4I+1endifendfunctionfunction TB5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local real x=GetSpellTargetX()local real y=GetSpellTargetY()local integer NGI=GetUnitAbilityLevel(TLI,1093814850)local group g=MDI()call DestroyEffect(AddSpecialEffect("war3mapImported\\OverwhelmingOdds.mdx",x,y))call GroupEnumUnitsInRange(g,x,y,330+25,Condition(function AK1))set Y4I=0set Y5I=0set Y6I=NGIcall ForGroup(g,function TA5)call ForGroup(g,function T95)call MCI(g)call T85(TLI,9*Y5I+3*Y4I)set TLI=nullset g=nullendfunctionfunction TC5 takes nothing returns booleanif GetSpellAbilityId()==1093814850 thencall TB5()endifreturn falseendfunctionfunction TR1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function TC5))call RVI(1093814851)set t=nullendfunctionfunction TD5 takes nothing returns nothingset YBI=truecall TKI(Y7I,GetEnumUnit(),1,((200+400*Y9I)/Y8I)/20)set YBI=falseendfunctionfunction TE5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local group gif GetTriggerEvalCount(t)>20 thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)elseset g=MDI()set CK=TLIcall GroupEnumUnitsInRange(g,x,y,170+25,Condition(function BW1))set Y9I=GetUnitAbilityLevel(TLI,1093812807)if Y9I==0 thenset Y9I=GetUnitAbilityLevel(TLI,1093817429)endifset Y7I=TLIset Y8I=CountUnitsInGroup(g)call ForGroup(g,function TD5)call MCI(g)set g=nullendifset t=nullset TLI=nullreturn falseendfunctionfunction TF5 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local real x=GetSpellTargetX()local real y=GetSpellTargetY()local string s="war3mapImported\\DivineWrathTarget.mdx"local location l=GetSpellTargetLoc()call PlaySoundAtPointBJ(YAI,100,l,0)call RemoveLocation(l)call TriggerRegisterTimerEvent(t,0.1,true)call TriggerAddCondition(t,Condition(function TE5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))call DestroyEffect(AddSpecialEffect(s,x,y))set t=nullset TLI=nullendfunctionfunction TG5 takes nothing returns booleanif GetSpellAbilityId()==1093812807 or GetSpellAbilityId()==1093817429 thencall TF5()endifreturn falseendfunctionfunction TU1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function TG5))set t=nullset YAI=CreateSound("Abilities\\Spells\\Demon\\RainOfFire\\RainOfFireTarget2.wav",false,true,true,10,10,"SpellsEAX")call SetSoundParamsFromLabel(YAI,"StarfallTarget")call SetSoundDuration(YAI,3000)endfunctionfunction TH5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=GetUnitAbilityLevel(TLI,1093812820)local real dif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenset d=GetEventDamage()*(0.2+0.05*NGI)elsecall SaveInteger(XY,(GetHandleId((TMI))),((4317)),(2))call UnitRemoveAbility(TMI,1093814582)call UnitRemoveAbility(TMI,1093814581)call UnitRemoveAbility(TMI,1093814583)call UnitRemoveAbility(TMI,1093814584)call UnitRemoveAbility(TMI,1110459987)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction TZ5 takes unit TLI,unit TMI returns nothinglocal trigger tlocal integer MKIlocal integer NGI=GetUnitAbilityLevel(TLI,1093812820)local unit LastTarget=(LoadUnitHandle(XY,(GetHandleId(TLI)),(741)))local integer MFI=(LoadInteger(XY,(GetHandleId(TMI)),(742)))local integer idif((LoadInteger(XY,(GetHandleId((TMI))),((4317))))==1)==true thencall SaveInteger(XY,(GetHandleId(TMI)),(742),(0))call SaveReal(XY,(GetHandleId(TMI)),(743),(((TimerGetElapsed(M)))*1.0))elseif(LoadReal(XY,(GetHandleId(TMI)),(743)))+10<(TimerGetElapsed(M))thenset MFI=1elseset MFI=MFI+1endifif IsUnitType(TMI,UNIT_TYPE_HERO)==true or IsUnitIllusion(TMI)==true thencall Q7I(GetOwningPlayer(TLI),I2S(MFI)+"!",2,TMI,0.026,50,0,255,216)endifcall SaveInteger(XY,(GetHandleId(TMI)),(742),(MFI))call SaveReal(XY,(GetHandleId(TMI)),(743),(((TimerGetElapsed(M)))*1.0))if MFI==4 thencall SaveInteger(XY,(GetHandleId(TMI)),(742),(0))call SaveInteger(XY,(GetHandleId((TMI))),((4317)),(1))set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.5+0.5*NGI,false)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterDeathEvent(t,TMI)call TriggerAddCondition(t,Condition(function TH5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))if NGI==1 thenset id=1093814582elseif NGI==2 thenset id=1093814581elseif NGI==3 thenset id=1093814583elseif NGI==4 thenset id=1093814584endifcall QTI(TMI,id)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),id,false)call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\FarseerMissile_Purple_2.mdx",TMI,"chest"))endifendifset t=nullendfunctionfunction TV5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamageSource()==TLI thencall DisableTrigger(t)call TZ5(TLI,TMI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifelsecall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction TW5 takes nothing returns nothinglocal trigger t=CreateTrigger()local unit TMI=GetTriggerUnit()local unit TLI=GetAttacker()local integer MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,1.2,false)call TriggerAddCondition(t,Condition(function TV5))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(2),(TLI))set TMI=nullset TLI=nullset t=nullendfunctionfunction TX5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if GetAttacker()==TLI and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(TLI))thenif((LoadInteger(XY,(GetHandleId((TLI))),((4315))))==1)==false thencall MPI(TLI,4315,0.3)call TW5()endifendifset t=nullset TLI=nullreturn falseendfunctionfunction TY5 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function TX5))call SaveUnitHandle(XY,(MKI),(2),(TLI))set t=nullset TLI=nullendfunctionfunction TJ5 takes nothing returns booleanif GetLearnedSkill()==1093812820 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093812820)==1 thencall TY5()endifreturn falseendfunctionfunction Register_Amp takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function TJ5))set t=nullendfunctionfunction TK5 takes nothing returns nothinglocal integer MKI=GetHandleId(GetTriggeringTrigger())local unit TLI=CKlocal unit TMI=DKlocal integer NGI=GetUnitAbilityLevel(TLI,1093812805)local real TSI=40+20*NGI+1.6*GetHeroInt(TLI,true)set YBI=truecall TKI(TLI,TMI,1,TSI)set YBI=falseset TLI=nullset TMI=nullendfunctionfunction TL5 takes nothing returns nothinglocal trigger t=U6I(GetTriggerUnit(),GetSpellTargetUnit(),1747993681,"TK5",500,false)local integer MKI=GetHandleId(t)set t=nullendfunctionfunction TM5 takes nothing returns booleanif GetSpellAbilityId()==1093812805 and MBI(GetSpellTargetUnit())==false thencall TL5()endifreturn falseendfunctionfunction R01 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function TM5))set t=nullendfunctionfunction TN5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real dif GetTriggerEventId()==EVENT_UNIT_DAMAGED thenelsecall UnitRemoveAbility(TMI,1093814360)call UnitRemoveAbility(TMI,1093814576)call UnitRemoveAbility(TMI,1093814361)call UnitRemoveAbility(TMI,1093814362)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset TMI=nullset t=nullreturn falseendfunctionfunction TS5 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093814350)local real KLI=2+NGIlocal integer id=1093814360if NGI==1 thenset id=1093814360elseif NGI==2 thenset id=1093814576elseif NGI==3 thenset id=1093814361elseif NGI==4 thenset id=1093814362endifcall QTI(TMI,id)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),id,false)call TriggerRegisterTimerEvent(t,KLI,false)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function TN5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))set TLI=nullset TMI=nullset t=nullendfunctionfunction TT5 takes nothing returns booleanif GetSpellAbilityId()==1093814350 and IsUnitType(GetSpellTargetUnit(),UNIT_TYPE_HERO)==true and MBI(GetSpellTargetUnit())==false thencall TS5()endifreturn falseendfunctionfunction RI1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function TT5))set t=nullendfunctionfunction TR5 takes nothing returns nothinglocal integer MKI=GetHandleId(GetTriggeringTrigger())local unit TLI=CKlocal unit TMI=DKlocal real x=GetUnitX(TMI)local real y=GetUnitY(TMI)local integer NGI=GetUnitAbilityLevel(TLI,1093814612)local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,x,y,0)call UnitAddAbility(QHI,1093814613)call SetUnitAbilityLevel(QHI,1093814613,NGI)call IssueImmediateOrder(QHI,"thunderclap")set TLI=nullset TMI=nullset QHI=nullendfunctionfunction TP5 takes unit TLI,group g returns unitlocal unit TQ5=nulllocal real d=99999local unit RY4=FirstOfGroup(g)call GroupRemoveUnit(g,RY4)loopexitwhen RY4==nullif P8I(TLI,RY4)<d thenset d=P8I(TLI,RY4)set TQ5=RY4endifset RY4=FirstOfGroup(g)call GroupRemoveUnit(g,RY4)endloopreturn TQ5endfunctionfunction TU5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=nulllocal group g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),1600+25,Condition(function BV1))set TMI=TP5(TLI,g)call MCI(g)if TMI!=null thencall U6I(TLI,TMI,1747993910,"TR5",800,false)endifset g=nullset TMI=nullset TLI=nullendfunctionfunction R05 takes nothing returns booleanif GetSpellAbilityId()==1093814612 thencall TU5()endifreturn falseendfunctionfunction TQ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function R05))set t=nullendfunctionfunction RI5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer HI5=(LoadInteger(XY,(MKI),(422)))local integer H15=(LoadInteger(XY,(MKI),(423)))local integer D04=(LoadInteger(XY,(MKI),(424)))call SetHeroAgi(TMI,GetHeroAgi(TMI,false)+HI5,true)call SetHeroStr(TMI,GetHeroStr(TMI,false)+H15,true)call SetHeroInt(TMI,GetHeroInt(TMI,false)+D04,true)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TMI=nullreturn falseendfunctionfunction R15 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetEnumUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093813835)local trigger tlocal integer MKIlocal integer XWOlocal integer HI5local integer H15local integer D04local real W03if IsUnitType(TMI,UNIT_TYPE_HERO)==true thenset XWO=MUI(TMI)set W03=0.15if XWO==2 thenset HI5=R2I(W03*GetHeroAgi(TMI,false))-1set H15=0set D04=0elseif XWO==3 thenset HI5=0set H15=R2I(W03*GetHeroStr(TMI,false))-1set D04=0elseif XWO==1 thenset HI5=0set H15=0set D04=R2I(W03*GetHeroInt(TMI,false))-1endifcall SetHeroAgi(TMI,GetHeroAgi(TMI,false)-HI5,true)call SetHeroStr(TMI,GetHeroStr(TMI,false)-H15,true)call SetHeroInt(TMI,GetHeroInt(TMI,false)-D04,true)set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,7,false)call TriggerRegisterDeathEvent(t,TMI)call TriggerAddCondition(t,Condition(function RI5))call SaveInteger(XY,(MKI),(422),(HI5))call SaveInteger(XY,(MKI),(424),(D04))call SaveInteger(XY,(MKI),(423),(H15))call SaveUnitHandle(XY,(MKI),(17),(TMI))set t=nullendifcall DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl",TMI,"chest"))call TKI(TLI,TMI,YDI,50+50*NGI)set TLI=nullset TMI=nullendfunctionfunction RO5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local group g=MDI()local real x=GetSpellTargetX()local real y=GetSpellTargetY()local real a=PUI(GetUnitX(TLI),GetUnitY(TLI),x,y)*bj_DEGTORADset x=GetUnitX(TLI)set y=GetUnitY(TLI)if QEI(x,y,YCI)>0 thenset YDI=3elseset YDI=1endifcall GroupEnumUnitsInRange(g,x,y,YCI+25,Condition(function AK1))call ForGroup(g,function R15)call MCI(g)call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\WhirlingDeath_01.mdx",TLI,"origin"))set TLI=nullset g=nullendfunctionfunction R25 takes nothing returns booleanif GetSpellAbilityId()==1093813835 thencall RO5()endifreturn falseendfunctionfunction R11 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function R25))set t=nullendfunctionfunction R35 takes unit TLI,unit TMI returns nothinglocal integer NGI=GetUnitAbilityLevel(TLI,1093813555)call TKI(TLI,TMI,3,60+40*NGI)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl",TMI,"origin"))endfunctionfunction R45 takes nothing returns nothingif IsUnitInGroup(GetEnumUnit(),HK)==false thencall GroupAddUnit(HK,GetEnumUnit())call R35(CK,GetEnumUnit())endifendfunctionfunction R55 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer OA3=(LoadInteger(XY,(MKI),(18)))local integer MFI=GetTriggerEvalCount(t)local unit OB3local group OC3=(LoadGroupHandle(XY,(MKI),(16)))local group glocal boolean Q01=(LoadBoolean(XY,(MKI),(727)))local boolean R65=(LoadBoolean(XY,(MKI),(740)))if AI1(N0I)thenset R65=truecall SaveBoolean(XY,(MKI),(740),(R65))endifif Q01==false thenset OB3=(LoadUnitHandle(XY,(MKI),(700+OA3+1-MFI)))call RemoveUnit(OB3)elseset OB3=(LoadUnitHandle(XY,(MKI),(700+MFI)))if R65==false thencall SetUnitX(N0I,GetUnitX(OB3))call SetUnitY(N0I,GetUnitY(OB3))endifcall RemoveUnit(OB3)set g=MDI()set CK=N0Iset HK=OC3call GroupEnumUnitsInRange(g,GetUnitX(N0I),GetUnitY(N0I),250,Condition(function AQ1))call ForGroup(g,function R45)call MCI(g)endifif MFI==(OA3)thencall QEI(GetUnitX(N0I),GetUnitY(N0I),90)call MCI(OC3)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset N0I=nullset OB3=nullset OC3=nullset g=nullreturn falseendfunctionfunction R75 takes nothing returns nothingif T5I(GetEnumDestructable())and IsDestructableDeadBJ(GetEnumDestructable())==false thenset YEI=YEI+1endifendfunctionfunction R85 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local real NN2=(LoadReal(XY,(MKI),(13)))local integer JNO=(LoadInteger(XY,(MKI),(12)))local integer MFI=GetTriggerEvalCount(t)local real x=(LoadReal(XY,(MKI),(6)))+MFI*50*Cos(NN2*bj_DEGTORAD)local real y=(LoadReal(XY,(MKI),(7)))+MFI*50*Sin(NN2*bj_DEGTORAD)local boolean OF3=(LoadBoolean(XY,(MKI),(15)))local unit OG3local trigger OH3=(LoadTriggerHandle(XY,(MKI),(11)))local integer OZ3=GetHandleId(OH3)local integer ID=1966092625local real OD3=250local rect rlocal real d=90set r=Rect(x-d,y-d,x+d,y+d)set YEI=0call EnumDestructablesInRect(r,Condition(function LWI),function R75)if YEI>0 or MFI==JNO or MFI==(JNO-1)or MFI==(JNO-2)thenset ID=1966092624endifset OG3=CreateUnit(GetOwningPlayer(N0I),ID,x,y,NN2)call SaveUnitHandle(XY,(OZ3),(700+MFI),(OG3))if YEI>0 thencall FlushChildHashtable(XY,(MKI))call MZI(t)call TriggerRegisterTimerEvent(OH3,0.5/JNO,true)call TriggerAddCondition(OH3,Condition(function R55))call SaveInteger(XY,(OZ3),(18),(MFI))call SaveBoolean(XY,(OZ3),(727),(true))call SaveUnitHandle(XY,(OZ3),(14),(N0I))call SaveGroupHandle(XY,(OZ3),(16),(MDI()))call SaveReal(XY,(OZ3),(6),((x)*1.0))call SaveReal(XY,(OZ3),(7),((y)*1.0))call SaveBoolean(XY,(OZ3),(740),(false))elseif MFI>JNO thencall FlushChildHashtable(XY,(MKI))call MZI(t)call TriggerRegisterTimerEvent(OH3,0.5/JNO,true)call TriggerAddCondition(OH3,Condition(function R55))call SaveInteger(XY,(OZ3),(18),(MFI))call SaveBoolean(XY,(OZ3),(727),(false))call SaveUnitHandle(XY,(OZ3),(14),(N0I))call SaveGroupHandle(XY,(OZ3),(16),(MDI()))call SaveBoolean(XY,(OZ3),(740),(false))endifset t=nullset N0I=nullset OG3=nullset OH3=nullreturn falseendfunctionfunction R95 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit N0I=GetTriggerUnit()local location l=GetSpellTargetLoc()local real NN2=PUI(GetUnitX(N0I),GetUnitY(N0I),GetLocationX(l),GetLocationY(l))local integer NGI=GetUnitAbilityLevel(N0I,1093813555)local integer OW3local integer JNOlocal trigger OX3=CreateTrigger()set OW3=600+200*NGIset JNO=OW3/50call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveInteger(XY,(MKI),(5),(NGI))call SaveReal(XY,(MKI),(13),((NN2)*1.0))call SaveInteger(XY,(MKI),(12),(JNO))call SaveTriggerHandle(XY,(MKI),(11),(OX3))call SaveReal(XY,(MKI),(6),((GetUnitX(N0I))*1.0))call SaveReal(XY,(MKI),(7),((GetUnitY(N0I))*1.0))call TriggerRegisterTimerEvent(t,0.5/JNO,true)call TriggerAddCondition(t,Condition(function R85))call RemoveLocation(l)set t=nullset N0I=nullset l=nullendfunctionfunction RA5 takes nothing returns booleanif GetSpellAbilityId()==1093813555 thencall R95()endifreturn falseendfunctionfunction RO1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function RA5))set t=nullendfunctionfunction RB5 takes unit TLI returns nothinglocal integer MFI=(LoadInteger(XY,(GetHandleId(TLI)),(728)))local integer NGI=GetUnitAbilityLevel(TLI,1093813556)local integer i=1set MFI=IMinBJ(MFI,4*NGI)loopexitwhen i>20if MFI==i thencall QTI(TLI,YFI[i])call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),YFI[i],false)elsecall UnitRemoveAbility(TLI,YFI[i])endifset i=i+1endloopendfunctionfunction RC5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer MFI=(LoadInteger(XY,(GetHandleId(TLI)),(728)))-1call SaveInteger(XY,(GetHandleId(TLI)),(728),(MFI))call RB5(TLI)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullreturn falseendfunctionfunction RD5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local integer MFI=(LoadInteger(XY,(GetHandleId(TLI)),(728)))+1if IsUnitEnemy(GetAttacker(),GetOwningPlayer(TLI))==true thencall SaveInteger(XY,(GetHandleId(TLI)),(728),(MFI))call RB5(TLI)set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,16,false)call TriggerRegisterDeathEvent(t,TLI)call TriggerAddCondition(t,Condition(function RC5))call SaveUnitHandle(XY,(MKI),(2),(TLI))endifset t=nullset TLI=nullreturn falseendfunctionfunction RE5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function RD5))call SaveUnitHandle(XY,(MKI),(2),(TLI))set t=nullset TLI=nullendfunctionfunction RF5 takes nothing returns booleanif GetLearnedSkill()==1093813556 and GetUnitAbilityLevel(GetTriggerUnit(),1093813556)==1 and IsUnitIllusion(GetTriggerUnit())==false thencall RE5()endifreturn falseendfunctionfunction R21 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function RF5))set t=nullset YFI[1]=1093813319set YFI[2]=1093813318set YFI[3]=1093813324set YFI[4]=1093813325set YFI[5]=1093813322set YFI[6]=1093813321set YFI[7]=1093813326set YFI[8]=1093813327set YFI[9]=1093813320set YFI[10]=1093813333set YFI[11]=1093813328set YFI[12]=1093813329set YFI[13]=1093813330set YFI[14]=1093813331set YFI[15]=1093813332set YFI[16]=1093813323set YFI[17]=1093816148set YFI[18]=1093816147set YFI[19]=1093816149set YFI[20]=1093816150endfunctionfunction RG5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))call UnitRemoveAbility(TLI,1114663271)call UnitRemoveAbility(TLI,1111845217)call UnitRemoveAbility(TLI,1093813848)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullreturn falseendfunctionfunction RH5 takes unit TLI,unit TMI returns nothinglocal unit QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)local integer EM3=R2I(100*GetUnitState(TMI,UNIT_STATE_LIFE)/GetUnitState(TMI,UNIT_STATE_MAX_LIFE))local integer NGI=RTI(RSI(R2I(100-EM3)/5,20),1)call UnitAddAbility(QHI,1093813334)call SetUnitAbilityLevel(QHI,1093813334,NGI)call IssueTargetOrder(QHI,"slow",TMI)set QHI=nullendfunctionfunction RZ5 takes nothing returns nothingif Q2==false thencall TKI(YVI,GetEnumUnit(),3,(25+25*YWI)*0.5)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl",GetEnumUnit(),"origin"))call RH5(YVI,GetEnumUnit())endifendfunctionfunction RV5 takes nothing returns nothingif IsUnitInGroup(GetEnumUnit(),YZI)==false thencall GroupAddUnit(YZI,GetEnumUnit())call TKI(YVI,GetEnumUnit(),3,60+40*YWI)call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl",GetEnumUnit(),"origin"))call RH5(YVI,GetEnumUnit())endifendfunctionfunction RW5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit UII=(LoadUnitHandle(XY,(MKI),(45)))local real P6I=(LoadReal(XY,(MKI),(6)))local real P7I=(LoadReal(XY,(MKI),(7)))local real xlocal real ylocal real alocal integer RX5=(LoadInteger(XY,(MKI),(33)))local group SP2=(LoadGroupHandle(XY,(MKI),(187)))local group glocal integer MFI=(LoadInteger(XY,(MKI),(34)))local real RY5if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT thenif GetSpellAbilityId()==1093813848 thencall SaveInteger(XY,(MKI),(33),(2))call GroupClear(SP2)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093813848,false)set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function RG5))call SaveUnitHandle(XY,(MKI),(2),(TLI))endifelseif GetTriggerEventId()==EVENT_WIDGET_DEATH or(LoadInteger(XY,(GetHandleId(TLI)),(704)))==-1 thencall AE1(TLI)if(LoadInteger(XY,(GetHandleId(TLI)),(704)))==0 or(LoadInteger(XY,(GetHandleId(TLI)),(704)))==1093813557 thencall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093813557,true)endifcall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093813848,false)call UnitRemoveAbility(TLI,1093813848)call UnitRemoveAbility(TLI,1114663271)call UnitRemoveAbility(TLI,1111845217)call KillUnit(UII)call MCI(SP2)call FlushChildHashtable(XY,(MKI))call MZI(t)elseif RX5==0 thenset a=PUI(GetUnitX(UII),GetUnitY(UII),P6I,P7I)*bj_DEGTORADset x=GetUnitX(UII)+18*Cos(a)set y=GetUnitY(UII)+18*Sin(a)call QEI(x,y,175)if PAI(x,y,P6I,P7I)<40 thenset x=P6Iset y=P7Iendifcall SetUnitX(UII,x)call SetUnitY(UII,y)set CK=TLIset YVI=TLIset YWI=GetUnitAbilityLevel(TLI,1093813557)set YZI=SP2set g=MDI()call GroupEnumUnitsInRange(g,x,y,YGI+25,Condition(function AT1))call ForGroup(g,function RV5)call MCI(g)if x==P6I and y==P7I thencall SaveInteger(XY,(MKI),(33),(1))call GroupClear(SP2)endifelseif RX5==1 thenset MFI=MFI+1if MFI==25 thenset x=GetUnitX(UII)set y=GetUnitY(UII)call QEI(x,y,175)set MFI=0set CK=TLIset YVI=TLIset YWI=GetUnitAbilityLevel(TLI,1093813557)set g=MDI()call GroupEnumUnitsInRange(g,x,y,YHI+25,Condition(function AT1))call ForGroup(g,function RZ5)call MCI(g)set RY5=(15+5*YWI)/2if GetUnitState(TLI,UNIT_STATE_MANA)<RY5 or P8I(TLI,UII)>2000 thencall SaveInteger(XY,(MKI),(33),(2))call GroupClear(SP2)call UnitRemoveAbility(TLI,1093813848)call UnitRemoveAbility(TLI,1114663271)call UnitRemoveAbility(TLI,1111845217)elsecall SetUnitState(TLI,UNIT_STATE_MANA,GetUnitState(TLI,UNIT_STATE_MANA)-RY5)endifendifcall SaveInteger(XY,(MKI),(34),(MFI))elseif RX5==2 thenset a=PUI(GetUnitX(UII),GetUnitY(UII),GetUnitX(TLI),GetUnitY(TLI))*bj_DEGTORADset x=GetUnitX(UII)+16*Cos(a)set y=GetUnitY(UII)+16*Sin(a)call QEI(x,y,175)call SetUnitX(UII,x)call SetUnitY(UII,y)set CK=TLIset YVI=TLIset YWI=GetUnitAbilityLevel(TLI,1093813557)set YZI=SP2set g=MDI()call GroupEnumUnitsInRange(g,x,y,YGI+25,Condition(function AT1))call ForGroup(g,function RV5)call MCI(g)if PAI(x,y,GetUnitX(TLI),GetUnitY(TLI))<40 thencall AE1(TLI)call KillUnit(UII)call MCI(SP2)call FlushChildHashtable(XY,(MKI))call MZI(t)if(LoadInteger(XY,(GetHandleId(TLI)),(704)))==0 or(LoadInteger(XY,(GetHandleId(TLI)),(704)))==1093813557 thencall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093813557,true)endifcall SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093813848,false)endifendifset t=nullset TLI=nullset UII=nullset SP2=nullset g=nullreturn falseendfunctionfunction RJ5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local real x=GetSpellTargetX()local real y=GetSpellTargetY()local real a=PUI(GetUnitX(TLI),GetUnitY(TLI),x,y)*bj_DEGTORADlocal unit UII=CreateUnit(GetOwningPlayer(TLI),1747993683,GetUnitX(TLI),GetUnitY(TLI),a*bj_RADTODEG)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.02,true)call TriggerRegisterDeathEvent(t,TLI)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function RW5))call SaveUnitHandle(XY,(MKI),(45),(UII))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))call SaveInteger(XY,(MKI),(33),(0))call SaveGroupHandle(XY,(MKI),(187),(MDI()))call AC1(TLI)call QTI(TLI,1093813848)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093813557,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TLI),1093813848,true)set TLI=nullset t=nullset UII=nullendfunctionfunction RK5 takes nothing returns booleanif GetSpellAbilityId()==1093813557 thencall RJ5()endifreturn falseendfunctionfunction R31 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function RK5))call RVI(1093813334)set t=nullendfunctionfunction Trap_RemoveBonus takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if((LoadInteger(XY,(GetHandleId(TLI)),(754)))==(LoadInteger(XY,(MKI),(754))))thencall EW1((TLI),(0))endifcall FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullreturn falseendfunctionfunction RL5 takes nothing returns nothingif IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)==true thenset YYI=YYI+60elseset YYI=YYI+20endifcall UnitRemoveAbility(GetEnumUnit(),1093815365)call UnitRemoveAbility(GetEnumUnit(),1110460209)endfunctionfunction RM5 takes nothing returns nothingif IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)==true thenset YYI=YYI+60elseset YYI=YYI+20endifendfunctionfunction RN5 takes nothing returns nothingcall BQ1(YJI,GetEnumUnit(),0.5+YKI*0.5)call TKI(YJI,GetEnumUnit(),1,YYI)endfunctionfunction RS5 takes nothing returns booleanreturn GetUnitAbilityLevel(GetFilterUnit(),1110460209)>0endfunctionfunction RT5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local group g=MDI()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)set YJI=TLIset YKI=GetUnitAbilityLevel(TLI,1093815353)set YYI=0call GroupEnumUnitsInRange(g,0,0,9999,Condition(function RS5))call ForGroup(g,function RL5)call ForGroup(g,function RN5)call MCI(g)set g=nullset TLI=nullendfunctionfunction RR5 takes nothing returns booleanif GetSpellAbilityId()==1093815353 thencall RT5()endifreturn falseendfunctionfunction RP5 takes string Q3I,unit TMI,unit N0I returns nothinglocal texttag tt=CreateTextTag()call SetTextTagText(tt,Q3I,0.033)call SetTextTagPosUnit(tt,TMI,64)call SetTextTagColor(tt,0,75,255,255)call SetTextTagVelocity(tt,0,0.0355)call SetTextTagFadepoint(tt,0.15)call SetTextTagPermanent(tt,false)call SetTextTagLifespan(tt,1.0)if IsUnitAlly(N0I,GetLocalPlayer())or TGI(GetLocalPlayer())thencall SetTextTagVisibility(tt,true)elsecall SetTextTagVisibility(tt,false)endifset tt=nullendfunctionfunction RQ5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real FNO=(LoadReal(XY,(GetHandleId(TMI)),(753)))if GetTriggerEventId()==EVENT_WIDGET_DEATH or FNO<(TimerGetElapsed(M))thencall UnitRemoveAbility(TMI,1093815365)call UnitRemoveAbility(TMI,1110460209)call SaveReal(XY,(GetHandleId(TMI)),(753),((0)*1.0))call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TMI=nullreturn falseendfunctionfunction RU5 takes unit TLI,unit TMI returns nothinglocal trigger tlocal integer MKIlocal group g=MDI()call SaveReal(XY,(GetHandleId(TMI)),(753),(((TimerGetElapsed(M))+YXI)*1.0))set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.25,true)call TriggerRegisterDeathEvent(t,TMI)call TriggerAddCondition(t,Condition(function RQ5))call SaveUnitHandle(XY,(MKI),(17),(TMI))call QTI(TMI,1093815365)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093815365,false)set YJI=TLIset YKI=GetUnitAbilityLevel(TLI,1093815353)set YYI=0call GroupEnumUnitsInRange(g,0,0,9999,Condition(function RS5))call ForGroup(g,function RM5)call MCI(g)call RP5(I2S(YYI),TMI,TLI)set t=nullendfunctionfunction P05 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))if GetTriggerEventId()!=EVENT_UNIT_DAMAGED thencall FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetEventDamageSource()==TLI and GetEventDamage()>0 thencall FlushChildHashtable(XY,(MKI))call MZI(t)if A61(TMI)==false thencall RU5(TLI,TMI)endifendifendifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction PI5 takes nothing returns nothinglocal unit TLI=GetAttacker()local unit TMI=GetTriggerUnit()local trigger tlocal integer MKIif((LoadInteger(XY,(GetHandleId((TLI))),((4325))))==1)==false thencall MPI(TLI,4325,0.2)set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,2.5,false)call TriggerAddCondition(t,Condition(function P05))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))endifset TLI=nullset TMI=nullendfunctionfunction P15 takes nothing returns booleanif GetUnitAbilityLevel(GetAttacker(),1093815353)>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitTypeId(GetTriggerUnit())!=1848651852 and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))thencall PI5()endifreturn falseendfunctionfunction R71 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function RR5))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function P15))set t=nullendfunctionfunction PO5 takes nothing returns nothinglocal integer MKI=GetHandleId(GetTriggeringTrigger())local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit P25=CKlocal unit TMI=DKlocal integer NGI=GetUnitAbilityLevel(TLI,1093815361)if T6I(TMI)==false thencall TKI(TLI,TMI,1,20+80*NGI)call O41(TMI,1093815627,1,4,1110460212)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093815627,false)call UnitMakeAbilityPermanent(TMI,true,1093815626)endifset TLI=nullset TMI=nullset P25=nullendfunctionfunction P35 takes nothing returns nothinglocal unit TLI=YLIlocal unit TMI=GetEnumUnit()local trigger t=U6I(YMI,TMI,1747993925,"PO5",600,false)local integer MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(2),(TLI))set TLI=nullset TMI=nullset t=nullendfunctionfunction P45 takes unit TLI,unit TMI returns nothinglocal integer NGI=GetUnitAbilityLevel(TLI,1093815361)local group g=MDI()set CK=TLIset YLI=TLIset YMI=TMIcall GroupEnumUnitsInRange(g,GetUnitX(TMI),GetUnitY(TMI),500+25,Condition(function AT1))call GroupRemoveUnit(g,TMI)call ForGroup(g,function P35)call MCI(g)set TLI=nullset TMI=nullset g=nullendfunctionfunction P55 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit UII=(LoadUnitHandle(XY,(MKI),(45)))local real x=GetUnitX(UII)local real y=GetUnitY(UII)local real P6I=GetUnitX(TMI)local real P7I=GetUnitY(TMI)local real P65=QCI(P6I,P7I,x,y)local integer MFI=GetTriggerEvalCount(t)local real UOI=PUI(x,y,P6I,P7I)local real U2Ilocal real U3Ilocal real U1I=P65/((YNI/.02)-MFI)if U1I<YSI*0.02 thenset U1I=YSI*0.02endifset U2I=x+U1I*Cos(UOI*bj_DEGTORAD)set U3I=y+U1I*Sin(UOI*bj_DEGTORAD)call SetUnitX(UII,U2I)call SetUnitY(UII,U3I)call SetUnitFacing(UII,UOI)if QCI(P6I,P7I,U2I,U3I)<=U1I thencall KillUnit(UII)call P45(TLI,TMI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TMI=nullset TLI=nullset UII=nullreturn falseendfunctionfunction P75 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit UII=CreateUnit(GetOwningPlayer(TLI),1747993930,GetUnitX(TLI),GetUnitY(TLI),0)call TriggerRegisterTimerEvent(t,0.02,true)call TriggerAddCondition(t,Condition(function P55))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(45),(UII))set TLI=nullset TMI=nullset UII=nullset t=nullendfunctionfunction P85 takes nothing returns booleanif GetSpellAbilityId()==1093815361 thencall P75()endifreturn falseendfunctionfunction R61 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function P85))set t=nullendfunctionfunction P95 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=GetUnitAbilityLevel(TLI,1093815362)call SetUnitState(TMI,UNIT_STATE_LIFE,GetUnitState(TMI,UNIT_STATE_LIFE)+0.1*(20+GetUnitState(TMI,UNIT_STATE_MAX_LIFE)*(0.02+0.01*NGI)))if GetTriggerEvalCount(t)>39 or(GetTriggerEvalCount(t)==1 and IsUnitHidden(TMI))thencall UnitRemoveAbility(TMI,1093815364)call DestroyEffect((LoadEffectHandle(XY,(MKI),(609))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(610))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(611))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(612))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(613))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(614))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(615))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(616))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(617))))call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction PA5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger tlocal integer MKIlocal unit QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call UnitAddAbility(QHI,1093815367)if IssueTargetOrder(QHI,"thunderbolt",TMI)==true thenset t=CreateTrigger()set MKI=GetHandleId(t)call QTI(TMI,1093815364)call TriggerRegisterTimerEvent(t,0.1,true)call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function P95))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveEffectHandle(XY,(MKI),(609),(AddSpecialEffectTarget("war3mapImported\\Cryofreeze5.mdx",TMI,"hand right")))call SaveEffectHandle(XY,(MKI),(610),(AddSpecialEffectTarget("war3mapImported\\Cryofreeze5.mdx",TMI,"hand left")))call SaveEffectHandle(XY,(MKI),(611),(AddSpecialEffectTarget("war3mapImported\\Cryofreeze5.mdx",TMI,"foot right")))call SaveEffectHandle(XY,(MKI),(612),(AddSpecialEffectTarget("war3mapImported\\Cryofreeze5.mdx",TMI,"foot left")))call SaveEffectHandle(XY,(MKI),(613),(AddSpecialEffectTarget("war3mapImported\\Cryofreeze5.mdx",TMI,"foot right mount rear")))call SaveEffectHandle(XY,(MKI),(614),(AddSpecialEffectTarget("war3mapImported\\Cryofreeze5.mdx",TMI,"foot left mount rear")))call SaveEffectHandle(XY,(MKI),(615),(AddSpecialEffectTarget("war3mapImported\\Cryofreeze5.mdx",TMI,"head")))call SaveEffectHandle(XY,(MKI),(616),(AddSpecialEffectTarget("war3mapImported\\Cryofreeze5.mdx",TMI,"chest")))call SaveEffectHandle(XY,(MKI),(617),(AddSpecialEffectTarget("war3mapImported\\Cryofreeze5.mdx",TMI,"weapon")))endifset TLI=nullset TMI=nullset t=nullendfunctionfunction PB5 takes nothing returns booleanif GetSpellAbilityId()==1093815362 thencall PA5()endifreturn falseendfunctionfunction R41 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function PB5))set t=nullendfunctionfunction PC5 takes nothing returns nothinglocal unit TMI=GetEnumUnit()call DisableTrigger(YRI)call UnitWakeUp(TMI)call IssueTargetOrder(TMI,"attack",YPI)call EnableTrigger(YRI)set TMI=nullendfunctionfunction PD5 takes nothing returns nothingcall MPI(GetEnumUnit(),4328,0.75)endfunctionfunction PE5 takes nothing returns nothinglocal unit TMI=GetEnumUnit()if IsUnitInGroup(TMI,YTI)==false thencall GroupAddUnit(YTI,TMI)call TriggerRegisterUnitEvent(YRI,TMI,EVENT_UNIT_ISSUED_TARGET_ORDER)call TriggerRegisterUnitEvent(YRI,TMI,EVENT_UNIT_ISSUED_POINT_ORDER)call TriggerRegisterUnitEvent(YRI,TMI,EVENT_UNIT_ISSUED_TARGET_ORDER)call SaveInteger(XY,(GetHandleId((TMI))),((4328)),(1))endifset TMI=nullendfunctionfunction PF5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local integer MFI=(LoadInteger(XY,(MKI),(34)))local group SP2=(LoadGroupHandle(XY,(MKI),(22)))local group gif GetTriggerEventId()!=EVENT_UNIT_ISSUED_TARGET_ORDER and GetTriggerEventId()!=EVENT_UNIT_ISSUED_POINT_ORDER and GetTriggerEventId()!=EVENT_UNIT_ISSUED_TARGET_ORDER thenset MFI=MFI+1call SaveInteger(XY,(MKI),(34),(MFI))set YTI=SP2set YRI=tset g=MDI()set CK=TLIcall GroupEnumUnitsInRange(g,GetUnitX(TMI),GetUnitY(TMI),350+25,Condition(function AU1))call GroupRemoveUnit(g,TMI)call ForGroup(g,function PE5)call MCI(g)if MFI==(2.25+0.25*NGI)*20 or QPI(TMI)thencall ForGroup(SP2,function PD5)call MCI(SP2)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call FlushChildHashtable(XY,(MKI))call MZI(t)elseset YRI=tset YPI=TMIcall ForGroup(SP2,function PC5)if ModuloInteger(MFI,20)==0 or MFI==0 thenendifendifelseif UnitIsSleeping(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1110454328)==0 and GetIssuedOrderId()!=851973 and EMI==false thencall DisableTrigger(t)call ClearSelectionForPlayer(GetOwningPlayer(GetTriggerUnit()))call IssueTargetOrder(GetTriggerUnit(),"attack",TMI)call EnableTrigger(t)endifendifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction PG5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer NGI=GetUnitAbilityLevel(TLI,1093687856)local unit TMI=GetSpellTargetUnit()local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call UnitAddAbility(QHI,1093815882)call SetUnitAbilityLevel(QHI,1093815882,NGI)call IssueTargetOrder(QHI,"thunderbolt",TMI)set YQI=TLIcall TriggerRegisterTimerEvent(t,0.05,true)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveGroupHandle(XY,(MKI),(22),(MDI()))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("war3mapImported\\WintersCurse.mdx",TMI,"overhead")))call SaveEffectHandle(XY,(MKI),(176),(AddSpecialEffect("war3mapImported\\WintersCurseAoE.mdx",GetUnitX(TMI),GetUnitY(TMI))))call TriggerAddCondition(t,Condition(function PF5))set TLI=nullset TMI=nullset t=nullendfunctionfunction PH5 takes nothing returns booleanif GetSpellAbilityId()==1093687856 and MBI(GetSpellTargetUnit())==false thencall PG5()endifreturn falseendfunctionfunction R51 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function PH5))set t=nullendfunctionfunction PZ5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=GetUnitAbilityLevel(TLI,1093815859)call TKI(TLI,TMI,3,(0.032+0.002*NGI)*GetUnitState(TMI,UNIT_STATE_MAX_LIFE))if(TimerGetElapsed(M))>=(LoadReal(XY,(GetHandleId(TLI)),(782)))thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction PV5 takes unit TLI,unit TMI returns nothinglocal trigger tlocal integer MKIcall SetUnitState(TLI,UNIT_STATE_MANA,GetUnitState(TLI,UNIT_STATE_MANA)*0.8)if(LoadReal(XY,(GetHandleId(TLI)),(782)))>(TimerGetElapsed(M))thencall SaveReal(XY,(GetHandleId(TLI)),(782),(((TimerGetElapsed(M))+YUI)*1.0))elseset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function PZ5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("effects\\BasicWaterFlash.mdx",TMI,"chest")))call SaveReal(XY,(GetHandleId(TLI)),(782),(((TimerGetElapsed(M))+YUI)*1.0))endifset t=nullendfunctionfunction PW5 takes nothing returns booleanlocal real dlocal real FNOlocal integer MFIlocal unit TLIlocal unit TMIif GetUnitAbilityLevel(GetTriggerUnit(),1110460215)>0 and GetUnitAbilityLevel(GetEventDamageSource(),1093815859)>0 and(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(2)))==GetEventDamageSource()thenset TLI=GetEventDamageSource()set TMI=GetTriggerUnit()set MFI=(LoadInteger(XY,(GetHandleId(TLI)),(780)))set FNO=(LoadReal(XY,(GetHandleId(TLI)),(781)))if FNO+YUI<(TimerGetElapsed(M))thenset MFI=1set FNO=(TimerGetElapsed(M))call SaveInteger(XY,(GetHandleId(TLI)),(780),(MFI))call SaveReal(XY,(GetHandleId(TLI)),(781),((FNO)*1.0))elseset MFI=MFI+1set FNO=(TimerGetElapsed(M))call SaveInteger(XY,(GetHandleId(TLI)),(780),(MFI))call SaveReal(XY,(GetHandleId(TLI)),(781),((FNO)*1.0))endifif MFI==4 thenset MFI=0call SaveInteger(XY,(GetHandleId(TLI)),(780),(MFI))call PV5(TLI,TMI)endifcall FlushChildHashtable(XY,(GetHandleId(GetTriggeringTrigger())))call MZI(GetTriggeringTrigger())endifreturn falseendfunctionfunction PX5 takes nothing returns nothinglocal trigger tlocal unit TMIlocal unit TLIif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT thenset TMI=GetSpellTargetUnit()set TLI=GetTriggerUnit()elseset TMI=GetTriggerUnit()set TLI=GetAttacker()endifif IsUnitIllusion(TLI)==false thenset t=CreateTrigger()if GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT thencall SaveBoolean(XY,(GetHandleId(t)),(264),(true))elsecall SaveBoolean(XY,(GetHandleId(t)),(264),(false))endifcall SaveUnitHandle(XY,(GetHandleId(t)),(2),(TLI))call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function PW5))endifset t=nullset TMI=nullset TLI=nullendfunctionfunction PY5 takes nothing returns booleanif GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED thenif GetUnitAbilityLevel(GetAttacker(),1093815859)>0 and(LoadBoolean(XY,(GetHandleId(GetTriggeringTrigger())),(263)))and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(14)))thencall PX5()endifelseif GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER thenif(GetIssuedOrderId()==OrderId("poisonarrows"))thencall SaveBoolean(XY,(GetHandleId(GetTriggeringTrigger())),(263),(true))elseif(GetIssuedOrderId()==OrderId("unpoisonarrows"))thencall SaveBoolean(XY,(GetHandleId(GetTriggeringTrigger())),(263),(false))endifelseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()==1093815859 thencall PX5()endifreturn falseendfunctionfunction PJ5 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_SPELL_EFFECT)call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_ISSUED_ORDER)call TriggerAddCondition(t,Condition(function PY5))call SaveUnitHandle(XY,(GetHandleId(t)),(14),(GetTriggerUnit()))set t=nullendfunctionfunction PK5 takes nothing returns booleanif GetLearnedSkill()==1093815859 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093815859)==1 thencall PJ5()endifreturn falseendfunctionfunction R81 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function PK5))set t=nullendfunctionfunction PL5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))if GetTriggerEventId()==EVENT_WIDGET_DEATH thencall KillUnit(QHI)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullset QHI=nullreturn falseendifif QPI(TLI)==false thencall SetUnitX(QHI,GetUnitX(TLI))call SetUnitY(QHI,GetUnitY(TLI))elseif IsUnitAlly(QHI,BO[0])==true thencall SetUnitX(QHI,MS)call SetUnitY(QHI,SS)elsecall SetUnitX(QHI,O10)call SetUnitY(QHI,OO0)endifendifset t=nullset TLI=nullset QHI=nullreturn falseendfunctionfunction PM5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))if QPI(TMI)==false thencall SetUnitState(TMI,UNIT_STATE_LIFE,GetUnitState(TMI,UNIT_STATE_LIFE)*0.94)endifif GetTriggerEvalCount(t)==5 thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction PN5 takes unit TLI,unit TMI returns nothinglocal trigger tlocal integer MKIlocal integer NGIlocal integer PS5local integer PT5if((LoadInteger(XY,(GetHandleId((TMI))),((4329))))==1)==false and T6I(TMI)==false and GetUnitTypeId(TMI)!=1848651852 thencall MPI(TMI,4329,J0I)set NGI=GetUnitAbilityLevel(TLI,1093815877)if NGI==1 thenset PS5=1093815874set PT5=1093815873elseif NGI==2 thenset PS5=1093815862set PT5=1093815864elseif NGI==3 thenset PS5=1093815875set PT5=1093815863elseif NGI==4 thenset PS5=1093815876set PT5=1093815865endifcall O41(TMI,PS5,1,4,1110460225)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),PS5,false)call UnitMakeAbilityPermanent(TMI,true,PT5)set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function PM5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("Abilities\\Spells\\Other\\FrostDamage\\FrostDamage.mdl",TMI,"chest")))endifendfunctionfunction PR5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))if GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetEventDamageSource()==TLI thencall DisableTrigger(t)call PN5(TLI,TMI)call FlushChildHashtable(XY,(MKI))call MZI(t)endifelsecall FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TMI=nullset TLI=nullreturn falseendfunctionfunction PP5 takes nothing returns nothinglocal trigger t=CreateTrigger()local unit TMI=GetTriggerUnit()local unit TLI=GetAttacker()local integer MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,2.5,false)call TriggerAddCondition(t,Condition(function PR5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))set t=nullset TMI=nullset TLI=nullendfunctionfunction PQ5 takes nothing returns booleanif GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED thenif GetAttacker()==(LoadUnitHandle(XY,(GetHandleId(GetTriggeringTrigger())),(2)))and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitAlly(GetAttacker(),GetOwningPlayer(GetTriggerUnit()))==false thenif GetUnitTypeId(GetAttacker())==1311788354 or GetUnitTypeId(GetAttacker())==1311788355 or GetUnitTypeId(GetAttacker())==1311788367 or GetUnitTypeId(GetAttacker())==1311788353 thencall PP5()endifendifelsecall PL5()endifreturn falseendfunctionfunction PU5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local unit QHI=CreateUnit(GetOwningPlayer(TLI),1865429337,GetUnitX(TLI),GetUnitY(TLI),0)if IsUnitIllusion(TLI)==false thencall Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)elsecall TriggerRegisterDeathEvent(t,TLI)endifcall TriggerRegisterTimerEvent(t,0.02,true)call TriggerAddCondition(t,Condition(function PQ5))call SaveUnitHandle(XY,(GetHandleId(t)),(2),(TLI))call SaveUnitHandle(XY,(GetHandleId(t)),(19),(QHI))set TLI=nullset QHI=nullset t=nullendfunctionfunction Q05 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))call SetTerrainPathable(x,y,PATHING_TYPE_WALKABILITY,false)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullreturn falseendfunctionfunction QI5 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)call SetTerrainPathable(x,y,PATHING_TYPE_WALKABILITY,true)call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function Q05))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))set TLI=nullset t=nullendfunctionfunction Q15 takes nothing returns booleanif GetTriggerEventId()==EVENT_PLAYER_HERO_SKILL thenif GetLearnedSkill()==1093815877 and GetUnitAbilityLevel(GetTriggerUnit(),1093815877)==1 thencall PU5()endifelseif GetSpellAbilityId()==1093815877 thenif GetUnitTypeId(GetTriggerUnit())!=1311788343 thencall QEI(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),150)if IsTerrainPathable(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),PATHING_TYPE_WALKABILITY)thencall QI5()endifendifendifendifreturn falseendfunctionfunction R91 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function Q15))set t=nullendfunctionfunction QO5 takes nothing returns nothingcall BQ1(JII,GetEnumUnit(),1.5)call TKI(JII,GetEnumUnit(),2,50+50*J1I)endfunctionfunction Q25 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real a=(LoadReal(XY,(MKI),(137)))local real P6I=(LoadReal(XY,(MKI),(47)))local real P7I=(LoadReal(XY,(MKI),(48)))local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)local group g=MDI()local integer NGI=GetUnitAbilityLevel(TLI,1093813812)set x=RCI(x+32*Cos(a))set y=RGI(y+32*Sin(a))if PAI(x,y,P6I,P7I)<40 thenset x=P6Iset y=P7Iendifcall SetUnitX(TLI,x)call SetUnitY(TLI,y)call SetUnitFacing(TLI,a*bj_RADTODEG)set CK=TLIcall GroupEnumUnitsInRange(g,x,y,125+25,Condition(function AT1))if FirstOfGroup(g)!=null or(x==P6I and y==P7I)or GetTriggerEvalCount(t)>200 or GetTriggerEventId()==EVENT_WIDGET_DEATH thencall DestroyEffect(AddSpecialEffect("war3mapImported\\BlackDragonMissile.mdx",x,y))call GroupEnumUnitsInRange(g,x,y,300+25,Condition(function AT1))set J1I=NGIset JII=TLIif GetTriggerEventId()!=EVENT_WIDGET_DEATH thencall ForGroup(g,function QO5)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)endifcall MCI(g)set t=nullset TLI=nullset g=nullreturn falseendfunctionfunction Q35 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)local real P6I=GetSpellTargetX()local real P7I=GetSpellTargetY()local real a=PUI(x,y,P6I,P7I)*bj_DEGTORADlocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.02,true)call TriggerRegisterDeathEvent(t,TLI)call TriggerAddCondition(t,Condition(function Q25))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(137),((a)*1.0))call SaveReal(XY,(MKI),(47),((P6I)*1.0))call SaveReal(XY,(MKI),(48),((P7I)*1.0))set TLI=nullset t=nullendfunctionfunction Q45 takes nothing returns booleanif GetSpellAbilityId()==1093813812 thencall Q35()endifreturn falseendfunctionfunction Register_SonicBoom takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function Q45))set t=nullendfunctionfunction Q55 takes nothing returns nothinglocal unit TLI=JOIlocal unit TMI=GetEnumUnit()call O11(TMI,1093813811,1,10)call TKI(TLI,TMI,2,50*J2I+2*GetHeroAgi(TLI,true))set TLI=nullset TMI=nullendfunctionfunction Q65 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local real UJ3=RPI((TimerGetElapsed(M))-(LoadReal(XY,(GetHandleId(TLI)),(358))),5.0)local integer NGI=GetUnitAbilityLevel(TLI,1093813573)local real TSI=(40+80*NGI)*(UJ3)local group g=MDI()local real d=UJ3*600local real a=(LoadReal(XY,(GetHandleId(TLI)),(736)))local real x=GetUnitX(TLI)+d*Cos(a)local real y=GetUnitY(TLI)+d*Sin(a)set CK=TLIcall GroupEnumUnitsInRange(g,x,y,325,Condition(function AT1))set J2I=NGIset JOI=TLIcall ForGroup(g,function Q55)call MCI(g)call PMI("effects\\BasicWaterFlash.mdx",x,y,1)set TLI=nullset g=nullendfunctionfunction Q75 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))call SetUnitTimeScale(N0I,1)call FlushChildHashtable(XY,(MKI))call MZI(t)if GetTriggerEventId()!=EVENT_UNIT_DEATH thencall R6I(N0I)endifset t=nullset N0I=nullreturn falseendfunctionfunction Q85 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit N0I=GetTriggerUnit()local location l=GetSpellTargetLoc()local real x=GetLocationX(l)local real y=GetLocationY(l)local real a=PUI(GetUnitX(N0I),GetUnitY(N0I),x,y)*bj_DEGTORADlocal real RJI=RMaxBJ(PAI(GetUnitX(N0I),GetUnitY(N0I),x,y)/600,0.32)call RemoveLocation(l)call SaveReal(XY,(GetHandleId(N0I)),(356),((x)*1.0))call SaveReal(XY,(GetHandleId(N0I)),(357),((y)*1.0))call SaveReal(XY,(GetHandleId(N0I)),(736),((a)*1.0))call SaveReal(XY,(GetHandleId(N0I)),(358),(((TimerGetElapsed(M)))*1.0))call SetUnitTimeScale(N0I,0.75)call SaveUnitHandle(XY,(MKI),(14),(N0I))call TriggerRegisterTimerEvent(t,RJI-0.01,false)call TriggerRegisterUnitEvent(t,N0I,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function Q75))set t=nullset N0I=nullendfunctionfunction Q95 takes nothing returns booleanif GetSpellAbilityId()==1093813573 thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_CAST thencall SaveBoolean(XY,(GetHandleId(GetTriggerUnit())),(360),(false))call Q85()elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT thencall SaveBoolean(XY,(GetHandleId(GetTriggerUnit())),(360),(true))elseif(LoadBoolean(XY,(GetHandleId(GetTriggerUnit())),(360)))==true thencall Q65()endifendifreturn falseendfunctionfunction Register_WindBlast takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_ENDCAST)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function Q95))set t=nullendfunctionfunction QA5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))if GetUnitAbilityLevel(TLI,1110456374)==0 and GetUnitAbilityLevel(TLI,1110456375)==0 thencall FlushChildHashtable(XY,(MKI))call MZI(t)call UnitRemoveAbility(TLI,1093813810)call UnitRemoveAbility(TLI,1110459959)endifset t=nullset TLI=nullreturn falseendfunctionfunction QB5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TMI=GetSpellTargetUnit()call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093813810,false)call QTI(TMI,1093813810)call TriggerRegisterTimerEvent(t,0.2,true)call TriggerAddCondition(t,Condition(function QA5))call SaveUnitHandle(XY,(MKI),(2),(TMI))set TLI=nullset t=nullendfunctionfunction QC5 takes nothing returns booleanif GetSpellAbilityId()==1093813808 thencall QB5()endifreturn falseendfunctionfunction Register_WindBarrier takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function QC5))set t=nullendfunctionfunction QD5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=GetUnitAbilityLevel(TLI,1093813813)local integer idlocal integer CV1call FlushChildHashtable(XY,(MKI))call MZI(t)if IsUnitAlly(TMI,GetOwningPlayer(TLI))==true thenset CV1=1110459960if NGI==1 thenset id=1093813831elseif NGI==2 thenset id=1093813830elseif NGI==3 thenset id=1093813832endifcall SetUnitState(TMI,UNIT_STATE_LIFE,GetUnitState(TMI,UNIT_STATE_LIFE)+100+50*NGI)elseset CV1=1110459961if NGI==1 thenset id=1093813828elseif NGI==2 thenset id=1093813827elseif NGI==3 thenset id=1093813829endifcall TKI(TLI,TMI,1,100+50*NGI)endifcall SetPlayerAbilityAvailable(GetOwningPlayer(TMI),id,false)call O41(TMI,id,1,4,CV1)set t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction QE5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetEnumUnit()local unit QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call CW1(TMI)call CG1(TMI,0,0)call UnitAddAbility(QHI,1093813833)call IssueTargetOrder(QHI,"cyclone",TMI)call TriggerRegisterTimerEvent(t,4,false)call TriggerAddCondition(t,Condition(function QD5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))set t=nullset TLI=nullset TMI=nullset QHI=nullendfunctionfunction QF5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local real P6I=GetSpellTargetX()local real P7I=GetSpellTargetY()local group g=MDI()call QJI(GetOwningPlayer(TLI),4,P6I,P7I,300)call GroupEnumUnitsInRange(g,P6I,P7I,400+25,Condition(function AW1))call ForGroup(g,function QE5)call MCI(g)set TLI=nullset g=nullendfunctionfunction QG5 takes nothing returns booleanif GetSpellAbilityId()==1093813813 thencall QF5()endifreturn falseendfunctionfunction Register_PrevailingWinds takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function QG5))set t=nullendfunctionfunction QH5 takes nothing returns nothingcall PWI("war3mapImported\\FortunesEndTarget.mdx",GetEnumUnit(),"origin",3)call IssueTargetOrder(J4I,"purge",GetEnumUnit())if J6I!=null and GetUnitAbilityLevel(GetEnumUnit(),1093817396)>0 thencall TriggerEvaluate(J6I)endifcall TKI(J3I,GetEnumUnit(),1,75*J5I)endfunctionfunction QZ5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=(LoadUnitHandle(XY,(GetHandleId(TLI)),(796)))local real UJ3=RPI((TimerGetElapsed(M))-(LoadReal(XY,(GetHandleId(TLI)),(358))),3)local integer NGI=GetUnitAbilityLevel(TLI,1093816660)local integer QV5=R2I(2.0*UJ3)local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697656901,GetUnitX(TLI),GetUnitY(TLI),GetUnitFacing(TLI))local unit QW5local group gif TMI!=null thenset QW5=CreateUnit(GetOwningPlayer(TLI),1865429082,GetUnitX(TMI),GetUnitY(TMI),0)call UnitApplyTimedLife(QW5,1112820806,0.5)call UnitAddAbility(QHI,1093817394)call SetUnitAbilityLevel(QHI,1093817394,QV5)set CK=TLIset J3I=TLIset J4I=QHIset J5I=NGIset g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(TMI),GetUnitY(TMI),215+25,Condition(function AT1))call ForGroup(g,function QH5)call MCI(g)endifset TLI=nullset TMI=nullset QHI=nullset QW5=nullset g=nullendfunctionfunction QX5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))if GetTriggerEventId()==EVENT_WIDGET_DEATH thencall SaveReal(XY,(GetHandleId(N0I)),(356),((GetUnitX(TMI))*1.0))call SaveReal(XY,(GetHandleId(N0I)),(357),((GetUnitY(TMI))*1.0))endifcall FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset N0I=nullreturn falseendfunctionfunction QY5 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit N0I=GetTriggerUnit()call SaveReal(XY,(GetHandleId(N0I)),(358),(((TimerGetElapsed(M)))*1.0))call SaveUnitHandle(XY,(GetHandleId(N0I)),(796),(GetSpellTargetUnit()))call DestroyEffect(AddSpecialEffect("war3mapImported\\CleanseTargetArea.mdx",GetUnitX(GetSpellTargetUnit()),GetUnitY(GetSpellTargetUnit())))call SaveUnitHandle(XY,(MKI),(14),(N0I))call SaveUnitHandle(XY,(MKI),(17),(GetSpellTargetUnit()))call TriggerRegisterTimerEvent(t,10,false)call TriggerRegisterDeathEvent(t,GetSpellTargetUnit())call TriggerAddCondition(t,Condition(function QX5))set t=nullset N0I=nullendfunctionfunction QJ5 takes nothing returns booleanif GetSpellAbilityId()==1093816660 thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_CAST thencall SaveBoolean(XY,(GetHandleId(GetTriggerUnit())),(360),(false))call QY5()elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT thenif MBI(GetSpellTargetUnit())==false thencall SaveBoolean(XY,(GetHandleId(GetTriggerUnit())),(360),(true))endifelseif(LoadBoolean(XY,(GetHandleId(GetTriggerUnit())),(360)))==true thencall QZ5()endifendifreturn falseendfunctionfunction RL1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_ENDCAST)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function QJ5))set t=nullendfunctionfunction QK5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))if GetTriggerEventId()==EVENT_UNIT_DAMAGED thencall DisableTrigger(t)call TKI(GetEventDamageSource(),TMI,3,0.5*GetEventDamage())call EnableTrigger(t)endifif GetTriggerEventId()!=EVENT_UNIT_DAMAGED or QPI(TMI)thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call FlushChildHashtable(XY,(MKI))call MZI(t)call AE1(TMI)call UnitRemoveAbility(TMI,1093817396)set J6I=nullendifset t=nullset TMI=nullreturn falseendfunctionfunction QL5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093817397)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)set J6I=tcall AC1(TMI)call QTI(TMI,1093817396)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093817396,false)call TriggerRegisterTimerEvent(t,2+NGI,false)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterDeathEvent(t,TMI)call TriggerAddCondition(t,Condition(function QK5))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveEffectHandle(XY,(MKI),(175),(AddSpecialEffectTarget("war3mapImported\\FatesEdict.mdx",TMI,"origin")))call SaveEffectHandle(XY,(MKI),(176),(AddSpecialEffectTarget("Abilities\\Spells\\Other\\TalkToMe\\TalkToMe.mdl",TMI,"overhead")))set TLI=nullset TMI=nullset t=nullendfunctionfunction QM5 takes nothing returns booleanif GetSpellAbilityId()==1093817397 thenif IsUnitEnemy(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))==false or MBI(GetSpellTargetUnit())==false thencall QL5()endifendifreturn falseendfunctionfunction RK1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function QM5))set t=nullendfunctionfunction QN5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=GetUnitAbilityLevel(TLI,1093817159)local integer MFI=(LoadInteger(XY,(MKI),(34)))if GetTriggerEventId()==EVENT_WIDGET_DEATH or MFI>9 thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT thenif GetSpellAbilityId()==1093817394 and GetSpellTargetUnit()==TMI thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)endifelseset MFI=MFI+1call SaveInteger(XY,(MKI),(34),(MFI))call SetUnitState(TMI,UNIT_STATE_LIFE,GetUnitState(TMI,UNIT_STATE_LIFE)+11*NGI)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction QS5 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093817159)local real TSI=NGI*90local real RI4=0.75call TriggerRegisterDeathEvent(t,TMI)call TriggerRegisterTimerEvent(t,1,true)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function QN5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("war3mapImported\\DarkMending.mdx",TMI,"origin")))if IsUnitType(TMI,UNIT_TYPE_HERO)==false thenset RI4=1.0endifif GetUnitState(TMI,UNIT_STATE_LIFE)<=TSI*RI4 and IsUnitAlly(TMI,GetOwningPlayer(TLI))==true thenset TSI=GetUnitState(TMI,UNIT_STATE_LIFE)/0.75-10endifcall TKI(TLI,TMI,1,TSI)set t=nullset TLI=nullset TMI=nullendfunctionfunction QT5 takes nothing returns booleanif GetSpellAbilityId()==1093817159 thenif IsUnitEnemy(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))==false or MBI(GetSpellTargetUnit())==false thencall QS5()endifendifreturn falseendfunctionfunction RM1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function QT5))set t=nullendfunctionfunction QR5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer MFI=(LoadInteger(XY,(MKI),(34)))local integer X22=(LoadInteger(XY,(MKI),(25)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local integer i=0local real QP5=(LoadReal(XY,(MKI),(697)))local real QQ5=(LoadReal(XY,(MKI),(811)))local real YIO=GetUnitState(TMI,UNIT_STATE_LIFE)local real QU5=GetUnitState(TMI,UNIT_STATE_MAX_LIFE)local real UI5=(LoadReal(XY,(MKI),(808)))local real U15local real TSIif X22>(NGI+6)*50 or GetTriggerEventId()==EVENT_WIDGET_DEATH thencall DisableTrigger(t)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call UnitRemoveAbility(TMI,1093817392)call UnitRemoveAbility(TMI,1093817178)if GetTriggerEventId()!=EVENT_WIDGET_DEATH thenset UI5=UI5*2loopexitwhen i>MFIset i=i+1set YIO=GetUnitState(TMI,UNIT_STATE_LIFE)set U15=RMinBJ(QU5-YIO,UI5)call SetUnitState(TMI,UNIT_STATE_LIFE,YIO+U15)set UI5=UI5-U15set TSI=(LoadReal(XY,(MKI),(20000+i)))if(LoadUnitHandle(XY,(MKI),(22000+i)))==TLI or((LoadInteger(XY,(GetHandleId((TMI))),((2485))))==1)thenif GetUnitState(TMI,UNIT_STATE_LIFE)<=TSI+2 thenset TSI=GetUnitState(TMI,UNIT_STATE_LIFE)-2endifendifcall TKI((LoadUnitHandle(XY,(MKI),(22000+i))),TMI,6,TSI)endloopset YIO=GetUnitState(TMI,UNIT_STATE_LIFE)set U15=RMinBJ(QU5-YIO,UI5)call SetUnitState(TMI,UNIT_STATE_LIFE,YIO+U15)set UI5=UI5-U15endifcall FlushChildHashtable(XY,(MKI))call MZI(t)elseif GetTriggerEventId()==EVENT_UNIT_DAMAGED and TAI(GetEventDamage())thenset MFI=MFI+1call SaveInteger(XY,(MKI),(34),(MFI))call SaveUnitHandle(XY,(MKI),(22000+MFI),(GetEventDamageSource()))call SaveReal(XY,(MKI),(20000+MFI),((GetEventDamage())*1.0))call PII(TMI,GetEventDamage())elseif GetTriggerEventId()!=EVENT_UNIT_DAMAGED and GetTriggerEventId()!=EVENT_WIDGET_DEATH thenset X22=X22+1call SaveInteger(XY,(MKI),(25),(X22))if QU5!=QQ5 thenset QQ5=QU5set QP5=YIOcall SaveReal(XY,(MKI),(697),((QP5)*1.0))call SaveReal(XY,(MKI),(811),((QQ5)*1.0))endifif YIO>QP5 thenif((LoadInteger(XY,(GetHandleId((TMI))),((4298))))==1)==false thenset UI5=UI5+YIO-QP5call SaveReal(XY,(MKI),(808),((UI5)*1.0))elsecall SetUnitState(TMI,UNIT_STATE_LIFE,YIO)endifendifcall SetUnitState(TMI,UNIT_STATE_LIFE,QP5)endifset t=nullset TMI=nullset TLI=nullreturn falseendfunctionfunction UO5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer NGI=GetUnitAbilityLevel(TLI,1093817414)call UnitRemoveAbility(TMI,1110456665)call QTI(TMI,1093817392)call QTI(TMI,1093817178)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterDeathEvent(t,TMI)call TriggerRegisterTimerEvent(t,0.02,true)call TriggerAddCondition(t,Condition(function QR5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(34),(0))call SaveInteger(XY,(MKI),(25),(0))call SaveInteger(XY,(MKI),(5),(NGI))call SaveReal(XY,(MKI),(808),((0)*1.0))call SaveReal(XY,(MKI),(697),((GetUnitState(TMI,UNIT_STATE_LIFE))*1.0))call SaveReal(XY,(MKI),(811),((GetUnitState(TMI,UNIT_STATE_MAX_LIFE))*1.0))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("war3mapImported\\FalsePromise.mdx",TMI,"chest")))call CW1(TMI)call CG1(TMI,0,0)set TLI=nullset TMI=nullset t=nullendfunctionfunction U25 takes nothing returns booleanif GetSpellAbilityId()==1093817414 thencall UO5()endifreturn falseendfunctionfunction RN1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function U25))set t=nullendfunctionfunction U35 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit UII=(LoadUnitHandle(XY,(MKI),(45)))local integer NGI=(LoadInteger(XY,(MKI),(5)))local real xlocal real ylocal real aif GetTriggerEventId()==EVENT_WIDGET_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)call KillUnit(UII)elseset a=PUI(GetUnitX(UII),GetUnitY(UII),GetUnitX(TMI),GetUnitY(TMI))set x=GetUnitX(UII)+20*Cos(a*bj_DEGTORAD)set y=GetUnitY(UII)+20*Sin(a*bj_DEGTORAD)call SetUnitX(UII,x)call SetUnitY(UII,y)call SetUnitFacing(UII,a)if P8I(UII,TMI)<30 thencall FlushChildHashtable(XY,(MKI))call MZI(t)call TKI(UII,TMI,1,100+50*NGI)call KillUnit(UII)call SetUnitAnimationByIndex(UII,3)endifendifset t=nullset TMI=nullset UII=nullreturn falseendfunctionfunction U45 takes integer NGI,unit UII,unit TMI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SetUnitAnimationByIndex(UII,2)call SetUnitVertexColor(UII,255,255,255,150)call TriggerRegisterTimerEvent(t,0.05,true)call TriggerRegisterDeathEvent(t,TMI)call TriggerAddCondition(t,Condition(function U35))call SaveInteger(XY,(MKI),(5),(NGI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(45),(UII))call SetUnitAnimationByIndex(UII,2)set t=nullendfunctionfunction U55 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer NGI=(LoadInteger(XY,(MKI),(5)))local unit UII=(LoadUnitHandle(XY,(MKI),(45)))local group glocal unit TMIif GetTriggerEvalCount(t)>J7I/0.05 thencall FlushChildHashtable(XY,(MKI))call MZI(t)call KillUnit(UII)elseset CK=UIIset g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(UII),GetUnitY(UII),375+25,Condition(function AU1))set TMI=OG1(g,GetUnitX(UII),GetUnitY(UII))call MCI(g)if TMI!=null thencall FlushChildHashtable(XY,(MKI))call MZI(t)call U45(NGI,UII,TMI)endifset g=nullset TMI=nullendifset t=nullset UII=nullreturn falseendfunctionfunction U65 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local integer NGI=(LoadInteger(XY,(MKI),(5)))local unit UII=(LoadUnitHandle(XY,(MKI),(45)))call FlushChildHashtable(XY,(MKI))call MZI(t)set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.05,true)call TriggerAddCondition(t,Condition(function U55))call SaveInteger(XY,(MKI),(5),(NGI))call SaveUnitHandle(XY,(MKI),(45),(UII))call SetUnitAnimationByIndex(UII,1)set t=nullset UII=nullreturn falseendfunctionfunction U75 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real x=GetSpellTargetX()local real y=GetSpellTargetY()local unit UII=CreateUnit(GetOwningPlayer(TLI),1747993927,x,y,270)local integer NGI=GetUnitAbilityLevel(TLI,1093815372)call SetUnitAnimationByIndex(UII,0)call TriggerRegisterTimerEvent(t,3,false)call TriggerAddCondition(t,Condition(function U65))call SaveInteger(XY,(MKI),(5),(NGI))call SaveUnitHandle(XY,(MKI),(45),(UII))set TLI=nullset UII=nullset t=nullendfunctionfunction U85 takes nothing returns booleanif GetSpellAbilityId()==1093815372 thencall U75()endifreturn falseendfunctionfunction RA1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function U85))set t=nullendfunctionfunction U95 takes nothing returns nothingif A61(GetEnumUnit())thenreturnendifif GetUnitAbilityLevel(GetEnumUnit(),1093815609)>0 thencall UnitRemoveAbility(GetEnumUnit(),1093815609)endifif GetUnitAbilityLevel(GetEnumUnit(),1093815617)>0 thencall UnitRemoveAbility(GetEnumUnit(),1093815617)endifif GetUnitAbilityLevel(GetEnumUnit(),1093815374)>0 thencall UnitRemoveAbility(GetEnumUnit(),1093815374)endifif GetUnitAbilityLevel(GetEnumUnit(),1093815608)>0 thencall UnitRemoveAbility(GetEnumUnit(),1093815608)endifif GetUnitAbilityLevel(GetEnumUnit(),1093815888)>0 thencall UnitRemoveAbility(GetEnumUnit(),1093815888)endifif GetUnitAbilityLevel(GetEnumUnit(),1093815891)>0 thencall UnitRemoveAbility(GetEnumUnit(),1093815891)endifif GetUnitAbilityLevel(GetEnumUnit(),1093815890)>0 thencall UnitRemoveAbility(GetEnumUnit(),1093815890)endifif GetUnitAbilityLevel(GetEnumUnit(),1093815889)>0 thencall UnitRemoveAbility(GetEnumUnit(),1093815889)endifendfunctionfunction UA5 takes nothing returns nothingif A61(GetEnumUnit())thenreturnendifif J8I==1 thenset J9I=1093815609elseif J8I==2 thenset J9I=1093815617elseif J8I==3 thenset J9I=1093815374elseif J8I==4 thenset J9I=1093815608endifif GetUnitAbilityLevel(GetEnumUnit(),J9I)==0 thencall QTI(GetEnumUnit(),J9I)call SetPlayerAbilityAvailable(GetOwningPlayer(GetEnumUnit()),J9I,false)call UnitMakeAbilityPermanent(GetEnumUnit(),true,1094935923)if J9I==1093815609 thencall UnitMakeAbilityPermanent(GetEnumUnit(),true,1093815604)elseif J9I==1093815617 thencall UnitMakeAbilityPermanent(GetEnumUnit(),true,1093815605)elseif J9I==1093815374 thencall UnitMakeAbilityPermanent(GetEnumUnit(),true,1093815606)elseif J9I==1093815608 thencall UnitMakeAbilityPermanent(GetEnumUnit(),true,1093815607)elseif J9I==1093815888 thencall UnitMakeAbilityPermanent(GetEnumUnit(),true,1093815885)elseif J9I==1093815891 thencall UnitMakeAbilityPermanent(GetEnumUnit(),true,1093815884)elseif J9I==1093815890 thencall UnitMakeAbilityPermanent(GetEnumUnit(),true,1093815886)elseif J9I==1093815889 thencall UnitMakeAbilityPermanent(GetEnumUnit(),true,1093815887)endifendifendfunctionfunction UB5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local real YSO=(LoadReal(XY,(MKI),(442)))local integer NGI=GetUnitAbilityLevel(TLI,1093815373)local group M93=(LoadGroupHandle(XY,(MKI),(340)))local group g=MDI()local group g1=MDI()local group g2=MDI()set J8I=NGIif(TimerGetElapsed(M))>YSO thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)call ForGroup(M93,function U95)call MCI(M93)call MCI(g)call MCI(g1)call MCI(g2)return falseendifset CK=TLIcall GroupEnumUnitsInRange(g1,x,y,275+25,Condition(function BG1))call GroupEnumUnitsInRange(g2,x,y,275+144,Condition(function B41))call GroupAddGroup(g1,g)call GroupAddGroup(g2,g)call MCI(g1)call MCI(g2)call GroupRemoveGroup(g,M93)call ForGroup(M93,function U95)call ForGroup(g,function UA5)call SaveGroupHandle(XY,(MKI),(340),(g))call MCI(M93)set t=nullset TLI=nullset M93=nullset g=nullreturn falseendfunctionfunction UC5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real P6I=GetSpellTargetX()local real P7I=GetSpellTargetY()local integer ilocal integer NGI=GetUnitAbilityLevel(TLI,1093815373)call TriggerRegisterTimerEvent(t,0.1,true)call TriggerAddCondition(t,Condition(function UB5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveGroupHandle(XY,(MKI),(340),(MDI()))call SaveReal(XY,(MKI),(6),((P6I)*1.0))call SaveReal(XY,(MKI),(7),((P7I)*1.0))call SaveReal(XY,(MKI),(442),(((TimerGetElapsed(M))+3+0.5*NGI)*1.0))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffect("war3mapImported\\MagneticField04.mdl",P6I,P7I)))set i=0loopexitwhen i>5call SetPlayerAbilityAvailable(BO[i],1093815609,false)call SetPlayerAbilityAvailable(CO[i],1093815609,false)call SetPlayerAbilityAvailable(BO[i],1093815617,false)call SetPlayerAbilityAvailable(CO[i],1093815617,false)call SetPlayerAbilityAvailable(BO[i],1093815617,false)call SetPlayerAbilityAvailable(CO[i],1093815374,false)call SetPlayerAbilityAvailable(BO[i],1093815608,false)call SetPlayerAbilityAvailable(CO[i],1093815608,false)set i=i+1endloopset TLI=nullset t=nullendfunctionfunction UD5 takes nothing returns booleanif GetSpellAbilityId()==1093815373 thencall UC5()endifreturn falseendfunctionfunction RB1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function UD5))set t=nullendfunctionfunction UE5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=GetUnitAbilityLevel(TLI,1093815601)local integer UWI=(LoadInteger(XY,(MKI),(758)))local integer MFI=(LoadInteger(XY,(MKI),(34)))local group gif GetTriggerEventId()==EVENT_WIDGET_DEATH or MFI>120 or T6I(TMI)thencall UnitRemoveAbility(TMI,1093815383)call UnitRemoveAbility(TMI,1093815385)call UnitRemoveAbility(TMI,1110460210)call UnitRemoveAbility(TMI,1110460211)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)elseset MFI=MFI+1call SaveInteger(XY,(MKI),(34),(MFI))set CK=TLIset g=MDI()call GroupEnumUnitsInRange(g,GetUnitX(TMI),GetUnitY(TMI),225+25,Condition(function AT1))call GroupRemoveUnit(g,TMI)if FirstOfGroup(g)==null thenif UWI==1093815383 thenif GetUnitAbilityLevel(TMI,1093815383)==0 thencall QTI(TMI,1093815383)call UnitMakeAbilityPermanent(TMI,true,1093815381)call UnitMakeAbilityPermanent(TMI,true,1093815621)endifelseif GetUnitAbilityLevel(TMI,1093815385)==0 thencall QTI(TMI,1093815385)call UnitMakeAbilityPermanent(TMI,true,1093815380)call UnitMakeAbilityPermanent(TMI,true,1093815621)endifendifif ModuloInteger(MFI,10)==0 thencall TKI(TLI,TMI,1,NGI*15*0.5)endifelseif UWI==1093815383 thenif GetUnitAbilityLevel(TMI,1093815383)>0 thencall UnitRemoveAbility(TMI,1093815383)call UnitRemoveAbility(TMI,1110460210)endifelseif GetUnitAbilityLevel(TMI,1093815385)>0 thencall UnitRemoveAbility(TMI,1093815385)call UnitRemoveAbility(TMI,1110460211)endifendifendifcall MCI(g)set g=nullendifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction UF5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local integer UWI=1093815383if GetUnitTypeId(TLI)==1311788365 thenset UWI=1093815385endifcall SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093815383,false)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093815385,false)call TriggerRegisterTimerEvent(t,0.05,true)call TriggerRegisterDeathEvent(t,TMI)call TriggerAddCondition(t,Condition(function UE5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(758),(UWI))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("war3mapImported\\Flux3.mdx",TMI,"origin")))call TriggerEvaluate(t)set TLI=nullset TMI=nullset t=nullendfunctionfunction UG5 takes nothing returns booleanif GetSpellAbilityId()==1093815601 and MBI(GetSpellTargetUnit())==false thencall UF5()endifreturn falseendfunctionfunction RC1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function UG5))set t=nullendfunctionfunction UH5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit UZ5=(LoadUnitHandle(XY,(MKI),(17)))call FlushChildHashtable(XY,(MKI))call MZI(t)call FlushChildHashtable(XY,(GetHandleId(UZ5)))call RemoveUnit(UZ5)set t=nullset UZ5=nullreturn falseendfunctionfunction UV5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit UZ5=(LoadUnitHandle(XY,(MKI),(2)))call FlushChildHashtable(XY,(MKI))call MZI(t)call FlushChildHashtable(XY,(GetHandleId(UZ5)))call ShowUnit(UZ5,false)set t=nullset UZ5=nullreturn falseendfunctionfunction UW5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit UZ5=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=GetUnitAbilityLevel(TLI,1093815600)if GetTriggerEvalCount(t)==200 or GetTriggerEventId()==EVENT_WIDGET_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)call KillUnit(UZ5)call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\FeralSpirit\\feralspirittarget.mdl",GetUnitX(UZ5),GetUnitX(UZ5)))set t=CreateTrigger()set MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(2),(UZ5))call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function UV5))set t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,3,false)call TriggerAddCondition(t,Condition(function UH5))call SaveUnitHandle(XY,(MKI),(17),(UZ5))elsecall SuspendHeroXP(UZ5,true)call UnitModifySkillPoints(UZ5,-25)endifset t=nullset TLI=nullset UZ5=nullreturn falseendfunctionfunction UX5 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit UZ5=CreateUnit(GetOwningPlayer(TLI),1311788365,GetUnitX(TLI),GetUnitY(TLI),0)local integer NGI=GetUnitAbilityLevel(TLI,1093815600)local integer i=0local item OT1local integer UY5=1227895373call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\FeralSpirit\\feralspirittarget.mdl",UZ5,"chest"))if NZI(GetOwningPlayer(UZ5))==false thenset UY5=1227903043endifcall SelectUnitAddForPlayer(UZ5,GetOwningPlayer(TLI))call DisableTrigger(L30)loopexitwhen i>5if UnitItemInSlot(TLI,i)!=null and GetItemTypeId(UnitItemInSlot(TLI,i))!=FK0[VG0]and GetItemTypeId(UnitItemInSlot(TLI,i))!=FK0[W70]and GetItemTypeId(UnitItemInSlot(TLI,i))!=FK0[ZO0]and GetItemTypeId(UnitItemInSlot(TLI,i))!=FK0[Z20]and GetItemTypeId(UnitItemInSlot(TLI,i))!=FK0[Z90]thenset OT1=CreateItem(GetItemTypeId(UnitItemInSlot(TLI,i)),0,0)if GetItemCharges(UnitItemInSlot(TLI,i))>0 thencall SetItemCharges(OT1,GetItemCharges(UnitItemInSlot(TLI,i)))endifcall UnitAddItem(UZ5,OT1)call SetItemPlayer(OT1,GetOwningPlayer(UZ5),false)if GetItemTypeId(OT1)==FK0[VR0]or GetItemTypeId(OT1)==FK0[VP0]or GetItemTypeId(OT1)==FK0[GB0]thencall SetItemDropOnDeath(OT1,false)endifelsecall UnitAddItem(UZ5,CreateItem(UY5,0,0))endifset i=i+1endloopcall EnableTrigger(L30)call SetHeroLevel(UZ5,GetHeroLevel(TLI),false)set i=1loopexitwhen i>GetUnitAbilityLevel(TLI,1096904043)call SelectHeroSkill(UZ5,1096904043)set i=i+1endloopset i=1loopexitwhen i>GetUnitAbilityLevel(TLI,1093815372)call SelectHeroSkill(UZ5,1093815372)set i=i+1endloopset i=1loopexitwhen i>GetUnitAbilityLevel(TLI,1093815373)call SelectHeroSkill(UZ5,1093815373)set i=i+1endloopset i=1loopexitwhen i>GetUnitAbilityLevel(TLI,1093815601)call SelectHeroSkill(UZ5,1093815601)set i=i+1endloopset i=1loopexitwhen i>GetUnitAbilityLevel(TLI,1093812788)call SelectHeroSkill(UZ5,1093812788)set i=i+1endloopset i=1loopexitwhen i>GetUnitAbilityLevel(TLI,1093815600)call SelectHeroSkill(UZ5,1093815600)set i=i+1endloopcall UnitRemoveAbility(UZ5,1093815600)call UnitModifySkillPoints(UZ5,-25)call SuspendHeroXP(UZ5,true)call TriggerRegisterTimerEvent(t,0.1,true)call TriggerRegisterDeathEvent(t,UZ5)call TriggerAddCondition(t,Condition(function UW5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(UZ5))call SetUnitState(TLI,UNIT_STATE_LIFE,GetUnitState(TLI,UNIT_STATE_LIFE)*(1-(0.45-0.15*NGI)))call SetUnitState(TLI,UNIT_STATE_MANA,GetUnitState(TLI,UNIT_STATE_MANA)*(1-(0.45-0.15*NGI)))call SetUnitState(UZ5,UNIT_STATE_LIFE,GetUnitState(TLI,UNIT_STATE_LIFE))call SetUnitState(UZ5,UNIT_STATE_MANA,GetUnitState(TLI,UNIT_STATE_MANA))set TLI=nullset UZ5=nullset t=nullendfunctionfunction UJ5 takes nothing returns booleanif GetSpellAbilityId()==1093815600 thencall UX5()endifreturn falseendfunctionfunction RD1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function UJ5))set t=nullendfunctionfunction UK5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local group g=MDI()local integer NGI=GetUnitAbilityLevel(TLI,1093686851)set CK=TLIcall GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),400+25,Condition(function BW1))if FirstOfGroup(g)==null thenif GetUnitAbilityLevel(TLI,1093815896)!=NGI thencall QTI(TLI,1093815896)call SetUnitAbilityLevel(TLI,1093815896,NGI)endifelseif GetUnitAbilityLevel(TLI,1093815896)>0 thencall UnitRemoveAbility(TLI,1093815896)endifendifcall MCI(g)set TLI=nullset t=nullset g=nullreturn falseendfunctionfunction UL5 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()call TriggerRegisterTimerEvent(t,0.1,true)call TriggerAddCondition(t,Condition(function UK5))call SaveUnitHandle(XY,(MKI),(2),(TLI))set t=nullset TLI=nullendfunctionfunction UM5 takes nothing returns booleanif GetLearnedSkill()==1093686851 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093686851)==1 thencall UL5()endifreturn falseendfunctionfunction RH1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function UM5))set t=nullendfunctionfunction UN5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local integer NGI=GetUnitAbilityLevel(TLI,1093816114)local integer W93=GetHeroAgi(TLI,true)local real US5=W93*(0.12+0.06*NGI)local integer Q12=R2I(US5/2.0+0.5)local integer UT5=(LoadInteger(XY,(MKI),(34)))local real YSO=(LoadReal(XY,(MKI),(442)))if YSO<(TimerGetElapsed(M))thenset UT5=2call SaveInteger(XY,(MKI),(34),(UT5))call UnitRemoveAbility(QHI,1093816115)endifif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId()==1093816114 thenset UT5=1call SaveInteger(XY,(MKI),(34),(UT5))call SaveReal(XY,(MKI),(442),(((TimerGetElapsed(M))+30)*1.0))call UnitRemoveAbility(QHI,1093815897)call UnitRemoveAbility(QHI,1093816115)endifif QPI(TLI)==true thencall UnitRemoveAbility(QHI,1093815897)call UnitRemoveAbility(QHI,1093816115)elseif GetUnitAbilityLevel(QHI,1093815897)==0 thencall QTI(QHI,1093815897)if UT5==1 thencall QTI(QHI,1093816115)elseendifendifcall SetUnitAbilityLevel(QHI,1093815897,Q12)call SetUnitAbilityLevel(QHI,1093816115,Q12)call SetUnitX(QHI,GetUnitX(TLI))call SetUnitY(QHI,GetUnitY(TLI))endifset TLI=nullset t=nullreturn falseendfunctionfunction UR5 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local unit QHI=CreateUnit(GetOwningPlayer(TLI),1697657174,0,0,0)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)call TriggerRegisterTimerEvent(t,0.1,true)call TriggerAddCondition(t,Condition(function UN5))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveInteger(XY,(MKI),(34),(2))call QTI(QHI,1093815897)set t=nullset TLI=nullendfunctionfunction UP5 takes nothing returns booleanif GetLearnedSkill()==1093816114 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093816114)==1 thencall UR5()endifreturn falseendfunctionfunction RF1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_SKILL)call TriggerAddCondition(t,Condition(function UP5))call RVI(1093815897)call RVI(1093816115)set t=nullendfunctionfunction UQ5 takes unit TLI,unit TMI,integer NGI returns nothinglocal unit QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call QTI(QHI,1093818183)call SetUnitAbilityLevel(QHI,1093818183,NGI)call IssueTargetOrder(QHI,"drunkenhaze",TMI)set QHI=nullendfunctionfunction UU5 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real NN2=(LoadReal(XY,(MKI),(13)))local real d=(LoadReal(XY,(MKI),(138)))local integer NGI=GetUnitAbilityLevel(TLI,1093818182)local real BP1=(0.5+0.1*NGI)/(0.02)local real NT2=d/BP1local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local integer MFI=GetTriggerEvalCount(t)if MFI>BP1 or GetTriggerEventId()==EVENT_UNIT_DEATH thencall QEI(GetUnitX(TMI),GetUnitY(TMI),100)call FlushChildHashtable(XY,(MKI))call MZI(t)elseset x=RCI(x+NT2*Cos(NN2))set y=RGI(y+NT2*Sin(NN2))call SetUnitX(TMI,x)call SetUnitY(TMI,y)call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction I06 takes unit QHI,unit TMI,unit TLI,real x,real y returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real NN2=Atan2(GetUnitY(TMI)-GetUnitY(QHI),GetUnitX(TMI)-GetUnitX(QHI))local real C63=PAI(x,y,GetUnitX(TMI),GetUnitY(TMI))local real d=RMaxBJ(1,350*(1-C63/900))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveReal(XY,(MKI),(13),((NN2)*1.0))call SaveReal(XY,(MKI),(138),((d)*1.0))call SaveReal(XY,(MKI),(6),((GetUnitX(TMI))*1.0))call SaveReal(XY,(MKI),(7),((GetUnitY(TMI))*1.0))call UQ5(TLI,TMI,GetUnitAbilityLevel(TLI,1093818182))call TriggerRegisterTimerEvent(t,0.02,true)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function UU5))set t=nullendfunctionfunction II6 takes nothing returns nothingif IsUnitInGroup(GetEnumUnit(),HK)==false and T6I(GetEnumUnit())==false thencall GroupAddUnit(HK,GetEnumUnit())call I06(CK,GetEnumUnit(),JAI,JBI,JCI)endifendfunctionfunction I16 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real a=(LoadReal(XY,(MKI),(137)))local real x1=(LoadReal(XY,(MKI),(64)))local real y1=(LoadReal(XY,(MKI),(65)))local real x2=(LoadReal(XY,(MKI),(66)))local real y2=(LoadReal(XY,(MKI),(67)))local group g=(LoadGroupHandle(XY,(MKI),(22)))local real x=GetUnitX(QHI)local real y=GetUnitY(QHI)local group g2if PAI(x,y,x2,y2)<100 thenset x=x2set y=y2elseset x=x+40*Cos(a)set y=y+40*Sin(a)endifcall SetUnitX(QHI,RCI(x))call SetUnitY(QHI,RGI(y))set g2=MDI()set CK=QHIset JAI=TLIset JBI=x1set JCI=y1set HK=gcall GroupEnumUnitsInRange(g2,x,y,250+25,Condition(function AT1))call ForGroup(g2,function II6)call MCI(g2)if(x==x2 and y==y2)or GetTriggerEvalCount(t)>35 thenset g2=MDI()set CK=QHIset JAI=TLIset JBI=x1set JCI=y1set HK=gcall GroupEnumUnitsInRange(g2,x,y,250+25,Condition(function AT1))call ForGroup(g2,function II6)call MCI(g2)call FlushChildHashtable(XY,(MKI))call MZI(t)call KillUnit(QHI)call MCI(g)endifset t=nullset QHI=nullset g=nullset g2=nullreturn falseendfunctionfunction IO6 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local location l=GetSpellTargetLoc()local unit TLI=GetTriggerUnit()local real x=GetLocationX(l)local real y=GetLocationY(l)local real a=Atan2(y-GetUnitY(TLI),x-GetUnitX(TLI))local unit QHI=CreateUnit(GetOwningPlayer(TLI),1848659529,GetUnitX(TLI),GetUnitY(TLI),a*bj_RADTODEG)call TriggerRegisterTimerEvent(t,0.02,true)call TriggerAddCondition(t,Condition(function I16))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveReal(XY,(MKI),(137),((a)*1.0))call SaveReal(XY,(MKI),(64),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(65),((GetUnitY(TLI))*1.0))call SaveReal(XY,(MKI),(66),((GetUnitX(TLI)+900*Cos(a))*1.0))call SaveReal(XY,(MKI),(67),((GetUnitY(TLI)+900*Sin(a))*1.0))call SaveGroupHandle(XY,(MKI),(22),(MDI()))call RemoveLocation(l)set t=nullset l=nullset TLI=nullendfunctionfunction I26 takes nothing returns booleanif GetSpellAbilityId()==1093818182 thencall IO6()endifreturn falseendfunctionfunction RG1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function I26))set t=nullendfunctionfunction BoulderSmash_FindClosestMagnetizedTarget takes nothing returns nothinglocal real d=P8I(GetEnumUnit(),K3I)if d<QJ thenset QJ=dset K0I=GetEnumUnit()endifendfunctionfunction I36 takes nothing returns booleanreturn QPI(GetFilterUnit())==false and IsUnitEnemy(JFI,GetOwningPlayer(GetFilterUnit()))and GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and((LoadInteger(XY,(GetHandleId((GetFilterUnit()))),((809))))==1)endfunctionfunction I46 takes unit TMI returns nothinglocal unit QHI=CreateUnit(GetOwningPlayer(TMI),1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call UnitAddAbility(QHI,1093817415)call SetUnitAbilityLevel(QHI,1093817415,JGI)call IssueTargetOrder(QHI,"soulburn",TMI)set QHI=nullendfunctionfunction I56 takes nothing returns nothingcall I46(GetEnumUnit())endfunctionfunction I66 takes unit TMI returns nothinglocal group g=MDI()if((LoadInteger(XY,(GetHandleId((TMI))),((809))))==1)==true thencall GroupEnumUnitsInRange(g,0,0,99999,Condition(function I36))endifcall GroupAddUnit(g,TMI)call ForGroup(g,function I56)call MCI(g)set g=nullendfunctionfunction I76 takes nothing returns nothinglocal unit TMI=GetEnumUnit()if GetUnitTypeId(TMI)!=1865429336 thencall SetUnitPathing(TMI,true)endifcall SaveInteger(XY,(GetHandleId((TMI))),((4336)),(2))set TMI=nullendfunctionfunction I86 takes nothing returns nothingif IsUnitInGroup(GetEnumUnit(),JEI)==false thencall GroupAddUnit(JEI,GetEnumUnit())call I66(GetEnumUnit())if JVI==1 thencall TKI(JFI,GetEnumUnit(),1,50+50*JGI)endifendifendfunctionfunction I96 takes nothing returns nothinglocal unit TMI=GetEnumUnit()local real a=(LoadReal(XY,(GetHandleId(TMI)),(801)))local real d=(LoadReal(XY,(GetHandleId(TMI)),(802)))local real x=JHI+d*Cos(a)local real y=JZI+d*Sin(a)call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\FlakCannons\\FlakTarget.mdl",x,y))if GetUnitTypeId(TMI)==1865429336 or GetUnitTypeId(TMI)==1865429552 thenset JVI=1call SetUnitPosition(TMI,x,y)call SetUnitX(TMI,x)call SetUnitY(TMI,y)elsecall SetUnitX(TMI,x)call SetUnitY(TMI,y)call QEI(x,y,100)endifset TMI=nullendfunctionfunction IA6 takes nothing returns nothinglocal unit TMI=GetEnumUnit()if QPI(TMI)==true or((LoadInteger(XY,(GetHandleId((TMI))),((4306))))==1)==true or GetUnitAbilityLevel(TMI,1110456406)>0 or((LoadInteger(XY,(GetHandleId((TMI))),((4335))))==1)==true thencall GroupRemoveUnit(JEI,TMI)call SaveInteger(XY,(GetHandleId((TMI))),((4336)),(2))if GetUnitTypeId(TMI)!=1865429336 thencall SetUnitPathing(TMI,true)endifendifset TMI=nullendfunctionfunction IB6 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local group IC6=(LoadGroupHandle(XY,(MKI),(803)))local real P6I=(LoadReal(XY,(MKI),(6)))local real P7I=(LoadReal(XY,(MKI),(7)))local real PI2=(LoadReal(XY,(MKI),(23)))local real P12=(LoadReal(XY,(MKI),(24)))local real a=bj_DEGTORAD*PUI(PI2,P12,P6I,P7I)local real xlocal real ylocal boolean ID6=falselocal group SP2=(LoadGroupHandle(XY,(MKI),(187)))local group gset JVI=0set JEI=IC6call ForGroup(IC6,function IA6)if GetTriggerEvalCount(t)>200 or FirstOfGroup(IC6)==null thenset ID6=trueelseset x=PI2+JDI*0.03*Cos(a)set y=P12+JDI*0.03*Sin(a)if PAI(x,y,P6I,P7I)<30 thenset x=P6Iset y=P7Iset ID6=trueendifset x=RCI(x)set y=RGI(y)set JEI=IC6set JHI=xset JZI=ycall ForGroup(IC6,function I96)call SaveReal(XY,(MKI),(23),((x)*1.0))call SaveReal(XY,(MKI),(24),((y)*1.0))set g=MDI()set CK=TLIset JEI=SP2set JFI=TLIset JGI=GetUnitAbilityLevel(TLI,1093816649)call GroupEnumUnitsInRange(g,x,y,180+25,Condition(function AT1))call ForGroup(g,function I86)call MCI(g)set g=nullendifif ID6 thencall ForGroup(IC6,function I76)call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)call MCI(SP2)call MCI(IC6)endifset TLI=nullset t=nullset SP2=nullset IC6=nullreturn falseendfunctionfunction MagneticGrip_PullableTargetsFilter takes nothing returns booleanreturn((GetUnitTypeId(GetFilterUnit())==1865429336 or GetUnitTypeId(GetFilterUnit())==1865429552)or(IsUnitEnemy(JFI,GetOwningPlayer(GetFilterUnit()))==false and GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0))and QPI(GetFilterUnit())==false and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and((LoadInteger(XY,(GetHandleId((GetFilterUnit()))),((4336))))==1)==falseendfunctionfunction IE6 takes nothing returns booleanreturn GetUnitTypeId(GetFilterUnit())==1865429336endfunctionfunction IF6 takes nothing returns nothinglocal unit TMI=GetEnumUnit()call SetUnitPathing(TMI,false)call SaveInteger(XY,(GetHandleId((TMI))),((4336)),(1))call SaveReal(XY,(GetHandleId(TMI)),(801),((bj_DEGTORAD*PUI(JHI,JZI,GetUnitX(TMI),GetUnitY(TMI)))*1.0))call SaveReal(XY,(GetHandleId(TMI)),(802),((PAI(JHI,JZI,GetUnitX(TMI),GetUnitY(TMI)))*1.0))set TMI=nullendfunctionfunction IG6 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger tlocal integer MKIlocal real P6I=GetUnitX(GetSpellTargetUnit())local real P7I=GetUnitY(GetSpellTargetUnit())local real x=GetUnitX(TLI)local real y=GetUnitY(TLI)local real a=PUI(x,y,P6I,P7I)local unit TMI=GetSpellTargetUnit()local group gif TMI==null thenset g=MDI()call GroupEnumUnitsInRange(g,GetSpellTargetX(),GetSpellTargetY(),240+25,Condition(function IE6))if FirstOfGroup(g)==null thencall MCI(g)set TLI=nullset g=nullreturnendifset TMI=FirstOfGroup(g)call MCI(g)endifset g=MDI()call GroupAddUnit(g,TMI)set P6I=GetUnitX(TMI)set P7I=GetUnitY(TMI)set a=PUI(x,y,P6I,P7I)set t=CreateTrigger()set MKI=GetHandleId(t)set JHI=P6Iset JZI=P7Icall ForGroup(g,function IF6)set x=x+100*Cos(a*bj_DEGTORAD)set y=y+100*Sin(a*bj_DEGTORAD)call TriggerRegisterTimerEvent(t,0.03,true)call TriggerAddCondition(t,Condition(function IB6))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))call SaveReal(XY,(MKI),(23),((P6I)*1.0))call SaveReal(XY,(MKI),(24),((P7I)*1.0))call SaveGroupHandle(XY,(MKI),(187),(MDI()))call SaveGroupHandle(XY,(MKI),(803),(g))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("war3mapImported\\MagneticGripTarget.mdx",TMI,"chest")))set TLI=nullset t=nullset g=nullendfunctionfunction IH6 takes nothing returns nothinglocal unit TMI=GetSpellTargetUnit()local group gif TMI==null thenset g=MDI()call GroupEnumUnitsInRange(g,GetSpellTargetX(),GetSpellTargetY(),240+25,Condition(function IE6))if FirstOfGroup(g)==null thencall R6I(GetTriggerUnit())call R1I(GetOwningPlayer(GetTriggerUnit()),GetObjectName(1848659509))endifcall MCI(g)endifset g=nullset TMI=nullendfunctionfunction IZ6 takes nothing returns booleanif GetSpellAbilityId()==1093816649 thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_CAST thencall IH6()elsecall IG6()endifendifreturn falseendfunctionfunction RW1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function IZ6))set t=nullendfunctionfunction IV6 takes nothing returns booleanreturn QPI(GetFilterUnit())==false and IsUnitEnemy(JYI,GetOwningPlayer(GetFilterUnit()))and GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true and((LoadInteger(XY,(GetHandleId((GetFilterUnit()))),((809))))==1)endfunctionfunction IW6 takes nothing returns nothingcall O41((GetEnumUnit()),1093816654,1,2,1110460235)endfunctionfunction IX6 takes unit TMI returns nothinglocal group g=MDI()if((LoadInteger(XY,(GetHandleId((TMI))),((809))))==1)==true thencall GroupEnumUnitsInRange(g,0,0,99999,Condition(function IV6))endifcall GroupAddUnit(g,TMI)call ForGroup(g,function IW6)call MCI(g)set g=nullendfunctionfunction RollingBoulder_FindClosestMagnetizedTarget takes nothing returns nothinglocal real d=P8I(GetEnumUnit(),JRI)if d<QJ thenset QJ=dset JJI=GetEnumUnit()endifendfunctionfunction IY6 takes nothing returns nothingif IsUnitInGroup(GetEnumUnit(),JKI)==false thencall GroupAddUnit(JKI,GetEnumUnit())if IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)==true thenset JNI=trueset JJI=GetEnumUnit()if((LoadInteger(XY,(GetHandleId((GetEnumUnit()))),((809))))==1)thenset JRI=GetEnumUnit()endifif JTI==1 thencall TKI(JYI,GetEnumUnit(),1,JSI*1.5)call IX6(GetEnumUnit())elsecall TKI(JYI,GetEnumUnit(),1,JSI)endifelseif JTI==1 thencall TKI(JYI,GetEnumUnit(),1,JSI*1.5)elsecall TKI(JYI,GetEnumUnit(),1,JSI)endifendifendifendfunctionfunction IJ6 takes nothing returns booleanreturn GetUnitTypeId(GetFilterUnit())==1865429336endfunctionfunction IK6 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local group SP2=(LoadGroupHandle(XY,(MKI),(187)))local group glocal unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local real FM1=(LoadReal(XY,(MKI),(6)))local real FN1=(LoadReal(XY,(MKI),(7)))local real PO2=GetUnitX(TLI)local real P22=GetUnitY(TLI)local real d=PAI(FM1,FN1,PO2,P22)local real xlocal real ylocal real a=(LoadReal(XY,(MKI),(137)))local real r=JXIlocal integer IL6=(LoadInteger(XY,(MKI),(34)))local real AR3=(LoadReal(XY,(MKI),(138)))local boolean IM6=falselocal unit IN6=(LoadUnitHandle(XY,(MKI),(810)))set JNI=falsecall SetUnitTimeScale(TLI,3)call SetUnitFacing(TLI,a)call SetUnitAnimationByIndex(TLI,0)if GetTriggerEvalCount(t)>30 thenif IL6==0 thenset g=MDI()call GroupEnumUnitsInRange(g,PO2,P22,150+25,Condition(function IJ6))if FirstOfGroup(g)!=null thencall KillUnit(FirstOfGroup(g))set IL6=1call SaveInteger(XY,(MKI),(34),(IL6))endifcall MCI(g)endifif IL6==1 thenset r=r*2endifif IN6!=null thenset a=PQI(TLI,IN6)call SaveReal(XY,(MKI),(137),((a)*1.0))endifset x=FM1+0.02*r*Cos(a*bj_DEGTORAD)set y=FN1+0.02*r*Sin(a*bj_DEGTORAD)call SetUnitX(TLI,RCI(x))call SetUnitY(TLI,RGI(y))call SaveReal(XY,(MKI),(6),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(7),((GetUnitY(TLI))*1.0))call SetUnitX(QHI,GetUnitX(TLI))call SetUnitY(QHI,GetUnitY(TLI))call QEI(GetUnitX(TLI),GetUnitY(TLI),100)set d=PAI(FM1,FN1,GetUnitX(TLI),GetUnitY(TLI))set AR3=AR3+dcall SaveReal(XY,(MKI),(138),((AR3)*1.0))set g=MDI()set CK=TLIset JYI=TLIset JKI=SP2set JLI=GetUnitAbilityLevel(TLI,1093817416)set JJI=nullset JSI=60+30set JTI=IL6set JRI=nullcall GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),150+25,Condition(function AT1))call ForGroup(g,function IY6)call MCI(g)if JRI!=null thenset g=MDI()set JJI=nullset QJ=9999call GroupEnumUnitsInRange(g,GetUnitX(JRI),GetUnitY(JRI),600+25,Condition(function IV6))call MCI(g)if JJI==null thenset IM6=trueset JJI=JRIelseset IN6=JJIcall SaveUnitHandle(XY,(MKI),(810),(IN6))endifendifelsecall SetUnitX(TLI,FM1)call SetUnitY(TLI,FN1)if AI1(TLI)thenset IM6=trueendifendifif AI1(TLI)or GetTriggerEventId()==EVENT_WIDGET_DEATH or IM6 or(IN6==null and(GetTriggerEvalCount(t)>130 or JNI or(IL6==0 and AR3>800)or(IL6==1 and AR3>1600)))thencall KillUnit(QHI)call MCI(SP2)call FlushChildHashtable(XY,(MKI))call MZI(t)call UnitAddAbility(TLI,1093816658)call UnitRemoveAbility(TLI,1093816658)call SetUnitTimeScale(TLI,1)if JNI==true thenset x=GetUnitX(JJI)+50*Cos(a*bj_DEGTORAD)set y=GetUnitY(JJI)+50*Sin(a*bj_DEGTORAD)call SetUnitX(TLI,RCI(x))call SetUnitY(TLI,RGI(y))call IssueTargetOrder(TLI,"attack",JJI)endifendifset TLI=nullset t=nullset g=nullset SP2=nullreturn falseendfunctionfunction IS6 takes unit TLI,unit IT6 returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit QHI=CreateUnit(GetOwningPlayer(TLI),1865429328,GetUnitX(TLI),GetUnitY(TLI),0)local real a=PUI(GetUnitX(TLI),GetUnitY(TLI),GetSpellTargetX(),GetSpellTargetY())call UnitAddAbility(TLI,1093816657)call UnitRemoveAbility(TLI,1093816657)call SetUnitTimeScale(TLI,3)call TriggerRegisterDeathEvent(t,TLI)call TriggerRegisterTimerEvent(t,0.02,true)call TriggerAddCondition(t,Condition(function IK6))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveGroupHandle(XY,(MKI),(187),(MDI()))call SaveUnitHandle(XY,(MKI),(19),(QHI))call SaveReal(XY,(MKI),(6),((GetUnitX(TLI))*1.0))call SaveReal(XY,(MKI),(7),((GetUnitY(TLI))*1.0))call SaveReal(XY,(MKI),(137),((a)*1.0))call SaveInteger(XY,(MKI),(34),(0))call SaveReal(XY,(MKI),(138),((0)*1.0))call SaveUnitHandle(XY,(MKI),(810),(null))if IT6!=null and GetUnitTypeId(IT6)==1865429336 thencall KillUnit(IT6)endifset t=nullendfunctionfunction IR6 takes nothing returns booleanreturn((GetUnitTypeId(GetFilterUnit())==1865429336 and GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(JYI))or(0==1 and(GetUnitTypeId((GetFilterUnit()))==1865429552)and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(JYI))))and QPI(GetFilterUnit())==falseendfunctionfunction RollingBoulder_Loop takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local group gif GetUnitTypeId(TLI)==1311788373 and QPI(TLI)==false thenset g=MDI()set JYI=TLIcall GroupEnumUnitsInRange(g,GetUnitX(TLI),GetUnitY(TLI),150+25,Condition(function IR6))if FirstOfGroup(g)!=null thenendifcall MCI(g)set g=nullendifset TLI=nullset t=nullreturn falseendfunctionfunction IP6 takes nothing returns booleanreturn GetUnitTypeId(GetFilterUnit())==1311788373 and IsUnitIllusion(GetFilterUnit())==falseendfunctionfunction IQ6 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real F21=(LoadReal(XY,(MKI),(442)))local integer WLO=(LoadInteger(XY,(GetHandleId(TLI)),(800)))local group gif TLI==null thenset g=MDI()call GroupEnumUnitsInRange(g,0,0,99999,Condition(function IP6))set TLI=FirstOfGroup(g)call MCI(g)set g=nullif TLI!=null thencall SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveInteger(XY,(GetHandleId(TLI)),(800),(6))call QTI(TLI,JMI[6])endifendifif GetTriggerEventId()==EVENT_UNIT_SPELL_CAST thenif(GetSpellAbilityId()==1093817416)and WLO<=0 thencall R6I(TLI)endifelseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT thenif GetSpellAbilityId()==1093817416 or GetSpellAbilityId()==1093817418 thenif GetSpellAbilityId()==1093817418 thencall IS6(TLI,null)endifendifelseif WLO<6 thenset F21=F21-0.2call SaveReal(XY,(MKI),(442),((F21)*1.0))if F21<=0.thencall UnitRemoveAbility(TLI,JMI[WLO])set WLO=WLO+1call QTI(TLI,JMI[WLO])call SaveInteger(XY,(GetHandleId(TLI)),(800),(WLO))call SaveReal(XY,(MKI),(442),((JWI)*1.0))endifendifset TLI=nullset t=nullreturn falseendfunctionfunction IU6 takes unit TLI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.2,true)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_CAST)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function IQ6))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(442),((JWI)*1.0))call SaveInteger(XY,(GetHandleId(TLI)),(800),(6))call QTI(TLI,JMI[6])set t=nullendfunctionfunction RJ1 takes nothing returns nothingcall IU6(CK)endfunctionfunction O06 takes unit OI6 returns nothinglocal unit TLI=K1[GetPlayerId(GetOwningPlayer(OI6))]local integer MKI=GetHandleId(TLI)local integer NGI=GetUnitAbilityLevel(TLI,1093817416)local integer O16=(LoadInteger(XY,(MKI),(279)))local integer i=1local integer x=1local unit IT6loopexitwhen i>O16set IT6=(LoadUnitHandle(XY,(MKI),(1400+i)))if QPI(IT6)==false thencall SaveUnitHandle(XY,(MKI),(1400+x),(IT6))set x=x+1endifset i=i+1endloopset O16=O16-1call SaveInteger(XY,(MKI),(279),(O16))set IT6=nullset TLI=nullendfunctionfunction OO6 takes nothing returns booleanif GetUnitTypeId(GetTriggerUnit())==1865429336 thencall O06(GetTriggerUnit())endifreturn falseendfunctionfunction O26 takes nothing returns nothinglocal unit IT6local unit TLI=GetTriggerUnit()local integer MKI=GetHandleId(TLI)local integer NGI=GetUnitAbilityLevel(TLI,1093817416)local integer O16=(LoadInteger(XY,(MKI),(279)))local unit O36=(LoadUnitHandle(XY,(MKI),(1400+1)))local real xlocal real ylocal integer WLO=(LoadInteger(XY,(GetHandleId(TLI)),(800)))if WLO>0 thencall UnitRemoveAbility(TLI,JMI[WLO])set WLO=IMaxBJ(0,WLO-1)call QTI(TLI,JMI[WLO])call SaveInteger(XY,(GetHandleId(TLI)),(800),(WLO))if GetSpellTargetUnit()==null thenset x=GetSpellTargetX()set y=GetSpellTargetY()elseset x=GetUnitX(GetSpellTargetUnit())set y=GetUnitY(GetSpellTargetUnit())endifset IT6=CreateUnit(GetOwningPlayer(TLI),1865429336,x,y,0)call UnitApplyTimedLife(IT6,1112820806,120)call SetUnitPathing(IT6,false)set O16=O16+1call SaveUnitHandle(XY,(MKI),(1400+O16),(IT6))call SaveInteger(XY,(MKI),(279),(O16))if(O16>6)thencall KillUnit(O36)endifendifset IT6=nullset TLI=nullset O36=nullendfunctionfunction O46 takes nothing returns booleanif GetSpellAbilityId()==1093817416 thencall O26()endifreturn falseendfunctionfunction RX1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function O46))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_DEATH)call TriggerAddCondition(t,Condition(function OO6))set JMI[0]=1093817158set JMI[1]=1093817154set JMI[2]=1093817153set JMI[3]=1093817156set JMI[4]=1093817155set JMI[5]=1093817157set JMI[6]=1093817413set t=nullendfunctionfunction BoulderSmash_FindRock takes nothing returns booleanif IsUnitInGroup(GetFilterUnit(),JQI)==false and(GetUnitTypeId(GetFilterUnit())==1865429336 or GetUnitTypeId(GetFilterUnit())==1865429552)and GetFilterUnit()!=K0I thencall GroupAddUnit(JQI,GetFilterUnit())set KOI=KOI+1if GetUnitTypeId(GetFilterUnit())==1865429336 thencall KillUnit(GetFilterUnit())endifendifreturn falseendfunctionfunction O56 takes nothing returns nothingif IsUnitInGroup(GetEnumUnit(),JQI)==false thencall GroupAddUnit(JQI,GetEnumUnit())call TKI(JUI,GetEnumUnit(),1,K1I)if K2I==1 thencall BQ1(JUI,GetEnumUnit(),0.25+0.5*KII)endifif IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)==true and((LoadInteger(XY,(GetHandleId((GetEnumUnit()))),((809))))==1)thenset K3I=GetEnumUnit()endifendifendfunctionfunction O66 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real P6I=(LoadReal(XY,(MKI),(6)))local real P7I=(LoadReal(XY,(MKI),(7)))local real alocal real PI2=(LoadReal(XY,(MKI),(23)))local real P12=(LoadReal(XY,(MKI),(24)))local real xlocal real ylocal boolean ID6=falselocal group SP2=(LoadGroupHandle(XY,(MKI),(187)))local group glocal integer RockBonusCount=(LoadInteger(XY,(MKI),(34)))local integer HeroSTR=GetHeroStr(TLI,true)local unit IN6=(LoadUnitHandle(XY,(MKI),(810)))if IN6!=null thenset P6I=GetUnitX(IN6)set P7I=GetUnitY(IN6)endifset a=bj_DEGTORAD*PUI(GetUnitX(TMI),GetUnitY(TMI),P6I,P7I)set x=PI2+(JPI)*0.03*Cos(a)set y=P12+(JPI)*0.03*Sin(a)if PAI(x,y,P6I,P7I)<(5+(JPI)*0.03)thenset x=P6Iset y=P7Iset ID6=trueendifset x=RCI(x)set y=RGI(y)set JQI=SP2set JUI=TLIset KII=GetUnitAbilityLevel(TLI,1093817685)set K1I=125set K3I=nullif((LoadInteger(XY,(GetHandleId((TMI))),((4306))))==1)==true or GetTriggerEventId()==EVENT_UNIT_DEATH or GetUnitAbilityLevel(TMI,1110456406)>0 or((LoadInteger(XY,(GetHandleId((TMI))),((4336))))==1)==true or(IN6==null and GetTriggerEvalCount(t)>200)thenset ID6=trueelsecall DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\FlakCannons\\FlakTarget.mdl",x,y))if GetUnitTypeId(TMI)==1865429336 or GetUnitTypeId(TMI)==1865429552 thenset K2I=1call SetUnitPosition(TMI,x,y)call SetUnitX(TMI,RCI(x))call SetUnitY(TMI,RGI(y))elseset K2I=0call SetUnitX(TMI,RCI(x))call SetUnitY(TMI,RGI(y))endifcall QEI(x,y,150)call SaveReal(XY,(MKI),(23),((x)*1.0))call SaveReal(XY,(MKI),(24),((y)*1.0))set g=MDI()set CK=TLIcall GroupEnumUnitsInRange(g,x,y,200+25,Condition(function AT1))call GroupRemoveUnit(g,TMI)call ForGroup(g,function O56)call MCI(g)if K3I!=null and K2I==1 thenset g=MDI()set K0I=nullset QJ=9999call GroupEnumUnitsInRange(g,GetUnitX(K3I),GetUnitY(K3I),600+25,Condition(function I36))call MCI(g)if K0I!=null thenset IN6=K0Icall SaveUnitHandle(XY,(MKI),(810),(IN6))set ID6=falseendifendifset g=nullendifif ID6 thenif GetUnitTypeId(TMI)!=1865429336 thencall SetUnitPathing(TMI,true)endifcall FlushChildHashtable(XY,(MKI))call MZI(t)call MCI(SP2)call SaveInteger(XY,(GetHandleId((TMI))),((4335)),(2))if GetTriggerEventId()!=EVENT_UNIT_DEATH thenif IsPlayerAlly(GetOwningPlayer(TLI),GetOwningPlayer(TMI))==false thencall TKI(JUI,TMI,1,K1I)endifendifendifset TMI=nullset t=nullset SP2=nullset TLI=nullreturn falseendfunctionfunction O76 takes nothing returns booleanif GetUnitTypeId(GetFilterUnit())==1865429336 thenreturn trueendifreturn falseendfunctionfunction O86 takes nothing returns nothinglocal unit TMI=GetSpellTargetUnit()local unit TLI=GetTriggerUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093817685)local trigger tlocal integer MKIlocal real alocal real xlocal real ylocal integer i=-1local boolean XCO=falselocal real d=400+100*NGIlocal group gif TMI==null thenset g=MDI()call GroupEnumUnitsInRange(g,GetSpellTargetX(),GetSpellTargetY(),180+25,Condition(function O76))set TMI=FirstOfGroup(g)call MCI(g)set g=nullset a=GetUnitFacing(TLI)elseset a=PQI(TLI,TMI)endifif TMI==null thenreturnendifset t=CreateTrigger()set MKI=GetHandleId(t)if TLI==TMI thenset a=GetUnitFacing(TLI)endifif GetUnitTypeId(TMI)==1865429336 thenset d=2000endifloopexitwhen XCO or i==23set i=i+1set x=RCI(GetUnitX(TMI)+(d-i*25)*Cos(a*bj_DEGTORAD))set y=RGI(GetUnitY(TMI)+(d-i*25)*Sin(a*bj_DEGTORAD))if(IsPointInRegion(XN,((x)*1.0),((y)*1.0)))==false thenset XCO=trueendifendloopcall SetUnitPathing(TMI,false)call TriggerRegisterTimerEvent(t,0.03,true)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function O66))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))call SaveReal(XY,(MKI),(23),((GetUnitX(TMI))*1.0))call SaveReal(XY,(MKI),(24),((GetUnitY(TMI))*1.0))call SaveInteger(XY,(MKI),(34),(0))call SaveGroupHandle(XY,(MKI),(187),(MDI()))call SaveUnitHandle(XY,(MKI),(810),(null))call SaveInteger(XY,(GetHandleId((TMI))),((4335)),(1))set TMI=nullset TLI=nullset t=nullendfunctionfunction O96 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local group gif GetUnitTypeId(TMI)==1848651852 thencall R6I(TLI)call R1I(GetOwningPlayer(TLI),GetObjectName(1848658745))elseif TMI==null thenset g=MDI()call GroupEnumUnitsInRange(g,GetSpellTargetX(),GetSpellTargetY(),180+25,Condition(function O76))if FirstOfGroup(g)==null thencall R6I(TLI)call R1I(GetOwningPlayer(TLI),GetObjectName(1848658745))endifcall MCI(g)set g=nullendifset TLI=nullset TMI=nullendfunctionfunction OA6 takes nothing returns booleanif GetSpellAbilityId()==1093817685 thenif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT thenif IsUnitEnemy(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))==false or MBI(GetSpellTargetUnit())==false thencall O86()endifelsecall O96()endifendifreturn falseendfunctionfunction RY1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function OA6))set t=nullendfunctionfunction OB6 takes nothing returns nothinglocal integer idif K5I==1 thenset id=1093817172elseif K5I==2 thenset id=1093817173elseif K5I==3 thenset id=1093817170elseif K5I==4 thenset id=1093817171endifcall TKI(K4I,GetEnumUnit(),1,K6I)endfunctionfunction OC6 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local group glocal integer NGI=GetUnitAbilityLevel(TLI,1093817145)local boolean OD6=falseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT thenif GetSpellAbilityId()==1093817416 and GetSpellTargetUnit()==QHI thenset OD6=trueendifendifif OD6==true or GetTriggerEventId()!=EVENT_UNIT_SPELL_EFFECT thenset g=MDI()call SetUnitX(TMI,GetUnitX(QHI))call SetUnitY(TMI,GetUnitY(QHI))call KillUnit(QHI)call SetUnitInvulnerable(TMI,false)call PauseUnit(TMI,false)call ShowUnit(TMI,true)call ClearSelectionForPlayer(GetOwningPlayer(TMI))call SelectUnitAddForPlayer(TMI,GetOwningPlayer(TMI))call FlushChildHashtable(XY,(MKI))call MZI(t)set K5I=NGI+1set CK=TLIset K4I=TLIset K6I=50*GetUnitAbilityLevel(K4I,1093817145)if OD6 thenset K6I=K6I+150endifcall GroupEnumUnitsInRange(g,GetUnitX(TMI),GetUnitY(TMI),350+25,Condition(function AT1))call ForGroup(g,function OB6)call MCI(g)endifset g=nullset t=nullset TLI=nullset TMI=nullset QHI=nullreturn falseendfunctionfunction OE6 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093817145)local trigger tlocal integer MKIlocal unit QHI=CreateUnit(GetOwningPlayer(TLI),1865429552,GetUnitX(TMI),GetUnitY(TMI),0)local integer WLO=(LoadInteger(XY,(GetHandleId(GetTriggerUnit())),(800)))if(IsUnitEnemy(TMI,GetOwningPlayer(TLI)))==false or MBI(GetSpellTargetUnit())==false thenset t=CreateTrigger()set MKI=GetHandleId(t)call SelectUnitRemoveForPlayer(TMI,GetOwningPlayer(TMI))call SetUnitInvulnerable(TMI,true)call PauseUnit(TMI,true)call ShowUnit(TMI,false)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(19),(QHI))call TriggerRegisterTimerEvent(t,3,false)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function OC6))endifset QHI=CreateUnit(GetOwningPlayer(TMI),1865429553,GetUnitX(TMI),GetUnitY(TMI),0)call UnitApplyTimedLife(QHI,1112820806,3)set TLI=nullset TMI=nullset QHI=nullset t=nullendfunctionfunction OF6 takes nothing returns booleanif GetSpellAbilityId()==1093817145 thencall OE6()endifreturn falseendfunctionfunction OG6 takes nothing returns nothingif IsUnitAlly(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))and(LoadBoolean(XY,(GetHandleId(GetOwningPlayer(GetSpellTargetUnit()))),(139)))and GetSpellTargetUnit()!=GetTriggerUnit()thencall R6I(GetTriggerUnit())call R1I(GetOwningPlayer(GetTriggerUnit()),GetObjectName(1848652600))elsereturnif(LoadInteger(XY,(GetHandleId(GetTriggerUnit())),(800)))<=0 thencall R6I(GetTriggerUnit())call R1I(GetOwningPlayer(GetTriggerUnit()),GetObjectName(1848659506))elseif T6I(GetSpellTargetUnit())==true thencall R6I(GetTriggerUnit())call R1I(GetOwningPlayer(GetTriggerUnit()),GetObjectName(1848659026))endifendifendfunctionfunction OH6 takes nothing returns booleanif GetSpellAbilityId()==1093817145 thencall OG6()endifreturn falseendfunctionfunction Register_Petrify takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function OF6))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function OH6))set t=nullendfunctionfunction OZ6 takes nothing returns nothingset K8I=GetEnumUnit()call ExecuteFunc("OV6")endfunctionfunction OW6 takes nothing returns booleanreturn QPI(GetFilterUnit())==false and GetUnitTypeId(GetFilterUnit())==1865429336 and((LoadInteger(XY,(GetHandleId((GetFilterUnit()))),((4335))))==1)==false and((LoadInteger(XY,(GetHandleId((GetFilterUnit()))),((4340))))==1)==falseendfunctionfunction OX6 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real x=GetUnitX(TMI)local real y=GetUnitY(TMI)local group g=MDI()local integer MFI=GetTriggerEvalCount(t)local integer NGI=GetUnitAbilityLevel(TLI,1093817417)local real YSO=(LoadReal(XY,(GetHandleId(TMI)),(807)))if ModuloInteger(MFI,5)==0 thencall TKI(TLI,TMI,1,(25+25*NGI)/2)endifset K7I=TLIset CK=TLIcall GroupEnumUnitsInRange(g,x,y,300+25,Condition(function OW6))call ForGroup(g,function OZ6)call MCI(g)if(TimerGetElapsed(M))>YSO or QPI(TMI)thencall SaveInteger(XY,(GetHandleId((TMI))),((809)),(2))call DestroyEffect((LoadEffectHandle(XY,(MKI),(32))))call FlushChildHashtable(XY,(MKI))call MZI(t)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction OY6 takes unit TLI,unit TMI returns nothinglocal trigger tlocal integer MKIlocal real YSO=(LoadReal(XY,(GetHandleId(TMI)),(807)))call SaveReal(XY,(GetHandleId(TMI)),(807),(((TimerGetElapsed(M))+6)*1.0))if YSO<(TimerGetElapsed(M))thencall SaveInteger(XY,(GetHandleId((TMI))),((809)),(1))set t=CreateTrigger()set MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveEffectHandle(XY,(MKI),(32),(AddSpecialEffectTarget("war3mapImported\\MagnetizeTargetOverhead.mdx",TMI,"origin")))call TriggerRegisterTimerEvent(t,0.1,true)call TriggerAddCondition(t,Condition(function OX6))endifset t=nullendfunctionfunction OJ6 takes nothing returns nothingcall OY6(K7I,GetEnumUnit())endfunctionfunction OK6 takes unit TLI,unit TMI returns nothinglocal group g=MDI()local real x=GetUnitX(TMI)local real y=GetUnitY(TMI)local real FR3=300if GetUnitTypeId(TMI)==1865429336 thencall DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\DemolisherMissile\\DemolisherMissile.mdx",GetUnitX(TMI),GetUnitY(TMI)))call UnitApplyTimedLife(TMI,1112820806,5)call SaveInteger(XY,(GetHandleId((TMI))),((4340)),(1))call SetUnitVertexColor(TMI,0,0,0,100)set FR3=600elsecall DestroyEffect(AddSpecialEffect("war3mapImported\\MagnetizeCastAoE.mdx",GetUnitX(TMI),GetUnitY(TMI)))endifset CK=TLIset K7I=TLIset K8I=TMIcall GroupEnumUnitsInRange(g,x,y,FR3+25,Condition(function AT1))call ForGroup(g,function OJ6)call MCI(g)set TLI=nullset g=nullendfunctionfunction OV6 takes nothing returns nothingcall OK6(K7I,K8I)endfunctionfunction OL6 takes nothing returns booleanif GetSpellAbilityId()==1093817417 thencall OK6(GetTriggerUnit(),GetTriggerUnit())endifreturn falseendfunctionfunction RV1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function OL6))set t=nullendfunctionfunction OM6 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))call SetUnitAnimationByIndex(TLI,8)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullreturn falseendfunctionfunction ON6 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SetUnitAnimationByIndex(TLI,7)call TriggerRegisterTimerEvent(t,2.5,false)call TriggerAddCondition(t,Condition(function OM6))call SaveUnitHandle(XY,(MKI),(2),(TLI))set t=nullset TLI=nullendfunctionfunction OS6 takes nothing returns booleanif GetUnitTypeId(GetTriggerUnit())==1311788373 or GetUnitTypeId(GetTriggerUnit())==1311788375 thencall ON6()endifreturn falseendfunctionfunction RZ1 takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_DEATH)call TriggerAddCondition(t,Condition(function OS6))set t=nullendfunctionfunction OT6 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local real YSO=(LoadReal(XY,(GetHandleId(TMI)),(804)))if YSO>(TimerGetElapsed(M))or GetTriggerEventId()==EVENT_WIDGET_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)call UnitRemoveAbility(TMI,1093817168)endifset t=nullset TMI=nullreturn falseendfunctionfunction OR6 takes unit TMI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call SaveReal(XY,(GetHandleId(TMI)),(804),(((TimerGetElapsed(M))+10)*1.0))call SaveUnitHandle(XY,(MKI),(17),(TMI))call TriggerRegisterTimerEvent(t,0.1,true)call TriggerRegisterDeathEvent(t,TMI)call TriggerAddCondition(t,Condition(function OT6))call QTI(TMI,1093817168)call SetPlayerAbilityAvailable(GetOwningPlayer(TMI),1093817168,false)set t=nullendfunctionfunction OP6 takes nothing returns nothingif IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)or IsUnitIllusion(GetEnumUnit())==true thenset KAI=truecall OR6(GetEnumUnit())endifcall TKI(K9I,GetEnumUnit(),1,75*KBI)endfunctionfunction OQ6 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))call SetUnitState(TLI,UNIT_STATE_MANA,GetUnitState(TLI,UNIT_STATE_MANA)+200)call FlushChildHashtable(XY,(MKI))call MZI(t)set t=nullset TLI=nullreturn falseendfunctionfunction OU6 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local real x=(LoadReal(XY,(MKI),(6)))local real y=(LoadReal(XY,(MKI),(7)))local group g=MDI()set KBI=GetUnitAbilityLevel(TLI,1093817167)set CK=TLIset K9I=TLIset KAI=falsecall GroupEnumUnitsInRange(g,x,y,175+25,Condition(function AT1))call ForGroup(g,function OP6)call MCI(g)call PMI("effects\\BasicWaterFlash.mdx",x,y,1)call FlushChildHashtable(XY,(MKI))call MZI(t)if KAI thenset t=CreateTrigger()set MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(2),(TLI))call TriggerRegisterTimerEvent(t,0,false)call TriggerAddCondition(t,Condition(function OQ6))endifset g=nullset t=nullset TLI=nullreturn falseendfunctionfunction A06 takes nothing returns nothinglocal unit TLI=GetTriggerUnit()local real x=GetSpellTargetX()local real y=GetSpellTargetY()local integer NGI=GetUnitAbilityLevel(TLI,1093817167)local trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.6,false)call TriggerAddCondition(t,Condition(function OU6))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveReal(XY,(MKI),(6),((x)*1.0))call SaveReal(XY,(MKI),(7),((y)*1.0))set TLI=nullset t=nullendfunctionfunction AI6 takes nothing returns booleanif GetSpellAbilityId()==1093817167 thencall A06()endifreturn falseendfunctionfunction Register_Pop takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function AI6))set t=nullendfunctionfunction A16 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=(LoadInteger(XY,(MKI),(5)))if GetTriggerEventId()==EVENT_UNIT_DAMAGED thenif GetOwningPlayer(GetEventDamageSource())==GetOwningPlayer(TLI)or GetOwningPlayer(GetEventDamageSource())==GetOwningPlayer(TMI)thencall DisableTrigger(t)call TKI(TLI,TMI,3,GetEventDamage()*(0.6+0.1*NGI))call PII(TLI,GetEventDamage()*(0.6+0.1*NGI))call EnableTrigger(t)endifendifif GetTriggerEventId()!=EVENT_UNIT_DAMAGED or QPI(TMI)thencall DestroyEffect((LoadEffectHandle(XY,(MKI),(175))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(176))))call DestroyEffect((LoadEffectHandle(XY,(MKI),(177))))call FlushChildHashtable(XY,(MKI))call MZI(t)call UnitRemoveAbility(TMI,1093817160)call UnitRemoveAbility(TMI,1110460241)endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction AO6 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local integer NGI=GetUnitAbilityLevel(TLI,1093817161)call QTI(TMI,1093817160)call TriggerRegisterDeathEvent(t,TMI)call TriggerRegisterUnitEvent(t,TLI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,3.5+0.5*NGI,false)call TriggerAddCondition(t,Condition(function A16))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveInteger(XY,(MKI),(5),(NGI))call SaveEffectHandle(XY,(MKI),(175),(AddSpecialEffectTarget("effects\\PoisonHands.mdx",TMI,"overhead")))call SaveEffectHandle(XY,(MKI),(176),(AddSpecialEffectTarget("effects\\PoisonHands.mdx",TMI,"hand,left")))call SaveEffectHandle(XY,(MKI),(177),(AddSpecialEffectTarget("effects\\PoisonHands.mdx",TMI,"hand,right")))set t=nullset TLI=nullset TMI=nullendfunctionfunction A26 takes nothing returns booleanif GetSpellAbilityId()==1093817161 thencall AO6()endifreturn falseendfunctionfunction Register_SealedFate takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function A26))set t=nullendfunctionfunction A36 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit QP1=(LoadUnitHandle(XY,(MKI),(335)))if GetTriggerEventId()==EVENT_UNIT_DAMAGED thencall SetUnitState(TMI,UNIT_STATE_LIFE,RMaxBJ(1,GetUnitState(TMI,UNIT_STATE_LIFE)-GetEventDamage()))elseif GetTriggerEventId()==EVENT_WIDGET_DEATH thencall FlushChildHashtable(XY,(MKI))call MZI(t)if GetTriggerUnit()==TMI thencall KillUnit(QP1)endifelsecall IssueTargetOrderById(QP1,851986,TMI)endifset t=nullset TLI=nullset TMI=nullset QP1=nullreturn falseendfunctionfunction A46 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local unit QP1=GetSummonedUnit()local unit QHIif GetUnitAbilityLevel(QP1,1110460239)>0 thencall FlushChildHashtable(XY,(MKI))call MZI(t)set t=CreateTrigger()set MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))call SaveUnitHandle(XY,(MKI),(335),(QP1))call TriggerRegisterDeathEvent(t,QP1)call TriggerRegisterDeathEvent(t,TMI)call TriggerRegisterUnitEvent(t,QP1,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,0.1,true)call TriggerAddCondition(t,Condition(function A36))set QHI=CreateUnit(GetOwningPlayer(QP1),1697656901,GetUnitX(QP1),GetUnitY(QP1),0)call UnitAddAbility(QHI,1093816917)call SetUnitAbilityLevel(QHI,1093816917,GetUnitAbilityLevel(TLI,1093816663))call IssueTargetOrder(QHI,"banish",QP1)call UnitShareVision(QP1,GetOwningPlayer(TLI),true)call IssueTargetOrderById(QP1,851986,TMI)endifset t=nullset TLI=nullset TMI=nullset QP1=nullset QHI=nullreturn falseendfunctionfunction A56 takes nothing returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local unit TLI=GetTriggerUnit()local unit TMI=GetSpellTargetUnit()local unit QHIlocal player pcall Q9I(t,EVENT_PLAYER_UNIT_SUMMON)call TriggerAddCondition(t,Condition(function A46))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))if IsUnitAlly(TMI,BO[0])==true thenset p=BO[0]elseset p=CO[0]endifset QHI=CreateUnit(p,1697656901,GetUnitX(TMI),GetUnitY(TMI),0)call UnitAddAbility(QHI,1093816916)call SetUnitAbilityLevel(QHI,1093816916,GetUnitAbilityLevel(TLI,1093816663))call IssueTargetOrderById(QHI,852274,TMI)set t=nullset TLI=nullset TMI=nullendfunctionfunction A66 takes nothing returns booleanif GetSpellAbilityId()==1093816663 thencall A56()endifreturn falseendfunctionfunction Register_SoulFragment takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function A66))set t=nullendfunctionfunction A76 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))local unit TMI=(LoadUnitHandle(XY,(MKI),(17)))local integer NGI=GetUnitAbilityLevel(TLI,1093817169)if GetTriggerEventId()!=EVENT_UNIT_DAMAGED thencall FlushChildHashtable(XY,(MKI))call MZI(t)elsecall SetUnitState(TLI,UNIT_STATE_LIFE,GetUnitState(TLI,UNIT_STATE_LIFE)+GetEventDamage()*(0.25+0.25*NGI))call SetUnitState(TLI,UNIT_STATE_MANA,GetUnitState(TLI,UNIT_STATE_MANA)+GetEventDamage()*(0.25*NGI))endifset t=nullset TLI=nullset TMI=nullreturn falseendfunctionfunction A86 takes unit TLI,unit TMI returns nothinglocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)call TriggerRegisterUnitEvent(t,TMI,EVENT_UNIT_DAMAGED)call TriggerRegisterTimerEvent(t,4,false)call TriggerAddCondition(t,Condition(function A76))call SaveUnitHandle(XY,(MKI),(2),(TLI))call SaveUnitHandle(XY,(MKI),(17),(TMI))set t=nullendfunctionfunction A96 takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit TLI=(LoadUnitHandle(XY,(MKI),(2)))call FlushChildHashtable(XY,(MKI))call MZI(t)call UnitAddAbility(TLI,1093817176)call UnitRemoveAbility(TLI,1093817176)set TLI=nullset t=nullreturn falseendfunctionfunction AA6 takes nothing returns nothingif T6I(GetEnumUnit())==false thencall DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\SpellShieldAmulet\\SpellShieldCaster.mdl",GetEnumUnit(),"overhead"))call SetUnitOwner(KEI,GetOwningPlayer(GetEnumUnit()),false)call IssueTargetOrder(KEI,"banish",GetEnumUnit())call A86(KFI,GetEnumUnit())endifendfunctionfunction RiftWalk_Move takes nothing returns booleanlocal trigger t=GetTriggeringTrigger()local integer MKI=GetHandleId(t)local unit N0I=(LoadUnitHandle(XY,(MKI),(14)))local real x2=(LoadReal(XY,(MKI),(66)))local real y2=(LoadReal(XY,(MKI),(67)))local real a=(LoadReal(XY,(MKI),(137)))local integer MFI=GetTriggerEvalCount(t)local real x=GetUnitX(N0I)local real y=GetUnitY(N0I)local real PI2=(LoadReal(XY,(MKI),(23)))local real P12=(LoadReal(XY,(MKI),(24)))local unit QHI=(LoadUnitHandle(XY,(MKI),(19)))local group g=MDI()local group SP2=(LoadGroupHandle(XY,(MKI),(187)))local integer NGI=GetUnitAbilityLevel(N0I,1093817169)if PAI(x,y,x2,y2)<=KCI thenset x=x2set y=y2elseset x=RCI(PI2+65*Cos(a*bj_DEGTORAD))set y=RGI(P12+65*Sin(a*bj_DEGTORAD))endifset CK=N0Iset KDI=SP2set KEI=QHIset KFI=N0Icall GroupEnumUnitsInRange(g,x,y,200+25,Condition(function AT1))call ForGroup(g,function AA6)call MCI(g)call SaveReal(XY,(MKI),(23),((x)*1.0))call SaveReal(XY,(MKI),(24),((y)*1.0))call SetUnitX(N0I,x)call SetUnitY(N0I,y)if(x==x2 and y==y2)or MFI>40 thencall MCI(SP2)call FlushChildHashtable(XY,(MKI))call MZI(t)call KillUnit(QHI)call UnitAddAbility(N0I,1093817175)call UnitRemoveAbility(N0I,1093817175)set t=CreateTrigger()set MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(2),(N0I))call TriggerRegisterTimerEvent(t,4,false)call TriggerAddCondition(t,Condition(function A96))call SetUnitAnimation(N0I,"stand")call SetUnitPathing(N0I,true)call SetUnitInvulnerable(N0I,false)if GetUnitTypeId(N0I)==1160786520 thencall SetUnitVertexColor(N0I,255,255,255,255)elsecall SetUnitVertexColor(N0I,255,255,255,255)endifcall SaveInteger(XY,(GetHandleId((N0I))),((4261)),(2))endifset t=nullset N0I=nullset QHI=nullreturn falseendfunctionfunction AB6 takes nothing returns nothinglocal unit N0I=GetTriggerUnit()local location llocal trigger t=CreateTrigger()local integer MKI=GetHandleId(t)local real x1=GetUnitX(N0I)local real y1=GetUnitY(N0I)local real x2local real y2local real alocal unit QHI=CreateUnit(GetOwningPlayer(N0I),1697656901,x1,y1,0)local group g=MDI()if GetSpellTargetUnit()==null thenset l=GetSpellTargetLoc()elseset l=GetUnitLoc(GetSpellTargetUnit())endifset x2=GetLocationX(l)set y2=GetLocationY(l)set a=PUI(x1,y1,x2,y2)call RemoveLocation(l)call QTI(QHI,1093817174)call SetUnitAbilityLevel(QHI,1093817174,GetUnitAbilityLevel(N0I,1093817169))set KEI=QHIset KFI=N0Icall GroupEnumUnitsInRange(g,x2,y2,200+25,Condition(function AK1))call ForGroup(g,function AA6)call MCI(g)set g=nullcall UnitAddAbility(N0I,1093817175)call UnitRemoveAbility(N0I,1093817175)set t=CreateTrigger()set MKI=GetHandleId(t)call SaveUnitHandle(XY,(MKI),(2),(N0I))call TriggerRegisterTimerEvent(t,4,false)call TriggerAddCondition(t,Condition(function A96))set N0I=nullset l=nullset t=nullset QHI=nullendfunctionfunction AC6 takes nothing returns booleanif GetSpellAbilityId()==1093817169 thencall AB6()endifreturn falseendfunctionfunction Register_RiftWalk takes nothing returns nothinglocal trigger t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function AC6))set t=nullendfunctionfunction InitCustomTeams takes nothing returns nothingcall SetPlayerTeam(Player(1),0)call SetPlayerTeam(Player(2),0)call SetPlayerTeam(Player(3),0)call SetPlayerTeam(Player(4),0)call SetPlayerTeam(Player(5),0)call SetPlayerTeam(Player(7),1)call SetPlayerTeam(Player(8),1)call SetPlayerTeam(Player(9),1)call SetPlayerTeam(Player(10),1)call SetPlayerTeam(Player(11),1)endfunctionfunction main takes nothing returns nothinglocal weathereffect welocal integer ilocal player plocal unit ulocal integer LCIlocal trigger tlocal real lifelocal integer L9Ilocal integer LAIlocal version vlocal integer L1Ilocal real FU1local real G01local real GI1local real G11local real GO1local real G21local real G31local real G41local real G51local real G61local real G71local real G81local real G91local real GA1local real GB1local real GC1local real GD1local real GE1local real GF1local real GG1local integer GH1local player NJIlocal real H11local real HO1local real H21local real H31local real H41local real H51local real H61local real H71local real H81local real H91local real HA1local real HB1local real HC1local real HD1local real HE1local real HF1local real HG1local real HH1local real HZ1local real HV1local real HW1local real HX1local real HY1local real HJ1local location O4Olocal region L7Olocal real dlocal integer MKIcall SetCameraBounds(-7552.0+GetCameraMargin(CAMERA_MARGIN_LEFT),-7936.0+GetCameraMargin(CAMERA_MARGIN_BOTTOM),7552.0-GetCameraMargin(CAMERA_MARGIN_RIGHT),7424.0-GetCameraMargin(CAMERA_MARGIN_TOP),-7552.0+GetCameraMargin(CAMERA_MARGIN_LEFT),7424.0-GetCameraMargin(CAMERA_MARGIN_TOP),7552.0-GetCameraMargin(CAMERA_MARGIN_RIGHT),-7936.0+GetCameraMargin(CAMERA_MARGIN_BOTTOM))call SetDayNightModels("Environment\\DNC\\DNCFelwood\\DNCFelwoodTerrain\\DNCFelwoodTerrain.mdl","Environment\\DNC\\DNCFelwood\\DNCFelwoodUnit\\DNCFelwoodUnit.mdl")call SetWaterBaseColor(0,0,255,255)call NewSoundEnvironment("Default")call SetAmbientDaySound("FelwoodDay")call SetAmbientNightSound("FelwoodNight")call SetMapMusic("Music",true,0)set BC=CreateSound("Abilities\\Spells\\Human\\Avatar\\Avatar.wav",false,true,true,10,10,"SpellsEAX")call SetSoundParamsFromLabel(BC,"Avatar")call SetSoundDuration(BC,3199)set CC=CreateSound("Abilities\\Spells\\NightElf\\Blink\\BlinkArrival1.wav",false,true,true,10,10,"SpellsEAX")call SetSoundParamsFromLabel(CC,"BlinkTarget")call SetSoundDuration(CC,1466)call SetSoundPitch(CC,1.6)set DC=CreateSound("Abilities\\Spells\\Human\\Blizzard\\BlizzardLoop1.wav",true,true,true,10,10,"SpellsEAX")call SetSoundParamsFromLabel(DC,"BlizzardLoop")call SetSoundDuration(DC,4000)set EC=CreateSound("Buildings\\Undead\\TempleOfTheDamned\\TempleOfTheDamnedWhat.wav",false,true,true,10,10,"DefaultEAXON")call SetSoundParamsFromLabel(EC,"TempleOfTheDamnedWhat")call SetSoundDuration(EC,3518)call SetSoundDistanceCutoff(EC,2000.0)set FC=CreateSound("Abilities\\Spells\\Human\\Flare\\FlareTarget2.wav",false,true,true,10,10,"DefaultEAXON")call SetSoundParamsFromLabel(FC,"Flare2")call SetSoundDuration(FC,1344)call SetSoundDistanceCutoff(FC,2000.0)set GC=CreateSound("Sounds\\Dominating.mp3",false,false,false,10,10,"DefaultEAXON")call SetSoundDuration(GC,1802)call SetSoundChannel(GC,0)call SetSoundVolume(GC,127)call SetSoundPitch(GC,1.0)set HC=CreateSound("Sounds\\Double_Kill.mp3",false,false,false,10,10,"DefaultEAXON")call SetSoundDuration(HC,2012)call SetSoundChannel(HC,0)call SetSoundVolume(HC,127)call SetSoundPitch(HC,1.0)set ZC=CreateSound("Sounds\\firstblood.mp3",false,false,false,10,10,"DefaultEAXON")call SetSoundDuration(ZC,1567)call SetSoundChannel(ZC,0)call SetSoundVolume(ZC,127)call SetSoundPitch(ZC,1.0)set VC=CreateSound("Units\\Creeps\\GoblinSapper\\GoblinSapperPissed1.wav",false,true,true,10,10,"DefaultEAXON")call SetSoundParamsFromLabel(VC,"GoblinSapperPissed")call SetSoundDuration(VC,1515)call SetSoundChannel(VC,0)set WC=CreateSound("Units\\Creeps\\GoblinSapper\\GoblinSapperYesAttack1.wav",false,false,true,10,10,"DefaultEAXON")call SetSoundParamsFromLabel(WC,"GoblinSapperYesAttack")call SetSoundDuration(WC,813)call SetSoundChannel(WC,0)set XC=CreateSound("Sounds\\GodLike.mp3",false,false,false,10,10,"DefaultEAXON")call SetSoundDuration(XC,1828)call SetSoundChannel(XC,0)call SetSoundVolume(XC,127)call SetSoundPitch(XC,1.0)set YC=CreateSound("Units\\Orc\\HeroBladeMaster\\HeroBladeMasterPissed1.wav",false,true,true,10,10,"HeroAcksEAX")call SetSoundParamsFromLabel(YC,"HeroBladeMasterPissed")call SetSoundDuration(YC,2235)set JC=CreateSound("Sounds\\HolyShit.mp3",false,false,false,10,10,"DefaultEAXON")call SetSoundDuration(JC,2325)call SetSoundChannel(JC,0)call SetSoundVolume(JC,127)call SetSoundPitch(JC,1.0)set NC=CreateSound("Buildings\\NightElf\\MoonWell\\MoonWellWhat1.wav",false,true,true,10,10,"DefaultEAXON")call SetSoundParamsFromLabel(NC,"MoonWellWhat")call SetSoundDuration(NC,2972)call SetSoundDistances(NC,600.0,10000.0)call SetSoundDistanceCutoff(NC,2000.0)set TC=CreateSound("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaos.wav",false,true,true,10,10,"SpellsEAX")call SetSoundParamsFromLabel(TC,"MarkOfChaos")call SetSoundDuration(TC,4000)set RC=CreateSound("Sounds\\Killing_Spree.mp3",false,false,false,10,10,"DefaultEAXON")call SetSoundDuration(RC,2377)call SetSoundChannel(RC,0)call SetSoundVolume(RC,127)call SetSoundPitch(RC,1.0)set PC=CreateSound("Sound\\Buildings\\Death\\NightElfBuildingDeathSmall1.wav",false,true,true,10,10,"DefaultEAXON")call SetSoundParamsFromLabel(PC,"DeathNightElfBuildingCancel")call SetSoundDuration(PC,3675)set QC=CreateSound("Sounds\\MegaKill.mp3",false,false,false,10,10,"DefaultEAXON")call SetSoundDuration(QC,2612)call SetSoundChannel(QC,0)call SetSoundVolume(QC,127)call SetSoundPitch(QC,1.0)set UC=CreateSound("Abilities\\Spells\\NightElf\\ShadowMeld\\ShadowMeld1.wav",false,true,true,10,10,"SpellsEAX")call SetSoundParamsFromLabel(UC,"ShadowMeld")call SetSoundDuration(UC,941)set OD=CreateSound("Sounds\\MonsterKill.mp3",false,false,false,10,10,"DefaultEAXON")call SetSoundDuration(OD,3344)call SetSoundChannel(OD,0)call SetSoundVolume(OD,127)call SetSoundPitch(OD,1.0)set ED=CreateSound("Units\\Creeps\\Ogre\\OgrePissed1.wav",false,true,true,10,10,"DefaultEAXON")call SetSoundParamsFromLabel(ED,"OgrePissed")call SetSoundDuration(ED,3309)set JD=CreateSound("Sounds\\Ownage.mp3",false,false,false,10,10,"DefaultEAXON")call SetSoundDuration(JD,2586)call SetSoundChannel(JD,0)call SetSoundVolume(JD,127)call SetSoundPitch(JD,1.0)set KD=CreateSound("Units\\Creeps\\PandarenBrewmaster\\PandarenBrewmasterPissed1.wav",false,true,true,10,10,"HeroAcksEAX")call SetSoundParamsFromLabel(KD,"PandarenBrewmasterPissed")call SetSoundDuration(KD,2316)set LD=CreateSound("Abilities\\Spells\\Human\\Polymorph\\PolymorphDone.wav",false,true,true,10,10,"SpellsEAX")call SetSoundParamsFromLabel(LD,"PolymorphDone")call SetSoundDuration(LD,1498)set MD=CreateSound("Buildings\\Naga\\TempleofTides\\TempleOfTidesWhat1.wav",false,true,true,10,10,"DefaultEAXON")call SetSoundParamsFromLabel(MD,"TempleOfTidesWhat")call SetSoundDuration(MD,3483)call SetSoundDistanceCutoff(MD,2000.0)set ND=CreateSound("Buildings\\Undead\\TombOfRelics\\TombOfRelicsWhat1.wav",false,true,true,10,10,"DefaultEAXON")call SetSoundParamsFromLabel(ND,"TombOfRelicsWhat")call SetSoundDuration(ND,3065)call SetSoundDistanceCutoff(ND,2000.0)set TD=CreateSound("Abilities\\Spells\\Orc\\Disenchant\\Disenchant.wav",false,true,true,10,10,"SpellsEAX")call SetSoundParamsFromLabel(TD,"Disenchant")call SetSoundDuration(TD,2043)set PD=CreateSound("Sound\\Interface\\Rescue.wav",false,false,false,10,10,"")call SetSoundParamsFromLabel(PD,"Rescue")call SetSoundDuration(PD,3796)set QD=CreateSound("Abilities\\Spells\\Undead\\Sleep\\SleepBirth1.wav",false,true,true,10,10,"SpellsEAX")call SetSoundParamsFromLabel(QD,"Sleep")call SetSoundDuration(QD,3203)set UD=CreateSound("Abilities\\Spells\\Undead\\DevourMagic\\DevourMagic.wav",false,true,true,10,10,"MissilesEAX")call SetSoundParamsFromLabel(UD,"DevourMagicLaunch")call SetSoundDuration(UD,1225)set IE=CreateSound("Abilities\\Spells\\Other\\BlackArrow\\TheBlackArrow.wav",false,true,true,10,10,"MissilesEAX")call SetSoundParamsFromLabel(IE,"BlackArrowHit")call SetSoundDuration(IE,1776)call SetSoundVolume(IE,50)set OE=CreateSound("Sound\\Ambient\\DoodadEffects\\TheHornOfCenarius.wav",false,false,false,10,10,"DefaultEAXON")call SetSoundParamsFromLabel(OE,"HornOfCenariusSound")call SetSoundDuration(OE,12121)call SetSoundVolume(OE,115)set AE=CreateSound("Sounds\\triple_kill.mp3",false,false,false,10,10,"DefaultEAXON")call SetSoundDuration(AE,1907)call SetSoundChannel(AE,0)call SetSoundVolume(AE,127)call SetSoundPitch(AE,1.0)set EE=CreateSound("Sounds\\Unstoppable.mp3",false,false,false,10,10,"DefaultEAXON")call SetSoundDuration(EE,2038)call SetSoundChannel(EE,0)call SetSoundVolume(EE,127)call SetSoundPitch(EE,1.0)set FE=CreateSound("Abilities\\Spells\\Human\\DivineShield\\PaladinDivineShieldDeath1.wav",false,true,true,10,10,"SpellsEAX")call SetSoundParamsFromLabel(FE,"DivineShieldDeath")call SetSoundDuration(FE,1043)call SetSoundDistanceCutoff(FE,1500.0)set GE=CreateSound("Abilities\\Spells\\Items\\AIso\\SoulGem.wav",false,true,true,10,10,"SpellsEAX")call SetSoundParamsFromLabel(GE,"SoulGem")call SetSoundDuration(GE,4474)set HE=CreateSound("Sounds\\WhickedSick.mp3",false,false,false,10,10,"DefaultEAXON")call SetSoundDuration(HE,2612)call SetSoundChannel(HE,0)call SetSoundVolume(HE,127)call SetSoundPitch(HE,1.0)set ZE=CreateSound("Units\\Creeps\\GoblinSapper\\GoblinSapperYesAttack4.wav",false,true,true,10,10,"DefaultEAXON")call SetSoundParamsFromLabel(ZE,"GoblinSapperYesAttack")call SetSoundDuration(ZE,1091)call SetSoundChannel(ZE,0)set VE=CreateSound("Abilities\\Spells\\NightElf\\shadowstrike\\ShadowStrikeBirth1.wav",false,true,true,10,10,"SpellsEAX")call SetSoundParamsFromLabel(VE,"ShadowStrikeBirth")call SetSoundDuration(VE,2194)call SetSoundPitch(VE,1.2)set WE=CreateSound("Abilities\\Spells\\Other\\BlackArrow\\TheBlackArrow.wav",false,true,true,10,10,"MissilesEAX")call SetSoundParamsFromLabel(WE,"BlackArrowHit")call SetSoundDuration(WE,1776)call SetSoundPitch(WE,1.6)set XE=CreateSound("Abilities\\Spells\\NightElf\\CorrosiveBreath\\CorrosiveBreathMissileLaunch1.wav",false,true,true,10,10,"SpellsEAX")call SetSoundParamsFromLabel(XE,"CorrosiveBreathMissileLaunch")call SetSoundDuration(XE,1301)call SetSoundPitch(XE,1.2)set YE=CreateSound("Sound\\Interface\\Warning\\NightElf\\SentinelAllyHeroDies1.wav",false,false,false,10,10,"DefaultEAXON")call SetSoundParamsFromLabel(YE,"AllyHeroDiesNightElf")call SetSoundDuration(YE,1963)call SetSoundVolume(YE,127)set JE=CreateSound("Sound\\Interface\\Warning\\Undead\\NecromancerAllyHeroDies1.wav",false,false,false,10,10,"DefaultEAXON")call SetSoundParamsFromLabel(JE,"AllyHeroDiesUndead")call SetSoundDuration(JE,1933)call SetSoundVolume(JE,127)set KE=CreateSound("Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.wav",false,false,true,10,10,"DefaultEAXON")call SetSoundParamsFromLabel(KE,"ReviveHuman")call SetSoundDuration(KE,3196)call SetSoundChannel(KE,8)set LE=CreateSound("Sound\\Interface\\SecretFound.wav",false,false,false,10,10,"")call SetSoundParamsFromLabel(LE,"SecretFound")call SetSoundDuration(LE,2525)set ME=CreateSound("Sounds\\UltraKill.mp3",false,false,false,10,10,"")call SetSoundDuration(ME,1958)call SetSoundChannel(ME,0)call SetSoundVolume(ME,127)call SetSoundPitch(ME,1.0)set NE=CreateSound("Sounds\\Rampage.mp3",false,false,false,10,10,"")call SetSoundDuration(NE,1195)call SetSoundChannel(NE,0)call SetSoundVolume(NE,127)call SetSoundPitch(NE,1.0)set SE=CreateSound("Buildings\\NightElf\\AltarOfElders\\AltarOfEldersWhat1.wav",false,true,true,10,10,"DefaultEAXON")call SetSoundParamsFromLabel(SE,"AltarOfEldersWhat")call SetSoundDuration(SE,3496)set TE=CreateSound("Units\\Orc\\AncestralGuardian\\AncestralGuardianAttack1.wav",false,true,true,10,10,"CombatSoundsEAX")call SetSoundParamsFromLabel(TE,"AncestralGuardianAttack1")call SetSoundDuration(TE,1181)set RE=CreateSound("Abilities\\Spells\\Human\\Feedback\\Feedback.wav",false,true,true,10,10,"SpellsEAX")call SetSoundParamsFromLabel(RE,"Feedback")call SetSoundDuration(RE,1222)set PE=CreateSound("Units\\Undead\\Abomination\\AbominationPissed5.wav",false,true,true,10,10,"DefaultEAXON")call SetSoundParamsFromLabel(PE,"AbominationPissed")call SetSoundDuration(PE,1735)set QE=CreateSound("Units\\Undead\\Abomination\\AbominationDeath1.wav",false,true,true,10,10,"DefaultEAXON")call SetSoundParamsFromLabel(QE,"AbominationDeath")call SetSoundDuration(QE,2455)set UE=CreateSound("Sound\\Units\\Death\\ArtilleryCorpseExplodeDeath1.wav",false,true,true,10,10,"DefaultEAXON")call SetSoundParamsFromLabel(UE,"ArtilleryExplodeDeath")call SetSoundDuration(UE,1486)set IF=CreateSound("Units\\Undead\\CryptFiend\\CryptFiendPissed2.wav",false,true,true,10,10,"DefaultEAXON")call SetSoundParamsFromLabel(IF,"CryptFiendPissed")call SetSoundDuration(IF,3541)set OF=CreateSound("Units\\Undead\\Banshee\\BansheeDeath.wav",false,true,true,10,10,"DefaultEAXON")call SetSoundParamsFromLabel(OF,"BansheeDeath")call SetSoundDuration(OF,2380)set AF=CreateSound("Abilities\\Spells\\Human\\FlameStrike\\FlameStrikeTargetWaveNonLoop1.wav",false,true,true,10,10,"SpellsEAX")call SetSoundParamsFromLabel(AF,"FlameStrikeTarget")call SetSoundDuration(AF,1927)set BF=CreateSound("Abilities\\Spells\\Other\\Volcano\\VolcanoLoop.wav",false,false,false,10,10,"DefaultEAXON")call SetSoundParamsFromLabel(BF,"VolcanoLoop")call SetSoundDuration(BF,7616)set CF=CreateSound("Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.wav",false,false,false,10,10,"SpellsEAX")call SetSoundParamsFromLabel(CF,"ThunderClap")call SetSoundDuration(CF,3451)set DF=CreateSound("Abilities\\Spells\\Orc\\MirrorImage\\MirrorImage.wav",false,true,true,10,10,"SpellsEAX")call SetSoundParamsFromLabel(DF,"MirrorImage")call SetSoundDuration(DF,1756)set EF=CreateSound("Abilities\\Spells\\Human\\CloudOfFog\\CloudOfFogLoop1.wav",true,true,true,10,10,"SpellsEAX")call SetSoundParamsFromLabel(EF,"CloudOfFogLoop")call SetSoundDuration(EF,2038)call SetSoundPitch(EF,0.9)set FF=CreateSound("Units\\Human\\Gyrocopter\\GyrocopterPissed1.wav",false,true,true,10,10,"DefaultEAXON")call SetSoundParamsFromLabel(FF,"GyrocopterPissed")call SetSoundDuration(FF,3913)set WF=CreateSound("Sound\\Interface\\SecretFound.wav",false,false,false,10,10,"")call SetSoundParamsFromLabel(WF,"SecretFound")call SetSoundDuration(WF,2525)set XF=CreateSound("Sound\\Interface\\Hint.wav",false,false,false,10,10,"")call SetSoundParamsFromLabel(XF,"Hint")call SetSoundDuration(XF,2006)set YF=CreateSound("war3mapImported\\pl_impact_stun.mp3",false,true,true,10,10,"SpellsEAX")call SetSoundDuration(YF,1340)call SetSoundChannel(YF,11)call SetSoundVolume(YF,127)call SetSoundPitch(YF,1.0)call SetSoundDistances(YF,600.0,10000.0)call SetSoundDistanceCutoff(YF,2000.0)call SetSoundConeAngles(YF,0.0,0.0,127)call SetSoundConeOrientation(YF,0.0,0.0,0.0)set JF=CreateSound("Sound\\Buildings\\Fire\\OrcHumanLargeBuildingFire1.wav",true,true,true,10,10,"SpellsEAX")call SetSoundParamsFromLabel(JF,"HumanFireLarge")call SetSoundDuration(JF,3471)set KF=CreateSound("Units\\Human\\Phoenix\\PhoenixEggWhat1.wav",false,false,true,10,10,"DefaultEAXON")call SetSoundParamsFromLabel(KF,"PhoenixEggWhat")call SetSoundDuration(KF,1579)call SetSoundChannel(KF,0)set LF=CreateSound("Abilities\\Spells\\NightElf\\BattleRoar\\BattleRoar.wav",false,true,true,10,10,"SpellsEAX")call SetSoundParamsFromLabel(LF,"BattleRoar")call SetSoundDuration(LF,1991)set MF=CreateSound("Buildings\\Undead\\Ziggurat\\ZigguratUpgrade.wav",false,true,true,10,10,"DefaultEAXON")call SetSoundParamsFromLabel(MF,"ZigguratUpgradeWhat")call SetSoundDuration(MF,4203)call SetSoundDistances(MF,600.0,10000.0)call SetSoundDistanceCutoff(MF,3000.0)set NF=CreateSound("Abilities\\Spells\\Human\\SpellSteal\\SpellStealMissile.wav",false,true,true,10,10,"SpellsEAX")call SetSoundParamsFromLabel(NF,"SpellStealMissileLaunch")call SetSoundDuration(NF,1541)set SF=CreateSound("Abilities\\Spells\\Human\\SpellSteal\\SpellStealTarget.wav",false,true,true,10,10,"SpellsEAX")call SetSoundParamsFromLabel(SF,"SpellStealTarget")call SetSoundDuration(SF,984)set TF=CreateSound("Abilities\\Spells\\Undead\\UndeadMine\\AcolyteMining.wav",false,true,true,10,10,"DefaultEAXON")call SetSoundParamsFromLabel(TF,"AcolyteMining")call SetSoundDuration(TF,4233)call SetSoundChannel(TF,0)set RF=CreateSound("Abilities\\Weapons\\AvengerMissile\\DestroyerMissile.wav",false,true,true,10,10,"MissilesEAX")call SetSoundParamsFromLabel(RF,"DestroyerMissileLaunch")call SetSoundDuration(RF,817)set PF=CreateSound("Abilities\\Spells\\Undead\\ReplenishMana\\SpiritTouch.wav",false,true,true,10,10,"SpellsEAX")call SetSoundParamsFromLabel(PF,"SpiritTouch")call SetSoundDuration(PF,2043)call SetSoundChannel(PF,11)set QF=CreateSound("Abilities\\Spells\\Human\\FlameStrike\\FlameStrikeTargetWaveNonLoop1.wav",false,true,true,10,10,"SpellsEAX")call SetSoundParamsFromLabel(QF,"FlameStrikeTarget")call SetSoundDuration(QF,1927)set UF=CreateSound("Units\\Orc\\SentryWard\\SentryWard.wav",false,true,true,10,10,"SpellsEAX")call SetSoundParamsFromLabel(UF,"SentryWardBirth")call SetSoundDuration(UF,1499)set L3=Rect(6176.0,3136.0,6400.0,3392.0)set M3=Rect(3616.0,3584.0,3872.0,3872.0)set N3=Rect(2304.0,5280.0,2752.0,5728.0)set S3=Rect(6176.0,5952.0,6624.0,6240.0)set T3=Rect(-4224.0,-6848.0,-3968.0,-6592.0)set R3=Rect(-6304.0,-4384.0,-6080.0,-4224.0)set P3=Rect(-4928.0,-5760.0,-4736.0,-5536.0)set Q3=Rect(6048.0,3424.0,6304.0,3776.0)set U3=Rect(4128.0,3776.0,4352.0,4032.0)set I4=Rect(2752.0,5408.0,3040.0,5632.0)set O4=Rect(-7040.0,-6912.0,-6688.0,-6656.0)set A4=Rect(-3648.0,-6880.0,-3424.0,-6688.0)set B4=Rect(-6336.0,-4224.0,-5984.0,-3904.0)set C4=Rect(-4896.0,-5504.0,-4608.0,-5184.0)set D4=Rect(2912.0,-2944.0,3104.0,-2720.0)set E4=Rect(5696.0,5504.0,7296.0,7392.0)set F4=Rect(-7680.0,-8032.0,-6176.0,-6240.0)set G4=Rect(-2464.0,1536.0,-2240.0,1760.0)set H4=Rect(4288.0,-2688.0,4544.0,-2400.0)set Z4=Rect(-3328.0,-416.0,-3104.0,-96.0)set V4=Rect(1440.0,-4096.0,1728.0,-3872.0)set W4=Rect(-4576.0,3328.0,-4448.0,3488.0)set X4=Rect(-3264.0,4192.0,-2912.0,4320.0)set Y4=Rect(2848.0,-5088.0,3072.0,-4928.0)set J4=Rect(-1824.0,2240.0,-1472.0,2464.0)set K4=Rect(3008.0,-3776.0,3136.0,-3648.0)set L4=Rect(1184.0,2976.0,1280.0,3104.0)set M4=Rect(-512.0,-3648.0,-320.0,-3520.0)set N4=Rect(-7104.0,6656.0,-6848.0,6912.0)set S4=Rect(-7104.0,6656.0,-6880.0,6880.0)set T4=Rect(-5952.0,-6432.0,-5248.0,-5728.0)set R4=Rect(5088.0,7488.0,5792.0,8192.0)set P4=Rect(2304.0,-672.0,2592.0,-384.0)set Q4=Rect(3872.0,-3008.0,4928.0,-1952.0)set U4=Rect(-3552.0,-768.0,-2528.0,320.0)set I5=Rect(1056.0,-5216.0,2368.0,-3744.0)set O5=Rect(-5120.0,3008.0,-3648.0,4320.0)set A5=Rect(-3456.0,3808.0,-2656.0,4864.0)set B5=Rect(2272.0,-6080.0,3776.0,-4928.0)set C5=Rect(-1888.0,2208.0,-992.0,3040.0)set D5=Rect(416.0,2624.0,1632.0,3648.0)set E5=Rect(2592.0,-4800.0,3744.0,-3328.0)set F5=Rect(-1024.0,-3808.0,192.0,-2752.0)set G5=Rect(-7936.0,-7776.0,-5920.0,-5760.0)set H5=Rect(5504.0,5184.0,7744.0,7136.0)set Z5=Rect(-800.0,3072.0,64.0,4032.0)set V5=Rect(-384.0,3392.0,-192.0,3520.0)set W5=Rect(-1728.0,-5056.0,-768.0,-3840.0)set X5=Rect(-1152.0,-4704.0,-960.0,-4480.0)set Y5=Rect(-480.0,-800.0,-256.0,-512.0)set J5=Rect(2112.0,-1280.0,3072.0,-288.0)set K5=Rect(7264.0,-5504.0,7488.0,-5280.0)set L5=Rect(-8160.0,6848.0,-7968.0,7040.0)set M5=Rect(2112.0,-736.0,2752.0,-160.0)set N5=Rect(2112.0,-960.0,2720.0,-640.0)set S5=Rect(2112.0,-1088.0,2720.0,-864.0)set T5=Rect(2656.0,-1120.0,2784.0,-416.0)set R5=Rect(2752.0,-1248.0,2880.0,-544.0)set P5=Rect(2848.0,-1344.0,2912.0,-640.0)set Q5=Rect(2912.0,-1408.0,2976.0,-704.0)set U5=Rect(2208.0,-1216.0,2816.0,-992.0)set I6=Rect(2464.0,-1472.0,3200.0,-1152.0)set O6=Rect(-8160.0,-8192.0,-3712.0,-4352.0)set A6=Rect(-8192.0,-4960.0,-4640.0,-3552.0)set B6=Rect(-4000.0,-7744.0,-3072.0,-5152.0)set C6=Rect(2304.0,4064.0,8032.0,7776.0)set D6=Rect(4640.0,1952.0,8000.0,4384.0)set E6=Rect(3136.0,2816.0,5216.0,4960.0)set F6=Rect(-7968.0,5216.0,-7456.0,5920.0)set G6=Rect(-8064.0,2880.0,-7648.0,4512.0)set H6=Rect(-3296.0,3712.0,-2688.0,3968.0)set Z6=Rect(-2400.0,2016.0,-1952.0,2624.0)set V6=Rect(-2016.0,1600.0,-1216.0,2048.0)set W6=Rect(-2144.0,2528.0,-1888.0,2944.0)set X6=Rect(-1280.0,1728.0,-736.0,2176.0)set Y6=Rect(-1696.0,-768.0,-1376.0,-448.0)set J6=Rect(-576.0,0.0,-352.0,256.0)set K6=Rect(3104.0,-2784.0,3680.0,-2304.0)set L6=Rect(3264.0,-3040.0,3872.0,-2656.0)set M6=Rect(4960.0,-3104.0,5632.0,-2816.0)set N6=Rect(4896.0,-3744.0,5280.0,-3456.0)set S6=Rect(7488.0,-3520.0,8192.0,-2336.0)set T6=Rect(6656.0,-3328.0,7808.0,-2656.0)set R6=Rect(7104.0,-8192.0,8192.0,-5920.0)set P6=Rect(5952.0,-8192.0,7200.0,-7712.0)set Q6=Rect(7168.0,-6240.0,8128.0,-5184.0)set U6=Rect(5824.0,-8032.0,6400.0,-7776.0)set I7=Rect(6976.0,-6560.0,7488.0,-5920.0)set O7=Rect(-5856.0,2944.0,-5600.0,3200.0)set A7=Rect(6784.0,-7776.0,7264.0,-7456.0)set B7=Rect(-8128.0,-8192.0,5536.0,-7744.0)set C7=Rect(2368.0,-7904.0,2688.0,-7584.0)set D7=Rect(-1664.0,-7808.0,-1344.0,-7552.0)set E7=Rect(-2944.0,-8192.0,-1664.0,-7680.0)set F7=Rect(-4000.0,-8192.0,-3168.0,-7616.0)set G7=Rect(-5760.0,-8000.0,-5184.0,-7584.0)set H7=Rect(-3296.0,3744.0,-3104.0,3872.0)set Z7=Rect(-8192.0,-8192.0,-6720.0,-7744.0)set V7=Rect(-8192.0,-6432.0,-7456.0,-4928.0)set W7=Rect(-8192.0,-8128.0,-7904.0,8160.0)set X7=Rect(-7744.0,3936.0,-7328.0,5600.0)set Y7=Rect(-7680.0,1984.0,-6560.0,2816.0)set J7=Rect(-7776.0,1696.0,-6944.0,2176.0)set K7=Rect(-8032.0,-3040.0,-7680.0,-2720.0)set L7=Rect(-7904.0,-2656.0,-7552.0,-2336.0)set M7=Rect(-3936.0,-2720.0,-3584.0,-2400.0)set N7=Rect(-3168.0,-1952.0,-2912.0,-1696.0)set S7=Rect(-4128.0,-1632.0,-3776.0,-1152.0)set T7=Rect(-4992.0,-1792.0,-3968.0,-1440.0)set R7=Rect(-5536.0,-1664.0,-4832.0,-1280.0)set P7=Rect(-2304.0,3872.0,-2048.0,4096.0)set Q7=Rect(-5664.0,-1440.0,-5344.0,0.0)set U7=Rect(-5824.0,-1504.0,-5472.0,-544.0)set I8=Rect(-5216.0,-1216.0,-4480.0,-384.0)set O8=Rect(-5632.0,448.0,-5152.0,1856.0)set A8=Rect(-5856.0,1440.0,-5248.0,2592.0)set B8=Rect(-5408.0,1888.0,-4928.0,2368.0)set C8=Rect(-5056.0,1664.0,-4064.0,2144.0)set D8=Rect(-4320.0,1344.0,-3808.0,1952.0)set E8=Rect(-4224.0,1440.0,-3200.0,2016.0)set F8=Rect(-2112.0,3424.0,-1856.0,3744.0)set G8=Rect(-2400.0,640.0,-2208.0,896.0)set H8=Rect(-3392.0,640.0,-3200.0,896.0)set Z8=Rect(-3744.0,-1024.0,-3232.0,384.0)set V8=Rect(-2016.0,-5504.0,-1664.0,-4768.0)set W8=Rect(-1760.0,-5248.0,-1312.0,-4800.0)set X8=Rect(896.0,-3328.0,1088.0,-3072.0)set Y8=Rect(2368.0,-3808.0,2688.0,-3360.0)set J8=Rect(1952.0,-3744.0,2208.0,-3456.0)set K8=Rect(-768.0,-1344.0,-480.0,-1024.0)set L8=Rect(1152.0,-6560.0,1376.0,-6272.0)set M8=Rect(1216.0,-6368.0,1504.0,-6176.0)set N8=Rect(-1376.0,-6784.0,-1184.0,-6528.0)set S8=Rect(7616.0,-6528.0,8192.0,8160.0)set T8=Rect(7072.0,-2304.0,7264.0,-2048.0)set R8=Rect(-7872.0,7872.0,8192.0,8192.0)set P8=Rect(1792.0,7776.0,2112.0,8192.0)set Q8=Rect(-2656.0,0.0,-2496.0,256.0)set U8=Rect(-768.0,7232.0,-416.0,7424.0)set I9=Rect(-7968.0,5472.0,-7648.0,5792.0)set O9=Rect(1120.0,7904.0,1312.0,8160.0)set A9=Rect(736.0,4480.0,1120.0,4800.0)set B9=Rect(2208.0,4928.0,2400.0,5152.0)set C9=Rect(576.0,4384.0,1120.0,4928.0)set D9=Rect(2560.0,4160.0,2784.0,4576.0)set E9=Rect(-5984.0,-3776.0,-5504.0,-3232.0)set F9=Rect(576.0,4256.0,1024.0,4672.0)set G9=Rect(544.0,4352.0,992.0,4768.0)set H9=Rect(704.0,2496.0,1376.0,2784.0)set Z9=Rect(-2240.0,1792.0,-1856.0,2240.0)set V9=Rect(-1472.0,1472.0,-992.0,1728.0)set W9=Rect(2368.0,-3200.0,2656.0,-2880.0)set X9=Rect(2624.0,-3584.0,2816.0,-2848.0)set Y9=Rect(2464.0,-3392.0,2656.0,-3136.0)set J9=Rect(2784.0,-3232.0,2976.0,-2976.0)set K9=Rect(2784.0,-3424.0,2976.0,-3168.0)set L9=Rect(7328.0,7808.0,8192.0,8192.0)set M9=Rect(1984.0,7584.0,3296.0,8192.0)set N9=Rect(2240.0,7392.0,2560.0,8192.0)set S9=Rect(-1888.0,416.0,-1696.0,576.0)set T9=Rect(7776.0,2720.0,8192.0,3648.0)set R9=Rect(5280.0,640.0,5664.0,1184.0)set P9=Rect(-3104.0,2720.0,-2624.0,3232.0)set Q9=Rect(7584.0,-7072.0,7776.0,-6880.0)set Y8=Rect(2816.0,-3488.0,3008.0,-3232.0)set J8=Rect(1568.0,-2976.0,1760.0,-2656.0)set W9=Rect(2368.0,-3264.0,2656.0,-2944.0)set X9=Rect(2624.0,-3648.0,2816.0,-2912.0)set Y9=Rect(2464.0,-3456.0,2656.0,-3200.0)set B7=Rect(-8192.0,-8128.0,5472.0,-7648.0)set U9=Rect(-8192.0,-3712.0,-7008.0,-2144.0)set IA=Rect(-3360.0,-8192.0,-1472.0,-7648.0)set OA=Rect(-2528.0,-7840.0,-1696.0,-7488.0)set BA=Rect(-2336.0,-7584.0,-1600.0,-7456.0)set CA=Rect(-8192.0,2016.0,-6816.0,2880.0)set DA=Rect(6880.0,-3328.0,8000.0,-2624.0)set EA=Rect(-7520.0,-7040.0,-7360.0,-6912.0)set FA=Rect(-7520.0,-6912.0,-7360.0,-6784.0)set GA=Rect(-7520.0,-6656.0,-7360.0,-6528.0)set HA=Rect(-7520.0,-6528.0,-7360.0,-6400.0)set ZA=Rect(-7520.0,-6784.0,-7360.0,-6656.0)set VA=Rect(6944.0,6208.0,7104.0,6336.0)set WA=Rect(6944.0,6080.0,7104.0,6208.0)set XA=Rect(6944.0,5952.0,7104.0,6080.0)set YA=Rect(6944.0,5824.0,7104.0,5952.0)set JA=Rect(6944.0,5696.0,7104.0,5824.0)set KA=Rect(3904.0,2976.0,4160.0,3264.0)set LA=Rect(2336.0,5952.0,2592.0,6240.0)set MA=Rect(6304.0,1984.0,6560.0,2272.0)set NA=Rect(-3328.0,-6912.0,-3072.0,-6624.0)set SA=Rect(-4384.0,-4800.0,-4128.0,-4512.0)set TA=Rect(-6432.0,-3840.0,-6176.0,-3552.0)set RA=Rect(-7584.0,6176.0,-6304.0,7552.0)set PA=Rect(2240.0,-1024.0,2592.0,-416.0)set QA=Rect(2368.0,-1120.0,2784.0,-704.0)set UA=Rect(-1088.0,5376.0,768.0,6624.0)set IB=Rect(1600.0,1024.0,3456.0,2432.0)set OB=Rect(5504.0,-1056.0,7200.0,512.0)set AB=Rect(-6944.0,-1792.0,-5248.0,-224.0)set BB=Rect(-1536.0,-7424.0,640.0,-6048.0)set CB=Rect(-3328.0,-7200.0,-2464.0,-6368.0)set DB=Rect(-4288.0,-4544.0,-3424.0,-3712.0)set EB=Rect(-6784.0,-3616.0,-5920.0,-2784.0)set FB=Rect(1472.0,5440.0,2336.0,6272.0)set GB=Rect(2656.0,2336.0,3520.0,3168.0)set HB=Rect(5984.0,1152.0,6848.0,1984.0)set ZB=Rect(-4128.0,-3712.0,-2496.0,-2272.0)set VB=Rect(-8192.0,-8128.0,-5120.0,-5536.0)set WB=Rect(4608.0,4352.0,8192.0,8192.0)set XB=Rect(-8096.0,-7104.0,-8064.0,-7072.0)set YB=Rect(-8096.0,-7104.0,-8064.0,-7072.0)set JB=Rect(-8096.0,-7104.0,-8064.0,-7072.0)set E9=Rect(6208.0,7488.0,8192.0,8192.0)set KB=Rect(-2784.0,1280.0,-1952.0,2048.0)set LB=Rect(2528.0,-3168.0,3360.0,-2464.0)set MB=Rect(-3936.0,4480.0,-3136.0,5120.0)set SB=Rect(3680.0,-6016.0,4416.0,-5376.0)set TB=Rect(3424.0,-352.0,4224.0,320.0)set RB=Rect(-4608.0,-448.0,-3872.0,192.0)set PB=Rect(2528.0,-1376.0,2944.0,-960.0)set QB=Rect(608.0,4320.0,1120.0,4768.0)set IC=Rect(-3840.0,1440.0,-3328.0,1888.0)set OC=Rect(2400.0,-3360.0,2912.0,-2912.0)set AC=Rect(-1888.0,-5280.0,-1376.0,-4832.0)set p=Player(15)set GY=CreateUnit(p,1966092378,7360.0,-4416.0,270.000)call SetUnitColor(GY,ConvertPlayerColor(12))set FY=CreateUnit(p,1966092378,-7296.0,4224.0,270.000)call SetUnitColor(FY,ConvertPlayerColor(12))set JZ=CreateUnit(p,1848657231,-7168.0,6464.0,270.000)call SetUnitColor(JZ,ConvertPlayerColor(0))set LZ=CreateUnit(p,1848652102,-7424.0,-6976.0,270.000)set XZ=CreateUnit(p,1848657231,-7360.0,6464.0,270.000)call SetUnitColor(XZ,ConvertPlayerColor(0))set MZ=CreateUnit(p,1848652102,-7424.0,-6592.0,270.000)set NZ=CreateUnit(p,1848652102,-7424.0,-6464.0,270.000)set EX=CreateUnit(p,1848657231,-7360.0,6784.0,270.000)call SetUnitColor(EX,ConvertPlayerColor(0))set CX=CreateUnit(p,1848657231,-6848.0,6784.0,270.000)call SetUnitColor(CX,ConvertPlayerColor(0))set SZ=CreateUnit(p,1848652102,-7424.0,-6720.0,270.000)set TZ=CreateUnit(p,1848652102,-7424.0,-6848.0,270.000)set RZ=CreateUnit(p,1852206952,-7232.0,-7136.0,270.000)set u=CreateUnit(p,1967339316,3200.0,-64.0,270.000)set RH=CreateUnit(p,1848657231,-6848.0,6464.0,270.000)call SetUnitColor(RH,ConvertPlayerColor(0))set UW=CreateUnit(p,1848652102,7040.0,6272.0,270.000)set IX=CreateUnit(p,1848652102,7040.0,5888.0,270.000)set OX=CreateUnit(p,1848652102,7040.0,5760.0,270.000)set AX=CreateUnit(p,1848652102,7040.0,6016.0,270.000)set QW=CreateUnit(p,1848652102,7040.0,6144.0,270.000)set BX=CreateUnit(p,1852073580,6784.0,6368.0,270.000)set AZ=CreateUnit(p,1848657231,-7360.0,7104.0,270.000)call SetUnitColor(AZ,ConvertPlayerColor(0))set DX=CreateUnit(p,1848657231,-7168.0,7104.0,270.000)call SetUnitColor(DX,ConvertPlayerColor(0))set u=CreateUnit(p,1967339316,-4544.0,1152.0,270.000)set YZ=CreateUnit(p,1848657231,-7168.0,6784.0,270.000)call SetUnitColor(YZ,ConvertPlayerColor(0))set DY=CreateUnit(p,1848657231,-6848.0,7104.0,270.000)call SetUnitColor(DY,ConvertPlayerColor(0))set WZ=CreateUnit(p,1966092592,-7296.0,4416.0,270.000)call SetUnitColor(WZ,ConvertPlayerColor(12))set HY=CreateUnit(p,1966092592,7360.0,-4224.0,270.000)call SetUnitColor(HY,ConvertPlayerColor(12))set VY=CreateUnit(p,1848657231,-6656.0,7104.0,270.000)call SetUnitColor(VY,ConvertPlayerColor(0))set WY=CreateUnit(p,1848657231,-6656.0,6464.0,270.000)call SetUnitColor(WY,ConvertPlayerColor(0))set ZY=CreateUnit(p,1848657231,-6656.0,6784.0,270.000)call SetUnitColor(ZY,ConvertPlayerColor(0))set p=Player(0)set PZ=CreateUnit(p,1849897784,-7264.0,-6880.0,270.000)call SetUnitColor(PZ,ConvertPlayerColor(12))set QZ=CreateUnit(p,1848652107,-7264.0,-6688.0,270.000)call SetUnitColor(QZ,ConvertPlayerColor(12))set OV=CreateUnit(p,1848651833,-6560.0,-6432.0,270.000)call SetUnitColor(OV,ConvertPlayerColor(12))set FZ=CreateUnit(p,1848651864,-7072.0,-6368.0,270.000)call SetUnitColor(FZ,ConvertPlayerColor(1))set DZ=CreateUnit(p,1848651862,-6816.0,-6368.0,270.000)call SetUnitColor(DZ,ConvertPlayerColor(12))set BZ=CreateUnit(p,1848651863,-7200.0,-6432.0,270.000)call SetUnitColor(BZ,ConvertPlayerColor(12))set QH=CreateUnit(p,1848651826,-6688.0,-6368.0,270.000)call SetUnitColor(QH,ConvertPlayerColor(12))set DW=CreateUnit(p,1697657397,-6624.0,-7136.0,270.000)set IV=CreateUnit(p,1749236021,-6880.0,-7136.0,270.000)call SetUnitColor(IV,ConvertPlayerColor(0))set TH=CreateUnit(p,1702129516,-5632.0,-6144.0,270.000)set FV=CreateUnit(p,1697656915,-4448.0,-4960.0,270.000)set HV=CreateUnit(p,1697656915,-5280.0,-6112.0,270.000)set FW=CreateUnit(p,1701080930,-6400.0,-5696.0,270.000)set GV=CreateUnit(p,1697656915,-6368.0,-4256.0,270.000)set ZV=CreateUnit(p,1697656915,-5600.0,-5728.0,270.000)set VV=CreateUnit(p,1700884333,-6080.0,-4480.0,270.000)set WV=CreateUnit(p,1700884325,-6656.0,-4480.0,270.000)set YV=CreateUnit(p,1700884333,-4416.0,-5312.0,270.000)set LV=CreateUnit(p,1700884325,-4864.0,-4992.0,270.000)set JV=CreateUnit(p,1697656915,-3744.0,-6816.0,270.000)set XV=CreateUnit(p,1700884333,-4032.0,-7040.0,270.000)set KV=CreateUnit(p,1700884325,-4032.0,-6528.0,270.000)set SV=CreateUnit(p,1701670775,-5792.0,-5408.0,270.000)set NV=CreateUnit(p,1701670775,-6624.0,-5088.0,270.000)set MV=CreateUnit(p,1701670775,-5088.0,-5536.0,270.000)set TV=CreateUnit(p,1701670775,-5344.0,-3936.0,270.000)set PV=CreateUnit(p,1701670775,-5088.0,-4576.0,270.000)set QV=CreateUnit(p,1701670775,-3936.0,-5344.0,270.000)set UV=CreateUnit(p,1701670775,-4512.0,-7072.0,270.000)set IW=CreateUnit(p,1701670775,-4896.0,-6240.0,270.000)set OW=CreateUnit(p,1701670775,-3808.0,-5856.0,270.000)set AW=CreateUnit(p,1701670775,-5472.0,-4704.0,270.000)set BW=CreateUnit(p,1701670775,-4512.0,-5856.0,270.000)set CW=CreateUnit(p,1700884343,-4544.0,-6528.0,270.000)set EV=CreateUnit(p,1697656915,-6112.0,-1248.0,270.000)set UZ=CreateUnit(p,1700884343,-6080.0,-5120.0,270.000)set DV=CreateUnit(p,1697656915,-6112.0,1568.0,270.000)set CV=CreateUnit(p,1697656915,-1504.0,-1824.0,270.000)set BV=CreateUnit(p,1697656915,-544.0,-6688.0,270.000)set AV=CreateUnit(p,1697656915,4960.0,-6752.0,270.000)set GZ=CreateUnit(p,1697656915,-3488.0,-3296.0,270.000)set EW=CreateUnit(p,1701080930,-5248.0,-6848.0,270.000)set EY=CreateUnit(p,1848657989,-6944.0,-6368.0,270.000)call SetUnitColor(EY,ConvertPlayerColor(12))set p=Player(6)set YW=CreateUnit(p,1848651826,5920.0,5920.0,270.000)call SetUnitColor(YW,ConvertPlayerColor(12))set JW=CreateUnit(p,1848651863,5984.0,6432.0,270.000)call SetUnitColor(JW,ConvertPlayerColor(12))set KW=CreateUnit(p,1848651862,5920.0,6048.0,270.000)call SetUnitColor(KW,ConvertPlayerColor(12))set LW=CreateUnit(p,1848651864,5920.0,6304.0,270.000)call SetUnitColor(LW,ConvertPlayerColor(1))set PW=CreateUnit(p,1849897784,6496.0,6368.0,270.000)call SetUnitColor(PW,ConvertPlayerColor(12))set RW=CreateUnit(p,1848652107,6304.0,6368.0,270.000)call SetUnitColor(RW,ConvertPlayerColor(12))set GX=CreateUnit(p,1970496880,4352.0,3584.0,270.000)set SW=CreateUnit(p,1848651833,5984.0,5792.0,270.000)call SetUnitColor(SW,ConvertPlayerColor(12))set TW=CreateUnit(p,1849897781,6816.0,5984.0,270.000)call SetUnitColor(TW,ConvertPlayerColor(12))set MW=CreateUnit(p,1966092369,6816.0,5664.0,270.000)set ZZ=CreateUnit(p,1966092365,6048.0,-2080.0,270.000)set HZ=CreateUnit(p,1966092356,6304.0,-96.0,270.000)set MX=CreateUnit(p,1970956647,4384.0,4256.0,270.000)set WX=CreateUnit(p,1970172012,5184.0,4864.0,270.000)set XX=CreateUnit(p,1970564964,3904.0,3904.0,270.000)set YX=CreateUnit(p,1966092365,1056.0,-96.0,270.000)set JX=CreateUnit(p,1966092356,2528.0,1824.0,270.000)set KX=CreateUnit(p,1966092366,3936.0,3488.0,270.000)set LX=CreateUnit(p,1966092372,4832.0,4832.0,270.000)set HX=CreateUnit(p,1966092372,5152.0,4512.0,270.000)set NX=CreateUnit(p,1970956647,3168.0,4064.0,270.000)set SX=CreateUnit(p,1970956647,5728.0,4000.0,270.000)set XW=CreateUnit(p,1966092366,2976.0,5792.0,270.000)set WW=CreateUnit(p,1970496880,3392.0,5504.0,270.000)set VW=CreateUnit(p,1970564964,3392.0,6080.0,270.000)set ZW=CreateUnit(p,1970956647,4128.0,6240.0,270.000)set HW=CreateUnit(p,1970495856,3968.0,5888.0,270.000)set TX=CreateUnit(p,1969385326,4992.0,5952.0,270.000)set RX=CreateUnit(p,1970956647,2656.0,4704.0,270.000)set PX=CreateUnit(p,1970956647,5536.0,2464.0,270.000)set QX=CreateUnit(p,1970956647,4064.0,5280.0,270.000)set UX=CreateUnit(p,1970956647,3488.0,4832.0,270.000)set IY=CreateUnit(p,1970495856,6400.0,3584.0,270.000)set OY=CreateUnit(p,1970564964,6080.0,2944.0,270.000)set AY=CreateUnit(p,1970496880,6656.0,2880.0,270.000)set BY=CreateUnit(p,1966092366,6368.0,2528.0,270.000)set CY=CreateUnit(p,1970956647,5024.0,3744.0,270.000)set GW=CreateUnit(p,1970956647,6880.0,3936.0,270.000)set VX=CreateUnit(p,1969385326,6464.0,4608.0,270.000)set ZX=CreateUnit(p,1970956647,4640.0,2848.0,270.000)set CZ=CreateUnit(p,1966092365,-4704.0,5920.0,270.000)set KZ=CreateUnit(p,1966092356,32.0,5920.0,270.000)set VZ=CreateUnit(p,1848657989,5920.0,6176.0,270.000)call SetUnitColor(VZ,ConvertPlayerColor(12))set p=Player(15)set UH=CreateUnit(p,1697656900,-6005.1,5458.6,212.150)set EZ=CreateUnit(p,1697656898,-561.7,-651.7,325.600)set OZ=CreateUnit(p,1697656897,5613.5,-6070.9,64.000)set IZ=CreateUnit(p,1697656888,-5467.9,-5891.1,307.304)set PH=CreateUnit(p,1697656881,4901.8,4536.6,212.110)call ConfigureNeutralVictim()set KYI=Filter(function L7I)set filterIssueHauntOrderAtLocBJ=Filter(function IssueHauntOrderAtLocBJFilter)set filterEnumDestructablesInCircleBJ=Filter(function KPI)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 L9I=0loopexitwhen L9I==16set bj_FORCE_PLAYER[L9I]=CreateForce()call ForceAddPlayer(bj_FORCE_PLAYER[L9I],Player(L9I))set L9I=L9I+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 L9I=0loopexitwhen L9I>=bj_MAX_QUEUED_TRIGGERSset bj_queuedExecTriggers[L9I]=nullset bj_queuedExecUseConds[L9I]=falseset L9I=L9I+1endloopset bj_isSinglePlayer=falseset LAI=0set L9I=0loopexitwhen L9I>=12if(GetPlayerController(Player(L9I))==MAP_CONTROL_USER and GetPlayerSlotState(Player(L9I))==PLAYER_SLOT_STATE_PLAYING)thenset LAI=LAI+1endifset L9I=L9I+1endloopset bj_isSinglePlayer=(LAI==1)set bj_rescueSound=CreateSoundFromLabel("Rescue",false,false,false,10000,10000)set bj_questDiscoveredSound=CreateSoundFromLabel("QuestNew",false,false,false,10000,10000)set bj_questUpdatedSound=CreateSoundFromLabel("QuestUpdate",false,false,false,10000,10000)set bj_questCompletedSound=CreateSoundFromLabel("QuestCompleted",false,false,false,10000,10000)set bj_questFailedSound=CreateSoundFromLabel("QuestFailed",false,false,false,10000,10000)set bj_questHintSound=CreateSoundFromLabel("Hint",false,false,false,10000,10000)set bj_questSecretSound=CreateSoundFromLabel("SecretFound",false,false,false,10000,10000)set bj_questItemAcquiredSound=CreateSoundFromLabel("ItemReward",false,false,false,10000,10000)set bj_questWarningSound=CreateSoundFromLabel("Warning",false,false,false,10000,10000)set bj_victoryDialogSound=CreateSoundFromLabel("QuestCompleted",false,false,false,10000,10000)set bj_defeatDialogSound=CreateSoundFromLabel("QuestFailed",false,false,false,10000,10000)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call InitQueuedTriggers()call InitRescuableBehaviorBJ()call InitDNCSounds()call InitMapRects()call InitSummonableCaps()set L1I=0loopset bj_stockAllowedPermanent[L1I]=falseset bj_stockAllowedCharged[L1I]=falseset bj_stockAllowedArtifact[L1I]=falseset L1I=L1I+1exitwhen L1I>10endloopcall SetAllItemTypeSlots(11)call SetAllUnitTypeSlots(11)set bj_stockUpdateTimer=CreateTimer()call TimerStart(bj_stockUpdateTimer,bj_STOCK_RESTOCK_INITIAL_DELAY,false,function L5I)set bj_stockItemPurchased=CreateTrigger()call TriggerRegisterPlayerUnitEvent(bj_stockItemPurchased,Player(15),EVENT_PLAYER_UNIT_SELL_ITEM,null)call TriggerAddAction(bj_stockItemPurchased,function RemovePurchasedItem)call DetectGameStarted()set i=0set i=0loopexitwhen(i>16)set T[i]=0set P[i]=0set Q[i]=0set V0[i]=0set i=i+1endloopset i=0loopexitwhen(i>100)set R[i]=falseset H1[i]=0set Z1[i]=0set V1[i]=0set W1[i]=0set Y1[i]=0set J1[i]=0set VO[i]=0set i=i+1endloopset i=0loopexitwhen(i>4)set I0[i]=0set i=i+1endloopset i=0loopexitwhen(i>2)set A0[i]=falseset W0[i]=0set T1[i]=0set i=i+1endloopset i=0loopexitwhen(i>12)set C0[i]=""set E0[i]=CreateTimer()set i=i+1endloopset i=0loopexitwhen(i>13)set D0[i]=falseset F0[i]=CreateTimer()set S0[i]=falseset IO[i]=0set F3[i]=falseset i=i+1endloopset i=0loopexitwhen(i>1)set G0[i]=0set M2[i]=""set S2[i]=falseset T2[i]=0set E3[i]=falseset i=i+1endloopset T0=150set EI=trueset FI=trueset GI=trueset HI=trueset ZI=trueset VI=trueset WI=trueset XI=trueset YI=trueset JI=trueset KI=trueset LI=trueset NI=3set SI=1set X1=80set i=0loopexitwhen(i>17)set K1[i]=nullset i=i+1endloopset i=0loopexitwhen(i>40)set R1[i]=0set P1[i]=0set Q1[i]=0set i=i+1endloopset OO=CreateForce()set AO=CreateForce()set B2=CreateGroup()set X2=CreateTimer()set P2=CreateForce()set U2=0.00set O3=trueset A3=trueset i=0loopexitwhen(i>14)set C3[i]=falseset i=i+1endloopset i=0loopexitwhen(i>15)set K3[i]="Here"set i=i+1endloopcall LXI()call MGI()set t=CreateTrigger()call TriggerRegisterTimerEvent(t,15,true)call TriggerAddCondition(t,Condition(function MWI))set t=nullset DJ[0]=falseset DJ[1]=falseset DJ[2]=falseset DJ[3]=falseset DJ[4]=falseset DJ[5]=falseset DJ[6]=falseset DJ[7]=falseset DJ[8]=falseset DJ[9]=falseset DJ[10]=falseset DJ[11]=falseset DJ[12]=falseset DJ[13]=falseset DJ[14]=falseset DJ[15]=falseset DJ[16]=falseset t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function OV1))set t=nullset ZN=CreateRegion()call RegionAddRect(ZN,G5)set WN=CreateRegion()call RegionAddRect(WN,H5)set HN=CreateRegion()call RegionAddRect(HN,O6)call RegionAddRect(HN,A6)call RegionAddRect(HN,B6)set VN=CreateRegion()call RegionAddRect(VN,C6)call RegionAddRect(VN,D6)call RegionAddRect(VN,E6)set XN=CreateRegion()call RegionAddRect(XN,F6)call RegionAddRect(XN,G6)call RegionAddRect(XN,H6)call RegionAddRect(XN,Z6)call RegionAddRect(XN,V6)call RegionAddRect(XN,W6)call RegionAddRect(XN,X6)call RegionAddRect(XN,Y6)call RegionAddRect(XN,J6)call RegionAddRect(XN,K6)call RegionAddRect(XN,L6)call RegionAddRect(XN,M6)call RegionAddRect(XN,N6)call RegionAddRect(XN,S6)call RegionAddRect(XN,T6)call RegionAddRect(XN,R6)call RegionAddRect(XN,P6)call RegionAddRect(XN,Q6)call RegionAddRect(XN,U6)call RegionAddRect(XN,I7)call RegionAddRect(XN,O7)call RegionAddRect(XN,A7)call RegionAddRect(XN,B7)call RegionAddRect(XN,C7)call RegionAddRect(XN,D7)call RegionAddRect(XN,E7)call RegionAddRect(XN,F7)call RegionAddRect(XN,G7)call RegionAddRect(XN,H7)call RegionAddRect(XN,Z7)call RegionAddRect(XN,V7)call RegionAddRect(XN,W7)call RegionAddRect(XN,X7)call RegionAddRect(XN,Y7)call RegionAddRect(XN,J7)call RegionAddRect(XN,K7)call RegionAddRect(XN,L7)call RegionAddRect(XN,M7)call RegionAddRect(XN,N7)call RegionAddRect(XN,S7)call RegionAddRect(XN,T7)call RegionAddRect(XN,R7)call RegionAddRect(XN,P7)call RegionAddRect(XN,Q7)call RegionAddRect(XN,U7)call RegionAddRect(XN,I8)call RegionAddRect(XN,O8)call RegionAddRect(XN,A8)call RegionAddRect(XN,B8)call RegionAddRect(XN,C8)call RegionAddRect(XN,D8)call RegionAddRect(XN,E8)call RegionAddRect(XN,F8)call RegionAddRect(XN,G8)call RegionAddRect(XN,H8)call RegionAddRect(XN,Z8)call RegionAddRect(XN,V8)call RegionAddRect(XN,W8)call RegionAddRect(XN,X8)call RegionAddRect(XN,Y8)call RegionAddRect(XN,J8)call RegionAddRect(XN,K8)call RegionAddRect(XN,L8)call RegionAddRect(XN,M8)call RegionAddRect(XN,N8)call RegionAddRect(XN,S8)call RegionAddRect(XN,T8)call RegionAddRect(XN,R8)call RegionAddRect(XN,P8)call RegionAddRect(XN,Q8)call RegionAddRect(XN,U8)call RegionAddRect(XN,I9)call RegionAddRect(XN,O9)call RegionAddRect(XN,A9)call RegionAddRect(XN,B9)call RegionAddRect(XN,C9)call RegionAddRect(XN,D9)call RegionAddRect(XN,E9)call RegionAddRect(XN,F9)call RegionAddRect(XN,G9)call RegionAddRect(XN,H9)call RegionAddRect(XN,Z9)call RegionAddRect(XN,V9)call RegionAddRect(XN,W9)call RegionAddRect(XN,X9)call RegionAddRect(XN,Y9)call RegionAddRect(XN,J9)call RegionAddRect(XN,K9)call RegionAddRect(XN,L9)call RegionAddRect(XN,M9)call RegionAddRect(XN,N9)call RegionAddRect(XN,S9)call RegionAddRect(XN,T9)call RegionAddRect(XN,R9)call RegionAddRect(XN,P9)set YN=CreateRegion()call RegionAddRect(YN,QB)call RegionAddRect(YN,IC)call RegionAddRect(YN,OC)call RegionAddRect(YN,AC)call CZ1(1110455898)call CZ1(1112560453)call CZ1(1110455889)call CZ1(1112757326)call CZ1(1112044643)call CZ1(1110458957)call CZ1(1110458962)call CZ1(1110459185)call CZ1(1111844210)call CZ1(1110454869)call CZ1(1110456133)call CZ1(1110459206)call CZ1(1110455885)call CZ1(1110456142)call CZ1(1110456403)call CZ1(1110454353)call CZ1(1110456114)call CZ1(1112891758)call CZ1(1110456629)call CZ1(1110456371)call CZ1(1110454870)call CZ1(1110454617)call CZ1(1112432994)call CZ1(1110456402)call CZ1(1110455862)call CZ1(1110455113)call CZ1(1110455859)call CZ1(1113943649)call CZ1(1113943655)call CZ1(1110455107)call CZ1(1110454348)call CZ1(1112040289)call CZ1(1113813860)call CZ1(1110456121)call CZ1(1110458961)call CZ1(1110458937)call CZ1(1114665575)call CZ1(1110456397)call CZ1(1110454855)call CZ1(1110454616)call CZ1(1110454596)call CZ1(1110456626)call CZ1(1110458705)call CZ1(1111847784)call CZ1(1110454583)call CZ1(1110458693)call CZ1(1110458692)call CZ1(1110456399)call CZ1(1114010223)call CZ1(1110454839)call CZ1(1110454840)call CZ1(1110455624)call CZ1(1110458963)call CZ1(1113813609)call CZ1(1110458950)call CZ1(1110458949)call CZ1(1110456624)call CZ1(1110454328)call CZ1(1110455362)call CZ1(1110454854)call CZ1(1112896368)call CZ1(1114993524)call CZ1(1110459203)call CZ1(1111716457)call CZ1(1110455114)call CZ1(1111847784)call CZ1(1110458705)call CZ1(1113943649)call CZ1(1113943655)call CZ1(1110456120)call CZ1(1113875828)call CZ1(1110454356)call CZ1(1114860655)call CZ1(1112433768)call CZ1(1110459192)call CZ1(1110456399)call CZ1(1110456150)call CZ1(1110456149)call CZ1(1110454616)call CZ1(1112437609)call CZ1(1110455089)call CZ1(1112437615)call CZ1(1110454352)call CZ1(1110454861)call CZ1(1093749828)call CZ1(1110459204)call CZ1(1093749313)call CZ1(1110455347)call CZ1(1112436833)call CZ1(1110454606)call CZ1(1112105826)call CZ1(1110455377)call CZ1(1110454339)call CZ1(1110456651)call CZ1(1110455091)call CZ1(1110456390)call CZ1(1110456389)call CZ1(1114664809)call CZ1(1110458701)call CZ1(1112437348)call CZ1(1110454344)call CZ1(1112500344)call CZ1(1110455110)call CZ1(1110454862)call CZ1(1110459703)call CZ1(1110455876)call CZ1(1110458958)call CZ1(1110456657)call CZ1(1110459465)call CZ1(1110458946)call CZ1(1110456650)call CZ1(1110458694)call CZ1(1110456386)call CZ1(1110456113)call CZ1(1110456398)call CZ1(1110454857)call CZ1(1110456401)call CZ1(1110459186)call CZ1(1110455891)call CZ1(1110454867)call CZ1(1110454871)call CZ1(1110455633)call CZ1(1110454852)call CZ1(1110458969)call CZ1(1110454864)call CZ1(1110455622)call CZ1(1110459728)call CZ1(1110459730)call CZ1(1110459732)call CZ1(1110459982)call CZ1(1110459993)call CZ1(1110459988)call CZ1(1110459994)call CZ1(1110460208)call CZ1(1110460244)call CZ1(1110459957)call CZ1(1093752627)call CZ1(1110459471)call CZ1(1110454869)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function CK1))set t=nullcall FlushGameCache(InitGameCache("dr.x"))set PN=InitGameCache("dr.x")set QN[0]=1093744454set QN[1]=1093744455set QN[2]=1093744456set QN[3]=1093744451set QN[4]=1093744452set QN[5]=1093744453set QN[6]=1093744458set QN[7]=1093744457set QN[8]=1093744460set UN[0]=1093818457set UN[1]=1093818456set UN[2]=1093818455set UN[3]=1093818454set UN[4]=1093818674set UN[5]=1093818672set UN[6]=1093818673set UN[7]=1093818458set UN[8]=1093818675set IS[0]=1093751109set IS[1]=1093751110set IS[2]=1093751113set IS[3]=1093751115set IS[4]=1093751114set IS[5]=1093751112set IS[6]=1093751119set IS[7]=1093751118set IS[8]=1093751117set IS[9]=1093751111set IS[10]=1093751121set OS[0]=1093748555set OS[1]=1093748556set OS[2]=1093748554set OS[3]=1093748560set OS[4]=1093748557set OS[5]=1093748558set OS[6]=1093748559set OS[7]=1093748553set OS[8]=1093748561set BS[0]=1093747533set BS[1]=1093747531set BS[2]=1093747526set BS[3]=1093747529set BS[4]=1093747527set BS[5]=1093747528set CS=CreateTrigger()call TriggerAddCondition(CS,Condition(function F71))set DS[0]=1747990855set FS[0]=50set DS[1]=1747990868set FS[1]=100set DS[2]=1747990854set FS[2]=150set DS[3]=1747990856set FS[3]=200set DS[4]=1747990853set FS[4]=250set DS[5]=1747990852set FS[5]=300set DS[6]=1747990851set FS[6]=350set DS[7]=1747990850set FS[7]=400set DS[8]=1747990841set FS[8]=450set DS[9]=1747990849set FS[9]=500set DS[10]=1747990858set FS[10]=550set DS[11]=1747990859set FS[11]=600set DS[12]=1747990860set FS[12]=650set DS[13]=1747990861set FS[13]=700set DS[14]=1747990862set FS[14]=750set DS[15]=1747990863set FS[15]=800set DS[16]=1747990864set FS[16]=850set DS[17]=1747990865set FS[17]=900set DS[18]=1747990866set FS[18]=950set DS[19]=1747990867set FS[19]=1000set DS[20]=1747990857set FS[20]=1050set DS[21]=1747990874set FS[21]=1100set DS[22]=1747990872set FS[22]=1150set DS[23]=1747992881set FS[23]=1200set DS[24]=1747992882set FS[24]=1250set DS[25]=1747992886set FS[25]=1300set DS[26]=1747992883set FS[26]=1350set DS[27]=1747992884set FS[27]=1400set DS[28]=1747990873set FS[28]=1450set DS[29]=1747990870set FS[29]=1500set DS[30]=1747992880set FS[30]=1550set DS[31]=1747990869set FS[31]=1600set DS[32]=1747992902set FS[32]=1650set DS[33]=1747992900set FS[33]=1700set DS[34]=1747992901set FS[34]=1750set DS[35]=1747992899set FS[35]=1800set DS[36]=1747992898set FS[36]=1850set DS[37]=1747992897set FS[37]=1900set DS[38]=1747992889set FS[38]=1950set DS[39]=1747992903set FS[39]=2000set DS[40]=1747992887set FS[40]=2050set DS[41]=1747992911set FS[41]=2100set DS[42]=1747992921set FS[42]=2150set DS[43]=1747992904set FS[43]=2200set DS[44]=1747992905set FS[44]=2250set DS[45]=1747992906set FS[45]=2300set DS[46]=1747992912set FS[46]=2350set DS[47]=1747992913set FS[47]=2400set DS[48]=1747992907set FS[48]=2450set DS[49]=1747992914set FS[49]=2500set DS[50]=1747992908set FS[50]=2550set DS[51]=1747992915set FS[51]=2600set DS[52]=1747990871set FS[52]=2650set DS[53]=1747992909set FS[53]=2700set DS[54]=1747992888set FS[54]=2750set DS[55]=1747992916set FS[55]=2800set DS[56]=1747992917set FS[56]=2850set DS[57]=1747992910set FS[57]=2900set DS[58]=1747992918set FS[58]=2950set DS[59]=1747992919set FS[59]=3000set ES[0]=DS[FO1(1)]set ES[1]=DS[FO1(1)]set ES[2]=DS[FO1(1)]set ES[3]=DS[FO1(1)]set ES[4]=DS[FO1(1)]set ES[5]=DS[FO1(1)]set ES[6]=DS[FO1(1)]set ES[7]=DS[FO1(1)]set ES[8]=DS[FO1(1)]set ES[9]=DS[FO1(1)]set ES[10]=DS[FO1(1)]set ES[11]=DS[FO1(1)]set ES[12]=DS[FO1(1)]set ES[13]=DS[FO1(1)]set ES[14]=DS[FO1(1)]set HS[0]=falseset HS[1]=falseset HS[2]=falseset HS[3]=falseset HS[4]=falseset HS[5]=falseset HS[6]=falseset HS[7]=falseset HS[8]=falseset HS[9]=falseset HS[10]=falseset HS[11]=falseset HS[12]=falseset HS[13]=falseset HS[14]=falseset t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)call Q9I(t,EVENT_PLAYER_UNIT_DROP_ITEM)call TriggerAddCondition(t,Condition(function FG1))set t=nullset XY=InitHashtable()set M=CreateTimer()set YS=Rect(-7040,-7680,7040,7168)call SetFloatGameState(GAME_STATE_TIME_OF_DAY,6.00)call SuspendTimeOfDay(false)call SetTimeOfDayScale(0.5)call SetSkyModel("Environment\\Sky\\FoggedSky\\FoggedSky.mdl")call SetCreepCampFilterState(true)set D3="Normal Mode"call TimerStart(M,99999.00,false,null)set V3=AddWeatherEffect(bj_mapInitialPlayableArea,1380018290)set Z3=AddWeatherEffect(bj_mapInitialPlayableArea,1397645939)set WS=AddWeatherEffect(bj_mapInitialPlayableArea,1280470369)set XS=AddWeatherEffect(bj_mapInitialPlayableArea,1464822903)set BO[0]=Player(0)set BO[1]=Player(1)set BO[2]=Player(2)set BO[3]=Player(3)set BO[4]=Player(4)set BO[5]=Player(5)set CO[0]=Player(6)set CO[1]=Player(7)set CO[2]=Player(8)set CO[3]=Player(9)set CO[4]=Player(10)set CO[5]=Player(11)set DO=Player(12)set EO=Player(15)call SetUnitPathing(IZ,false)call SetUnitPathing(OZ,false)call SetUnitPathing(EZ,false)call SetUnitPathing(UH,false)call SetUnitPathing(PH,false)call A71(PH,true)call A71(UH,true)call A71(EZ,true)call A71(OZ,true)call A71(IZ,true)set U0=GetUnitLoc(PH)set II=GetUnitLoc(IZ)set BI=GetUnitLoc(EZ)set CI=GetUnitLoc(UH)set DI=GetUnitLoc(OZ)set I2=1093678663set O2[1]=IIset O2[2]=CIset O2[3]=BIset O2[4]=DIset O2[5]=U0set TI=GetRectCenter(M3)set RI=GetRectCenter(N3)set PI=GetRectCenter(L3)set QI=GetRectCenter(U3)set I1=GetRectCenter(I4)set UI=GetRectCenter(Q3)set O1=GetRectCenter(C4)set B1=GetRectCenter(B4)set A1=GetRectCenter(A4)set C1=GetRectCenter(P3)set E1=GetRectCenter(R3)set D1=GetRectCenter(T3)set F1=GetRectCenter(G4)set G1=GetRectCenter(D4)set J2=trueset MS=GetUnitX(RZ)set SS=GetUnitY(RZ)set TS=GetUnitX(IV)set PS=GetUnitY(IV)set QS=GetUnitX(QZ)set US=GetUnitY(QZ)set IT=GetUnitX(PZ)set OT=GetUnitY(PZ)set AT=GetUnitX(DW)set BT=GetUnitY(DW)set CT=GetUnitX(DZ)set DT=GetUnitY(DZ)set ET=GetUnitX(BZ)set FT=GetUnitY(BZ)set GT=GetUnitX(QH)set HT=GetUnitY(QH)set ZT=GetUnitX(FZ)set VT=GetUnitY(FZ)set WT=GetUnitX(OV)set XT=GetUnitY(OV)set WT=GetUnitX(OV)set XT=GetUnitY(OV)set YT=GetUnitX(EY)set JT=GetUnitY(EY)set KT=GetUnitX(TH)set LT=GetUnitY(TH)set MT=GetUnitX(DV)set ST=GetUnitY(DV)set RT=GetUnitX(CV)set PT=GetUnitY(CV)set QT=GetUnitX(AV)set UT=GetUnitY(AV)set IR=GetUnitX(EV)set OR=GetUnitY(EV)set BR=GetUnitX(GZ)set CR=GetUnitY(GZ)set DR=GetUnitX(BV)set GR=GetUnitY(BV)set HR=GetUnitX(GV)set ZR=GetUnitY(GV)set WR=GetUnitX(FV)set XR=GetUnitY(FV)set YR=GetUnitX(JV)set JR=GetUnitY(JV)set KR=GetUnitX(ZV)set LR=GetUnitY(ZV)set SR=GetUnitX(HV)set RR=GetUnitY(HV)set PR=GetUnitX(VV)set QR=GetUnitY(VV)set UR=GetUnitX(YV)set IP=GetUnitY(YV)set OP=GetUnitX(XV)set BP=GetUnitY(XV)set DP=GetUnitX(WV)set EP=GetUnitY(WV)set FP=GetUnitX(LV)set GP=GetUnitY(LV)set ZP=GetUnitX(KV)set VP=GetUnitY(KV)set WP=GetUnitX(SV)set XP=GetUnitY(SV)set YP=GetUnitX(NV)set JP=GetUnitY(NV)set KP=GetUnitX(TV)set LP=GetUnitY(TV)set MP=GetUnitX(PV)set TP=GetUnitY(PV)set RP=GetUnitX(QV)set PP=GetUnitY(QV)set QP=GetUnitX(MV)set UP=GetUnitY(MV)set IQ=GetUnitX(IW)set OQ=GetUnitY(IW)set AQ=GetUnitX(OW)set BQ=GetUnitY(OW)set CQ=GetUnitX(UV)set DQ=GetUnitY(UV)set EQ=GetUnitX(AW)set FQ=GetUnitY(AW)set GQ=GetUnitX(BW)set HQ=GetUnitY(BW)set ZQ=GetUnitX(UZ)set VQ=GetUnitY(UZ)set WQ=GetUnitX(CW)set XQ=GetUnitY(CW)set YQ=GetUnitX(FW)set JQ=GetUnitY(FW)set KQ=GetUnitX(EW)set LQ=GetUnitY(EW)call RemoveUnit(GV)call RemoveUnit(WV)call RemoveUnit(VV)call RemoveUnit(FV)call RemoveUnit(LV)call RemoveUnit(YV)call RemoveUnit(JV)call RemoveUnit(KV)call RemoveUnit(XV)call RemoveUnit(UZ)call RemoveUnit(CW)call RemoveUnit(TH)call RemoveUnit(ZV)call RemoveUnit(HV)call RemoveUnit(SV)call RemoveUnit(NV)call RemoveUnit(TV)call RemoveUnit(PV)call RemoveUnit(QV)call RemoveUnit(MV)call RemoveUnit(IW)call RemoveUnit(OW)call RemoveUnit(UV)call RemoveUnit(AW)call RemoveUnit(BW)call RemoveUnit(OV)call RemoveUnit(EY)call RemoveUnit(FZ)call RemoveUnit(QH)call RemoveUnit(BZ)call RemoveUnit(DZ)call RemoveUnit(QZ)call RemoveUnit(PZ)call RemoveUnit(RZ)call RemoveUnit(IV)call RemoveUnit(DW)call RemoveUnit(DV)call RemoveUnit(CV)call RemoveUnit(AV)call RemoveUnit(EV)call RemoveUnit(GZ)call RemoveUnit(BV)call RemoveUnit(FW)call RemoveUnit(EW)set MQ=CreateUnit(BO[0],1852206952,MS,SS,270)set NQ=CreateUnit(EO,1749236021,TS,PS,270)set SQ=CreateUnit(EO,1848652107,QS,US,270)set TQ=CreateUnit(EO,1849897784,IT,OT,270)set RQ=CreateUnit(EO,1697657397,AT,BT,270)set PQ=CreateUnit(EO,1848651862,CT,DT,270)set QQ=CreateUnit(EO,1848651863,ET,FT,270)set UQ=CreateUnit(EO,1848651826,GT,HT,270)set I00=CreateUnit(EO,1848651864,ZT,VT,270)set II0=CreateUnit(EO,1848651833,WT,XT,270)set I10=CreateUnit(EO,1848657989,YT,JT,270)set IO0=CreateUnit(BO[0],1702129516,KT,LT,270)set I20=CreateUnit(BO[0],1697656914,MT,ST,90)set I30=CreateUnit(BO[0],1697656914,RT,PT,45)set I40=CreateUnit(BO[0],1697656914,QT,UT,0)set I50=CreateUnit(BO[0],1697657137,IR,OR,90)set I60=CreateUnit(BO[0],1697657137,BR,CR,45)set I70=CreateUnit(BO[0],1697657137,DR,GR,0)set I80=CreateUnit(BO[0],1697656915,HR,ZR,90)set I90=CreateUnit(BO[0],1697656915,WR,XR,45)set IA0=CreateUnit(BO[0],1697656915,YR,JR,0)set IB0=CreateUnit(BO[0],1697657145,KR,LR,45)set IC0=CreateUnit(BO[0],1697657145,SR,RR,45)set ID0=CreateUnit(BO[0],1700884333,PR,QR,90)set IE0=CreateUnit(BO[0],1700884333,UR,IP,45)set IF0=CreateUnit(BO[0],1700884333,OP,BP,0)set IG0=CreateUnit(BO[0],1700884325,DP,EP,90)set IH0=CreateUnit(BO[0],1700884325,FP,GP,45)set IZ0=CreateUnit(BO[0],1700884325,ZP,VP,0)set IV0=CreateUnit(BO[0],1701670775,WP,XP,270)set IW0=CreateUnit(BO[0],1701670775,YP,JP,270)set IX0=CreateUnit(BO[0],1701670775,KP,LP,270)set IY0=CreateUnit(BO[0],1701670775,MP,TP,270)set IJ0=CreateUnit(BO[0],1701670775,RP,PP,270)set IK0=CreateUnit(BO[0],1701670775,QP,UP,270)set IL0=CreateUnit(BO[0],1701670775,IQ,OQ,270)set IM0=CreateUnit(BO[0],1701670775,AQ,BQ,270)set IN0=CreateUnit(BO[0],1701670775,CQ,DQ,270)set IS0=CreateUnit(BO[0],1701670775,EQ,FQ,270)set IT0=CreateUnit(BO[0],1701670775,GQ,HQ,270)set IR0=CreateUnit(BO[0],1700884343,ZQ,VQ,270)set IP0=CreateUnit(BO[0],1700884343,WQ,XQ,270)set IQ0=CreateUnit(BO[0],1701080930,YQ,JQ,270)set IU0=CreateUnit(BO[0],1701080930,KQ,LQ,270)call SetPlayerAbilityAvailable(EO,1098018609,false)call SetUnitColor(NQ,KS)call SetUnitColor(RQ,KS)call SetUnitColor(TQ,LS)call SetUnitColor(SQ,LS)call SetUnitColor(PQ,LS)call SetUnitColor(QQ,LS)call SetUnitColor(UQ,LS)call SetUnitColor(I00,LS)call SetUnitColor(II0,LS)call A71(I20,true)call A71(I30,true)call A71(I40,true)call A71(I50,true)call A71(I60,true)call A71(I70,true)call A71(I80,true)call A71(I90,true)call A71(IA0,true)call A71(IB0,true)call A71(IC0,true)call A71(IO0,true)call A71(ID0,true)call A71(IE0,true)call A71(IF0,true)call A71(IG0,true)call A71(IH0,true)call A71(IZ0,true)call A71(IR0,true)call A71(IP0,true)call A71(IQ0,true)call A71(IU0,true)call A71(IV0,true)call A71(IW0,true)call A71(IX0,true)call A71(IY0,true)call A71(IJ0,true)call A71(IK0,true)call A71(IL0,true)call A71(IM0,true)call A71(IN0,true)call A71(IS0,true)call A71(IT0,true)call AddUnitToStock(RQ,1747989059,0,0)set O10=GetUnitX(BX)set OO0=GetUnitY(BX)set O20=GetUnitX(TW)set O30=GetUnitY(TW)set O40=GetUnitX(RW)set O50=GetUnitY(RW)set O60=GetUnitX(PW)set O70=GetUnitY(PW)set O80=GetUnitX(MW)set O90=GetUnitY(MW)set OA0=GetUnitX(KW)set OB0=GetUnitY(KW)set OC0=GetUnitX(JW)set OD0=GetUnitY(JW)set OE0=GetUnitX(YW)set OF0=GetUnitY(YW)set OG0=GetUnitX(LW)set OH0=GetUnitY(LW)set OZ0=GetUnitX(SW)set OV0=GetUnitY(SW)set OW0=GetUnitX(VZ)set OX0=GetUnitY(VZ)set OY0=GetUnitX(WX)set OJ0=GetUnitY(WX)set OK0=GetUnitX(CZ)set OL0=GetUnitY(CZ)set OM0=GetUnitX(YX)set ON0=GetUnitY(YX)set OS0=GetUnitX(ZZ)set OT0=GetUnitY(ZZ)set OR0=GetUnitX(KZ)set OP0=GetUnitY(KZ)set OQ0=GetUnitX(JX)set OU0=GetUnitY(JX)set A00=GetUnitX(HZ)set AI0=GetUnitY(HZ)set A10=GetUnitX(XW)set AO0=GetUnitY(XW)set A20=GetUnitX(KX)set A30=GetUnitY(KX)set A40=GetUnitX(BY)set A50=GetUnitY(BY)set A60=GetUnitX(LX)set A70=GetUnitY(LX)set A80=GetUnitX(HX)set A90=GetUnitY(HX)set AA0=GetUnitX(WW)set AB0=GetUnitY(WW)set AC0=GetUnitX(GX)set AD0=GetUnitY(GX)set AE0=GetUnitX(AY)set AF0=GetUnitY(AY)set AG0=GetUnitX(VW)set AH0=GetUnitY(VW)set AZ0=GetUnitX(XX)set AV0=GetUnitY(XX)set AW0=GetUnitX(OY)set AX0=GetUnitY(OY)set AY0=GetUnitX(RX)set AJ0=GetUnitY(RX)set AK0=GetUnitX(NX)set AL0=GetUnitY(NX)set AM0=GetUnitX(UX)set AN0=GetUnitY(UX)set AS0=GetUnitX(ZW)set AT0=GetUnitY(ZW)set AR0=GetUnitX(QX)set AP0=GetUnitY(QX)set AQ0=GetUnitX(MX)set AU0=GetUnitY(MX)set B00=GetUnitX(SX)set BI0=GetUnitY(SX)set B10=GetUnitX(PX)set BO0=GetUnitY(PX)set B20=GetUnitX(CY)set B30=GetUnitY(CY)set B40=GetUnitX(GW)set B50=GetUnitY(GW)set B60=GetUnitX(ZX)set B70=GetUnitY(ZX)set B80=GetUnitX(HW)set B90=GetUnitY(HW)set BA0=GetUnitX(IY)set BB0=GetUnitY(IY)set BC0=GetUnitX(TX)set BD0=GetUnitY(TX)set BE0=GetUnitX(VX)set BF0=GetUnitY(VX)call RemoveUnit(RX)call RemoveUnit(NX)call RemoveUnit(UX)call RemoveUnit(ZW)call RemoveUnit(QX)call RemoveUnit(MX)call RemoveUnit(SX)call RemoveUnit(PX)call RemoveUnit(CY)call RemoveUnit(GW)call RemoveUnit(ZX)call RemoveUnit(CZ)call RemoveUnit(KZ)call RemoveUnit(XW)call RemoveUnit(YX)call RemoveUnit(JX)call RemoveUnit(KX)call RemoveUnit(ZZ)call RemoveUnit(HZ)call RemoveUnit(BY)call RemoveUnit(LX)call RemoveUnit(HX)call RemoveUnit(WW)call RemoveUnit(GX)call RemoveUnit(AY)call RemoveUnit(VW)call RemoveUnit(XX)call RemoveUnit(OY)call RemoveUnit(HW)call RemoveUnit(IY)call RemoveUnit(TX)call RemoveUnit(VX)call RemoveUnit(WX)call RemoveUnit(KW)call RemoveUnit(JW)call RemoveUnit(YW)call RemoveUnit(LW)call RemoveUnit(SW)call RemoveUnit(VZ)call RemoveUnit(PW)call RemoveUnit(RW)call RemoveUnit(BX)call RemoveUnit(TW)call RemoveUnit(MW)set BG0=CreateUnit(CO[0],1852073580,O10,OO0,270)set BH0=CreateUnit(EO,1849897781,O20,O30,270)set BZ0=CreateUnit(EO,1848652107,O40,O50,270)set BV0=CreateUnit(EO,1849897784,O60,O70,270)set BW0=CreateUnit(EO,1966092369,O80,O90,270)set BX0=CreateUnit(EO,1848651862,OA0,OB0,0)set BY0=CreateUnit(EO,1848651863,OC0,OD0,0)set BJ0=CreateUnit(EO,1848651826,OE0,OF0,0)set BK0=CreateUnit(EO,1848651864,OG0,OH0,0)set BL0=CreateUnit(EO,1848651833,OZ0,OV0,0)set BM0=CreateUnit(EO,1848657989,OW0,OX0,0)set BN0=CreateUnit(CO[0],1970172012,OY0,OJ0,220)set BS0=CreateUnit(CO[0],1966092365,OK0,OL0,270)set BT0=CreateUnit(CO[0],1966092365,OM0,ON0,270)set BR0=CreateUnit(CO[0],1966092365,OS0,OT0,270)set BP0=CreateUnit(CO[0],1966092356,OR0,OP0,270)set BQ0=CreateUnit(CO[0],1966092356,OQ0,OU0,270)set BU0=CreateUnit(CO[0],1966092356,A00,AI0,270)set C00=CreateUnit(CO[0],1966092366,A10,AO0,270)set CI0=CreateUnit(CO[0],1966092366,A20,A30,270)set C10=CreateUnit(CO[0],1966092366,A40,A50,270)set CO0=CreateUnit(CO[0],1966092372,A60,A70,270)set C20=CreateUnit(CO[0],1966092372,A80,A90,270)set C30=CreateUnit(CO[0],1970496880,AA0,AB0,270)set C40=CreateUnit(CO[0],1970496880,AC0,AD0,270)set C50=CreateUnit(CO[0],1970496880,AE0,AF0,270)set C60=CreateUnit(CO[0],1970564964,AG0,AH0,270)set C70=CreateUnit(CO[0],1970564964,AZ0,AV0,270)set C80=CreateUnit(CO[0],1970564964,AW0,AX0,270)set C90=CreateUnit(CO[0],1970956647,AY0,AJ0,270)set CA0=CreateUnit(CO[0],1970956647,AK0,AL0,270)set CB0=CreateUnit(CO[0],1970956647,AM0,AN0,270)set CC0=CreateUnit(CO[0],1970956647,AS0,AT0,270)set CD0=CreateUnit(CO[0],1970956647,AR0,AP0,270)set CE0=CreateUnit(CO[0],1970956647,AQ0,AU0,270)set CF0=CreateUnit(CO[0],1970956647,B00,BI0,270)set CG0=CreateUnit(CO[0],1970956647,B10,BO0,270)set CH0=CreateUnit(CO[0],1970956647,B20,B30,270)set CZ0=CreateUnit(CO[0],1970956647,B40,B50,270)set CV0=CreateUnit(CO[0],1970956647,B60,B70,270)set CW0=CreateUnit(CO[0],1970495856,B80,B90,270)set CX0=CreateUnit(CO[0],1970495856,BA0,BB0,270)set CY0=CreateUnit(CO[0],1969385326,BC0,BD0,270)set CJ0=CreateUnit(CO[0],1969385326,BE0,BF0,270)call SetUnitColor(BH0,O00)call SetUnitColor(BV0,OI0)call SetUnitColor(BZ0,OI0)call SetUnitColor(BX0,OI0)call SetUnitColor(BY0,OI0)call SetUnitColor(BJ0,OI0)call SetUnitColor(BK0,OI0)call SetUnitColor(BL0,OI0)call A71(BS0,true)call A71(BT0,true)call A71(BR0,true)call A71(BP0,true)call A71(BQ0,true)call A71(BU0,true)call A71(C00,true)call A71(CI0,true)call A71(C10,true)call A71(CO0,true)call A71(C20,true)call A71(BN0,true)call A71(C30,true)call A71(C40,true)call A71(C50,true)call A71(C60,true)call A71(C70,true)call A71(C80,true)call A71(CW0,true)call A71(CX0,true)call A71(CY0,true)call A71(CJ0,true)call A71(C90,true)call A71(CA0,true)call A71(CB0,true)call A71(CC0,true)call A71(CD0,true)call A71(CE0,true)call A71(CF0,true)call A71(CG0,true)call A71(CH0,true)call A71(CZ0,true)call A71(CV0,true)call AddUnitToStock(BW0,1747989059,0,0)set FU1=GetUnitX(LZ)set G01=GetUnitY(LZ)set GI1=GetUnitX(TZ)set G11=GetUnitY(TZ)set GO1=GetUnitX(SZ)set G21=GetUnitY(SZ)set G31=GetUnitX(MZ)set G41=GetUnitY(MZ)set G51=GetUnitX(NZ)set G61=GetUnitY(NZ)set G71=GetUnitX(UW)set G81=GetUnitY(UW)set G91=GetUnitX(QW)set GA1=GetUnitY(QW)set GB1=GetUnitX(AX)set GC1=GetUnitY(AX)set GD1=GetUnitX(IX)set GE1=GetUnitY(IX)set GF1=GetUnitX(OX)set GG1=GetUnitY(OX)set GH1=25call RemoveUnit(LZ)call RemoveUnit(TZ)call RemoveUnit(SZ)call RemoveUnit(MZ)call RemoveUnit(NZ)call RemoveUnit(UW)call RemoveUnit(QW)call RemoveUnit(AX)call RemoveUnit(IX)call RemoveUnit(OX)set CK0=CreateUnit(Player(1),1852010352,FU1,G01,270)call UnitAddAbility(CK0,1093743665)call ClearSelectionForPlayer(Player(1))call SelectUnitAddForPlayer(CK0,Player(1))if GetLocalPlayer()==Player(1)thencall SetUnitVertexColor(CK0,255,255,255,255)elsecall SetUnitVertexColor(CK0,255,255,255,GH1)endifset CL0=CreateUnit(Player(2),1852010352,GI1,G11,270)call UnitAddAbility(CL0,1093743665)call ClearSelectionForPlayer(Player(2))call SelectUnitAddForPlayer(CL0,Player(2))if GetLocalPlayer()==Player(2)thencall SetUnitVertexColor(CL0,255,255,255,255)elsecall SetUnitVertexColor(CL0,255,255,255,GH1)endifset CM0=CreateUnit(Player(3),1852010352,GO1,G21,270)call UnitAddAbility(CM0,1093743665)call ClearSelectionForPlayer(Player(3))call SelectUnitAddForPlayer(CM0,Player(3))if GetLocalPlayer()==Player(3)thencall SetUnitVertexColor(CM0,255,255,255,255)elsecall SetUnitVertexColor(CM0,255,255,255,GH1)endifset CN0=CreateUnit(Player(4),1852010352,G31,G41,270)call UnitAddAbility(CN0,1093743665)call ClearSelectionForPlayer(Player(4))call SelectUnitAddForPlayer(CN0,Player(4))if GetLocalPlayer()==Player(4)thencall SetUnitVertexColor(CN0,255,255,255,255)elsecall SetUnitVertexColor(CN0,255,255,255,GH1)endifset CS0=CreateUnit(Player(5),1852010352,G51,G61,270)call UnitAddAbility(CS0,1093743665)call ClearSelectionForPlayer(Player(5))call SelectUnitAddForPlayer(CS0,Player(5))if GetLocalPlayer()==Player(5)thencall SetUnitVertexColor(CS0,255,255,255,255)elsecall SetUnitVertexColor(CS0,255,255,255,GH1)endifset CT0=CreateUnit(Player(7),1852010352,G71,G81,270)call UnitAddAbility(CT0,1093752649)call ClearSelectionForPlayer(Player(7))call SelectUnitAddForPlayer(CT0,Player(7))if GetLocalPlayer()==Player(7)thencall SetUnitVertexColor(CT0,255,255,255,255)elsecall SetUnitVertexColor(CT0,255,255,255,GH1)endifset CR0=CreateUnit(Player(8),1852010352,G91,GA1,270)call UnitAddAbility(CR0,1093752649)call ClearSelectionForPlayer(Player(8))call SelectUnitAddForPlayer(CR0,Player(8))if GetLocalPlayer()==Player(8)thencall SetUnitVertexColor(CR0,255,255,255,255)elsecall SetUnitVertexColor(CR0,255,255,255,GH1)endifset CP0=CreateUnit(Player(9),1852010352,GB1,GC1,270)call UnitAddAbility(CP0,1093752649)call ClearSelectionForPlayer(Player(9))call SelectUnitAddForPlayer(CP0,Player(9))if GetLocalPlayer()==Player(9)thencall SetUnitVertexColor(CP0,255,255,255,255)elsecall SetUnitVertexColor(CP0,255,255,255,GH1)endifset CQ0=CreateUnit(Player(10),1852010352,GD1,GE1,270)call UnitAddAbility(CQ0,1093752649)call ClearSelectionForPlayer(Player(10))call SelectUnitAddForPlayer(CQ0,Player(10))if GetLocalPlayer()==Player(10)thencall SetUnitVertexColor(CQ0,255,255,255,255)elsecall SetUnitVertexColor(CQ0,255,255,255,GH1)endifset CU0=CreateUnit(Player(11),1852010352,GF1,GG1,270)call UnitAddAbility(CU0,1093752649)call ClearSelectionForPlayer(Player(11))call SelectUnitAddForPlayer(CU0,Player(11))if GetLocalPlayer()==Player(11)thencall SetUnitVertexColor(CU0,255,255,255,255)elsecall SetUnitVertexColor(CU0,255,255,255,GH1)endifset D00[1]=CK0set D00[2]=CL0set D00[3]=CM0set D00[4]=CN0set D00[5]=CS0set D00[7]=CT0set D00[8]=CR0set D00[9]=CP0set D00[10]=CQ0set D00[11]=CU0set DI0[1]=GetUnitX(CK0)set DI0[2]=GetUnitX(CL0)set DI0[3]=GetUnitX(CM0)set DI0[4]=GetUnitX(CN0)set DI0[5]=GetUnitX(CS0)set DI0[7]=GetUnitX(CT0)set DI0[8]=GetUnitX(CR0)set DI0[9]=GetUnitX(CP0)set DI0[10]=GetUnitX(CQ0)set DI0[11]=GetUnitX(CU0)set D10[1]=GetUnitY(CK0)set D10[2]=GetUnitY(CL0)set D10[3]=GetUnitY(CM0)set D10[4]=GetUnitY(CN0)set D10[5]=GetUnitY(CS0)set D10[7]=GetUnitY(CT0)set D10[8]=GetUnitY(CR0)set D10[9]=GetUnitY(CP0)set D10[10]=GetUnitY(CQ0)set D10[11]=GetUnitY(CU0)call GS1()call GU1()call NAI(1702061422,"stand 4")call NAI(1697656918,"stand 4")call NAI(1701081721,"spell")call NAI(1697656919,"spell")call NAI(1969711215,"stand victory")call NAI(1966092337,"stand victory")call NAI(1970169187,"stand channel")call NAI(1966092338,"stand channel")call N5I(1848651853,0.4,1848651853)call N5I(1697657426,0.5,1697657426)call N5I(1697657428,1.2,1697657428)call N5I(1697657427,0.5,1697657427)call N5I(1697657648,0.5,1697657648)call N5I(1848659027,1,1848659027)set t=CreateTrigger()set NJI=Player(15)set H11=GetUnitX(EX)set HO1=GetUnitY(EX)set H21=GetUnitX(YZ)set H31=GetUnitY(YZ)set H41=GetUnitX(CX)set H51=GetUnitY(CX)set H61=GetUnitX(ZY)set H71=GetUnitY(ZY)set H81=GetUnitX(XZ)set H91=GetUnitY(XZ)set HA1=GetUnitX(JZ)set HB1=GetUnitY(JZ)set HC1=GetUnitX(RH)set HD1=GetUnitY(RH)set HE1=GetUnitX(WY)set HF1=GetUnitY(WY)set HG1=GetUnitX(AZ)set HH1=GetUnitY(AZ)set HZ1=GetUnitX(DX)set HV1=GetUnitY(DX)set HW1=GetUnitX(DY)set HX1=GetUnitY(DY)set HY1=GetUnitX(VY)set HJ1=GetUnitY(VY)call RemoveUnit(EX)call RemoveUnit(JZ)call RemoveUnit(YZ)call RemoveUnit(XZ)call RemoveUnit(CX)call RemoveUnit(RH)call RemoveUnit(AZ)call RemoveUnit(DX)call RemoveUnit(DY)call RemoveUnit(ZY)call RemoveUnit(WY)call RemoveUnit(VY)set DR0=CreateUnit(NJI,1848651832,H81,H91,270)set DP0=CreateUnit(NJI,1848657738,HA1,HB1,270)set DQ0=CreateUnit(NJI,1848652100,HC1,HD1,270)set DU0=CreateUnit(NJI,1848659016,HE1,HF1,270)set E00=CreateUnit(NJI,1848652110,H11,HO1,270)set EI0=CreateUnit(NJI,1848651831,H21,H31,270)set E10=CreateUnit(NJI,1848651829,H41,H51,270)set EO0=CreateUnit(NJI,1848659017,H61,H71,270)set E20=CreateUnit(NJI,1848652098,HG1,HH1,270)set E30=CreateUnit(NJI,1848652112,HZ1,HV1,270)set E40=CreateUnit(NJI,1848657739,HW1,HX1,270)set E50=CreateUnit(NJI,1848659018,HY1,HJ1,270)call SetUnitColor(DR0,ConvertPlayerColor(1))call SetUnitColor(DP0,ConvertPlayerColor(1))call SetUnitColor(DQ0,ConvertPlayerColor(9))call SetUnitColor(DU0,ConvertPlayerColor(9))call SetUnitColor(E00,ConvertPlayerColor(6))call SetUnitColor(EI0,ConvertPlayerColor(6))call SetUnitColor(E10,ConvertPlayerColor(10))call SetUnitColor(EO0,ConvertPlayerColor(10))call SetUnitColor(E20,ConvertPlayerColor(0))call SetUnitColor(E30,ConvertPlayerColor(0))call SetUnitColor(E40,ConvertPlayerColor(11))call SetUnitColor(E50,ConvertPlayerColor(11))set t=nullset t=CreateTrigger()call TriggerRegisterTimerEvent(t,0.01,false)call TriggerAddCondition(t,Condition(function HR1))set IG=CreateTrigger()call TriggerRegisterTimerEventSingle(IG,0.01)call TriggerAddAction(IG,function HQ1)set t=CreateTrigger()call TriggerRegisterPlayerEventLeave(t,BO[1])call TriggerRegisterPlayerEventLeave(t,BO[2])call TriggerRegisterPlayerEventLeave(t,BO[3])call TriggerRegisterPlayerEventLeave(t,BO[4])call TriggerRegisterPlayerEventLeave(t,BO[5])call TriggerRegisterPlayerEventLeave(t,CO[1])call TriggerRegisterPlayerEventLeave(t,CO[2])call TriggerRegisterPlayerEventLeave(t,CO[3])call TriggerRegisterPlayerEventLeave(t,CO[4])call TriggerRegisterPlayerEventLeave(t,CO[5])call TriggerAddAction(t,function Z61)if C2 thencall ZI1()set t=CreateTrigger()if IsPlayerObserver(DO0)thencall TriggerRegisterPlayerEventLeave(t,DO0)endifif IsPlayerObserver(D20)thencall TriggerRegisterPlayerEventLeave(t,D20)endifcall TriggerAddAction(t,function Z11)endifset EA0[0]=falseset EA0[1]=falseset EA0[2]=falseset EA0[3]=falseset EA0[4]=falseset EA0[5]=falseset EA0[6]=falseset EA0[7]=falseset EA0[8]=falseset EA0[9]=falseset EA0[10]=falseset EA0[11]=falseset EA0[12]=falseset EA0[13]=falseset EA0[14]=falseset EA0[15]=falseset t=CreateTrigger()call Q9I(t,EVENT_PLAYER_HERO_REVIVE_FINISH)call TriggerAddAction(t,function ZQ1)set t=CreateTrigger()call TriggerRegisterEnterRectSimple(t,bj_mapInitialPlayableArea)call TriggerAddCondition(t,Condition(function RP1))call TriggerAddAction(t,function P51)set ON=tset t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SELL)call TriggerAddAction(t,function PA1)call TriggerAddCondition(t,Condition(function P91))set EE0=tset EF0=CreateTrigger()call TriggerRegisterTimerEvent(EF0,0.6,true)call TriggerAddCondition(EF0,Condition(function PC1))call DisableTrigger(EF0)set t=CreateTrigger()call TriggerRegisterTimerEvent(t,.5,true)call TriggerAddAction(t,function PE1)set EG0=tcall A31(0,0,false)call PH1()set t=CreateTrigger()call TriggerRegisterTimerEvent(t,0.5,true)call Q9I(t,EVENT_PLAYER_UNIT_SELL)call TriggerAddCondition(t,Condition(function PY1))set t=CreateTrigger()call TriggerRegisterTimerEvent(t,0.1,true)call TriggerAddCondition(t,Condition(function PW1))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_PAWN_ITEM)call TriggerAddCondition(t,Condition(function PV1))set t=nullcall RVI(1093809990)call RVI(1093810008)call RVI(1093809992)call RVI(1093817913)call RVI(1093810006)call RVI(1093809991)call RVI(1093809993)call RVI(1093809995)call RVI(1093809994)set OG=CreateTrigger()call TriggerRegisterPlayerUnitEvent(OG,BO[0],EVENT_PLAYER_UNIT_DEATH,Condition(function Q8I))call TriggerRegisterPlayerUnitEvent(OG,CO[0],EVENT_PLAYER_UNIT_DEATH,Condition(function Q8I))call TriggerRegisterPlayerUnitEvent(OG,DO,EVENT_PLAYER_UNIT_DEATH,Condition(function Q8I))call TriggerAddAction(OG,function Q41)set t=CreateTrigger()call TriggerRegisterTimerEvent(t,0.5,true)call TriggerAddCondition(t,Condition(function QG1))set t=nullset t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_DEATH)call TriggerAddCondition(t,Condition(function UD1))call TriggerAddAction(t,function UW1)set AG=tset t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_DEATH)call TriggerAddCondition(t,Condition(function IVO))set t=nullcall IAO(1853060204,62)call IAO(1853060200,119)call IAO(1848652342,88)call IAO(1852077175,119)call IAO(1701212014,30)call IAO(1848651828,300)call IAO(1848652088,300)call IAO(1848652099,300)call IAO(1848652103,300)call IAO(1865429076,20)call IAO(1865429077,25)call IAO(1865429078,30)call IAO(1865429079,35)call IAO(1848651848,200)call IAO(1848651847,300)call IAO(1848651851,400)call IAO(1848651850,200)call IAO(1848651841,300)call IAO(1848651830,400)call IAO(1848657461,0)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SUMMON)call TriggerAddCondition(t,Condition(function IYO))set t=nullset t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_DEATH)call TriggerAddCondition(t,Condition(function ILO))set t=nullset FV0=CreateTrigger()call TriggerAddCondition(FV0,Condition(function IUO))set BG=CreateTrigger()call TriggerRegisterPlayerUnitEvent(BG,DO,EVENT_PLAYER_UNIT_DEATH,Condition(function LWI))call TriggerAddCondition(BG,Condition(function O2O))call TriggerAddAction(BG,function O5O)set t=CreateTrigger()call TriggerRegisterPlayerUnitEvent(t,BO[0],EVENT_PLAYER_UNIT_DEATH,Condition(function LWI))call TriggerRegisterPlayerUnitEvent(t,CO[0],EVENT_PLAYER_UNIT_DEATH,Condition(function LWI))call TriggerAddCondition(t,Condition(function OEO))set t=nullset t=CreateTrigger()call TriggerAddCondition(t,Condition(function OSO))call TriggerRegisterTimerEvent(t,6,false)set t=nullset FR0=FR0+1set FJ0[FR0]=1227900486set FK0[FR0]=1227900487set FL0[FR0]=0set FM0[FR0]=0set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSelectHeroOn.blp"set FS0[FR0]=0set FR0=FR0+1set FJ0[FR0]=1227895377set FK0[FR0]=1227895375set FL0[FR0]=1747988785set FM0[FR0]=1227894849set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNBootsOfSpeed.blp"set FS0[FR0]=0set FU0=FR0set FR0=FR0+1set FJ0[FR0]=1227895379set FK0[FR0]=1227895376set FL0[FR0]=1747988786set FM0[FR0]=1227899713set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNGlove.blp"set FS0[FR0]=0set G00=FR0set FR0=FR0+1set FJ0[FR0]=1227895374set FK0[FR0]=1227895378set FL0[FR0]=1747988787set FM0[FR0]=1227899731set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNBoots.blp"set FS0[FR0]=0set GI0=FR0set FR0=FR0+1set FJ0[FR0]=1227895384set FK0[FR0]=1227895385set FL0[FR0]=1747988789set FM0[FR0]=1227899956set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNCirclet.blp"set FS0[FR0]=0set G10=FR0set FR0=FR0+1set FJ0[FR0]=1227895386set FK0[FR0]=1227895859set FL0[FR0]=1747988790set FM0[FR0]=1227899734set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNBelt.blp"set FS0[FR0]=0set GO0=FR0set FR0=FR0+1set FJ0[FR0]=1227895600set FK0[FR0]=1227895860set FL0[FR0]=1747988791set FM0[FR0]=1227899954set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_ThrowingKnife_03.blp"set FS0[FR0]=0set G20=FR0set FR0=FR0+1set FJ0[FR0]=1227895601set FK0[FR0]=1227895861set FL0[FR0]=1747988792set FM0[FR0]=1227899957set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNClawsOfAttack.blp"set FS0[FR0]=0set G30=FR0set FR0=FR0+1set FJ0[FR0]=1227895602set FK0[FR0]=1227895862set FL0[FR0]=1747988793set FM0[FR0]=1227899738set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSteelMelee.blp"set FS0[FR0]=0set G40=FR0set FR0=FR0+1set FJ0[FR0]=1227895603set FK0[FR0]=1227895863set FL0[FR0]=1747988801set FM0[FR0]=1227899959set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Chest_Chain_12.blp"set FS0[FR0]=0set G50=FR0set FR0=FR0+1set FJ0[FR0]=1227895604set FK0[FR0]=1227895864set FL0[FR0]=1747988802set FM0[FR0]=1227899736set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Sword_19.blp"set FS0[FR0]=0set G60=FR0set FR0=FR0+1set FJ0[FR0]=1227895605set FK0[FR0]=1227895865set FL0[FR0]=1747988803set FM0[FR0]=1227899721set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNFrostMourne.blp"set FS0[FR0]=0set G70=FR0set FR0=FR0+1set FJ0[FR0]=1227895606set FK0[FR0]=1227895873set FL0[FR0]=1747988804set FM0[FR0]=1227899720set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Weapon_Bow_06.blp"set FS0[FR0]=0set G80=FR0set FR0=FR0+1set FJ0[FR0]=1227895607set FK0[FR0]=1227895874set FL0[FR0]=1747988805set FM0[FR0]=1227899730set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNEnchantedGemstone.blp"set FS0[FR0]=0set G90=FR0set FR0=FR0+1set FJ0[FR0]=1227895608set FK0[FR0]=1227895875set FL0[FR0]=1747988806set FM0[FR0]=1227899722set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNGauntletsOfOgrePower.blp"set FS0[FR0]=0set GA0=FR0set FR0=FR0+1set FJ0[FR0]=1227895609set FK0[FR0]=1227895876set FL0[FR0]=1747988807set FM0[FR0]=1227899975set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNGem.blp"set FS0[FR0]=0set GB0=FR0set FR0=FR0+1set FJ0[FR0]=1227902291set FK0[FR0]=1227902290set FL0[FR0]=0set FM0[FR0]=1227902292set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNGem.blp"set FS0[FR0]=0set GC0=FR0set FR0=FR0+1set FJ0[FR0]=1227895618set FK0[FR0]=1227895877set FL0[FR0]=1747988808set FM0[FR0]=1227899969set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNHelmutPurple.blp"set FS0[FR0]=0set GD0=FR0set FR0=FR0+1set FJ0[FR0]=1227895619set FK0[FR0]=1227895878set FL0[FR0]=1747988809set FM0[FR0]=1227899729set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNPeriapt1.blp"set FS0[FR0]=0set GE0=FR0set FR0=FR0+1set FJ0[FR0]=1227895620set FK0[FR0]=1227895879set FL0[FR0]=1747988810set FM0[FR0]=1227899733set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNNatureTouchGrow.blp"set FS0[FR0]=0set GF0=FR0set FR0=FR0+1set FJ0[FR0]=1227895621set FK0[FR0]=1227895880set FL0[FR0]=1747988811set FM0[FR0]=1227899703set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNDaggerOfEscape.blp"set FS0[FR0]=12set GG0=FR0set FR0=FR0+1set FJ0[FR0]=1227895621set FK0[FR0]=1227895881set FL0[FR0]=1747988811set FM0[FR0]=1227899976set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNDaggerOfEscape.blp"set FS0[FR0]=0set GH0=FR0set FR0=FR0+1set FJ0[FR0]=1227895622set FK0[FR0]=1227895882set FL0[FR0]=1747988812set FM0[FR0]=1227899725set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNMantleOfIntelligence.blp"set FS0[FR0]=0set GZ0=FR0set FR0=FR0+1set FJ0[FR0]=1227895623set FK0[FR0]=1227895883set FL0[FR0]=1747988813set FM0[FR0]=1227899716set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNUndeadShrine.blp"set FS0[FR0]=0set GV0=FR0set FR0=FR0+1set FJ0[FR0]=1227895624set FK0[FR0]=1227895884set FL0[FR0]=1747988814set FM0[FR0]=1227899719set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSpiritWalkerMasterTraining.blp"set FS0[FR0]=0set GW0=FR0set FR0=FR0+1set FJ0[FR0]=1227895625set FK0[FR0]=1227895885set FL0[FR0]=1747988815set FM0[FR0]=1227899952set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNHammer.blp"set FS0[FR0]=0set GX0=FR0set FR0=FR0+1set FJ0[FR0]=1227895626set FK0[FR0]=1227895886set FL0[FR0]=1747988816set FM0[FR0]=1227899726set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNStaffOfNegation.blp"set FS0[FR0]=0set GY0=FR0set FR0=FR0+1set FJ0[FR0]=1227895627set FK0[FR0]=1227895887set FL0[FR0]=1747988817set FM0[FR0]=1227899960set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSpiritWalkerAdeptTraining.tga"set FS0[FR0]=0set GJ0=FR0set FR0=FR0+1set FJ0[FR0]=1227895628set FK0[FR0]=1227895888set FL0[FR0]=1747988818set FM0[FR0]=1227899717set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Misc_Cape_08.blp"set FS0[FR0]=0set GK0=FR0set FR0=FR0+1set FJ0[FR0]=1227895629set FK0[FR0]=1227895889set FL0[FR0]=1747988819set FM0[FR0]=1227899970set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Chest_Plate13.blp"set FS0[FR0]=0set GL0=FR0set FR0=FR0+1set FJ0[FR0]=1227895630set FK0[FR0]=1227895890set FL0[FR0]=1747988820set FM0[FR0]=1227899724set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNUsedSoulGem.blp"set FS0[FR0]=0set GM0=FR0set FR0=FR0+1set FJ0[FR0]=1227895632set FK0[FR0]=1227895891set FL0[FR0]=1747988821set FM0[FR0]=1227899737set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNAlleriaFlute.blp"set FS0[FR0]=0set GN0=FR0set FR0=FR0+1set FJ0[FR0]=1227895633set FK0[FR0]=1227895892set FL0[FR0]=1747988822set FM0[FR0]=1227899977set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNGoldRing.blp"set FS0[FR0]=0set GS0=FR0set FR0=FR0+1set FJ0[FR0]=1227895634set FK0[FR0]=1227895893set FL0[FR0]=1747988823set FM0[FR0]=1227899735set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNRingPurple.blp"set FS0[FR0]=0set GT0=FR0set FR0=FR0+1set FJ0[FR0]=1227895635set FK0[FR0]=1227895894set FL0[FR0]=1747988824set FM0[FR0]=1227899978set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNRingSkull.blp"set FS0[FR0]=0set GR0=FR0set FR0=FR0+1set FJ0[FR0]=1227895636set FK0[FR0]=1227895895set FL0[FR0]=1747988825set FM0[FR0]=1227899728set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNRobeOfTheMagi.blp"set FS0[FR0]=0set GP0=FR0set FR0=FR0+1set FJ0[FR0]=1227895637set FK0[FR0]=1227895896set FL0[FR0]=1747988826set FM0[FR0]=1227899715set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNStaffOfTeleportation.blp"set FS0[FR0]=0set GQ0=FR0set FR0=FR0+1set FJ0[FR0]=1227895638set FK0[FR0]=1227895897set FL0[FR0]=1747989040set FM0[FR0]=1227899701set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSlippersOfAgility.blp"set FS0[FR0]=0set GU0=FR0set FR0=FR0+1set FJ0[FR0]=1227895639set FK0[FR0]=1227895898set FL0[FR0]=1747989041set FM0[FR0]=1227899979set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSobiMask.blp"set FS0[FR0]=0set H00=FR0set FR0=FR0+1set FJ0[FR0]=1227895640set FK0[FR0]=1227896112set FL0[FR0]=1747989042set FM0[FR0]=1227899953set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNWandOfCyclone.blp"set FS0[FR0]=0set HI0=FR0set FR0=FR0+1set FJ0[FR0]=1227895617set FK0[FR0]=1227896113set FL0[FR0]=1747989043set FM0[FR0]=1227899961set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSteelArmor.blp"set FS0[FR0]=0set H10=FR0set FR0=FR0+1set FJ0[FR0]=1227901762set FK0[FR0]=1227901761set FL0[FR0]=0set FM0[FR0]=1227901763set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSteelArmor.blp"set FS0[FR0]=0set HO0=FR0set FR0=FR0+1set FJ0[FR0]=1227895641set FK0[FR0]=1227896114set FL0[FR0]=1747989044set FM0[FR0]=1227899705set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNOrbofSlowness.blp"set FS0[FR0]=0set H20=FR0set FR0=FR0+1set FJ0[FR0]=1227895642set FK0[FR0]=1227896115set FL0[FR0]=1747989045set FM0[FR0]=1227899723set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSoulGem.blp"set FS0[FR0]=0set H30=FR0set FR0=FR0+1set FJ0[FR0]=1227895856set FK0[FR0]=1227896116set FL0[FR0]=1747989046set FM0[FR0]=1227899980set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNPeriapt.blp"set FS0[FR0]=0set H40=FR0set FR0=FR0+1set FJ0[FR0]=1227895857set FK0[FR0]=1227896117set FL0[FR0]=1747989047set FM0[FR0]=1227899958set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSteelRanged.blp"set FS0[FR0]=0set H50=FR0set FR0=FR0+1set FJ0[FR0]=1227894860set FK0[FR0]=1227899222set FL0[FR0]=1747989058set FM0[FR0]=0set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNBottle0.blp"set FS0[FR0]=0set H60=FR0set FR0=FR0+1set FJ0[FR0]=1227896133set FK0[FR0]=1227899213set FL0[FR0]=0set FM0[FR0]=1227899982set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNBottle0.blp"set FS0[FR0]=0set H70=FR0set FR0=FR0+1set FJ0[FR0]=1227899221set FK0[FR0]=1227899214set FL0[FR0]=0set FM0[FR0]=1227899983set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNBottle1.blp"set FS0[FR0]=0set H80=FR0set FR0=FR0+1set FJ0[FR0]=1227899219set FK0[FR0]=1227899215set FL0[FR0]=0set FM0[FR0]=1227899984set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNBottle2.blp"set FS0[FR0]=0set H90=FR0set FR0=FR0+1set FJ0[FR0]=1227899220set FK0[FR0]=1227899216set FL0[FR0]=0set FM0[FR0]=1227899985set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNBottle3.blp"set FS0[FR0]=0set HA0=FR0set FR0=FR0+1set FJ0[FR0]=1227900759set FK0[FR0]=1227900761set FL0[FR0]=0set FM0[FR0]=1227900979set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNBottle_Illusion.blp"set FS0[FR0]=0set HF0=FR0set FR0=FR0+1set FJ0[FR0]=1227900978set FK0[FR0]=1227900760set FL0[FR0]=0set FM0[FR0]=1227899986set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNBottle_Regeneration.blp"set FS0[FR0]=0set HE0=FR0set FR0=FR0+1set FJ0[FR0]=1227900758set FK0[FR0]=1227900977set FL0[FR0]=0set FM0[FR0]=1227900980set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNBottle_Haste.blp"set FS0[FR0]=0set HD0=FR0set FR0=FR0+1set FJ0[FR0]=1227899218set FK0[FR0]=1227900976set FL0[FR0]=0set FM0[FR0]=1227900982set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNBottle_DoubleDamage.blp"set FS0[FR0]=0set HC0=FR0set FR0=FR0+1set FJ0[FR0]=1227899217set FK0[FR0]=1227900762set FL0[FR0]=0set FM0[FR0]=1227900981set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNBottle_Invisibility.blp"set FS0[FR0]=0set HB0=FR0set FR0=FR0+1set FJ0[FR0]=1227900740set FK0[FR0]=1227900739set FL0[FR0]=1747990324set FM0[FR0]=1227900741set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNWand.blp"set FS0[FR0]=17set HG0=FR0set FR0=FR0+1set FJ0[FR0]=1227900995set FK0[FR0]=1227900994set FL0[FR0]=0set FM0[FR0]=1227900993set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNStarWand.blp"set FS0[FR0]=17set WM0=FR0set FR0=FR0+1set FJ0[FR0]=1227901012set FK0[FR0]=1227901010set FL0[FR0]=1747990359set FM0[FR0]=1227901014set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNOrcMeleeUpTwo.blp"set FS0[FR0]=5set HH0=FR0set FR0=FR0+1set FJ0[FR0]=1227901013set FK0[FR0]=1227901008set FL0[FR0]=0set FM0[FR0]=1227901015set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNOrcMeleeUpTwo.blp"set FS0[FR0]=5set HZ0=FR0set FR0=FR0+1set FJ0[FR0]=1227902516set FK0[FR0]=1227902515set FL0[FR0]=0set FM0[FR0]=1227902517set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNPoisonBlade.blp"set FS0[FR0]=30set HX0=FR0set FR0=FR0+1set FJ0[FR0]=1227902519set FK0[FR0]=1227902518set FL0[FR0]=0set FM0[FR0]=1227902520set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNPoisonBlade.blp"set FS0[FR0]=30set HY0=FR0set FR0=FR0+1set FJ0[FR0]=1227901495set FK0[FR0]=1227901494set FL0[FR0]=1747990579set FM0[FR0]=1227901496set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNAmulet.blp"set FS0[FR0]=0set HV0=FR0set FR0=FR0+1set FJ0[FR0]=1227901514set FK0[FR0]=1227901513set FL0[FR0]=1747990583set FM0[FR0]=1227901515set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNGreenStaff.blp"set FS0[FR0]=30set WP0=FR0set FR0=FR0+1set FJ0[FR0]=1227903033set FK0[FR0]=1227903042set FL0[FR0]=1747993929set FM0[FR0]=1227903041set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNPendantOfMana.blp"set FS0[FR0]=0set X40=FR0set FR0=FR0+1set FJ0[FR0]=1227903054set FK0[FR0]=1227903053set FL0[FR0]=0set FM0[FR0]=1227903055set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNPendantOfMana.blp"set FS0[FR0]=10set X50=FR0set FR0=FR0+1set FJ0[FR0]=1227903301set FK0[FR0]=1227903302set FL0[FR0]=0set FM0[FR0]=0set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNStone.blp"set FS0[FR0]=10set X60=FR0set FR0=FR0+1set FJ0[FR0]=1227903303set FK0[FR0]=1227903304set FL0[FR0]=0set FM0[FR0]=0set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNThunderLizardEgg.blp"set FS0[FR0]=10set X70=FR0set FR0=FR0+1set FJ0[FR0]=1227902273set FK0[FR0]=1227902265set FL0[FR0]=1747993421set FM0[FR0]=1227902274set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNOrbOfVenom.blp"set FS0[FR0]=0set FP0=FR0set FR0=FR0+1set FJ0[FR0]=1227902276set FK0[FR0]=1227902277set FL0[FR0]=0set FM0[FR0]=1227902275set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNOrbOfVenom.blp"set FS0[FR0]=0set FQ0=FR0set FR0=FR0+1set FJ0[FR0]=1227896119set FK0[FR0]=1227896131set FL0[FR0]=1747989057set FM0[FR0]=1227903288set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNAncientOfTheEarth.blp"set FS0[FR0]=0set ZI0=FR0set FR0=FR0+1set FJ0[FR0]=1227903287set FK0[FR0]=1227903286set FL0[FR0]=0set FM0[FR0]=1227903289set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNAncientOfTheEarth.blp"set FS0[FR0]=0set Z10=FR0set FR0=FR0+1set FJ0[FR0]=1227895858set FK0[FR0]=1227896132set FL0[FR0]=1747989048set FM0[FR0]=1227903065set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNLesserClarityPotion.blp"set FS0[FR0]=0set HQ0=FR0set FR0=FR0+1set FJ0[FR0]=1227901007set FK0[FR0]=1227901006set FL0[FR0]=1747990358set FM0[FR0]=0set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNVialFull.blp"set FS0[FR0]=0set HU0=FR0set FR0=FR0+1set FJ0[FR0]=1227896118set FK0[FR0]=1227896134set FL0[FR0]=1747989049set FM0[FR0]=1227903066set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNHealingSalve.blp"set FS0[FR0]=0set Z00=FR0set FR0=FR0+1set FJ0[FR0]=1227896120set FK0[FR0]=1227896135set FL0[FR0]=1747989059set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSentryWard.blp"set FS0[FR0]=0set ZO0=FR0set FR0=FR0+1set FJ0[FR0]=1227896121set FK0[FR0]=1227896136set FL0[FR0]=1747989060set FM0[FR0]=0set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNBlueSentryWard.blp"set FS0[FR0]=0set Z20=FR0set FR0=FR0+1set FJ0[FR0]=1227896129set FK0[FR0]=1227896137set FL0[FR0]=1747989061set FM0[FR0]=0set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNScrollUber.blp"set FS0[FR0]=0set Z30=FR0set FR0=FR0+1set FJ0[FR0]=1227896130set FK0[FR0]=1227896138set FL0[FR0]=1747989062set FM0[FR0]=0set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNCritterChicken.blp"set FS0[FR0]=0set Z40=FR0set FR0=FR0+1set FJ0[FR0]=1227899440set FK0[FR0]=1227899441set FL0[FR0]=0set FM0[FR0]=0set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNCheese.blp"set FS0[FR0]=0set Z50=FR0set FR0=FR0+1set FJ0[FR0]=1227900743set FK0[FR0]=1227900742set FL0[FR0]=1747990325set FM0[FR0]=0set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNPotionOfDivinity.blp"set FS0[FR0]=30set Z60=FR0set FR0=FR0+1set FJ0[FR0]=1227900745set FK0[FR0]=1227900744set FL0[FR0]=1747990326set FM0[FR0]=0set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNDustOfAppearance.blp"set FS0[FR0]=60set Z70=FR0set FR0=FR0+1set FJ0[FR0]=1227901780set FK0[FR0]=1227901779set FL0[FR0]=1747993145set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNWandOfManaSteal.blp"set FS0[FR0]=0set Z80=FR0set FR0=FR0+1set FJ0[FR0]=1227902534set FK0[FR0]=1227902535set FL0[FR0]=1747993651set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSmokePotion.blp"set FS0[FR0]=90set Z90=FR0set FR0=FR0+1set FJ0[FR0]=1227896369set FK0[FR0]=1227896370set FL0[FR0]=0set FM0[FR0]=1227895114set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNOrbOfFire.blp"set FS0[FR0]=0set ZA0=FR0set FR0=FR0+1set FJ0[FR0]=1227896372set FK0[FR0]=1227896371set FL0[FR0]=0set FM0[FR0]=1227895115set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Helmet_17.blp"set FS0[FR0]=0set ZB0=FR0set FR0=FR0+1set FJ0[FR0]=1227896373set FK0[FR0]=1227896374set FL0[FR0]=0set FM0[FR0]=1227895116set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNThoriumArmor.blp"set FS0[FR0]=25set ZC0=FR0set FR0=FR0+1set FJ0[FR0]=1227896376set FK0[FR0]=1227896375set FL0[FR0]=0set FM0[FR0]=1227895117set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNRingVioletSpider.tga"set FS0[FR0]=0set ZD0=FR0set FR0=FR0+1set FJ0[FR0]=1227896377set FK0[FR0]=1227896385set FL0[FR0]=0set FM0[FR0]=1227899702set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNRingVioletSpider.tga"set FS0[FR0]=0set ZE0=FR0set FR0=FR0+1set FJ0[FR0]=1227896387set FK0[FR0]=1227896386set FL0[FR0]=0set FM0[FR0]=1227895120set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNAbility_Rogue_Sprint.blp"set FS0[FR0]=60set ZF0=FR0set FR0=FR0+1set FJ0[FR0]=1227895631set FK0[FR0]=1227895380set FL0[FR0]=0set FM0[FR0]=1227895122set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNWirtsLegGreen.blp"set FS0[FR0]=0set ZG0=FR0set FR0=FR0+1set FJ0[FR0]=1227895381set FK0[FR0]=1227896153set FL0[FR0]=0set FM0[FR0]=1227895121set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNWirtsLeg.blp"set FS0[FR0]=0set ZH0=FR0set FR0=FR0+1set FJ0[FR0]=1227896368set FK0[FR0]=1227896154set FL0[FR0]=0set FM0[FR0]=1227895123set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNWirtsLegBlue.blp"set FS0[FR0]=0set ZZ0=FR0set FR0=FR0+1set FJ0[FR0]=1227896389set FK0[FR0]=1227896388set FL0[FR0]=0set FM0[FR0]=1227895124set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNGoldGloves.BLP"set FS0[FR0]=100set ZV0=FR0set FR0=FR0+1set FJ0[FR0]=1227902543set FK0[FR0]=1227902542set FL0[FR0]=0set FM0[FR0]=1227902544set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNGoldGloves.BLP"set FS0[FR0]=100set ZW0=FR0set FR0=FR0+1set FJ0[FR0]=1227896391set FK0[FR0]=1227896390set FL0[FR0]=0set FM0[FR0]=1227895125set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Mace_10.blp"set FS0[FR0]=0set ZX0=FR0set FR0=FR0+1set FJ0[FR0]=1227896393set FK0[FR0]=1227896392set FL0[FR0]=0set FM0[FR0]=1227895126set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNRunedBracers.blp"set FS0[FR0]=0set ZY0=FR0set FR0=FR0+1set FJ0[FR0]=1227896395set FK0[FR0]=1227896394set FL0[FR0]=0set FM0[FR0]=1227895127set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNRevenant.blp"set FS0[FR0]=0set ZJ0=FR0set FR0=FR0+1set FJ0[FR0]=1227896397set FK0[FR0]=1227896396set FL0[FR0]=0set FM0[FR0]=1227895128set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNTalisman.tga"set FS0[FR0]=0set ZK0=FR0set FR0=FR0+1set FJ0[FR0]=1227896902set FK0[FR0]=1227896903set FL0[FR0]=0set FM0[FR0]=1227895129set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Sword_10.blp"set FS0[FR0]=0set ZL0=FR0set FR0=FR0+1set FJ0[FR0]=1227896905set FK0[FR0]=1227896904set FL0[FR0]=0set FM0[FR0]=1227895130set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNJapaneseSword.BLP"set FS0[FR0]=0set ZM0=FR0set FR0=FR0+1set FJ0[FR0]=1227896906set FK0[FR0]=1227896907set FL0[FR0]=0set FM0[FR0]=1227895344set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Hammer_10.blp"set FS0[FR0]=0set ZN0=FR0set FR0=FR0+1set FJ0[FR0]=1227896909set FK0[FR0]=1227896908set FL0[FR0]=0set FM0[FR0]=1227899704set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Hammer_10.blp"set FS0[FR0]=0set ZS0=FR0set FR0=FR0+1set FJ0[FR0]=1227896910set FK0[FR0]=1227896911set FL0[FR0]=0set FM0[FR0]=1227895345set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Chest_Plate06.blp"set FS0[FR0]=17set ZT0=FR0set FR0=FR0+1set FJ0[FR0]=1227896913set FK0[FR0]=1227896912set FL0[FR0]=0set FM0[FR0]=1227895346set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNStormHammer.blp"set FS0[FR0]=0set ZR0=FR0set FR0=FR0+1set FJ0[FR0]=1227896915set FK0[FR0]=1227896914set FL0[FR0]=0set FM0[FR0]=1227895347set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Sword_11.blp"set FS0[FR0]=12set ZP0=FR0set FR0=FR0+1set FJ0[FR0]=1227901506set FK0[FR0]=1227901497set FL0[FR0]=0set FM0[FR0]=1227901508set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNDiffusal2.blp"set FS0[FR0]=12set ZQ0=FR0set FR0=FR0+1set FJ0[FR0]=1227900247set FK0[FR0]=1227900246set FL0[FR0]=0set FM0[FR0]=1227900248set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Sword_11.blp"set FS0[FR0]=0set ZU0=FR0set FR0=FR0+1set FJ0[FR0]=1227901507set FK0[FR0]=1227901505set FL0[FR0]=0set FM0[FR0]=1227901509set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNDiffusal2.blp"set FS0[FR0]=0set V00=FR0set FR0=FR0+1set FJ0[FR0]=1227896917set FK0[FR0]=1227896916set FL0[FR0]=0set FM0[FR0]=1227895348set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Helmet_13.blp"set FS0[FR0]=60set VI0=FR0set FR0=FR0+1set FJ0[FR0]=1227896919set FK0[FR0]=1227896918set FL0[FR0]=0set FM0[FR0]=1227899727set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Helmet_13.blp"set FS0[FR0]=0set V10=FR0set FR0=FR0+1set FJ0[FR0]=1227896920set FK0[FR0]=1227896921set FL0[FR0]=0set FM0[FR0]=1227895349set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNHelmOfValor.blp"set FS0[FR0]=22set VO0=FR0set FR0=FR0+1set FJ0[FR0]=1227897136set FK0[FR0]=1227896922set FL0[FR0]=0set FM0[FR0]=1227895350set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNStaffofpurification.blp"set FS0[FR0]=23set V20=FR0set FR0=FR0+1set FJ0[FR0]=1227897138set FK0[FR0]=1227897137set FL0[FR0]=0set FM0[FR0]=1227895351set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNPhilosophersStone.blp"set FS0[FR0]=0set V30=FR0set FR0=FR0+1set FJ0[FR0]=1227897140set FK0[FR0]=1227897139set FL0[FR0]=0set FM0[FR0]=1227895352set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSpellShieldAmulet.blp"set FS0[FR0]=45set V40=FR0set FR0=FR0+1set FJ0[FR0]=1227897142set FK0[FR0]=1227897141set FL0[FR0]=0set FM0[FR0]=1227895353set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSpell_Holy_BlessingOfStrength.blp"set FS0[FR0]=0set V50=FR0set FR0=FR0+1set FJ0[FR0]=1227897144set FK0[FR0]=1227897143set FL0[FR0]=0set FM0[FR0]=1227895361set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNAbility_Gouge.blp"set FS0[FR0]=0set V60=FR0set FR0=FR0+1set FJ0[FR0]=1227897153set FK0[FR0]=1227897145set FL0[FR0]=0set FM0[FR0]=1227895362set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_ThrowingAxe_06.blp"set FS0[FR0]=0set V70=FR0set FR0=FR0+1set FJ0[FR0]=1227897154set FK0[FR0]=1227897155set FL0[FR0]=0set FM0[FR0]=1227895363set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNThoriumMelee.blp"set FS0[FR0]=0set V80=FR0set FR0=FR0+1set FJ0[FR0]=1227900722set FK0[FR0]=1227900506set FL0[FR0]=0set FM0[FR0]=1227900728set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNRodOfNecromancy.blp"set FS0[FR0]=80set V90=FR0set FR0=FR0+1set FJ0[FR0]=1227900726set FK0[FR0]=1227900720set FL0[FR0]=0set FM0[FR0]=1227900729set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNRodOfNecromancy.blp"set FS0[FR0]=75set VA0=FR0set FR0=FR0+1set FJ0[FR0]=1227897157set FK0[FR0]=1227900505set FL0[FR0]=0set FM0[FR0]=1227900727set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNRodOfNecromancy.blp"set FS0[FR0]=70set VB0=FR0set FR0=FR0+1set FJ0[FR0]=1227900725set FK0[FR0]=1227900499set FL0[FR0]=0set FM0[FR0]=1227895364set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNRodOfNecromancy.blp"set FS0[FR0]=65set VC0=FR0set FR0=FR0+1set FJ0[FR0]=1227900723set FK0[FR0]=1227897156set FL0[FR0]=0set FM0[FR0]=1227900738set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNRodOfNecromancy.blp"set FS0[FR0]=60set VD0=FR0set FR0=FR0+1set FJ0[FR0]=1227900724set FK0[FR0]=1227900721set FL0[FR0]=0set FM0[FR0]=1227900737set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNRodOfNecromancy.blp"set FS0[FR0]=55set VE0=FR0set FR0=FR0+1set FJ0[FR0]=1227903030set FK0[FR0]=1227903032set FL0[FR0]=0set FM0[FR0]=1227903031set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNRodOfNecromancy.blp"set FS0[FR0]=50set VF0=FR0set FR0=FR0+1set FJ0[FR0]=1227899224set FK0[FR0]=1227899223set FL0[FR0]=0set FM0[FR0]=0set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNArcaniteArmor.blp"set FS0[FR0]=0set VG0=FR0set FR0=FR0+1set FJ0[FR0]=1227897159set FK0[FR0]=1227897158set FL0[FR0]=0set FM0[FR0]=1227895365set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_ThrowingAxe_02.blp"set FS0[FR0]=35set VH0=FR0set FR0=FR0+1set FJ0[FR0]=1227902294set FK0[FR0]=1227902293set FL0[FR0]=0set FM0[FR0]=1227902295set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_ThrowingAxe_02.blp"set FS0[FR0]=50set VZ0=FR0set FR0=FR0+1set FJ0[FR0]=1227897161set FK0[FR0]=1227897160set FL0[FR0]=0set FM0[FR0]=1227895366set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNLothars.BLP"set FS0[FR0]=22set VV0=FR0set FR0=FR0+1set FJ0[FR0]=1227897163set FK0[FR0]=1227897165set FL0[FR0]=0set FM0[FR0]=1227895111set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_06.blp"set FS0[FR0]=40set VW0=FR0set FR0=FR0+1set FJ0[FR0]=1227897162set FK0[FR0]=1227897168set FL0[FR0]=0set FM0[FR0]=1227895367set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_06.blp"set FS0[FR0]=36set VX0=FR0set FR0=FR0+1set FJ0[FR0]=1227897169set FK0[FR0]=1227897166set FL0[FR0]=0set FM0[FR0]=1227899971set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_06.blp"set FS0[FR0]=32set VY0=FR0set FR0=FR0+1set FJ0[FR0]=1227897171set FK0[FR0]=1227897167set FL0[FR0]=0set FM0[FR0]=1227899972set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_06.blp"set FS0[FR0]=28set VJ0=FR0set FR0=FR0+1set FJ0[FR0]=1227897170set FK0[FR0]=1227897164set FL0[FR0]=0set FM0[FR0]=1227899955set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_06.blp"set FS0[FR0]=24set VK0=FR0set FR0=FR0+1set FJ0[FR0]=1227897173set FK0[FR0]=1227897172set FL0[FR0]=0set FM0[FR0]=1227895368set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNNecromancerAdept.blp"set FS0[FR0]=95set VL0=FR0set FR0=FR0+1set FJ0[FR0]=1227897174set FK0[FR0]=1227897176set FL0[FR0]=0set FM0[FR0]=1227895369set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNBookOfTheDead.blp"set FS0[FR0]=95set VM0=FR0set FR0=FR0+1set FJ0[FR0]=1227897175set FK0[FR0]=1227897177set FL0[FR0]=0set FM0[FR0]=1227895370set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNNecromancerMaster.blp"set FS0[FR0]=95set VN0=FR0set FR0=FR0+1set FJ0[FR0]=1227899184set FK0[FR0]=1227897178set FL0[FR0]=0set FM0[FR0]=1227899471set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNOrb of Water.blp"set FS0[FR0]=0set VS0=FR0set FR0=FR0+1set FJ0[FR0]=1227901003set FK0[FR0]=1227901002set FL0[FR0]=0set FM0[FR0]=1227901004set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNOrb of Water.blp"set FS0[FR0]=0set VT0=FR0set FR0=FR0+1set FJ0[FR0]=1227899186set FK0[FR0]=1227899185set FL0[FR0]=0set FM0[FR0]=1227899472set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Sword_25.blp"set FS0[FR0]=0set VR0=FR0set FR0=FR0+1set FJ0[FR0]=1227902025set FK0[FR0]=1227902026set FL0[FR0]=0set FM0[FR0]=1227902027set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Sword_25.blp"set FS0[FR0]=0set VP0=FR0set FR0=FR0+1set FJ0[FR0]=1227899188set FK0[FR0]=1227899187set FL0[FR0]=0set FM0[FR0]=1227899473set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Weapon_Crossbow_10.blp"set FS0[FR0]=0set VQ0=FR0set FR0=FR0+1set FJ0[FR0]=1227899190set FK0[FR0]=1227899189set FL0[FR0]=0set FM0[FR0]=1227899474set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Weapon_Halberd_10.blp"set FS0[FR0]=0set VU0=FR0set FR0=FR0+1set FJ0[FR0]=1227901752set FK0[FR0]=1227901751set FL0[FR0]=0set FM0[FR0]=1227901753set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Weapon_Halberd_10.blp"set FS0[FR0]=0set W00=FR0set FR0=FR0+1set FJ0[FR0]=1227899191set FK0[FR0]=1227899192set FL0[FR0]=0set FM0[FR0]=1227899475set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNTransmute.blp"set FS0[FR0]=0set WI0=FR0set FR0=FR0+1set FJ0[FR0]=1227901777set FK0[FR0]=1227901776set FL0[FR0]=0set FM0[FR0]=1227901778set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNTransmute.blp"set FS0[FR0]=0set W10=FR0set FR0=FR0+1set FJ0[FR0]=1227899201set FK0[FR0]=1227899193set FL0[FR0]=0set FM0[FR0]=1227899476set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNHeartOfAszune.blp"set FS0[FR0]=0set WO0=FR0set FR0=FR0+1set FJ0[FR0]=1227899201set FK0[FR0]=1227901772set FM0[FR0]=1227901773set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNHeartOfAszune.blp"set FS0[FR0]=0set W20=FR0set FR0=FR0+1set FJ0[FR0]=1227899203set FK0[FR0]=1227899202set FL0[FR0]=0set FM0[FR0]=1227899477set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNHornOfDoom.blp"set FS0[FR0]=35set W30=FR0set FR0=FR0+1set FJ0[FR0]=1227899204set FK0[FR0]=1227899205set FL0[FR0]=0set FM0[FR0]=1227899478set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNIceShard.blp"set FS0[FR0]=0set W40=FR0set FR0=FR0+1set FJ0[FR0]=1227899207set FK0[FR0]=1227899206set FL0[FR0]=0set FM0[FR0]=1227899732set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNIceShard.blp"set FS0[FR0]=0set W50=FR0set FR0=FR0+1set FJ0[FR0]=1227899208set FK0[FR0]=1227899209set FL0[FR0]=0set FM0[FR0]=1227899479set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_ThrowingKnife_04.blp"set FS0[FR0]=0set W60=FR0set FR0=FR0+1set FJ0[FR0]=1227899448set FK0[FR0]=1227899225set FL0[FR0]=0set FM0[FR0]=1227894850set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set J10=FR0set FR0=FR0+1set FJ0[FR0]=1227899211set FK0[FR0]=1227899210set FL0[FR0]=0set FM0[FR0]=1227899480set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNHeartOfSearinox.blp"set FS0[FR0]=210set W70=FR0set FR0=FR0+1set FJ0[FR0]=1227896651set FK0[FR0]=1227899212set FL0[FR0]=0set FM0[FR0]=1227899481set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Sword_09.blp"set FS0[FR0]=35set W80=FR0set FR0=FR0+1set FJ0[FR0]=1227899458set FK0[FR0]=1227899457set FL0[FR0]=0set FM0[FR0]=1227899482set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNAdvancedUnholyArmor.blp"set FS0[FR0]=0set W90=FR0set FR0=FR0+1set FJ0[FR0]=1227902021set FK0[FR0]=1227902019set FL0[FR0]=0set FM0[FR0]=1227902020set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNAdvancedUnholyArmor.blp"set FS0[FR0]=0set WA0=FR0set FR0=FR0+1set FJ0[FR0]=1227899459set FK0[FR0]=1227899460set FL0[FR0]=0set FM0[FR0]=1227894851set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNArcaneRing.blp"set FS0[FR0]=33set WB0=FR0set FR0=FR0+1set FJ0[FR0]=1227899462set FK0[FR0]=1227899461set FM0[FR0]=1227899696set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNThunderMallet.blp"set FS0[FR0]=35set WC0=FR0set FR0=FR0+1set FJ0[FR0]=1227895092set FK0[FR0]=1227895108set FL0[FR0]=0set FM0[FR0]=0set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNRavenForm.blp"set FS0[FR0]=0set WD0=FR0set FR0=FR0+1set FJ0[FR0]=1227899464set FK0[FR0]=1227899463set FL0[FR0]=0set FM0[FR0]=1227899697set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNCloakOfFlames.blp"set FS0[FR0]=0set WE0=FR0set FR0=FR0+1set FJ0[FR0]=1227899465set FK0[FR0]=1227899466set FL0[FR0]=0set FM0[FR0]=1227899698set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Chest_Chain_14.blp"set FS0[FR0]=0set WF0=FR0set FR0=FR0+1set FJ0[FR0]=1227899468set FK0[FR0]=1227899467set FL0[FR0]=0set FM0[FR0]=1227899699set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Misc_Gem_Bloodstone_02.blp"set FS0[FR0]=300set WG0=FR0set FR0=FR0+1set FJ0[FR0]=1227899470set FK0[FR0]=1227899469set FL0[FR0]=0set FM0[FR0]=1227899700set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNHoodOfCunning.blp"set FS0[FR0]=0set WH0=FR0set FR0=FR0+1set FJ0[FR0]=1227894867set FK0[FR0]=1227894861set FL0[FR0]=0set FM0[FR0]=1227895107set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNImprovedUnholyStrength.blp"set FS0[FR0]=0set WZ0=FR0set FR0=FR0+1set FJ0[FR0]=1227894868set FK0[FR0]=1227894865set FL0[FR0]=0set FM0[FR0]=1227895109set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNUnholyStrength.blp"set FS0[FR0]=0set WV0=FR0set FR0=FR0+1set FJ0[FR0]=1227894870set FK0[FR0]=1227894862set FL0[FR0]=0set FM0[FR0]=1227895110set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNImprovedUnholyStrength.blp"set FS0[FR0]=0set WW0=FR0set FR0=FR0+1set FJ0[FR0]=1227894871set FK0[FR0]=1227894866set FL0[FR0]=0set FM0[FR0]=1227899973set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNUnholyStrength.blp"set FS0[FR0]=0set WX0=FR0set FR0=FR0+1set FJ0[FR0]=1227894872set FK0[FR0]=1227894874set FL0[FR0]=0set FM0[FR0]=1227899718set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNAdvancedMoonArmor.blp"set FS0[FR0]=30set WY0=FR0set FR0=FR0+1set FJ0[FR0]=1227894873set FK0[FR0]=1227895088set FL0[FR0]=0set FM0[FR0]=1227899974set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNAdvancedMoonArmor.blp"set FS0[FR0]=0set WJ0=FR0set FR0=FR0+1set FJ0[FR0]=1227895091set FK0[FR0]=1227895090set FL0[FR0]=0set FM0[FR0]=1227899714set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNStaffOfSilence.blp"set FS0[FR0]=18set WK0=FR0set FR0=FR0+1set FJ0[FR0]=1227900747set FK0[FR0]=1227900746set FL0[FR0]=0set FM0[FR0]=1227900748set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNPhaseBoots.blp"set FS0[FR0]=8set WL0=FR0set FR0=FR0+1set FJ0[FR0]=1227900999set FK0[FR0]=1227901001set FL0[FR0]=0set FM0[FR0]=1227901000set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNForceStaff.blp"set FS0[FR0]=20set WN0=FR0set FR0=FR0+1set FJ0[FR0]=1227901232set FK0[FR0]=1227901750set FL0[FR0]=0set FM0[FR0]=1227901234set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNPipeOfInsight.blp"set FS0[FR0]=25set WS0=FR0set FR0=FR0+1set FJ0[FR0]=1227901511set FK0[FR0]=1227901510set FL0[FR0]=0set FM0[FR0]=1227901512set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNImprovedUnholyArmor.blp"set FS0[FR0]=12set WT0=FR0set FR0=FR0+1set FJ0[FR0]=1227901764set FK0[FR0]=1227901766set FL0[FR0]=0set FM0[FR0]=1227901765set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNImprovedUnholyArmor.blp"set FS0[FR0]=12set WR0=FR0set FR0=FR0+1set FJ0[FR0]=1227901784set FK0[FR0]=1227901785set FL0[FR0]=0set FM0[FR0]=1227901786set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNUrnOfKelThuzad.blp"set FS0[FR0]=8set WQ0=FR0set FR0=FR0+1set FJ0[FR0]=1227902023set FK0[FR0]=1227902022set FL0[FR0]=0set FM0[FR0]=1227902024set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNUrnOfKelThuzad.blp"set FS0[FR0]=0set WU0=FR0set FR0=FR0+1set FJ0[FR0]=1227902032set FK0[FR0]=1227902028set FL0[FR0]=0set FM0[FR0]=1227902033set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSoulRing.blp"set FS0[FR0]=30set X00=FR0set FR0=FR0+1set FJ0[FR0]=1227902034set FK0[FR0]=1227902036set FL0[FR0]=0set FM0[FR0]=1227902035set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNGhostBlade.blp"set FS0[FR0]=30set HW0=FR0set FR0=FR0+1set FJ0[FR0]=1227902282set FK0[FR0]=1227902281set FL0[FR0]=0set FM0[FR0]=1227902283set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNArcaneBoots.blp"set FS0[FR0]=45set XI0=FR0set FR0=FR0+1set FJ0[FR0]=1227902513set FK0[FR0]=1227902512set FL0[FR0]=0set FM0[FR0]=1227902514set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNMedalionOfCourage.blp"set FS0[FR0]=7set X10=FR0set FR0=FR0+1set FJ0[FR0]=1227902532set FK0[FR0]=1227902533set FL0[FR0]=0set FM0[FR0]=1227902531set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNJanggo.blp"set FS0[FR0]=30set HJ0=FR0set FR0=FR0+1set FJ0[FR0]=1227902540set FK0[FR0]=1227902539set FL0[FR0]=0set FM0[FR0]=1227902541set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNJanggo.blp"set FS0[FR0]=0set HK0=FR0set FR0=FR0+1set FJ0[FR0]=1227902770set FK0[FR0]=1227902771set FL0[FR0]=0set FM0[FR0]=1227902772set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNBoneChimes.blp"set FS0[FR0]=30set XO0=FR0set FR0=FR0+1set FJ0[FR0]=1227902787set FK0[FR0]=1227902789set FL0[FR0]=0set FM0[FR0]=1227902788set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNBoneChimes.blp"set FS0[FR0]=30set HL0=FR0set FR0=FR0+1set FJ0[FR0]=1227902790set FK0[FR0]=1227902791set FL0[FR0]=0set FM0[FR0]=1227902792set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNTranquilBoots.blp"set FS0[FR0]=60set HM0=FR0set FR0=FR0+1set FJ0[FR0]=1227902794set FK0[FR0]=1227902793set FL0[FR0]=0set FM0[FR0]=1227902795set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNTranquilBoots.blp"set FS0[FR0]=60set HN0=FR0set FR0=FR0+1set FJ0[FR0]=1227902797set FK0[FR0]=1227902796set FL0[FR0]=0set FM0[FR0]=1227902798set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNWitchDoctorMaster.blp"set FS0[FR0]=10set HS0=FR0set FR0=FR0+1set FJ0[FR0]=1227902800set FK0[FR0]=1227902799set FL0[FR0]=0set FM0[FR0]=1227902801set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNPendantOfMana.blp"set FS0[FR0]=20set HT0=FR0set FR0=FR0+1set FJ0[FR0]=1227902805set FK0[FR0]=1227902806set FL0[FR0]=0set FM0[FR0]=1227902807set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNHalberd.blp"set FS0[FR0]=30set X20=FR0set FR0=FR0+1set FJ0[FR0]=1227902809set FK0[FR0]=1227902808set FL0[FR0]=0set FM0[FR0]=1227902810set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNAnnihilator.blp"set FS0[FR0]=60set X30=FR0set FR0=FR0+1set FJ0[FR0]=1227903024set FK0[FR0]=1227903025set FL0[FR0]=0set FM0[FR0]=1227903026set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNRingJadeFalcon.blp"set FS0[FR0]=0set HR0=FR0set FR0=FR0+1set FJ0[FR0]=1227903027set FK0[FR0]=1227903028set FL0[FR0]=0set FM0[FR0]=1227903029set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNRingJadeFalcon.blp"set FS0[FR0]=0set HP0=FR0set FR0=FR0+1set FJ0[FR0]=1227903305set FK0[FR0]=1227903306set FL0[FR0]=0set FM0[FR0]=1227903307set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Weapon_Halberd_10.blp"set FS0[FR0]=0set X80=FR0set FR0=FR0+1set FJ0[FR0]=0set FK0[FR0]=0set FL0[FR0]=1747989063set FN0[FR0]=""set FS0[FR0]=0set FR0=FR0+1set FJ0[FR0]=0set FK0[FR0]=0set FL0[FR0]=1747990582set FN0[FR0]=""set FS0[FR0]=0set FR0=FR0+1set FJ0[FR0]=1227896140set FK0[FR0]=1227896146set FL0[FR0]=1747989064set FM0[FR0]=1227899987set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set X90=FR0set FR0=FR0+1set FJ0[FR0]=1227896141set FK0[FR0]=1227896147set FL0[FR0]=1747989065set FM0[FR0]=1227899988set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set XA0=FR0set FR0=FR0+1set FJ0[FR0]=0set FK0[FR0]=0set FL0[FR0]=1747989066set FN0[FR0]=""set FS0[FR0]=0set FR0=FR0+1set FJ0[FR0]=1227896143set FK0[FR0]=1227896148set FL0[FR0]=1747989067set FM0[FR0]=1227899989set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set XB0=FR0set FR0=FR0+1set FL0[FR0]=1747988788set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set XC0=FR0set FR0=FR0+1set FJ0[FR0]=1227896144set FK0[FR0]=1227896149set FL0[FR0]=1747989068set FM0[FR0]=1227899991set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set XD0=FR0set FR0=FR0+1set FJ0[FR0]=0set FK0[FR0]=0set FL0[FR0]=1747989069set FN0[FR0]=""set FS0[FR0]=0set FR0=FR0+1set FJ0[FR0]=1227896139set FK0[FR0]=1227896150set FL0[FR0]=1747989070set FM0[FR0]=1227899992set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set XE0=FR0set FR0=FR0+1set FJ0[FR0]=1227896142set FK0[FR0]=1227896151set FL0[FR0]=1747989071set FM0[FR0]=1227899993set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set XF0=FR0set FR0=FR0+1set FJ0[FR0]=1227896145set FK0[FR0]=1227896152set FL0[FR0]=1747989072set FM0[FR0]=1227899994set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set XG0=FR0set FR0=FR0+1set FJ0[FR0]=1227896398set FK0[FR0]=1227896399set FL0[FR0]=1747989073set FM0[FR0]=1227900208set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set XH0=FR0set FR0=FR0+1set FJ0[FR0]=1227896401set FK0[FR0]=1227896400set FL0[FR0]=1747989074set FM0[FR0]=1227900209set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set XZ0=FR0set FR0=FR0+1set FJ0[FR0]=1227896402set FK0[FR0]=1227896403set FL0[FR0]=1747989075set FM0[FR0]=1227900210set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set XV0=FR0set FR0=FR0+1set FJ0[FR0]=0set FK0[FR0]=0set FL0[FR0]=1747989076set FN0[FR0]=""set FS0[FR0]=0set FR0=FR0+1set FJ0[FR0]=1227896407set FK0[FR0]=1227896406set FL0[FR0]=1747989077set FM0[FR0]=1227900212set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set XW0=FR0set FR0=FR0+1set FJ0[FR0]=1227896408set FK0[FR0]=1227896409set FL0[FR0]=1747989078set FM0[FR0]=1227900213set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set XX0=FR0set FR0=FR0+1set FJ0[FR0]=0set FK0[FR0]=0set FL0[FR0]=1747989079set FN0[FR0]=""set FS0[FR0]=0set FR0=FR0+1set FJ0[FR0]=1227896624set FK0[FR0]=1227896410set FL0[FR0]=1747989080set FM0[FR0]=1227900214set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set XY0=FR0set FR0=FR0+1set FJ0[FR0]=1227896625set FK0[FR0]=1227896626set FL0[FR0]=1747989081set FM0[FR0]=1227900215set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set XJ0=FR0set FR0=FR0+1set FJ0[FR0]=0set FK0[FR0]=0set FL0[FR0]=1747989082set FN0[FR0]=""set FS0[FR0]=0set FR0=FR0+1set FJ0[FR0]=1227896628set FK0[FR0]=1227896627set FL0[FR0]=1747989296set FM0[FR0]=1227900216set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set XK0=FR0set FR0=FR0+1set FL0[FR0]=1747989297set FN0[FR0]=""set FS0[FR0]=0set XL0=FR0set FR0=FR0+1set FJ0[FR0]=1227896630set FK0[FR0]=1227896662set FL0[FR0]=1747989298set FM0[FR0]=1227900225set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set XM0=FR0set FR0=FR0+1set FJ0[FR0]=0set FK0[FR0]=0set FL0[FR0]=1747989299set FN0[FR0]=""set FS0[FR0]=0set FR0=FR0+1set FJ0[FR0]=1227896631set FK0[FR0]=1227896663set FL0[FR0]=1747989300set FM0[FR0]=1227900226set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set XN0=FR0set FR0=FR0+1set FJ0[FR0]=1227896632set FK0[FR0]=1227896664set FL0[FR0]=1747989301set FM0[FR0]=1227900227set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set XS0=FR0set FR0=FR0+1set FJ0[FR0]=1227896633set FK0[FR0]=1227896665set FL0[FR0]=1747989302set FM0[FR0]=1227900228set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set XT0=FR0set FR0=FR0+1set FJ0[FR0]=1227896641set FK0[FR0]=1227896666set FL0[FR0]=0set FM0[FR0]=1227900229set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set XR0=FR0set FR0=FR0+1set FJ0[FR0]=1227896642set FK0[FR0]=1227896880set FL0[FR0]=1747989304set FM0[FR0]=1227900230set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set XP0=FR0set FR0=FR0+1set FJ0[FR0]=1227896643set FK0[FR0]=1227896881set FL0[FR0]=1747989305set FM0[FR0]=1227900231set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set XQ0=FR0set FR0=FR0+1set FJ0[FR0]=1227896644set FK0[FR0]=1227896882set FL0[FR0]=1747989313set FM0[FR0]=1227900232set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set XU0=FR0set FR0=FR0+1set FJ0[FR0]=0set FK0[FR0]=0set FL0[FR0]=1747989315set FN0[FR0]=""set FS0[FR0]=0set FR0=FR0+1set FJ0[FR0]=1227896645set FK0[FR0]=1227896883set FL0[FR0]=1747989316set FM0[FR0]=1227900233set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set Y00=FR0set FR0=FR0+1set FJ0[FR0]=0set FK0[FR0]=0set FL0[FR0]=1747989317set FN0[FR0]=""set FS0[FR0]=0set FR0=FR0+1set FJ0[FR0]=1227896647set FK0[FR0]=1227896646set FL0[FR0]=1747989318set FM0[FR0]=1227900234set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set YI0=FR0set FR0=FR0+1set FJ0[FR0]=1227896648set FK0[FR0]=1227896884set FL0[FR0]=1747989319set FM0[FR0]=1227900235set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set Y10=FR0set FR0=FR0+1set FJ0[FR0]=1227896655set FK0[FR0]=1227896885set FL0[FR0]=1747989320set FM0[FR0]=1227900236set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set YO0=FR0set FR0=FR0+1set FL0[FR0]=1747989321set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set Y20=FR0set FR0=FR0+1set FL0[FR0]=1747989322set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set Y30=FR0set FR0=FR0+1set FJ0[FR0]=0set FK0[FR0]=0set FL0[FR0]=1747989323set FM0[FR0]=0set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set YE0=FR0set FR0=FR0+1set FJ0[FR0]=1227896650set FK0[FR0]=1227896888set FL0[FR0]=1747989324set FM0[FR0]=1227900239set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set Y40=FR0set FR0=FR0+1set FJ0[FR0]=0set FK0[FR0]=0set FL0[FR0]=1747989325set FN0[FR0]=""set FS0[FR0]=0set FR0=FR0+1set FJ0[FR0]=0set FK0[FR0]=0set FL0[FR0]=1747989326set FN0[FR0]=""set FS0[FR0]=0set FR0=FR0+1set FJ0[FR0]=1227896653set FK0[FR0]=1227896889set FL0[FR0]=1747989327set FM0[FR0]=1227900240set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set Y50=FR0set FR0=FR0+1set FJ0[FR0]=1227896656set FK0[FR0]=1227896897set FL0[FR0]=1747989329set FM0[FR0]=1227900241set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set Y60=FR0set FR0=FR0+1set FJ0[FR0]=1227896657set FK0[FR0]=1227896898set FL0[FR0]=1747989330set FM0[FR0]=1227900242set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set Y70=FR0set FR0=FR0+1set FJ0[FR0]=1227896658set FK0[FR0]=1227896899set FL0[FR0]=1747989331set FM0[FR0]=1227900243set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set Y80=FR0set FR0=FR0+1set FJ0[FR0]=0set FK0[FR0]=0set FL0[FR0]=1747989332set FN0[FR0]=""set FS0[FR0]=0set FR0=FR0+1set FJ0[FR0]=0set FK0[FR0]=0set FL0[FR0]=1747989333set FN0[FR0]=""set FS0[FR0]=0set FR0=FR0+1set FJ0[FR0]=1227896659set FK0[FR0]=1227896900set FL0[FR0]=1747989334set FM0[FR0]=1227900244set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set Y90=FR0set FR0=FR0+1set FJ0[FR0]=1227896660set FK0[FR0]=1227896901set FL0[FR0]=1747989335set FM0[FR0]=1227900245set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set YA0=FR0set FR0=FR0+1set FJ0[FR0]=0set FK0[FR0]=0set FL0[FR0]=1747990329set FN0[FR0]=""set FS0[FR0]=0set FR0=FR0+1set FJ0[FR0]=1227900984set FK0[FR0]=1227900983set FL0[FR0]=1747990355set FM0[FR0]=1227900985set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set YB0=FR0set FR0=FR0+1set FJ0[FR0]=1227900996set FK0[FR0]=1227900998set FL0[FR0]=1747990356set FM0[FR0]=1227900997set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set YC0=FR0set FR0=FR0+1set FJ0[FR0]=1227903044set FK0[FR0]=1227903045set FL0[FR0]=0set FM0[FR0]=1227903046set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set YL0=FR0set FR0=FR0+1set FJ0[FR0]=1227901016set FK0[FR0]=1227901018set FL0[FR0]=1747990360set FM0[FR0]=1227901017set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set YD0=FR0set FR0=FR0+1set FJ0[FR0]=1227896652set FK0[FR0]=1227901774set FL0[FR0]=1747989328set FM0[FR0]=1227901775set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set YF0=FR0set FR0=FR0+1set FJ0[FR0]=1227901783set FK0[FR0]=1227901782set FL0[FR0]=1747993153set FM0[FR0]=1227901781set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set YG0=FR0set FR0=FR0+1set FJ0[FR0]=1227902029set FK0[FR0]=1227902030set FL0[FR0]=1747993169set FM0[FR0]=1227902031set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set YH0=FR0set FR0=FR0+1set FJ0[FR0]=0set FK0[FR0]=0set FL0[FR0]=0set FM0[FR0]=0set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set YZ0=FR0set FR0=FR0+1set FJ0[FR0]=1227902521set FK0[FR0]=1227902529set FL0[FR0]=1747993649set FM0[FR0]=1227902530set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set YV0=FR0set FR0=FR0+1set FJ0[FR0]=1227902536set FK0[FR0]=1227902537set FL0[FR0]=1747993433set FM0[FR0]=1227902538set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set YW0=FR0set FR0=FR0+1set FJ0[FR0]=1227902773set FK0[FR0]=1227902774set FL0[FR0]=1747993668set FM0[FR0]=1227902775set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set YX0=FR0set FR0=FR0+1set FJ0[FR0]=1227902786set FK0[FR0]=1227902785set FL0[FR0]=1747989336set FM0[FR0]=1227902777set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"set FS0[FR0]=0set YY0=FR0set FR0=FR0+1set FJ0[FR0]=0set FK0[FR0]=0set FL0[FR0]=1747993684set FN0[FR0]=""set FS0[FR0]=0set YJ0=FR0set FR0=FR0+1set FJ0[FR0]=0set FK0[FR0]=0set FL0[FR0]=1747993685set FN0[FR0]=""set FS0[FR0]=0set YK0=FR0set FR0=FR0+1set FJ0[FR0]=0set FK0[FR0]=0set FL0[FR0]=1747993913set FN0[FR0]=""set FS0[FR0]=0set FR0=FR0+1set FJ0[FR0]=0set FK0[FR0]=0set FL0[FR0]=1747993921set FN0[FR0]=""set FS0[FR0]=0set FR0=FR0+1set FJ0[FR0]=0set FK0[FR0]=0set FL0[FR0]=1747993923set FN0[FR0]=""set FS0[FR0]=0set M80=CreateRegion()call RegionAddRect(M80,VB)call RegionAddRect(M80,WB)set t=CreateTrigger()call TriggerAddCondition(t,Condition(function A1O))set YM0=tset t=nullset JI0=JI0+1set YS0[JI0]=GS0set YT0[JI0]=H40set J00[JI0]=ZA0set JI0=JI0+1set YS0[JI0]=GR0set YT0[JI0]=GF0set YR0[JI0]=X90set J00[JI0]=ZB0set JI0=JI0+1set YS0[JI0]=G50set YT0[JI0]=GF0set YR0[JI0]=XA0set J00[JI0]=ZC0set JI0=JI0+1set YS0[JI0]=GT0set YT0[JI0]=H00set J00[JI0]=ZD0set JI0=JI0+1set YS0[JI0]=FU0set YT0[JI0]=XB0set J00[JI0]=ZF0set JI0=JI0+1set YS0[JI0]=FU0set YT0[JI0]=GI0set YR0[JI0]=G00set J00[JI0]=ZG0set JI0=JI0+1set YS0[JI0]=FU0set YT0[JI0]=GO0set YR0[JI0]=G00set J00[JI0]=ZH0set JI0=JI0+1set YS0[JI0]=FU0set YT0[JI0]=GP0set YR0[JI0]=G00set J00[JI0]=ZZ0set JI0=JI0+1set YS0[JI0]=G00set YT0[JI0]=XD0set J00[JI0]=ZV0set JI0=JI0+1set YS0[JI0]=GN0set YT0[JI0]=GP0set YR0[JI0]=H00set J00[JI0]=ZX0set JI0=JI0+1set YS0[JI0]=G10set YT0[JI0]=GA0set YR0[JI0]=XE0set J00[JI0]=ZY0set JI0=JI0+1set YS0[JI0]=G10set YT0[JI0]=GU0set YR0[JI0]=XF0set J00[JI0]=ZJ0set JI0=JI0+1set YS0[JI0]=G10set YT0[JI0]=GZ0set YR0[JI0]=XG0set J00[JI0]=ZK0set JI0=JI0+1set YS0[JI0]=G20set YT0[JI0]=GI0set YR0[JI0]=XH0set J00[JI0]=ZL0set JI0=JI0+1set YS0[JI0]=GJ0set YT0[JI0]=GO0set YR0[JI0]=XZ0set J00[JI0]=ZM0set JI0=JI0+1set YS0[JI0]=H50set YT0[JI0]=GO0set YR0[JI0]=XV0set J00[JI0]=ZN0set JI0=JI0+1set YS0[JI0]=G40set YT0[JI0]=G50set YR0[JI0]=GP0set J00[JI0]=ZT0set JI0=JI0+1set YS0[JI0]=GX0set YT0[JI0]=G00set YR0[JI0]=XW0set J00[JI0]=ZR0set JI0=JI0+1set YS0[JI0]=G20set YT0[JI0]=G20set YR0[JI0]=GP0set YP0[JI0]=XX0set J00[JI0]=ZP0set JI0=JI0+1set YS0[JI0]=ZP0set YT0[JI0]=XX0set J00[JI0]=ZQ0set JI0=JI0+1set YS0[JI0]=ZU0set YT0[JI0]=XX0set J00[JI0]=ZQ0set JI0=JI0+1set YS0[JI0]=GD0set YT0[JI0]=GV0set J00[JI0]=VI0set JI0=JI0+1set YS0[JI0]=GV0set YT0[JI0]=XY0set J00[JI0]=VO0set JI0=JI0+1set YS0[JI0]=H00set YT0[JI0]=HI0set YR0[JI0]=H40set YP0[JI0]=XJ0set J00[JI0]=V20set JI0=JI0+1set YS0[JI0]=GM0set YT0[JI0]=G90set YR0[JI0]=H30set J00[JI0]=V30set JI0=JI0+1set YS0[JI0]=ZB0set YT0[JI0]=ZC0set YR0[JI0]=XK0set J00[JI0]=V40set JI0=JI0+1set YS0[JI0]=ZM0set YT0[JI0]=ZL0set J00[JI0]=V50set JI0=JI0+1set YS0[JI0]=GX0set YT0[JI0]=GX0set YR0[JI0]=XM0set J00[JI0]=V60set JI0=JI0+1set YS0[JI0]=ZA0set YT0[JI0]=G40set YR0[JI0]=G60set J00[JI0]=V70set JI0=JI0+1set YS0[JI0]=G30set YT0[JI0]=G40set YR0[JI0]=XN0set J00[JI0]=V80set JI0=JI0+1set YS0[JI0]=GX0set YT0[JI0]=GJ0set YR0[JI0]=XS0set J00[JI0]=V90set JI0=JI0+1set YS0[JI0]=ZL0set YT0[JI0]=H20set YR0[JI0]=XT0set J00[JI0]=VZ0set JI0=JI0+1set YS0[JI0]=G60set YT0[JI0]=X40set J00[JI0]=VV0set JI0=JI0+1set YS0[JI0]=HI0set YT0[JI0]=ZK0set YR0[JI0]=XP0set J00[JI0]=VW0set JI0=JI0+1set YS0[JI0]=VW0set YT0[JI0]=XP0set J00[JI0]=VX0set JI0=JI0+1set YS0[JI0]=VX0set YT0[JI0]=XP0set J00[JI0]=VY0set JI0=JI0+1set YS0[JI0]=VY0set YT0[JI0]=XP0set J00[JI0]=VJ0set JI0=JI0+1set YS0[JI0]=VJ0set YT0[JI0]=XP0set J00[JI0]=VK0set JI0=JI0+1set YS0[JI0]=HI0set YT0[JI0]=GO0set YR0[JI0]=XQ0set J00[JI0]=VL0set JI0=JI0+1set YS0[JI0]=VL0set YT0[JI0]=XQ0set J00[JI0]=VM0set JI0=JI0+1set YS0[JI0]=VM0set YT0[JI0]=XQ0set J00[JI0]=VN0set JI0=JI0+1set YS0[JI0]=H20set YT0[JI0]=ZA0set YR0[JI0]=XU0set J00[JI0]=VS0set JI0=JI0+1set YS0[JI0]=G70set YT0[JI0]=GQ0set J00[JI0]=VR0set JI0=JI0+1set YS0[JI0]=V80set YT0[JI0]=G70set YR0[JI0]=Y00set J00[JI0]=VQ0set JI0=JI0+1set YS0[JI0]=G70set YT0[JI0]=H50set YR0[JI0]=H50set J00[JI0]=VU0set JI0=JI0+1set YS0[JI0]=GQ0set YT0[JI0]=YI0set J00[JI0]=WI0set JI0=JI0+1set YS0[JI0]=GW0set YT0[JI0]=H30set YR0[JI0]=Y10set J00[JI0]=WO0set JI0=JI0+1set YS0[JI0]=GW0set YT0[JI0]=VI0set YR0[JI0]=YO0set J00[JI0]=W30set JI0=JI0+1set YS0[JI0]=GW0set YT0[JI0]=V10set YR0[JI0]=YO0set J00[JI0]=W30set JI0=JI0+1set YS0[JI0]=H20set YT0[JI0]=H20set YR0[JI0]=GM0set YP0[JI0]=FP0set J00[JI0]=W40set JI0=JI0+1set YS0[JI0]=H20set YT0[JI0]=H20set YR0[JI0]=GM0set YP0[JI0]=FQ0set J00[JI0]=W40set JI0=JI0+1set YS0[JI0]=G80set YT0[JI0]=GN0set YR0[JI0]=HV0set J00[JI0]=W60set JI0=JI0+1set YS0[JI0]=H00set YT0[JI0]=G50set YR0[JI0]=YW0set J00[JI0]=X10set JI0=JI0+1set YS0[JI0]=GM0set YT0[JI0]=GJ0set YR0[JI0]=G20set YP0[JI0]=HI0set J00[JI0]=J10set JI0=JI0+1set YS0[JI0]=ZA0set YT0[JI0]=ZX0set YR0[JI0]=Y40set J00[JI0]=W70set JI0=JI0+1set YS0[JI0]=H20set YT0[JI0]=GY0set YR0[JI0]=H40set J00[JI0]=W80set JI0=JI0+1set YS0[JI0]=H30set YT0[JI0]=GS0set YR0[JI0]=H10set J00[JI0]=W90set JI0=JI0+1set YS0[JI0]=H30set YT0[JI0]=GS0set YR0[JI0]=HO0set J00[JI0]=W90set JI0=JI0+1set YS0[JI0]=G90set YT0[JI0]=GT0set YR0[JI0]=Y50set J00[JI0]=WB0set JI0=JI0+1set YS0[JI0]=GE0set YT0[JI0]=ZR0set YR0[JI0]=YF0set J00[JI0]=WC0set JI0=JI0+1set YS0[JI0]=Z40set YR0[JI0]=Y60set J00[JI0]=WD0set JI0=JI0+1set YS0[JI0]=GR0set YT0[JI0]=ZD0set YR0[JI0]=GV0set YP0[JI0]=Y70set J00[JI0]=WE0set JI0=JI0+1set YS0[JI0]=GR0set YT0[JI0]=ZE0set YR0[JI0]=GV0set YP0[JI0]=Y70set J00[JI0]=WE0set JI0=JI0+1set YS0[JI0]=GE0set YT0[JI0]=GL0set YR0[JI0]=G50set YP0[JI0]=Y80set J00[JI0]=WF0set JI0=JI0+1set YS0[JI0]=V30set YT0[JI0]=ZA0set J00[JI0]=WG0set JI0=JI0+1set YS0[JI0]=GR0set YT0[JI0]=GR0set YR0[JI0]=GS0set YP0[JI0]=GK0set J00[JI0]=WH0set JI0=JI0+1set YS0[JI0]=G00set YT0[JI0]=GD0set YR0[JI0]=G30set YP0[JI0]=Y90set J00[JI0]=WX0set JI0=JI0+1set YS0[JI0]=GY0set YT0[JI0]=GL0set YR0[JI0]=YA0set J00[JI0]=WY0set JI0=JI0+1set YS0[JI0]=ZX0set YT0[JI0]=ZX0set YR0[JI0]=YY0set J00[JI0]=WK0set JI0=JI0+1set YS0[JI0]=FU0set YT0[JI0]=G30set YR0[JI0]=G30set J00[JI0]=WL0set JI0=JI0+1set YS0[JI0]=HG0set YT0[JI0]=GF0set YR0[JI0]=GF0set YP0[JI0]=GF0set YQ0[JI0]=YB0set J00[JI0]=WM0set JI0=JI0+1set YS0[JI0]=HI0set YT0[JI0]=GR0set YR0[JI0]=YC0set J00[JI0]=WN0set JI0=JI0+1set YS0[JI0]=WH0set YT0[JI0]=ZB0set YR0[JI0]=YD0set J00[JI0]=WS0set JI0=JI0+1set YS0[JI0]=H10set YT0[JI0]=GU0set YR0[JI0]=GU0set J00[JI0]=WT0set JI0=JI0+1set YS0[JI0]=HO0set YT0[JI0]=GU0set YR0[JI0]=GU0set J00[JI0]=WT0set JI0=JI0+1set YS0[JI0]=H00set YT0[JI0]=GA0set YR0[JI0]=GA0set YP0[JI0]=YG0set J00[JI0]=WQ0set JI0=JI0+1set YS0[JI0]=H00set YT0[JI0]=GR0set YR0[JI0]=YH0set J00[JI0]=X00set JI0=JI0+1set YS0[JI0]=G80set YT0[JI0]=WP0set J00[JI0]=HW0set JI0=JI0+1set YS0[JI0]=FU0set YT0[JI0]=G90set J00[JI0]=XI0set JI0=JI0+1set YS0[JI0]=GP0set YT0[JI0]=ZY0set YR0[JI0]=YV0set J00[JI0]=HJ0set JI0=JI0+1set YS0[JI0]=HJ0set YT0[JI0]=YV0set J00[JI0]=HJ0set JI0=JI0+1set YS0[JI0]=HK0set YT0[JI0]=YV0set J00[JI0]=HJ0set JI0=JI0+1set YS0[JI0]=GD0set YT0[JI0]=ZK0set YR0[JI0]=YX0set J00[JI0]=XO0set JI0=JI0+1set YS0[JI0]=FU0set YT0[JI0]=GT0set YR0[JI0]=GR0set J00[JI0]=HM0set JI0=JI0+1set YS0[JI0]=HI0set YT0[JI0]=HI0set YR0[JI0]=H30set J00[JI0]=HS0set JI0=JI0+1set YS0[JI0]=ZM0set YT0[JI0]=HV0set J00[JI0]=X20set JI0=JI0+1set YS0[JI0]=ZN0set YT0[JI0]=GQ0set J00[JI0]=X30set JI0=JI0+1set YS0[JI0]=ZJ0set YT0[JI0]=ZD0set J00[JI0]=HR0set JI0=JI0+1set YS0[JI0]=ZJ0set YT0[JI0]=ZE0set J00[JI0]=HP0set JI0=JI0+1set YS0[JI0]=X60set YT0[JI0]=X60set YR0[JI0]=X60set YP0[JI0]=X60set YQ0[JI0]=X60set YU0[JI0]=X60set J00[JI0]=X70set FR0=FR0+1set FJ0[FR0]=1227899226set FK0[FR0]=1227895089set FL0[FR0]=0set FM0[FR0]=1227900249set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JO0=FR0set FR0=FR0+1set FJ0[FR0]=1227894854set FK0[FR0]=1227894852set FL0[FR0]=0set FM0[FR0]=1227900250set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set J20=FR0set FR0=FR0+1set FJ0[FR0]=1227895096set FK0[FR0]=1227894841set FL0[FR0]=0set FM0[FR0]=1227900464set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set J30=FR0set FR0=FR0+1set FJ0[FR0]=1227895097set FK0[FR0]=1227894837set FL0[FR0]=0set FM0[FR0]=1227900470set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set J40=FR0set FR0=FR0+1set FJ0[FR0]=1227895105set FK0[FR0]=1227894855set FL0[FR0]=0set FM0[FR0]=1227900465set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set J50=FR0set FR0=FR0+1set FJ0[FR0]=1227895106set FK0[FR0]=1227894836set FL0[FR0]=0set FM0[FR0]=1227900466set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set J60=FR0set FR0=FR0+1set FJ0[FR0]=1227895112set FK0[FR0]=1227894835set FL0[FR0]=0set FM0[FR0]=1227900467set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set J70=FR0set FR0=FR0+1set FJ0[FR0]=1227895113set FK0[FR0]=1227894834set FL0[FR0]=0set FM0[FR0]=1227900469set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set J80=FR0set FR0=FR0+1set FJ0[FR0]=1227895371set FK0[FR0]=1227894833set FL0[FR0]=0set FM0[FR0]=1227900468set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set J90=FR0set FR0=FR0+1set FJ0[FR0]=1227895372set FK0[FR0]=1227894857set FL0[FR0]=0set FM0[FR0]=1227900485set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JA0=FR0set FR0=FR0+1set FJ0[FR0]=1227899442set FK0[FR0]=1227894856set FL0[FR0]=0set FM0[FR0]=1227900473set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JC0=FR0set FR0=FR0+1set FJ0[FR0]=1227899443set FK0[FR0]=1227894864set FL0[FR0]=0set FM0[FR0]=1227900481set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JD0=FR0set FR0=FR0+1set FJ0[FR0]=1227899444set FK0[FR0]=1227894869set FL0[FR0]=0set FM0[FR0]=1227900471set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JE0=FR0set FR0=FR0+1set FJ0[FR0]=1227899447set FK0[FR0]=1227894832set FL0[FR0]=0set FM0[FR0]=1227900484set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JF0=FR0set FR0=FR0+1set FJ0[FR0]=1227899446set FK0[FR0]=1227895094set FL0[FR0]=0set FM0[FR0]=1227900483set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JG0=FR0set FR0=FR0+1set FJ0[FR0]=1227899445set FK0[FR0]=1227895095set FL0[FR0]=0set FM0[FR0]=1227900482set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JH0=FR0set FR0=FR0+1set FJ0[FR0]=1227899449set FK0[FR0]=1227894863set FL0[FR0]=0set FM0[FR0]=1227900472set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JZ0=FR0set FR0=FR0+1set FJ0[FR0]=1227901493set FK0[FR0]=1227901268set FL0[FR0]=0set FM0[FR0]=1227901258set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JV0=FR0set FR0=FR0+1set FJ0[FR0]=1227901270set FK0[FR0]=1227901269set FL0[FR0]=0set FM0[FR0]=1227901241set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JW0=FR0set FR0=FR0+1set FJ0[FR0]=1227901271set FK0[FR0]=1227901267set FL0[FR0]=0set FM0[FR0]=1227901257set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JX0=FR0set FR0=FR0+1set FJ0[FR0]=1227901272set FK0[FR0]=1227901266set FL0[FR0]=0set FM0[FR0]=1227901249set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JY0=FR0set FR0=FR0+1set FJ0[FR0]=1227901273set FK0[FR0]=1227901265set FL0[FR0]=0set FM0[FR0]=1227901256set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JJ0=FR0set FR0=FR0+1set FJ0[FR0]=1227901274set FK0[FR0]=1227901259set FL0[FR0]=0set FM0[FR0]=1227901255set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JK0=FR0set FR0=FR0+1set FJ0[FR0]=1227901488set FK0[FR0]=1227901260set FL0[FR0]=0set FM0[FR0]=1227901254set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JL0=FR0set FR0=FR0+1set FJ0[FR0]=1227901489set FK0[FR0]=1227901261set FL0[FR0]=0set FM0[FR0]=1227901253set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JM0=FR0set FR0=FR0+1set FJ0[FR0]=1227901490set FK0[FR0]=1227901264set FL0[FR0]=0set FM0[FR0]=1227901252set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JN0=FR0set FR0=FR0+1set FJ0[FR0]=1227901491set FK0[FR0]=1227901263set FL0[FR0]=0set FM0[FR0]=1227901251set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JS0=FR0set FR0=FR0+1set FJ0[FR0]=1227901492set FK0[FR0]=1227901262set FL0[FR0]=0set FM0[FR0]=1227901250set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JT0=FR0set FR0=FR0+1set FJ0[FR0]=1227901238set FK0[FR0]=1227901239set FL0[FR0]=0set FM0[FR0]=1227901240set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JR0=FR0set FR0=FR0+1set FJ0[FR0]=1227901530set FK0[FR0]=1227901523set FL0[FR0]=0set FM0[FR0]=1227901522set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JP0=FR0set FR0=FR0+1set FJ0[FR0]=1227901744set FK0[FR0]=1227901524set FL0[FR0]=0set FM0[FR0]=1227901516set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JQ0=FR0set FR0=FR0+1set FJ0[FR0]=1227901745set FK0[FR0]=1227901525set FL0[FR0]=0set FM0[FR0]=1227901517set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JU0=FR0set FR0=FR0+1set FJ0[FR0]=1227901746set FK0[FR0]=1227901527set FL0[FR0]=0set FM0[FR0]=1227901518set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set K00=FR0set FR0=FR0+1set FJ0[FR0]=1227901747set FK0[FR0]=1227901526set FL0[FR0]=0set FM0[FR0]=1227901521set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KI0=FR0set FR0=FR0+1set FJ0[FR0]=1227901748set FK0[FR0]=1227901529set FL0[FR0]=0set FM0[FR0]=1227901520set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set K10=FR0set FR0=FR0+1set FJ0[FR0]=1227901749set FK0[FR0]=1227901528set FL0[FR0]=0set FM0[FR0]=1227901519set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KO0=FR0set FR0=FR0+1set FJ0[FR0]=1227901769set FK0[FR0]=1227901768set FL0[FR0]=0set FM0[FR0]=1227901770set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set K20=FR0set FR0=FR0+1set FJ0[FR0]=1227902004set FK0[FR0]=1227902005set FL0[FR0]=0set FM0[FR0]=1227902008set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set JB0=FR0set FR0=FR0+1set FJ0[FR0]=1227902003set FK0[FR0]=1227902000set FL0[FR0]=0set FM0[FR0]=1227902009set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set K30=FR0set FR0=FR0+1set FJ0[FR0]=1227902002set FK0[FR0]=1227902007set FL0[FR0]=0set FM0[FR0]=1227902017set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set K40=FR0set FR0=FR0+1set FJ0[FR0]=1227902037set FK0[FR0]=1227902038set FL0[FR0]=0set FM0[FR0]=1227902039set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set K50=FR0set FR0=FR0+1set FJ0[FR0]=1227902257set FK0[FR0]=1227902256set FL0[FR0]=0set FM0[FR0]=1227902258set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set K60=FR0set FR0=FR0+1set FJ0[FR0]=1227902261set FK0[FR0]=1227902260set FL0[FR0]=0set FM0[FR0]=1227902259set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set K70=FR0set FR0=FR0+1set FJ0[FR0]=1227902262set FK0[FR0]=1227902263set FL0[FR0]=0set FM0[FR0]=1227902264set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set K80=FR0set FR0=FR0+1set FJ0[FR0]=1227902278set FK0[FR0]=1227902279set FL0[FR0]=0set FM0[FR0]=1227902280set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set K90=FR0set FR0=FR0+1set FJ0[FR0]=1227902285set FK0[FR0]=1227902284set FL0[FR0]=0set FM0[FR0]=1227902286set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KA0=FR0set FR0=FR0+1set FJ0[FR0]=1227902287set FK0[FR0]=1227902288set FL0[FR0]=0set FM0[FR0]=1227902289set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KB0=FR0set FR0=FR0+1set FJ0[FR0]=1227902545set FK0[FR0]=1227902546set FL0[FR0]=0set FM0[FR0]=1227902547set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KC0=FR0set FR0=FR0+1set FJ0[FR0]=1227902548set FK0[FR0]=1227902549set FL0[FR0]=0set FM0[FR0]=1227902550set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KD0=FR0set FR0=FR0+1set FJ0[FR0]=1227902551set FK0[FR0]=1227902552set FL0[FR0]=0set FM0[FR0]=1227902553set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KE0=FR0set FR0=FR0+1set FJ0[FR0]=1227902554set FK0[FR0]=1227902768set FL0[FR0]=0set FM0[FR0]=1227902769set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KF0=FR0set FR0=FR0+1set FJ0[FR0]=1227902802set FK0[FR0]=1227902803set FL0[FR0]=0set FM0[FR0]=1227902804set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KG0=FR0set FR0=FR0+1set FJ0[FR0]=1227903047set FK0[FR0]=1227903048set FL0[FR0]=0set FM0[FR0]=1227903049set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KH0=FR0set FR0=FR0+1set FJ0[FR0]=1227903050set FK0[FR0]=1227903051set FL0[FR0]=0set FM0[FR0]=1227903052set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KZ0=FR0set FR0=FR0+1set FJ0[FR0]=1227903056set FK0[FR0]=1227903057set FL0[FR0]=0set FM0[FR0]=1227903058set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KV0=FR0set FR0=FR0+1set FJ0[FR0]=1227903059set FK0[FR0]=1227903060set FL0[FR0]=0set FM0[FR0]=1227903061set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KW0=FR0set FR0=FR0+1set FJ0[FR0]=1227903062set FK0[FR0]=1227903063set FL0[FR0]=0set FM0[FR0]=1227903064set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KX0=FR0set FR0=FR0+1set FJ0[FR0]=1227903280set FK0[FR0]=1227903282set FL0[FR0]=0set FM0[FR0]=1227903284set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KJ0=FR0set FR0=FR0+1set FJ0[FR0]=1227903281set FK0[FR0]=1227903283set FL0[FR0]=0set FM0[FR0]=1227903285set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KY0=FR0set FR0=FR0+1set FJ0[FR0]=1227903308set FK0[FR0]=1227903309set FL0[FR0]=0set FM0[FR0]=1227903310set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KK0=FR0set FR0=FR0+1set FJ0[FR0]=1227903311set FK0[FR0]=1227903312set FL0[FR0]=0set FM0[FR0]=1227903313set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp"set FS0[FR0]=60set KL0=FR0set FR0=FR0+1set FJ0[FR0]=1227895617set FK0[FR0]=1227896113set FL0[FR0]=1747990603set FM0[FR0]=1227899961set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSteelArmor.blp"set FS0[FR0]=0set FT0[FR0]=H10set FR0=FR0+1set FJ0[FR0]=1227895641set FK0[FR0]=1227896114set FL0[FR0]=1747990616set FM0[FR0]=1227899705set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNOrbofSlowness.blp"set FS0[FR0]=0set FT0[FR0]=H20set FR0=FR0+1set FJ0[FR0]=1227895379set FK0[FR0]=1227895376set FL0[FR0]=1747990611set FM0[FR0]=1227899713set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNGlove.blp"set FS0[FR0]=0set FT0[FR0]=G00set FR0=FR0+1set FJ0[FR0]=1227895374set FK0[FR0]=1227895378set FL0[FR0]=1747990608set FM0[FR0]=1227899731set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNBoots.blp"set FS0[FR0]=0set FT0[FR0]=GI0set FR0=FR0+1set FJ0[FR0]=1227895386set FK0[FR0]=1227895859set FL0[FR0]=1747990609set FM0[FR0]=1227899734set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNBelt.blp"set FS0[FR0]=0set FT0[FR0]=GO0set FR0=FR0+1set FJ0[FR0]=1227895601set FK0[FR0]=1227895861set FL0[FR0]=1747990612set FM0[FR0]=1227899957set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNClawsOfAttack.blp"set FS0[FR0]=0set FT0[FR0]=G30set FR0=FR0+1set FJ0[FR0]=1227895618set FK0[FR0]=1227895877set FL0[FR0]=1747990606set FM0[FR0]=1227899969set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNHelmutPurple.blp"set FS0[FR0]=0set FT0[FR0]=GD0set FR0=FR0+1set FJ0[FR0]=1227895621set FK0[FR0]=1227895880set FL0[FR0]=1747990615set FM0[FR0]=1227899703set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNDaggerOfEscape.blp"set FS0[FR0]=18set FT0[FR0]=GG0set FR0=FR0+1set FJ0[FR0]=1227895623set FK0[FR0]=1227895883set FL0[FR0]=1747990607set FM0[FR0]=1227899716set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNUndeadShrine.blp"set FS0[FR0]=0set FT0[FR0]=GV0set FR0=FR0+1set FJ0[FR0]=1227895632set FK0[FR0]=1227895891set FL0[FR0]=1747990613set FM0[FR0]=1227899737set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNAlleriaFlute.blp"set FS0[FR0]=0set FT0[FR0]=GN0set FR0=FR0+1set FJ0[FR0]=1227895633set FK0[FR0]=1227895892set FL0[FR0]=1747990599set FM0[FR0]=1227899977set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNGoldRing.blp"set FS0[FR0]=0set FT0[FR0]=GS0set FR0=FR0+1set FJ0[FR0]=1227895635set FK0[FR0]=1227895894set FL0[FR0]=1747990604set FM0[FR0]=1227899978set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNRingSkull.blp"set FS0[FR0]=0set FT0[FR0]=GR0set FR0=FR0+1set FJ0[FR0]=1227895636set FK0[FR0]=1227895895set FL0[FR0]=1747990610set FM0[FR0]=1227899728set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNRobeOfTheMagi.blp"set FS0[FR0]=0set FT0[FR0]=GP0set FR0=FR0+1set FJ0[FR0]=1227895638set FK0[FR0]=1227895897set FL0[FR0]=1747990597set FM0[FR0]=1227899701set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSlippersOfAgility.blp"set FS0[FR0]=0set FT0[FR0]=GU0set FR0=FR0+1set FJ0[FR0]=1227895639set FK0[FR0]=1227895898set FL0[FR0]=1747990602set FM0[FR0]=1227899979set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNSobiMask.blp"set FS0[FR0]=0set FT0[FR0]=H00set FR0=FR0+1set FJ0[FR0]=1227900740set FK0[FR0]=1227900739set FL0[FR0]=1747990601set FM0[FR0]=1227900741set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNWand.blp"set FS0[FR0]=0set FT0[FR0]=HG0set FR0=FR0+1set FJ0[FR0]=1227901012set FK0[FR0]=1227901010set FL0[FR0]=1747990598set FM0[FR0]=1227901015set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNOrcMeleeUpTwo.blp"set FS0[FR0]=0set FT0[FR0]=HH0set FR0=FR0+1set FJ0[FR0]=1227901495set FK0[FR0]=1227901494set FL0[FR0]=1747990614set FM0[FR0]=1227901496set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNAmulet.blp"set FS0[FR0]=0set FT0[FR0]=HV0set FR0=FR0+1set FJ0[FR0]=1227895628set FK0[FR0]=1227895888set FL0[FR0]=1747990605set FM0[FR0]=1227899717set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Misc_Cape_08.blp"set FS0[FR0]=0set FT0[FR0]=GK0set FR0=FR0+1set FJ0[FR0]=1227896129set FK0[FR0]=1227896137set FL0[FR0]=1747990600set FM0[FR0]=0set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNScrollUber.blp"set FS0[FR0]=0set FT0[FR0]=Z30set FR0=FR0+1set FJ0[FR0]=1227895607set FK0[FR0]=1227895874set FL0[FR0]=1747990835set FM0[FR0]=1227899730set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNEnchantedGemstone.blp"set FS0[FR0]=0set FT0[FR0]=G90set FR0=FR0+1set FJ0[FR0]=1227895377set FK0[FR0]=1227895375set FL0[FR0]=1747993167set FM0[FR0]=1227894849set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNINV_Misc_Cape_08.blp"set FS0[FR0]=0set FT0[FR0]=FU0set FR0=FR0+1set FJ0[FR0]=1227902273set FK0[FR0]=1227902265set FL0[FR0]=1747993422set FM0[FR0]=1227902274set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNOrbOfVenom.blp"set FS0[FR0]=0set FT0[FR0]=FP0set FR0=FR0+1set FJ0[FR0]=1227895603set FK0[FR0]=1227895863set FL0[FR0]=1747993648set FM0[FR0]=1227899959set FN0[FR0]="ReplaceableTextures\\CommandButtons\\BTNGlove.blp"set FS0[FR0]=0set FT0[FR0]=G50set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SELL)call TriggerAddCondition(t,Condition(function CGO))set t=nullset t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)call Q9I(t,EVENT_PLAYER_UNIT_DROP_ITEM)call Q9I(t,EVENT_PLAYER_UNIT_PAWN_ITEM)call TriggerAddCondition(t,Condition(function D9O))set L30=tset t=nullset t=CreateTrigger()call TriggerAddCondition(t,Condition(function DBO))call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)set t=nullset t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)call Q9I(t,EVENT_PLAYER_UNIT_DROP_ITEM)call Q9I(t,EVENT_PLAYER_UNIT_PAWN_ITEM)call TriggerAddCondition(t,Condition(function DLO))set LG0=tset t=nullset t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_USE_ITEM)call TriggerAddCondition(t,Condition(function DTO))set LH0=tset t=CreateTrigger()call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function DNO))set t=nullset t=CreateTrigger()call QBI(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function E1O))set t=nullset t=CreateTrigger()call QBI(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)call QBI(t,EVENT_PLAYER_UNIT_DROP_ITEM)call TriggerAddCondition(t,Condition(function E4O))set LX0=tset t=nullset t=CreateTrigger()set t=CreateTrigger()call QBI(t,EVENT_PLAYER_UNIT_DEATH)call TriggerAddAction(t,function EBO)call TriggerAddCondition(t,Condition(function E7O))set t=CreateTrigger()call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function EFO))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SUMMON)call TriggerAddAction(t,function EJO)call TriggerAddCondition(t,Condition(function EVO))set t=CreateTrigger()call TriggerRegisterTimerEvent(t,0.33,true)call TriggerAddCondition(t,Condition(function FDO))set t=nullset t=CreateTrigger()call TriggerRegisterTimerEvent(t,0.75,true)call TriggerAddCondition(t,Condition(function FZO))set t=nullcall SetPlayerAbilityAvailable(BO[1],1093744436,false)call SetPlayerAbilityAvailable(BO[2],1093744436,false)call SetPlayerAbilityAvailable(BO[3],1093744436,false)call SetPlayerAbilityAvailable(BO[4],1093744436,false)call SetPlayerAbilityAvailable(BO[5],1093744436,false)call SetPlayerAbilityAvailable(CO[1],1093744436,false)call SetPlayerAbilityAvailable(CO[2],1093744436,false)call SetPlayerAbilityAvailable(CO[3],1093744436,false)call SetPlayerAbilityAvailable(CO[4],1093744436,false)call SetPlayerAbilityAvailable(CO[5],1093744436,false)set t=CreateTrigger()call QBI(t,EVENT_PLAYER_UNIT_DEATH)call TriggerAddCondition(t,Condition(function G8O))set t=nullset t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)call TriggerAddCondition(t,Condition(function GBO))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_DROP_ITEM)call TriggerAddCondition(t,Condition(function GAO))set t=nullset t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)call Q9I(t,EVENT_PLAYER_UNIT_DROP_ITEM)call TriggerAddCondition(t,Condition(function GEO))set t=nullset t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)call TriggerAddCondition(t,Condition(function GXO))set LP0[0]=1093817936set LP0[1]=1093817937set LP0[2]=1093817938set LP0[3]=1093817939set LP0[4]=1093817940set t=nullset t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)call Q9I(t,EVENT_PLAYER_UNIT_SUMMON)call TriggerAddCondition(t,Condition(function GMO))set t=nullset t=CreateTrigger()call TriggerRegisterTimerEvent(t,0.5,true)call TriggerAddCondition(t,Condition(function HOO))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function H4O))set t=nullset t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function H8O))set t=nullset t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)call TriggerAddCondition(t,Condition(function ZKO))set t=nullcall YBO()call SetAltMinimapIcon("war3mapImported\\black.blp")set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SUMMON)call TriggerAddCondition(t,Condition(function J1O))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function YQO))set t=nullset t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function KCO))call SetPlayerAbilityAvailable(BO[1],1093752406,false)call SetPlayerAbilityAvailable(BO[2],1093752406,false)call SetPlayerAbilityAvailable(BO[3],1093752406,false)call SetPlayerAbilityAvailable(BO[4],1093752406,false)call SetPlayerAbilityAvailable(BO[5],1093752406,false)call SetPlayerAbilityAvailable(CO[1],1093752406,false)call SetPlayerAbilityAvailable(CO[2],1093752406,false)call SetPlayerAbilityAvailable(CO[3],1093752406,false)call SetPlayerAbilityAvailable(CO[4],1093752406,false)call SetPlayerAbilityAvailable(CO[5],1093752406,false)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_USE_ITEM)call TriggerAddCondition(t,Condition(function KTO))set t=nullset t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_DEATH)call TriggerAddAction(t,function KQO)call TriggerAddCondition(t,Condition(function KPO))set O4O=GetRectCenter(P4)set N0=CreateUnitAtLoc(Player(12),1848651852,O4O,bj_UNIT_FACING)call SetUnitAcquireRange(N0,150)call IRO(N0)call RemoveLocation(O4O)call UnitAddItem(N0,CreateItem(FK0[VG0],0,0))call UnitAddAbility(N0,1093743666)set O4O=GetRectCenter(H4)call RemoveUnit(CreateUnitAtLoc(DO,1966092337,O4O,0))call RemoveLocation(O4O)set O4O=GetRectCenter(Z4)call RemoveUnit(CreateUnitAtLoc(DO,1966092337,O4O,0))call RemoveLocation(O4O)set O4O=GetRectCenter(V4)call RemoveUnit(CreateUnitAtLoc(DO,1966092337,O4O,0))call RemoveLocation(O4O)set O4O=GetRectCenter(W4)call RemoveUnit(CreateUnitAtLoc(DO,1966092337,O4O,0))call RemoveLocation(O4O)set O4O=GetRectCenter(X4)call RemoveUnit(CreateUnitAtLoc(DO,1966092337,O4O,0))call RemoveLocation(O4O)set O4O=GetRectCenter(Y4)call RemoveUnit(CreateUnitAtLoc(DO,1966092337,O4O,0))call RemoveLocation(O4O)set O4O=GetRectCenter(J4)call RemoveUnit(CreateUnitAtLoc(DO,1966092337,O4O,0))call RemoveLocation(O4O)set O4O=GetRectCenter(K4)call RemoveUnit(CreateUnitAtLoc(DO,1966092337,O4O,0))call RemoveLocation(O4O)set O4O=GetRectCenter(L4)call RemoveUnit(CreateUnitAtLoc(DO,1966092337,O4O,0))call RemoveLocation(O4O)set O4O=GetRectCenter(M4)call RemoveUnit(CreateUnitAtLoc(DO,1966092337,O4O,0))call RemoveLocation(O4O)set O4O=GetRectCenter(V5)call RemoveUnit(CreateUnitAtLoc(DO,1966092337,O4O,0))call RemoveLocation(O4O)set O4O=GetRectCenter(X5)call RemoveUnit(CreateUnitAtLoc(DO,1966092337,O4O,0))call RemoveLocation(O4O)set t=CreateTrigger()call TriggerRegisterUnitInRange(t,OZ,300,Condition(function Q8I))call TriggerRegisterUnitInRange(t,EZ,300,Condition(function Q8I))call TriggerRegisterUnitInRange(t,UH,300,Condition(function Q8I))call TriggerAddCondition(t,Condition(function LIO))set t=nullset CG=CreateTrigger()call TriggerAddAction(CG,function LOO)set DG=CreateTrigger()call TriggerAddAction(DG,function L3O)set t=CreateTrigger()set L7O=CreateRegion()call RegionAddRect(L7O,C4)call TriggerRegisterEnterRegion(t,L7O,Condition(function Q8I))set L7O=CreateRegion()call RegionAddRect(L7O,P3)call TriggerRegisterEnterRegion(t,L7O,Condition(function Q8I))set L7O=CreateRegion()call RegionAddRect(L7O,SA)call TriggerRegisterEnterRegion(t,L7O,Condition(function Q8I))call TriggerAddCondition(t,Condition(function L5O))set t=nullset L7O=nullset t=CreateTrigger()set L7O=CreateRegion()call RegionAddRect(L7O,U3)call TriggerRegisterEnterRegion(t,L7O,Condition(function Q8I))set L7O=CreateRegion()call RegionAddRect(L7O,M3)call TriggerRegisterEnterRegion(t,L7O,Condition(function Q8I))set L7O=CreateRegion()call RegionAddRect(L7O,KA)call TriggerRegisterEnterRegion(t,L7O,Condition(function Q8I))call TriggerAddCondition(t,Condition(function L8O))set t=nullset L7O=nullset t=CreateTrigger()set L7O=CreateRegion()call RegionAddRect(L7O,B4)call TriggerRegisterEnterRegion(t,L7O,Condition(function Q8I))set L7O=CreateRegion()call RegionAddRect(L7O,R3)call TriggerRegisterEnterRegion(t,L7O,Condition(function Q8I))set L7O=CreateRegion()call RegionAddRect(L7O,TA)call TriggerRegisterEnterRegion(t,L7O,Condition(function Q8I))call TriggerAddCondition(t,Condition(function LAO))set t=nullset L7O=nullset t=CreateTrigger()set L7O=CreateRegion()call RegionAddRect(L7O,I4)call TriggerRegisterEnterRegion(t,L7O,Condition(function Q8I))set L7O=CreateRegion()call RegionAddRect(L7O,N3)call TriggerRegisterEnterRegion(t,L7O,Condition(function Q8I))set L7O=CreateRegion()call RegionAddRect(L7O,LA)call TriggerRegisterEnterRegion(t,L7O,Condition(function Q8I))call TriggerAddCondition(t,Condition(function LCO))set t=nullset L7O=nullset t=CreateTrigger()set L7O=CreateRegion()call RegionAddRect(L7O,T3)call TriggerRegisterEnterRegion(t,L7O,Condition(function Q8I))set L7O=CreateRegion()call RegionAddRect(L7O,A4)call TriggerRegisterEnterRegion(t,L7O,Condition(function Q8I))set L7O=CreateRegion()call RegionAddRect(L7O,NA)call TriggerRegisterEnterRegion(t,L7O,Condition(function Q8I))call TriggerAddCondition(t,Condition(function LEO))set t=nullset L7O=nullset t=CreateTrigger()set L7O=CreateRegion()call RegionAddRect(L7O,Q3)call TriggerRegisterEnterRegion(t,L7O,Condition(function Q8I))set L7O=CreateRegion()call RegionAddRect(L7O,L3)call TriggerRegisterEnterRegion(t,L7O,Condition(function Q8I))set L7O=CreateRegion()call RegionAddRect(L7O,MA)call TriggerRegisterEnterRegion(t,L7O,Condition(function Q8I))call TriggerAddCondition(t,Condition(function LGO))set t=nullset L7O=nullset EG=CreateTrigger()call TriggerAddAction(EG,function LUO)set FG=CreateTrigger()call TriggerRegisterUnitEvent(FG,IG0,EVENT_UNIT_DEATH)call TriggerAddAction(FG,function M1O)set GG=CreateTrigger()call TriggerRegisterUnitEvent(GG,IH0,EVENT_UNIT_DEATH)call TriggerAddAction(GG,function M2O)set HG=CreateTrigger()call TriggerRegisterUnitEvent(HG,IZ0,EVENT_UNIT_DEATH)call TriggerAddAction(HG,function M4O)set ZG=CreateTrigger()call TriggerRegisterUnitEvent(ZG,ID0,EVENT_UNIT_DEATH)call TriggerAddAction(ZG,function M6O)set VG=CreateTrigger()call TriggerRegisterUnitEvent(VG,IE0,EVENT_UNIT_DEATH)call TriggerAddAction(VG,function M8O)set WG=CreateTrigger()call TriggerRegisterUnitEvent(WG,IF0,EVENT_UNIT_DEATH)call TriggerAddAction(WG,function MAO)set XG=CreateTrigger()call TriggerRegisterUnitEvent(XG,C60,EVENT_UNIT_DEATH)call TriggerAddAction(XG,function MCO)set YG=CreateTrigger()call TriggerRegisterUnitEvent(YG,C70,EVENT_UNIT_DEATH)call TriggerAddAction(YG,function MEO)set JG=CreateTrigger()call TriggerRegisterUnitEvent(JG,C80,EVENT_UNIT_DEATH)call TriggerAddAction(JG,function MGO)set KG=CreateTrigger()call TriggerRegisterUnitEvent(KG,C30,EVENT_UNIT_DEATH)call TriggerAddAction(KG,function MZO)set LG=CreateTrigger()call TriggerRegisterUnitEvent(LG,C40,EVENT_UNIT_DEATH)call TriggerAddAction(LG,function MWO)set MG=CreateTrigger()call TriggerRegisterUnitEvent(MG,C50,EVENT_UNIT_DEATH)call TriggerAddAction(MG,function MYO)set t=CreateTrigger()call TriggerRegisterUnitEvent(t,IO0,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function MKO))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,BN0,EVENT_UNIT_DAMAGED)call TriggerAddCondition(t,Condition(function MMO))set t=nullset NG=CreateTrigger()call Q9I(NG,EVENT_PLAYER_UNIT_DEATH)call TriggerAddCondition(NG,Condition(function MSO))call TriggerAddAction(NG,function MTO)set SG=CreateTrigger()call Q9I(SG,EVENT_PLAYER_UNIT_DEATH)call TriggerAddCondition(SG,Condition(function MPO))call TriggerAddAction(SG,function MQO)set TG=CreateTrigger()call TriggerAddAction(TG,function N0O)set RG=CreateTrigger()call TriggerRegisterTimerEventSingle(RG,75.00)call TriggerAddAction(RG,function N1O)set PG=CreateTrigger()call TriggerAddCondition(PG,Condition(function S6O))set QG=CreateTrigger()call TriggerAddAction(QG,function S8O)set UG=CreateTrigger()call TriggerAddAction(UG,function SDO)set IH=CreateTrigger()call Q9I(IH,EVENT_PLAYER_UNIT_DEATH)call TriggerAddCondition(IH,Condition(function SFO))call TriggerAddAction(IH,function SGO)set OH=CreateTrigger()call Q9I(OH,EVENT_PLAYER_UNIT_DEATH)call TriggerAddCondition(OH,Condition(function SZO))call TriggerAddAction(OH,function SVO)set BH=CreateTrigger()call TriggerRegisterTimerEventPeriodic(BH,1.00)call TriggerAddAction(BH,function SKO)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SELECTED)call TriggerAddCondition(t,Condition(function RYO))set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_DESELECTED)call TriggerAddCondition(t,Condition(function RXO))set t=nullif GetRandomInt(0,10)<11 thenset t=CreateTrigger()set d=GetRandomReal(60,90)call TriggerRegisterTimerEvent(t,d,false)set t=nullendifset t=CreateTrigger()call TriggerRegisterUnitEvent(t,I50,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,I50,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function P9O))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,I60,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,I60,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function PAO))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,I70,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,I70,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function PBO))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,I80,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,I80,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function PCO))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,I90,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,I90,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function PDO))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,IA0,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,IA0,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function PEO))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,IB0,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,IB0,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function PFO))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,IC0,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,IC0,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function PGO))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,ID0,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,ID0,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function PHO))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,IE0,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,IE0,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function PZO))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,IF0,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,IF0,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function PVO))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,IG0,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,IG0,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function PWO))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,IH0,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,IH0,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function PXO))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,IZ0,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,IZ0,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function PYO))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,IO0,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,IO0,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function PJO))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,BP0,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,BP0,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function RRO))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,BQ0,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,BQ0,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function RPO))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,BU0,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,BU0,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function RQO))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,C00,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,C00,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function RUO))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,CI0,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,CI0,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function P0O))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,C10,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,C10,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function PIO))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,CO0,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,CO0,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function P1O))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,C20,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,C20,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function POO))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,C30,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,C30,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function P2O))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,C40,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,C40,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function P3O))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,C50,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,C50,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function P4O))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,C60,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,C60,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function P5O))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,C70,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,C70,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function P6O))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,C80,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,C80,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function P7O))set t=CreateTrigger()call TriggerRegisterUnitEvent(t,BN0,EVENT_UNIT_DAMAGED)call TriggerRegisterUnitEvent(t,BN0,EVENT_UNIT_DEATH)call TriggerAddCondition(t,Condition(function P8O))set t=CreateTrigger()call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function RNO))set t=nullset t=CreateTrigger()call TriggerRegisterTimerEvent(t,5,true)call TriggerAddCondition(t,Condition(function PUO))set t=nullset t=CreateTrigger()call TriggerRegisterTimerEvent(t,4,true)call TriggerAddCondition(t,Condition(function Q5O))set t=nullset T90=MDI()set t=CreateTrigger()set L7O=CreateRegion()call RegionAddRect(L7O,bj_mapInitialPlayableArea)call TriggerRegisterEnterRegion(t,L7O,Condition(function LWI))call TriggerAddCondition(t,Condition(function QAO))set t=nullset L7O=nullset t=CreateTrigger()call TriggerAddCondition(t,Condition(function QCO))call TriggerRegisterTimerEvent(t,5,true)set t=nullcall DestroyFogModifier(CreateFogModifierRadius(BO[0],FOG_OF_WAR_VISIBLE,-4550,1250,300,true,true))call DestroyFogModifier(CreateFogModifierRadius(CO[0],FOG_OF_WAR_VISIBLE,-4550,1250,300,true,true))call DestroyFogModifier(CreateFogModifierRadius(BO[0],FOG_OF_WAR_VISIBLE,3200,1,300,true,true))call DestroyFogModifier(CreateFogModifierRadius(CO[0],FOG_OF_WAR_VISIBLE,3200,1,300,true,true))call DestroyFogModifier(CreateFogModifierRadius(BO[0],FOG_OF_WAR_VISIBLE,-7292,4186,450,true,true))call DestroyFogModifier(CreateFogModifierRadius(CO[0],FOG_OF_WAR_VISIBLE,-7292,4186,450,true,true))call DestroyFogModifier(CreateFogModifierRadius(BO[0],FOG_OF_WAR_VISIBLE,7348,-4334,450,true,true))call DestroyFogModifier(CreateFogModifierRadius(CO[0],FOG_OF_WAR_VISIBLE,7348,-4334,450,true,true))call DestroyFogModifier(CreateFogModifierRect(BO[0],FOG_OF_WAR_VISIBLE,YS,true,true))call DestroyFogModifier(CreateFogModifierRect(CO[0],FOG_OF_WAR_VISIBLE,YS,true,true))set t=CreateTrigger()call TriggerRegisterTimerEvent(t,3.5,true)call TriggerAddCondition(t,Condition(function QKO))set t=nullset MK=CreateTrigger()call TriggerRegisterUnitEvent(MK,BN0,EVENT_UNIT_DEATH)call TriggerAddAction(MK,function QUO)set NK=CreateTrigger()call TriggerRegisterUnitEvent(NK,IO0,EVENT_UNIT_DEATH)call TriggerAddAction(NK,function QPO)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_ATTACKED)call TriggerAddCondition(t,Condition(function UOO))set t=nullset t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_CAST)call TriggerAddCondition(t,Condition(function U3O))set t=nullset t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_DEATH)call TriggerAddAction(t,function U5O)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function U9O))set t=nullset TW0=CreateTrigger()call TriggerAddAction(TW0,function UEO)set t=CreateTrigger()call TriggerRegisterPlayerUnitEvent(t,DO,EVENT_PLAYER_UNIT_ATTACKED,Condition(function LWI))call TriggerAddCondition(t,Condition(function UGO))set t=nullset TX0=CreateRegion()call RegionAddRect(TX0,M5)call RegionAddRect(TX0,N5)call RegionAddRect(TX0,S5)call RegionAddRect(TX0,T5)call RegionAddRect(TX0,R5)call RegionAddRect(TX0,P5)call RegionAddRect(TX0,Q5)call RegionAddRect(TX0,U5)call RegionAddRect(TX0,I6)set CH=CreateTrigger()call TriggerRegisterEnterRectSimple(CH,bj_mapInitialPlayableArea)call TriggerAddCondition(CH,Condition(function UZO))call TriggerAddAction(CH,function UVO)set DH=CreateTrigger()call Q9I(DH,EVENT_PLAYER_UNIT_DEATH)call TriggerAddCondition(DH,Condition(function UXO))call TriggerAddAction(DH,function UKO)set EH=CreateTrigger()call Q9I(EH,EVENT_PLAYER_UNIT_DEATH)call TriggerAddCondition(EH,Condition(function UMO))call TriggerAddAction(EH,function UTO)if(bj_isSinglePlayer and UPO())thencall IL2()endifset t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,WO,"-wtf",true)call TriggerAddAction(t,function IR2)call TriggerAddCondition(t,Condition(function IN2))set t=CreateTrigger()call TriggerRegisterPlayerUnitEvent(t,BO[1],EVENT_PLAYER_HERO_LEVEL,Condition(function LWI))call TriggerRegisterPlayerUnitEvent(t,BO[2],EVENT_PLAYER_HERO_LEVEL,Condition(function LWI))call TriggerRegisterPlayerUnitEvent(t,BO[3],EVENT_PLAYER_HERO_LEVEL,Condition(function LWI))call TriggerRegisterPlayerUnitEvent(t,BO[4],EVENT_PLAYER_HERO_LEVEL,Condition(function LWI))call TriggerRegisterPlayerUnitEvent(t,BO[5],EVENT_PLAYER_HERO_LEVEL,Condition(function LWI))call TriggerRegisterPlayerUnitEvent(t,CO[1],EVENT_PLAYER_HERO_LEVEL,Condition(function LWI))call TriggerRegisterPlayerUnitEvent(t,CO[2],EVENT_PLAYER_HERO_LEVEL,Condition(function LWI))call TriggerRegisterPlayerUnitEvent(t,CO[3],EVENT_PLAYER_HERO_LEVEL,Condition(function LWI))call TriggerRegisterPlayerUnitEvent(t,CO[4],EVENT_PLAYER_HERO_LEVEL,Condition(function LWI))call TriggerRegisterPlayerUnitEvent(t,CO[5],EVENT_PLAYER_HERO_LEVEL,Condition(function LWI))call TriggerAddCondition(t,Condition(function IU2))set t=nullset t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,WO,"-test",true)call TriggerAddCondition(t,Condition(function O12))set t=nullset t=CreateTrigger()set L7O=CreateRegion()call RegionAddRect(L7O,GetWorldBounds())call TriggerRegisterEnterRegion(t,L7O,Condition(function Q8I))call TriggerAddCondition(t,Condition(function OK2))set t=nullset L7O=nullset t=CreateTrigger()call TriggerRegisterUnitInRange(t,OZ,300,Condition(function Q8I))call TriggerRegisterUnitInRange(t,EZ,300,Condition(function Q8I))call TriggerRegisterUnitInRange(t,UH,300,Condition(function Q8I))call TriggerAddCondition(t,Condition(function OM2))set t=nullset t=CreateTrigger()call TriggerRegisterTimerEvent(t,25,false)call TriggerAddAction(t,function OR2)set t=nullset t=CreateTrigger()call TriggerRegisterTimerEvent(t,2,false)call TriggerAddCondition(t,Condition(function A22))set t=nullset SK=CreateRegion()call RegionAddRect(SK,F4)call RegionAddRect(SK,E4)set t=CreateTrigger()call TriggerRegisterTimerEvent(t,25,false)call TriggerAddAction(t,function AA2)set t=nullset t=CreateTrigger()call TriggerRegisterPlayerChatEvent(t,BO[1],"-",false)call TriggerRegisterPlayerChatEvent(t,BO[2],"-",false)call TriggerRegisterPlayerChatEvent(t,BO[3],"-",false)call TriggerRegisterPlayerChatEvent(t,BO[4],"-",false)call TriggerRegisterPlayerChatEvent(t,BO[5],"-",false)call TriggerRegisterPlayerChatEvent(t,CO[1],"-",false)call TriggerRegisterPlayerChatEvent(t,CO[2],"-",false)call TriggerRegisterPlayerChatEvent(t,CO[3],"-",false)call TriggerRegisterPlayerChatEvent(t,CO[4],"-",false)call TriggerRegisterPlayerChatEvent(t,CO[5],"-",false)call TriggerAddAction(t,function AC2)set t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_FINISH)call TriggerAddCondition(t,Condition(function DQ2))call TriggerAddAction(t,function E12)set BM[0]=falseset BM[1]=falseset BM[2]=falseset BM[3]=falseset BM[4]=falseset BM[5]=falseset BM[6]=falseset BM[7]=falseset BM[8]=falseset BM[9]=falseset BM[10]=falseset BM[11]=falseset BM[12]=falseset BM[13]=falseset BM[14]=falseset BM[15]=falseset BM[16]=falseset R00[0]=falseset R00[1]=falseset R00[2]=falseset R00[3]=falseset R00[4]=falseset R00[5]=falseset R00[6]=falseset R00[7]=falseset R00[8]=falseset R00[9]=falseset R00[10]=falseset R00[11]=falseset R00[12]=falseset R00[13]=falseset R00[14]=falseset R00[15]=falseset R00[16]=falseset RI0[0]=trueset RI0[1]=trueset RI0[2]=trueset RI0[3]=trueset RI0[4]=trueset RI0[5]=trueset RI0[6]=trueset RI0[7]=trueset RI0[8]=trueset RI0[9]=trueset RI0[10]=trueset RI0[11]=trueset RI0[12]=trueset RI0[13]=trueset RI0[14]=trueset RI0[15]=trueset RI0[16]=trueset R10[0]=falseset R10[1]=falseset R10[2]=falseset R10[3]=falseset R10[4]=falseset R10[5]=falseset R10[6]=falseset R10[7]=falseset R10[8]=falseset R10[9]=falseset R10[10]=falseset R10[11]=falseset R10[12]=falseset R10[13]=falseset R10[14]=falseset R10[15]=falseset R10[16]=falseset R40[0]=falseset R40[1]=falseset R40[2]=falseset R40[3]=falseset R40[4]=falseset R40[5]=falseset R40[6]=falseset R40[7]=falseset R40[8]=falseset R40[9]=falseset R40[10]=falseset R40[11]=falseset R40[12]=falseset R40[13]=falseset R40[14]=falseset R40[15]=falseset R40[16]=falseset R40[GetPlayerId(BO[1])]=trueset R40[GetPlayerId(BO[2])]=trueset R40[GetPlayerId(BO[3])]=trueset R40[GetPlayerId(BO[4])]=trueset R40[GetPlayerId(BO[5])]=trueset R40[GetPlayerId(CO[1])]=trueset R40[GetPlayerId(CO[2])]=trueset R40[GetPlayerId(CO[3])]=trueset R40[GetPlayerId(CO[4])]=trueset R40[GetPlayerId(CO[5])]=truecall EM2()set IM[0]=trueset IM[1]=trueset IM[2]=trueset IM[3]=trueset IM[4]=trueset IM[5]=trueset IM[6]=trueset IM[7]=trueset IM[8]=trueset IM[9]=trueset IM[10]=trueset IM[11]=trueset IM[12]=trueset IM[13]=trueset IM[14]=trueset IM[15]=trueset RA0[0]=falseset RA0[1]=falseset RA0[2]=falseset RA0[3]=falseset RA0[4]=falseset RA0[5]=falseset RA0[6]=falseset RA0[7]=falseset RA0[8]=falseset RA0[9]=falseset RA0[10]=falseset RA0[11]=falseset RA0[12]=falseset RA0[13]=falseset RA0[14]=falseset AM[GetPlayerId(BO[1])]=falseset AM[GetPlayerId(BO[2])]=falseset AM[GetPlayerId(BO[3])]=falseset AM[GetPlayerId(BO[4])]=falseset AM[GetPlayerId(BO[5])]=falseset AM[GetPlayerId(CO[1])]=falseset AM[GetPlayerId(CO[2])]=falseset AM[GetPlayerId(CO[3])]=falseset AM[GetPlayerId(CO[4])]=falseset AM[GetPlayerId(CO[5])]=falseset RB0[GetPlayerId(BO[1])]=falseset RB0[GetPlayerId(BO[2])]=falseset RB0[GetPlayerId(BO[3])]=falseset RB0[GetPlayerId(BO[4])]=falseset RB0[GetPlayerId(BO[5])]=falseset RB0[GetPlayerId(CO[1])]=falseset RB0[GetPlayerId(CO[2])]=falseset RB0[GetPlayerId(CO[3])]=falseset RB0[GetPlayerId(CO[4])]=falseset RB0[GetPlayerId(CO[5])]=falseset t=CreateTrigger()call QBI(t,EVENT_PLAYER_UNIT_ISSUED_ORDER)call QBI(t,EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER)call QBI(t,EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER)call TriggerAddCondition(t,Condition(function F72))set t=CreateTrigger()call TriggerRegisterTimerEvent(t,5,true)call TriggerAddCondition(t,Condition(function F62))set RD0[GetPlayerId(BO[1])]=falseset RD0[GetPlayerId(BO[2])]=falseset RD0[GetPlayerId(BO[3])]=falseset RD0[GetPlayerId(BO[4])]=falseset RD0[GetPlayerId(BO[5])]=falseset RD0[GetPlayerId(CO[1])]=falseset RD0[GetPlayerId(CO[2])]=falseset RD0[GetPlayerId(CO[3])]=falseset RD0[GetPlayerId(CO[4])]=falseset RD0[GetPlayerId(CO[5])]=falseset t=nullset FM[GetPlayerId(BO[1])]=falseset FM[GetPlayerId(BO[2])]=falseset FM[GetPlayerId(BO[3])]=falseset FM[GetPlayerId(BO[4])]=falseset FM[GetPlayerId(BO[5])]=falseset FM[GetPlayerId(CO[1])]=falseset FM[GetPlayerId(CO[2])]=falseset FM[GetPlayerId(CO[3])]=falseset FM[GetPlayerId(CO[4])]=falseset FM[GetPlayerId(CO[5])]=falseset t=CreateTrigger()call TriggerRegisterTimerEvent(t,0.01,false)call TriggerAddCondition(t,Condition(function FG2))set RH0[0]=falseset RH0[1]=falseset RH0[2]=falseset RH0[3]=falseset RH0[4]=falseset RH0[5]=falseset RH0[6]=falseset RH0[7]=falseset RH0[8]=falseset RH0[9]=falseset RH0[10]=falseset RH0[11]=falseset RH0[12]=falseset RH0[13]=falseset RH0[14]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Orc\\WitchDoctor\\WitchDoctorPissed1.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Orc\\WitchDoctor\\WitchDoctorPissed2.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Orc\\WitchDoctor\\WitchDoctorPissed3.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Orc\\WitchDoctor\\WitchDoctorPissed4.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Orc\\WitchDoctor\\WitchDoctorPissed5.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Orc\\WitchDoctor\\WitchDoctorPissed6.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Undead\\HeroDreadLord\\HeroDreadlordPissed1.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Undead\\HeroDreadLord\\HeroDreadlordPissed2.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Undead\\HeroDreadLord\\HeroDreadlordPissed3.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Undead\\HeroDreadLord\\HeroDreadlordPissed4.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Undead\\HeroDreadLord\\HeroDreadlordPissed5.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Undead\\HeroDreadLord\\HeroDreadlordPissed6.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Undead\\HeroDreadLord\\HeroDreadlordPissed7.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Creeps\\HEROGoblinALCHEMIST\\HeroAlchemistPissed1.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Creeps\\HEROGoblinALCHEMIST\\HeroAlchemistPissed2.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Creeps\\HEROGoblinALCHEMIST\\HeroAlchemistPissed3.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Creeps\\HEROGoblinALCHEMIST\\HeroAlchemistPissed4.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Creeps\\HEROGoblinALCHEMIST\\HeroAlchemistPissed5.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Creeps\\HEROGoblinALCHEMIST\\HeroAlchemistPissed6.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Human\\BloodElfSpellThief\\SpellbreakerPissed1.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Human\\BloodElfSpellThief\\SpellbreakerPissed2.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Human\\BloodElfSpellThief\\SpellbreakerPissed3.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Human\\BloodElfSpellThief\\SpellbreakerPissed4.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Human\\BloodElfSpellThief\\SpellbreakerPissed5.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Human\\Rifleman\\RiflemanPissed1.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Human\\Rifleman\\RiflemanPissed2.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Human\\Rifleman\\RiflemanPissed3.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Human\\Rifleman\\RiflemanPissed4.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Human\\Rifleman\\RiflemanPissed5.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Human\\Rifleman\\RiflemanPissed6.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Human\\Rifleman\\RiflemanPissed7.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Human\\Rifleman\\RiflemanPissed8.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Orc\\HeroShadowHunter\\ShadowHunterPissed1.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Orc\\HeroShadowHunter\\ShadowHunterPissed2.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Orc\\HeroShadowHunter\\ShadowHunterPissed3.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Orc\\HeroShadowHunter\\ShadowHunterPissed4.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Orc\\HeroShadowHunter\\ShadowHunterPissed5.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Orc\\HeroShadowHunter\\ShadowHunterPissed6.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Orc\\HeroShadowHunter\\ShadowHunterPissed7.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Orc\\HeroShadowHunter\\ShadowHunterPissed8.wav"set RY0[RJ0]=falseset RJ0=RJ0+1set RX0[RJ0]="Units\\Orc\\HeroShadowHunter\\ShadowHunterPissed9.wav"set RY0[RJ0]=falseset RX0[RJ0]="Units\\Creeps\\Ogre\\OgrePissed1.wav"set RY0[RJ0]=falseset RX0[RJ0]="Units\\Creeps\\Ogre\\OgrePissed2.wav"set RY0[RJ0]=falseset RX0[RJ0]="Units\\Creeps\\Ogre\\OgrePissed3.wav"set RY0[RJ0]=falseset RX0[RJ0]="Units\\Creeps\\Ogre\\OgrePissed4.wav"set RY0[RJ0]=falseset RX0[RJ0]="Units\\Creeps\\Ogre\\OgrePissed5.wav"set RY0[RJ0]=falseset RX0[RJ0]="Units\\Creeps\\GoblinSapper\\GoblinSapperPissed1.wav"set RY0[RJ0]=falseset RX0[RJ0]="Units\\Creeps\\GoblinSapper\\GoblinSapperPissed2.wav"set RY0[RJ0]=falseset RX0[RJ0]="Units\\Creeps\\GoblinSapper\\GoblinSapperPissed3.wav"set RY0[RJ0]=falseset RX0[RJ0]="Units\\Creeps\\GoblinSapper\\GoblinSapperPissed4.wav"set RY0[RJ0]=falseset RX0[RJ0]="Units\\Creeps\\GoblinSapper\\GoblinSapperPissed5.wav"set RY0[RJ0]=falseset RX0[RJ0]="Units\\Creeps\\GoblinSapper\\GoblinSapperPissed6.wav"set RY0[RJ0]=falseset RX0[RJ0]="Units\\Creeps\\GoblinSapper\\GoblinSapperPissed7.wav"set RY0[RJ0]=falseset RX0[RJ0]="Units\\Orc\\HeroBladeMaster\\HeroBladeMasterPissed1.wav"set RY0[RJ0]=falseset RX0[RJ0]="Units\\Orc\\HeroBladeMaster\\HeroBladeMasterPissed2.wav"set RY0[RJ0]=falseset RX0[RJ0]="Units\\Orc\\HeroBladeMaster\\HeroBladeMasterPissed3.wav"set RY0[RJ0]=falseset RX0[RJ0]="Units\\Orc\\HeroBladeMaster\\HeroBladeMasterPissed4.wav"set RY0[RJ0]=falseset RX0[RJ0]="Units\\Creeps\\PandarenBrewmaster\\PandarenBrewmasterPissed1.wav"set RY0[RJ0]=falseset RX0[RJ0]="Units\\Creeps\\PandarenBrewmaster\\PandarenBrewmasterPissed2.wav"set RY0[RJ0]=falseset RX0[RJ0]="Units\\Creeps\\PandarenBrewmaster\\PandarenBrewmasterPissed3.wav"set RY0[RJ0]=falseset RX0[RJ0]="Units\\Creeps\\PandarenBrewmaster\\PandarenBrewmasterPissed4.wav"set RY0[RJ0]=falseset RX0[RJ0]="Units\\Creeps\\PandarenBrewmaster\\PandarenBrewmasterPissed5.wav"set RY0[RJ0]=falseset RX0[RJ0]="Units\\Creeps\\PandarenBrewmaster\\PandarenBrewmasterPissed6.wav"set RY0[RJ0]=falseset RX0[RJ0]="Units\\Creeps\\PandarenBrewmaster\\PandarenBrewmasterPissed7.wav"set RY0[RJ0]=falseset RX0[RJ0]="Units\\Creeps\\PandarenBrewmaster\\PandarenBrewmasterPissed8.wav"set RY0[RJ0]=falseset RM0[0]=falseset RM0[1]=falseset RM0[2]=falseset RM0[3]=falseset RM0[4]=falseset RM0[5]=falseset RM0[6]=falseset RM0[7]=falseset RM0[8]=falseset RM0[9]=falseset RM0[10]=falseset RM0[11]=falseset RM0[12]=falseset RM0[13]=falseset t=CreateTrigger()set MKI=GetHandleId(t)call TriggerRegisterTimerEvent(t,0.02,true)call TriggerAddCondition(t,Condition(function GQ2))call SaveReal(XY,(MKI),(149),((0)*1.0))call SaveReal(XY,(MKI),(150),((0)*1.0))call SaveReal(XY,(MKI),(151),((160)*1.0))set WL[0]=falseset WL[1]=falseset WL[2]=falseset WL[3]=falseset WL[4]=falseset WL[5]=falseset WL[6]=falseset WL[7]=falseset WL[8]=falseset WL[9]=falseset WL[10]=falseset WL[11]=falseset WL[12]=falseset t=nullset t=CreateTrigger()call TriggerAddAction(t,function ZY2)call TriggerAddCondition(t,Condition(function H12))set RR0=tset t=CreateTrigger()call TriggerRegisterTimerEvent(t,0.01,false)call TriggerAddCondition(t,Condition(function ZJ2))set t=nullif C2 thenset t=CreateTrigger()call TriggerRegisterTimerEvent(t,1,true)call TriggerAddCondition(t,Condition(function L72))endifset t=nullset FH=CreateTrigger()call TriggerRegisterTimerExpireEvent(FH,E0[1])call TriggerAddAction(FH,function ME2)set GH=CreateTrigger()call TriggerRegisterTimerExpireEvent(GH,E0[2])call TriggerAddAction(GH,function MG2)set HH=CreateTrigger()call TriggerRegisterTimerExpireEvent(HH,E0[3])call TriggerAddAction(HH,function MZ2)set ZH=CreateTrigger()call TriggerRegisterTimerExpireEvent(ZH,E0[4])call TriggerAddAction(ZH,function MW2)set VH=CreateTrigger()call TriggerRegisterTimerExpireEvent(VH,E0[5])call TriggerAddAction(VH,function MY2)set WH=CreateTrigger()call TriggerRegisterTimerExpireEvent(WH,E0[7])call TriggerAddAction(WH,function MK2)set XH=CreateTrigger()call TriggerRegisterTimerExpireEvent(XH,E0[8])call TriggerAddAction(XH,function MM2)set YH=CreateTrigger()call TriggerRegisterTimerExpireEvent(YH,E0[9])call TriggerAddAction(YH,function MS2)set JH=CreateTrigger()call TriggerRegisterTimerExpireEvent(JH,E0[10])call TriggerAddAction(JH,function MR2)set KH=CreateTrigger()call TriggerRegisterTimerExpireEvent(KH,E0[11])call TriggerAddAction(KH,function MQ2)set t=CreateTrigger()call TriggerRegisterTimerEvent(t,14,false)call TriggerAddCondition(t,Condition(function N12))set t=CreateTrigger()call TriggerRegisterTimerEvent(t,15,false)call TriggerAddCondition(t,Condition(function NI2))set LH=CreateTrigger()call TriggerRegisterTimerEventSingle(LH,65.00)call TriggerAddAction(LH,function N22)set MH=CreateTrigger()call TriggerRegisterTimerEventSingle(MH,90.00)call TriggerAddAction(MH,function N42)set NH=CreateTrigger()call TriggerRegisterTimerEventSingle(NH,120.00)call TriggerAddAction(NH,function N62)set t=CreateTrigger()set L7O=CreateRegion()call RegionAddRect(L7O,GetWorldBounds())call TriggerRegisterEnterRegion(t,L7O,Condition(function LWI))call TriggerAddCondition(t,Condition(function VB4))set GWI[1]=1093686867set GWI[2]=1093686859set GWI[3]=1093686865set GWI[4]=1093687372set GWI[5]=1093686861set GWI[6]=1093686862set GWI[7]=1093686863set GWI[8]=1093686864set GWI[9]=1093686855set GWI[10]=1093686874set t=nullset L7O=nullset t=CreateTrigger()call Q9I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)call TriggerAddCondition(t,Condition(function OY4))call TriggerAddAction(t,function OJ4)endfunctionfunction config takes nothing returns nothingcall SetMapName("TRIGSTR_50000")call SetMapDescription("TRIGSTR_50001")call SetPlayers(10)call SetTeams(10)call SetGamePlacement(MAP_PLACEMENT_TEAMS_TOGETHER)call DefineStartLocation(0,-6990.0,6840.0)call DefineStartLocation(1,-6990.0,6840.0)call DefineStartLocation(2,-6990.0,6840.0)call DefineStartLocation(3,-6990.0,6840.0)call DefineStartLocation(4,-6990.0,6840.0)call DefineStartLocation(5,-6990.0,6840.0)call DefineStartLocation(6,-6990.0,6840.0)call DefineStartLocation(7,-6990.0,6840.0)call DefineStartLocation(8,-6990.0,6840.0)call DefineStartLocation(9,-6990.0,6840.0)call SetPlayerStartLocation(Player(1),0)call ForcePlayerStartLocation(Player(1),0)call SetPlayerColor(Player(1),ConvertPlayerColor(1))call SetPlayerRacePreference(Player(1),RACE_PREF_NIGHTELF)call SetPlayerRaceSelectable(Player(1),false)call SetPlayerController(Player(1),MAP_CONTROL_USER)call SetPlayerStartLocation(Player(2),1)call ForcePlayerStartLocation(Player(2),1)call SetPlayerColor(Player(2),ConvertPlayerColor(2))call SetPlayerRacePreference(Player(2),RACE_PREF_NIGHTELF)call SetPlayerRaceSelectable(Player(2),false)call SetPlayerController(Player(2),MAP_CONTROL_USER)call SetPlayerStartLocation(Player(3),2)call ForcePlayerStartLocation(Player(3),2)call SetPlayerColor(Player(3),ConvertPlayerColor(3))call SetPlayerRacePreference(Player(3),RACE_PREF_NIGHTELF)call SetPlayerRaceSelectable(Player(3),false)call SetPlayerController(Player(3),MAP_CONTROL_USER)call SetPlayerStartLocation(Player(4),3)call ForcePlayerStartLocation(Player(4),3)call SetPlayerColor(Player(4),ConvertPlayerColor(4))call SetPlayerRacePreference(Player(4),RACE_PREF_NIGHTELF)call SetPlayerRaceSelectable(Player(4),false)call SetPlayerController(Player(4),MAP_CONTROL_USER)call SetPlayerStartLocation(Player(5),4)call ForcePlayerStartLocation(Player(5),4)call SetPlayerColor(Player(5),ConvertPlayerColor(5))call SetPlayerRacePreference(Player(5),RACE_PREF_NIGHTELF)call SetPlayerRaceSelectable(Player(5),false)call SetPlayerController(Player(5),MAP_CONTROL_USER)call SetPlayerStartLocation(Player(7),5)call ForcePlayerStartLocation(Player(7),5)call SetPlayerColor(Player(7),ConvertPlayerColor(7))call SetPlayerRacePreference(Player(7),RACE_PREF_UNDEAD)call SetPlayerRaceSelectable(Player(7),false)call SetPlayerController(Player(7),MAP_CONTROL_USER)call SetPlayerStartLocation(Player(8),6)call ForcePlayerStartLocation(Player(8),6)call SetPlayerColor(Player(8),ConvertPlayerColor(8))call SetPlayerRacePreference(Player(8),RACE_PREF_UNDEAD)call SetPlayerRaceSelectable(Player(8),false)call SetPlayerController(Player(8),MAP_CONTROL_USER)call SetPlayerStartLocation(Player(9),7)call ForcePlayerStartLocation(Player(9),7)call SetPlayerColor(Player(9),ConvertPlayerColor(9))call SetPlayerRacePreference(Player(9),RACE_PREF_UNDEAD)call SetPlayerRaceSelectable(Player(9),false)call SetPlayerController(Player(9),MAP_CONTROL_USER)call SetPlayerStartLocation(Player(10),8)call ForcePlayerStartLocation(Player(10),8)call SetPlayerColor(Player(10),ConvertPlayerColor(10))call SetPlayerRacePreference(Player(10),RACE_PREF_UNDEAD)call SetPlayerRaceSelectable(Player(10),false)call SetPlayerController(Player(10),MAP_CONTROL_USER)call SetPlayerStartLocation(Player(11),9)call ForcePlayerStartLocation(Player(11),9)call SetPlayerColor(Player(11),ConvertPlayerColor(11))call SetPlayerRacePreference(Player(11),RACE_PREF_UNDEAD)call SetPlayerRaceSelectable(Player(11),false)call SetPlayerController(Player(11),MAP_CONTROL_USER)call InitCustomTeams()call SetPlayerAlliance(Player(15),Player(1),ConvertAllianceType(6),true)call SetPlayerAlliance(Player(15),Player(2),ConvertAllianceType(6),true)call SetPlayerAlliance(Player(15),Player(3),ConvertAllianceType(6),true)call SetPlayerAlliance(Player(15),Player(4),ConvertAllianceType(6),true)call SetPlayerAlliance(Player(15),Player(5),ConvertAllianceType(6),true)call SetPlayerAlliance(Player(15),Player(7),ConvertAllianceType(6),true)call SetPlayerAlliance(Player(15),Player(8),ConvertAllianceType(6),true)call SetPlayerAlliance(Player(15),Player(9),ConvertAllianceType(6),true)call SetPlayerAlliance(Player(15),Player(10),ConvertAllianceType(6),true)call SetPlayerAlliance(Player(15),Player(11),ConvertAllianceType(6),true)call SetStartLocPrioCount(0,9)call SetStartLocPrio(0,0,1,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(0,1,2,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(0,2,3,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(0,3,4,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(0,4,5,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(0,5,6,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(0,6,7,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(0,7,8,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(0,8,9,MAP_LOC_PRIO_HIGH)call SetStartLocPrioCount(1,9)call SetStartLocPrio(1,0,0,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(1,1,2,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(1,2,3,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(1,3,4,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(1,4,5,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(1,5,6,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(1,6,7,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(1,7,8,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(1,8,9,MAP_LOC_PRIO_HIGH)call SetStartLocPrioCount(2,9)call SetStartLocPrio(2,0,0,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(2,1,1,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(2,2,3,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(2,3,4,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(2,4,5,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(2,5,6,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(2,6,7,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(2,7,8,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(2,8,9,MAP_LOC_PRIO_HIGH)call SetStartLocPrioCount(3,9)call SetStartLocPrio(3,0,0,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(3,1,1,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(3,2,2,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(3,3,4,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(3,4,5,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(3,5,6,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(3,6,7,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(3,7,8,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(3,8,9,MAP_LOC_PRIO_HIGH)call SetStartLocPrioCount(4,9)call SetStartLocPrio(4,0,0,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(4,1,1,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(4,2,2,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(4,3,3,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(4,4,5,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(4,5,6,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(4,6,7,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(4,7,8,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(4,8,9,MAP_LOC_PRIO_HIGH)call SetStartLocPrioCount(5,9)call SetStartLocPrio(5,0,0,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(5,1,1,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(5,2,2,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(5,3,3,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(5,4,4,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(5,5,6,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(5,6,7,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(5,7,8,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(5,8,9,MAP_LOC_PRIO_HIGH)call SetStartLocPrioCount(6,9)call SetStartLocPrio(6,0,0,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(6,1,1,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(6,2,2,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(6,3,3,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(6,4,4,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(6,5,5,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(6,6,7,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(6,7,8,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(6,8,9,MAP_LOC_PRIO_HIGH)call SetStartLocPrioCount(7,9)call SetStartLocPrio(7,0,0,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(7,1,1,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(7,2,2,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(7,3,3,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(7,4,4,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(7,5,5,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(7,6,6,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(7,7,8,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(7,8,9,MAP_LOC_PRIO_HIGH)call SetStartLocPrioCount(8,9)call SetStartLocPrio(8,0,0,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(8,1,1,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(8,2,2,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(8,3,3,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(8,4,4,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(8,5,5,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(8,6,6,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(8,7,7,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(8,8,9,MAP_LOC_PRIO_HIGH)call SetStartLocPrioCount(9,9)call SetStartLocPrio(9,0,0,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(9,1,1,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(9,2,2,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(9,3,3,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(9,4,4,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(9,5,5,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(9,6,6,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(9,7,7,MAP_LOC_PRIO_HIGH)call SetStartLocPrio(9,8,8,MAP_LOC_PRIO_HIGH)endfunction